blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82 values | src_encoding stringclasses 28 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 5.41M | extension stringclasses 11 values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f489bc65166deacb99eb76fd626461fa064e99e0 | 441c819b0329c6510e136e1995b00bcf89cae34e | /app/src/main/java/com/example/mad/View_Booking_Client.java | 4e38a86f0154d4d5817344927a6908223923933f | [] | no_license | Theebanraj-Uthayakumar/Royal_Kitchen | c521894b2603632e0b7eb472a578e6b7db3e4d2d | fac884abf3d8792b3ebe5dd1d392632c6ad7c81a | refs/heads/main | 2023-09-01T11:21:35.155096 | 2021-09-29T02:42:44 | 2021-09-29T02:42:44 | 408,146,576 | 0 | 0 | null | 2021-09-24T11:24:24 | 2021-09-19T14:18:11 | Java | UTF-8 | Java | false | false | 3,314 | java | package com.example.mad;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import java.util.ArrayList;
public class View_Booking_Client extends AppCompatActivity {
RecyclerView recyclearView;
MyDatabaseHelper myDB;
ArrayList<String > Booking_id, check_date, check_time, cabin_type, number_of_cabin, email, cnumber, discount, fare;
CustomAdapter customAdapter;
EditText searchBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view__booking__client);
recyclearView = findViewById(R.id.recyclerview);
myDB = new MyDatabaseHelper(View_Booking_Client.this);
Booking_id = new ArrayList<>();
check_date = new ArrayList<>();
check_time = new ArrayList<>();
cabin_type = new ArrayList<>();
number_of_cabin = new ArrayList<>();
email = new ArrayList<>();
cnumber = new ArrayList<>();
discount = new ArrayList<>();
fare = new ArrayList<>();
storeDataInArrays();
customAdapter = new CustomAdapter(View_Booking_Client.this,this ,Booking_id, check_date,
check_time, cabin_type, number_of_cabin, email, cnumber, discount, fare);
recyclearView.setAdapter(customAdapter);
recyclearView.setLayoutManager(new LinearLayoutManager(View_Booking_Client.this));
searchBar = findViewById(R.id.search_field);
searchBar.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
// filter(s.toString());
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(requestCode == 1){
recreate();
}
}
void storeDataInArrays(){
Cursor cursor = myDB.readAllData();
if(cursor.getCount() == 0){
Toast.makeText(this,"No data", Toast.LENGTH_SHORT).show();
}else{
while (cursor.moveToNext()){
Booking_id.add(cursor.getString(0));
check_date.add(cursor.getString(1));
check_time.add(cursor.getString(2));
cabin_type.add(cursor.getString(3));
number_of_cabin.add(cursor.getString(4));
email.add(cursor.getString(5));
cnumber.add(cursor.getString(6));
discount.add(cursor.getString(7));
fare.add(cursor.getString(8));
}
}
}
} | [
"69495468+Theebanraj-Uthayakumar@users.noreply.github.com"
] | 69495468+Theebanraj-Uthayakumar@users.noreply.github.com |
b7524118d8d7cd02197972b78ba111abde34065e | b78d44ce7ad025d099addad4307fc19750b9c3b6 | /src/main/java/com/serg/model/settings/Color.java | 1ca1c8fb1c7c312636c0f0b76173e406a2af4e81 | [] | no_license | Vyrm/proCamp | 766dc52f839ea74ee21d568c1901904dfdb7facd | da8c7ec15a22ec0fc86feb1e69b467c53cef7671 | refs/heads/master | 2021-04-15T08:12:08.436424 | 2018-03-23T17:14:01 | 2018-03-23T17:14:01 | 126,515,733 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 86 | java | package com.serg.model.settings;
public enum Color {
Red,
Blue,
Yellow
}
| [
"serhii.onyshchenko@synapse.com"
] | serhii.onyshchenko@synapse.com |
7718f8f34b9927a4cdb9a9c5f4e48ec2abb6115b | dddbc98625203127ffc5190b25a013334b7ec690 | /dependencies/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOUserSavepoint.java | 1434a1f94f4dfec64f198d2adc83e2da7a4cb296 | [
"EPL-1.0",
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | IHTSDO/snow-owl | 55fdcd5966fba335d5226c52002405334c17d0db | 90c17b806956ad15cdc66649aa4e193bad21ff46 | refs/heads/master | 2021-01-19T06:25:04.680073 | 2019-08-09T09:26:27 | 2019-08-09T09:26:27 | 32,463,362 | 12 | 1 | Apache-2.0 | 2019-05-23T08:55:43 | 2015-03-18T14:22:29 | Java | UTF-8 | Java | false | false | 1,214 | java | /*
* Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Simon McDuff - initial API and implementation
* Eike Stepper - maintenance
* Simon McDuff - bug 213402
*/
package org.eclipse.emf.cdo.transaction;
/**
* Creates a save point in a {@link CDOUserTransaction} that can be used to roll back a part of the transaction.
* <p>
* <b>Note:</b> Save points do not flush to disk. Everything is done in memory on the client side.
*
* @author Simon McDuff
* @since 3.0
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface CDOUserSavepoint
{
public CDOUserTransaction getTransaction();
public CDOUserSavepoint getNextSavepoint();
public CDOUserSavepoint getPreviousSavepoint();
/**
* @since 4.1
*/
public int getNumber();
public boolean isValid();
public void rollback();
}
| [
"bbanfai@b2international.com"
] | bbanfai@b2international.com |
c47879f2ac5eba5fb4f18877ffd4b46e947e1cc7 | c0f2a75d919e1cb464746a8f05561f98ccca61a7 | /versions.alt/seeded/v3/xml-security/src/org/apache/xml/security/keys/content/x509/XMLX509CRL.java | 3c7aaa31146017f0ebeec6fce9f322f4f1e9cdea | [
"Apache-2.0",
"BSD-2-Clause",
"Apache-1.1"
] | permissive | Ting007/xml-security | 0e8c73f908d450a0a731336abffdae2371b01139 | 6f518ac51e6d5a19a57acfd6f351af25ac44f649 | refs/heads/master | 2021-06-30T02:26:01.298862 | 2017-08-17T13:38:33 | 2017-08-17T13:38:33 | 100,404,900 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,205 | java | /*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "<WebSig>" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 2001, Institute for
* Data Communications Systems, <http://www.nue.et-inf.uni-siegen.de/>.
* The development of this software was partly funded by the European
* Commission in the <WebSig> project in the ISIS Programme.
* For more information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.xml.security.keys.content.x509;
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.utils.Constants;
import org.apache.xml.security.utils.SignatureElementProxy;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
*
*
*
*
* @author $Author: dohy $
*
*/
public class XMLX509CRL extends SignatureElementProxy
implements XMLX509DataContent {
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(XMLX509CRL.class.getName());
/**
* Constructor XMLX509CRL
*
* @param element
* @param BaseURI
* @throws XMLSecurityException
*/
public XMLX509CRL(Element element, String BaseURI)
throws XMLSecurityException {
super(element, BaseURI);
}
/**
* Constructor X509CRL
*
* @param doc
* @param crlBytes
*/
public XMLX509CRL(Document doc, byte[] crlBytes) {
super(doc);
this.addBase64Text(crlBytes);
}
/**
* Method getCRLBytes
*
*
* @throws XMLSecurityException
*/
public byte[] getCRLBytes() throws XMLSecurityException {
return this.getBytesFromTextChild();
}
public String getBaseLocalName() {
return Constants._TAG_X509CRL;
}
}
| [
"twa700@yahoo.com"
] | twa700@yahoo.com |
e8a2bad34da3162f4603f8d525263f07a6b57717 | 6f2b6fc237d6ed45cac1f80142a97835554044ac | /src/main/java/demo1.java | d2d15e9e8e97eaa957301a8c7842954713b68b24 | [] | no_license | turingF/newZKdemo | 4a5a23492ea8c64187b4b915e1e30e5070189963 | ccd433172393089c967137dc106e4fa7e0b4d967 | refs/heads/master | 2022-12-22T21:26:16.784148 | 2020-09-14T16:18:11 | 2020-09-14T16:18:11 | 292,596,571 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,054 | java | import com.alibaba.fastjson.JSONObject;
import kafkaAPI.ConsumerApi;
import kafkaAPI.ProducerApi;
import neo4jApi.Neo4jDriver;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
/**
* @author xuyang
* 业务总线模块
* 控制模块间发送消息
*/
public class demo1 {
private static String broker = "localhost:9092";
private static String topicName = "test002";
public static void main(String[] args) {
Neo4jDriver nd = new Neo4jDriver();
demo(nd);
}
public static void demo(Neo4jDriver nd){
//假设A要给B发一个message(JSON文件)
JSONObject message = new JSONObject();
// //需要携带自身模块参数 *
message.put("appId","A");
message.put("name","xuyang");
message.put("school","hust");
message.put("id","M2019");
//需要创建Topic节点(neo4j)
nd.CreateNode(topicName,"topic");
KafkaProducer<String,String> A = ProducerApi.CreateProducer(broker);
ProducerApi.PubTopic(A,topicName,message);
nd.CreateNode("A", "module1");
nd.CreateEdge("A", "module1",topicName,"topic");
KafkaConsumer B = ConsumerApi.CreateConsumer(broker,"B");
B.subscribe(Collections.singletonList(topicName));
nd.CreateNode("B", "module1");
nd.CreateEdge(topicName,"topic","B", "module1");
while(true) {
ConsumerRecords<String, String> records = B.poll(Duration.ofMillis(1000));
for (ConsumerRecord<String, String> record : records) {
System.out.println(record.key().toString() + "---" + record.value().toString());
}
}
}
}
| [
"m15852925655_3@163.com"
] | m15852925655_3@163.com |
880d6413705509881cf4f66db520b3d59ff82be2 | e66559bca9931610bd422586d73e8c091f4ed626 | /solid-master3/open_closed/bad/src/Greeter.java | 7170b456ed13aeaf168906552beb6f8bd2f3b1fe | [] | no_license | Skvortsovg/solid_exercises | 2c189a9ea920565eb11f2a046aeb6af8b8fb78e9 | 6bd2f2bcf9d8a9ff233f4ed4cb5bc961a22458a5 | refs/heads/master | 2021-03-31T01:03:19.569513 | 2018-03-19T08:46:09 | 2018-03-19T08:46:09 | 125,113,045 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 267 | java | /**
* Created by mrk on 4/7/14.
*/
public class Greeter {
private Personality personality;
public Greeter(Personality personality) {
this.personality = personality;
}
public String greet() {
return this.personality.greet()
}
} | [
"skvortsovg@yandex.ru"
] | skvortsovg@yandex.ru |
53e4669194e82f3467539cc76115b582d8de6883 | e80ec7afca71f6cbd25e6f23efed4e9f2c36411a | /src/main/java/net/prasenjit/poc/nashorn/init/ScriptLoader.java | 0e9d1053d7fca1d93901f196f0993b5c5e0fb5e3 | [] | no_license | prasenjit-net/nashorn | a866365680aa42e939641572db68ca3307088ab7 | 3e3755023c0517309e3ac575e66b9398d6e1d1b8 | refs/heads/master | 2020-12-24T16:59:25.196139 | 2015-05-13T14:57:23 | 2015-05-13T14:57:23 | 35,375,704 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,380 | java | package net.prasenjit.poc.nashorn.init;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.cache.CacheManager;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.stereotype.Component;
import org.springframework.util.StreamUtils;
@Component
public class ScriptLoader implements CommandLineRunner {
private ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
@Autowired
private CacheManager cacheManager;
@Override
public void run(String... args) throws Exception {
Resource[] resources = resolver.getResources("classpath:/scripts/*.txt");
for (Resource resource : resources) {
try (InputStream scriptStream = resource.getInputStream()) {
String scriptString = StreamUtils.copyToString(scriptStream, Charset.defaultCharset());
System.out.println(resource.getFilename());
String name = resource.getFilename().split("\\.")[0];
cacheManager.getCache("personalizationRules").put(name, scriptString);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
}
| [
"email@prasenjit.net"
] | email@prasenjit.net |
4f1f4873764c41ea96a0d04a7acd896bb1857fc0 | 0b0b04b0f42c9a5311339713a4d9bacdbb613334 | /jenkins/custom_tools/DevopsJsonConv/src/main/java/com/infosys/json/JunitReportsclass.java | bf1fb8cf1f05db9e4205a1aaccd59ef51d4d0b5c | [
"MIT"
] | permissive | InfyMegha/IDP_OSS-1 | 8b4bd9233a0f2d17da5498e256952ef04d246f22 | 54f3bff3e924a963f56488e00dabcc5ed8d18b58 | refs/heads/master | 2020-03-30T15:43:14.644576 | 2018-09-29T23:43:01 | 2018-09-29T23:43:01 | 151,376,283 | 0 | 0 | MIT | 2018-10-04T06:40:39 | 2018-10-03T07:28:59 | Java | UTF-8 | Java | false | false | 177 | java | package com.infosys.json;
public class JunitReportsclass {
private String URL;
public String getURL() {
return URL;
}
public void setURL(String uRL) {
URL = uRL;
}
}
| [
"hardik.rathod01@infosys.com"
] | hardik.rathod01@infosys.com |
4bc0b101345dcf3fed5ab93b9b32a9bd49d0e967 | 08846c62361284a6771e89ec93453d3109b571b9 | /src/main/java/com/jtzh/vo/dutyPoint/DutyPointVO.java | 5423739842f778617b6b80c5c82a7e703f1cbd4e | [] | no_license | lzj1995822/zhbh-api | a497b176a1ec1302143684652d18113be752e383 | 5c8a02d2f55e8733f91fe68ae9e0d09934fa3de3 | refs/heads/master | 2023-08-04T14:33:05.831163 | 2020-01-19T02:19:13 | 2020-01-19T02:19:13 | 206,700,789 | 0 | 1 | null | 2023-07-22T15:28:54 | 2019-09-06T02:57:22 | TSQL | UTF-8 | Java | false | false | 2,118 | java | /* */ package com.jtzh.vo.dutyPoint;
/* */
/* */
/* */ public class DutyPointVO
/* */ {
/* */ private Integer scenicAreaDutyPointID;
/* */
/* */ private String scenicAreaDutyPointName;
/* */
/* */ private String netGridName;
/* */
/* */ private Double scenicAreaDutyPointLongitude;
/* */ private Double scenicAreaDutyPointLatitude;
/* */
/* */ public Integer getScenicAreaDutyPointID()
/* */ {
/* 17 */ return this.scenicAreaDutyPointID;
/* */ }
/* */
/* */ public void setScenicAreaDutyPointID(Integer scenicAreaDutyPointID) {
/* 21 */ this.scenicAreaDutyPointID = scenicAreaDutyPointID;
/* */ }
/* */
/* */ public String getScenicAreaDutyPointName() {
/* 25 */ return this.scenicAreaDutyPointName;
/* */ }
/* */
/* */ public void setScenicAreaDutyPointName(String scenicAreaDutyPointName) {
/* 29 */ this.scenicAreaDutyPointName = scenicAreaDutyPointName;
/* */ }
/* */
/* */ public String getNetGridName() {
/* 33 */ return this.netGridName;
/* */ }
/* */
/* */ public void setNetGridName(String netGridName) {
/* 37 */ this.netGridName = netGridName;
/* */ }
/* */
/* */ public Double getScenicAreaDutyPointLongitude() {
/* 41 */ return this.scenicAreaDutyPointLongitude;
/* */ }
/* */
/* */ public void setScenicAreaDutyPointLongitude(Double scenicAreaDutyPointLongitude) {
/* 45 */ this.scenicAreaDutyPointLongitude = scenicAreaDutyPointLongitude;
/* */ }
/* */
/* */ public Double getScenicAreaDutyPointLatitude() {
/* 49 */ return this.scenicAreaDutyPointLatitude;
/* */ }
/* */
/* */ public void setScenicAreaDutyPointLatitude(Double scenicAreaDutyPointLatitude) {
/* 53 */ this.scenicAreaDutyPointLatitude = scenicAreaDutyPointLatitude;
/* */ }
/* */ }
/* Location: C:\Users\rainb\Desktop\msmis.war!\WEB-INF\classes\com\gbt\vo\dutyPoint\DutyPointVO.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/ | [
"243485908@qq.com"
] | 243485908@qq.com |
c58474c35672ffa67af1dd02cf2b3fd8ce052547 | 4a0e6ecfe46e931dbd71c08e555867f103440688 | /src/com/bear53/ecore/commands/CommandUnMute.java | 4ca532f74381ccbaa1949db488c478415a85e0a8 | [] | no_license | ItsDoot/FlameKitPvp | 670b0c424938cf4fd09c85eae0c2fbc28e1e0517 | 414addc8dc49ee193be36ac1a6bc5505e12f9241 | refs/heads/master | 2023-03-09T01:24:32.030739 | 2021-02-28T04:07:33 | 2021-02-28T04:07:33 | 343,016,668 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,879 | java | package com.bear53.ecore.commands;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.bear53.ecore.Core;
public class CommandUnMute implements CommandExecutor {
Core plugin;
public CommandUnMute(Core pl) {
this.plugin = pl;
}
public boolean onCommand(CommandSender sender, Command cmd, String label,
String[] args) {
if (sender.isOp()) {
if (args.length == 0) {
sender.sendMessage(ChatColor.RED
+ "Invalid arguments! Usage: /unmute <player>");
} else if (args.length == 1) {
Player p = Bukkit.getServer().getPlayer(args[0]);
if (p == null) {
sender.sendMessage(ChatColor.RED + "Error: The player '"
+ args[0] + "' cannot be found.");
} else if (p.isOp()) {
sender.sendMessage(ChatColor.RED
+ "You cannot mute that player.");
} else {
this.plugin.getConfig().set(
"players." + p.getUniqueId() + ".isMuted",
Boolean.valueOf(false));
p.sendMessage(Core.prefix + ChatColor.GRAY
+ "You have been unmuted by " + ChatColor.RED
+ sender.getName() + ChatColor.GRAY + ".");
for (Player ops : Bukkit.getServer().getOnlinePlayers()) {
if (ops.isOp()) {
ops.sendMessage(Core.prefix + ChatColor.GRAY
+ "Player " + ChatColor.RED + p.getName()
+ ChatColor.GRAY + " has been unmuted by "
+ ChatColor.RED + sender.getName()
+ ChatColor.GRAY + ".");
}
}
this.plugin.saveConfig();
}
} else {
sender.sendMessage(ChatColor.RED
+ "Invalid arguments! Usage: /unmute <player>");
}
} else {
sender.sendMessage(ChatColor.RED + "No permission.");
}
return true;
}
}
| [
"rechargeassistance@gmail.com"
] | rechargeassistance@gmail.com |
4d936fdfb64a14e6d6e4273593e93b3fe90e04a2 | 4133d87fdfd7171c38edce6fd819d43e0abd3ca6 | /StudentDC.java | 2a9cd2fb176266527d8cfe1f115e52bec3859439 | [] | no_license | candilikoglu/1st-year- | 02d2fb0f5c514cf2be12d355049befccd3627390 | 96e4137a43fb3c968d5bb0854922449954871ce7 | refs/heads/master | 2021-01-03T16:49:02.147489 | 2020-04-10T13:31:23 | 2020-04-10T13:31:23 | 240,158,491 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,366 | java | // can dilikoglu
// 00463308
// this assignment is completed in my room
// this is the student class. In this class, attributes and methods will be created in order to use in the driver program
public class StudentDC
{
private String name;
private String major;
private String classification;
private float gpa;
public StudentDC(String n , String m , String c , float g) // constructor which accepts parameters
{ name = n;
major = m;
classification = c;
gpa = g;
}
public StudentDC() // no-arg constructor
{ name="no";
major="no";
classification="no";
gpa=0;
}
public void setName(String n) // mutator method for name
{ name = n;
}
public void changeMajor( String m) // mutator method for major
{ major=m;
}
public void updateClassification( String c) // mutator method for classification
{ classification = c;
}
public void setGPA( float g) // mutator method for gpa
{ gpa = g ;
}
public String getName()
{ return name;
}
public String getMajor()
{ return major;
}
public String getClassification()
{ return classification;
}
public float getGPA()
{ return gpa;
}
public float calculateGPA(float scoreC1, float scoreC2, float scoreC3, float scoreC4, float scoreC5) // calculater method, calculates gpa
{ return 3*scoreC1+3*scoreC2+3*scoreC3+(4*scoreC4)+(2*scoreC5))/15;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
dd43bfb1e179af4a6b8857026beb2efb37688d81 | 70bc16a79f234e9095bf04329ea4c7b9ff603456 | /src/com/bigfong/vo/FormBean.java | c4a21b4c7ce43f3f0ef5eeada20d8bddd0303fcb | [] | no_license | bigfongcom/springmvc-demo | 339aa0edadf1d2849c2bc4d4ad52a5ebb134deb7 | 862c2c74d3afa8d117343c270128c45e58193a85 | refs/heads/master | 2020-04-05T11:04:38.523976 | 2018-11-09T09:42:47 | 2018-11-09T09:42:47 | 156,821,339 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 578 | java | package com.bigfong.vo;
import java.util.ArrayList;
import java.util.List;
/***********************************************************************
*
* @author bigfong
* @create-time 2018年11月7日 下午11:53:36
* @revision $Id: 1.0
*
***********************************************************************/
public class FormBean {
private List<Long> ids = new ArrayList<>();
public List<Long> getIds() {
return ids;
}
public void setIds(List<Long> ids) {
this.ids = ids;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
fb6a86bd2d2e38a8285ad11ddfff13336849de78 | 6bae1d7b6b3a417f2c753c51ec39b397c71fb936 | /pdx-tools/src/main/java/io/github/ititus/pdx/stellaris/user/save/SpeciesInformation.java | c38005dfdbea4ade1b2ea50e18c3637606cd54de | [
"MIT"
] | permissive | iTitus/PDXTools | ac2b0241941b1685a03ff4fa01f14d003274d5af | e47d6ac11f5501381b903a4dfefba27316cd2f08 | refs/heads/main | 2023-08-24T12:45:11.810171 | 2023-07-07T11:00:23 | 2023-07-07T11:00:23 | 136,240,134 | 3 | 1 | MIT | 2023-09-05T10:59:36 | 2018-06-05T22:08:08 | Java | UTF-8 | Java | false | false | 533 | java | package io.github.ititus.pdx.stellaris.user.save;
import io.github.ititus.pdx.pdxscript.IPdxScript;
import io.github.ititus.pdx.pdxscript.PdxScriptObject;
public class SpeciesInformation {
public final int species;
public final int numPops;
public final int numEnslaved;
public SpeciesInformation(int species, IPdxScript s) {
this.species = species;
PdxScriptObject o = s.expectObject();
this.numPops = o.getInt("num_pops");
this.numEnslaved = o.getInt("num_enslaved", 0);
}
}
| [
"iTitus@users.noreply.github.com"
] | iTitus@users.noreply.github.com |
c92f352aeb7a87e89bc13406458ff004f8b47f9a | 7808354a603b85abb076f2371c26143cc98470d8 | /src/org/bf/disability/serviceimpl/TransactionImpl.java | a7d7246271831382c39dbfc5894b95438eaf460f | [] | no_license | 9553432712/sadarem | e4df1519800d220d0a072bfbda02618240a14a7c | 875e332e88d5e591345dd25266d345bb347fc4ff | refs/heads/master | 2020-03-30T06:39:38.223800 | 2018-09-29T15:38:59 | 2018-09-29T15:38:59 | 150,878,318 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,327 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.bf.disability.serviceimpl;
import java.sql.SQLException;
import javax.servlet.http.HttpServletRequest;
import javax.sql.DataSource;
import org.bf.disability.Exception.SADAREMDBException;
import org.bf.disability.dao.TransactionDAO;
import org.bf.disability.service.TransactionService;
/**
*
* @author 484898
*/
public class TransactionImpl implements TransactionService {
public int insertTransactionalDetails(DataSource ds, String transactionStatus, String person_code, HttpServletRequest request) throws SADAREMDBException, SQLException {
int insertStatus = 0;
TransactionDAO transactionDAO = new TransactionDAO();
insertStatus = transactionDAO.insertTransactionalDetails(ds, transactionStatus, person_code, request);
return insertStatus;
}
public int updateTransactionDetails(DataSource ds, String transactionStatus, String personCode) throws SADAREMDBException, SQLException {
int insertStatus = 0;
TransactionDAO transactionDAO = new TransactionDAO();
insertStatus = transactionDAO.updateTransactionDetails(ds, transactionStatus, personCode);
return insertStatus;
}
public int updateTransactionStatus(DataSource ds, String transactionStatus, String personCode) throws SADAREMDBException, SQLException {
int insertStatus = 0;
TransactionDAO transactionDAO = new TransactionDAO();
insertStatus = transactionDAO.updateTransactionStatus(ds, transactionStatus, personCode);
return insertStatus;
}
/* public ArrayList getPartAEnteredDetails(DataSource ds, String district_id) throws SADAREMDBException,SQLException {
ArrayList partAIds = new ArrayList();
TransactionDAO transactionDAO = new TransactionDAO();
partAIds = transactionDAO.getPartAEnteredDetails(ds, district_id);
return partAIds;
}
public int updatePartAEnteredDetails(DataSource ds, String personCode) throws SADAREMDBException,SQLException {
int insertStatus = 0;
TransactionDAO transactionDAO = new TransactionDAO();
insertStatus = transactionDAO.updatePartAEnteredDetails(ds, personCode);
return insertStatus;
}*/
}
| [
"mahesh.rvrjc@gmail.com"
] | mahesh.rvrjc@gmail.com |
b4a8c42d6e1d564ab35f469a1204fd3ee1fe8753 | 34f81d8793d00d2fe14afebb023c7e7a84f64416 | /src/main/java/dao/UserDAO.java | b4aaef983c6145e2d8cd9892b76cae888eb8bf67 | [] | no_license | strider76/CursoAT | c7ad304d9ab10c9e5cb9cbec4a967a1fe1bf35aa | 9951be29e7a6fd14d2582d5c6340309bd31bfb33 | refs/heads/master | 2020-03-18T00:43:06.075076 | 2018-05-20T00:56:25 | 2018-05-20T00:56:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 338 | java | package dao;
import java.util.Optional;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import model.User;
@Repository
public interface UserDAO extends PagingAndSortingRepository<User, Integer> {
Optional<User> findOneByNameOrderByIdUserDesc(String name);
}
| [
"jirachi_1000@hotmail.com"
] | jirachi_1000@hotmail.com |
2b5f5b1a4159ef4b9635011e4f4a8ba4a17fbe1b | 597e2b0646bfcf2829fa00ae2b15a3323b9db94e | /20210511Method/src/Method09Paper00.java | a45888a03bb42970ebc230c24c8b473f47531499 | [] | no_license | DrillND/JAVA | 040008032520bc439c41d1fa48da2978612c2a11 | 5f1c63d7b130139e50f90e3c3b368bfe091e23c9 | refs/heads/main | 2023-06-17T00:37:50.748327 | 2021-07-09T02:55:29 | 2021-07-09T02:55:29 | 363,845,103 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,235 | java |
public class Method09Paper00 {
public static void main(String[] args) {
/*
[업데이트 2021.02.13]
======================================================
1. 해결 가능 언어
- C, C++, Java, C#, Python, 기타 프로그래밍 언어
2. 해결 조건
- 클래스, 객체와 연관된 개념들 이해
3. 특이사항
- Python 에서는 배열 대신 리스트 적용.
- C/C++ 에서는 배열을 리턴 대신 포인터로 적용.
======================================================
1. 3개의 숫자를 입력받아서 크기가 큰 순서대로 출력하는 프로그램.
주의) 정렬 알고리즘 또는 배열을 사용하지 말고 IF 문으로만 해결 바람.
조건1) 3개의 숫자는 main() 에서 입력 받음.
조건2) 3개의 입력받은 숫자를 매개변수로 전달하여 크기가 큰 순서대로 출력하는
메쏘드를 작성.
조건3) 5, 20, 15를 입력받으면, 20-15-5 형식으로 출력하기. --> 내림 차순 정렬
2. 숫자2개와 사칙연산자를 입력받아서 동작하는 간단한 계산기 프로그램.
조건1) 숫자2개와 사칙연산자(+,-,*,/)는 main()에서 입력받음.
조건2) 숫자2개와 사칙연산을 메쏘드에 매개변수로 전달.
조건3) 계산 결과값은 메쏘드에서 리턴값을 받아서 출력하기.
3. 홀수, 짝수 구분하는 프로그램.
조건1) 10개의 숫자를 저장하기위한 배열 생성.
조건2) 랜덤하게 10개의 숫자를 main()에서 배열에 저장.
조건3) 랜덤한 값을 가지는 배열을 매개변수로 전달하여 홀,짝수를 구분하는 메쏘드 작성.
4. 국,영,수 점수를 입력받아서 총점, 평균값을 구하는 프로그램.
조건1) 점수 입력은 main() 에서 입력 받음.
조건2) 입력받는 점수는 0 ~ 100 사이의 숫자만 입력받도록 조건 체크하기.
--> 간단하게 한번만 체크하면 됨 (사용자가 실수로 잘못입력하면 에러메시지 출력하고 종료 처리)
조건3) 국,영,수 점수를 각각의 매개변수로 전달하여 총점, 평균값을 출력하는 메쏘드 작성.
조건4) 조건3까지 테스트완료 이후에 잘못입력값 체크를 확장하기(실수로 입력하면 재입력 받을수 있도록 처리)
--> 시간적인 여유가 있으면 해보고 그렇지 않으면 패스하기 바람.
5. 1개의 숫자를 입력받아서 구구단 출력하는 프로그램.
조건1) 숫자 입력은 main() 에서 입력 받음.
조건2) 3을 입력받으면 3단 출력, 5를 입력받으면 5단을 출력.
조건3) 숫자를 매개변수로 전달하여 구구단을 출력하는 메쏘드 작성.
6. 간단한 로또 프로그램.
조건1) 동일한 숫자가 발생하지 않도록 처리 바람.
(할수있는데까지 꼭 고민해보시고 힘들면 중복처리 무시!)
조건2) 메쏘드에서 로또 번호를 만들고 배열에 6개의 번호를 저장하여 리턴
조건3) main()에서 로또 번호가 들어있는 배열를 리턴받아서 출력하기
- 메쏘드에서 로또 배열 출력하는것이 아님!
7. 1 ~ 100까지의 합을 구하는 프로그램.
조건1) 메쏘드에서 짝수들의 합과 홀수들의 합을 배열에 저장.
조건2) 메쏘드에서 짝수합과 홀수합을 배열에 저장하고 리턴하기.
조건3) main()에서 메쏘드로부터 배열을 리턴받아 홀수합, 짝수합 출력하기.
8. 구구단 2~9단까지 전체 출력중에 홀수단만 출력하는 프로그램.
조건1) 홀수단만 출력하는 메쏘드를 작성.
조건2) 출력 형식은 다음과 같이.
3X1=3 5X1=5 7X1=7 9X1=9
3X2=6 5X2=10 7X2=14 9X2=18
. . . .
. . . .
3X9=27 5X9=45 7X9=63 9X9=81
9. 3개의 숫자를 입력받아서 최대, 최소값 구하는 프로그램
조건1) 3개의 숫자는 main()에서 입력 받음.
조건2) 3개의 숫자를 메쏘드의 매개변수로 전달.
조건3) 메쏘드에서 최대, 최소값을 구한다음 배열에 저장하여 리턴하기.
조건4) 반드시 main()에서 배열을 리턴받아 최대, 최대값 출력.
10. 입력 받은 수의 팩토리얼을 구하는 프로그램.
조건1) 숫자는 main()에서 입력받음.
조건2) 3을 입력하면 3!(3x2x1), 4를 입력하면 4!(4x3x2x1)이 동작.
조건3) 재귀함수(메쏘드)로 구현.
11. 학점을 출력하는 프로그램.
조건1) 5명의 국, 영, 수 점수는 Random 클래스를 사용하여 랜덤하게 생성.
조건2) 2차원배열을 생성하여 1번째 학생의 국,영,수 점수를 1행1열, 1행2열, 1행3열에 저장.
조건3) 2번째 학생의 점수는 2행 ~ 5번째 학생의 점수는 5행에 각각 저장.
조건4) 5명학생의 점수들을 저장한 배열을 리턴하기.
조건5) main()에서 배열값을 받아 학생1명씩 대한 총점, 평균, 학점을 출력하기.
--> 출력 형식은 자유롭게 생각해서 하되 깔끔하게 처리.
조건6) 학점 기준 점수
100 ~ 90 -> A학점 출력
89 ~ 80 -> B학점 출력
79 ~ 70 -> C학점 출력
69 ~ 60 -> D학점 출력
59 ~ 50 -> E학점 출력
49 ~ 0 -> F학점
*/
}
}
| [
"81124904+DrillND@users.noreply.github.com"
] | 81124904+DrillND@users.noreply.github.com |
6768c4f7e67ff7bc7caa3be332db5d5c8ed19fdb | 38f07c0442281aefeb23daf2ced4cdb2d5b101dd | /FUND PROGRAMACIÓN-JAVA/Failed/Pruebas/src/pruebas/Pruebas.java | 774805021e2d81938d3279c1f188fcd50ec93a51 | [] | no_license | e-gu21/Ejericicios-resueltos-de-programacion | c74a6744edd027a2b54c98a3ec1306f881ea9b25 | 086775f49f7a6ba98d20707920853b6783fe2410 | refs/heads/master | 2022-04-23T13:34:52.859826 | 2020-04-26T23:25:01 | 2020-04-26T23:25:01 | 256,073,387 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,003 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package pruebas;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author LENOVO
*/
public class Pruebas {
static BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
public static void main(String[] args) throws IOException {
String cadena = "hola mundo";
String resp = "";
for(int i = 0; i<cadena.length(); i++){
resp = resp + caracter(cadena.charAt(i));
}
System.out.println(resp);
}
static private char caracter(char caracter) {
char resp = caracter;
if(caracter==' ') {
resp = '\u0000';
}
return resp;
}
}
| [
"edu.21.06.egu@gmail.com"
] | edu.21.06.egu@gmail.com |
092930c9ccb7109e2447e4c292bab03a0af49695 | 5f5c9ae9ee480e496b469a865a1fb0c87d6cba46 | /src/main/java/io/netty/delimiter/NettyClientDelimiterHandler.java | 23ec7cf2257383a128a401db80843f57498fa95a | [] | no_license | mamingrui8/netty_demo | fbad1ee2e540b275a1145adbf60dff35623c19dc | ff0818ff5a917fa954ff93cf41f431bcdb815355 | refs/heads/master | 2021-10-19T21:47:01.475885 | 2019-02-24T10:56:32 | 2019-02-24T10:56:32 | 172,219,248 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,260 | java | package io.netty.delimiter;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.ReferenceCountUtil;
/**
* Description: TODO
* User: MaMingRui
* Email: mamr@broada.com
* Date: 2019年01月15日 22:31
* ModificationHistory: Who When What
* --------- -------- ---------------------------
*/
public class NettyClientDelimiterHandler extends ChannelHandlerAdapter {
//msg本质上(底层)还是一个ByteBuf,只不过由于codec的StringUtil()的帮助,为ByteBuf的toString()加入了合适的Charset,因此能够直接toSting()成字符串 此处的msg带缓存!
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
try{
String message = msg.toString();
System.out.println("from server : " + message);
}finally{
// 用于释放缓存。避免内存溢出
ReferenceCountUtil.release(msg);
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
System.out.println("client exceptionCaught method run...");
// cause.printStackTrace();
ctx.close();
}
}
| [
"872068101@qq.com"
] | 872068101@qq.com |
9fb0b6bc1f16c609f08e8040084cbe1b5a57b49b | cfe9791fa81cd146a23b6267f2b466c0534dc00c | /src/main/java/com/techBank/DTO/UserLogin.java | 7a5533bb75cfa4eb9af6d90be5ac1bd5725356a4 | [] | no_license | potier97/techBank-backend | c1f295e4ce791b717fc4a167be6cf7943afef128 | d8d859629562d3b0b7933b490de04b144f67a630 | refs/heads/master | 2023-05-09T09:28:11.502483 | 2021-05-28T14:51:08 | 2021-05-28T14:51:08 | 370,388,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 528 | java | package com.techBank.DTO;
import java.util.Set;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
public class UserLogin {
@NotBlank
private String document;
@NotBlank
private String password;
public String getDocument() {
return document;
}
public void setDocument(String document) {
this.document = document;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
} | [
"nicolaspotier97@gmail.com"
] | nicolaspotier97@gmail.com |
d60517203c067c39223ddbb5ed5417f9abb41e24 | 3c7be7a8c54d746dd83b518463f4105918fefb29 | /FunJavaPrograms/MazeSearch.java | 32f89d5a14b40890a2b0e6e1a5cb0dce86efb8ff | [
"MIT"
] | permissive | leejay-schmidt/java-libs | b56c5f0165a8d3f88758e50498d633b64bbd06b3 | a86ff70f788520d574aae9e84759ec29bbe22626 | refs/heads/master | 2021-01-21T21:54:25.168574 | 2016-03-12T22:10:13 | 2016-03-12T22:10:13 | 39,916,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,563 | java | import java.util.*;
@SuppressWarnings("unchecked")
public class MazeSearch {
int[][] maze;
boolean[][] visited;
int width, height;
private ArrayList<MazePoint> shortestPath;
public MazeSearch(int[][] mazeIn) {
maze = mazeIn;
width = maze[0].length;
height = maze.length;
visited = new boolean[height][width];
}
public boolean pathExists(int sR, int sC, int eR, int eC) {
visited[sR][sC] = true;
return dfs(sR, sC, eR, eC);
}
public ArrayList<MazePoint> shortestPath() {
if (shortestPath==null) {
return new ArrayList();
}
else {
return this.shortestPath;
}
}
public boolean down(int r, int c) {
return ((r+1)<height) && !visited[r+1][c] && (maze[r+1][c]==1);
}
public boolean up(int r, int c) {
return ((r-1)>-1) && !visited[r-1][c] && (maze[r-1][c]==1);
}
public boolean right(int r, int c) {
return ((c+1)<width) && !visited[r][c+1] && (maze[r][c+1]==1);
}
public boolean left(int r, int c) {
return ((c-1)>-1) && !visited[r][c-1] && (maze[r][c-1]==1);
}
public boolean dfs(int r, int c, int eR, int eC) {
if (r==eR && c==eC) return true;
System.out.println("DFS on row: " + r + " col: " + c);
if (up(r,c)) {
visited[r-1][c] = true;
if (dfs(r-1,c,eR,eC)) return true;
}
if (left(r,c)) {
visited[r][c-1] = true;
if (dfs(r,c-1,eR,eC)) return true;
}
if (right(r,c)) {
visited[r][c+1] = true;
if (dfs(r,c+1,eR,eC)) return true;
}
if (down(r,c)) {
visited[r+1][c] = true;
if (dfs(r+1,c,eR,eC)) return true;
}
return false;
}
public boolean isWall(int r, int c) {
return (maze[r][c]==0);
}
public int bfs(int r, int c, int eR, int eC) {
return bfs(r, c, eR, eC, false);
}
public int bfs(int r, int c, int eR, int eC, boolean printSteps) {
Queue<MazePoint> q = new LinkedList<MazePoint>();
MazePoint sP = new MazePoint(r, c, 0);
sP.setPath(new ArrayList<MazePoint>());
sP.addPointToPath(sP);
//int[] sP = {r, c, 0};
q.add(sP);
visited = new boolean[height][width];
visited[r][c] = true;
while (q.peek() != null) {
MazePoint point = q.remove();
int[] pt = point.getPointArray();
System.out.println("BFS on row: " + pt[0] + " col: " + pt[1]);
if (up(pt[0],pt[1])) {
if ((pt[0]-1==eR)&&(pt[1]==eC)) {
MazePoint finalPoint = new MazePoint(pt[0]-1, pt[1], pt[2]+1);
finalPoint.setPath(point.path());
finalPoint.addPointToPath(finalPoint);
this.shortestPath = finalPoint.path();
return pt[2]+1;
}
else {
visited[pt[0]-1][pt[1]] = true;
MazePoint nextpt = new MazePoint(pt[0]-1, pt[1], pt[2] + 1);
nextpt.setPath(point.path());
nextpt.addPointToPath(nextpt);
//int[] nextpt = {pt[0]-1, pt[1], pt[2]+1};
q.add(nextpt);
}
}
if (left(pt[0],pt[1])) {
if ((pt[0]==eR)&&(pt[1]-1==eC)) {
MazePoint finalPoint = new MazePoint(pt[0], pt[1]-1, pt[2]+1);
finalPoint.setPath(point.path());
finalPoint.addPointToPath(finalPoint);
this.shortestPath = finalPoint.path();
return pt[2]+1;
}
else {
visited[pt[0]][pt[1]-1] = true;
MazePoint nextpt = new MazePoint(pt[0], pt[1]-1, pt[2]+1);
nextpt.setPath(point.path());
nextpt.addPointToPath(nextpt);
//int[] nextpt = {pt[0], pt[1]-1, pt[2]+1};
q.add(nextpt);
}
}
if (down(pt[0],pt[1])) {
if ((pt[0]+1==eR)&&(pt[1]==eC)) {
MazePoint finalPoint = new MazePoint(pt[0]+1, pt[1], pt[2]+1);
finalPoint.setPath(point.path());
finalPoint.addPointToPath(finalPoint);
this.shortestPath = finalPoint.path();
return pt[2]+1;
}
else {
visited[pt[0]+1][pt[1]] = true;
MazePoint nextpt = new MazePoint(pt[0]+1, pt[1], pt[2]+1);
nextpt.setPath(point.path());
nextpt.addPointToPath(nextpt);
//int[] nextpt = {pt[0]+1, pt[1], pt[2]+1};
q.add(nextpt);
}
}
if (right(pt[0],pt[1])) {
if ((pt[0]==eR)&&(pt[1]+1==eC)) {
MazePoint finalPoint = new MazePoint(pt[0], pt[1]+1, pt[2]+1);
finalPoint.setPath(point.path());
finalPoint.addPointToPath(finalPoint);
this.shortestPath = finalPoint.path();
return pt[2]+1;
}
else {
visited[pt[0]][pt[1]+1] = true;
MazePoint nextpt = new MazePoint(pt[0], pt[1]+1, pt[2]+1);
nextpt.setPath(point.path());
nextpt.addPointToPath(nextpt);
//int[] nextpt = {pt[0], pt[1]+1, pt[2]+1};
q.add(nextpt);
}
}
}
return 0;
}
public void printShortestPath() {
if (this.shortestPath == null) return;
for (int i=0; i<this.shortestPath.size(); ++i) {
MazePoint newPt = this.shortestPath.get(i);
System.out.println("Point " + newPt.getDist() +
" at X=" + newPt.getX() + ", Y=" + newPt.getY());
}
}
public static void main (String[] args) {
int[][] maze = new int[][]{
{0,1,1,1,1,1,0,0,1,1},
{1,1,0,1,1,1,1,1,1,1},
{0,1,0,1,1,0,0,1,0,0},
{1,1,1,0,0,0,1,1,0,1},
{1,0,0,1,1,1,1,1,1,1},
{1,0,0,1,1,0,1,0,0,1},
{1,1,1,1,0,1,1,1,1,1},
{0,1,0,1,0,1,0,1,1,1},
{0,1,0,0,1,1,1,0,0,0},
{1,1,1,1,1,1,1,0,0,1}
};
MazeSearch newSearch = new MazeSearch(maze);
System.out.println(newSearch.pathExists(9,0,0,9));
System.out.println(newSearch.bfs(9,0,0,9));
newSearch.printShortestPath();
}
}
@SuppressWarnings("unchecked")
class MazePoint {
private int x;
private int y;
private int dist;
private ArrayList<MazePoint> path;
public MazePoint(int x, int y, int dist) {
this.x = x;
this.y = y;
this.dist = dist;
}
public void setPath(ArrayList<MazePoint> path) {
this.path = path;
}
public void addPointToPath(MazePoint mp) {
this.path.add(mp);
}
public ArrayList<MazePoint> path() {
return this.path;
}
public int[] getPointArray() {
int[] pointArray = {this.x, this.y, this.dist};
return pointArray;
}
public void setX(int x) { this.x = x; }
public void setY(int y) { this.y = x; }
public void setDist(int dist) { this.dist = dist; }
public int getX() { return this.x; }
public int getY() { return this.y; }
public int getDist() { return this.dist; }
}
| [
"leejayschmidt@uofs-10-228-1-203.usask.ca"
] | leejayschmidt@uofs-10-228-1-203.usask.ca |
affcc24e25c085d0851810d1776962b8efb17f19 | ebd2bbc19f85bec0aec634bd9294fa1945e32061 | /components/apimgt/org.wso2.carbon.apimgt.impl/1.2.2/src/main/java/org/wso2/carbon/apimgt/impl/workflow/UserSignUpWorkflowExecutor.java | 867a8e375d8b47f0f322a1d2e7dd49897b7c32b0 | [] | no_license | madusankap/turing-1 | da645af4886d562667dfd2f61b4aa184da093340 | 04edf79deefbe751f0dee518b3891f816cec2dbc | refs/heads/master | 2019-01-02T01:46:09.216852 | 2014-12-18T11:04:09 | 2014-12-18T11:04:09 | 28,171,116 | 0 | 1 | null | 2023-03-20T11:52:10 | 2014-12-18T06:21:53 | Java | UTF-8 | Java | false | false | 3,777 | java | /*
* Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.apimgt.impl.workflow;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder;
import org.wso2.carbon.user.api.UserStoreManager;
import org.wso2.carbon.user.core.UserRealm;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.user.mgt.stub.UserAdminStub;
import org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName;
import org.wso2.carbon.utils.CarbonUtils;
import java.util.ArrayList;
import java.util.List;
public abstract class UserSignUpWorkflowExecutor extends WorkflowExecutor {
private static final Log log = LogFactory.getLog(UserSignUpWSWorkflowExecutor.class);
/**
* Method updates Roles users with subscriber role
* @param serverURL
* @param adminUsername
* @param adminPassword
* @param userName
* @param role
* @throws Exception
*/
protected static void updateRolesOfUser(String serverURL, String adminUsername,
String adminPassword, String userName, String role) throws Exception {
log.info("Adding Subscriber role to user");
String url = serverURL + "UserAdmin";
RealmService realmService = ServiceReferenceHolder.getInstance().getRealmService();
UserRealm realm = realmService.getBootstrapRealm();
UserStoreManager manager = realm.getUserStoreManager();
if (!manager.isExistingRole(role)){
log.error("Could not find role " + role + " in the user store");
throw new Exception("Could not find role " + role + " in the user store");
}
UserAdminStub userAdminStub = new UserAdminStub(url);
CarbonUtils.setBasicAccessSecurityHeaders(adminUsername, adminPassword,
true, userAdminStub._getServiceClient());
FlaggedName[] flaggedNames = userAdminStub.getRolesOfUser(userName, "*", -1);
List<String> roles = new ArrayList<String>();
if (flaggedNames != null) {
for (int i = 0; i < flaggedNames.length; i++) {
if (flaggedNames[i].getSelected()) {
roles.add(flaggedNames[i].getItemName());
}
}
}
roles.add(role);
userAdminStub.updateRolesOfUser(userName, roles.toArray(new String[roles.size()]));
}
/**
* Method to delete a user
* @param serverURL
* @param adminUsername
* @param adminPassword
* @param userName
* @throws Exception
*/
protected static void deleteUser(String serverURL, String adminUsername,
String adminPassword, String userName) throws Exception {
log.info("Remove the rejected user :"+userName);
String url = serverURL + "UserAdmin";
UserAdminStub userAdminStub = new UserAdminStub(url);
CarbonUtils.setBasicAccessSecurityHeaders(adminUsername, adminPassword,
true, userAdminStub._getServiceClient());
userAdminStub.deleteUser(userName);
}
}
| [
"tharindua@wso2.com"
] | tharindua@wso2.com |
940e7d6a246872bc9b3437a235c8649ad59b195a | 45cafec90d77d5c65b98c9bc1ef4446a91f80d4c | /itj example/src/main/java/my/eamples/javaexam/Goods/Goods.java | 56c1c9194f1ccbab100e3cfbfcce0a9f451b5aef | [] | no_license | dugustjr98/YeoHyunSuk | 06af23ff08be85a3cb6241586a03893797327782 | 7545bca17279596e2fc5007bf9e767ae6e568ff6 | refs/heads/master | 2020-04-10T03:32:08.735865 | 2019-01-23T06:38:01 | 2019-01-23T06:38:01 | 160,772,652 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,394 | java | package my.eamples.javaexam.Goods;
public class Goods implements Comparable<Goods>{
private int id;
private String name;
private int price;
//기본생성자
public Goods() {
}
public Goods(int id, String name, int price) {
this.id = id;
this.name = name;
this.price = price;
}
public void setName(String name) {
this.name = name;
}
public void setId(int id) {
this.id = id;
}
public void setPrice(int price) {
this.price = price;
}
public String getName() {
return name;
}
public int getId() {
return id;
}
public int getPrice() {
return price;
}
//id,name,price 값이 같으면 같다고 값이 같은 객체로 판단한다.
// this 는 자기자신의 인스턴스를 참조한다.( 인스턴스가 없으면 쓸수 없고 static은 인스턴스가 없어도 사용가능하다.그래서 static메소드안에서는 this를 못쓴다.)
//getClass() 는 현재 클래스정보를 리턴해줌 클래스정보는 메모리에 한번만 올라감
@Override //골뱅이는 에노테이션 설정같은 것들 사용할 때 씀
public boolean equals(Object o) {
if(this ==o) return true;
if(o==null||getClass()!=o.getClass()) return false;
Goods goods = (Goods)o;
if(id!=goods.id) return false;
if(price!=goods.price) return false;
return (name!=null)?(name.equals(goods.name)):(goods.name==null);
}
//인스턴스가 다르면 다른 값을 리턴한다. 소수에 특정 값을 곱한다. 되도록 유일한 값을 리턴하도록 만든다.
@Override
public int hashCode() {
int result = id;
result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + price;
return result;
}
/*
Goods g1 = new Goods();
Set <Goods> set = new HashSet<>();
set.add(g1);
set.add(g2);
...
add(g1)을 할 때 add()메소드 내부에서는 g1이 가지고 있는 hashCode()라는 메소드를 호출하여 hashCode를 구한다.
hashcode 에 해당하는 버켓이 있는지 찾는다. 없으면 버켓을 만든다.
버켓도 객체임(리스트 형태 순서를 기억함)
버켓에 g1을 저장한다.
add(g2)를 하면 add()메소드에서는 g2의 hashCode를 구한다. 만약 g2와 g1의 hashCode가 같다면 같은 버켓을 사용한다.
해당 버켓에서 g2와 같은 값을 가지고 있는 객체가 있는지 순차적으로 equals메소드로 비교하면서 찾는다.
이론적으론 버켓이 모두달라야 속도가 빠르다. 버켓의 수와 원소의 수가 같으면 제일 빠르다. (이론적으로)
*/
@Override
public String toString() {
return "Goods{" +
"name='" + name + '\'' +
", price=" + price +
'}';
}
@Override
public int compareTo(Goods o) {
return price - o.price;
}
/*
List에서 원소 2개를 꺼낸다.
각 원소의 이름을 a,b라고 한다면
a.compareTo(b)로 서로의 값을 비교한다. 그러려면 compareTo()라는 메소드를 가져야한다.
Comparable a = (Comparable)list.get(0);
Comparabli b = (Comparable)list.get(1);
기준을 정하는건 객체를 만든 사람이 정하는것
*/
}
| [
"dugustjr98@naver.com"
] | dugustjr98@naver.com |
aa39c31b86ed1071dc15b99279b014fdc8a273f6 | ac451caff9ba84540d407247dc92fd7fab566375 | /DP/src/Stock6_714.java | a399ef4e699722d423b65b04e9e8c94f083adb3b | [] | no_license | JianpingLuke/leetcodeNotes | 077e64d5fbd7026d55d120e1e6fd41d4156e47b5 | 972ab6bd96e742d399cb14a9fed718ede7c69956 | refs/heads/main | 2023-06-26T11:31:21.974835 | 2021-07-08T22:15:31 | 2021-07-08T22:15:31 | 333,461,469 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 817 | java | public class Stock6_714 {
public int maxProfit(int[] prices, int fee) {
int[][] dp = new int[prices.length][2];
dp[0][0] = 0;
dp[0][1] = -prices[0];//
for (int i = 1; i < prices.length; i++) {
dp[i][0] = Math.max(dp[i-1][0], dp[i-1][1] + prices[i] - fee);
dp[i][1] = Math.max(dp[i-1][1], dp[i-1][0] - prices[i]);
}
return dp[prices.length-1][0];
}
public int so2(int[] prices, int fee) {
int dp00 = 0;
int dp01 = -prices[0];
for (int i = 1; i < prices.length; i++) {
dp00 = Math.max(dp00, dp01 + prices[i] - fee);
dp01 = Math.max(dp01, dp00 - prices[i]);
}
return dp00;
}
}
// 类似于这种[i] = f([i-1]) || f([i]) 的dp,都可以转化成space = 1的运算。 | [
"31445919+xiaodyao@users.noreply.github.com"
] | 31445919+xiaodyao@users.noreply.github.com |
6ab09d0fcd739c689e5cd14ec21d2e6480559196 | f479c24a78526f1ea7dee482e17276452062d404 | /PA5/BoolConst.java | 9eaaa13fa2a2a7f1a448d65e2aad515949564dd2 | [] | no_license | ashishkrishna/CS_164 | 566814831c5c78a8046d7610ff6a7e682379f705 | 9b9cadd6d8c78f385155ef90283e389a478354bf | refs/heads/master | 2021-01-18T23:37:10.041621 | 2016-05-13T01:10:51 | 2016-05-13T01:10:51 | 50,972,158 | 0 | 0 | null | 2016-05-05T11:59:12 | 2016-02-03T03:48:51 | Java | UTF-8 | Java | false | false | 2,773 | java | /*
Copyright (c) 2000 The Regents of the University of California.
All rights reserved.
Permission to use, copy, modify, and distribute this software for any
purpose, without fee, and without written agreement is hereby granted,
provided that the above copyright notice and the following two
paragraphs appear in all copies of this software.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
import java.io.PrintStream;
/** This clas encapsulates all aspects of code generation for boolean
* constatns. String constants and Int constants are handled by
* StringTable and IntTable respectively, but since there are only two
* boolean constants, we handle them here. */
class BoolConst {
private boolean val;
/** Creates a new boolean constant.
* @param val the value
* */
BoolConst(boolean val) {
this.val = val;
}
/** Creates a new boolean constant.
* @param val the value
* */
BoolConst(Boolean val) {
this.val = val.booleanValue();
}
final static BoolConst truebool = new BoolConst(true);
final static BoolConst falsebool = new BoolConst(false);
/** Emits a reference to this boolean constant.
* @param s the output stream
* */
public void codeRef(PrintStream s) {
s.print(CgenSupport.BOOLCONST_PREFIX + (val ? "1" : "0"));
}
/** Generates code for the boolean constant definition. This method
* is incomplete; you get to finish it up in programming assignment
* 5.
* @param boolclasstag the class tag for string object
* @param s the output stream
*
* */
public void codeDef(int boolclasstag, PrintStream s) {
// Add -1 eye catcher
s.println(CgenSupport.WORD + "-1");
codeRef(s); s.print(CgenSupport.LABEL); // label
s.println(CgenSupport.WORD + boolclasstag); // tag
s.println(CgenSupport.WORD + (CgenSupport.DEFAULT_OBJFIELDS +
CgenSupport.BOOL_SLOTS)); // size
s.print(CgenSupport.WORD);
/* Add code to reference the dispatch table for class Bool here */
s.println("Bool"+CgenSupport.DISPTAB_SUFFIX); // dispatch table
s.println(CgenSupport.WORD + (val ? "1" : "0")); // value (0 or 1)
}
}
| [
"ashishk@berkeley.edu"
] | ashishk@berkeley.edu |
7fec01f27d174e5ff9840e70c6a81e9b0d0394e4 | f3219aea35f753db551f169298f6e97fce6fa0ba | /src/main/java/eventos/s1207/SignatureType.java | 89ea449873d611d8f3aae5f9d531c491d5fd583c | [] | no_license | thiagoachuberj/csteste | 7f0e8910f2c428968f0c43fa0218724d1a3cfa8e | cdead0e58e179953eea29c4dad941d610770029a | refs/heads/master | 2021-04-12T10:00:50.260855 | 2018-06-20T14:11:39 | 2018-06-20T14:11:39 | 126,862,240 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,203 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.05.15 at 09:25:35 AM BRT
//
package eventos.s1207;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java class for SignatureType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SignatureType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/>
* <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/>
* <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/>
* <element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignatureType", propOrder = {
"signedInfo",
"signatureValue",
"keyInfo",
"object"
})
public class SignatureType {
@XmlElement(name = "SignedInfo", required = true)
protected SignedInfoType signedInfo;
@XmlElement(name = "SignatureValue", required = true)
protected SignatureValueType signatureValue;
@XmlElement(name = "KeyInfo")
protected KeyInfoType keyInfo;
@XmlElement(name = "Object")
protected List<ObjectType> object;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the signedInfo property.
*
* @return
* possible object is
* {@link SignedInfoType }
*
*/
public SignedInfoType getSignedInfo() {
return signedInfo;
}
/**
* Sets the value of the signedInfo property.
*
* @param value
* allowed object is
* {@link SignedInfoType }
*
*/
public void setSignedInfo(SignedInfoType value) {
this.signedInfo = value;
}
/**
* Gets the value of the signatureValue property.
*
* @return
* possible object is
* {@link SignatureValueType }
*
*/
public SignatureValueType getSignatureValue() {
return signatureValue;
}
/**
* Sets the value of the signatureValue property.
*
* @param value
* allowed object is
* {@link SignatureValueType }
*
*/
public void setSignatureValue(SignatureValueType value) {
this.signatureValue = value;
}
/**
* Gets the value of the keyInfo property.
*
* @return
* possible object is
* {@link KeyInfoType }
*
*/
public KeyInfoType getKeyInfo() {
return keyInfo;
}
/**
* Sets the value of the keyInfo property.
*
* @param value
* allowed object is
* {@link KeyInfoType }
*
*/
public void setKeyInfo(KeyInfoType value) {
this.keyInfo = value;
}
/**
* Gets the value of the object property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the object property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getObject().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ObjectType }
*
*
*/
public List<ObjectType> getObject() {
if (object == null) {
object = new ArrayList<ObjectType>();
}
return this.object;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}
| [
"thiago.achuberj@gmail.com"
] | thiago.achuberj@gmail.com |
33bda85f45398ec54827202981e3b8b3bd579ecf | 04425b18d4e4cf1fd8fb0c5ebe7337cc8a97ba7d | /circulatetbooks-api/src/test/java/circulatetbooks/api/CirculatetbooksApiApplicationTests.java | 72562a4d6cdcd3708840e7b261fc456a15512f7c | [] | no_license | bmamai/circulatet-books | ef497be4f95e855318e1378c7235b8ae0cbbe711 | f41ed70a290ddce199583ae69a63e5b6c2647c3b | refs/heads/master | 2020-05-02T14:31:13.517359 | 2019-06-06T14:33:28 | 2019-06-06T14:33:28 | 178,012,951 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package circulatetbooks.api;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class CirculatetbooksApiApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"you@example.com"
] | you@example.com |
26cfcbc8cd18b1bfe8c88ee674b5baf448a4e227 | 2a7296eb26ba5a390f82ee51933e0ea95b40dce3 | /src/main/java/com/fsquall/operation/AbstractCalculationOperation.java | 7daffb5c47df9ae9523bd6ee349433ff3c010883 | [] | no_license | GOrbel01/timecalculator | dbd16ae6599dc070b2b031db0005ef190e008d69 | e87f55dfa50c08332bb16f0423390ec0aa1a57c9 | refs/heads/master | 2021-07-12T05:05:55.392174 | 2019-10-11T18:22:32 | 2019-10-11T18:22:32 | 214,155,629 | 0 | 0 | null | 2020-10-13T16:37:05 | 2019-10-10T10:39:57 | Java | UTF-8 | Java | false | false | 154 | java | package com.fsquall.operation;
import com.fsquall.time.TimeItem;
public abstract class AbstractCalculationOperation implements CalculatorOperation {
}
| [
"f1n4lcloud@googlemail.com"
] | f1n4lcloud@googlemail.com |
e687e0464b4adf16bc1855c3903703cf5235b83c | 86884f486e96e2f0bb217d25380d5dfafdb0a754 | /app/src/main/java/com/dotawang/mvpdemo3/model/login/User.java | 37d3f8dbd2b05bcf5848630632b76a090456e364 | [] | no_license | gitwangyang/MVPDemo3 | 8bdba77ac7e5f82799a8565377cc4c54b6121930 | 94d96c88a1bbf7fb878e5fa178554077f494ba7d | refs/heads/master | 2020-04-07T12:59:49.849421 | 2018-11-27T14:08:58 | 2018-11-27T14:08:58 | 158,389,095 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package com.dotawang.mvpdemo3.model.login;
/**
* @author Dota.Wang
* @date 2018/11/20
* @description
*/
public class User {
private long id;
private String token;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
}
| [
"gitwangyang@aliyun.com"
] | gitwangyang@aliyun.com |
2d79d5a3a795a8b6dc6054e8b8f3a5db00f2439a | ddb3223a79bb0fb27fd3ec8039962874be99fb9a | /entitlement/src/main/java/com/hevelian/identity/entitlement/PDPService.java | dc27f0e0d189a4b5e0f18e51ff2cbd76edb33ff4 | [
"Apache-2.0"
] | permissive | Yaroslav007/hevelian-identity-server | cfd676fd4602f68a7fac1bd2633b0e409d02ae0a | 6096ce8e815f01634b2287bd03bc5f2d6e4164c8 | refs/heads/master | 2020-03-25T10:44:03.161855 | 2018-03-16T13:14:44 | 2018-03-16T13:14:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,931 | java | package com.hevelian.identity.entitlement;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.google.common.base.Preconditions;
import com.hevelian.identity.core.SystemRoles;
import com.hevelian.identity.entitlement.exc.PoliciesNotFoundByPolicyIdsException;
import com.hevelian.identity.entitlement.exc.PolicyNotFoundByPolicyIdException;
import com.hevelian.identity.entitlement.model.pdp.PDPPolicy;
import com.hevelian.identity.entitlement.repository.PDPPolicyRepository;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Service
@Transactional(readOnly = true)
@Secured(value = SystemRoles.TENANT_ADMIN)
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PDPService {
@Getter
private final PDPPolicyRepository policyRepository;
/**
* Return all PDP policies sorted by order number.
*/
public Iterable<PDPPolicy> getAllPolicies() {
// Do not remove ordering. Entitlement engine relies on this.
return policyRepository.findAll(new Sort(Sort.Direction.ASC, "policyOrder"));
}
public PDPPolicy getPolicy(String policyId) throws PDPPolicyNotFoundByPolicyIdException {
PDPPolicy policy = policyRepository.findByPolicyId(policyId);
if (policy == null)
throw new PDPPolicyNotFoundByPolicyIdException(policyId);
return policy;
}
@Transactional(readOnly = false)
public void deletePolicy(String policyId) throws PDPPolicyNotFoundByPolicyIdException {
PDPPolicy policy = getPolicy(policyId);
policyRepository.delete(policy);
}
@Transactional(readOnly = false)
public void enableDisablePolicy(String policyId, boolean enable)
throws PDPPolicyNotFoundByPolicyIdException {
PDPPolicy policy = getPolicy(policyId);
policy.setEnabled(enable);
policyRepository.save(policy);
}
@Transactional(readOnly = false)
public void orderPolicy(String policyId, int order) throws PDPPolicyNotFoundByPolicyIdException {
Preconditions.checkArgument(order >= 0);
PDPPolicy policy = getPolicy(policyId);
policy.setPolicyOrder(order);
policyRepository.save(policy);
}
public static class PDPPolicyNotFoundByPolicyIdException
extends PolicyNotFoundByPolicyIdException {
private static final long serialVersionUID = -5729938846638712240L;
public PDPPolicyNotFoundByPolicyIdException(String policyId) {
super(policyId);
}
}
public static class PDPPoliciesNotFoundByPolicyIdsException
extends PoliciesNotFoundByPolicyIdsException {
private static final long serialVersionUID = -6313980272314121000L;
public PDPPoliciesNotFoundByPolicyIdsException(Set<String> policyIds) {
super(policyIds);
}
}
}
| [
"yuflyud@gmail.com"
] | yuflyud@gmail.com |
9faff1d42076435a17d07e6a1c1634f5cc8383d4 | 441bdfa833560a9d8cf6571200cc2d156280f9ae | /src/graphics/Drawer.java | b78002ef7dc64f79a0e601265d28892a9f65992e | [] | no_license | ClaytonKnittel/Graphics | 2eaf29191975dbd7c85ade669020dac63c4e33ec | 53e31041486dee16a4389cf64fdbd03d734a396f | refs/heads/master | 2020-03-30T23:05:33.447231 | 2018-10-05T08:38:05 | 2018-10-05T08:38:05 | 151,690,277 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,564 | java | package graphics;
import director.Director;
import math.MathEngine;
import shapes.Line;
import shapes.Triangle;
public class Drawer {
public Drawer() {
}
public void drawLine(Line l) {
float x1 = l.screenX1();
float x2 = l.screenX2();
float y1 = l.screenY1();
float y2 = l.screenY2();
this.drawLine(null, x1, y1, x2, y2, l.getColor());
}
public void drawLine(Triangle tri, float x1, float y1, float x2, float y2, Color c) {
//Triangle tee = new Triangle(1, 2, 3, 1, 2, 3, 1, 2, 3, null, null, null, null);
//Triangle tt = new Triangle(1, 1, 1, 1, 1, 1, 1, 1, 1, null);
double one = x2 - x1;
double two = y2 - y1;
double length;
if (Math.abs(two) > Math.abs(one))
length = Math.abs(two);
else
length = Math.abs(one);
double dx = one / length;
double dy = two / length;
double x = x1;
double y = y1;
if (x < 0) {
y -= dy / dx * x;
length -= Math.sqrt(Math.pow(y1 - y, 2) + x * x);
x = 0;
}
if (y < 0) {
x -= dx / dy * y;
length -= Math.sqrt(Math.pow(x1 - x, 2) + y * y);
y = 0;
}
if (x >= Director.screen.getWidth()) {
y -= dy / dx * (x - Director.screen.getWidth() + 1);
length -= Math.sqrt(Math.pow(y1 - y, 2) + (x - Director.screen.getWidth() + 1) * (x - Director.screen.getWidth() + 1));
x = Director.screen.getWidth() - 1;
}
if (y >= Director.screen.getHeight()) {
x -= dx / dy * (y - Director.screen.getHeight() + 1);
length -= Math.sqrt(Math.pow(x1 - x, 2) + (y - Director.screen.getHeight() + 1) * (y - Director.screen.getHeight() + 1));
y = Director.screen.getHeight() - 1;
}
for (int t = 0; t <= length && x >= 0 && x < Director.screen.getWidth() && y >= 0 && y < Director.screen.getHeight(); t++) {
if (tri == null)
Director.screen.setPixels((int) x, (int) y, -1, c);
else {
Director.screen.setPixels((int) x, (int) y, -1, c);
}
x += dx;
y += dy;
}
}
public void drawTria(Triangle t) {
if (!t.isInFOV())
return;
float x1 = t.screenX1();
float x2 = t.screenX2();
float x3 = t.screenX3();
float y1 = t.screenY1();
float y2 = t.screenY2();
float y3 = t.screenY3();
if (y2 < y1) {
x1 += x2;
x2 = x1 - x2;
x1 -= x2;
y1 += y2;
y2 = y1 - y2;
y1 -= y2;
}
if (y3 < y2) {
x2 += x3;
x3 = x2 - x3;
x2 -= x3;
y2 += y3;
y3 = y2 - y3;
y2 -= y3;
}
if (y2 < y1) {
x1 += x2;
x2 = x1 - x2;
x1 -= x2;
y1 += y2;
y2 = y1 - y2;
y1 -= y2;
}
int ry2 = Math.round(y2), ry3 = Math.round(y3);
int y = Math.max(Math.round(y1), 0);
float s1 = (x2 - x1) / (y2 - y1), s2 = (x3 - x1) / (y3 - y1), s3 = (x3 - x2) / (y3 - y2);
float f1 = Math.min(s1, s2);
float f2 = s1 + s2 - f1;
while (ry2 > y + .5f && y < Director.screen.getHeight()) {
for (int x = Math.max(Math.round(f1 * (y + .5f - y1) + x1 + .5f), 0); x < Math.min(Math.round(f2 * (y + .5f - y1) + x1 + .5f), Director.screen.getWidth()); x++)
MathEngine.drawColor(t, x, y);
y++;
}
f2 = Math.min(s2, s3);
f1 = s2 + s3 - f2;
while (ry3 > y + .5f && y < Director.screen.getHeight()) {
for (int x = Math.max(Math.round(f1 * (y + .5f - y3) + x3 + .5f), 0); x < Math.min(Math.round(f2 * (y + .5f - y3) + x3 + .5f), Director.screen.getWidth()); x++)
MathEngine.drawColor(t, x, y);
y++;
}
}
public int getCorr(int x1, int x2, int y1, int y2, int x) {
if (x == x1)
return y1;
if (x == x2)
return y2;
return 0;
}
public int getCorrX(int x1, int x2, int y1, int y2, int y) {
if (y == y1)
return x1;
if (y == y2)
return x2;
return 0;
}
}
| [
"claytonknittel@claytons-mbp.dhcp.wustl.edu"
] | claytonknittel@claytons-mbp.dhcp.wustl.edu |
550655984e0d289a95fc5b73c0c25de50231f69b | 5f14a75cb6b80e5c663daa6f7a36001c9c9b778c | /src/bit.java | 7cf4acd2ddcf7062ba65adc3d220e9011ae78cec | [] | no_license | MaTriXy/com.ubercab | 37b6f6d3844e6a63dc4c94f8b6ba6bb4eb0118fb | ccd296d27e0ecf5ccb46147e8ec8fb70d2024b2c | refs/heads/master | 2021-01-22T11:16:39.511861 | 2016-03-19T20:58:25 | 2016-03-19T20:58:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,047 | java | import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Application.ActivityLifecycleCallbacks;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
@TargetApi(14)
final class bit
implements Application.ActivityLifecycleCallbacks
{
private bit(bis parambis) {}
private boolean a(String paramString)
{
if (!TextUtils.isEmpty(paramString))
{
a.a("auto", "_ldl", paramString);
return true;
}
return false;
}
public final void onActivityCreated(Activity paramActivity, Bundle paramBundle)
{
try
{
a.s().z().a("onActivityCreated");
paramActivity = paramActivity.getIntent();
if (paramActivity == null) {
return;
}
paramActivity = paramActivity.getData();
if ((paramActivity == null) || (!paramActivity.isHierarchical())) {
return;
}
paramActivity = paramActivity.getQueryParameter("referrer");
if (TextUtils.isEmpty(paramActivity)) {
return;
}
if (!paramActivity.contains("gclid"))
{
a.s().y().a("Activity created with data 'referrer' param without gclid");
return;
}
}
catch (Throwable paramActivity)
{
a.s().b().a("Throwable caught in onActivityCreated", paramActivity);
return;
}
a.s().y().a("Activity created with referrer", paramActivity);
a(paramActivity);
}
public final void onActivityDestroyed(Activity paramActivity) {}
public final void onActivityPaused(Activity paramActivity)
{
a.q().c();
}
public final void onActivityResumed(Activity paramActivity)
{
a.q().b();
}
public final void onActivitySaveInstanceState(Activity paramActivity, Bundle paramBundle) {}
public final void onActivityStarted(Activity paramActivity) {}
public final void onActivityStopped(Activity paramActivity) {}
}
/* Location:
* Qualified Name: bit
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
b1acfd5d6d1227ec265117a9603a18a32935f745 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/23/23_eeee67ea9a7f9d9786d0cb791cbc69d0ffa67e22/Entity/23_eeee67ea9a7f9d9786d0cb791cbc69d0ffa67e22_Entity_t.java | a7a6fd2a0b02471ae1d067ea01027e3e49b6de9a | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,717 | java | package ngmep.osm.datamodel;
/*
ngmep2osm - importador de datos de ngmep a openstreetmap
Copyright (C) 2011-2012 Alberto Fernández <infjaf@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class Entity {
private long id; //NOPMD
private User user;
private int version;
private long changeset;
private long timestamp;
private final transient Map<String, String> tags = new HashMap<String, String>();
private boolean modified = false;
private static final int PRIME = 31;
protected Entity(){
super();
}
public boolean isModified() {
return modified;
}
public void setModified(final boolean modified) {
this.modified = modified;
}
public long getId() {
return id;
}
public void setId(final long identifier) {
if (this.id != identifier) {
this.id = identifier;
setModified(true);
}
}
public String getTag(final String tagName) {
return tags.get(tagName);
}
public void setTag(final String tagName, final String value) {
if (value == null) {
removeTag(tagName);
return;
}
final String valtrim =value.trim();
if (!tags.containsKey(tagName) || !valtrim.equals(tags.get(tagName))){
tags.put(tagName, valtrim);
setModified(true);
}
}
public void removeTag(final String tagName){
if (tags.containsKey(tagName)){
tags.remove(tagName);
setModified(true);
}
}
public User getUser() {
return user;
}
public void setUser(final User user) {
this.user = user;
setModified(true);
}
public int getVersion() {
return version;
}
public void setVersion(final int version) {
if (this.version != version){
this.version = version;
setModified(true);
}
}
public long getChangeset() {
return changeset;
}
public void setChangeset(final long changeset) {
if (this.changeset != changeset) {
this.changeset = changeset;
setModified(true);
}
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(final long timestamp) {
if (this.timestamp != timestamp){
this.timestamp = timestamp;
setModified(true);
}
}
public int getNumTags(){
return tags.size();
}
public Set<String> getTagKeys () {
return tags.keySet();
}
public boolean containsTag (final String key){
return tags.containsKey(key);
}
@Override
public int hashCode() {
int result = 1;
result = PRIME * result + (int) (id ^ (id >>> 32));
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj){
return true;
}
if (obj == null){
return false;
}
if (getClass() != obj.getClass()){
return false;
}
final Entity other = (Entity) obj;
if (id != other.id){
return false;
}
return true;
}
}
/*
CREATE TABLE nodes
(
id bigint NOT NULL,
version integer NOT NULL,
user_id integer NOT NULL,
tstamp timestamp without time zone NOT NULL,
changeset_id bigint NOT NULL,
geom geometry,
CONSTRAINT pk_nodes PRIMARY KEY (id ),
CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2),
CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POINT'::text OR geom IS NULL),
CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 4326)
)
CREATE TABLE ways
(
id bigint NOT NULL,
version integer NOT NULL,
user_id integer NOT NULL,
tstamp timestamp without time zone NOT NULL,
changeset_id bigint NOT NULL,
CONSTRAINT pk_ways PRIMARY KEY (id )
)
CREATE TABLE relations
(
id bigint NOT NULL,
version integer NOT NULL,
user_id integer NOT NULL,
tstamp timestamp without time zone NOT NULL,
changeset_id bigint NOT NULL,
CONSTRAINT pk_relations PRIMARY KEY (id )
)
CREATE TABLE node_tags
(
node_id bigint NOT NULL,
k text NOT NULL,
v text NOT NULL
)
CREATE TABLE way_tags
(
way_id bigint NOT NULL,
k text NOT NULL,
v text
)
CREATE TABLE relation_tags
(
relation_id bigint NOT NULL,
k text NOT NULL,
v text NOT NULL
)
CREATE TABLE way_nodes
(
way_id bigint NOT NULL,
node_id bigint NOT NULL,
sequence_id integer NOT NULL,
CONSTRAINT pk_way_nodes PRIMARY KEY (way_id , sequence_id )
)
CREATE TABLE relation_members
(
relation_id bigint NOT NULL,
member_id bigint NOT NULL,
member_type character(1) NOT NULL,
member_role text NOT NULL,
sequence_id integer NOT NULL
)
*/
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
0bb26ad5d3f88882cc8d01574e5fd02bdc45d8c5 | 0b3bf39f68e3139bb633c608befe7774012c34fd | /anychart/src/main/java/com/anychart/charts/Funnel.java | fda7a8a1ec8639bf3a5a765667905530f2c25299 | [] | no_license | mhrpatel12/AnyChart-Android | c0bb9e13a12277f0140316c00522cc3ebef9f789 | a26946e76ad7f3395e44e60036c9648a4df38dc9 | refs/heads/master | 2020-03-30T00:40:30.192467 | 2018-09-26T03:05:29 | 2018-09-26T03:05:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 111,457 | java | package com.anychart.charts;
import com.anychart.APIlib;
import com.anychart.chart.common.dataentry.DataEntry;
import com.anychart.JsObject;
import com.anychart.core.SeparateChart;
import java.util.Locale;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import android.text.TextUtils;
// class
/**
* Funnel chart class.<br/>
<b>Note:</b> Use {@link anychart#funnel} method to get an instance of this class:
*/
public class Funnel extends SeparateChart {
protected Funnel() {
}
public static Funnel instantiate() {
return new Funnel("new anychart.charts.funnel()");
}
public Funnel(String jsChart) {
jsBase = "funnel" + ++variableIndex;
APIlib.getInstance().addJSLine(jsBase + " = " + jsChart + ";");
}
public String getJsBase() {
return jsBase;
}
/**
* Getter for animation settings.
*/
public com.anychart.core.utils.Animation animation() {
return new com.anychart.core.utils.Animation(jsBase + ".animation()");
}
/**
* Setter for animation settings by one value.
*/
public com.anychart.charts.Funnel animation(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".animation(%s);", value));
return this;
}
/**
* Setter for animation settings by one value.
*/
public com.anychart.charts.Funnel animation(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".animation(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for animation settings using several parameters.
*/
public com.anychart.charts.Funnel animation(Boolean enabled, Number duration) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".animation(%s, %s);", enabled, duration));
return this;
}
/**
* Getter for the autoRedraw flag. <br/>
Flag whether to automatically call chart.draw() on any changes or not.
*/
public void autoRedraw() {
APIlib.getInstance().addJSLine(jsBase + ".autoRedraw();");
}
/**
* Setter for the autoRedraw flag.<br/>
Flag whether to automatically call chart.draw() on any changes or not.
*/
public com.anychart.charts.Funnel autoRedraw(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".autoRedraw(%s);", value));
return this;
}
/**
* Getter for the chart background.
*/
public com.anychart.core.ui.Background background() {
return new com.anychart.core.ui.Background(jsBase + ".background()");
}
/**
* Setter for the chart background.
*/
public com.anychart.charts.Funnel background(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".background(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the current funnel width in pixels or in percentage.
*/
public void baseWidth() {
APIlib.getInstance().addJSLine(jsBase + ".baseWidth();");
}
/**
* Setter for the funnel width in pixels or in percentage.
*/
public com.anychart.charts.Funnel baseWidth(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".baseWidth(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the funnel width in pixels or in percentage.
*/
public com.anychart.charts.Funnel baseWidth(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".baseWidth(%s);", value));
return this;
}
/**
* Getter for element bottom bound settings.
*/
public void bottom() {
APIlib.getInstance().addJSLine(jsBase + ".bottom();");
}
/**
* Setter for element bottom bound settings.
*/
public com.anychart.charts.Funnel bottom(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bottom(%s);", value));
return this;
}
/**
* Setter for element bottom bound settings.
*/
public com.anychart.charts.Funnel bottom(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bottom(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for element bounds settings.
*/
public com.anychart.core.utils.Bounds bounds() {
return new com.anychart.core.utils.Bounds(jsBase + ".bounds()");
}
/**
* Setter for bounds of the element using one parameter.
*/
public com.anychart.charts.Funnel bounds(com.anychart.utils.RectObj value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for bounds of the element using one parameter.
*/
public com.anychart.charts.Funnel bounds(com.anychart.math.Rect value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for bounds of the element using one parameter.
*/
public com.anychart.charts.Funnel bounds(com.anychart.core.utils.Bounds value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, Number y, Number width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, y, width, height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, Number y, Number width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, y, width, wrapQuotes(height)));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, Number y, String width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, y, wrapQuotes(width), height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, Number y, String width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, y, wrapQuotes(width), wrapQuotes(height)));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, String y, Number width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, wrapQuotes(y), width, height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, String y, Number width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, wrapQuotes(y), width, wrapQuotes(height)));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, String y, String width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, wrapQuotes(y), wrapQuotes(width), height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(Number x, String y, String width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", x, wrapQuotes(y), wrapQuotes(width), wrapQuotes(height)));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, Number y, Number width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), y, width, height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, Number y, Number width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), y, width, wrapQuotes(height)));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, Number y, String width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), y, wrapQuotes(width), height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, Number y, String width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), y, wrapQuotes(width), wrapQuotes(height)));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, String y, Number width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), wrapQuotes(y), width, height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, String y, Number width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), wrapQuotes(y), width, wrapQuotes(height)));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, String y, String width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), wrapQuotes(y), wrapQuotes(width), height));
return this;
}
/**
* Setter for element bounds settings.
*/
public com.anychart.charts.Funnel bounds(String x, String y, String width, String height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".bounds(%s, %s, %s, %s);", wrapQuotes(x), wrapQuotes(y), wrapQuotes(width), wrapQuotes(height)));
return this;
}
/**
* Stops current marquee action if any.
*/
public com.anychart.charts.Funnel cancelMarquee() {
APIlib.getInstance().addJSLine(jsBase + ".cancelMarquee();");
return this;
}
/**
* Getter for the current outside labels connector length.
*/
public void connectorLength() {
APIlib.getInstance().addJSLine(jsBase + ".connectorLength();");
}
/**
* Setter for outside labels connector length.
*/
public com.anychart.charts.Funnel connectorLength(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorLength(%s);", value));
return this;
}
/**
* Setter for outside labels connector length.
*/
public com.anychart.charts.Funnel connectorLength(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorLength(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for outside labels connectors stroke settings.
*/
public void connectorStroke() {
APIlib.getInstance().addJSLine(jsBase + ".connectorStroke();");
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.Stroke value, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.Stroke value, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.Stroke value, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.Stroke value, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.ColoredFill value, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.ColoredFill value, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.ColoredFill value, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(com.anychart.graphics.vector.ColoredFill value, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", (value != null) ? value.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(String value, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", wrapQuotes(value), thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(String value, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", wrapQuotes(value), thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(String value, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", wrapQuotes(value), thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for outside labels connectors stroke settings.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel connectorStroke(String value, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".connectorStroke(%s, %s, %s, %s, %s);", wrapQuotes(value), thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Getter for the element's container.
*/
public com.anychart.graphics.vector.Layer container() {
return new com.anychart.graphics.vector.Layer(jsBase + ".container()");
}
/**
* Setter for the element's container.
*/
public com.anychart.charts.Funnel container(com.anychart.graphics.vector.Layer value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".container(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for the element's container.
*/
public com.anychart.charts.Funnel container(com.anychart.graphics.vector.Stage value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".container(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for the element's container.
*/
public com.anychart.charts.Funnel container(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".container(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the context menu.
*/
public com.anychart.ui.ContextMenu contextMenu() {
return new com.anychart.ui.ContextMenu(jsBase + ".contextMenu()");
}
/**
* Setter for the context menu.
*/
public com.anychart.charts.Funnel contextMenu(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".contextMenu(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the context menu.
*/
public com.anychart.charts.Funnel contextMenu(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".contextMenu(%s);", value));
return this;
}
/**
* Getter for the credits.
*/
public com.anychart.core.ui.ChartCredits credits() {
return new com.anychart.core.ui.ChartCredits(jsBase + ".credits()");
}
/**
* Setter for the chart credits.
{docs:Quick_Start/Credits}Learn more about credits settings.{docs}
*/
public com.anychart.charts.Funnel credits(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".credits(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the chart credits.
{docs:Quick_Start/Credits}Learn more about credits settings.{docs}
*/
public com.anychart.charts.Funnel credits(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".credits(%s);", value));
return this;
}
/**
*
*/
public com.anychart.data.View data(List<DataEntry> data) {
return new com.anychart.data.View(String.format(Locale.US, jsBase + ".data(%s)", arrayToString(data)));
}
/**
* Disposes charts.
*/
public void dispose() {
APIlib.getInstance().addJSLine(jsBase + ".dispose();");
}
/**
* Starts the rendering of the chart into the container.
*/
public com.anychart.charts.Funnel draw(Boolean async) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".draw(%s);", async));
return this;
}
/**
* Getter for the element state (enabled or disabled).
*/
public void enabled() {
APIlib.getInstance().addJSLine(jsBase + ".enabled();");
}
/**
* Setter for the element enabled state.
*/
public com.anychart.charts.Funnel enabled(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".enabled(%s);", value));
return this;
}
/**
* Getter for the export charts.
*/
public com.anychart.core.utils.Exports exports() {
return new com.anychart.core.utils.Exports(jsBase + ".exports()");
}
/**
* Setter for the export charts.
*/
public com.anychart.charts.Funnel exports(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".exports(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the current funnel points fill.
*/
public void fill() {
APIlib.getInstance().addJSLine(jsBase + ".fill();");
}
/**
* Setter for the funnel points fill using function.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(String fillFunction) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s);", wrapQuotes(fillFunction)));
return this;
}
/**
* Sets fill settings using an array or a string.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(com.anychart.graphics.vector.Fill value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Fill color with opacity.
*/
public com.anychart.charts.Funnel fill(String color, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s);", wrapQuotes(color), opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(com.anychart.graphics.vector.GradientKey keys, Number angle, Boolean mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, angle, mode, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(com.anychart.graphics.vector.GradientKey keys, Number angle, com.anychart.graphics.vector.Rect mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, angle, (mode != null) ? mode.getJsBase() : null, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(com.anychart.graphics.vector.GradientKey keys, Number angle, String mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, angle, wrapQuotes(mode), opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(String[] keys, Number angle, Boolean mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s);", arrayToStringWrapQuotes(keys), angle, mode, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(String[] keys, Number angle, com.anychart.graphics.vector.Rect mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s);", arrayToStringWrapQuotes(keys), angle, (mode != null) ? mode.getJsBase() : null, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(String[] keys, Number angle, String mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s);", arrayToStringWrapQuotes(keys), angle, wrapQuotes(mode), opacity));
return this;
}
/**
* Radial gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(com.anychart.graphics.vector.GradientKey keys, Number cx, Number cy, com.anychart.graphics.math.Rect mode, Number opacity, Number fx, Number fy) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, cx, cy, (mode != null) ? mode.getJsBase() : null, opacity, fx, fy));
return this;
}
/**
* Radial gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel fill(String[] keys, Number cx, Number cy, com.anychart.graphics.math.Rect mode, Number opacity, Number fx, Number fy) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".fill(%s, %s, %s, %s, %s, %s, %s);", arrayToStringWrapQuotes(keys), cx, cy, (mode != null) ? mode.getJsBase() : null, opacity, fx, fy));
return this;
}
/**
* Returns pixel bounds of the element due to parent bounds and self bounds settings.
*/
public com.anychart.math.Rect getPixelBounds() {
return new com.anychart.math.Rect(jsBase + ".getPixelBounds()");
}
/**
* Gets wrapped point by index.
*/
public com.anychart.core.Point getPoint(Number index) {
return new com.anychart.core.Point(String.format(Locale.US, jsBase + ".getPoint(%s)", index));
}
/**
* Getter for the selected points.
*/
public void getSelectedPoints() {
APIlib.getInstance().addJSLine(jsBase + ".getSelectedPoints();");
}
/**
* Getter for a statistical value by the key.
*/
public void getStat(com.anychart.enums.Statistics key) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getStat(%s);", (key != null) ? key.getJsBase() : null));
}
/**
* Getter for a statistical value by the key.
*/
public void getStat(String key) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getStat(%s);", wrapQuotes(key)));
}
/**
* Returns chart type.
*/
public void getType() {
APIlib.getInstance().addJSLine(jsBase + ".getType();");
}
/**
* Converts the global coordinates to local coordinates.
<b>Note:</b> Works only after {@link anychart.core.Chart#draw} is called.
*/
public void globalToLocal(Number xCoord, Number yCoord) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".globalToLocal(%s, %s);", xCoord, yCoord));
}
/**
* Getter for the current hatch fill settings.
*/
public com.anychart.graphics.vector.PatternFill hatchFill() {
return new com.anychart.graphics.vector.PatternFill(jsBase + ".hatchFill()");
}
/**
* Setter for the hatch fill settings.
*/
public com.anychart.charts.Funnel hatchFill(com.anychart.graphics.vector.PatternFill patternFillOrType, String color, Number thickness, Number size) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFill(%s, %s, %s, %s);", (patternFillOrType != null) ? patternFillOrType.getJsBase() : null, wrapQuotes(color), thickness, size));
return this;
}
/**
* Setter for the hatch fill settings.
*/
public com.anychart.charts.Funnel hatchFill(com.anychart.graphics.vector.HatchFill patternFillOrType, String color, Number thickness, Number size) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFill(%s, %s, %s, %s);", (patternFillOrType != null) ? patternFillOrType.getJsBase() : null, wrapQuotes(color), thickness, size));
return this;
}
/**
* Setter for the hatch fill settings.
*/
public com.anychart.charts.Funnel hatchFill(String patternFillOrType, String color, Number thickness, Number size) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFill(%s, %s, %s, %s);", wrapQuotes(patternFillOrType), wrapQuotes(color), thickness, size));
return this;
}
/**
* Setter for the hatch fill settings.
*/
public com.anychart.charts.Funnel hatchFill(com.anychart.graphics.vector.hatchfill.HatchFillType patternFillOrType, String color, Number thickness, Number size) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFill(%s, %s, %s, %s);", (patternFillOrType != null) ? patternFillOrType.getJsBase() : null, wrapQuotes(color), thickness, size));
return this;
}
/**
* Setter for the hatch fill settings.
*/
public com.anychart.charts.Funnel hatchFill(Boolean patternFillOrType, String color, Number thickness, Number size) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFill(%s, %s, %s, %s);", patternFillOrType, wrapQuotes(color), thickness, size));
return this;
}
/**
* Getter for the current chart hatch fill palette settings.
*/
public com.anychart.palettes.HatchFills hatchFillPalette() {
return new com.anychart.palettes.HatchFills(jsBase + ".hatchFillPalette()");
}
/**
* Setter for the chart hatch fill palette settings.
*/
public com.anychart.charts.Funnel hatchFillPalette(com.anychart.graphics.vector.hatchfill.HatchFillType[] value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFillPalette(%s);", arrayToString(value)));
return this;
}
/**
* Setter for the chart hatch fill palette settings.
*/
public com.anychart.charts.Funnel hatchFillPalette(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFillPalette(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the chart hatch fill palette settings.
*/
public com.anychart.charts.Funnel hatchFillPalette(com.anychart.palettes.HatchFills value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hatchFillPalette(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Getter for element height settings.
*/
public void height() {
APIlib.getInstance().addJSLine(jsBase + ".height();");
}
/**
* Setter for element height setting.
*/
public com.anychart.charts.Funnel height(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".height(%s);", value));
return this;
}
/**
* Setter for element height setting.
*/
public com.anychart.charts.Funnel height(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".height(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the hover state on a element or all elements.
*/
public com.anychart.charts.Funnel hover(Number index) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hover(%s);", index));
return this;
}
/**
* Getter for hovered state settings.
*/
public com.anychart.core.StateSettings hovered() {
return new com.anychart.core.StateSettings(jsBase + ".hovered()");
}
/**
* Setter for hovered state settings.
*/
public com.anychart.charts.Funnel hovered(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".hovered(%s);", wrapQuotes(value)));
return this;
}
/**
* Gets marquee process running value.
*/
public void inMarquee() {
APIlib.getInstance().addJSLine(jsBase + ".inMarquee();");
}
/**
* Getter for interactivity settings for the chart.
*/
public com.anychart.core.utils.Interactivity interactivity() {
return new com.anychart.core.utils.Interactivity(jsBase + ".interactivity()");
}
/**
* Setter for interactivity settings for the chart.
*/
public com.anychart.charts.Funnel interactivity(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".interactivity(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for interactivity settings for the chart.
*/
public com.anychart.charts.Funnel interactivity(com.anychart.enums.HoverMode value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".interactivity(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Getter for the chart label.
*/
public com.anychart.core.ui.Label label(String index) {
return new com.anychart.core.ui.Label(String.format(Locale.US, jsBase + ".label(%s)", wrapQuotes(index)));
}
/**
* Getter for the chart label.
*/
public com.anychart.core.ui.Label label(Number index) {
return new com.anychart.core.ui.Label(String.format(Locale.US, jsBase + ".label(%s)", index));
}
/**
* Setter for the chart label.
*/
public com.anychart.charts.Funnel label(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".label(%s);", value));
return this;
}
/**
* Setter for the chart label.
*/
public com.anychart.charts.Funnel label(String index, Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".label(%s, %s);", wrapQuotes(index), value));
return this;
}
/**
* Setter for the chart label.
*/
public com.anychart.charts.Funnel label(String index, String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".label(%s, %s);", wrapQuotes(index), wrapQuotes(value)));
return this;
}
/**
* Setter for the chart label.
*/
public com.anychart.charts.Funnel label(Number index, Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".label(%s, %s);", index, value));
return this;
}
/**
* Setter for the chart label.
*/
public com.anychart.charts.Funnel label(Number index, String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".label(%s, %s);", index, wrapQuotes(value)));
return this;
}
/**
* Getter for the current funnel labels.
*/
public com.anychart.core.ui.LabelsFactory labels() {
return new com.anychart.core.ui.LabelsFactory(jsBase + ".labels()");
}
/**
* Setter for the funnel labels.
*/
public com.anychart.charts.Funnel labels(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".labels(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the funnel labels.
*/
public com.anychart.charts.Funnel labels(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".labels(%s);", value));
return this;
}
/**
* Getter for element left bound settings.
*/
public void left() {
APIlib.getInstance().addJSLine(jsBase + ".left();");
}
/**
* Setter for element left bound settings.
*/
public com.anychart.charts.Funnel left(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".left(%s);", value));
return this;
}
/**
* Setter for element left bound settings.
*/
public com.anychart.charts.Funnel left(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".left(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the chart legend.
*/
public com.anychart.core.ui.Legend legend() {
return new com.anychart.core.ui.Legend(jsBase + ".legend()");
}
/**
* Setter for chart legend settings.
*/
public com.anychart.charts.Funnel legend(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".legend(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for chart legend settings.
*/
public com.anychart.charts.Funnel legend(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".legend(%s);", value));
return this;
}
/**
* Converts the local coordinates to global coordinates.
<b>Note:</b> Works only after {@link anychart.core.Chart#draw} is called.
*/
public void localToGlobal(Number xCoord, Number yCoord) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".localToGlobal(%s, %s);", xCoord, yCoord));
}
/**
* Getter for the chart margin.<br/>
<img src='/si/8.2.1/anychart.core.Chart.prototype.margin.png' width='352' height='351'/>
*/
public com.anychart.core.utils.Margin margin() {
return new com.anychart.core.utils.Margin(jsBase + ".margin()");
}
/**
* Setter for the chart margin in pixels using a single complex object.
*/
public com.anychart.charts.Funnel margin(Number[] value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s);", Arrays.toString(value)));
return this;
}
/**
* Setter for the chart margin in pixels using a single complex object.
*/
public com.anychart.charts.Funnel margin(String[] value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s);", arrayToStringWrapQuotes(value)));
return this;
}
/**
* Setter for the chart margin in pixels using a single complex object.
*/
public com.anychart.charts.Funnel margin(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, String value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, String value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, String value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, String value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), value3, value4));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, Number value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), value2, wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, Number value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), value2, wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, Number value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), value2, value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(String value1, Number value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", wrapQuotes(value1), value2, value3, value4));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, String value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, wrapQuotes(value2), wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, String value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, wrapQuotes(value2), wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, String value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, wrapQuotes(value2), value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, String value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, wrapQuotes(value2), value3, value4));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, Number value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, value2, wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, Number value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, value2, wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, Number value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, value2, value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart margin in pixels using several simple values.
*/
public com.anychart.charts.Funnel margin(Number value1, Number value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s, %s, %s, %s);", value1, value2, value3, value4));
return this;
}
/**
* Getter for the current chart markers palette settings.
*/
public com.anychart.palettes.Markers markerPalette() {
return new com.anychart.palettes.Markers(jsBase + ".markerPalette()");
}
/**
* Setter for the chart markers palette settings.
*/
public com.anychart.charts.Funnel markerPalette(com.anychart.palettes.Markers value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".markerPalette(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for the chart markers palette settings.
*/
public com.anychart.charts.Funnel markerPalette(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".markerPalette(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the chart markers palette settings.
*/
public com.anychart.charts.Funnel markerPalette(com.anychart.enums.MarkerType value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".markerPalette(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for the chart markers palette settings.
*/
public com.anychart.charts.Funnel markerPalette(String[] value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".markerPalette(%s);", arrayToStringWrapQuotes(value)));
return this;
}
/**
* Getter for the current data markers.
*/
public com.anychart.core.ui.MarkersFactory markers() {
return new com.anychart.core.ui.MarkersFactory(jsBase + ".markers()");
}
/**
* Setter for data markers.
*/
public com.anychart.charts.Funnel markers(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".markers(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for data markers.
*/
public com.anychart.charts.Funnel markers(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".markers(%s);", value));
return this;
}
/**
* Getter for the maximum height.
*/
public void maxHeight() {
APIlib.getInstance().addJSLine(jsBase + ".maxHeight();");
}
/**
* Setter for the maximum height.
*/
public com.anychart.charts.Funnel maxHeight(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".maxHeight(%s);", value));
return this;
}
/**
* Setter for the maximum height.
*/
public com.anychart.charts.Funnel maxHeight(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".maxHeight(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the maximum width.
*/
public void maxWidth() {
APIlib.getInstance().addJSLine(jsBase + ".maxWidth();");
}
/**
* Setter for the maximum width.
*/
public com.anychart.charts.Funnel maxWidth(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".maxWidth(%s);", value));
return this;
}
/**
* Setter for the maximum width.
*/
public com.anychart.charts.Funnel maxWidth(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".maxWidth(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the minimum height.
*/
public void minHeight() {
APIlib.getInstance().addJSLine(jsBase + ".minHeight();");
}
/**
* Setter for the minimum height.
*/
public com.anychart.charts.Funnel minHeight(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".minHeight(%s);", value));
return this;
}
/**
* Setter for the minimum height.
*/
public com.anychart.charts.Funnel minHeight(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".minHeight(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the minimum width.
*/
public void minWidth() {
APIlib.getInstance().addJSLine(jsBase + ".minWidth();");
}
/**
* Setter for the minimum width.
*/
public com.anychart.charts.Funnel minWidth(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".minWidth(%s);", value));
return this;
}
/**
* Setter for the minimum width.
*/
public com.anychart.charts.Funnel minWidth(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".minWidth(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the current height of the neck.
*/
public void neckHeight() {
APIlib.getInstance().addJSLine(jsBase + ".neckHeight();");
}
/**
* Setter for the height of the neck.
*/
public com.anychart.charts.Funnel neckHeight(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".neckHeight(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the height of the neck.
*/
public com.anychart.charts.Funnel neckHeight(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".neckHeight(%s);", value));
return this;
}
/**
* Getter for the current width of the neck.
*/
public void neckWidth() {
APIlib.getInstance().addJSLine(jsBase + ".neckWidth();");
}
/**
* Setter for the width of the neck.
*/
public com.anychart.charts.Funnel neckWidth(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".neckWidth(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the width of the neck.
*/
public com.anychart.charts.Funnel neckWidth(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".neckWidth(%s);", value));
return this;
}
/**
* Getter for noData settings.
*/
public com.anychart.core.NoDataSettings noData() {
return new com.anychart.core.NoDataSettings(jsBase + ".noData()");
}
/**
* Setter for noData settings.<br/>
{docs:Working_with_Data/No_Data_Label} Learn more about "No data" feature {docs}
*/
public com.anychart.charts.Funnel noData(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".noData(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for normal state settings.
*/
public com.anychart.core.StateSettings normal() {
return new com.anychart.core.StateSettings(jsBase + ".normal()");
}
/**
* Setter for normal state settings.
*/
public com.anychart.charts.Funnel normal(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".normal(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the current overlap mode for labels.
*/
public void overlapMode() {
APIlib.getInstance().addJSLine(jsBase + ".overlapMode();");
}
/**
* Setter for overlap mode for labels.
*/
public com.anychart.charts.Funnel overlapMode(com.anychart.enums.LabelsOverlapMode value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".overlapMode(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for overlap mode for labels.
*/
public com.anychart.charts.Funnel overlapMode(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".overlapMode(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for overlap mode for labels.
*/
public com.anychart.charts.Funnel overlapMode(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".overlapMode(%s);", value));
return this;
}
/**
* Getter for the chart padding.<br/>
<img src='/si/8.2.1/anychart.core.Chart.prototype.padding.png' width='352' height='351'/>
*/
public com.anychart.core.utils.Padding padding() {
return new com.anychart.core.utils.Padding(jsBase + ".padding()");
}
/**
* Setter for the chart paddings in pixels using a single value.
*/
public com.anychart.charts.Funnel padding(Number[] value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s);", Arrays.toString(value)));
return this;
}
/**
* Setter for the chart paddings in pixels using a single value.
*/
public com.anychart.charts.Funnel padding(String[] value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s);", arrayToStringWrapQuotes(value)));
return this;
}
/**
* Setter for the chart paddings in pixels using a single value.
*/
public com.anychart.charts.Funnel padding(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, String value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, String value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, String value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, String value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), wrapQuotes(value2), value3, value4));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, Number value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), value2, wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, Number value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), value2, wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, Number value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), value2, value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(String value1, Number value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", wrapQuotes(value1), value2, value3, value4));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, String value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, wrapQuotes(value2), wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, String value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, wrapQuotes(value2), wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, String value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, wrapQuotes(value2), value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, String value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, wrapQuotes(value2), value3, value4));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, Number value2, String value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, value2, wrapQuotes(value3), wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, Number value2, String value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, value2, wrapQuotes(value3), value4));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, Number value2, Number value3, String value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, value2, value3, wrapQuotes(value4)));
return this;
}
/**
* Setter for the chart paddings in pixels using several numbers.
*/
public com.anychart.charts.Funnel padding(Number value1, Number value2, Number value3, Number value4) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s, %s, %s, %s);", value1, value2, value3, value4));
return this;
}
/**
* Getter for the current funnel palette.
*/
public com.anychart.palettes.RangeColors palette() {
return new com.anychart.palettes.RangeColors(jsBase + ".palette()");
}
/**
* Setter for the funnel palette.
<b>Note</b>: You can use predefined palettes from {@link anychart.palettes}.
*/
public com.anychart.charts.Funnel palette(com.anychart.palettes.RangeColors value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".palette(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for the funnel palette.
<b>Note</b>: You can use predefined palettes from {@link anychart.palettes}.
*/
public com.anychart.charts.Funnel palette(com.anychart.palettes.DistinctColors value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".palette(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for the funnel palette.
<b>Note</b>: You can use predefined palettes from {@link anychart.palettes}.
*/
public com.anychart.charts.Funnel palette(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".palette(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the funnel palette.
<b>Note</b>: You can use predefined palettes from {@link anychart.palettes}.
*/
public com.anychart.charts.Funnel palette(String[] value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".palette(%s);", arrayToStringWrapQuotes(value)));
return this;
}
/**
* Getter for the current padding between points.
*/
public void pointsPadding() {
APIlib.getInstance().addJSLine(jsBase + ".pointsPadding();");
}
/**
* Setter for the padding between points.
*/
public com.anychart.charts.Funnel pointsPadding(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".pointsPadding(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the padding between points.
*/
public com.anychart.charts.Funnel pointsPadding(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".pointsPadding(%s);", value));
return this;
}
/**
* Prints all elements on related stage.
*/
public void print(com.anychart.graphics.vector.PaperSize paperSizeOrOptions, Boolean landscape) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".print(%s, %s);", (paperSizeOrOptions != null) ? paperSizeOrOptions.getJsBase() : null, landscape));
}
/**
* Prints all elements on related stage.
*/
public void print(String paperSizeOrOptions, Boolean landscape) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".print(%s, %s);", wrapQuotes(paperSizeOrOptions), landscape));
}
/**
* Removes all listeners from an object. You can also optionally remove listeners of some particular type.
*/
public void removeAllListeners(String type) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".removeAllListeners(%s);", wrapQuotes(type)));
}
/**
* Getter for element right bound settings.
*/
public void right() {
APIlib.getInstance().addJSLine(jsBase + ".right();");
}
/**
* Setter for element right bound setting.
*/
public com.anychart.charts.Funnel right(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".right(%s);", value));
return this;
}
/**
* Setter for element right bound setting.
*/
public com.anychart.charts.Funnel right(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".right(%s);", wrapQuotes(value)));
return this;
}
/**
* Saves the current chart as JPEG image.
*/
public void saveAsJpg(Number width, Number height, Number quality, Boolean forceTransparentWhite, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsJpg(%s, %s, %s, %s, %s);", width, height, quality, forceTransparentWhite, wrapQuotes(filename)));
}
/**
* Saves the current chart as JPEG image.
*/
public void saveAsJpg(String width, Number height, Number quality, Boolean forceTransparentWhite, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsJpg(%s, %s, %s, %s, %s);", wrapQuotes(width), height, quality, forceTransparentWhite, wrapQuotes(filename)));
}
/**
* Saves chart config as JSON document.
*/
public void saveAsJson(String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsJson(%s);", wrapQuotes(filename)));
}
/**
* Saves the current chart as PDF image.
*/
public void saveAsPdf(Number paperSizeOrWidthOrOptions, Boolean landscape, Number x, Number y, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsPdf(%s, %s, %s, %s, %s);", paperSizeOrWidthOrOptions, landscape, x, y, wrapQuotes(filename)));
}
/**
* Saves the current chart as PDF image.
*/
public void saveAsPdf(String paperSizeOrWidthOrOptions, Boolean landscape, Number x, Number y, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsPdf(%s, %s, %s, %s, %s);", wrapQuotes(paperSizeOrWidthOrOptions), landscape, x, y, wrapQuotes(filename)));
}
/**
* Saves the current chart as PNG image.
*/
public void saveAsPng(Number width, Number height, Number quality, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsPng(%s, %s, %s, %s);", width, height, quality, wrapQuotes(filename)));
}
/**
* Saves the current chart as PNG image.
*/
public void saveAsPng(String width, Number height, Number quality, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsPng(%s, %s, %s, %s);", wrapQuotes(width), height, quality, wrapQuotes(filename)));
}
/**
* Saves the current chart as SVG image.
*/
public void saveAsSvg(String paperSize, Boolean landscape, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsSvg(%s, %s, %s);", wrapQuotes(paperSize), landscape, wrapQuotes(filename)));
}
/**
* Saves the stage as SVG image using width and height.
*/
public void saveAsSvg(Number width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsSvg(%s, %s);", width, height));
}
/**
* Saves chart data as an Excel document.
*/
public void saveAsXlsx(com.anychart.enums.ChartDataExportMode chartDataExportMode, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsXlsx(%s, %s);", (chartDataExportMode != null) ? chartDataExportMode.getJsBase() : null, wrapQuotes(filename)));
}
/**
* Saves chart data as an Excel document.
*/
public void saveAsXlsx(String chartDataExportMode, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsXlsx(%s, %s);", wrapQuotes(chartDataExportMode), wrapQuotes(filename)));
}
/**
* Saves chart config as XML document.
*/
public void saveAsXml(String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".saveAsXml(%s);", wrapQuotes(filename)));
}
/**
* Selects points by index.
<b>Note:</b> Works only after {@link anychart.charts.Funnel#draw} is called.
*/
public com.anychart.charts.Funnel select(Number index) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".select(%s);", index));
return this;
}
/**
* Selects points by indexes.<br/>
<b>Note:</b> Works only after {@link anychart.charts.Funnel#draw} is called.
*/
public com.anychart.charts.Funnel select(Number[] indexes) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".select(%s);", Arrays.toString(indexes)));
return this;
}
/**
* Selects all points of the series.
<b>Note:</b> Works only after {@link anychart.charts.Funnel#draw} is called.
*/
public com.anychart.charts.Funnel select() {
APIlib.getInstance().addJSLine(jsBase + ".select();");
return this;
}
/**
* Getter for the select marquee fill.
*/
public void selectMarqueeFill() {
APIlib.getInstance().addJSLine(jsBase + ".selectMarqueeFill();");
}
/**
* Setter for fill settings using an array or a string.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(com.anychart.graphics.vector.Fill value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Fill color with opacity. Fill as a string or an object.
*/
public com.anychart.charts.Funnel selectMarqueeFill(String color, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s);", wrapQuotes(color), opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(com.anychart.graphics.vector.GradientKey keys, Number angle, Boolean mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, angle, mode, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(com.anychart.graphics.vector.GradientKey keys, Number angle, com.anychart.graphics.vector.Rect mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, angle, (mode != null) ? mode.getJsBase() : null, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(com.anychart.graphics.vector.GradientKey keys, Number angle, String mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, angle, wrapQuotes(mode), opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(String[] keys, Number angle, Boolean mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s);", arrayToStringWrapQuotes(keys), angle, mode, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(String[] keys, Number angle, com.anychart.graphics.vector.Rect mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s);", arrayToStringWrapQuotes(keys), angle, (mode != null) ? mode.getJsBase() : null, opacity));
return this;
}
/**
* Linear gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(String[] keys, Number angle, String mode, Number opacity) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s);", arrayToStringWrapQuotes(keys), angle, wrapQuotes(mode), opacity));
return this;
}
/**
* Radial gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(com.anychart.graphics.vector.GradientKey keys, Number cx, Number cy, com.anychart.graphics.math.Rect mode, Number opacity, Number fx, Number fy) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s, %s, %s, %s);", (keys != null) ? keys.getJsBase() : null, cx, cy, (mode != null) ? mode.getJsBase() : null, opacity, fx, fy));
return this;
}
/**
* Radial gradient fill.
{docs:Graphics/Fill_Settings}Learn more about coloring.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeFill(String[] keys, Number cx, Number cy, com.anychart.graphics.math.Rect mode, Number opacity, Number fx, Number fy) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeFill(%s, %s, %s, %s, %s, %s, %s);", arrayToStringWrapQuotes(keys), cx, cy, (mode != null) ? mode.getJsBase() : null, opacity, fx, fy));
return this;
}
/**
* Getter for the select marquee stroke.
*/
public void selectMarqueeStroke() {
APIlib.getInstance().addJSLine(jsBase + ".selectMarqueeStroke();");
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(String color, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(String color, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(String color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the select marquee stroke.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel selectMarqueeStroke(String color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selectMarqueeStroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Getter for selected state settings.
*/
public com.anychart.core.StateSettings selected() {
return new com.anychart.core.StateSettings(jsBase + ".selected()");
}
/**
* Setter for selected state settings.
*/
public com.anychart.charts.Funnel selected(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".selected(%s);", wrapQuotes(value)));
return this;
}
/**
* Starts select marquee drawing.
<b>Note:</b> Works only after {@link anychart.core.Chart#draw} is called.
*/
public com.anychart.charts.Funnel startSelectMarquee(Boolean repeat) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".startSelectMarquee(%s);", repeat));
return this;
}
/**
* Getter for the funnel points stroke.
*/
public void stroke() {
APIlib.getInstance().addJSLine(jsBase + ".stroke();");
}
/**
* Setter for the funnel points stroke using function.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.Stroke value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s);", (value != null) ? value.getJsBase() : null));
return this;
}
/**
* Setter for the funnel points stroke using function.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.Stroke color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(com.anychart.graphics.vector.ColoredFill color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", (color != null) ? color.getJsBase() : null, thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(String color, Number thickness, String dashpattern, String lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(String color, Number thickness, String dashpattern, String lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), wrapQuotes(lineJoin), (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(String color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, String lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, wrapQuotes(lineCap)));
return this;
}
/**
* Setter for the funnel points stroke using several parameters.
{docs:Graphics/Stroke_Settings}Learn more about stroke settings.{docs}
*/
public com.anychart.charts.Funnel stroke(String color, Number thickness, String dashpattern, com.anychart.graphics.vector.StrokeLineJoin lineJoin, com.anychart.graphics.vector.StrokeLineCap lineCap) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".stroke(%s, %s, %s, %s, %s);", wrapQuotes(color), thickness, wrapQuotes(dashpattern), (lineJoin != null) ? lineJoin.getJsBase() : null, (lineCap != null) ? lineCap.getJsBase() : null));
return this;
}
/**
* Getter for the chart title.
*/
public com.anychart.core.ui.Title title() {
return new com.anychart.core.ui.Title(jsBase + ".title()");
}
/**
* Setter for the chart title.
*/
public com.anychart.charts.Funnel title(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".title(%s);", value));
return this;
}
/**
* Setter for the chart title.
*/
public com.anychart.charts.Funnel title(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".title(%s);", wrapQuotes(value)));
return this;
}
/**
* Return chart configuration as JSON object or string.
*/
public void toJson(Boolean stringify) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".toJson(%s);", stringify));
}
/**
* Returns SVG string with paper size and landscape.
*/
public void toSvg(String paperSize, Boolean landscape) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".toSvg(%s, %s);", wrapQuotes(paperSize), landscape));
}
/**
* Returns SVG string with with determined the width and height.
*/
public void toSvg(Number width, Number height) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".toSvg(%s, %s);", width, height));
}
/**
* Return chart configuration as XML string or XMLNode.
*/
public void toXml(Boolean asXmlNode) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".toXml(%s);", asXmlNode));
}
/**
* Getter for the current tooltip settings.
*/
public com.anychart.core.ui.Tooltip tooltip() {
return new com.anychart.core.ui.Tooltip(jsBase + ".tooltip()");
}
/**
* Setter for tooltip settings.
*/
public com.anychart.charts.Funnel tooltip(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".tooltip(%s);", wrapQuotes(value)));
return this;
}
/**
* Setter for tooltip settings.
*/
public com.anychart.charts.Funnel tooltip(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".tooltip(%s);", value));
return this;
}
/**
* Getter for element top bound settings.
*/
public void top() {
APIlib.getInstance().addJSLine(jsBase + ".top();");
}
/**
* Setter for element top bound settings.
*/
public com.anychart.charts.Funnel top(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".top(%s);", value));
return this;
}
/**
* Setter for element top bound settings.
*/
public com.anychart.charts.Funnel top(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".top(%s);", wrapQuotes(value)));
return this;
}
/**
* Removes hover from all chart points.
*/
public com.anychart.charts.Funnel unhover() {
APIlib.getInstance().addJSLine(jsBase + ".unhover();");
return this;
}
public void setOnClickListener(com.anychart.chart.common.listener.ListenersInterface.OnClickListener listener) {
StringBuilder js = new StringBuilder();
js.append(jsBase).append(".listen('pointClick', function(e) {");
if (listener.getFields() != null) {
js.append("var result = ");
for (String field : listener.getFields()) {
js.append(String.format(Locale.US, "'%1$s' + ':' + e.point.get('%1$s') + ',' +", field));
}
js.setLength(js.length() - 8);
js.append(";");
js.append("android.onClick(result);");
} else {
js.append("android.onClick(null);");
}
js.append("});");
com.anychart.chart.common.listener.ListenersInterface.getInstance().setOnClickListener(listener);
APIlib.getInstance().addJSLine(js.toString());
}
/**
* Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().
*/
public void unlistenByKey(String key) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".unlistenByKey(%s);", wrapQuotes(key)));
}
/**
* Deselects all points.<br/>
<b>Note:</b> Works only after {@link anychart.charts.Funnel#draw} is called.
*/
public com.anychart.charts.Funnel unselect() {
APIlib.getInstance().addJSLine(jsBase + ".unselect();");
return this;
}
/**
* Getter for element width settings.
*/
public void width() {
APIlib.getInstance().addJSLine(jsBase + ".width();");
}
/**
* Setter for element width setting.
*/
public com.anychart.charts.Funnel width(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".width(%s);", value));
return this;
}
/**
* Setter for element width setting.
*/
public com.anychart.charts.Funnel width(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".width(%s);", wrapQuotes(value)));
return this;
}
/**
* Getter for the Z-index of the element.
*/
public void zIndex() {
APIlib.getInstance().addJSLine(jsBase + ".zIndex();");
}
/**
* Setter for the Z-index of the element.
*/
public com.anychart.charts.Funnel zIndex(Number value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".zIndex(%s);", value));
return this;
}
/**
* Getter for the accessibility setting.
*/
public com.anychart.core.utils.ChartA11y a11y() {
return new com.anychart.core.utils.ChartA11y(jsBase + ".a11y()");
}
/**
* Setter for the accessibility setting.
*/
public com.anychart.charts.Funnel a11y(Boolean value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".a11y(%s);", value));
return this;
}
/**
* Setter for the accessibility setting.
*/
public com.anychart.charts.Funnel a11y(String value) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".a11y(%s);", wrapQuotes(value)));
return this;
}
/**
* Returns JPG as base64 string.
*/
public void getJpgBase64String(String onSuccessOrOptions, String onError, Number width, Number height, Number quality, Boolean forceTransparentWhite) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getJpgBase64String(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), width, height, quality, forceTransparentWhite));
}
/**
* Returns PDF as base64 string.
*/
public void getPdfBase64String(String onSuccessOrOptions, String onError, Number paperSizeOrWidth, Number landscapeOrWidth, Number x, Number y) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getPdfBase64String(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), paperSizeOrWidth, landscapeOrWidth, x, y));
}
/**
* Returns PDF as base64 string.
*/
public void getPdfBase64String(String onSuccessOrOptions, String onError, Number paperSizeOrWidth, Boolean landscapeOrWidth, Number x, Number y) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getPdfBase64String(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), paperSizeOrWidth, landscapeOrWidth, x, y));
}
/**
* Returns PDF as base64 string.
*/
public void getPdfBase64String(String onSuccessOrOptions, String onError, String paperSizeOrWidth, Number landscapeOrWidth, Number x, Number y) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getPdfBase64String(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), wrapQuotes(paperSizeOrWidth), landscapeOrWidth, x, y));
}
/**
* Returns PDF as base64 string.
*/
public void getPdfBase64String(String onSuccessOrOptions, String onError, String paperSizeOrWidth, Boolean landscapeOrWidth, Number x, Number y) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getPdfBase64String(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), wrapQuotes(paperSizeOrWidth), landscapeOrWidth, x, y));
}
/**
* Returns PNG as base64 string.
*/
public void getPngBase64String(String onSuccessOrOptions, String onError, Number width, Number height, Number quality) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getPngBase64String(%s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), width, height, quality));
}
/**
* Returns SVG as base64 string.
*/
public void getSvgBase64String(String onSuccessOrOptions, String onError, String paperSizeOrWidth, Boolean landscapeOrHeight) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getSvgBase64String(%s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), wrapQuotes(paperSizeOrWidth), landscapeOrHeight));
}
/**
* Returns SVG as base64 string.
*/
public void getSvgBase64String(String onSuccessOrOptions, String onError, String paperSizeOrWidth, String landscapeOrHeight) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getSvgBase64String(%s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), wrapQuotes(paperSizeOrWidth), wrapQuotes(landscapeOrHeight)));
}
/**
* Returns SVG as base64 string.
*/
public void getSvgBase64String(String onSuccessOrOptions, String onError, Number paperSizeOrWidth, Boolean landscapeOrHeight) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getSvgBase64String(%s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), paperSizeOrWidth, landscapeOrHeight));
}
/**
* Returns SVG as base64 string.
*/
public void getSvgBase64String(String onSuccessOrOptions, String onError, Number paperSizeOrWidth, String landscapeOrHeight) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".getSvgBase64String(%s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), paperSizeOrWidth, wrapQuotes(landscapeOrHeight)));
}
/**
* Shares a chart as a JPG file and returns a link to the shared image.
*/
public void shareAsJpg(String onSuccessOrOptions, String onError, Boolean asBase64, Number width, Number height, Number quality, Boolean forceTransparentWhite, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsJpg(%s, %s, %s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, width, height, quality, forceTransparentWhite, wrapQuotes(filename)));
}
/**
* Shares a chart as a PDF file and returns a link to the shared image.
*/
public void shareAsPdf(String onSuccessOrOptions, String onError, Boolean asBase64, Number paperSizeOrWidth, Number landscapeOrWidth, Number x, Number y, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsPdf(%s, %s, %s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, paperSizeOrWidth, landscapeOrWidth, x, y, wrapQuotes(filename)));
}
/**
* Shares a chart as a PDF file and returns a link to the shared image.
*/
public void shareAsPdf(String onSuccessOrOptions, String onError, Boolean asBase64, Number paperSizeOrWidth, Boolean landscapeOrWidth, Number x, Number y, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsPdf(%s, %s, %s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, paperSizeOrWidth, landscapeOrWidth, x, y, wrapQuotes(filename)));
}
/**
* Shares a chart as a PDF file and returns a link to the shared image.
*/
public void shareAsPdf(String onSuccessOrOptions, String onError, Boolean asBase64, String paperSizeOrWidth, Number landscapeOrWidth, Number x, Number y, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsPdf(%s, %s, %s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, wrapQuotes(paperSizeOrWidth), landscapeOrWidth, x, y, wrapQuotes(filename)));
}
/**
* Shares a chart as a PDF file and returns a link to the shared image.
*/
public void shareAsPdf(String onSuccessOrOptions, String onError, Boolean asBase64, String paperSizeOrWidth, Boolean landscapeOrWidth, Number x, Number y, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsPdf(%s, %s, %s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, wrapQuotes(paperSizeOrWidth), landscapeOrWidth, x, y, wrapQuotes(filename)));
}
/**
* Shares a chart as a PNG file and returns a link to the shared image.
*/
public void shareAsPng(String onSuccessOrOptions, String onError, Boolean asBase64, Number width, Number height, Number quality, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsPng(%s, %s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, width, height, quality, wrapQuotes(filename)));
}
/**
* Shares a chart as a SVG file and returns a link to the shared image.
*/
public void shareAsSvg(String onSuccessOrOptions, String onError, Boolean asBase64, String paperSizeOrWidth, Boolean landscapeOrHeight, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsSvg(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, wrapQuotes(paperSizeOrWidth), landscapeOrHeight, wrapQuotes(filename)));
}
/**
* Shares a chart as a SVG file and returns a link to the shared image.
*/
public void shareAsSvg(String onSuccessOrOptions, String onError, Boolean asBase64, String paperSizeOrWidth, String landscapeOrHeight, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsSvg(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, wrapQuotes(paperSizeOrWidth), wrapQuotes(landscapeOrHeight), wrapQuotes(filename)));
}
/**
* Shares a chart as a SVG file and returns a link to the shared image.
*/
public void shareAsSvg(String onSuccessOrOptions, String onError, Boolean asBase64, Number paperSizeOrWidth, Boolean landscapeOrHeight, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsSvg(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, paperSizeOrWidth, landscapeOrHeight, wrapQuotes(filename)));
}
/**
* Shares a chart as a SVG file and returns a link to the shared image.
*/
public void shareAsSvg(String onSuccessOrOptions, String onError, Boolean asBase64, Number paperSizeOrWidth, String landscapeOrHeight, String filename) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareAsSvg(%s, %s, %s, %s, %s, %s);", wrapQuotes(onSuccessOrOptions), wrapQuotes(onError), asBase64, paperSizeOrWidth, wrapQuotes(landscapeOrHeight), wrapQuotes(filename)));
}
/**
* Opens Facebook sharing dialog.
*/
public void shareWithFacebook(String captionOrOptions, String link, String name, String description) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareWithFacebook(%s, %s, %s, %s);", wrapQuotes(captionOrOptions), wrapQuotes(link), wrapQuotes(name), wrapQuotes(description)));
}
/**
* Opens LinkedIn sharing dialog.
*/
public void shareWithLinkedIn(String captionOrOptions, String description) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareWithLinkedIn(%s, %s);", wrapQuotes(captionOrOptions), wrapQuotes(description)));
}
/**
* Opens Pinterest sharing dialog.
*/
public void shareWithPinterest(String linkOrOptions, String description) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".shareWithPinterest(%s, %s);", wrapQuotes(linkOrOptions), wrapQuotes(description)));
}
/**
* Opens Twitter sharing dialog.
*/
public void shareWithTwitter() {
APIlib.getInstance().addJSLine(jsBase + ".shareWithTwitter();");
}
/**
* Creates and returns the chart represented as an invisible HTML table.
*/
public void toA11yTable(String title, Boolean asString) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".toA11yTable(%s, %s);", wrapQuotes(title), asString));
}
/**
* Creates and returns a chart as HTML table.
*/
public void toHtmlTable(String title, Boolean asString) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".toHtmlTable(%s, %s);", wrapQuotes(title), asString));
}
/**
*
*/
public com.anychart.data.View data(com.anychart.data.View data) {
return new com.anychart.data.View(String.format(Locale.US, jsBase + ".data(%s)", (data != null) ? data.getJsBase() : null));
}
/**
*
*/
public com.anychart.data.View data(List<DataEntry> data, com.anychart.enums.TreeFillingMethod fillMethod) {
return new com.anychart.data.View(String.format(Locale.US, jsBase + ".data(%s, %s)", arrayToString(data), (fillMethod != null) ? fillMethod.getJsBase() : null));
}
/**
*
*/
public com.anychart.data.View data(List<DataEntry> data, String fillMethod) {
return new com.anychart.data.View(String.format(Locale.US, jsBase + ".data(%s, %s)", arrayToString(data), wrapQuotes(fillMethod)));
}
} | [
"arsenymalkov@gmail.com"
] | arsenymalkov@gmail.com |
fe7da2b9dbfc0896ed24af7dcf419fbdc618db29 | bfeaff2876cd98d93f0b602ed33ab442e8443988 | /java/ch/epfl/cs107/play/game/arpg/area/RouteChateau.java | 0a99797e3955fddf2f6ea651bc19b20174708362 | [] | no_license | Dicedead/ZeldaProject | 4032188f8d611ee5cd7f1b014d4252950ef37199 | eb1badbd23157b21dc00e6379b0e405631e6e055 | refs/heads/master | 2022-12-23T09:51:05.654990 | 2020-09-26T14:49:10 | 2020-09-26T14:49:10 | 298,835,160 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,384 | java | package ch.epfl.cs107.play.game.arpg.area;
import ch.epfl.cs107.play.game.areagame.actor.Background;
import ch.epfl.cs107.play.game.areagame.actor.Foreground;
import ch.epfl.cs107.play.game.areagame.actor.Orientation;
import ch.epfl.cs107.play.game.arpg.actor.CastleDoor;
import ch.epfl.cs107.play.game.arpg.actor.CastleKey;
import ch.epfl.cs107.play.game.arpg.actor.DarkLord;
import ch.epfl.cs107.play.game.rpg.actor.Door;
import ch.epfl.cs107.play.math.DiscreteCoordinates;
import ch.epfl.cs107.play.signal.logic.Logic;
import java.util.List;
public class RouteChateau extends ARPGArea {
@Override
protected void createArea() {
Door door1 = new Door("zelda/PontTropLong", new DiscreteCoordinates(9,18), Logic.TRUE, this, Orientation.DOWN,
new DiscreteCoordinates(9,0), new DiscreteCoordinates(10,0));
CastleDoor castleDoor = new CastleDoor("zelda/Chateau", new DiscreteCoordinates(7,1), this, Orientation.UP, new DiscreteCoordinates(9,13),
new DiscreteCoordinates (10,13));
DarkLord darky = new DarkLord(this, new DiscreteCoordinates(8,8));
CastleKey castleKey = new CastleKey(this, new DiscreteCoordinates(8,5));
registerActors(door1,castleDoor,darky, new Background(this), new Foreground(this));
}
@Override
public String getTitle() {
return "zelda/RouteChateau";
}
}
| [
"dicedead@gmail.com"
] | dicedead@gmail.com |
299fd6438380e674233581350f7ea1cb276d5c7f | c1b08ed63fe497651bfa2d27141baf2ba8449e84 | /src/main/java/com/demosoft/life/imitation/entity/MapFactory.java | 31393353b39ddd646a48cff636345ce7cb836924 | [] | no_license | Andreydemo/LifeImitation | 3ec59e04a2af1a293485b4a208d59948f653daf4 | 0a8e48024c27bad43bf492ec22f766f4638377c4 | refs/heads/master | 2021-01-11T17:37:30.886146 | 2017-03-06T16:22:30 | 2017-03-06T16:22:30 | 79,804,789 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 593 | java | package com.demosoft.life.imitation.entity;
/**
* Created by Andrii_Korkoshko on 2/15/2017.
*/
public interface MapFactory {
Map createMap(int size);
Map generateRandomMap(int size);
void generateLandscape(Map map);
Cell createCell();
Human createHuman(Cell cell);
Landscape createLandscape(Cell cell);
Plant createPlant(Cell cell);
void generatePeoples(Map map, int menCount, int womanCount);
void generatePlants(Map map, int count);
void incMapSize();
void decMapSize();
void changesMapSize(int step);
int getMapSize();
}
| [
"demosoft@bk.ru"
] | demosoft@bk.ru |
951de4d6f8deb479c70b3be3bb9c2cbe82018f69 | d98991a09821c26fef3985417144893758c8cfe6 | /src/controller/reports/TransaccionBean.java | 632e441a7162901d5897996a2d15088784aad351 | [] | no_license | maisonnavemariano/programa_presupuestos_mh | 288ef49e1fd878d0b4e3d3c11b4311b8e58d99ec | aec6b64cd87554fc268df19df0e71abcb4f587ad | refs/heads/master | 2022-09-06T22:50:44.543032 | 2020-06-01T13:54:42 | 2020-06-01T13:54:42 | 78,678,606 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,091 | java | package controller.reports;
public class TransaccionBean{
private double debe;
private double haber;
private double saldo;
private String descripcion;
private String fecha;
private char evento;
public double getDebe() {
return debe;
}
public void setDebe(double debe) {
this.debe = debe;
}
public double getHaber() {
return haber;
}
public void setHaber(double haber) {
this.haber = haber;
}
public double getSaldo() {
return saldo;
}
public void setSaldo(double saldo) {
this.saldo = saldo;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public String getFecha() {
return fecha;
}
public void setFecha(String fecha) {
this.fecha = fecha;
}
public TransaccionBean(String f, String descr, double d, double h, double s, char evento ){
this.debe = d;
this.haber = h;
this.saldo = s;
this.descripcion = descr;
this.fecha = f;
this.evento = evento;
}
public char getEvento() {
return evento;
}
} | [
"maisonnavemariano@gmail.com"
] | maisonnavemariano@gmail.com |
1dd7801217c5b6272e784d0e8ea7aa6450b41ba5 | e1664fdeaaa981e21c08ad537d6281a375b0aa1a | /leetcode/E036.java | 18923a65e6f0407db5c9d7be68f4e73a7383ac54 | [] | no_license | LKHell/Java | b5ff3ad2463a45c5e643c6d037be23bd8796321e | 27ef2f5475719674ab765bbafd95210eea9c966b | refs/heads/master | 2021-01-19T01:31:47.599418 | 2020-01-11T06:28:44 | 2020-01-11T06:28:44 | 73,341,101 | 0 | 0 | null | 2020-10-13T17:32:46 | 2016-11-10T02:46:04 | Java | UTF-8 | Java | false | false | 537 | java | import java.util.HashSet;
class Solution {
public boolean isValidSudoku(char[][] board) {
Set<String> seen = new HashSet<>();
for (int i = 0; i<9; i++) {
for (int j = 0; j<9; j++) {
char number = board[i][j];
if (number != '.') {
if (!seen.add(number + "in row "+ i )||
!seen.add(number + "in column"+ j)||
!seen.add(number + "in block"+i/3+j/3)){
return false;
}
}
}
}
return true;
}
} | [
"372383419@qq.com"
] | 372383419@qq.com |
f1a306ec06bf8fe623cd0f5f4b4d3b29a287fbfb | 471cc5aeee3555b08f85de9024481df549b23944 | /eBus-Framework/src/de/htwg_konstanz/ebus/framework/wholesaler/test/TestBOProduct.java | 07c1f661761d8bf866a6302d3e845cae6b8c87a3 | [] | no_license | Agraphie/htwg.ebut.srck | 1f1a566b5cc00f8cb41f033a5f53826f45b530cf | 90bfd55daeda62ddcf5de9de6b7b5af0a83b7499 | refs/heads/master | 2016-08-04T16:19:12.575700 | 2013-12-16T20:04:47 | 2013-12-16T20:04:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,876 | java | /* TestBOProduct.java
***********************************************************************************
* 20.03.2007 ** tdi
* - created
*
***********************************************************************************
* Copyright 2007-2010 HTWG Konstanz
*
* Prof. Dr.-Ing. Juergen Waesch
* Dipl. -Inf. (FH) Thomas Dietrich
* Fakultaet Informatik - Department of Computer Science
* E-Business Technologien
*
* Hochschule Konstanz Technik, Wirtschaft und Gestaltung
* University of Applied Sciences
* Brauneggerstrasse 55
* D-78462 Konstanz
*
* E-Mail: juergen.waesch(at)htwg-konstanz.de
************************************************************************************/
package de.htwg_konstanz.ebus.framework.wholesaler.test;
import java.util.List;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Test;
import de.htwg_konstanz.ebus.framework.wholesaler.api.bo.BOCategory;
import de.htwg_konstanz.ebus.framework.wholesaler.api.bo.BOProduct;
import de.htwg_konstanz.ebus.framework.wholesaler.api.boa.CategoryBOA;
import de.htwg_konstanz.ebus.framework.wholesaler.api.boa.ProductBOA;
public class TestBOProduct
{
@Test public void testFindByCategory()
{
BOCategory boCategory = CategoryBOA.getInstance().getCategoryById("Alle");
if (boCategory != null)
{
List<BOProduct> boProductList = ProductBOA.getInstance().findByCategory(boCategory);
System.out.println("\ntestFindByCategory: \"Alle\"");
if (boProductList != null)
{
for (BOProduct boProduct : boProductList)
{
System.out.println(boProduct.getShortDescription());
}
}
boCategory = null;
boProductList = null;
}
}
@Test public void testFindByCriteria()
{
findByCriteria("Shortdescription", "%pen");
findByCriteria("Shortdescription", "%00%");
findByCriteria("Shortdescription", "s%");
findByCriteria("Longdescription", "%notebook%");
}
@Test public void findByCriteria(String attributeName, String searchString)
{
System.out.println("\ntestFindByCriteria: " + "\"" + attributeName + "\" " + "\"" + searchString + "\"");
List<BOProduct> boProductList = ProductBOA.getInstance().findByCriteria(attributeName, searchString);
if (boProductList != null)
{
for (BOProduct boProduct : boProductList)
{
System.out.println(boProduct.getShortDescription());
}
}
boProductList = null;
}
@Test public void testFindByOrderNumberSupplier()
{
BOProduct boProduct = ProductBOA.getInstance().findByOrderNumberSupplier("20");
assertNotNull(boProduct);
System.out.println("\ntestFindByOrderNumberSupplier: \"20\"");
System.out.println(boProduct.getShortDescription());
boProduct = null;
}
@After public void tearDown()
{
System.gc();
}
}
| [
"simon-r@online.de"
] | simon-r@online.de |
cdae5f822e73ced9c764935bf4ff5d7473ac7c03 | 1b6f40eefbb56e6a7446a289336f691ba19ccbef | /studycubby/src/test/java/com/project/studycubby/StudycubbyApplicationTests.java | 58a9570c1d287fc1ea69e1f7b02dc20b1eeaff48 | [] | no_license | FadingEcho20/Aglets-3380-Project | e014808adfcf48317d2b8cde034a00cb71cc2441 | 6e3cbb709715145fcc581bb0cbe94311c76c8c3a | refs/heads/main | 2023-08-20T07:31:54.379644 | 2021-03-30T03:32:44 | 2021-03-30T03:32:44 | 332,830,911 | 2 | 0 | null | 2021-03-27T07:27:08 | 2021-01-25T17:40:50 | HTML | UTF-8 | Java | false | false | 218 | java | package com.project.studycubby;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class StudycubbyApplicationTests {
@Test
void contextLoads() {
}
}
| [
"noreply@github.com"
] | noreply@github.com |
84309fa430a9d20fb0f3941c976f1bf1bdc9e508 | 8693257b721e75265a7c5e2dc1cc0c8b13108f22 | /src/main/java/com/aripd/ecommerce/view/SignupBean.java | dbaceedcfd6bde423936aef87fd4a37bb9fe7b42 | [
"Apache-2.0"
] | permissive | harendranathvegi9/ecommerce | 3bbc747edf340316fc66ff134269aaed9da51cab | 9ab1a506d28d6e47c7c190699e43a676f0fca2e1 | refs/heads/master | 2021-01-19T01:12:26.369471 | 2017-03-29T20:38:33 | 2017-03-29T20:38:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,464 | java | package com.aripd.ecommerce.view;
import com.aripd.ecommerce.entity.UserEntity;
import com.aripd.ecommerce.entity.UserGroup;
import com.aripd.ecommerce.entity.UserStatus;
import com.aripd.ecommerce.service.UserService;
import com.aripd.util.MessageUtil;
import com.aripd.util.locale.LocaleProvider;
import com.aripd.util.mail.IMAPMessageSendResponseModel;
import com.aripd.util.mail.MailUtil;
import com.aripd.util.validator.EmailAddress;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.faces.event.ActionEvent;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
@Named
@ViewScoped
public class SignupBean implements Serializable {
@EmailAddress
private String email;
private String firstname;
private String lastname;
private String address;
private String zipcode;
private String county;
@Inject
private UserService userService;
@Inject
MessageUtil messageUtil;
@Inject
MailUtil mailUtil;
public SignupBean() {
}
@PostConstruct
public void init() {
}
public String getReturnValue() {
return "/index";
}
public void doSubmitMember(ActionEvent actionEvent) {
UserEntity user = userService.findOneByEmail(email);
if (user != null) {
messageUtil.addGlobalInfoFlashMessage("User is already signed up");
} else {
SignupModel model = new SignupModel.Builder()
.setGroup(UserGroup.Members)
.setStatus(UserStatus.Unconfirmed)
.setEmail(email)
.setFirstname(firstname)
.setLastname(lastname)
.build();
user = userService.signup(model);
String subject = messageUtil.getMailMessage(LocaleProvider.getLocale(), "confirmation.subject");
String msg = messageUtil.getMailMessage(LocaleProvider.getLocale(), "confirmation.msg", new Object[]{
user.getEmail(),
user.getEmail(),
user.getPassword(),
user.getValidationUrl()
});
IMAPMessageSendResponseModel imapModel = mailUtil.sendEmail(user.getEmail(), subject, msg);
if (imapModel.isSuccess()) {
messageUtil.addGlobalInfoFlashMessage("Your confirmation message is sent to {0}", new Object[]{user.getEmail()});
} else {
messageUtil.addGlobalCustomFlashMessage(imapModel.getMessage());
}
}
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
}
| [
"dev@aripd.com"
] | dev@aripd.com |
c5e9fa1ba03de6867b3108fc8444edea6dcea852 | 8629b6eb536b195c20fd74b4ad9b6c95ae4e4d79 | /src/Clases/ListaCantantes.java | 9596f4c5c0fc2e7a16bcd0dc0d1f3bdeac7d7b7b | [] | no_license | squinteroz2921/ListaCantantes | fae28fe5356be06ad817d88ae16ac8b49976c750 | e7c2eaa313484dc844141b718b48c1b0f652622d | refs/heads/master | 2022-08-22T06:46:06.358498 | 2020-05-22T01:43:42 | 2020-05-22T01:43:42 | 265,992,064 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,084 | java | package Clases;
import javax.swing.*;
import java.util.*;
import java.util.function.Consumer;
public class ListaCantantes {
ArrayList<Cantante> singerList=new ArrayList<Cantante>();
// se crea el metodo para saber si la lista se encuentra vacia
public Boolean emptyList() {
if (singerList == null || singerList.isEmpty()) {
return true;
} else {
return false;
}
}
// Metodo para agregar un nuevo nodo a la lista
public void addList(String nombre, String disco) {
Cantante newCantante = new Cantante(nombre, disco);
singerList.add(newCantante);
Collections.sort(singerList, new Comparator<Cantante>() {
@Override
public int compare(Cantante o1, Cantante o2) {
return 0;
}
});
}
// metodo para eliminar un nodo de la lista
public String removeList(String nombre){
if (!emptyList()) {
/*for (Cantante x:singerList) {
System.out.println(x.getNombre());
if (x.getNombre().equals(nombre)){
singerList.remove(x);
return nombre;
}
}*/
singerList.removeIf(x->x.getNombre().equals(nombre));
/**/ singerList.stream().filter(x->x.getNombre().startsWith(nombre)).map(Cantante::getNombre).forEach(System.out::println);
}
return " ";
}
public int sizeList(){
return singerList.size();
}
public void clearList(){
singerList.clear();
}
public void getList(){
/*for (Cantante x:singerList) {*//**//*
System.out.println(x.getNombre());
}*/
Consumer<Cantante> consumer=cantante -> System.out.println(cantante.getNombre()+" "+cantante.getDisco());
singerList.forEach(consumer);// respeta el orden de insercion
System.out.println("///////////////");
singerList.stream().forEach(consumer); // el procesamiento es indefinido
System.out.println("/////////////");
}
}
| [
"squinteroz2921@gmail.com"
] | squinteroz2921@gmail.com |
b90adcf91538fd6d11e79ba21bdfa3fd2e0104f7 | db93360e3eb90ee85ded1a8555f0bf4066da8ac5 | /src/_04_25/RegularExpressions.java | e934bcfa4978e0417dde28c5cea9509b585a59dc | [] | no_license | CodeScribbler/Java6Certification | d297fc23df2b8cd17547a7cbed1f494d63871f63 | 9b994e8028ae5e15a1a6e9ef47860d6909d454d1 | refs/heads/master | 2021-01-19T22:56:03.563845 | 2017-05-25T19:29:58 | 2017-05-25T19:29:58 | 88,896,303 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,279 | java | package _04_25;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegularExpressions {
public static void main(String[] args) {
/* Pattern patt = Pattern.compile("xy");
Matcher m = patt.matcher("xy Ebene ");
while(m.find()) {
System.out.println(m.start() + " " + m.group() + " " + m.end()); // 0 xy 2
}
Matcher m2 = Pattern.compile("aba").matcher("abababa");
while(m2.find()) {
System.out.println(m2.start() + " " + m2.group() + " " + m2.end());
}
Matcher m3 = Pattern.compile("[^0-9]").matcher("a_ba3bab5a&$ ()");
while(m3.find()) {
System.out.println(m3.start() + " " + m3.group() + " " + m3.end());
}*/
/*String source = "Ich habe 2 Kinder, der yohanes ist 11 jahre alt und Rahel 15";
Matcher match = Pattern.compile("\\d+").matcher(source);
while(match.find()) {
System.out.println(match.start() + " " + match.group() + " " + match.end());
}*/
String name = "ab34ef";
Matcher match = Pattern.compile("(\\d*)").matcher(name);
while(match.find()) {
System.out.println(match.start() + " " + match.group());
}
}
}
| [
"root32@hotmail.de"
] | root32@hotmail.de |
99a772eaf84f247ad25e301ed819a54966342918 | ea6043b843fb7a2d025a5f31d02829934ce6d80e | /src/main/java/com/example/DemoApplication.java | f1462fac7df38a21bc24b34204bc33e00b8052f3 | [] | no_license | xerikssonx/spring-boot-skeleton | 397175276b6964027bbe136c67c6e83f62d01bd1 | 0a87f41371f45fb41baaf0dba8b23b9680d55a2c | refs/heads/master | 2021-01-19T05:29:59.277984 | 2016-08-05T06:31:43 | 2016-08-05T06:31:43 | 64,836,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 566 | java | package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
@SpringBootApplication
@EnableAutoConfiguration
@EnableWebSecurity
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
| [
"edhar.vakhitov@cloudtp.com"
] | edhar.vakhitov@cloudtp.com |
de5cf2e56429642b494113085c629d08458ff4bb | 9216b4a848bda8a0f11320e152e30c3627b4e16c | /app/src/main/java/rui/com/crashlog/widget/customVIew/No_Scrollable_ViewPager.java | 952cbf70ec693d91ceb36ce7390e7d95e13d802e | [] | no_license | hruixi/MySuperProj | 75d5bf3cd4ac0f53050fd6968f4b55632a84d599 | 58e588b0cc924235542c68f21885a8f4c6f80403 | refs/heads/master | 2022-11-13T11:58:50.094738 | 2020-07-10T06:52:50 | 2020-07-10T06:52:50 | 278,319,081 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 713 | java | package rui.com.crashlog.widget.customVIew;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import androidx.viewpager.widget.ViewPager;
public class No_Scrollable_ViewPager extends ViewPager
{
public No_Scrollable_ViewPager(Context context) {
super(context);
}
public No_Scrollable_ViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
/**
* 重写这两个方法就可以拦截滑动...
* */
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return false;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
return false;
}
}
| [
"ruixiang.he@starwin.xom"
] | ruixiang.he@starwin.xom |
227f537b97e14f88b6804dcb16a6fd15b7070f88 | a4a84a88c921c4b8d8ffdb148369b7f78b312c94 | /app/src/main/java/javaclass/Note.java | a572e6ff3585a1d597c8459f2ed62df1d4fe5989 | [] | no_license | SoftwareDogZ/E_Notebook | c8561af117600afaa2b0749e72c868c5fa168107 | d5dafe20e25dfc2a4876dd932f69517bbe33c2b7 | refs/heads/master | 2020-04-28T09:00:43.768235 | 2019-03-27T14:59:08 | 2019-03-27T14:59:08 | 175,150,900 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 358 | java | package javaclass;
import android.graphics.Bitmap;
public class Note{
private String title;
private Bitmap bitmap;
public Note(String title, Bitmap bitmap){
this.title = title;
this.bitmap = bitmap;
}
public String getTitle(){
return title;
}
public Bitmap getBitmap(){
return bitmap;
}
}
| [
"799808219@qq.com"
] | 799808219@qq.com |
cac6d0f8922ba706ea285e54639702ead6d3d840 | c6362a766a6f014f5086b7d2563522a2c2824e22 | /src/main/java/com/lijun/lblog/service/impl/UserServiceImpl.java | a13d83fc5a655e723ce5df52e33798e22ab43372 | [] | no_license | lj598950610/lBlog | 80b7641dc1a717440fb6391ed289264784485909 | ba02ecafe40f1f784d0e7a51169258dd18d42c69 | refs/heads/master | 2020-05-14T01:36:34.224803 | 2019-04-16T12:37:00 | 2019-04-16T12:37:00 | 181,685,574 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,665 | java | package com.lijun.lblog.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.lijun.lblog.domain.User;
import com.lijun.lblog.repository.UserRepository;
import com.lijun.lblog.service.UserService;
/**
*
* Copyright: Copyright (c) 2019 lijun
*
* @ClassName: UserServiceImpl.java
* @Description: 该类的功能描述
*
* @version: v1.0.0
* @author: 李骏
* @date: 2019年4月15日 下午8:55:05
*
* Modification History:
* Date Author Version Description
*---------------------------------------------------------*
* 2019年4月15日 Administrator v1.0.0 修改原因
*/
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserRepository userRepository;
@Transactional
@Override
public User saveUser(User user) {
User user2 = new User();
return userRepository.save(user);
}
@Transactional
@Override
public void removeUser(Long id) {
userRepository.deleteById(id);
}
@Transactional
@Override
public void removeUsersInBatch(List<User> users) {
userRepository.deleteAll(users);
}
@Transactional
@Override
public User updateUser(User user) {
return userRepository.save(user);
}
@Transactional
@Override
public User getUserById(Long id) {
return userRepository.findById(id).get();
}
@Transactional
@Override
public List<User> listUsers() {
return userRepository.findAll();
}
}
| [
"lj598950610@163.com"
] | lj598950610@163.com |
1d12736a04dd40b15da744e3a129ffd6c226ed0d | fa36d46adc5abb9a814dbfc618dc8cf72da6f4cb | /src/ru/kotadmi/Laba1/Pr_32/Dish.java | c0d2d3a79f90d669d876703414d5f04b412091d8 | [] | no_license | kotadmi/java-inbo01 | 3b411148ee8fdad9cc525b44007ed2d47622fd2d | 2bfd3f607be83f555bd77cbce90451147bdd3db8 | refs/heads/master | 2023-01-25T01:31:49.962472 | 2020-12-07T19:16:14 | 2020-12-07T19:16:14 | 293,457,007 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 188 | java | package ru.kotadmi.Laba1.Pr_32;
public final class Dish extends MenuItem {
public Dish(int cost, String name, String description) {
super(cost, name, description);
}
}
| [
"kotadmi@gmail.com"
] | kotadmi@gmail.com |
64b3103e9ecd5ef3d43118ddecc09284155986c8 | 707227c1738c907e52e0da4945ecf4c069ad8f2b | /src/main/java/com/nerdwin15/demo/helloworld/config/WebConfig.java | 8ae764358c17f931d801f72d19cc05087dc8f3e3 | [] | no_license | mikesir87/wildfly-spring-hello-world | 2a3e8d50a096915f2384658f7489542afe0ba925 | 78bcd4fcfa122ca30e43fca9f8382dde4b350d6f | refs/heads/master | 2020-05-17T09:11:06.966388 | 2013-10-25T11:47:12 | 2013-10-25T11:47:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,894 | java | /*
* File created on Oct 21, 2013
*
* Copyright 2008-2013 Virginia Polytechnic Institute and State University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.nerdwin15.demo.helloworld.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
/**
* Provides the web-based configuration
*
* @author Michael Irwin
*/
@EnableWebMvc
@Configuration
@ComponentScan(basePackages="com.nerdwin15.demo.helloworld")
public class WebConfig extends WebMvcConfigurerAdapter {
/**
* {@inheritDoc}
*/
@Override
public void configureDefaultServletHandling(
DefaultServletHandlerConfigurer configurer) {
configurer.enable();
}
@Bean
public InternalResourceViewResolver configureInternalResourceViewResolver() {
InternalResourceViewResolver resolver =
new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
}
| [
"mikesir87@gmail.com"
] | mikesir87@gmail.com |
750d9e55ed3149bd7ffc68310fe0c06c969e1a79 | 1368c22e30c96b69ea321849d931f693a49f1d0a | /Queue.java | fb353aad6aa76b7a4cec427a58d0df9035f0ebfc | [
"MIT"
] | permissive | sunandanbarman/DataStructures | c06065ba0eb5090c3480cd87c2bce159e268a9c7 | 8adea585dc4dcbdb3814e24ca5bfa41e13a34346 | refs/heads/master | 2021-01-10T03:10:31.326904 | 2016-10-11T00:03:12 | 2016-10-11T00:03:12 | 45,320,152 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,470 | java | import java.io.IOException;
import java.util.Iterator;
//FIFO principle
//enqueue to last, and dequeue from front
class QueueLinkedList<E> implements Iterable<E>{
Node front = null , last = null;
int size = 0;
public void enqueue(E data) {
Node temp = new Node(data);
if (last == null) {
front = temp;
last = temp;
} else {
last.next = temp;
last = temp;
}
size++;
}
public E dequeue() throws Exception{
if (front == null)
throw new Exception("Queue is empty !");
E nResult = front.data;
front = front.next;
size--;
return nResult;
}
public boolean isEmpty() {
return (front == null) ;
}
public int size() {
return size;
}
private class Node {
E data;
Node next;
Node(E data) {
this.data = data;
this.next = null;
}
}
@Override
public Iterator<E> iterator() {
return new LinkedQueueIterator();
}
private class LinkedQueueIterator implements Iterator<E>{
private int size_ = size;
private Node head = front;
@Override
public boolean hasNext() {
return (size > 0);
}
@Override
public E next() {
E temp;
temp = head.data;
head = head.next;
size--;
return temp;
}
}
}
class Queue {
public static void main(String []args) throws Exception{
QueueLinkedList<String> queue = new QueueLinkedList<>();
queue.enqueue("10");
queue.enqueue("20");
for(String s:queue) {
System.out.println(s);
}
//System.out.println(queue.dequeue());
}
} | [
"sunandan.barman@gmail.com"
] | sunandan.barman@gmail.com |
49513491797f40589126f74a2335085a4a12742b | d3cc4a071a1f4ce34c43fab292b697b72fd4fd6c | /AI-LO2/src/lo2/search/algorithms/UniformCostSearch.java | 0da14e6c3fbf5c0d739f33716627c51633599522 | [] | no_license | Eddie-Larsson/AI18 | 424cd2cc37d9acf52c443f1859e5ce41012c4455 | 9517f730af9d6e7d5b93ea5f58df6abcc012d10d | refs/heads/master | 2021-05-01T13:08:16.268535 | 2018-02-11T13:34:23 | 2018-02-11T13:34:23 | 121,071,204 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 281 | java | package lo2.search.algorithms;
import lo2.search.framework.PriorityQueueSearch;
import lo2.search.framework.SearchBase;
public class UniformCostSearch<S, A> extends PriorityQueueSearch<S, A> {
public UniformCostSearch(SearchBase<S, A> searchImp) {
super(searchImp);
}
}
| [
"eddie@eddie.lan"
] | eddie@eddie.lan |
2e972535eaa05b8654f2940f04590d18ce3a540e | c932fb2bd015a4e67f29c37bff7c2fb2edd7df70 | /cjd-manage-service/src/main/java/com/cjd/service/impl/ItemParamServiceImpl.java | 681dd6aa3f186809a044a7eaeb80d43ee4e6786a | [] | no_license | wangjian136/cjd-parent | 730a2be137c97d94af0d47d9e71418bae143d246 | 499738073832ba843c8cdb08d7c7b2888f921c83 | refs/heads/master | 2022-12-10T03:36:27.924914 | 2020-02-05T05:54:47 | 2020-02-05T05:54:47 | 229,531,577 | 1 | 0 | null | 2022-12-06T00:43:57 | 2019-12-22T07:09:55 | CSS | UTF-8 | Java | false | false | 1,296 | java | package com.cjd.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.cjd.dao.ItemParamDao;
import com.cjd.pojo.ItemParam;
import com.cjd.service.ItemParamService;
@Service
@Transactional
public class ItemParamServiceImpl implements ItemParamService{
@Autowired
private ItemParamDao itemParamDao;
@Override
public Page<ItemParam> selAllItemParam(int page, int rows) {
page = page - 1;
Pageable pageable = PageRequest.of(page, rows);
Page<ItemParam> pages = itemParamDao.findAll(pageable);
return pages;
}
@Override
public int delItemByIds(List<String> ids) {
int index = 0;
for (String id : ids) {
itemParamDao.deleteById(Long.parseLong(id));
index++;
}
return index;
}
@Override
public ItemParam getItemParamByCatId(long catId) {
return itemParamDao.findByItemCatId(catId);
}
@Override
public int insItemParam(ItemParam itemParam) {
ItemParam i = itemParamDao.save(itemParam);
if(i != null) {
return 1;
}
return -1;
}
}
| [
"1451518614@qq.com"
] | 1451518614@qq.com |
506b068b0a9a12b003458cdac7b1d94346e3a7e1 | 34517b99d30a2aef52da844197fdd135752ec554 | /src/test/java/fxthis/components/appdata/LocalApplicationConfigPathComponentTest.java | f07a9751b43b62fb9d3e2f423f4461406d21d0e5 | [
"Apache-2.0"
] | permissive | erayerdin/fxthis | 55b7d98a064a0bf942dfdc44eef4258038f3a019 | df0e9cf3ee609d416328c244f1f128e54a1b23e0 | refs/heads/master | 2020-04-21T05:17:52.011739 | 2019-04-15T14:48:25 | 2019-04-15T14:48:25 | 169,336,245 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 882 | java | package fxthis.components.appdata;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Key;
import fxthis.GenericModule;
import fxthis.components.appdata.types.LocalConfig;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class LocalApplicationConfigPathComponentTest {
private static Injector injector;
private ApplicationDataPathComponent component;
@BeforeAll
static void setUpClass() {
injector = Guice.createInjector(new GenericModule() {});
}
@BeforeEach
void setUp() {
this.component = injector.getInstance(Key.get(ApplicationDataPathComponent.class, LocalConfig.class));
}
@Test
void isNotNull() {
assertNotNull(this.component.directory);
}
} | [
"eraygezer.94@gmail.com"
] | eraygezer.94@gmail.com |
adbdc6d78b8713694507f63080530dd33d3b3c45 | 0ea232474e1577d7108482846520f6d6609d153e | /ygz_aspen/server/src/main/java/com/ygz/aspen/service/RedisService.java | 66077e71c648993b78e3ba02c45af70d5edf319f | [] | no_license | zhangchunlang/ygz_aspen | 461195c7fc321934c3dfe3951d5c042cdb7051e2 | 3b9f034451a9a1d1b6803ef943d0eedbcfd10dfc | refs/heads/master | 2022-12-05T07:45:52.787479 | 2020-08-23T14:36:05 | 2020-08-23T14:36:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,164 | java | package com.ygz.aspen.service;
import org.springframework.data.redis.core.ZSetOperations;
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface RedisService {
/**
* 缓存一天
* 存储数据
*/
void set(String key, String value);
/**
* 定义缓存超时时间
*
* @param key
* @param value
* @param expireTime 单位秒
*/
void set(String key, String value, Long expireTime);
/**
* 永久保存
*
* @param key
* @param value
*/
void setForever(String key, String value);
/**
* 存储对象数据
*/
void setObj(String key, Object value);
/**
* 存储对象数据
*/
void setObj(String key, Object value, Long exp);
/**
* 获取数据
*/
String get(String key);
/**
* 获取对象
*
* @param key
* @param cls
* @param <T>
* @return
*/
<T> T getObj(String key, Class<T> cls);
/**
* 批量获取
*
* @param key
* @return
*/
List<String> multiGet(List<String> key);
/**
* 批量获取对象
*
* @param key
* @param cls
* @param <T>
* @return
*/
<T> List<T> multiGetObj(List<String> key, Class<T> cls);
/**
* 设置超期时间
*/
boolean expire(String key, long expire);
/**
* 删除数据
*/
void remove(String key);
/**
* 自增操作
*
* @param delta 自增步长
*/
Long increment(String key, long delta);
/**
* 自减操作
*
* @param delta 自减步长
*/
Long decrement(String key, long delta);
/**
* 扫描表
*
* @param prefix
* @return
*/
Set<String> scan(String prefix);
/**
* 获取过期时间
*
* @param key
* @return
*/
Long getExpire(String key);
/**
* 推送消息
*
* @param topic
* @param message
*/
void pushMessage(String topic, String message);
/**
* 拉取消息
*
* @param topic
* @return
*/
String popMessage(String topic);
/**
* 拉取第一个 不删除
*
* @param topic
* @return
*/
String firstMessage(String topic);
/**
* 队列长度
*
* @param topic
* @return
*/
Long listSize(String topic);
/**
* 获取集合对象数据
*
* @param key
* @param cls
* @param <T>
* @return
*/
<T> List<T> getArrayList(String key, Class<T> cls);
/**
* 向有序集合添加一个,或者更新已存在成员的分数
*
* @param key 有序集合的key
* @param score 排序分数
* @param member 集合中的唯一标识
* @return
*/
Boolean zSetAdd(String key, double score, String member);
/**
* 向有序集合添加多个成员,或者更新已存在成员的分数
*
* @param key
* @param tuples
* @return
*/
Long zSetAddList(String key, Set<ZSetOperations.TypedTuple<String>> tuples);
/**
* 对集合中的某个排序值增量incrementScore
*
* @param key 有序集合对key
* @param incrementScore 增量值
* @param member 集合中的唯一标识
* @return
*/
Double zSetIncrement(String key, double incrementScore, String member);
/**
* 获取有序队列中的某个元素的分数
*
* @param key 有序集合的key
* @param member 集合中的唯一标识
* @return
*/
Double getZSetScore(String key, String member);
/**
* 获取key对应有序集合的总数
*
* @param key
* @return
*/
Long getZsetSize(String key);
/**
* 从大到小获取第start到第end的集合中的元素 比如获取这个key的从大到小的前十名,strat为0,end为9
*
* @param key 有序集合的key
* @param start 开始元素排名
* @param end 结束元素排名
* @return
*/
Set<ZSetOperations.TypedTuple<String>> zSetReverseRangeWithScores(String key, long start, long end);
/**
* 删除zset集合中的某个元素 返回被删除元素个数
*
* @param key
* @param member
* @return
*/
Long deleteZsetMember(String key, String... member);
/**
* 查看key是否存在
*
* @param key
* @return
*/
Boolean existsKey(String key);
/**
* 批量缓存
*
* @param param
*/
void multiSet(Map<String, String> param);
/**
* 设置哈希值
*
* @param key
* @param hKey
* @param value
*/
void hSet(String key, String hKey, Object value);
/**
* 获取哈希值
*
* @param key
* @param hKey
* @return
*/
Object hGet(String key, String hKey);
/**
* 获取列表指定范围内的元素
*
* @param key
* @param start
* @param stop
* @return
*/
List<String> lRange(String key, int start, int stop);
}
| [
"l"
] | l |
3a6462b843290401b0b00421f78c119e65a35f07 | 4c908f4410c2cba63a8ce58d760474e3afe10a84 | /book/code/27/MappedChannelRead.java | c1d507ccc85a8e7b76744fced961a74c0f465d47 | [] | no_license | dhirajprakash/Java | 932dfe11f6b9e283c13aa853de9d0576ddb9b894 | daae451b0d83433415ca4ba6335da8515488a899 | refs/heads/master | 2021-05-11T14:49:26.083725 | 2019-11-23T18:42:54 | 2019-11-23T18:42:54 | 117,710,001 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,052 | java | //listing 2
// Use a mnapped file to read a text file.
import java.io.*;
import java.nio.*;
import java.nio.channels.*;
public class MappedChannelRead {
public static void main(String args[]) {
FileInputStream fIn;
FileChannel fChan;
long fSize;
MappedByteBuffer mBuf;
try {
// First, open an file for input.
fIn = new FileInputStream("test.txt");
// Next, obtain a channel to that file.
fChan = fIn.getChannel();
// Get the size of the file.
fSize = fChan.size();
// Now, map the file into a buffer.
mBuf = fChan.map(FileChannel.MapMode.READ_ONLY,0, fSize);
// Read bytes from the buffer.
for (int i = 0; i < fSize; i++)
System.out.print( (char)mBuf.get(i));
fChan.close(); // close channel
fIn.close(); // close file
} catch (IOException exc) {
System.out.println(exc);
System.exit(1);
}
}
} | [
"plamen_stilyianov@yahoo.com"
] | plamen_stilyianov@yahoo.com |
97d214b6d01c45e6f1bd401a18d340626c80c713 | 07faeaab515163f3493f86805e50f0b0d1aa258a | /src_office/com/seeyon/v3x/office/stock/domain/StockApplyInfo.java | c482baee67c55939b2161a9e44431beefc490c36 | [] | no_license | zhengxyzw/seeyon_v3x | 033563e558794eb3d3c6d14b65fc3bd985f24e03 | f2f91c1db65c93681ef504d410d517e77048deec | refs/heads/master | 2020-06-12T20:33:08.873703 | 2017-07-11T01:21:52 | 2017-07-11T01:21:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,073 | java | package com.seeyon.v3x.office.stock.domain;
/**
* 办公用品管理申请单详细信息表对象定义类
* 对应表:T_Stock_ApplyInfo
*/
import java.io.Serializable;
public class StockApplyInfo implements Serializable {
private static final long serialVersionUID = 3275718436040455883L;
private Long applyId; //申请编号
private Long stockId; //用品编号
private Integer applyCount; //申请数量
private Integer deleteFlag; //0:正常(默认);1:删除
public Integer getApplyCount() {
return applyCount;
}
public void setApplyCount(Integer applyCount) {
this.applyCount = applyCount;
}
public Long getApplyId() {
return applyId;
}
public void setApplyId(Long applyId) {
this.applyId = applyId;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Long getStockId() {
return stockId;
}
public void setStockId(Long stockId) {
this.stockId = stockId;
}
}
| [
"839428881@qq.com"
] | 839428881@qq.com |
7215d6e0568a1e59df019c089810ec7516a82057 | f3ba02108711fd20101f8ff1b95135390a3376a1 | /src/main/java/tmp/uqam/stage/metamodel/jsonserializer/Entity.java | 6c168942c7786681b00aea1d0a780d5e4fb76f59 | [] | no_license | MPoly2018/MOGA-WSI | 1fe51a43fb4cde0e6c224fc45d94113a7b1d56a9 | 9efe6476bb655fe2a8091725feeb7d4c6c30e6d7 | refs/heads/master | 2022-05-24T15:51:25.609634 | 2019-05-31T16:00:12 | 2019-05-31T16:00:12 | 189,620,349 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 320 | java | package tmp.uqam.stage.metamodel.jsonserializer;
import java.util.Collections;
import java.util.List;
public class Entity {
public Entity(String name) {
this.name = name;
this.nanoentities = Collections.singletonList(name);
}
private String name;
private List<String> nanoentities;
}
| [
"delovan99@gmail.com"
] | delovan99@gmail.com |
62bc0857c77b7074ec6579b342cca27f1ff587b5 | 524e58d4307e274ce266d6054a4c313fafd932af | /src/main/java/com/example/logparser/models/EndpointGroup.java | bbbcef4413d4bc6f93d2571acb9856bc4272fdc6 | [] | no_license | abhi2812/logparser | 30047d90b0c2b4f9f97673ed76e34ffb8882b52c | 2347d98a0baae16cb8a3e7a2568463ed98b5adbd | refs/heads/master | 2023-01-18T23:48:37.233645 | 2020-11-25T00:14:07 | 2020-11-25T00:14:07 | 315,840,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,155 | java | package com.example.logparser.models;
public class EndpointGroup {
HttpMethod method;
String url;
int minTime;
public EndpointGroup(HttpMethod method, String url, int minTime, int maxTime, int averageTime) {
this.method = method;
this.url = url;
this.minTime = minTime;
this.maxTime = maxTime;
this.averageTime = averageTime;
}
public HttpMethod getMethod() {
return method;
}
public void setMethod(HttpMethod method) {
this.method = method;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public int getMinTime() {
return minTime;
}
public void setMinTime(int minTime) {
this.minTime = minTime;
}
public int getMaxTime() {
return maxTime;
}
public void setMaxTime(int maxTime) {
this.maxTime = maxTime;
}
public int getAverageTime() {
return averageTime;
}
public void setAverageTime(int averageTime) {
this.averageTime = averageTime;
}
int maxTime;
int averageTime;
}
| [
"abhisheksaroha92@gmail.com"
] | abhisheksaroha92@gmail.com |
5c08e5ad1af580a745eb5f2accfbbcc7dc462c1a | 7e0a742b74404c8a10190fe1ef1cffa6bbdd7433 | /src/com/mybillr/db/struts/actions/BillPayeeDeleteAction.java | e1825e9b90d1d263168e51b83bad3aea377bd179 | [] | no_license | apoorvnaik/MyBillr-java | a2b3de613fb93cfb904aa155c2a32ae78c3a157a | 49ddb425c41b6c1e00fbaf281abc00ee765e7a48 | refs/heads/master | 2016-09-06T19:58:20.520237 | 2013-03-22T23:49:38 | 2013-03-22T23:49:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 921 | java | package com.mybillr.db.struts.actions;
import org.apache.struts.*;
import org.apache.struts.action.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.*;
import com.mybillr.db.dao.*;
import com.mybillr.db.dto.*;
import com.mybillr.db.factory.*;
import com.mybillr.db.struts.forms.*;
public class BillPayeeDeleteAction extends Action
{
/**
* Method 'execute'
*
* @param mapping
* @param form
* @param request
* @param response
* @throws Exception
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
{
// cast the form to the appropriate type
BillPayeeForm billPayeeForm = (BillPayeeForm) form;
billPayeeForm.reset();
billPayeeForm.setCrudMethod( "delete" );
return mapping.findForward( "success" );
}
}
| [
"naik.apoorv@gmail.com"
] | naik.apoorv@gmail.com |
58edab1ad16629bcaa65138533c352d11e9ebd8d | e6b25ac8fd5c02cae0df57b6131a0a544ed33d53 | /src/main/java/server/controller/network/msg/MoveMsgHandler.java | 51304bf75383dfd44821056228459e68c87eae86 | [] | no_license | felixriehm/snake-opengl-multiplayer | 07fbcfe1920f3527410b9e8fe1821a66acb5d2fa | 601791966e502bee2ab2209ef5b07fe5f80bd730 | refs/heads/master | 2023-03-31T22:29:16.868184 | 2021-03-28T12:58:17 | 2021-03-28T12:58:17 | 308,283,074 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 939 | java | package server.controller.network.msg;
import common.network.MoveMsg;
import server.Server;
import server.model.game.entity.Player;
import java.io.ObjectOutputStream;
import java.util.concurrent.locks.Lock;
public class MoveMsgHandler implements Runnable {
private final ObjectOutputStream dos;
private final MoveMsg msg;
private final Server server;
private final Lock moveLock;
public MoveMsgHandler(MoveMsg msg, ObjectOutputStream dos, Server server, Lock moveLock){
this.dos = dos;
this.msg = msg;
this.server = server;
this.moveLock = moveLock;
}
@Override
public void run() {
moveLock.lock();
Player player = server.getGame().getPlayers().get(msg.getSender());
// if player has not lost and is not removed
if(player != null) {
player.setNextDirection(msg.getDirection());
}
moveLock.unlock();
}
}
| [
"mail@felixriehm.de"
] | mail@felixriehm.de |
b0b80ef242b29e4866f81130a05274a4d3c6305d | 26a18887529f04baeb34a841a031cd1a41999520 | /src/main/java/com/ireslab/electraapp/util/Constants.java | 383e11fee9e2642d6636de7236742a1f732e37e2 | [] | no_license | abhinav-ireslab/Electra_App | d3a3e3d05aca6e57eb058952901e6d3585015ad8 | 2b8427ba42c4879e61cf99726f21189f9fc91689 | refs/heads/master | 2020-04-13T14:38:59.063029 | 2019-01-04T10:14:33 | 2019-01-04T10:14:33 | 163,268,554 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 568 | java | package com.ireslab.electraapp.util;
/**
* @author Nitin
*
*/
public interface Constants {
public String STELLAR_CONFIG_FILE = "classpath:stellar_config.properties";
public String ELECTRA_API_CONFIG_FILE = "classpath:electra_api_config.properties";
public Integer ACTIVATION_CODE = 654321;
public Integer ACTIVATION_CODE_LENGTH = 6;
public String VERIFICATION_TYPE_SIGNUP = "Signup";
public String US_COUNTRY_DIAL_CODE = "+1";
public Integer UNIQUE_CODE_LENGTH = 5;
public String ZERO_BALANCE = "0.0000000";
public String PENDING = "PENDING";
}
| [
"kartik.kalra@ireslab.com"
] | kartik.kalra@ireslab.com |
9bd4850305ea33b37cdee0632b02512cd5b3a68b | ac1cd95653f54abbc41a3373bc08cccca887ea6e | /1.16.4-vortex/minecraft/src/main/java/net/minecraft/client/gui/screen/inventory/AnvilScreen.java | e690aa16cb116863eec5f1fd46562ff895be2512 | [] | no_license | DragonflyClient/dragonfly-injection-client | 1e3dccfefd0e9332cfeb6138224fff48d2d2d6a1 | 701fb3604972dc716a0197a4cf9d3e6bfbc09b94 | refs/heads/main | 2023-03-13T01:09:20.813860 | 2021-01-11T21:37:12 | 2021-01-11T21:37:12 | 320,880,114 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,886 | java | package net.minecraft.client.gui.screen.inventory;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.RepairContainer;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.CRenameItemPacket;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class AnvilScreen extends AbstractRepairScreen<RepairContainer> {
private static final ResourceLocation ANVIL_RESOURCE = new ResourceLocation("textures/gui/container/anvil.png");
private static final ITextComponent field_243333_B = new TranslationTextComponent("container.repair.expensive");
private TextFieldWidget nameField;
public AnvilScreen(RepairContainer container, PlayerInventory playerInventory, ITextComponent title) {
super(container, playerInventory, title, ANVIL_RESOURCE);
this.titleX = 60;
}
public void tick() {
super.tick();
this.nameField.tick();
}
protected void initFields() {
this.minecraft.keyboardListener.enableRepeatEvents(true);
int i = (this.width - this.xSize) / 2;
int j = (this.height - this.ySize) / 2;
this.nameField = new TextFieldWidget(this.font, i + 62, j + 24, 103, 12, new TranslationTextComponent("container.repair"));
this.nameField.setCanLoseFocus(false);
this.nameField.setTextColor(-1);
this.nameField.setDisabledTextColour(-1);
this.nameField.setEnableBackgroundDrawing(false);
this.nameField.setMaxStringLength(35);
this.nameField.setResponder(this::renameItem);
this.children.add(this.nameField);
this.setFocusedDefault(this.nameField);
}
public void resize(Minecraft minecraft, int width, int height) {
String s = this.nameField.getText();
this.init(minecraft, width, height);
this.nameField.setText(s);
}
public void onClose() {
super.onClose();
this.minecraft.keyboardListener.enableRepeatEvents(false);
}
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
if (keyCode == 256) {
this.minecraft.player.closeScreen();
}
return !this.nameField.keyPressed(keyCode, scanCode, modifiers) && !this.nameField.canWrite() ? super.keyPressed(keyCode, scanCode, modifiers) : true;
}
private void renameItem(String name) {
if (!name.isEmpty()) {
String s = name;
Slot slot = this.container.getSlot(0);
if (slot != null && slot.getHasStack() && !slot.getStack().hasDisplayName() && name.equals(slot.getStack().getDisplayName().getString())) {
s = "";
}
this.container.updateItemName(s);
this.minecraft.player.connection.sendPacket(new CRenameItemPacket(s));
}
}
protected void drawGuiContainerForegroundLayer(MatrixStack matrixStack, int x, int y) {
RenderSystem.disableBlend();
super.drawGuiContainerForegroundLayer(matrixStack, x, y);
int i = this.container.getMaximumCost();
if (i > 0) {
int j = 8453920;
ITextComponent itextcomponent;
if (i >= 40 && !this.minecraft.player.abilities.isCreativeMode) {
itextcomponent = field_243333_B;
j = 16736352;
} else if (!this.container.getSlot(2).getHasStack()) {
itextcomponent = null;
} else {
itextcomponent = new TranslationTextComponent("container.repair.cost", i);
if (!this.container.getSlot(2).canTakeStack(this.playerInventory.player)) {
j = 16736352;
}
}
if (itextcomponent != null) {
int k = this.xSize - 8 - this.font.getStringPropertyWidth(itextcomponent) - 2;
int l = 69;
fill(matrixStack, k - 2, 67, this.xSize - 8, 79, 1325400064);
this.font.func_243246_a(matrixStack, itextcomponent, (float)k, 69.0F, j);
}
}
}
public void renderNameField(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
this.nameField.render(matrixStack, mouseX, mouseY, partialTicks);
}
public void sendSlotContents(Container containerToSend, int slotInd, ItemStack stack) {
if (slotInd == 0) {
this.nameField.setText(stack.isEmpty() ? "" : stack.getDisplayName().getString());
this.nameField.setEnabled(!stack.isEmpty());
this.setListener(this.nameField);
}
}
}
| [
"theincxption@gmail.com"
] | theincxption@gmail.com |
95fabe4b4ebbe86d86637d73a40a5e53717b5194 | 11c8595e66cd86e3c5a795d15b63adbb579e3751 | /ViewPagerSample/app/src/main/java/com/malinkang/viewpager/Adapter/InnerAdapter.java | 21c942a21112ffdd38a0c05f79f16f4a4baeba9e | [] | no_license | YedrGitHub/AndroidSample | da7dc14f99446e5d9224ad203e502c3e87f2815c | 25cf08968b37bc02f422005c55200b3cbb5e604d | refs/heads/master | 2021-01-18T17:51:13.699011 | 2016-06-14T07:12:52 | 2016-06-14T07:12:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 655 | java | package com.malinkang.viewpager.Adapter;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import com.malinkang.viewpager.Fragment.TestFragment;
/**
* Created by malinkang on 14/11/2.
*/
public class InnerAdapter extends FragmentPagerAdapter{
private String letter;
public InnerAdapter(FragmentManager fm,String letter) {
super(fm);
this.letter=letter;
}
@Override
public Fragment getItem(int i) {
return TestFragment.newInstance(letter);
}
@Override
public int getCount() {
return 5;
}
}
| [
"malinkang@malinkang.com"
] | malinkang@malinkang.com |
c7c09a6f6138017315d91bdcef897607a85c9898 | 5e12f34851fe88fdc1ed3069744c5d7480b54727 | /app/src/main/java/com/pb/app/fixchat/ui/adapters/AdapterUserServer.java | dbec96358ab6bbe95021b3600cee21aca83deda7 | [
"Apache-2.0"
] | permissive | paulbrown6/FixChat | 0f848771ef222fae62bf72fba7712c7d48885622 | bdc301894eced7bacca8e5454d787849eb2b4367 | refs/heads/main | 2023-04-04T16:07:41.492522 | 2021-04-21T22:02:38 | 2021-04-21T22:02:38 | 309,193,025 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,419 | java | package com.pb.app.fixchat.ui.adapters;
import android.app.Activity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.RecyclerView;
import com.kyleduo.switchbutton.SwitchButton;
import com.pb.app.fixchat.R;
import com.pb.app.fixchat.api.ApiCall;
import com.pb.app.fixchat.api.entity.Server;
import com.pb.app.fixchat.ui.HomeActivity;
import com.pb.app.fixchat.ui.fragments.dialogs.DialogServerForce;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class AdapterUserServer extends RecyclerView.Adapter<AdapterUserServer.ViewHolder> {
private ArrayList<Server> contents;
private Activity activity;
private LifecycleOwner owner;
public AdapterUserServer(ArrayList<Server> contents, Activity activity) {
this.contents = contents;
this.activity = activity;
owner = HomeActivity.getOwner();
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_user_server, parent, false);
return new ViewHolder(v);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
final Server server = contents.get(position);
String serverName = server.getName();
String serverName2 = server.getOut_addr().isEmpty()?server.getOut_addr():"null";
String power = server.getState();
String network = server.getNetwork();
holder.name.setText(serverName);
holder.port.setText(serverName2);
holder.power.setChecked(power.equals(Server.STATE_RUNNING));
holder.network.setChecked(network.equals(Server.NETWORK_RUNNING));
holder.power.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
CompoundButton button = (CompoundButton) view;
button.toggle();
Log.d("SERVER_POWER", "Click " + button.isPressed());
button.setVisibility(View.INVISIBLE);
if (button.isChecked()) {
DialogServerForce.getInstance().createAlertDialog(activity, server, button);
} else {
ApiCall.getInstance().controlServer(server.getId(), Server.START_POWER, button);
}
}
});
holder.network.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
CompoundButton button = (CompoundButton) view;
button.toggle();
Log.d("SERVER_NETWORK", "Click " + button.isPressed());
button.setVisibility(View.INVISIBLE);
if (button.isChecked()) {
ApiCall.getInstance().controlServer(server.getId(), Server.STOP_NETWORK, button);
} else {
ApiCall.getInstance().controlServer(server.getId(), Server.START_NETWORK, button);
}
}
});
}
@Override
public int getItemCount() {
if (contents == null)
return 0;
return contents.size();
}
public void setItems(List<Server> prod) {
contents.clear();
contents.addAll(prod);
notifyDataSetChanged();
}
class ViewHolder extends RecyclerView.ViewHolder {
TextView name;
TextView port;
SwitchButton power;
SwitchButton network;
ProgressBar progressPower;
ProgressBar progressNetwork;
public ViewHolder(View itemView) {
super(itemView);
name = itemView.findViewById(R.id.user_name_server);
port = itemView.findViewById(R.id.user_name_host);
power = itemView.findViewById(R.id.user_switch_power);
network = itemView.findViewById(R.id.user_switch_web);
progressPower = itemView.findViewById(R.id.user_progress_power);
progressNetwork = itemView.findViewById(R.id.user_progress_web);
}
}
}
| [
"paulbrown6@mail.ru"
] | paulbrown6@mail.ru |
b693546eca3de6e5264cd41f61766a319f5cd43f | fc6a89ec7f964b14b80e633326404068f45fef71 | /src/main/java/hello/jin/repository/JpaMemberRepository.java | 4cccd285bd3e27c354ac4fe4d3859a55fd2925ba | [] | no_license | devjjinii/sb | ff9c92ca341e95395154719f4172374409670b73 | 3076e30be8e9130893da6c670b404f00a76bfa85 | refs/heads/master | 2022-12-13T01:33:08.610950 | 2020-09-07T09:04:31 | 2020-09-07T09:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,117 | java | package hello.jin.repository;
import hello.jin.domain.Member;
import javax.persistence.EntityManager;
import java.util.List;
import java.util.Optional;
public class JpaMemberRepository implements MemberRepository{
private final EntityManager em;
public JpaMemberRepository(EntityManager em) {
this.em = em;
}
@Override
public Member save(Member member) {
em.persist(member);
return member;
}
@Override
public Optional<Member> findById(Long id) {
Member member = em.find(Member.class, id);
return Optional.ofNullable(member);
}
@Override
public Optional<Member> findByName(String name) {
List<Member> result = em.createQuery("select m from Member m where m.name = :name", Member.class
)
.setParameter("name", name)
.getResultList();
return result.stream().findAny();
}
@Override
public List<Member> findAll() {
List<Member> result = em.createQuery("select m from Member m",Member.class)
.getResultList();
return result;
}
}
| [
"devjjinii@naver.com"
] | devjjinii@naver.com |
c3a119511aa49b1c1705861346d95ab10753bd7f | 7b56fce7259199411b52a6057dc30c45a2e1c460 | /src/com/cagf/tool/util/FileUtils.java | a9fdc4984db740ddfcd100af50f5634bce217965 | [] | no_license | enjprocess/carmgr-cagf | fc5e3ce44e555363be41ca831a5109ab993e6647 | 2c38845e0a9e8c1759df12906a89c8fd1f0ac4ce | refs/heads/master | 2020-03-22T17:21:41.403930 | 2018-07-11T07:58:14 | 2018-07-11T07:58:14 | 140,390,785 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 21,918 | java | package com.cagf.tool.util;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import javax.persistence.Id;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FileUtils {
//用于存放property type,之后一些model用得到
public static Map<String, String> ordinaryPropertyMap = new HashMap<>();
//静态map,维护这hibernate与java类型的映射
public static Map<String,String> hibernate2JavaMap = new HashMap<>();
//用于存放many-to-one的属性,在一些构造器或方法中需要用到
public static Map<String, String> manyToOnePropertyMap = new HashMap<>();
static {
hibernate2JavaMap.put("integer","java.lang.Integer");
hibernate2JavaMap.put("long","java.lang.Long");
hibernate2JavaMap.put("short","java.lang.Short");
hibernate2JavaMap.put("float","java.lang.Float");
hibernate2JavaMap.put("double","java.lang.Double");
hibernate2JavaMap.put("big_decimal","java.math.BigDecimal");
hibernate2JavaMap.put("character","java.lang.String");
hibernate2JavaMap.put("string","java.lang.String");
hibernate2JavaMap.put("byte","java.lang.Byte");
hibernate2JavaMap.put("boolean", "java.lang.Boolean");
hibernate2JavaMap.put("date", "java.util.Date");
hibernate2JavaMap.put("time", "java.util.Date");
//flag:在form实体中,我怎么确定,这个Date是要Date还是datetime ,也就是要不要JsonFormat
//貌似该系统form接受的都是Data,都要加上JsonFormat,如果后续存在问题,那么进行完善
}
private static StringBuilder importPart;
//参数:字符串
//返回:首字母小写的字符串
public static String getLowerClassName(String className) {
String lowerLetter = className.substring(0, 1).toLowerCase();
return lowerLetter + className.substring(1);
}
//参数:字符串
//返回:首字母大写的字符串
public static String getUpperName(String str) {
String upperLetter = str.substring(0, 1).toUpperCase();
return upperLetter + str.substring(1);
}
//参数:类的全限定名
//返回:基础包名
//例子:
// 参数:cn.com.workapp.carmgr.domain.model.handovercar.RepaymentPlanDet
// 返回:cn.com.workapp.carmgr
public static String getBasicPackageName(String fullClassName) {
int nextPos = fullClassName.lastIndexOf(".");
nextPos = fullClassName.lastIndexOf(".", nextPos - 1);
nextPos = fullClassName.lastIndexOf(".", nextPos - 1);
nextPos = fullClassName.lastIndexOf(".", nextPos - 1);
return fullClassName.substring(0, nextPos);
}
//参数:包的名字
//返回:包的路径
public static String getClassPackagePath(String packageName) {
return packageName.replace(".", "/");
}
//参数:类的全限定名
//返回:该类的包名
//列子:cn.com.workapp.carmgr.domain.model.handovercar.xxx
public static String getClassPackageName(String fullClassName) {
int proDotPos = fullClassName.lastIndexOf(".");
return fullClassName.substring(0, proDotPos);
}
//参数:类的全限定名
//返回:类的小名
public static String getClassName(String fullClassName) {
return fullClassName.substring(fullClassName.lastIndexOf(".") + 1);
}
//参数:hmb文件内容字符串
//返回:类的权限定名
public static String getClassFullName(String hbmContent) {
int namePos = hbmContent.indexOf("name");
int startQuotePos = hbmContent.indexOf("\"", namePos);
int endQuotePos = hbmContent.indexOf("\"", startQuotePos + 1);
return hbmContent.substring(startQuotePos + 1, endQuotePos);
}
//参数:文件完整路径
//返回:文件字符串内容
public static String getFileData(String filePath) throws IOException {
File template = new File(filePath);
FileReader fileReader = new FileReader(template);
char[] content = new char[(int)template.length()];
fileReader.read(content);
return String.valueOf(content);
}
//参数:类的全限定名
//返回:模块名称
public static String getModuleName(String classFullName) {
int endPos = classFullName.lastIndexOf(".");
int startPos = classFullName.lastIndexOf(".", endPos - 1);
return classFullName.substring(startPos + 1, endPos);
}
//参数:hbm文件路径
//返回:动态property
public static String getPropertyOfServiceImpl(String filePath) throws JDOMException, IOException {
File file = new File(filePath);
SAXBuilder saxBuilder = new SAXBuilder();
saxBuilder.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
Document doc = saxBuilder.build(file);
Element root = doc.getRootElement();
//获取propertyList
Element classEle = root.getChild("class");
List<Element> children = classEle.getChildren("property");
List<Element> manyToOne = classEle.getChildren("many-to-one");
StringBuilder propertyPart = new StringBuilder();
importPart = new StringBuilder();
for (Element child : children) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("type");
//获得java类型
type = hibernate2JavaMap.get(type);
//如果有BigDecimal类型那么要加入到importPart中
if (type.endsWith("BigDecimal")) importPart.append("import ").append(type).append(";\n");
//获得简写类型
type = getShortType(type);
//貌似不需要存储
ordinaryPropertyMap.put(name, type);
}
for (Element child : manyToOne) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("class");
//如果与当前类是同包下可以省略import,这里就不处理
importPart.append("import ").append(type).append(";\n");
String repository = getRepositoryByORM(type);
importPart.append("import ").append(repository).append(";\n");
//获得简写类型
type = getShortType(type);
//保存many-to-one的Type与name,后续会用到
manyToOnePropertyMap.put(name, type);
propertyPart
.append("\t").append("@Autowired").append("\n")
.append("\t").append("private ").append(type).append("Repository").append(" ").append(getLowerClassName(type)).append("Repository").append(";\n\n");
}
return propertyPart.toString();
}
public static String getProperty(String filePath) throws JDOMException, IOException {
File file = new File(filePath);
SAXBuilder saxBuilder = new SAXBuilder();
saxBuilder.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
Document doc = saxBuilder.build(file);
Element root = doc.getRootElement();
//获取propertyList
Element classEle = root.getChild("class");
List<Element> children = classEle.getChildren("property");
List<Element> manyToOne = classEle.getChildren("many-to-one");
StringBuilder propertyPart = new StringBuilder();
importPart = new StringBuilder();
for (Element child : children) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("type");
String notNull = "";
String length = "";
if ("true".equalsIgnoreCase(child.getAttributeValue("not-null"))) {
notNull = ",nullable = false";
}
if (child.getAttributeValue("length") != null) {
length = ", length = " + child.getAttributeValue("length");
}
//获得java类型
type = hibernate2JavaMap.get(type);
//如果有BigDecimal类型那么要加入到importPart中
if (type.endsWith("BigDecimal")) importPart.append("import ").append(type).append(";\n");
//获得简写类型
type = getShortType(type);
//貌似不需要存储
ordinaryPropertyMap.put(name, type);
propertyPart.append("\t@Column(name = \"").append(column).append("\"").append(notNull).append(length).append(")\n")
.append("\t").append("private ").append(type).append(" ").append(name).append(";\n\n");
}
for (Element child : manyToOne) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("class");
//如果与当前类是同包下可以省略import,这里就不处理
importPart.append("import ").append(type).append(";\n");
//获得简写类型
type = getShortType(type);
//保存many-to-one的Type与name,后续会用到
manyToOnePropertyMap.put(name, type);
propertyPart.append("\t@JoinColumn(name = \"").append(column).append("\")\n")
.append("\t").append("@ManyToOne").append("\n")
.append("\t").append("private ").append(type).append(" ").append(name).append(";\n\n");
}
return propertyPart.toString();
}
private static String getRepositoryByORM(String type) {
return getBasicPackageName(type) + ".persistence.jpa." + getModuleName(type) + "." + getShortType(type) + "Repository";
}
//参数:类的全限定名
//返回:类的简写
public static String getShortType(String type) {
return getClassName(type);
}
public static String getImportType() {
return importPart.toString();
}
//参数:类的简名
//返回:类的默认构造器
public static String getDefaultConstructor(String className) {
StringBuilder sb = new StringBuilder();
sb.append("\t").append("public ").append(className).append("()").append(" {")
.append("\n\t").append("}");
return sb.toString();
}
//参数:
//返回:类的getter和setter方法
public static String getGetterAndSetter() {
StringBuilder ret = new StringBuilder();
ordinaryPropertyMap.forEach((name, type)-> {
createSetAndGetMethod(ret, type, name);
});
//many-to-one的setter and getter方法
manyToOnePropertyMap.forEach((name, type) -> {
createSetAndGetMethod(ret, type, name);
});
return ret.toString();
}
//参数:
//返回:类的getter和setter方法
public static String getGetterAndSetterOfForm() {
StringBuilder ret = new StringBuilder();
ordinaryPropertyMap.forEach((name, type)-> {
createSetAndGetMethod(ret, type, name);
});
//many-to-one的setter and getter方法
manyToOnePropertyMap.forEach((name, type) -> {
createSetAndGetMethod(ret, Constant.Long, name + Constant.ID);
});
return ret.toString();
}
private static void createSetAndGetMethod(StringBuilder ret, String type, String name) {
StringBuilder getter = new StringBuilder();
getter.append("\n\t").append("public ").append(type).append(" get").append(getUpperName(name)).append("() {")
.append("\n\t\t").append("return ").append(name).append(";").append("\n\t").append("}");
StringBuilder setter = new StringBuilder();
setter.append("\n\t").append("public ").append("void").append(" set").append(getUpperName(name)).append("(")
.append(type).append(" ").append(name).append(") {").append("\n\t\t").append("this.").append(name).append(" = ")
.append(name).append(";").append("\n\t").append("}");
ret.append(getter).append(setter);
}
//参数:类名 form简名
//返回:属性赋值表达式
public static String getHaveFormArgsConstructor(String className,String formName) {
//首先我要拼出一个form字符串,然后是many-to-one的形参
StringBuilder ret = new StringBuilder();
ret.append("\t").append("public ").append(className).append("(").append(formName).append(" ").append("form");
spellDynamicArgsPart(ret);
return ret.toString();
}
//功能:拼写 方法动态参数,及为类属性赋值
private static void spellDynamicArgsPart(StringBuilder ret) {
//拼写many-to-one动态参数部分
manyToOnePropertyMap.forEach((name, type)-> {
ret.append(", ").append(type).append(" ").append(name);
});
ret.append(")").append(" {");
//将form中的内容都赋值到当前的属性中
ordinaryPropertyMap.forEach((name, type) -> {
ret.append("\n\t\t").append("this.").append(name).append(" = ").append("form").append(".")
.append("get").append(getUpperName(name)).append("();");
});
//将多对一字段赋值到当前类中
manyToOnePropertyMap.forEach((name, type) -> {
ret.append("\n\t\t").append("this.").append(name).append(" = ").append(name).append(";");
});
//封闭方法
ret.append("\n\t}");
}
//参数:form简名
//返回:orm中的update方法
public static String getUpdateMethod(String formName) {
StringBuilder ret = new StringBuilder();
ret.append("\t").append("public ").append("void ").append("update(").append(formName).append(" ").append("form");
spellDynamicArgsPart(ret);
return ret.toString();
}
//参数:hbm内容字符串
//返回:table名字
public static String getTableName(String hbmContent) {
int namePos = hbmContent.indexOf("table");
int startQuotePos = hbmContent.indexOf("\"", namePos);
int endQuotePos = hbmContent.indexOf("\"", startQuotePos + 1);
return hbmContent.substring(startQuotePos + 1, endQuotePos);
}
public static String getPropertyOfForm(String filePath) throws JDOMException, IOException {
File file = new File(filePath);
SAXBuilder saxBuilder = new SAXBuilder();
saxBuilder.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
Document doc = saxBuilder.build(file);
Element root = doc.getRootElement();
//获取propertyList
Element classEle = root.getChild("class");
List<Element> children = classEle.getChildren("property");
List<Element> manyToOne = classEle.getChildren("many-to-one");
StringBuilder propertyPart = new StringBuilder();
importPart = new StringBuilder();
for (Element child : children) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("type");
//获得java类型
type = hibernate2JavaMap.get(type);
//如果有BigDecimal类型那么要加入到importPart中
if (type.endsWith(Constant.BIGDECIMAL)) importPart.append("import ").append(type).append(";\n");
//获得简写类型
type = getShortType(type);
//貌似不需要存储
ordinaryPropertyMap.put(name, type);
//如果有日期类型的话,那么要加上注解
if (type.equalsIgnoreCase(Constant.DATE)) {
propertyPart.append("\t").append("@JsonFormat(pattern = \"yyyy-MM-dd\")\n");
}
propertyPart.append("\t").append("private ").append(type).append(" ").append(name).append(";\n\n");
}
for (Element child : manyToOne) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("class");
//如果与当前类是同包下可以省略import,这里就不处理
//importPart.append("import ").append(type).append(";\n");
//获得简写类型
type = getShortType(type);
//保存many-to-one的Type与name,后续会用到
manyToOnePropertyMap.put(name, type);
propertyPart.append("\t").append("private ").append(Constant.Long).append(" ").append(name).append(Constant.ID).append(";\n\n");
}
return propertyPart.toString();
}
//参数:hbm文件内容
//返回:属性字符串
public static String getPropertyOfData(String filePath) throws JDOMException, IOException {
File file = new File(filePath);
SAXBuilder saxBuilder = new SAXBuilder();
saxBuilder.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
Document doc = saxBuilder.build(file);
Element root = doc.getRootElement();
//获取propertyList
Element classEle = root.getChild("class");
List<Element> children = classEle.getChildren("property");
List<Element> manyToOne = classEle.getChildren("many-to-one");
StringBuilder propertyPart = new StringBuilder();
importPart = new StringBuilder();
for (Element child : children) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("type");
//获得java类型
type = hibernate2JavaMap.get(type);
//如果有BigDecimal类型那么要加入到importPart中
if (type.endsWith("BigDecimal")) importPart.append("import ").append(type).append(";\n");
//获得简写类型
type = getShortType(type);
//貌似不需要存储
// System.out.println("=====================调试=======================");
// System.out.println("type: " + type + ", name:" + name);
ordinaryPropertyMap.put(name, type);
//如果有日期类型的话,那么要加上注解
if (type.equalsIgnoreCase(Constant.DATE)) {
propertyPart.append("\t").append("@JsonFormat(pattern = \"yyyy-MM-dd\",timezone=\"GMT+8\")\n");
importPart.append("import ").append("com.fasterxml.jackson.annotation.JsonFormat;\n");
}
propertyPart.append("\t").append("private ").append(type).append(" ").append(name).append(";\n\n");
}
for (Element child : manyToOne) {
String name = child.getAttributeValue("name");
String column = child.getAttributeValue("column");
String type = child.getAttributeValue("class");
//如果与当前类是同包下可以省略import,这里就不处理
importPart.append("import ").append(type).append(";\n");
//获得简写类型
type = getShortType(type);
//保存many-to-one的Type与name,后续会用到
manyToOnePropertyMap.put(name, type);
propertyPart.append("\t").append("private ").append(type).append(" ").append(name).append(";\n\n");
}
return propertyPart.toString();
}
public static String getPropertyAssign(String className) {
//迭代orimap与manyto map
//将form中的内容都赋值到当前的属性中
StringBuilder ret = new StringBuilder();
ordinaryPropertyMap.forEach((name, type) -> {
// System.out.println("type :" + type + ", name :" + name);
ret.append("\n\t\t").append("this.").append(name).append(" = ").append(getLowerClassName(className)).append(".")
.append("get").append(getUpperName(name)).append("();");
});
//将多对一字段赋值到当前类中
manyToOnePropertyMap.forEach((name, type) -> {
ret.append("\n\t\t").append("this.").append(name).append(" = ").append(getLowerClassName(className)).append(".").append("get").append(getUpperName(name)).append("()").append(";");
});
return ret.toString();
}
//获得service动态方法
public static String getManyToOneServiceMethod(String className) {
//根据manyMap来决定这一组方法的数量
//List<@CLASS_NAME@Data> find@CLASS_NAME@ListBy@MANY_TYPE@Id(long @MANY_TYPE@Id);
//PageData<@CLASS_NAME@Data> find@CLASS_NAME@PageBy@MANY_TYPE@Id(long @MANY_TYPE@Id, Pageable pageable);
StringBuilder serviceMethod = new StringBuilder();
manyToOnePropertyMap.forEach((name, type) -> {
serviceMethod.append("\tList<").append(className).append("Data>")
.append(" find").append(className).append("ListBy").append(type).append("Id")
.append("(").append("long").append(" ").append(getLowerClassName(type)).append("Id").append(");\n");
serviceMethod.append("\n\tPageData<").append(className).append("Data>").append(" ").append("find").append(className)
.append("PageBy").append(type).append("Id").append("(long ").append(getLowerClassName(type)).append("Id, Pageable pageable);\n");
});
return serviceMethod.toString();
}
}
| [
"pr0metheus@foxmail.com"
] | pr0metheus@foxmail.com |
69da0872cec6703227732fb02f608444fce8a0cf | 935c61aebdf27e528d8ca8936b21e866c379c763 | /src/main/java/me/itzg/helpers/curseforge/model/CurseForgeFile.java | c466921e631b3607abb7dd185943837923ae9f8b | [
"MIT"
] | permissive | itzg/mc-image-helper | 581be6d590b3af7dcaa30b7f53e145f86412b0c8 | 3994d557c4e85efa9a96f41577159f8d65a17e53 | refs/heads/master | 2023-08-31T19:40:47.791601 | 2023-08-29T16:22:29 | 2023-08-29T16:22:29 | 404,894,256 | 37 | 20 | MIT | 2023-09-09T03:38:34 | 2021-09-09T23:09:45 | Java | UTF-8 | Java | false | false | 961 | java | package me.itzg.helpers.curseforge.model;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.time.Instant;
import java.util.List;
import lombok.Data;
@Data
@JsonTypeName("File")
public class CurseForgeFile {
private int gameId;
private boolean isAvailable;
private String fileName;
private List<String> gameVersions;
private String displayName;
private List<SortableGameVersion> sortableGameVersions;
private String downloadUrl;
private Instant fileDate;
private Boolean exposeAsAlternative;
private int modId;
private List<FileModule> modules;
private List<FileDependency> dependencies;
private long fileFingerprint;
private FileStatus fileStatus;
private boolean isServerPack;
private FileReleaseType releaseType;
private List<FileHash> hashes;
private Integer parentProjectFileId;
private Integer alternateFileId;
private int id;
private long fileLength;
private long downloadCount;
private Integer serverPackFileId;
} | [
"noreply@github.com"
] | noreply@github.com |
821d5b271fa46db1cecab1c14d7609a85970547f | 92f5a97e55561a680a307d1845233967e3d7f370 | /supensour-reactor/src/main/java/com/supensour/reactor/context/handler/ReactorContextAutoConfiguration.java | ccc19f169cd641c193ddca6e5adce3914bcac78e | [
"Apache-2.0"
] | permissive | supensour/supensour | 7b9e31340ae782557e9585b8ef06c3075bf5de6a | dc2d23750c1482ea7b3330bbd055abb38d60eab0 | refs/heads/master | 2023-05-08T08:51:27.034047 | 2021-05-10T07:39:45 | 2021-05-10T07:39:45 | 304,039,831 | 0 | 1 | Apache-2.0 | 2021-05-10T12:22:32 | 2020-10-14T14:24:54 | Java | UTF-8 | Java | false | false | 2,289 | java | package com.supensour.reactor.context.handler;
import com.supensour.model.annotation.Experimental;
import com.supensour.reactor.context.ReactorContextConfiguration;
import com.supensour.reactor.context.ReactorContextHelper;
import com.supensour.reactor.context.ReactorContextSetting;
import com.supensour.reactor.context.ReactorContextSettingRegistry;
import lombok.Setter;
import org.reactivestreams.Publisher;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import reactor.core.CoreSubscriber;
import reactor.core.Scannable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Hooks;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Operators;
import java.util.List;
/**
* @author Suprayan Yapura
* @since 0.1.0
*/
@Experimental
@Configuration
@ConditionalOnClass({ Mono.class, Flux.class, Publisher.class})
public class ReactorContextAutoConfiguration implements ApplicationContextAware, InitializingBean, DisposableBean {
@Setter
private ApplicationContext applicationContext;
@Override
public void afterPropertiesSet() {
Hooks.onEachOperator(ReactorContextSubscriber.LIFTER_KEY, Operators.lift(this::lifter));
}
@Bean
public ReactorContextHelper reactorContextHelper() {
return new ReactorContextHelperImpl(getReactorContextSettings());
}
private List<ReactorContextSetting<Object>> getReactorContextSettings() {
var registry = ReactorContextSettingRegistry.create();
applicationContext.getBeansOfType(ReactorContextConfiguration.class)
.forEach((key, config) -> config.registerContextSetting(registry));
return registry.collect();
}
private <T>CoreSubscriber<T> lifter(Scannable scannable, CoreSubscriber<T> subscriber) {
return new ReactorContextSubscriber<>(subscriber, reactorContextHelper());
}
@Override
public void destroy() {
Hooks.resetOnEachOperator(ReactorContextSubscriber.LIFTER_KEY);
}
}
| [
"SuprayanY@yahoo.com"
] | SuprayanY@yahoo.com |
a248b9f2929da70fa00f8271e9644ac3eb179804 | f51bdb2e1d41d944d4843798becbc06ba93a2064 | /ssmshop/src/main/java/com/mzdx/service/role/RoleServiceImpl.java | 880f12b7725990491f65f65a4b18279ba00d1b9a | [] | no_license | xiaoyuganxh/ssm_shop | 87bcdc63dc1bc4b8a93c43cfad1a3910429c98e1 | d60424784e2c12ca870361c6b5bda68269bec4f5 | refs/heads/master | 2023-06-14T19:34:03.201092 | 2021-07-07T09:00:49 | 2021-07-07T09:00:51 | 383,734,769 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 702 | java | package com.mzdx.service.role;
import com.mzdx.mapper.BaseDao;
import com.mzdx.mapper.role.RoleDao;
import com.mzdx.mapper.role.RoleDaoImpl;
import com.mzdx.mapper.role.RoleMapper;
import com.mzdx.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.Connection;
import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
@Autowired
private RoleMapper roleMapper;
@Override
public List<Role> getRoleList() {
// TODO Auto-generated method stub
List<Role> roleList = null;
roleList = roleMapper.getRoleList();
return roleList;
}
}
| [
"xiaoyuganxh@163.com"
] | xiaoyuganxh@163.com |
05fe8c6f5676a95783b80629d6b9b76d296f5327 | 13d54900e8115bd3fb4e80dae1f6a395a7d6993f | /01Generics/src/qa/generics/toyshop/QAShop.java | 403826e6c3d91eab0613945dbfb11eea61d9628d | [] | no_license | njbhorn/AEITJVATBL4_90 | 12479274101b016bc7f4943cc71a99f5fa30c856 | 05eb6742acb9cc47a53f7277541965a4f12accf9 | refs/heads/master | 2022-12-02T09:21:43.447964 | 2019-11-01T12:23:52 | 2019-11-01T12:23:52 | 170,653,762 | 0 | 0 | null | 2022-11-24T09:59:53 | 2019-02-14T08:17:45 | Java | UTF-8 | Java | false | false | 3,047 | java | package qa.generics.toyshop;
import qa.generics.Department;
import qa.generics.Section;
public class QAShop {
public static void main(String[] args) {
Department<ShopItem> shop = new Department<ShopItem>("Shop");
Department<Toy> toyDepartment = new Department<Toy>("Toys");
Department<Book> bookDepartment = new Department<Book>("Books");
shop.addSubDepartment(toyDepartment);
shop.addSubDepartment(bookDepartment);
Department<SoftToy> softToys = new Department<SoftToy>("Soft Toys");
Section<TeddyBear> teddies = new Section<TeddyBear>("Teddies", softToys);
Section<TrainSet> trainsets = new Section<TrainSet>("Train Sets", toyDepartment);
toyDepartment.addSubDepartment(softToys);
teddies.addItem(new TeddyBear("Rupert"));
teddies.addItem(new TeddyBear("Pooh"));
teddies.addItem(new TeddyBear("Paddington"));
trainsets.addItem(new TrainSet("Hornby Deluxe"));
trainsets.addItem(new TrainSet("Lego Rail"));
printItems(teddies);
printItems(shop);
System.out.println("There are " + shop.getCount() + " things in the Shop.");
System.out.println("All TrainSets:");
for (TrainSet t : shop.getAll(TrainSet.class)) {
System.out.println("\t" + t.getToyName());
}
}
private static void printItems(Section<? extends ShopItem> section) {
System.out.println("Items in " + section.getSectionName() + " Section:");
for (ShopItem item : section) {
System.out.println("\t" + item.getName());
}
}
private static void printItems(Department<? extends ShopItem> department) {
System.out.println("Items in " + department.getDepartmentName() + " Department:");
for (ShopItem item : department) {
System.out.println("\t" + item.getName());
}
}
public static abstract class ShopItem {
private String name;
public String getName() {
return name;
}
public ShopItem(String name) {
this.name = name;
}
}
public static class Book extends ShopItem {
public Book(String title) {
super(title);
}
public String getTitle() {
return super.getName();
}
}
public static abstract class Toy extends ShopItem {
public Toy(String toyName) {
super(toyName);
}
public String getToyName() {
return super.getName();
}
}
public static class SoftToy extends Toy {
public SoftToy(String toyName) {
super(toyName);
}
}
public static class TeddyBear extends SoftToy {
public TeddyBear(String toyName) {
super(toyName);
}
}
public static class TrainSet extends Toy {
public TrainSet(String toyName) {
super(toyName);
}
}
}
//List < Department < ? extends T > subDept
//List < Section < ? extends T > section
//
//Both say that ? must be a subclass of T eg.
//if T = Toy then ? can be a SoftToy or a TeddyBear or a Train
//If T = SoftToy then ? can be a TeddyBear
//
//with
//
//Department < ? super T > dept
//if T = SoftToy then ? must be a superclass eg. Toy or ShopItem
| [
"njbhorn@hotmail.com"
] | njbhorn@hotmail.com |
4d106c232e03acbe267ac64f6b92ae1faedf4055 | 3566d5e33f8b7339693b58ce38ab66749dac8b52 | /src/movable/MovableObject.java | 3e42fb0b17197b7c5885c583d266b41a4f5012b9 | [] | no_license | samuelscheffler/Car-Dodger | 80e7644890c26b144851a47b916332f70ac137dd | b847c1139e14664685f1e48572f8f0a568c36eec | refs/heads/master | 2020-06-10T13:27:50.000724 | 2017-01-17T17:32:06 | 2017-01-17T17:32:06 | 75,955,614 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,746 | java | package movable;
import java.awt.Rectangle;
public abstract class MovableObject implements Renderable
{
private Rectangle bounds;
private double movementSpeed;
private double xPos;
private double yPos;
private int width;
private int height;
public MovableObject(int xPos, int yPos, int width, int height)
{
this(xPos, yPos, width, height, 1);
}
public MovableObject(int xPos, int yPos, int width, int height, double movementSpeed)
{
this(xPos, yPos, width, height, movementSpeed, null);
}
public MovableObject(int xPos, int yPos, int width, int height, double movementSpeed, Rectangle bounds)
{
setXPos(xPos);
setYPos(yPos);
setWidth(width);
setHeight(height);
setBounds(bounds);
setMovementSpeed(movementSpeed);
}
public void setBounds(Rectangle bounds)
{
if(bounds!=null)
{
this.bounds=bounds.getBounds();
}
}
public Rectangle getBounds()
{
return bounds.getBounds();
}
public void setMovementSpeed(double movementSpeed)
{
this.movementSpeed=movementSpeed;
}
public double getMovementSpeed()
{
return movementSpeed;
}
public void setXPos(double xPos)
{
this.xPos=xPos;
}
public void setYPos(double yPos)
{
this.yPos=yPos;
}
public int getXPos()
{
return (int)xPos;
}
public int getYPos()
{
return (int)yPos;
}
public double getExactXPos()
{
return xPos;
}
public double getExactYPos()
{
return yPos;
}
public void setWidth(int width)
{
this.width=width;
}
public void setHeight(int height)
{
this.height=height;
}
public int getWidth()
{
return width;
}
public int getHeight()
{
return height;
}
public boolean moveUp()
{
return translate(0, -movementSpeed);
}
public boolean moveDown()
{
return translate(0, movementSpeed);
}
public boolean moveLeft()
{
return translate(-movementSpeed, 0);
}
public boolean moveRight()
{
return translate(movementSpeed, 0);
}
public boolean translate(double x, double y)
{
boolean inBounds=true;
if(bounds!=null && !bounds.contains(xPos+x, yPos+y, getWidth(), getHeight()))
{
inBounds=false;
if(x<0)
{
xPos=bounds.getMinX();
}
else if(x>0)
{
xPos=bounds.getMaxX()-getWidth();
}
if(y<0)
{
yPos=bounds.getMinY();
}
else if(y>0)
{
yPos=bounds.getMaxY()-getHeight();
}
}
else
{
xPos+=x;
yPos+=y;
}
return inBounds;
}
public boolean intersects(MovableObject object)
{
Rectangle currentObject=new Rectangle(getXPos(), getYPos(), getWidth(), getHeight());
Rectangle otherObject=new Rectangle(object.getXPos(), object.getYPos(), object.getWidth(), object.getHeight());
return currentObject.intersects(otherObject);
}
}
| [
"samuelscheffler@gmail.com"
] | samuelscheffler@gmail.com |
49a4c502bf9cf585c1a0a38d12a9229b62cf7dfc | 242fe9a31df06e1140629adad1047e8f4446f6d1 | /app/src/test/java/ca/bcit/gigfinder/ExampleUnitTest.java | bd505c4d53deb84e079e51bc60a9327d2d666537 | [] | no_license | chhabrasachit/Gig-Finder | bac117723b38a7aee3d0ca5ed2f97f66a56b42d8 | 0204660fe07b5967e83a9b429e7245c4f9d0c273 | refs/heads/main | 2023-04-16T22:11:41.153454 | 2021-04-28T05:04:18 | 2021-04-28T05:04:18 | 362,343,825 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 378 | java | package ca.bcit.gigfinder;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"schhabra6@my.bcit.ca"
] | schhabra6@my.bcit.ca |
c8e7ddb948cffdc41f9caf8ba5bface1ef62e546 | 27c821324998a5708aa43b484e657141d5819f33 | /Bank-master2/ReadFromConsole/src/com/dalberry/model/UserContactDetails.java | f400daa8472218b5bf1225a6a50e73cb8925a64f | [] | no_license | harshita789/BankingProject | 2dcbbbb693d0b1fd0ab4848eb4259118aa8e76ea | 1cfa6dccde3efe72653fd9e71d8e2438e5cff90d | refs/heads/master | 2020-04-26T02:49:50.508015 | 2019-03-01T06:26:28 | 2019-03-01T06:26:28 | 173,246,760 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,374 | java | package com.dalberry.model;
public class UserContactDetails {
private String mobileNo;
private String currentAddress;
private String parmanenetAddress;
private String UserCountry;
public UserContactDetails(){
}
public UserContactDetails(String mobileNo, String currentAddress, String parmanenetAddress, String userCountry) {
super();
this.mobileNo = mobileNo;
this.currentAddress = currentAddress;
this.parmanenetAddress = parmanenetAddress;
UserCountry = userCountry;
}
public String getMobileNo() {
return mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
}
public String getCurrentAddress() {
return currentAddress;
}
public void setCurrentAddress(String currentAddress) {
this.currentAddress = currentAddress;
}
public String getParmanenetAddress() {
return parmanenetAddress;
}
public void setParmanenetAddress(String parmanenetAddress) {
this.parmanenetAddress = parmanenetAddress;
}
public String getUserCountry() {
return UserCountry;
}
public void setUserCountry(String userCountry) {
UserCountry = userCountry;
}
@Override
public String toString() {
return "UserContactDetails [mobileNo=" + mobileNo + ", currentAddress=" + currentAddress
+ ", parmanenetAddress=" + parmanenetAddress + ", UserCountry=" + UserCountry + "]";
}
}
| [
"bhati.harshita789@gmail.com"
] | bhati.harshita789@gmail.com |
45c9dbe971a3500869b831cc14e4cab8075584c9 | 88fcd20a73088148bc578155d21026212824e563 | /app/src/androidTest/java/com/hcrpurdue/jason/hcrhousepoints/Tests/LogInTest.java | 3ccea0523d413d52a2556d633c8fd66a0cef5ca0 | [] | no_license | PurdueHCR/PurdueHCR-Android | fbc20e44aa6c547a5fc49f0752e986c6e6a8897e | be22447bb5c65332ad89b24888ec601c6b1aa892 | refs/heads/master | 2021-06-22T10:24:53.965661 | 2021-03-09T00:06:29 | 2021-03-09T00:06:29 | 202,824,234 | 1 | 3 | null | 2021-03-22T23:48:41 | 2019-08-17T02:13:29 | Java | UTF-8 | Java | false | false | 761 | java | package com.hcrpurdue.jason.hcrhousepoints.Tests;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.hcrpurdue.jason.hcrhousepoints.Activities.PointSubmissionTestActivity;
import org.junit.Test;
import org.junit.runner.RunWith;
@LargeTest
@RunWith(AndroidJUnit4.class)
public class LogInTest extends BaseTest{
@Test
public void logInTest() {
PointSubmissionTestActivity activity = baseActivity.logInResident();
activity.assertIsDisplayed();
}
@Test
public void emptyFieldLogInTest(){
}
@Test
public void invalidEmailTest(){
}
@Test
public void invalidPasswordTest(){
}
@Test
public void transitionToCreateAccountTest(){
}
}
| [
"noreply@github.com"
] | noreply@github.com |
3390794c856d60e3b5cba6bc0f146644d0a05a84 | 8cdb14a5ff8cca26a6c6f12522f59266aa78e203 | /maven/wsdl2java-maven-plugin/src/main/java/org/apache/axis/tools/maven/wsdl2java/JavaDeployWriterEx.java | 31637a60992faf32a28a91cc34471444fba2ce68 | [
"Apache-2.0"
] | permissive | apache/axis-axis1-java | 9565fe8ba4fb6429233c3eff7f2b1dc69b48daa9 | 22c25b730f8fc10780117167fd11d1153126b04d | refs/heads/master | 2023-09-05T07:56:16.227833 | 2023-08-13T20:46:19 | 2023-08-13T20:46:19 | 248,645,912 | 7 | 22 | Apache-2.0 | 2023-08-13T21:48:34 | 2020-03-20T01:57:50 | Java | UTF-8 | Java | false | false | 1,342 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.axis.tools.maven.wsdl2java;
import javax.wsdl.Definition;
import org.apache.axis.wsdl.symbolTable.SymbolTable;
import org.apache.axis.wsdl.toJava.Emitter;
import org.apache.axis.wsdl.toJava.JavaDeployWriter;
public class JavaDeployWriterEx extends JavaDeployWriter {
public JavaDeployWriterEx(Emitter emitter, Definition definition, SymbolTable symbolTable) {
super(emitter, definition, symbolTable);
}
protected String getFileName() {
return ((EmitterEx)emitter).getDeployWsdd();
}
}
| [
"veithen@apache.org"
] | veithen@apache.org |
be45a8407c5b0e29fc2e90b30e18c237ab6e7e66 | 8054fab41cf9deb2cca36be7e6f2a7e16a97e0ba | /src/engine/Game.java | ae47939e15e9609d2fe63cf03971c3abab194239 | [] | no_license | YasmineElfares/Hearthstone | 8fa888b6dde3170acacd763b0314037ce1a933dd | 1296e1eca899a28bb451181efcf90164ffc9259a | refs/heads/master | 2023-03-01T10:38:07.652314 | 2021-02-03T13:55:06 | 2021-02-03T13:55:06 | 264,013,393 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,823 | java | package engine;
import java.util.ArrayList;
import exceptions.CannotAttackException;
import exceptions.FullFieldException;
import exceptions.FullHandException;
import exceptions.HeroPowerAlreadyUsedException;
import exceptions.InvalidTargetException;
import exceptions.NotEnoughManaException;
import exceptions.NotSummonedException;
import exceptions.NotYourTurnException;
import exceptions.TauntBypassException;
import model.cards.Card;
import model.cards.minions.Minion;
import model.heroes.Hero;
import model.heroes.HeroListener;
import model.heroes.Warlock;
public class Game implements ActionValidator, HeroListener {
private Hero firstHero;
private Hero secondHero;
private Hero currentHero;
private Hero opponent;
private GameListener listener;
public Game(Hero p1, Hero p2) throws FullHandException, CloneNotSupportedException {
firstHero = p1;
secondHero = p2;
firstHero.setListener(this);
secondHero.setListener(this);
firstHero.setValidator(this);
secondHero.setValidator(this);
int coin = (int) (Math.random() * 2);
currentHero = coin == 0 ? firstHero : secondHero;
opponent = currentHero == firstHero ? secondHero : firstHero;
currentHero.setCurrentManaCrystals(1);
currentHero.setTotalManaCrystals(1);
for (int i = 0; i < 3; i++) {
currentHero.drawCard();
}
for (int i = 0; i < 4; i++) {
opponent.drawCard();
}
}
@Override
public void validateTurn(Hero user) throws NotYourTurnException {
if (user == opponent) {
listener.ExceptionMessage("You can not do any action in your opponent's turn");
throw new NotYourTurnException("You can not do any action in your opponent's turn");
}
}
public void validateAttack(Minion a, Minion t)
throws TauntBypassException, InvalidTargetException, NotSummonedException, CannotAttackException {
if (a.getAttack() <= 0) {
listener.ExceptionMessage("This minion Cannot Attack");
throw new CannotAttackException("This minion Cannot Attack");
}
if (a.isSleeping()) {
listener.ExceptionMessage("Give this minion a turn to get ready");
throw new CannotAttackException("Give this minion a turn to get ready");}
if (a.isAttacked()) {
listener.ExceptionMessage("This minion has already attacked");
throw new CannotAttackException("This minion has already attacked");}
if (!currentHero.getField().contains(a)) {
listener.ExceptionMessage("You can not attack with a minion that has not been summoned yet");
throw new NotSummonedException("You can not attack with a minion that has not been summoned yet");}
if (currentHero.getField().contains(t)) {
listener.ExceptionMessage("You can not attack a friendly minion");
throw new InvalidTargetException("You can not attack a friendly minion");}
if (!opponent.getField().contains(t)) {
listener.ExceptionMessage("You can not attack a minion that your opponent has not summoned yet");
throw new NotSummonedException("You can not attack a minion that your opponent has not summoned yet");}
if (!t.isTaunt()) {
for (int i = 0; i < opponent.getField().size(); i++) {
if (opponent.getField().get(i).isTaunt()) {
listener.ExceptionMessage("A minion with taunt is in the way");
throw new TauntBypassException("A minion with taunt is in the way");}
}
}
listener.soundEffect("attack.wav");
}
public void validateAttack(Minion m, Hero t)
throws TauntBypassException, NotSummonedException, InvalidTargetException, CannotAttackException {
if (m.getAttack() <= 0) {
listener.ExceptionMessage("This minion Cannot Attack");
throw new CannotAttackException("This minion Cannot Attack");}
if (m.isSleeping()) {
listener.ExceptionMessage("Give this minion a turn to get ready");
throw new CannotAttackException("Give this minion a turn to get ready");}
if (m.isAttacked()) {
listener.ExceptionMessage("This minion has already attacked");
throw new CannotAttackException("This minion has already attacked");}
if (!currentHero.getField().contains(m)) {
listener.ExceptionMessage("You can not attack with a minion that has not been summoned yet");
throw new NotSummonedException("You can not attack with a minion that has not been summoned yet");}
if (t.getField().contains(m)) {
listener.ExceptionMessage("You can not attack yourself with your minions");
throw new InvalidTargetException("You can not attack yourself with your minions");}
for (int i = 0; i < opponent.getField().size(); i++) {
if (opponent.getField().get(i).isTaunt()) {
listener.ExceptionMessage("A minion with taunt is in the way");
throw new TauntBypassException("A minion with taunt is in the way");}
}
listener.soundEffect("attack.wav");
}
public void validateManaCost(Card c) throws NotEnoughManaException {
if (currentHero.getCurrentManaCrystals() < c.getManaCost()) {
listener.ExceptionMessage("I don't have enough mana !!");
throw new NotEnoughManaException("I don't have enough mana !!");}
listener.soundEffect("playCard.wav");
}
public void validatePlayingMinion(Minion m) throws FullFieldException {
if (currentHero.getField().size() == 7) {
listener.ExceptionMessage("No space for this minion");
throw new FullFieldException("No space for this minion");}
listener.soundEffect("playCard.wav");
}
public void validateUsingHeroPower(Hero h) throws NotEnoughManaException, HeroPowerAlreadyUsedException {
if (h.getCurrentManaCrystals() < 2) {
listener.ExceptionMessage("I don't have enough mana !!");
throw new NotEnoughManaException("I don't have enough mana !!");}
if (h.isHeroPowerUsed()) {
listener.ExceptionMessage(" I already used my hero power");
throw new HeroPowerAlreadyUsedException(" I already used my hero power");}
listener.soundEffect("heroPower.wav");
}
@Override
public void onHeroDeath() {
listener.onGameOver();
}
@Override
public void damageOpponent(int amount) {
opponent.setCurrentHP(opponent.getCurrentHP() - amount);
}
public Hero getCurrentHero() {
return currentHero;
}
public void setListener(GameListener listener) {
this.listener = listener;
}
@Override
public void endTurn() throws FullHandException, CloneNotSupportedException {
Hero temp = currentHero;
currentHero = opponent;
opponent = temp;
currentHero.setTotalManaCrystals(currentHero.getTotalManaCrystals() + 1);
currentHero.setCurrentManaCrystals(currentHero.getTotalManaCrystals());
currentHero.setHeroPowerUsed(false);
for (Minion m : currentHero.getField()) {
m.setAttacked(false);
m.setSleeping(false);
}
currentHero.drawCard();
listener.soundEffect("endTurn.wav");
}
// public void onCardDrawn(Hero x) {
// listener.cardDrawn(x);
// }
public Hero getOpponent() {
return opponent;
}
@Override
public void onCardDrawn(Card c , Hero h) {
if (listener != null) {
listener.cardDrawn(c , h);
listener.soundEffect("drawCard.wav");
}
}
@Override
public void onFieldUpated(ArrayList<Minion> field, int i) {
if (listener != null){
listener.updateField(field,i);
}
}
@Override
public void onLivingMinionChange(ArrayList<Minion> field, int i) {
listener.updateLivingMinion(field, i);
}
@Override
public void onHeroUpdated(Hero hero) {
listener.UpdateHero(hero);
}
@Override
public void burnCard(Card c,Hero h) {
listener.OnCardBurned(c,h);
listener.soundEffect("fatigue.wav");
}
@Override
public void OnFatigue(Hero hero,int i) {
listener.Fatigue(hero,i);
}
@Override
public void OnUpdateCard(Hero hero, Card c) {
listener.updateCard(hero,c);
}
@Override
public void specialMinion(String m,int i, Hero hero) {
listener.specialMinionEffect(m,i,hero);
}
@Override
public void exceptions(String string) {
// TODO Auto-generated method stub
listener.showexception(string);
}
}
| [
"yasmine14699@gmail.com"
] | yasmine14699@gmail.com |
3232560b1ae64922a784a8c4cf616375f62fa8da | 56c487c7e90e3d88014009ade24b0d8a1f21c7c0 | /SimpleSpringRestAPI/src/main/java/com/atos/equens/worldline/SimpleSpringRestAPI/controller/EmployeeController.java | d393eef356f326e2397ae810fbfd819133c11ef5 | [] | no_license | A704234/RestAPIDocument | 8a4c7659372049348ebf1ea28824bfc64afa49b7 | f247cdb9c62536cc8883c98eeec7c517ba1e6b67 | refs/heads/master | 2022-04-01T00:31:16.790605 | 2020-02-02T08:07:30 | 2020-02-02T08:07:30 | 199,159,683 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,114 | java | package com.atos.equens.worldline.SimpleSpringRestAPI.controller;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.atos.equens.worldline.SimpleSpringRestAPI.model.Employee;
import com.atos.equens.worldline.SimpleSpringRestAPI.service.EmployeeService;
@RestController
@RequestMapping("/employee")
public class EmployeeController {
@Autowired
EmployeeService employeeService;
@RequestMapping(value = "/getallemployees", method=RequestMethod.GET)
public List<Employee> getAllEmployee(){
return employeeService.getAllEmployee();
}
@RequestMapping(
value = "/addemployee",
method = RequestMethod.POST,
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE
)
public Employee addEmployee(@RequestBody Employee employee){
return employeeService.addEmployee(employee);
}
@RequestMapping(
value = "/updateemployee",
method = RequestMethod.PUT,
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE
)
public Employee updateEmployee(@RequestBody Employee employee) {
return employeeService.updateEmployee(employee);
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
public Optional<Employee> getEmployeeById(@PathVariable int id){
return employeeService.getEmployeeByID(id);
}
@RequestMapping(value = "/deleteallemployee", method = RequestMethod.DELETE)
public void deleteAllEmployee(){
employeeService.deleteAllEmployee();
}
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
public void deleteEmployeeById(@PathVariable int id){
employeeService.deleteEmployeeById(id);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
38b49768ef946ae981258624668dd586c3f8b8df | b1730e65b5372d196025c2b1a3508b46c86bb2dd | /applications/belphegor/src/main/java/org/iplantc/admin/belphegor/client/refGenome/service/ReferenceGenomeServiceFacade.java | a6a327e1b1a72cfe3b11289575365f8b6ed43c56 | [] | no_license | Spencerx/DiscoveryEnvironment | 8e20939946ca68f1f1b193fc4c13bb3a78586e22 | 452b467d906413a684ec1f93bc3470d700aaba61 | refs/heads/master | 2021-01-17T22:06:29.555740 | 2014-07-15T21:24:39 | 2014-07-15T21:24:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,045 | java | package org.iplantc.admin.belphegor.client.refGenome.service;
import org.iplantc.de.client.models.apps.refGenome.ReferenceGenome;
import com.google.gwt.user.client.rpc.AsyncCallback;
import java.util.List;
public interface ReferenceGenomeServiceFacade {
/**
* https://github.com/iPlantCollaborativeOpenSource/Conrad#listing-all-genome-references
*
* @param callback
*/
void getReferenceGenomes(AsyncCallback<List<ReferenceGenome>> callback);
/**
* https://github.com/iPlantCollaborativeOpenSource/Conrad#modifying-a-genome-reference
*
* @param referenceGenome
* @param callback
*/
void editReferenceGenomes(ReferenceGenome referenceGenome, AsyncCallback<List<ReferenceGenome>> callback);
/**
* https://github.com/iPlantCollaborativeOpenSource/Conrad#creating-a-new-genome-reference
*
* @param referenceGenome
* @param callback
*/
void createReferenceGenomes(ReferenceGenome referenceGenome, AsyncCallback<List<ReferenceGenome>> callback);
}
| [
"jstroot@iplantcollaborative.org"
] | jstroot@iplantcollaborative.org |
6509691a95d5d22ceb2d5293832fa3a02263748f | ea5bd9ba0e304d26983463b9f5940e1113ccf1e5 | /app/src/main/java/com/example/harisrafiq/myapplication/AddHomeWork.java | c6fac5d5c7ce4c320aa02b56e2ca93c90699dbdf | [] | no_license | MuhammadHarisRafique/AndroidProject | 7f3314615dd87700886fe52a1a58227f4cb9d600 | d35058b95c575b0b2a8d6dd517d92c7e65a79973 | refs/heads/master | 2020-04-15T01:47:19.912542 | 2019-01-27T13:40:02 | 2019-01-27T13:40:02 | 164,291,096 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 6,665 | java | package com.example.harisrafiq.myapplication;
import android.app.DatePickerDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.Spinner;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientURI;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import org.bson.Document;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import java.util.concurrent.ExecutionException;
public class AddHomeWork extends AppCompatActivity implements OnItemSelectedListener {
final Calendar myCalendar = Calendar.getInstance();
EditText dateedittext;
Spinner classSpinner;
EditText homeWork;
MongoClient mongoClient;
MongoDatabase mongoDatabase;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_home_work);
dateedittext = (EditText) findViewById(R.id.datePicker);
homeWork = (EditText) findViewById(R.id.etxHomeWork);
dateedittext.setKeyListener(null);
dateedittext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
new DatePickerDialog(AddHomeWork.this, date, myCalendar
.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
myCalendar.get(Calendar.DAY_OF_MONTH)).show();
}
});
classSpinner = (Spinner) findViewById(R.id.classSpinner);
// Create an ArrayAdapter using the string array and a default spinner layout
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
R.array.class_array, android.R.layout.simple_spinner_item);
// Specify the layout to use when the list of choices appears
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
// Apply the adapter to the spinner
classSpinner.setAdapter(adapter);
classSpinner.setOnItemSelectedListener(this);
}
public void alertView(String title, String message, Context context) {
AlertDialog.Builder builder1 = new AlertDialog.Builder(context);
builder1.setTitle(title);
builder1.setMessage(message);
builder1.setCancelable(true);
builder1.setPositiveButton(
"OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
finish();
}
});
// builder1.setNegativeButton(
// "No",
// new DialogInterface.OnClickListener() {
// public void onClick(DialogInterface dialog, int id) {
// dialog.cancel();
// }
// });
AlertDialog alert11 = builder1.create();
alert11.show();
}
public void SaveHomeWork(View view){
InsertHomeWork task = new InsertHomeWork();
try {
ErrorClass r = task.execute().get();
alertView("Message",r.error_message,AddHomeWork.this);
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
// TODO Auto-generated method stub
myCalendar.set(Calendar.YEAR, year);
myCalendar.set(Calendar.MONTH, monthOfYear);
myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
updateLabel();
}
};
private void updateLabel() {
String myFormat = "MM/dd/yy"; //In which you need put here
SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
dateedittext.setText(sdf.format(myCalendar.getTime()));
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
private class InsertHomeWork extends AsyncTask<URL, Integer, ErrorClass> {
protected ErrorClass doInBackground(URL... urls) {
String datentime = dateedittext.getText().toString();
String classid = classSpinner.getSelectedItem().toString();
String homework = homeWork.getText().toString();
if (!datentime.equals("") && !classid.equals("") && !homework.equals("")) {
mongoClient = new MongoClient(new MongoClientURI(Configuration.databaseAddress));
mongoDatabase = mongoClient.getDatabase(Configuration.databaseName);
if (mongoDatabase != null) {
MongoCollection<Document> homeworkdataInsert = mongoDatabase.getCollection(Configuration.tbl_Homework);
Document hmwork = new Document();
hmwork.put("class_id",classid);
hmwork.put("date", datentime);
long unixTime = System.currentTimeMillis() / 1000L;
hmwork.put("unixtime",unixTime);
hmwork.put("homework",homework);
homeworkdataInsert.insertOne(hmwork);
ErrorClass err0r = new ErrorClass();
err0r.result = true;
err0r.error_message = "HomeWork Send Successfully";
return err0r;
} else {
ErrorClass err0r = new ErrorClass();
err0r.result = false;
err0r.error_message = "Database not found";
return err0r;
}
} else {
ErrorClass err0r = new ErrorClass();
err0r.result = false;
err0r.error_message = "Please Fill all fields";
return err0r;
}
}
}
}
| [
"haris.math@gmail.com"
] | haris.math@gmail.com |
c133bc0dc4654faad8a9bb93d2827c2dec2e9606 | 140e669d832aa462b688be169bec03f51d92b086 | /src/magic/ui/widget/card/filter/button/SetsFilterPanel.java | 13c44977b435f59b6e68ad41e2b9c78c7075145c | [] | no_license | Toreke/magarena | ea6fee9bdb3138095f0a194a0deb0ba05f4d149f | ef0a79fccee138dc6c4c4b71c38ee88d86da921b | refs/heads/master | 2021-01-11T03:58:16.382932 | 2016-10-18T11:49:42 | 2016-10-18T11:49:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,041 | java | package magic.ui.widget.card.filter.button;
import java.util.stream.Stream;
import magic.data.MagicSetDefinitions;
import magic.data.MagicSets;
import magic.model.MagicCardDefinition;
import magic.translate.StringContext;
import magic.translate.UiString;
import magic.ui.widget.card.filter.IFilterListener;
@SuppressWarnings("serial")
public class SetsFilterPanel extends CheckBoxFilterPanel {
// translatable strings
@StringContext(eg = "Set filter in Cards Explorer")
private static final String _S1 = "Set";
public SetsFilterPanel(IFilterListener aListener) {
super(UiString.get(_S1), aListener);
}
@Override
public boolean isCardValid(MagicCardDefinition card, int i) {
return MagicSetDefinitions.isCardInSet(card, MagicSets.values()[i]);
}
@Override
protected String[] getFilterValues() {
return Stream.of(MagicSets.values())
.map(s -> s.toString().replace("_", "") + " " + s.getSetName())
.toArray(size -> new String[size]);
}
}
| [
"lodici123@gmail.com"
] | lodici123@gmail.com |
82e7d99e99a6b0cbe23b0af1cb8bf72fbacf26f2 | 1fb946862cde79f02cf3a50f53b55d5f0fdf19e9 | /HealthTrackAndroid/app/src/test/java/com/example/joshuagitter/healthtrack/ExampleUnitTest.java | e80e624999456bdb4ce643ae776a67ae8c8c5d7a | [] | no_license | dvideo/HealthTracker | a6a344dd8cb991e18ce3ed03dc60371b39198574 | 72f16a366f2d13b05a8b9cb689dcb5c4665eedbd | refs/heads/master | 2020-03-23T03:16:36.736884 | 2018-07-20T23:34:59 | 2018-07-20T23:34:59 | 141,021,270 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 397 | java | package com.example.joshuagitter.healthtrack;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
""
] | |
b8f9da0a1157f1823b6f80c6007818cdb2492479 | fbee09aad6e51583a91a18f8cac233cd380df4cb | /src/fullname/About.java | b5078d66969fd245f87c1cadfa6d47076be71455 | [] | no_license | poshuk/transliteration | 286ce8af6b01dfe8c5dbd4c609852b41459dd63e | 3cbfd4276bec86297bd071786a06a0299907b868 | refs/heads/master | 2021-05-14T13:10:28.516445 | 2019-07-09T16:25:05 | 2019-07-09T16:25:05 | 116,431,274 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,872 | java | package fullname;
import javax.swing.*;
import java.awt.*;
import java.net.InetAddress;
import java.net.UnknownHostException;
public class About extends JFrame {
public JPanel panelAbout = new JPanel();
public About(){
try{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (UnsupportedLookAndFeelException e){
System.out.println(e.toString());
} catch (InstantiationException e){
System.out.println(e.toString());
}catch (IllegalAccessException e){
System.out.println(e.toString());
}catch (ClassNotFoundException e){
System.out.println(e.toString());
}
panelAbout.setLayout(new GridBagLayout());
this.getContentPane().add(panelAbout);
setText();
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
setSize(400, 300);
setVisible(true);
}
private void setText(){
GridBagConstraints information = new GridBagConstraints();
information.gridx = 0;
information.gridy = 0;
information.insets = new Insets(10,20,10,20);
JLabel info1 = new JLabel("Developed by Dmytro");
panelAbout.add(info1, information);
information.gridy = 1;
JLabel info2 = new JLabel("Version 1.0");
panelAbout.add(info2, information);
String hostname = "";
information.gridy = 2;
try{
hostname = InetAddress.getLocalHost().getCanonicalHostName();
} catch (UnknownHostException e){
System.out.println("ooops");
}
JLabel hostInfo = new JLabel();
if (!hostname.equals("")){
hostInfo.setText("Domain name: " + hostname.substring(hostname.indexOf(".")+1));
}
panelAbout.add(hostInfo, information);
}
}
| [
"poshuk2009@gmail.com"
] | poshuk2009@gmail.com |
45d666dbdc6e0282db4e26d3ea57381908ec7b83 | f5f85087e9ebbe427d40ede7a09584a3d22d2794 | /src/main/study/springframework/beans/BeanCreationException.java | 43e3def25e7f4ef38262a2d174118e5638ad72aa | [] | no_license | dy604/Spring-studycode | 760b8fd4a713b29d3a983eccd25a60edf96cd7b8 | 450ea411bfccd45c21a6ba1d9793059f2109451f | refs/heads/master | 2021-01-10T22:14:44.555770 | 2016-10-27T07:30:50 | 2016-10-27T07:30:50 | 70,333,055 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,716 | java | package study.springframework.beans;
import study.springframework.core.NestedRuntimeException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.List;
/**
* Created by dy on 2016/10/10.
*/
public class BeanCreationException extends FatalBeanException {
private String beanName;
private String resourceDescription;
private List<Throwable> relatedCauses;
public BeanCreationException(String msg) {
super(msg);
}
public BeanCreationException(String msg, Throwable cause) {
super(msg, cause);
}
public BeanCreationException(String beanName, String msg) {
super("Error creating bean with name '" + beanName + "': " + msg);
this.beanName = beanName;
}
public BeanCreationException(String beanName, String msg, Throwable cause) {
this(beanName, msg);
initCause(cause);
}
public BeanCreationException(String resourceDescription, String beanName, String msg) {
super("Error creating bean with name '" + beanName + "'" +
(resourceDescription != null ? " defined in " + resourceDescription : "") + ": " + msg);
this.resourceDescription = resourceDescription;
this.beanName = beanName;
}
public BeanCreationException(String resourceDescription, String beanName, String msg, Throwable cause) {
this(resourceDescription, beanName, msg);
initCause(cause);
}
public String getBeanName() {
return this.beanName;
}
public String getResourceDescription() {
return this.resourceDescription;
}
public void addRelatedCause(Throwable ex) {
if (this.relatedCauses == null) {
this.relatedCauses = new LinkedList<Throwable>();
}
this.relatedCauses.add(ex);
}
public Throwable[] getRelatedCauses() {
if (this.relatedCauses == null) {
return null;
}
return this.relatedCauses.toArray(new Throwable[this.relatedCauses.size()]);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder(super.toString());
if (this.relatedCauses != null) {
for (Throwable relatedCause : this.relatedCauses) {
sb.append("\nRelated cause: ");
sb.append(relatedCause);
}
}
return sb.toString();
}
@Override
public void printStackTrace(PrintStream ps) {
synchronized (ps) {
super.printStackTrace(ps);
if (this.relatedCauses != null) {
for (Throwable relatedCause : this.relatedCauses) {
ps.println("Related cause:");
relatedCause.printStackTrace(ps);
}
}
}
}
@Override
public void printStackTrace(PrintWriter pw) {
synchronized (pw) {
super.printStackTrace(pw);
if (this.relatedCauses != null) {
for (Throwable relatedCause : this.relatedCauses) {
pw.println("Related cause:");
relatedCause.printStackTrace(pw);
}
}
}
}
@Override
public boolean contains(Class exClass) {
if (super.contains(exClass)) {
return true;
}
if (this.relatedCauses != null) {
for (Throwable relatedCause : this.relatedCauses) {
if (relatedCause instanceof NestedRuntimeException &&
((NestedRuntimeException) relatedCause).contains(exClass)) {
return true;
}
}
}
return false;
}
}
| [
"503982643@qq.com"
] | 503982643@qq.com |
388dba7aa49f79046a9065f3d9ba1231cc8c73c2 | cb3ecbbe8f3b50042e06582c2b4f811bd0aa1998 | /svj/manualAnalysis/4abf3908b1cbc71ad0e5a05cd779af7951e30158/StructrUiTest/StructrUiTest_right.java | 719b9ca252d53ed1959581b3afbec18d3520e62f | [] | no_license | leusonmario/s3m | 2ed78229a14296691353d743ce63f7423f3fc8c8 | ba751ebca7bf432aad9420ae850fe179a818df85 | refs/heads/master | 2022-04-09T20:28:45.262607 | 2020-02-14T23:43:15 | 2020-02-14T23:43:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,923 | java | /**
* Copyright (C) 2010-2014 Morgner UG (haftungsbeschr�nkt)
*
* This file is part of Structr <http://structr.org>.
*
* Structr is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* Structr is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Structr. If not, see <http://www.gnu.org/licenses/>.
*/
package org.structr.web.common;
import com.jayway.restassured.RestAssured;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.Enumeration;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import junit.framework.TestCase;
import org.apache.commons.io.FileUtils;
import org.structr.common.PropertyView;
import org.structr.common.SecurityContext;
import org.structr.common.StructrConf;
import org.structr.common.error.FrameworkException;
import org.structr.core.GraphObject;
import org.structr.core.Services;
import org.structr.core.app.App;
import org.structr.core.app.StructrApp;
import org.structr.core.entity.AbstractNode;
import org.structr.core.entity.GenericNode;
import org.structr.core.graph.GraphDatabaseCommand;
import org.structr.core.graph.NodeInterface;
import org.structr.core.graph.RelationshipInterface;
import org.structr.core.property.PropertyMap;
import org.structr.files.ftp.FtpService;
import org.structr.module.JarConfigurationProvider;
import org.structr.rest.service.HttpService;
import org.structr.rest.servlet.JsonRestServlet;
import org.structr.web.auth.UiAuthenticator;
import org.structr.web.entity.User;
import org.structr.web.servlet.HtmlServlet;
import org.structr.websocket.servlet.WebSocketServlet;
//~--- classes ----------------------------------------------------------------
/**
* Base class for all structr UI tests
*
* All tests are executed in superuser context
*
* @author Axel Morgner
*/
public class StructrUiTest extends TestCase {
private static final Logger logger = Logger.getLogger(StructrUiTest.class.getName());
//~--- fields ---------------------------------------------------------
protected StructrConf config = new StructrConf();
protected GraphDatabaseCommand graphDbCommand = null;
protected SecurityContext securityContext = null;
protected App app = null;
// the jetty server
private boolean running = false;
protected String basePath;
protected static final String prot = "http://";
// protected static final String contextPath = "/";
protected static final String restUrl = "/structr/rest";
protected static final String htmlUrl = "/structr/html";
protected static final String wsUrl = "/structr/ws";
protected static final String host = "localhost";
protected static final int httpPort = 8875;
protected static final int ftpPort = 8876;
protected static String baseUri;
static {
// check character set
checkCharset();
baseUri = prot + host + ":" + httpPort + htmlUrl + "/";
// configure RestAssured
RestAssured.basePath = restUrl;
RestAssured.baseURI = prot + host + ":" + httpPort;
RestAssured.port = httpPort;
}
//~--- methods --------------------------------------------------------
@Override
protected void setUp() throws Exception {
setUp(null);
}
protected void setUp(final Map<String, Object> additionalConfig) {
| [
"gjcc@cin.ufpe.br"
] | gjcc@cin.ufpe.br |
910982840dde02a4c249f234d9a767817bae1aea | 959d6446b583b60a5773f7b4984b5b5e57f201a0 | /app/src/test/java/shibanov/london_transport/ExampleUnitTest.java | 6e9121ee4ea9c9a0f6ebb5b7e23d83d8243c3fc0 | [] | no_license | dmitry-shibanov/transport_in_london | 9e9f27478f8855c3dc44619b218235a1852fdaaa | cb7dc1d171254f4cb5f7966b4aa158ed5c0edad8 | refs/heads/master | 2020-04-21T13:16:36.209255 | 2019-02-07T15:26:03 | 2019-02-07T15:26:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | package shibanov.london_transport;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"shibanov-1997@inbox.ru"
] | shibanov-1997@inbox.ru |
0c8f6b53be1ba0b231c331b921e624f242b7f5f6 | 5606cce6973fd1eef4e294ee7041afa2e8724453 | /src/main/Window.java | c5ff7eaf76b0610c0f292abfdd51182c99e9552e | [] | no_license | NeilRajah/GADots | ce115ff3833a2f92545caeca740cb479be4ad3f1 | 5d91c18ffc832d460f4ce06cb3109ee37137367e | refs/heads/main | 2023-03-06T08:47:39.961896 | 2020-11-25T21:47:42 | 2020-11-25T21:47:42 | 313,186,358 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,524 | java | /**
* Window
* Author: Neil Balaskandarajah
* Created on: 15/11/2020
* Graphical window where simulation occurs
*/
package main;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class Window extends JFrame {
//Attributes
private int width; //Width in pixels
private int height; //Height in pixels
private JPanel panel; //Panel holding components
private Environment env; //Environment population is in
/**
* Create a Window
* @param w Window width in pixels
* @param h Window height in pixels
*/
public Window(int w, int h) {
this.width = w;
this.height = h;
this.setSize(width, height);
this.panel = new JPanel();
}
/**
* Set the Environment for this Window
* @param env Environment for this Window
*/
public void setEnvironment(Environment env) {
this.env = env;
panel.add(env);
}
/**
* Set the Population to the Environment
* @param p
*/
public void setPopulation(Population p) {
env.setPopulation(p);
}
/**
* Launch the Window
*/
public void launch() {
//Set up the JFrame
this.setBounds((int) (width * 0.9), 0, width, height);
this.setTitle("GADots");
this.setContentPane(panel);
this.setUndecorated(false);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.pack();
this.setResizable(false);
this.setVisible(true);
//Main Thread to run the program
new Thread(() -> {
while(true) {
env.update();
try {
Thread.sleep(Util.PAUSE);
} catch (Exception e) {}
}
}).start();
}
} | [
"neil.balaskandarajah@gmail.com"
] | neil.balaskandarajah@gmail.com |
f1b84055ae0a2637ee91af8407dcbcb2a91b43d6 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/java-design-patterns/testing/811/AppTest.java | f20a7b420dc90248b2fef6f1553ee75965cd7bad | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,355 | java | /**
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.prototype;
import org.junit.jupiter.api.Test;
/**
*
* Application test
*
*/
public class AppTest {
@Test
public void test() {
String[] args = {};
App.main(args);
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
75cc6d438ed0aa4a1237351c982f6fec4307b440 | 8c00ca6422717be7fd2d503abf54a00b6968f32b | /MeetingRoom/app/src/androidTest/java/com/example/pimpavee/meetingroom/ExampleInstrumentedTest.java | 09005802d15d4d9648ec872979e0df854bc64f05 | [] | no_license | yuureihunter/final_project_android | b272e1e1b6360d3dd127b1b4d4f3455d93cdffc7 | 08b15f085f593497ed4dc409e73ea28c1479463c | refs/heads/master | 2021-08-24T02:51:09.443701 | 2017-12-07T18:51:19 | 2017-12-07T18:51:19 | 111,430,378 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 765 | java | package com.example.pimpavee.meetingroom;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.pimpavee.meetingroom", appContext.getPackageName());
}
}
| [
"58070101@kmitl.ac.th"
] | 58070101@kmitl.ac.th |
2e7646ed9707ec26351d72310ca4f53e2ce2faf9 | a9d3d0fe230dd161963ce551210891828ac2fe80 | /src/main/java/com/future/pms/service/impl/BookingServiceImpl.java | 8b46369a616a5740e2b59603aea691634cd95177 | [] | no_license | MHabiib/Parklux | bcad7c56c33c13300917faf5c4113e9dbfea6cd5 | c1b9fe19df280507459e790f4ad47a2e220a22a3 | refs/heads/master | 2023-01-01T11:28:22.538570 | 2020-10-26T14:22:59 | 2020-10-26T14:22:59 | 307,383,293 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,006 | java | package com.future.pms.service.impl;
import com.future.pms.AmazonClient;
import com.future.pms.FcmClient;
import com.future.pms.model.*;
import com.future.pms.model.parking.ParkingLevel;
import com.future.pms.model.parking.ParkingSlot;
import com.future.pms.model.parking.ParkingZone;
import com.future.pms.repository.*;
import com.future.pms.service.BookingService;
import net.glxn.qrgen.core.image.ImageType;
import net.glxn.qrgen.javase.QRCode;
import org.json.JSONException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.Principal;
import java.util.Calendar;
import static com.future.pms.Constants.*;
import static com.future.pms.Utils.getTotalTime;
@Service public class BookingServiceImpl implements BookingService {
@Autowired ParkingSlotRepository parkingSlotRepository;
@Autowired BookingRepository bookingRepository;
@Autowired CustomerRepository customerRepository;
@Autowired UserRepository userRepository;
@Autowired ParkingZoneRepository parkingZoneRepository;
@Autowired ParkingLevelRepository parkingLevelRepository;
@Autowired AmazonClient amazonClient;
@Override public ResponseEntity loadAll(String filter, Integer page) {
switch (filter) {
case ALL: {
PageRequest request =
PageRequest.of(page, 10, new Sort(Sort.Direction.DESC, "dateIn"));
return ResponseEntity.ok(bookingRepository.findBookingBy(request));
}
case ONGOING: {
PageRequest request =
PageRequest.of(page, 10, new Sort(Sort.Direction.DESC, "dateIn"));
return ResponseEntity.ok(bookingRepository.findBookingByDateOutNull(request));
}
default: {
PageRequest request =
PageRequest.of(page, 10, new Sort(Sort.Direction.DESC, "dateIn"));
return ResponseEntity.ok(bookingRepository.findBookingByDateOutNotNull(request));
}
}
}
@Override public ResponseEntity findBookingCustomer(Principal principal, Integer page) {
Customer customer = customerRepository.findByEmail(principal.getName());
if (customer != null) {
PageRequest request = PageRequest.of(page, 10, new Sort(Sort.Direction.DESC, "dateIn"));
return ResponseEntity.ok(bookingRepository
.findBookingByIdUserAndTotalPriceNotNull(customer.getIdCustomer(), request));
} else {
return new ResponseEntity<>("User not found", HttpStatus.NOT_FOUND);
}
}
@Override public ResponseEntity findOngoingBookingCustomer(Principal principal) {
Customer customer = customerRepository.findByEmail(principal.getName());
if (customer != null) {
return ResponseEntity.ok(bookingRepository
.findBookingByIdUserAndTotalPrice(customer.getIdCustomer(), null));
} else {
return new ResponseEntity<>("User not found", HttpStatus.NOT_FOUND);
}
}
@Override
public ResponseEntity findOngoingBookingParkingZone(Principal principal, Integer page) {
ParkingZone parkingZone =
parkingZoneRepository.findParkingZoneByEmailAdmin(principal.getName());
PageRequest request = PageRequest.of(page, 10, new Sort(Sort.Direction.DESC, "dateIn"));
return ResponseEntity.ok(bookingRepository
.findBookingByIdParkingZoneAndDateOut(parkingZone.getIdParkingZone(), null, request));
}
@Override public ResponseEntity findPastBookingParkingZone(Principal principal, Integer page) {
ParkingZone parkingZone =
parkingZoneRepository.findParkingZoneByEmailAdmin(principal.getName());
PageRequest request = PageRequest.of(page, 10, new Sort(Sort.Direction.DESC, "dateOut"));
return ResponseEntity.ok(bookingRepository
.findBookingByIdParkingZoneAndDateOutNotNull(parkingZone.getIdParkingZone(), request));
}
@Override public ResponseEntity createBooking(Principal principal, String idSlot, String fcm)
throws JSONException {
Customer customer = customerRepository.findByEmail(principal.getName());
ParkingSlot parkingSlot = parkingSlotRepository.findByIdSlot(idSlot);
if (null != customer && null != parkingSlot && SLOT_SCAN_ME
.equals(parkingSlot.getStatus())) {
User user = userRepository.findByEmail(customer.getEmail());
if (1 > bookingRepository.countAllByDateOutAndIdUser(null, customer.getIdCustomer())
&& !user.getRole().equals(CUSTOMER_BANNED)) {
ParkingZone parkingZone = parkingZoneRepository
.findParkingZoneByIdParkingZone(parkingSlot.getIdParkingZone());
parkingSlot.setStatus(SLOT_TAKEN);
parkingSlotRepository.save(parkingSlot);
ParkingLevel parkingLevel =
parkingLevelRepository.findByIdLevel(parkingSlot.getIdLevel());
FcmClient fcmClient;
fcmClient = new FcmClient();
fcmClient.sendPushNotification(fcm, customer.getName(), parkingZone.getName(),
parkingLevel.getLevelName());
System.out.println(fcm);
setupParkingLayout(parkingSlot, SLOT_TAKEN);
Booking bookingParking = new Booking();
bookingParking.setParkingZoneName(parkingZone.getName());
bookingParking.setAddress(parkingZone.getAddress());
bookingParking.setPrice(parkingZone.getPrice());
bookingParking.setImageUrl(parkingZone.getImageUrl());
bookingParking.setIdParkingZone(parkingSlot.getIdParkingZone());
bookingParking.setSlotName(parkingSlot.getName());
bookingParking.setLevelName(parkingLevel.getLevelName());
bookingParking.setIdUser(customer.getIdCustomer());
bookingParking.setCustomerName(customer.getName());
bookingParking.setCustomerPhone(customer.getPhoneNumber());
bookingParking.setIdSlot(idSlot);
bookingParking.setDateIn(Calendar.getInstance().getTimeInMillis());
bookingRepository.save(bookingParking);
return ResponseEntity.ok().body(bookingParking);
}
}
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
@Override public ResponseEntity bookingReceipt(String idBooking) {
Booking booking = bookingRepository.findBookingByIdBooking(idBooking);
ParkingZone parkingZone =
parkingZoneRepository.findParkingZoneByIdParkingZone(booking.getIdParkingZone());
Receipt receipt = new Receipt();
receipt.setCustomerName(booking.getCustomerName());
receipt.setIdBooking(booking.getIdBooking());
receipt.setParkingZoneName(parkingZone.getName());
receipt.setAddress(parkingZone.getAddress());
receipt.setSlotName(booking.getSlotName());
receipt.setPrice(booking.getPrice());
receipt.setStatus("Completed");
if (booking.getTotalTime() == null) {
booking.setTotalTime(Long.toString(
getTotalTime(booking.getDateIn(), Calendar.getInstance().getTimeInMillis())));
booking.setTotalPrice(getTotalPrice(getTotalMinute(booking.getTotalTime()),
getTotalHours(booking.getTotalTime(), getTotalMinute(booking.getTotalTime())),
booking.getPrice()));
booking.setDateOut(Calendar.getInstance().getTimeInMillis());
receipt.setStatus("Ongoing");
}
receipt.setTotalMinutes(getTotalMinute(booking.getTotalTime()));
receipt.setTotalHours(getTotalHours(booking.getTotalTime(), receipt.getTotalMinutes()));
receipt.setDateIn(booking.getDateIn());
receipt.setDateOut(booking.getDateOut());
receipt.setTotalPrice(booking.getTotalPrice());
return ResponseEntity.ok().body(receipt);
}
private Integer getTotalMinute(String totalTime) {
return (Integer.parseInt(totalTime) % 60) + 1;
}
private Integer getTotalHours(String totalTime, int totalMinutes) {
return (Integer.parseInt(totalTime) - totalMinutes + 1) / 60;
}
private String getTotalPrice(int totalMinutes, int totalHours, Double price) {
if (totalMinutes != 0)
totalHours += 1;
return (String.valueOf(totalHours * price)).split("\\.")[0];
}
@Override public ResponseEntity checkoutBookingStepOne(Principal principal, String fcmToken)
throws IOException {
Customer customer = customerRepository.findByEmail(principal.getName());
String filename;
QR qr = new QR();
qr.setIdSlot(customer.getIdCustomer());
ByteArrayOutputStream bout =
QRCode.from(qr + fcmToken).withSize(250, 250).to(ImageType.PNG).stream();
filename = customer.getIdCustomer() + ".png";
filename = amazonClient.convertMultiPartToFileQR(bout, filename);
Booking bookingExist =
bookingRepository.findBookingByIdUserAndDateOut(customer.getIdCustomer(), null);
if (bookingExist != null) {
return new ResponseEntity<>(filename, HttpStatus.OK);
}
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
@Override public ResponseEntity checkoutBookingSA(String id) {
Booking booking = bookingRepository.findBookingByIdBooking(id);
Customer customer = customerRepository.findByIdCustomer(booking.getIdUser());
checkoutBooking(customer);
return ResponseEntity.ok().body(booking);
}
private void checkoutBooking(Customer customer) {
Booking ongoingBooking =
bookingRepository.findBookingByIdUserAndTotalPrice(customer.getIdCustomer(), null);
if (null != ongoingBooking) {
ParkingSlot parkingSlot =
parkingSlotRepository.findByIdSlot(ongoingBooking.getIdSlot());
if (SLOT_TAKEN.equals(parkingSlot.getStatus())) {
bookingCheckoutSetup(ongoingBooking, parkingSlot, parkingSlotRepository,
bookingRepository);
setupParkingLayout(parkingSlot, SLOT_EMPTY);
}
}
}
void bookingCheckoutSetup(Booking bookingExist, ParkingSlot parkingSlot,
ParkingSlotRepository parkingSlotRepository, BookingRepository bookingRepository) {
if (bookingExist.getDateOut() == null) {
bookingExist.setDateOut(Calendar.getInstance().getTimeInMillis());
}
bookingExist.setTotalTime(
Long.toString(getTotalTime(bookingExist.getDateIn(), bookingExist.getDateOut())));
bookingExist.setTotalPrice(getTotalPrice(getTotalMinute(bookingExist.getTotalTime()),
getTotalHours(bookingExist.getTotalTime(), getTotalMinute(bookingExist.getTotalTime())),
bookingExist.getPrice()));
parkingSlot.setStatus(SLOT_EMPTY);
parkingSlotRepository.save(parkingSlot);
bookingRepository.save(bookingExist);
}
private void setupParkingLayout(ParkingSlot parkingSlot, String slotEmpty) {
GenerateQRServiceImpl.SetSlotsLayout(slotEmpty, parkingSlot, parkingLevelRepository);
}
@Override public ResponseEntity findBookingById(String id) {
return ResponseEntity.ok(bookingRepository.findBookingByIdBooking(id));
}
@Override public ResponseEntity checkoutBookingStepTwo(Principal principal, String fcmToken,
String idCustomer) throws JSONException {
ParkingZone parkingZone =
parkingZoneRepository.findParkingZoneByEmailAdmin(principal.getName());
Customer customer = customerRepository.findByIdCustomer(idCustomer);
Booking bookingExist = bookingRepository.findBookingByIdUserAndTotalPrice(idCustomer, null);
if (bookingExist != null && parkingZone.getIdParkingZone()
.equals(bookingExist.getIdParkingZone())) {
checkoutBooking(customer);
String bookingId = bookingExist.getIdBooking();
bookingExist = bookingRepository.findBookingByIdBooking(bookingId);
if (fcmToken != null) {
FcmClient fcmClient;
fcmClient = new FcmClient();
fcmClient.sendPushNotificationCheckoutBooking(fcmToken,
bookingExist.getParkingZoneName(), bookingExist.getIdBooking());
}
return ResponseEntity.ok().body(bookingExist);
} else {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
}
}
| [
"mhabibofficial@yahoo.com"
] | mhabibofficial@yahoo.com |
7b5fd44c129ca98a34c0fb863433b7f8d119953d | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/boot/svg/code/drawable/file_float_ball_icon_ppt.java | b182f98b2a07daa4da0d15a96fd1e5e5456afeee | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 3,678 | java | package com.tencent.mm.boot.svg.code.drawable;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
public class file_float_ball_icon_ppt
extends c
{
private final int height = 48;
private final int width = 48;
public int doCommand(int paramInt, Object... paramVarArgs)
{
switch (paramInt)
{
}
for (;;)
{
return 0;
return 48;
return 48;
Canvas localCanvas = (Canvas)paramVarArgs[0];
paramVarArgs = (Looper)paramVarArgs[1];
c.instanceMatrix(paramVarArgs);
c.instanceMatrixArray(paramVarArgs);
Paint localPaint = c.instancePaint(paramVarArgs);
localPaint.setFlags(385);
localPaint.setStyle(Paint.Style.FILL);
Object localObject = c.instancePaint(paramVarArgs);
((Paint)localObject).setFlags(385);
((Paint)localObject).setStyle(Paint.Style.STROKE);
localPaint.setColor(-16777216);
((Paint)localObject).setStrokeWidth(1.0F);
((Paint)localObject).setStrokeCap(Paint.Cap.BUTT);
((Paint)localObject).setStrokeJoin(Paint.Join.MITER);
((Paint)localObject).setStrokeMiter(4.0F);
((Paint)localObject).setPathEffect(null);
c.instancePaint((Paint)localObject, paramVarArgs).setStrokeWidth(1.0F);
localCanvas.save();
localObject = c.instancePaint(localPaint, paramVarArgs);
((Paint)localObject).setColor(-892609);
Path localPath = c.instancePath(paramVarArgs);
localPath.moveTo(0.0F, 0.0F);
localPath.lineTo(48.0F, 0.0F);
localPath.lineTo(48.0F, 48.0F);
localPath.lineTo(0.0F, 48.0F);
localPath.lineTo(0.0F, 0.0F);
localPath.close();
localCanvas.drawPath(localPath, (Paint)localObject);
localCanvas.restore();
localCanvas.save();
localPaint = c.instancePaint(localPaint, paramVarArgs);
localPaint.setColor(-1);
localObject = c.instancePath(paramVarArgs);
((Path)localObject).moveTo(19.751953F, 16.089844F);
((Path)localObject).lineTo(26.326172F, 16.089844F);
((Path)localObject).cubicTo(29.689453F, 16.089844F, 32.021484F, 18.375F, 32.021484F, 21.75F);
((Path)localObject).cubicTo(32.021484F, 25.125F, 29.619141F, 27.410156F, 26.197266F, 27.410156F);
((Path)localObject).lineTo(22.775391F, 27.410156F);
((Path)localObject).lineTo(22.775391F, 33.0F);
((Path)localObject).lineTo(19.751953F, 33.0F);
((Path)localObject).lineTo(19.751953F, 16.089844F);
((Path)localObject).close();
((Path)localObject).moveTo(22.775391F, 18.5625F);
((Path)localObject).lineTo(22.775391F, 24.972656F);
((Path)localObject).lineTo(25.517578F, 24.972656F);
((Path)localObject).cubicTo(27.685547F, 24.972656F, 28.951172F, 23.800781F, 28.951172F, 21.75F);
((Path)localObject).cubicTo(28.951172F, 19.722656F, 27.697266F, 18.5625F, 25.529297F, 18.5625F);
((Path)localObject).lineTo(22.775391F, 18.5625F);
((Path)localObject).close();
WeChatSVGRenderC2Java.setFillType((Path)localObject, 1);
localCanvas.drawPath((Path)localObject, localPaint);
localCanvas.restore();
c.done(paramVarArgs);
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes12.jar
* Qualified Name: com.tencent.mm.boot.svg.code.drawable.file_float_ball_icon_ppt
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
32274267d21de1c8da1e0b2d1183ba68a2f29b0c | c64bc38049776f1a6853b1e62f0263e14b6f2166 | /chapter10/ServiceBestPractice/app/src/main/java/com/example/servicebestpractice/DownloadListener.java | d2bd6d5f203679b6d4f33de8cfbd56bcaa167171 | [
"Apache-2.0"
] | permissive | DaoshunShi/AndroidStudy | 1703936f1783eb4fb71d6e7f064ced203568f2b0 | 4c7575c111e1aba0b06f712376c1c1a801fa4462 | refs/heads/master | 2021-06-20T06:32:17.743488 | 2017-08-03T13:11:17 | 2017-08-03T13:11:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 250 | java | package com.example.servicebestpractice;
/**
* Created by 99502 on 2017/7/31.
*/
public interface DownloadListener {
void onProgress(int progress);
void onSuccess();
void onFailed();
void onPaused();
void onCanceled();
}
| [
"995025784@qq.com"
] | 995025784@qq.com |
43a7f0488ca732675ff4d615fb493680f4acd8ea | e46e07909e6bc62b08c6fd1e8095d40113371bd4 | /data-access-layer/src/main/java/com/esd/db/model/pay.java | 11629d1dbebfe8da2c369a2108b76f1693847806 | [] | no_license | snailzhang/vtd | c19595b84f0d3bc718f6c2505cd4ea1b58fb17a8 | 72df27d0cdff5054e386d0f0553399b88b6a805d | refs/heads/master | 2020-05-16T21:14:53.862888 | 2016-02-25T06:38:50 | 2016-02-25T06:38:50 | 24,222,073 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,886 | java | package com.esd.db.model;
import java.util.Date;
public class pay {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Integer id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.worker_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Integer workerId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.real_name
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private String realName;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.bank_card
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private String bankCard;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.salary
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Double salary;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.taxes
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Double taxes;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.pay_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Date payTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.mark
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Integer mark;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.user_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Integer userId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.create_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Date createTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.create_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Integer createId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.create_method
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private String createMethod;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.update_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Integer updateId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.update_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private Date updateTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pay.update_method
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
private String updateMethod;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.id
*
* @return the value of pay.id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.id
*
* @param id the value for pay.id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.worker_id
*
* @return the value of pay.worker_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Integer getWorkerId() {
return workerId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.worker_id
*
* @param workerId the value for pay.worker_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setWorkerId(Integer workerId) {
this.workerId = workerId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.real_name
*
* @return the value of pay.real_name
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public String getRealName() {
return realName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.real_name
*
* @param realName the value for pay.real_name
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setRealName(String realName) {
this.realName = realName == null ? null : realName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.bank_card
*
* @return the value of pay.bank_card
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public String getBankCard() {
return bankCard;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.bank_card
*
* @param bankCard the value for pay.bank_card
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setBankCard(String bankCard) {
this.bankCard = bankCard == null ? null : bankCard.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.salary
*
* @return the value of pay.salary
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Double getSalary() {
return salary;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.salary
*
* @param salary the value for pay.salary
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setSalary(Double salary) {
this.salary = salary;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.taxes
*
* @return the value of pay.taxes
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Double getTaxes() {
return taxes;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.taxes
*
* @param taxes the value for pay.taxes
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setTaxes(Double taxes) {
this.taxes = taxes;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.pay_time
*
* @return the value of pay.pay_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Date getPayTime() {
return payTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.pay_time
*
* @param payTime the value for pay.pay_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setPayTime(Date payTime) {
this.payTime = payTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.mark
*
* @return the value of pay.mark
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Integer getMark() {
return mark;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.mark
*
* @param mark the value for pay.mark
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setMark(Integer mark) {
this.mark = mark;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.user_id
*
* @return the value of pay.user_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Integer getUserId() {
return userId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.user_id
*
* @param userId the value for pay.user_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setUserId(Integer userId) {
this.userId = userId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.create_time
*
* @return the value of pay.create_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.create_time
*
* @param createTime the value for pay.create_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.create_id
*
* @return the value of pay.create_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Integer getCreateId() {
return createId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.create_id
*
* @param createId the value for pay.create_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setCreateId(Integer createId) {
this.createId = createId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.create_method
*
* @return the value of pay.create_method
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public String getCreateMethod() {
return createMethod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.create_method
*
* @param createMethod the value for pay.create_method
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setCreateMethod(String createMethod) {
this.createMethod = createMethod == null ? null : createMethod.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.update_id
*
* @return the value of pay.update_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Integer getUpdateId() {
return updateId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.update_id
*
* @param updateId the value for pay.update_id
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setUpdateId(Integer updateId) {
this.updateId = updateId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.update_time
*
* @return the value of pay.update_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.update_time
*
* @param updateTime the value for pay.update_time
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay.update_method
*
* @return the value of pay.update_method
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public String getUpdateMethod() {
return updateMethod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pay.update_method
*
* @param updateMethod the value for pay.update_method
*
* @mbggenerated Tue Feb 03 11:05:10 CST 2015
*/
public void setUpdateMethod(String updateMethod) {
this.updateMethod = updateMethod == null ? null : updateMethod.trim();
}
} | [
"violetregret@yeah.net"
] | violetregret@yeah.net |
37126501592cfa4d40aad19ff5bc04f86f040162 | 6ab9ef5551ce219c220297580e49e84e91414547 | /src/作业3/第二次周测.java | cd9bfa2295c89e99777962e31d4642930d706e57 | [] | no_license | huawangxin/JavaSE02 | b804806b8785ac557f21b9c4f9e0c9ac3de796cc | 8ac8505af1cdd301dc8cafacfd5251a0bd4a0fd4 | refs/heads/master | 2020-06-26T19:04:34.882399 | 2016-11-23T05:38:57 | 2016-11-23T05:38:57 | 74,544,023 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 445 | java | package 作业3;
import java.util.ArrayList;
public class 第二次周测 {
public static void main(String[] args) {
ArrayList list = new ArrayList();
if(list==null){}
if(list.isEmpty()){}
list.add("java");
list.add("aaa");
list.add("java");
list.add("java");
list.add("bbb");
for (int i = list.size() - 1; i >= 0; i--) {
if ("java".equals(list.get(i))) {
list.remove(i);
}
}
System.out.println(list);
}
}
| [
"wangge703@163.com"
] | wangge703@163.com |
7da98ac3ed2d98ee9bd843b44386a671cb50e53f | bd99d82d1e58dcc097283440596537ff055685b0 | /app/src/main/java/gr/rambou/myicarus/TabFragment.java | ea25ab1e63f8ef8419f9aa57de2cbd15795969ce | [
"Apache-2.0"
] | permissive | AegeanHawks/MobileIcarus | a7bb3c599e0666b29ece121e8a29728631d1ae31 | ee2f30e7f77559b951ec7ff0a383d1d394541735 | refs/heads/master | 2021-01-01T19:24:37.585309 | 2017-03-05T21:50:14 | 2017-03-05T21:50:14 | 37,993,699 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,370 | java | package gr.rambou.myicarus;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
public class TabFragment extends Fragment {
public static TabLayout tabLayout;
/**
* The {@link ViewPager} that will host the section contents.
*/
public static ViewPager mViewPager;
public static int int_items = 3;
private Icarus mParam1;
/**
* The {@link android.support.v4.view.PagerAdapter} that will provide
* fragments for each of the sections. We use a
* {@link FragmentPagerAdapter} derivative, which will keep every
* loaded fragment in memory. If this becomes too memory intensive, it
* may be best to switch to a
* {@link android.support.v4.app.FragmentStatePagerAdapter}.
*/
private SectionsPagerAdapter mSectionsPagerAdapter;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mParam1 = (Icarus) getArguments().getSerializable("myicarus");
/**
*Inflate tab_layout and setup Views.
*/
View x = inflater.inflate(R.layout.tab_layout, null);
// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
mSectionsPagerAdapter = new SectionsPagerAdapter(getChildFragmentManager());
// Set up the ViewPager with the sections adapter.
tabLayout = (TabLayout) x.findViewById(R.id.tabs);
mViewPager = (ViewPager) x.findViewById(R.id.viewpager);
/**
*Set an Apater for the View Pager
*/
mViewPager.setAdapter(mSectionsPagerAdapter);
/**
* Now , this is a workaround ,
* The setupWithViewPager dose't works without the runnable .
* Maybe a Support Library Bug .
*/
tabLayout.post(new Runnable() {
@Override
public void run() {
tabLayout.setupWithViewPager(mViewPager);
}
});
return x;
}
/**
* A {@link FragmentPagerAdapter} that returns a fragment corresponding to
* one of the sections/tabs/pages.
*/
class SectionsPagerAdapter extends FragmentPagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
/**
* Return fragment with respect to Position .
*/
@Override
public Fragment getItem(int position) {
Fragment frg = null;
ArrayList<Lesson> arraylist = null;
Bundle gradesBundle = new Bundle();
gradesBundle.putSerializable("myicarus", mParam1);
switch (position) {
case 0:
frg = new MarksAllFragment();
arraylist = mParam1.getAll_Lessons();
break;
case 1:
frg = new MarksSemesterFragment();
arraylist = mParam1.getExams_Lessons();
break;
case 2:
frg = new CoursesPassedFragment();
arraylist = mParam1.getSucceed_Lessons();
break;
}
if (arraylist != null)
gradesBundle.putSerializable("arraylist", arraylist);
frg.setArguments(gradesBundle);
return frg;
}
@Override
public int getCount() {
return int_items;
}
/**
* This method returns the title of the tab according to the position.
*/
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return getString(R.string.courses_all);
case 1:
return getString(R.string.courses_semester);
case 2:
return getString(R.string.courses_passed);
}
return null;
}
}
}
| [
"nickos.bou@gmail.com"
] | nickos.bou@gmail.com |
851ea17294b76cdeec021371ea267dced79c3b08 | 2bbfede8680a5b28b25faec5829356ab3fda8a3b | /acceptance/src/test/java/acceptance/FeatureDeleteModule.java | 48cb442f9436810137adc7a3b55ba887df99e872 | [] | no_license | Lord-Asterius/M2-TF-GR7 | 0c1b512e03f78c998d87bd0ff893b23b519ecc58 | 9d46debdac9416f0bdceba29211d7c9832a91045 | refs/heads/master | 2023-08-15T10:22:51.941578 | 2021-10-12T15:47:30 | 2021-10-12T15:47:30 | 298,010,838 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,486 | java | package acceptance;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertEquals;
public class FeatureDeleteModule {
private HtmlUnitDriver m_driver;
private Map<String, Object> m_vars;
private JavascriptExecutor m_js;
@Given("^l'administrateur est connecté$")
public void theAdministratorIsConnectedOnAModuleModificationPage() {
m_driver = new HtmlUnitDriver();
m_js = m_driver;
m_vars = new HashMap<String, Object>();
Utils.connectToSite(m_driver);
Utils.loginAdmin(m_driver);
m_driver.findElement(By.linkText("Gestion des modules")).click();
}
@When("^l'administrateur tente de supprimer le module d'enseignement$")
public void theAdministratorChangeTheModuleNameWith() throws Throwable {
m_driver.findElement(By.cssSelector(".list-group-item:nth-child(3) .navbar-brand:nth-child(2) > img")).click();
}
@Then("^le module est supprimé avec succès$")
public void theNewModuleNameMustBe() throws Throwable {
List<WebElement> elements = m_driver.findElements(By.linkText("Supprime Moi"));
assertEquals(0, elements.size());
}
}
| [
"loic.sagona@gmail.com"
] | loic.sagona@gmail.com |
a80d3a377b2b7eaea413cd8ed3e76a74693be0f1 | a313cb4d5008e195eef2c92bc3d37afa3df91a30 | /src/main/java/wings/app/microblog/entity/BlackList.java | 2ddced3995137a3c5f5ab63a7788bc9cccb46449 | [] | no_license | AprilWinds/mb_service | ed3c769e5926c69d42e53d162edd57685eeb1986 | eedeb1ac1a53740d6a240fdbc02e2a7b0c56d8b1 | refs/heads/master | 2022-11-30T06:36:20.639289 | 2019-06-16T04:36:42 | 2019-06-16T04:36:42 | 178,640,090 | 0 | 0 | null | 2022-11-24T07:41:59 | 2019-03-31T03:55:57 | JavaScript | UTF-8 | Java | false | false | 405 | java | package wings.app.microblog.entity;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Data
@Entity
@Table(name = "black_list")
public class BlackList {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
private Long blockerId;
private Long blockingId;
private Date createAt;
private Date updateAt;
}
| [
"1031360756@qq.com"
] | 1031360756@qq.com |
93672ca5aab11acdec0201aada834d35ed4b3cbf | df415ff1a86a30592642356863ebcae651ba4d9f | /src/org/kitri/app/interfaces/repositories/IAuthorizationRepository.java | 176cdc207f4a629d78e0dbf58a6dcb8e2faa621f | [] | no_license | pjkhanmari/kitri-test | d38ce551e6cc1387e3d9bb46adfda9627ab92d15 | 18e3683f40dfab4009ae444e7cb40e7320157c08 | refs/heads/master | 2021-01-09T06:48:13.242980 | 2015-10-22T15:02:25 | 2015-10-22T15:02:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 301 | java | package org.kitri.app.interfaces.repositories;
import org.kitri.app.domains.users.Employee;
public interface IAuthorizationRepository {
Employee addAuth(String id, int auth) throws Exception;
int selectAuth(String id) throws Exception;
Employee removeAuth(String id, int auth) throws Exception;
} | [
"kht2199@gmail.com"
] | kht2199@gmail.com |
5c643838f5120db8c391fa77d810bb24ffabf752 | f7e58a9bd6f6f1eafc2770cf84f22c9844424b62 | /PartyPal/app/src/main/java/com/hazelwood/partypal/Custom_GRIDVIEW.java | 5feb5d8b4b386be6b81236f89fe19e638ef0f7a3 | [] | no_license | Shazelwood/AndroidProject | 462ad4913642f812844deb1712879834e21253b6 | f68e119a4f4e2aff850707d0d5c7e9476994570b | refs/heads/master | 2021-01-18T02:15:38.736278 | 2014-11-22T00:44:20 | 2014-11-22T00:44:20 | 26,970,065 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 884 | java | package com.hazelwood.partypal;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.GridView;
/**
* Created by Hazelwood on 11/13/14.
*/
public class Custom_GRIDVIEW extends GridView {
public Custom_GRIDVIEW(Context context) {
super(context);
}
public Custom_GRIDVIEW(Context c, AttributeSet set){
super(c, set);
}
public Custom_GRIDVIEW(Context c, AttributeSet set, int style){
super(c, set, style);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int customHeight = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
ViewGroup.LayoutParams params = getLayoutParams();
params.height = getMeasuredHeight();
super.onMeasure(widthMeasureSpec, customHeight);
}
}
| [
"Hazelwood@Shaes-MacBook-Pro-3.local"
] | Hazelwood@Shaes-MacBook-Pro-3.local |
e69b69db95451bd99fc65eeb2dab6e4a9ec47f37 | 32f38cd53372ba374c6dab6cc27af78f0a1b0190 | /app/src/main/java/com/autonavi/jni/ae/gmap/gloverlay/GLRctRouteOverlay.java | d20c51d0d83829b8ea9d5bdd1c36e23708ad5a54 | [] | no_license | shuixi2013/AmapCode | 9ea7aefb42e0413f348f238f0721c93245f4eac6 | 1a3a8d4dddfcc5439df8df570000cca12b15186a | refs/heads/master | 2023-06-06T23:08:57.391040 | 2019-08-29T04:36:02 | 2019-08-29T04:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,851 | java | package com.autonavi.jni.ae.gmap.gloverlay;
import com.autonavi.jni.ae.data.DataService;
import com.autonavi.jni.ae.gmap.GLMapEngine;
import com.autonavi.jni.ae.gmap.utils.GLMapUtil;
import java.io.File;
public class GLRctRouteOverlay extends GLOverlay {
public static class AmapNaviInfo {
public int n3DEDLinkNumber;
public int n3DSTLinkNumber;
public long n64routeRemainDistance;
public long n64routeRemainTime;
public int ncurrentLinkNumber;
public int ncurrentSegNumber;
public int nmaneuverID;
public int nsegmentLength;
public int nsegmentRemainDistance;
public int nsegmentRemainTime;
public int ntype;
}
public static class AmapNaviTextures {
public int mCarResID;
public int mComPassResID;
public int mShineResID;
}
public static class AmapRctPolyline {
public int nCount;
public int nIndex;
public int[] xs;
public int[] ys;
public int[] zs;
}
public static class AmapRctRoutePath {
public int n2DLinkNum;
public int n3DLinkNum;
public AmapRctPolyline[] p2DLink;
public AmapRctPolyline[] p3DLink;
}
public static class AmapRctRouteProperty {
public int mArrowTexId;
public int mFlyLineTexId;
public AmapRctRouteTextureInfo mFlylineArrowTexInfo = new AmapRctRouteTextureInfo();
public AmapRctRouteTextureInfo mFlylineTexInfo = new AmapRctRouteTextureInfo();
public float mSideWidth;
public float mWidth;
}
public static class AmapRctRouteTextureInfo {
public float glTexLen;
public float glstart;
public float x1;
public float x2;
public float y1;
public float y2;
}
public static class AmapTmcProperty {
public int mFillColor;
public int mSideColor;
public int mTmcStatus;
}
private static native void nativePauseNavi(long j);
private static native void nativeResumeNavi(long j);
private static native int nativeSetGpsPos(long j, int i, int i2, int i3, float f);
private static native int nativeSetParam(long j, int i, int i2, int i3, int i4, int i5);
private static native void nativeSetRCTCompassMarkerTextures(long j, int i, int i2, int i3, int i4, int i5);
private static native int nativeSetRCTFlyRoute(long j, byte[] bArr, int i, int[] iArr, float[] fArr);
private static native int nativeSetRCTFlyTmc(long j, byte[] bArr, int i, int[] iArr);
private static native void nativeSetRCTNaviTextures(long j, int[] iArr);
private static native int nativeSetRCTStyleParam(long j, byte[] bArr);
private static native void nativeStartNavi(long j);
private static native void nativeStopNavi(long j);
private static native int nativeUpdataCarPos(long j, float[] fArr);
private static native void nativeUpdataNaviInfo(long j, int[] iArr);
public int SetRCTFlyRoute(byte[] bArr, int i) {
return 0;
}
public void clearFocus() {
}
public int getOverlayPriority() {
return 0;
}
public void setMaxCountShown(int i) {
}
public void setMaxDisplayLevel(float f) {
}
public void setMinDisplayLevel(float f) {
}
public void setOverlayItemPriority(int i) {
}
public void setOverlayOnTop(boolean z) {
}
public void setOverlayPriority(int i) {
}
public GLRctRouteOverlay(int i, akq akq, int i2) {
super(i, akq, i2);
this.mNativeInstance = akq.d.createRealCityController(i);
}
public long getNativeInstatnce() {
return this.mNativeInstance;
}
private int copy2Inter(int[] iArr, int i, AmapRctPolyline[] amapRctPolylineArr, int i2) {
int i3 = i;
for (int i4 = 0; i4 < i2; i4++) {
int i5 = amapRctPolylineArr[i4].nCount;
int i6 = i3 + 1;
iArr[i3] = i5;
int i7 = i6 + 1;
iArr[i6] = amapRctPolylineArr[i4].nIndex;
System.arraycopy(amapRctPolylineArr[i4].xs, 0, iArr, i7, i5);
int i8 = i7 + i5;
System.arraycopy(amapRctPolylineArr[i4].ys, 0, iArr, i8, i5);
int i9 = i8 + i5;
System.arraycopy(amapRctPolylineArr[i4].zs, 0, iArr, i9, i5);
i3 = i9 + i5;
}
return i3;
}
public int SetRCTFlyRoute(byte[] bArr, int i, AmapRctRouteProperty amapRctRouteProperty) {
if (amapRctRouteProperty == null) {
amapRctRouteProperty = new AmapRctRouteProperty();
}
return nativeSetRCTFlyRoute(this.mNativeInstance, bArr, i, new int[]{amapRctRouteProperty.mFlyLineTexId, amapRctRouteProperty.mArrowTexId}, new float[]{amapRctRouteProperty.mFlylineTexInfo.x1, amapRctRouteProperty.mFlylineTexInfo.y1, amapRctRouteProperty.mFlylineTexInfo.x2, amapRctRouteProperty.mFlylineTexInfo.y2, amapRctRouteProperty.mFlylineTexInfo.glstart, amapRctRouteProperty.mFlylineTexInfo.glTexLen, amapRctRouteProperty.mFlylineArrowTexInfo.x1, amapRctRouteProperty.mFlylineArrowTexInfo.y1, amapRctRouteProperty.mFlylineArrowTexInfo.x2, amapRctRouteProperty.mFlylineArrowTexInfo.y2, amapRctRouteProperty.mFlylineArrowTexInfo.glstart, amapRctRouteProperty.mFlylineArrowTexInfo.glTexLen, amapRctRouteProperty.mWidth, amapRctRouteProperty.mSideWidth});
}
public int SetRCTFlyTMC(byte[] bArr, int i, AmapTmcProperty[] amapTmcPropertyArr) {
int[] iArr = new int[((amapTmcPropertyArr.length * 3) + 1)];
iArr[0] = amapTmcPropertyArr.length;
for (int i2 = 0; i2 < amapTmcPropertyArr.length; i2++) {
int i3 = i2 * 3;
iArr[i3 + 1] = amapTmcPropertyArr[i2].mTmcStatus;
iArr[i3 + 2] = amapTmcPropertyArr[i2].mFillColor;
iArr[i3 + 3] = amapTmcPropertyArr[i2].mSideColor;
}
return nativeSetRCTFlyTmc(this.mNativeInstance, bArr, i, iArr);
}
public int SetRCTFlyDirection(boolean z) {
byte[] bArr;
String str = z ? "3dlandscape.xml" : "3dportrait.xml";
String dataPath = DataService.getInstance().getDataPathManager().getDataPath();
StringBuilder sb = new StringBuilder();
sb.append(dataPath);
sb.append(str);
File file = new File(sb.toString());
if (file.exists()) {
bArr = amz.a(file.getAbsolutePath());
} else {
bArr = GLMapUtil.decodeAssetResData(this.mGLMapView.c, "map_assets/".concat(String.valueOf(str)));
}
return nativeSetRCTStyleParam(this.mNativeInstance, bArr);
}
public int navistart() {
nativeStartNavi(this.mNativeInstance);
return 0;
}
public int navipause() {
nativePauseNavi(this.mNativeInstance);
return 0;
}
public int naviresume() {
nativeResumeNavi(this.mNativeInstance);
return 0;
}
public int navistop() {
nativeStopNavi(this.mNativeInstance);
return 0;
}
public int SetNaviMode(int i) {
return nativeSetParam(this.mNativeInstance, 0, i, 0, 0, 0);
}
public int SetHeadingSyncToNormal(int i) {
return nativeSetParam(this.mNativeInstance, 1, i, 0, 0, 0);
}
public void UpdataNaviInfo(AmapNaviInfo amapNaviInfo) {
nativeUpdataNaviInfo(this.mNativeInstance, new int[]{amapNaviInfo.ntype, amapNaviInfo.nmaneuverID, (int) (amapNaviInfo.n64routeRemainDistance & -1), (int) ((amapNaviInfo.n64routeRemainDistance >> 32) & -1), (int) (amapNaviInfo.n64routeRemainTime & -1), (int) ((amapNaviInfo.n64routeRemainTime >> 32) & -1), amapNaviInfo.nsegmentRemainDistance, amapNaviInfo.nsegmentLength, amapNaviInfo.nsegmentRemainTime, amapNaviInfo.ncurrentSegNumber, amapNaviInfo.ncurrentLinkNumber, amapNaviInfo.n3DSTLinkNumber, amapNaviInfo.n3DEDLinkNumber});
}
public int SetGpsPos(int i, int i2, int i3, float f) {
return nativeSetGpsPos(this.mNativeInstance, i, i2, i3, f);
}
public int UpdataCarPos(float[] fArr) {
return nativeUpdataCarPos(this.mNativeInstance, fArr);
}
public void SetNaviTextures(AmapNaviTextures amapNaviTextures) {
nativeSetRCTNaviTextures(this.mNativeInstance, new int[]{amapNaviTextures.mCarResID, amapNaviTextures.mComPassResID, amapNaviTextures.mShineResID});
}
public void SetCompassMarkerTextures(int i, int i2, int i3, int i4, int i5) {
nativeSetRCTCompassMarkerTextures(this.mNativeInstance, i, i2, i3, i4, i5);
}
public void releaseInstance() {
if (this.mNativeInstance != 0) {
long j = this.mNativeInstance;
this.mNativeInstance = 0;
GLMapEngine.destoryRealCityController(this.mEngineID, j);
}
}
public int getType() {
return this.mNativeInstance == 0 ? -1 : 9;
}
public int getSubType() {
return this.mNativeInstance == 0 ? -1 : 0;
}
public void removeItem(int i) {
if (this.mNativeInstance != 0) {
}
}
public void removeAll() {
if (!(this.mNativeInstance == 0 || this.mGLMapView == null)) {
this.mGLMapView.r(this.mGLMapView.d.getBelongToRenderDeviceId(this.mEngineID));
}
}
public int getSize() {
return this.mNativeInstance == 0 ? 0 : 0;
}
public void setVisible(boolean z) {
if (this.mNativeInstance != 0) {
this.mGLMapView.r(this.mGLMapView.d.getBelongToRenderDeviceId(this.mEngineID));
}
}
public boolean isVisible() {
return this.mNativeInstance != 0;
}
public void setClickable(boolean z) {
if (this.mNativeInstance != 0) {
}
}
public boolean isClickable() {
return this.mNativeInstance != 0;
}
public boolean getIsInBundle() {
return this.mIsInBundle;
}
}
| [
"hubert.yang@nf-3.com"
] | hubert.yang@nf-3.com |
d76cae426326cd6cced495dfb025a083eb59e8a1 | 8b6843e690767bd441203bb845b1aac65a951138 | /java_Test_System_v0.0.0/src/data/RandomPaper.java | 8b6a17fabfbabdad47a9714affcdb8fad0a956e8 | [] | no_license | BigDukee/Java | 6ab969eb06a4d6d3021d0a77e9164e9bd4419e2b | 9f86bac574eb948fc3590b3135a5f8cd1dd70123 | refs/heads/master | 2023-01-07T04:51:52.454286 | 2020-11-08T16:18:55 | 2020-11-08T16:18:55 | 292,234,753 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,453 | java | //随机生成试卷
package data;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import java.io.*;
import java.util.ArrayList;
import java.util.Random;
//试卷,问题,文件,读取excel表格,list
public class RandomPaper implements GivePaper {
Paper paper = new Paper();
problem[] problems;
File file;
InputStream in;
Workbook wb;
Sheet sheet;
ArrayList<Integer> list = new ArrayList<>();
//重写getPaper接口
@Override
public Paper getPaper(String filename, int amount) {
boolean b = setExcel(filename); //判断读取是否成功
if (b) {
randomGive(amount); //成功以后随机生成试卷
}
paper.setProblems(problems); //生成试卷
return paper;
}
private void randomGive(int amount) {
list.clear(); //释放集合
sheet = wb.getSheet(0); //获取第一张sheet
int sheetAmount = sheet.getRows(); //获取sheet的行
int realAmount = Math.min(amount, sheetAmount-1); //总数或行数-1最小值中最小值
problems = new problem[realAmount]; //定义problems数组大小
for (int i=0; i<sheetAmount-1; i++){ //将sheet的行数给list集合
list.add(i+1);
}
Random rand = new Random();
for (int i=0; i<problems.length; i++){
int m = rand.nextInt(list.size()); //生成随机数
int index = list.remove(m); //不用get!
Cell[] cells = sheet.getRow(index); //从单元格拿出索引值,为了给问题赋值
problems[i] = new problem();
problems[i].setContent("第 " + (i+1) + " 题 " + cells[0].getContents().trim());
problems[i].setCorrectAnswer(cells[1].getContents().trim());
problems[i].setChoiceA(cells[2].getContents().trim());
problems[i].setChoiceB(cells[3].getContents().trim());
problems[i].setChoiceC(cells[4].getContents().trim());
problems[i].setChoiceD(cells[5].getContents().trim());
String type = cells[6].getContents().trim();
if (type.equals("x")) {
problems[i].setChoice(true);
problems[i].setJudge(false);
}
if (type.equals("p")) {
problems[i].setJudge(true);
problems[i].setChoice(false);
}
}
}
//读取excel文件
private boolean setExcel(String filename) {
boolean b = true;
//异常处理
try {
file = new File(filename);
in = new FileInputStream(file);
wb = Workbook.getWorkbook(in);
in.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
b = false;
} catch (IOException e) {
e.printStackTrace();
b = false;
} catch (BiffException e) {
e.printStackTrace();
b = false;
}
return b;
}
@Override
public Paper getPaper() {
return null;
}
}
| [
"50351970+BigDukee@users.noreply.github.com"
] | 50351970+BigDukee@users.noreply.github.com |
c3bb8835249f02e53e06f84b8cd413813a6f0bc6 | eaa7abca125a59c2a4d685fdb844cb1c0b8703b6 | /tools/qidea/src/main/java/org/apache/zest/ide/plugin/idea/common/vfs/VirtualFileUtil.java | f1db9cb0fb341e673939b538a1f45f0f12a5e218 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"W3C"
] | permissive | barsifedron/zest-java | 9ee747b1490ca5e7f1a901081580e3ae1c323690 | dc30f4b41497087280ac734d2285123bf2f1f398 | refs/heads/develop | 2020-06-16T12:06:48.714025 | 2016-11-28T18:27:06 | 2016-11-28T18:27:06 | 75,105,997 | 0 | 0 | null | 2016-11-29T17:38:05 | 2016-11-29T17:38:04 | null | UTF-8 | Java | false | false | 2,265 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zest.ide.plugin.idea.common.vfs;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiFileSystemItem;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @author edward.yakop@gmail.com
* @since 0.1
*/
public final class VirtualFileUtil
{
/**
* @param element element to process.
* @return The containing virtual file of the element.
* @since 0.1
*/
@Nullable
public static VirtualFile getVirtualFile( @NotNull PsiElement element )
{
if( element instanceof PsiFileSystemItem )
{
PsiFileSystemItem fileSystemItem = (PsiFileSystemItem) element;
return fileSystemItem.getVirtualFile();
}
// If it's not a file system, assume that this is an element within a file
PsiFile containingFile = element.getContainingFile();
if( containingFile == null )
{
return null;
}
VirtualFile virtualFile = containingFile.getVirtualFile();
if( virtualFile != null )
{
return virtualFile;
}
PsiFile originalFile = containingFile.getOriginalFile();
if( originalFile == null )
{
return null;
}
return originalFile.getVirtualFile();
}
private VirtualFileUtil()
{
}
}
| [
"niclas@hedhman.org"
] | niclas@hedhman.org |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.