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
a4e27c3ce13ca37c18df106299e549260daccb45
935f1be4d0bd683dc33e744a7a0418c2e6581017
/core/src/pl/swidurski/pacman/actions/ChangeBehaviourAction.java
2910bb94d92d98b48094e36730b5e7b1d2aec012
[]
no_license
TheKrystek/Pacman
d6967dc8378555a468adcea61ed3a32b7f3f204b
9ae96bc17a6ef49d0b21058d3f05fe27e4d5e427
refs/heads/master
2021-01-01T05:25:46.582416
2016-05-20T14:46:26
2016-05-20T14:46:26
56,179,975
0
0
null
null
null
null
UTF-8
Java
false
false
1,675
java
package pl.swidurski.pacman.actions; import com.badlogic.gdx.Gdx; import pl.swidurski.pacman.map.Map; import pl.swidurski.pacman.map.elements.Ghost; import pl.swidurski.pacman.map.elements.MapElement; import pl.swidurski.pacman.map.elements.MovableObject; import java.util.Timer; import java.util.TimerTask; public class ChangeBehaviourAction implements Action { long time; Timer timer = new Timer(); boolean started = false; Action lastAction; public ChangeBehaviourAction(long time) { this.time = time; System.out.println("CHANGE ACTION"); } private void startTimer(Map map) { if (started) return; start(map); timer.schedule(new TimerTask() { @Override public void run() { map.getPacman().setSpeed(1f); for (Ghost ghost : map.getGhosts()) { if (ghost.getMovingAction() instanceof RunAction) ghost.setMovingAction(new ChaseAction(ghost.getOffset())); Gdx.app.postRunnable(() -> ghost.setEatable(false)); } } }, time * 1000); } private void start(Map map) { started = true; map.getPacman().setSpeed(2f); // usun akcje polowania wszystkim duchom for (Ghost ghost : map.getGhosts()) { ghost.setMovingAction(new RunAction(ghost.getOffset())); Gdx.app.postRunnable(() -> ghost.setEatable(true)); } } @Override public void execute(MovableObject source, MapElement<?> element, Map map) { if (!started) startTimer(map); } }
[ "krystian@swidurski.pl" ]
krystian@swidurski.pl
1ed6d90a8efad0f0c4ab5888c3c36ad00234e185
2eb26e06c4b8e4de979da970108b87f27e4f231d
/POO/src/Interfaces/Principal.java
cdee33fdb93484a3d18601d4d2fcfc6b01814666
[]
no_license
joseDG/Learning-Java
d640ebc2bab6f296a620a108ec7aaafd9519fdcd
fa23ac61b7361a36c076a635af19d7df4dd0aca6
refs/heads/master
2023-06-17T10:06:27.520574
2021-07-07T14:28:58
2021-07-07T14:28:58
383,827,189
0
0
null
null
null
null
UTF-8
Java
false
false
619
java
/* * Herencia Multiple: hace referenci a la caracteristicas de los lenguajes * de programacion orientadas a objetos en la que una clase puede heredar * atributos y metods de mas de una super clase permite simular la herencia multiple. La interfaz solo es publico o default todos sus metodos son abstractos todos sus atributos son final (constantes) */ package Interfaces; public class Principal { public static void main(String[] args) { MusicoEstudiante mse = new MusicoEstudiante(); mse.hablar(); mse.estudiar(); mse.tocarMusica(); } }
[ "josethp1@gmail.com" ]
josethp1@gmail.com
33f91ef823d48f30d92b9ff81ab9b7fd1acc31bc
3b0e7571b725e91c86d0654996b126ff445cadd9
/JAVA/JAVAStandingAssignment/src/Q6/print_nos.java
a485236cfe8e1e16a83abdc6612ab8143ff97608
[ "MIT" ]
permissive
harshit-budhraja/CSE-Practicals
83b49913511e0dc483615b78d4e9d7cecfa84d32
485ea69fdb3c8f188d9979c7bf3e854fd621212f
refs/heads/master
2021-09-16T20:18:55.290854
2018-06-24T15:06:25
2018-06-24T15:06:25
87,147,489
1
0
null
null
null
null
UTF-8
Java
false
false
279
java
package Q6; /** * */ /** * @author harshitbudhraja * */ public class print_nos { public static void main(String[] args) { // TODO Auto-generated method stub int i=0; for(i=0;i<=1001;i++) { if(i%7!=0 & i%9!=0) { System.out.println(i); } } } }
[ "harshitbudhraja1301@gmail.com" ]
harshitbudhraja1301@gmail.com
d2e80155a57127229a7f9c3b371c302e4ae98feb
1f9d2f97a540687362242cfa0c51d848e830d29c
/Practice/src/BinarySearch.java
20f11c88cde6d7955418800a4f75d92cdc85625d
[]
no_license
abhishekbansal31/DSA
61d838bb6c01271b798b12c520d52c952e178269
8f8ac0bb0f152f02d7abab63a469aa85e20a7907
refs/heads/master
2022-06-25T16:06:53.161271
2019-07-13T17:15:30
2019-07-13T17:15:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
621
java
import java.util.*; public class BinarySearch { static int search(int[] arr,int num) { int big=0,end=arr.length-1,mid=end/2; while(big<=end) { mid=(big+end)/2; if(num==arr[mid]) { return mid; } else if(num<arr[mid]) { end=mid-1; } else big=mid+1; } return -1; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t=sc.nextInt(); int n=sc.nextInt(); int[] arr=new int[n]; for(int i=0;i<n;i++) { arr[i]=sc.nextInt(); } while(t-->0) { int num=sc.nextInt(); System.out.println(search(arr,num)); }} }
[ "abhishekbansal643@gmail.com" ]
abhishekbansal643@gmail.com
0a43accc29ea3a81e995e2d0eb4df621dd17ee9e
ea46516ab24f34121df85dfa801379c94cecaba1
/.svn/pristine/97/97603a9d9cbb7bcadf5e829d7329abd687c684ce.svn-base
6a1967032335ab1fcabefd8122c206e9c81a45c7
[]
no_license
guominhui/DataCenter
dc81466db6f1218f61285727d6b8c84c6b536267
0b1299423658ad879fc4c7a5cb7f11c697cc9ac2
refs/heads/master
2020-03-19T03:15:41.459763
2018-06-04T01:40:23
2018-06-04T01:40:23
135,710,778
0
1
null
null
null
null
UTF-8
Java
false
false
413
package com.dictionary; public enum ErrorDictionary { not_your_pionner(-10001), you_are_not_recommender(-10002), game_uid_notExist(-10003),// proxy_uid_hasExist(-10004),// date_tranform_err(-10005);// private int value; private ErrorDictionary(int value) { this.value = value; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } }
[ "guominhuiloce@sina.com" ]
guominhuiloce@sina.com
3010bc05d836d9fda282368031bfcc0ac9de29a6
ec9dd42ccc58924d0e933173d814d384236ed9e9
/menu.java
4ef478d3e8a8456c540d64ce35fae241f67035fd
[]
no_license
SnowyBerke/Hacktoberfest2020-JKLU
8c557db21210e936b5c7aef74c14b857b9c3b262
c93b9aa69f68216784ba79fc13ecb461307e8e41
refs/heads/main
2023-01-05T01:19:48.404428
2020-10-30T13:47:51
2020-10-30T13:47:51
308,957,906
0
0
null
2020-10-31T19:34:18
2020-10-31T19:34:17
null
UTF-8
Java
false
false
2,163
java
import java.util.Scanner; public class menu { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Queue Test\n"); System.out.println("Enter Size of Integer queue "); int Max = scan.nextInt(); char ch; do{ System.out.println("\n Queue Operations"); System.out.println("1. enque"); System.out.println("2. deque"); System.out.println("3. peek"); System.out.println("4. check empty"); System.out.println("5. check full"); System.out.println("6. no of element in queue"); System.out.println("7. Traversal"); int choice = scan.nextInt(); switch (choice) { case 1 : System.out.println("Enter integer element to enque"); // val; // enque (val) break; case 2 : System.out.println("deque Element = " ); break; case 3 : System.out.println("Peek Element = "); break; case 4 : System.out.println("Empty status = " ); break; case 5 : System.out.println("Full status = " ); break; case 6 : System.out.println("Size = " ); break; default : System.out.println("Wrong Entry \n "); break; } /* display stack */ System.out.println("\nDo you want to continue (Type y or n) \n"); ch = scan.next().charAt(0); } while (ch == 'Y'|| ch == 'y'); } }
[ "noreply@github.com" ]
noreply@github.com
72d250d5dfa3d7bfee42a5d98e3ac137877abe56
cbb3e311c0ead9a1168eaea8825dcb5d5b4bd625
/sca-gateway/src/main/java/com/yuhb/gateway/GateWayApplication.java
4d18651d33dfd125356da6fdfba12fe35e9b6732
[]
no_license
JadeLuo/spring-cloud-alibaba-samples
26fb6611760cb1f480026ea3c00ad57fb5cff257
0585498d686a81d7d4465c5c38efeefc81f81afa
refs/heads/master
2021-03-02T07:40:21.533471
2020-02-25T13:20:31
2020-02-25T13:20:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,188
java
package com.yuhb.gateway; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.context.annotation.Bean; /** * Created by yu.hb on 2020-01-09 */ @SpringBootApplication @EnableDiscoveryClient @EnableConfigurationProperties(TestConfig.class) public class GateWayApplication { public static void main(String[] args) { SpringApplication.run(GateWayApplication.class, args); } @Bean public ApplicationRunner runner(TestConfig testConfig) { return args -> { Integer integerVal = (Integer) testConfig.getMetadata().get("intKey"); Boolean booleanVal = (Boolean) testConfig.getMetadata().get("booleanKey"); System.out.println(integerVal); System.out.println(booleanVal); System.out.println(testConfig.toString()); }; } }
[ "danielyu96@163.com" ]
danielyu96@163.com
bd7e1573acaea4aba94a388f85aeba48ace2f88b
fe606be692cbc281ef49eed1394dafdd0d634fd8
/users/src/test/java/cat/tecnocampus/UsersApplicationTests.java
a3df9cba812911cea3adf37f95d9fe7bd6ee06c3
[]
no_license
DSI18-19/examen-practic-rgili
ab534384a8755932a9edeb3bfc44fe7993e4c3e4
8cd563c6528c614e224397dfe6a0402d2e5719f7
refs/heads/master
2020-04-29T02:51:33.440518
2019-03-15T11:58:00
2019-03-15T11:58:00
175,786,100
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package cat.tecnocampus; 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 UsersApplicationTests { @Test public void contextLoads() { } }
[ "roure@tecnocampus.cat" ]
roure@tecnocampus.cat
90e48e7f51da0b0415991459b9e65d5ac18448da
cabef176e2d15436c7f597a91e21842246e343d0
/app/src/main/java/com/telesoftas/edvinas/onboardingedvblk/utils/network/listeners/NetworkStatusListener.java
65e4370523fcf16f71ebe5d70c5b66b32163b6ce
[]
no_license
edvbal/Capstone
1b5af1ce851ca912e674d688ba24ff0b0d3151bc
15da9c5ba9305d9cced2f3ab9d00e1a9bfe30cb4
refs/heads/master
2020-03-27T11:15:44.495433
2018-08-29T05:02:41
2018-08-29T05:02:41
146,474,586
0
0
null
null
null
null
UTF-8
Java
false
false
167
java
package com.telesoftas.edvinas.onboardingedvblk.utils.network.listeners; public interface NetworkStatusListener { void isNetworkConnected(boolean isConnected); }
[ "edvblk@telesoftas.com" ]
edvblk@telesoftas.com
3109279e972fd6ceb461135c877b340175408c4a
33b1148cb3c2b6ad7644bb36afce0b3e43d475e3
/src/RacingBois/Main.java
567be595779bbdc9f7fbf327e6c7be11c6fb98d7
[]
no_license
tuandang210/Thread
1a24f7296c58c2edfa07c6a97da60a36b64f19b6
4bf155618f98437d404b20d97afb2862d182a392
refs/heads/master
2023-04-12T07:08:59.435927
2021-04-28T08:50:02
2021-04-28T08:50:02
362,336,606
0
0
null
null
null
null
UTF-8
Java
false
false
518
java
package RacingBois; public class Main { public static int DISTANCE = 100; public static int STEP = 2; public static void main(String[] args) { Car carA = new Car("A"); Car carB = new Car("B"); Car carC = new Car("C"); Thread thread1 = new Thread(carA); Thread thread2 = new Thread(carB); Thread thread3 = new Thread(carC); System.out.println("Distance: 100KM"); thread1.start(); thread2.start(); thread3.start(); } }
[ "dangminhtuan.arwen@gmail.com" ]
dangminhtuan.arwen@gmail.com
539dd5d68284feac0a99738fa31da0f7274a3949
c2779b9e8c5fd829e314bb73ad1a6b46db31750d
/Git002/StoreManage/src/com/auth/util/Page.java
54c4222ba87e30aa8eefa0a142616edd6de3de43
[]
no_license
xz0823120/Git002
1e2e831a6311a02a398b76a5ad23fe31a1f09615
353025c9de0b2fb3db6befbe9041db07dee614c5
refs/heads/master
2022-10-15T10:00:52.250681
2020-05-27T08:14:55
2020-05-27T08:14:55
267,258,688
0
0
null
null
null
null
UTF-8
Java
false
false
1,766
java
package com.auth.util; import java.util.List; public class Page { //每页显示条数 private int pageNum=5; //总条数 private int totalNum=0; //当前页码 private int currNo=1; //总页数 private int totalPage=0; //查询下标位置,limit 中的第一个参数 private int pageIndex=0; //存储返回的集合对象 private List<?> resultList; //请求地址 private String urlString; //请求参数 private String params; public Page() { } public Page(int totalNum, int currNo) { super(); this.totalNum = totalNum; this.currNo = currNo; } public int getPageNum() { return pageNum; } public void setPageNum(int pageNum) { this.pageNum = pageNum; } public int getTotalNum() { return totalNum; } public void setTotalNum(int totalNum) { this.totalNum = totalNum; } //当前页码 public int getCurrNo() { if(currNo==0){ currNo=1; } return currNo; } public void setCurrNo(int currNo) { this.currNo = currNo; } //总页数 public int getTotalPage() { totalPage=(totalNum%pageNum==0)?(totalNum/pageNum):(totalNum/pageNum)+1; return totalPage; } public void setTotalPage(int totalPage) { this.totalPage = totalPage; } //查询下标位置 public int getPageIndex() { return pageNum*(currNo-1); } public void setPageIndex(int pageIndex) { this.pageIndex = pageIndex; } public List<?> getResultList() { return resultList; } public void setResultList(List<?> resultList) { this.resultList = resultList; } public String getUrlString() { return urlString; } public void setUrlString(String urlString) { this.urlString = urlString; } public String getParams() { return params; } public void setParams(String params) { this.params = params; } }
[ "982206231@qq.com" ]
982206231@qq.com
4f62334bc7370bafe1a2b20068a527f54313a658
f13083c1f27c3b8d93d9f78352f26406fdfcddda
/src/main/java/gettingstarted/config/FileSystemStorageProperties.java
0bb522ffbe9e9af359ce3279e78608ea6b05d913
[]
no_license
paulcwarren/anhtuan-ait-example
e198fab368f22e18957ef68753e94084b3a8b163
6832eccb52111b6071356e93e2caf85cd602575d
refs/heads/main
2023-03-29T19:41:25.531816
2021-04-07T04:47:25
2021-04-07T04:47:25
355,414,712
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package gettingstarted.config; import lombok.AllArgsConstructor; import lombok.Getter; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConstructorBinding; import org.springframework.stereotype.Component; @Getter @AllArgsConstructor @ConstructorBinding @ConfigurationProperties(prefix = "content.fs") /** * Properties of this class are immutable. * @author Le Anh Tuan */ public class FileSystemStorageProperties { private final String filesystemRoot; private String videoPath; private String classManagementDataPath; private String programSubmissionDataPath; }
[ "warrenpa@vmware.com" ]
warrenpa@vmware.com
66d437affcc79b8aec8c6d1dd3caa2236a62e3c8
55c1597a69a11c39394f00bf7b237f8802baafc3
/KubanKreditTest/app/src/main/java/ru/kubankredit/kubankredittest/RequestManager.java
7fed80a693770e23d3f1e2d5df2b01622b9ddce7
[]
no_license
styni/AndroidEducation
c4e10d7f4d4f94e095ed8375978f73faace8e3aa
5fe3acf6f97bc57b3cde0fdb9e91eb52cde548f2
refs/heads/master
2022-09-21T12:57:12.888390
2020-06-05T11:45:21
2020-06-05T11:45:21
267,790,851
0
0
null
null
null
null
UTF-8
Java
false
false
2,659
java
package ru.kubankredit.kubankredittest; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class RequestManager { private static int CONNECTION_TIMEOUT = 1000; private static int HTTP_WARNING = 461; public static String getResponse(URL url) throws IOException { HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Content-Type", "application/json"); connection.setConnectTimeout(CONNECTION_TIMEOUT); connection.setReadTimeout(CONNECTION_TIMEOUT); try { final StringBuilder content = new StringBuilder(); if (HttpURLConnection.HTTP_OK == connection.getResponseCode()) { content.append("Success\n"); } else if (HttpURLConnection.HTTP_INTERNAL_ERROR == connection.getResponseCode()) { content.append("Error\n"); } else if (HttpURLConnection.HTTP_UNAUTHORIZED == connection.getResponseCode() || HTTP_WARNING == connection.getResponseCode()) { content.append("Warning\n"); } return content.toString(); } catch (final Exception ex) { ex.printStackTrace(); return ""; } finally { connection.disconnect(); } } public static String postResponse(URL url) throws IOException { HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "application/json"); connection.setConnectTimeout(CONNECTION_TIMEOUT); connection.setReadTimeout(CONNECTION_TIMEOUT); connection.setDoOutput(true); connection.setDoInput(true); try { final StringBuilder content = new StringBuilder(); if (HttpURLConnection.HTTP_OK == connection.getResponseCode()) { content.append("Success\n"); } else if (HttpURLConnection.HTTP_INTERNAL_ERROR == connection.getResponseCode()) { content.append("Error\n"); } else if (HttpURLConnection.HTTP_UNAUTHORIZED == connection.getResponseCode() || HTTP_WARNING == connection.getResponseCode()) { content.append("Warning\n"); } return content.toString(); } catch (final Exception ex) { ex.printStackTrace(); return ""; } finally { connection.disconnect(); } } }
[ "dmitry.yurchenko9907@gmail.com" ]
dmitry.yurchenko9907@gmail.com
896ac5c009c1a7cdc38471a97838f614a99b4ed8
cd77b8e5fb4e397efa948146258e74e8fc3293bd
/03-conditional-loop/src/com/company/VolumeOfPrism.java
86e6f9d7b48581e2e95b7157f6c22dbb882a8f82
[]
no_license
yashdreamsdevelopment/DSA-Bootcamp-Assignment
a89a6f94646b8120b808135ec26d8ab806630f2f
fb1c84350b221cf1658fee7142cfabf4698a5912
refs/heads/main
2023-08-28T08:14:55.337470
2021-10-24T04:08:07
2021-10-24T04:08:07
410,167,028
0
0
null
null
null
null
UTF-8
Java
false
false
651
java
package com.company; import java.util.Scanner; public class VolumeOfPrism { public static void main(String[] args) { // Question: Volume Of Prism // discussion: v = B x H --> here, b = base area, h = height // Solution: Scanner sc = new Scanner(System.in); System.out.println("Enter the Base Area: "); int b = sc.nextInt(); System.out.println("Enter the height"); int h = sc.nextInt(); float volume = volumeOfPrism(b, h); System.out.println("The volume of prism is: " + volume); } static float volumeOfPrism(int b, int h){ return b * h; } }
[ "yash.mangate1@gmail.com" ]
yash.mangate1@gmail.com
56eb099a800efdb37f88550a792ba96a297e2f28
32bd9e1535c85bc2180a820d3616019d7952d033
/CoffeeClicker/app/src/main/java/com/example/coffeeclicker/FinaleAnimation.java
f1486168435d0de36620a14dfa3e4c5eb2ea7dd4
[]
no_license
AavaGames/CoffeeClicker
30fbe17d1ff07d81eefd9726637885bd11fd279c
4d81a6c52c3edc3a30a9cc231af9aa2da494b60b
refs/heads/master
2022-11-09T18:20:37.875777
2020-06-22T17:52:49
2020-06-22T17:52:49
267,116,319
0
0
null
null
null
null
UTF-8
Java
false
false
3,965
java
package com.example.coffeeclicker; import android.graphics.drawable.AnimationDrawable; import android.util.Log; import android.view.animation.Animation; import android.widget.Button; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; public class FinaleAnimation { GameActivity gameActivity; //private enum AnimationState { FadingButtons, Intro, Poem, End } //private AnimationState state = AnimationState.FadingButtons; private boolean fadeButtons = false; private boolean start = true; final float safeSmallestFloat = 0.001f; private float deltaTime; private boolean poemFinished = false; private float poemTimer = 0.0f; private float poemStartTime = 11.0f; private float poemLineInterval = 2f; private String poem[] = { "There was truth after all.\n", "And all had witnessed it.\n", "Everything became one with their creator.\n", "The petty insignificance of themselves melted into the void.\n", "There was meaning to the universe.\n", "One must imagine them happy." }; public ImageButton coffeeImage; public ImageView backgroundImage; public ImageView happyImage; public FinaleAnimation(GameActivity game, ImageButton coffeeImageView, ImageView backgroundImageView, ImageView happyImageView) { gameActivity = game; coffeeImage = coffeeImageView; backgroundImage = backgroundImageView; happyImage = happyImageView; } public void Start() { fadeButtons = true; CoffeeAnimation(); BackgroundAnimation(); HappyAnimation(); } public void Update(float deltaT) { deltaTime = deltaT; if (start) { Start(); start = false; } if (fadeButtons) { FadeButtons(); } if (!poemFinished) { poemTimer += deltaTime; if (poemTimer > poemStartTime) { Poem(); } } } private float fadingTimer = 0; private float timeToFade = 2; private void FadeButtons() { fadingTimer += deltaTime; float alpha = 1 - (fadingTimer / timeToFade); for (TextView text : gameActivity.texts) { text.setAlpha((alpha)); } for (Button button : gameActivity.buyButtons) { button.setAlpha(alpha); } for (ImageView image : gameActivity.buttonImages) { image.setAlpha(alpha); } if (alpha < safeSmallestFloat) { fadeButtons = false; } } private void CoffeeAnimation() { coffeeImage.setImageResource(R.drawable.coffee_animation); AnimationDrawable animation = (AnimationDrawable)coffeeImage.getDrawable(); animation.start(); } private void BackgroundAnimation() { backgroundImage.setImageResource(R.drawable.background_animation); AnimationDrawable animation = (AnimationDrawable)backgroundImage.getDrawable(); animation.start(); } private void HappyAnimation() { happyImage.setAlpha(1.0f); happyImage.setImageResource(R.drawable.happy_animation); AnimationDrawable animation = (AnimationDrawable)happyImage.getDrawable(); animation.start(); } private void Poem() { String text = ""; float timer = poemTimer - poemStartTime; int lines = 1 + (int)(timer / poemLineInterval); for (int i = 0; i < lines; i++) { if (i >= poem.length) { Log.d("Test", "POEM FINISHED, END STATE"); poemFinished = true; gameActivity.End(); break; } text += poem[i]; } gameActivity.poemText.setText(text); } }
[ "keylogicgames@gmail.com" ]
keylogicgames@gmail.com
7d849c63fbdbb05fde6b4ef8915008cd6b623415
dbbf0c6aabb93f0fd9a4b546ffa461e8dd075356
/lib/src/test/java/com/fonfon/gsonjsonapi/model/Comment.java
21137ee0d59a9ccf1b21212d4e25b706763d66a8
[]
no_license
drfonfon/GsonJsonApi
b6b3bde90fdc7113a2a74f3546b8972ef67014c0
b379e09c6cfc3415c32ec0cdf67b0f87dc336099
refs/heads/master
2021-08-08T00:07:16.512892
2017-11-09T07:19:34
2017-11-09T07:19:34
110,080,338
0
0
null
null
null
null
UTF-8
Java
false
false
541
java
package com.fonfon.gsonjsonapi.model; import com.fonfon.gsonjsonapi.models.relationship.One; import com.fonfon.gsonjsonapi.Type; import com.fonfon.gsonjsonapi.models.Resource; @Type("comments") public class Comment extends Resource { private String body; private One<Person> author; public String getBody() { return body; } public void setBody(String body) { this.body = body; } public One<Person> getAuthor() { return author; } public void setAuthor(One<Person> author) { this.author = author; } }
[ "rdfonfon@gmail.com" ]
rdfonfon@gmail.com
61bcecd739717308efee16ff0ca608fcb42d47a7
9b70c74d4633a127787df1a101e72da886a9fe4c
/test/diego/wotlas/src/wotlas/common/power/Channeller.java
18b4edc4275bcd7c3f878899578900513918fa04
[]
no_license
wotlas/sourceforge-cvs
032d221b5f740f9c33915ff88f72019b966b080d
2064a5bab42218b5fd3898061700ebabb6a412f9
refs/heads/master
2020-05-23T16:18:13.359826
2010-08-18T20:42:39
2010-08-18T20:42:39
186,845,340
0
0
null
null
null
null
UTF-8
Java
false
false
7,052
java
/* * Light And Shadow. A Persistent Universe based on Robert Jordan's Wheel of Time Books. * Copyright (C) 2001 - WOTLAS Team * * 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 2 * 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package wotlas.common.power; import wotlas.common.*; import wotlas.common.universe.*; import java.util.*; import java.io.*; import wotlas.utils.Debug; /** Implementation of a generic WotChanneller. Any character capable of channelling * extends a Channeller class, all of which are subclasses of this. * * @author Chris * @see wotlas.common.Player * @see wotlas.common.power.Weave * @see wotlas.libs.graphics2D.Drawable */ public abstract class Channeller { /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Storage for the list of Weaves usable by this Channeller */ private HashMap weaveList = new HashMap(); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Storage for the full list of Weaves */ private HashMap fullWeaveList = new HashMap(); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Storage for the status of the True Source */ private boolean trueSourceUsable = false; private boolean trueSourceInUse = false; /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Storage for the status of the Source */ private boolean isChannelling = false; /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Constructor */ public Channeller() { /** Load the available Weave classes * ASSUMING NOT IN JAR FILE */ File weavesFiles[] = new File( "wotlas/common/power/Weaves" ).listFiles(); if( weavesFiles==null || weavesFiles.length==0 ) { Debug.signal( Debug.WARNING, this, "No Weaves found in wotlas/common/power/Weaves!" ); return; } for (int i=0; i< weavesFiles.length; i++ ) { if( !weavesFiles[i].isFile() || !weavesFiles[i].getName().endsWith(".class") ) continue; // Load the class try{ String name = weavesFiles[i].getName(); Class cl = Class.forName("wotlas.common.power.Weaves." + name.substring( 0, name.lastIndexOf(".class") ) ); if (cl==null || cl.isInterface()) continue; Object o = cl.newInstance(); if( o==null || !(o instanceof Weave) ) continue; // Ok, we have a valid Weave class. fullWeaveList.put( ((Weave) o).getName(), (Weave) o ); } catch( Exception e ) { Debug.signal( Debug.WARNING, this, e ); } } } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** To get a list of Weaves usable by this Channeller.</P> * Not modifiable directly, it is generated each time this method is called. * * @return an array of the Strings, the names of the weaves. */ public String[] getWeaveList() { return (String[] ) weaveList.keySet().toArray(); } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Add a weave to the Channeller's list * * @param weaveName the name of the new weave to be added. * @return success status */ public boolean addWeave( String weaveName ) { if ( !(fullWeaveList.containsKey(weaveName)) ) { return false; } else { weaveList.put(weaveName, fullWeaveList.get(weaveName) ); return true; } } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** To get a Weave * * @param weaveName the name of the Power (see the list produced by getPowerList()) * @return the Power */ public Weave getWeave( String weaveName ) { return (Weave) weaveList.get(weaveName); } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Seize/Embrace the Source * This is here for when I implement time spent holding the Source effects * * @return success status (true if successful) */ public boolean openSource() { isChannelling = true; return isChannelling; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Release the Source * * This is here for when I implement time spent holding the source effects */ public boolean releaseSource() { isChannelling = false; return true; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** To get the Power Points the Channeller has remaining * NOT YET IMPLEMENTED * * @return the number of Power Points the channeller has remaining */ public int getPowerPoints() { return -1; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** To get the Power level of the Channeller * * Power level will control how much of the Source can be handled, this will * determine which weaves may be used, and how much power may be put into them. * The return object of this may change to a structure with different values for * each type of flow. * * NOT YET IMPLEMENTED * @return the Power level of the Channeller */ public int getPowerLevel() { return -1; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Test if the True Source is available * * @return success status */ public boolean isTrueSourceAvailable() { return trueSourceUsable; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Toggle whether or not the True Source is in use, or the One Source * * @return the status of the True Source, true=in use */ public boolean toggleSourcePower() { if (trueSourceUsable) { trueSourceInUse = !(trueSourceInUse); return trueSourceInUse; } else { return false; } } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /** Test if the Channeller can Channel * * @return success status */ public boolean isChanneller() { return true; // Not considering the option of severed Channellers yet } }
[ "diego_zanga@users.sourceforge.net" ]
diego_zanga@users.sourceforge.net
ea6c7ddae4e87fbc2ea59b99f1a55b70f1efe9c9
2430806a2a7639cd69da0d4637a17c60fa45eb03
/src/main/java/com/fileService/FileService.java
4ac2a21d832529ef5023c2f78b2430f9331bcd16
[]
no_license
polina606257/SocialNumberLongFile
17cc6d085853d31b1fd8b1711f0163ea2a49e3cf
357c3797c5cc1147ed2e10eb2e5584826831b561
refs/heads/master
2021-02-12T19:57:36.799805
2020-03-03T12:26:15
2020-03-03T12:26:15
244,624,515
0
0
null
null
null
null
UTF-8
Java
false
false
1,485
java
package com.fileService; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.HashMap; import java.util.Map; public class FileService implements FileInterface { public Map<String, Double> createListWithoutCopy(Map<String, Double> listWithCopy) { Map<String, Double> listNoCopy = new HashMap<>(); for (Map.Entry<String, Double> data : listWithCopy.entrySet()) { if (!listNoCopy.isEmpty() && listNoCopy.containsKey(data.getKey())) { double newSumValue = listNoCopy.get(data.getKey()).doubleValue() + data.getValue().doubleValue(); listNoCopy.put(data.getKey(), newSumValue); } else { listNoCopy.put(data.getKey(), data.getValue()); } } return listNoCopy; } public void writeFileWithoutCopy(Map<String, Double> listNoCopy) { try { BufferedWriter myWriter = new BufferedWriter(new FileWriter("src/newSocNumbers.txt")); for (Map.Entry<String, Double> entry : listNoCopy.entrySet()) { myWriter.write(entry.getKey() + ";" + String.format("%.2f", entry.getValue())); myWriter.newLine(); } myWriter.close(); System.out.println("Successfully wrote to the socialNumber."); } catch (IOException e) { System.out.println("An error occurred."); e.printStackTrace(); } } }
[ "polina.shcherbinina@gmail.com" ]
polina.shcherbinina@gmail.com
b14428ac6f0d7d73173c67f31f21f2d6d24fe1d6
15a8fba2944e017f2ecb29ffc79ce71822bc579f
/nm-loan/nm-loan-comp/nm-loan-approve/src/main/java/com/hs/loan/approvecheck/entity/AppLoanApprCheck.java
a6dfde7a3a04b3fd468de3c88d77894c26f2a272
[]
no_license
cenbow/nm
875189feac6ab70605e77b6b9240b51ebe5531f3
f448c103a09ab055e9e50eb6fc77b131cc3f40ff
refs/heads/master
2021-01-20T03:53:37.880188
2017-06-28T07:51:04
2017-06-28T07:51:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,705
java
package com.hs.loan.approvecheck.entity; import java.util.Date; import java.io.Serializable; /** * APP_分期案件复核 对象 * @author autocreate * @create 2016-11-26 */ public class AppLoanApprCheck implements Serializable{ private static final long serialVersionUID = 1L; /*** */ private String id ; /*** */ private String loanNo ; /*** */ private String custNo ; /*** */ private String custName ; /*** */ private String staffNo ; /*** */ private String staffName ; /*** */ private Integer checkCnt ; /*** */ private String checkResult ; /*** */ private Date begDate ; /*** */ private Date endDate ; /*** */ private String checkNo ; /*** */ private String checkName ; /*** */ private String isForceCheck ; /*** */ private String groupId ; /*** */ private String groupName ; /*** */ private String apprTyp ; /*** */ private String apprDesc ; /*** */ private String checkRemark ; /*** */ private String fstApprResult ; /*** */ private String fstApprRemark ; /*** */ private String apprId ; /*** 初审编号 */ private String fstCheckNo ; /*** 初审编号 */ private String fstCheckName ; //构造函数 public AppLoanApprCheck(){} //getter和setter方法 /** * 获取 * @return String */ public String getId() { return id; } /** * 设置 * @param id */ public void setId(String id) { this.id = id; } /** * 获取 * @return String */ public String getLoanNo() { return loanNo; } /** * 设置 * @param loanNo */ public void setLoanNo(String loanNo) { this.loanNo = loanNo; } /** * 获取 * @return String */ public String getCustNo() { return custNo; } /** * 设置 * @param custNo */ public void setCustNo(String custNo) { this.custNo = custNo; } /** * 获取 * @return String */ public String getCustName() { return custName; } /** * 设置 * @param custName */ public void setCustName(String custName) { this.custName = custName; } /** * 获取 * @return String */ public String getStaffNo() { return staffNo; } /** * 设置 * @param staffNo */ public void setStaffNo(String staffNo) { this.staffNo = staffNo; } /** * 获取 * @return String */ public String getStaffName() { return staffName; } /** * 设置 * @param staffName */ public void setStaffName(String staffName) { this.staffName = staffName; } /** * 获取 * @return Integer */ public Integer getCheckCnt() { return checkCnt; } /** * 设置 * @param checkCnt */ public void setCheckCnt(Integer checkCnt) { this.checkCnt = checkCnt; } /** * 获取 * @return String */ public String getCheckResult() { return checkResult; } /** * 设置 * @param checkResult */ public void setCheckResult(String checkResult) { this.checkResult = checkResult; } /** * 获取 * @return Date */ public Date getBegDate() { return begDate; } /** * 设置 * @param begDate */ public void setBegDate(Date begDate) { this.begDate = begDate; } /** * 获取 * @return Date */ public Date getEndDate() { return endDate; } /** * 设置 * @param endDate */ public void setEndDate(Date endDate) { this.endDate = endDate; } /** * 获取 * @return String */ public String getCheckNo() { return checkNo; } /** * 设置 * @param checkNo */ public void setCheckNo(String checkNo) { this.checkNo = checkNo; } /** * 获取 * @return String */ public String getCheckName() { return checkName; } /** * 设置 * @param checkName */ public void setCheckName(String checkName) { this.checkName = checkName; } /** * 获取 * @return String */ public String getIsForceCheck() { return isForceCheck; } /** * 设置 * @param isForceCheck */ public void setIsForceCheck(String isForceCheck) { this.isForceCheck = isForceCheck; } /** * 获取 * @return String */ public String getGroupId() { return groupId; } /** * 设置 * @param groupId */ public void setGroupId(String groupId) { this.groupId = groupId; } /** * 获取 * @return String */ public String getGroupName() { return groupName; } /** * 设置 * @param groupName */ public void setGroupName(String groupName) { this.groupName = groupName; } /** * 获取 * @return String */ public String getApprTyp() { return apprTyp; } /** * 设置 * @param apprTyp */ public void setApprTyp(String apprTyp) { this.apprTyp = apprTyp; } /** * 获取 * @return String */ public String getApprDesc() { return apprDesc; } /** * 设置 * @param apprDesc */ public void setApprDesc(String apprDesc) { this.apprDesc = apprDesc; } /** * 获取 * @return String */ public String getCheckRemark() { return checkRemark; } /** * 设置 * @param checkRemark */ public void setCheckRemark(String checkRemark) { this.checkRemark = checkRemark; } /** * 获取 * @return String */ public String getFstApprResult() { return fstApprResult; } /** * 设置 * @param fstApprResult */ public void setFstApprResult(String fstApprResult) { this.fstApprResult = fstApprResult; } /** * 获取 * @return String */ public String getFstApprRemark() { return fstApprRemark; } /** * 设置 * @param fstApprRemark */ public void setFstApprRemark(String fstApprRemark) { this.fstApprRemark = fstApprRemark; } /** * 获取 * @return String */ public String getApprId() { return apprId; } /** * 设置 * @param apprId */ public void setApprId(String apprId) { this.apprId = apprId; } /** * 获取 初审编号 * @return String */ public String getFstCheckNo() { return fstCheckNo; } /** * 设置 初审编号 * @param fstCheckNo */ public void setFstCheckNo(String fstCheckNo) { this.fstCheckNo = fstCheckNo; } /** * 获取 初审编号 * @return String */ public String getFstCheckName() { return fstCheckName; } /** * 设置 初审编号 * @param fstCheckName */ public void setFstCheckName(String fstCheckName) { this.fstCheckName = fstCheckName; } }
[ "mynamehanfei@163.com" ]
mynamehanfei@163.com
838c1b5e721b17a71bd6c45c02fae642664c1e6b
72d0d8e408aa1e021829ee478e783c0cc63f8c24
/PRACTICO/src/practico/Arquero.java
c336676778e1715277dc9e2032fa66e04c51f68d
[]
no_license
juanmanuelmartin/Trabajo-Practico-Grupal
528e9201659055425bbc79883ac860adecd7830f
b94202dcfe92a70648c8e3b5577b9769e8d1abba
refs/heads/master
2020-06-30T13:11:14.405190
2019-09-10T15:01:17
2019-09-10T15:01:17
200,835,932
0
0
null
null
null
null
UTF-8
Java
false
false
2,614
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 practico; /** * * @author juanp */ public class Orco extends Personajes{ private int salud; private int ataque; private int defensa; private int contulti; public Orco(int salud, int ataque, int defensa, String nombre, int xp) { super(nombre, xp); this.salud = salud; this.ataque = ataque; this.defensa = defensa; } public String getSalud() { return "" + salud; } public boolean estaSaludable() { if (salud > 0) { return true; } else { return false; } } public void atacar(Caballero o) { System.out.println(nombre + " ataca!"); int daño = ataque; o.recibirDaño(daño); xp += 10; contulti += 10; } public void recibirDaño(int daño) { int golpe = daño + defensa; salud -= golpe; System.out.println(nombre + " recibe " + golpe + " de daño."); } public int ultim(Caballero o) { boolean ultidis; int dañoulti = 0; if(contulti==100){ System.out.println("Habilidad especial del orco dsiponible"); ultidis = true; }else{ ultidis = false; System.out.println("Habilidad especial del orco en preparación"); } if(ultidis){ System.out.println("El " + nombre + " ha utilizado su habilidad especial"); dañoulti = 400; } return dañoulti; } public void recibirUltiOrco(int daño) { int golpe = o.dañoulti + defensa; salud -= golpe; System.out.println(nombre + " recibe " + golpe + " de daño causado por la habilidad especial ."); } public void recibirUltiCaballero(int daño) { int golpe = c.dañoulti + defensa; salud -= golpe; System.out.println(nombre + " recibe " + golpe + " de daño causado por la habilidad especial ."); } public void recibirUltiMago(int daño) { int golpe = m.dañoulti + defensa; salud -= golpe; System.out.println(nombre + " recibe " + golpe + " de daño causado por la habilidad especial ."); } public String toString() { return nombre + " tiene " + xp + " puntos de experiencia."; } }
[ "53475753+juan-pablo-dovale@users.noreply.github.com" ]
53475753+juan-pablo-dovale@users.noreply.github.com
94357f52f5ab6f50636cc53f34e0a99175f74ffb
2568d93f238c84cd6f4889be4e561ccec2890e48
/common/src/main/java/com/nonelonely/common/xss/XssFilter.java
0f074229a67bdcad4c6fe24a16453df826d810b2
[ "Apache-2.0" ]
permissive
fangrx/my-blog
3ea91c0c1af33a54ce30b7dc53b458364121d164
85813412fb790f3e90cbce7092ad156a99f7eff1
refs/heads/master
2023-07-18T09:37:20.750365
2021-09-01T07:00:04
2021-09-01T07:00:04
401,545,450
0
0
null
null
null
null
UTF-8
Java
false
false
1,981
java
package com.nonelonely.common.xss; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Xss防护过滤器 * @author nonelonely * @date 2018/12/9 */ public class XssFilter implements Filter{ /** * 忽略规则列表 */ private List<String> excludes = new ArrayList<>(); @Override public void init(FilterConfig filterConfig) throws ServletException { String temp = filterConfig.getInitParameter("excludes"); if (temp != null) { String[] url = temp.split(","); for (int i = 0; url != null && i < url.length; i++) { excludes.add(url[i]); } } } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException,ServletException { HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; if(handleExcludeURL(req, resp)){ filterChain.doFilter(request, response); return; } XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest) request); filterChain.doFilter(xssRequest, response); } private boolean handleExcludeURL(HttpServletRequest request, HttpServletResponse response) { if (excludes == null || excludes.isEmpty()) { return false; } String url = request.getServletPath(); for (String pattern : excludes) { Pattern p = Pattern.compile("^" + pattern); Matcher m = p.matcher(url); if (m.find()) { return true; } } return false; } @Override public void destroy() {} }
[ "ri-xin.fang@doone.com.cn" ]
ri-xin.fang@doone.com.cn
64cc7a6a22d2214a4ed7740b4c992d2aa3d98eb1
b9f0ccb45cf8a14c53d6c4aac8cca47181bd1dec
/IOT/app/src/main/java/com/min/iotdemo/adapter/ElvMainEquimentControlAdapter.java
e38101f5405c8216d301c15ca2f2f469072be94f
[]
no_license
ljh-dobest/things-android
b4cf8fd85c1c1f09106d39c43bb41414a7da4f21
468fb78004a1e83c2278fd0829c260232d4a4d99
refs/heads/master
2021-07-14T01:48:18.298716
2017-10-14T08:43:53
2017-10-14T08:43:53
104,038,286
0
0
null
2017-09-19T06:56:43
2017-09-19T06:56:42
null
UTF-8
Java
false
false
5,715
java
package com.min.iotdemo.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.TextView; import com.min.iotdemo.R; import com.min.iotdemo.bean.EquimentBean; import java.util.ArrayList; import java.util.List; /** * Created by Min on 2017/6/27. */ public class ElvMainEquimentControlAdapter extends BaseExpandableListAdapter { private List<EquimentBean> dataset = new ArrayList<>(); private Context mContext; private LayoutInflater inflater; public ElvMainEquimentControlAdapter(Context context) { this.mContext = context; inflater = LayoutInflater.from(mContext); } public void setDataset(List<EquimentBean> data) { this.dataset = data; notifyDataSetChanged(); } public List<EquimentBean> getData() { return dataset; } // 获得某个父项的某个子项 @Override public Object getChild(int parentPos, int childPos) { return dataset.get(parentPos); } // 获得父项的数量 @Override public int getGroupCount() { return 1; } // 获得某个父项的子项数目 @Override public int getChildrenCount(int parentPos) { return dataset.size(); } // 获得某个父项 @Override public Object getGroup(int parentPos) { return dataset; } // 获得某个父项的id @Override public long getGroupId(int parentPos) { return parentPos; } // 获得某个父项的某个子项的id @Override public long getChildId(int parentPos, int childPos) { return childPos; } // 按函数的名字来理解应该是是否具有稳定的id,这个方法目前一直都是返回false,没有去改动过 @Override public boolean hasStableIds() { return false; } // 获得父项显示的view @Override public View getGroupView(int parentPos, boolean b, View view, ViewGroup viewGroup) { if (view == null) { view = inflater.inflate(R.layout.elv_parent_item, null); } TextView text = (TextView) view.findViewById(R.id.tv_parent_title); text.setText("广州"); return view; } // 获得子项显示的view @Override public View getChildView(int parentPos, int childPos, boolean b, View view, ViewGroup viewGroup) { ViewHolder viewHolder = null; EquimentBean equiment = dataset.get(childPos); if (view == null) { view = inflater.inflate(R.layout.elv_child_conteol_item, null); viewHolder = new ViewHolder(); viewHolder.tv_name = (TextView) view.findViewById(R.id.tv_child_name); viewHolder.et_time = (EditText) view.findViewById(R.id.et_child_delayTime); viewHolder.et_child_count= (EditText) view.findViewById(R.id.et_child_count); viewHolder.followCheckBox = (CheckBox) view.findViewById(R.id.cb_child_check_item); final ViewHolder finalViewHolder = viewHolder; viewHolder.followCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean b) { EquimentBean info = (EquimentBean) finalViewHolder.followCheckBox.getTag(); info.setCheck(compoundButton.isChecked()); } }); // viewHolder.et_time.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) { // EquimentBean info = (EquimentBean) finalViewHolder.followCheckBox.getTag(); // info.setDelayTime(s.toString()); // } // }); view.setTag(viewHolder); viewHolder.followCheckBox.setTag(equiment); } else { viewHolder = (ViewHolder) view.getTag(); viewHolder.followCheckBox.setTag(equiment); } //判断是否是假数据 System.out.println("----key---"+equiment.getKey()); if (equiment.getKey().equals("")) { viewHolder.et_time.setVisibility(View.INVISIBLE); viewHolder.followCheckBox.setVisibility(View.INVISIBLE); viewHolder.et_child_count.setVisibility(View.INVISIBLE); }else if(equiment.getKey().equals("Light_cover-003")){ viewHolder.et_time.setVisibility(View.VISIBLE); viewHolder.followCheckBox.setVisibility(View.VISIBLE); viewHolder.et_child_count.setVisibility(View.VISIBLE); } viewHolder.tv_name.setText(equiment.getName()); // viewHolder.et_time.setText(equiment.getDelayTime()); viewHolder.followCheckBox.setChecked(equiment.isCheck()); return view; } // 子项是否可选中,如果需要设置子项的点击事件,需要返回true @Override public boolean isChildSelectable(int i, int i1) { return true; } private class ViewHolder { private TextView tv_name; private EditText et_time; private EditText et_child_count; private CheckBox followCheckBox; } }
[ "710601912@qq.com" ]
710601912@qq.com
285196437eab86367da7e76abd85ea71f6a56c98
88ab82476c4e07b0686e772f7aec672c395e01d9
/teacher/tasks/TaskDetailController.java
0a4bd28451347e0b477b2605616c39d131c31f6d
[]
no_license
lismsdh2/projectF
72bf29495a8f3c97711ba28b7534899ef447f4ce
0e1666f0fb2d30148c066a517c47f4cf0f87ab85
refs/heads/master
2022-11-16T13:14:01.258566
2020-07-10T00:18:52
2020-07-10T00:18:52
261,232,831
0
0
null
null
null
null
UTF-8
Java
false
false
10,204
java
package teacher.tasks; import java.net.URL; import java.text.DecimalFormat; import java.util.Collections; import java.util.Optional; import java.util.ResourceBundle; import DAO.TaskDao; import DAO.TaskDetailDao; import DTO.TaskDetailDto; import DTO.TaskDto; import javafx.application.Platform; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Button; import javafx.scene.control.ButtonType; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.control.ProgressBar; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.layout.AnchorPane; import javafx.stage.Modality; import javafx.stage.Stage; import javafx.stage.StageStyle; import javafx.util.Callback; import launch.AppMain; import main.Main_Master_Controller; import util.Util; /** * @author 김지현 * */ public class TaskDetailController extends Main_Master_Controller implements Initializable { @FXML private AnchorPane taskDetailListPane; @FXML private Label lblTaskTitle; @FXML private ComboBox<String> comboTaskList; @FXML private TableView<TaskDetailDto> tblView; @FXML private TableColumn<TaskDetailDto, ?> tcNo; @FXML private TableColumn<TaskDetailDto, ?> tcName; @FXML private TableColumn<TaskDetailDto, String> tcSubmitStatus; @FXML private TableColumn<TaskDetailDto, ?> tcSubmitDate; @FXML private TableColumn<TaskDetailDto, ?> tcScore; @FXML private TableColumn<TaskDetailDto, String> tcMark; @FXML private TableColumn<TaskDetailDto, Boolean> tcBtn; @FXML private Label lblSubmitRate; @FXML private ProgressBar pbarSubmitRate; @FXML private Label lblAvg; @FXML private ProgressBar pbarAvg; @FXML private Button btnExport; int taskNo = AppMain.app.getBasic().getTask_no(); TaskDao tDao = new TaskDao(); TaskDto currentTask = tDao.selectTask(taskNo); ObservableList<TaskDetailDto> tdList = FXCollections.observableArrayList(); @Override public void initialize(URL location, ResourceBundle resources) { // 과제명 표시 라벨링 setLabel(); // 콤보박스에 과제목록 표시 setCombo(); // 테이블에 과제별 학생 제출 정보 표시 setTableColumns(); //엑셀 반출 바튼 클릭 시 btnExport.setOnAction(e -> { //파일명과 시트명 초기설정 String fileName = "["+currentTask.getTcNo()+"]"+currentTask.getTcTitle()+" 제출현황 및 점수"; String sheetName = "과제 "+currentTask.getTcNo(); Util.excelExport(fileName, sheetName, tblView); }); } // 상단 라벨에 과제명 표시 private void setLabel() { String taskTitle = currentTask.getTcTitle(); lblTaskTitle.setText(taskTitle); } // 현재 유저-현재 강의-과제목록 표시 private void setCombo() { ObservableList<String> classTaskList = FXCollections.observableArrayList(); TaskDao tDao = new TaskDao(); int classNo = currentTask.getClassNo(); System.out.println(classNo); classTaskList = tDao.selectUserTaskComoboList(classNo); comboTaskList.setItems(classTaskList); // 콤보박스에 현재 과제명을 보여준다. if (taskNo != 0) { String taskName = currentTask.getTcTitle(); String taskInfo = "[" + taskNo + "] " + taskName; comboTaskList.getSelectionModel().select(taskInfo); } // 콤보박스에서 과제명 선택 시 이동 comboTaskList.setOnAction(e -> { String selectedCombo = comboTaskList.getSelectionModel().getSelectedItem(); int selectedNo = Integer .valueOf(selectedCombo.substring(selectedCombo.indexOf("[") + 1, selectedCombo.lastIndexOf("]"))); System.out.println(selectedNo); // 선택된 과제로 데이터변경 taskNo = selectedNo; currentTask = tDao.selectTask(taskNo); Platform.runLater(() -> { setLabel(); }); refreshTable(); }); } // 컬럼 설정 private void setTableColumns() { tcNo.setCellValueFactory(new PropertyValueFactory<>("colNum")); tcName.setCellValueFactory(new PropertyValueFactory<>("studentName")); tcSubmitStatus.setCellValueFactory(new PropertyValueFactory<>("submitStatus")); tcSubmitDate.setCellValueFactory(new PropertyValueFactory<>("submitDate")); tcScore.setCellValueFactory(new PropertyValueFactory<>("colScore")); tcMark.setCellValueFactory(new PropertyValueFactory<>("colMarkStatus")); tcBtn.setCellValueFactory(new PropertyValueFactory<>("btnDetail")); tcBtn.setCellFactory(setButton()); // cell에 색상 넣어서 강조 setCellColor(tcSubmitStatus, "N", "Y", "highlightRed"); setCellColor(tcMark, "채점 전", "채점 완료", "highlightYellow"); // 테이블 채우기 refreshTable(); } private void setCellColor(TableColumn<TaskDetailDto, String> col, String applyCellValue, String defaultCellValue, String styleClass) { col.setCellFactory(new Callback<TableColumn<TaskDetailDto, String>, TableCell<TaskDetailDto, String>>() { @Override public TableCell<TaskDetailDto, String> call(TableColumn<TaskDetailDto, String> param) { return new TableCell<TaskDetailDto, String>() { @Override protected void updateItem(String item, boolean empty) { super.updateItem(item, empty); ObservableList<String> styles = getStyleClass(); if (item != null && !empty) { setText(item); if (item.equals(applyCellValue) && !styles.contains(styleClass)) { getStyleClass().remove("table-row-cell"); getStyleClass().add(styleClass); } else if (item.equals(defaultCellValue)) { styles.removeAll(Collections.singleton(styleClass)); } } } }; } }); } // 상세보기 컬럼설정 private Callback<TableColumn<TaskDetailDto, Boolean>, TableCell<TaskDetailDto, Boolean>> setButton() { return item -> new TableCell<TaskDetailDto, Boolean>() { private final Button btnDetail = new Button("상세보기"); @Override protected void updateItem(Boolean item, boolean empty) { super.updateItem(item, empty); if (empty || item == null) { setGraphic(null); } else { btnDetail.setPrefWidth(80); // 기본값 버튼활성화 btnDetail.setDisable(false); // 과제가 제출되지 않았으면 버튼 비활성화 TaskDetailDto selectedTdDto = getTableView().getItems().get(getIndex()); String status = selectedTdDto.getSubmitStatus(); if (status.equals("N")) { btnDetail.setDisable(true); } setGraphic(btnDetail); // 상세버튼 누르면 상세창 btnDetail.setOnAction(e -> handleBtnDetail(selectedTdDto)); } } // 과제상세(채점)창 public void handleBtnDetail(TaskDetailDto selectedTdDto) { try { // new stage - 제출된 과제 과제 확인창 Stage stage = new Stage(StageStyle.UTILITY); stage.initOwner(tblView.getScene().getWindow()); stage.initModality(Modality.WINDOW_MODAL); stage.setTitle("과제 확인"); // fmxl, controller // FXMLLoader loader = new FXMLLoader(getClass().getResource("../../fxml/teacher/tasks/TaskMark.fxml")); FXMLLoader loader = new FXMLLoader(Class.forName("teacher.tasks.TaskDetailController") .getResource("/fxml/teacher/tasks/TaskMark.fxml")); loader.setController(new TaskMarkController(selectedTdDto)); Parent parent = loader.load(); stage.setScene(new Scene(parent)); stage.setResizable(false); stage.show(); // 채점완료 버튼 클릭 시 Button btnSubmit = (Button) parent.lookup("#btnSubmit"); btnSubmit.setOnMouseClicked(mouseEvent -> { // alert Alert alert = new Alert(AlertType.INFORMATION, "채점이 완료되었습니다.", ButtonType.CLOSE); alert.setTitle("채점 완료"); // 닫기버튼 누르면 창 닫힘 Optional<ButtonType> btn = alert.showAndWait(); if (btn.get().equals(ButtonType.CLOSE)) { stage.close(); } // tableView refresh refreshTable(); }); // 취소버튼 클릭 시 새창 닫기 Button btnCancel = (Button) parent.lookup("#btnCancel"); btnCancel.setOnMouseClicked(mouseEvent -> stage.close()); } catch (Exception e2) { e2.printStackTrace(); } } }; } // db에서 저장된 데이터 불러와서 넣기 private void refreshTable() { TaskDetailDao tdDao = new TaskDetailDao(); tdList = tdDao.selectTaskStudentList(taskNo); tblView.setItems(tdList); // 제출율, 평균 setSubmiitedInfo(); } // 제출 정보(제출율, 평균) 표시 public void setSubmiitedInfo() { Platform.runLater(() -> { int totalNum = tdList.size(); // 전체학생수 int count = 0; // 제출한 학생수 int totalScore = 0; int pscore = 0; for (int i = 0; i < totalNum; i++) { String submit = tdList.get(i).getSubmitStatus(); Integer getScore = tdList.get(i).getTaskScore(); pscore = tdList.get(i).getFullscore(); // 제출한 학생만 계산 if (submit.equals("Y")) { count++; if (getScore != null && getScore.intValue() != -1) { totalScore += getScore; } } } double avg = (double) totalScore / count; // 제출율 표시 lblSubmitRate.setText(count + " 명/ " + totalNum + " 명"); pbarSubmitRate.setProgress((double) count / totalNum); // 과제 평균점수 표시 if (count == 0) { lblAvg.setText("0 점 / " + pscore + "점"); } else { lblAvg.setText(new DecimalFormat("##.##").format(avg) + "점 / " + pscore + "점"); } pbarAvg.setProgress(avg / pscore); }); } }
[ "noreply@github.com" ]
noreply@github.com
a08e92a8dbc07e8a63043c5ad23e96f98bde0d4e
70bcc690e36e4a6be97d19e74dc59bf5484174d1
/src/com/sp/prpall/blsvr/misc/BLPrpTimeRegister.java
d64a4fd3fdb2b54c6e5520227319df36336679d4
[]
no_license
haierTest/test01
fc819888443d49047f04d031a7d5e3c7f8724810
1c03f59e4f709f8f92608ec4a4bd5671d9d0e24b
refs/heads/master
2021-07-14T09:25:36.805025
2017-10-11T03:34:45
2017-10-11T03:34:45
106,499,408
0
0
null
null
null
null
GB18030
Java
false
false
9,946
java
package com.sp.prpall.blsvr.misc; import java.util.ArrayList; import java.util.Vector; import com.sp.prpall.dbsvr.misc.DBPrpTimeRegister; import com.sp.prpall.schema.PrpTimeRegisterSchema; import com.sp.utility.SysConfig; import com.sp.utility.SysConst; import com.sp.utility.database.DbPool; import com.sp.utility.error.UserException; /** * 定义PrpTimeRegister的BL类 * <p>Copyright: Copyright (c) 2009</p> * <p>@createdate 2009-07-14</p> * @author Zhouxianli(JavaTools v1.0) * @updateauthor yangkun(JavaTools v1.1 - v1.2) * @lastversion v1.2 */ public class BLPrpTimeRegister{ private Vector schemas = new Vector(); /** * 构造函数 */ public BLPrpTimeRegister(){ } /** *初始化记录 *@param 无 *@return 无 *@throws Exception */ public void initArr() throws Exception { schemas = new Vector(); } /** *增加一条PrpTimeRegisterSchema记录 *@param iPrpTimeRegisterSchema PrpTimeRegisterSchema *@throws Exception */ public void setArr(PrpTimeRegisterSchema iPrpTimeRegisterSchema) throws Exception { try { schemas.add(iPrpTimeRegisterSchema); } catch(Exception e) { throw e; } } /** *得到一条PrpTimeRegisterSchema记录 *@param index 下标 *@return 一个PrpTimeRegisterSchema对象 *@throws Exception */ public PrpTimeRegisterSchema getArr(int index) throws Exception { PrpTimeRegisterSchema prpTimeRegisterSchema = null; try { prpTimeRegisterSchema = (PrpTimeRegisterSchema)this.schemas.get(index); } catch(Exception e) { throw e; } return prpTimeRegisterSchema; } /** *删除一条PrpTimeRegisterSchema记录 *@param index 下标 *@throws Exception */ public void remove(int index) throws Exception { try { this.schemas.remove(index); } catch(Exception e) { throw e; } } /** *得到schemas记录数 *@return schemas记录数 *@throws Exception */ public int getSize() throws Exception { return this.schemas.size(); } /** *按照查询条件得到一组记录数,并将这组记录赋给schemas对象 *@param iWherePart 查询条件(包括排序字句) *@throws UserException *@throws Exception */ public void query(String iWherePart) throws UserException,Exception { this.query(iWherePart,Integer.parseInt(SysConst.getProperty("QUERY_LIMIT_COUNT").trim())); } /** *按照查询条件和记录数限制得到一组记录数,并将这组记录赋给schemas对象 *@param iWherePart 查询条件(包括排序字句) *@param iLimitCount 记录数限制(iLimitCount=0: 无限制) *@throws UserException *@throws Exception */ public void query(String iWherePart,int iLimitCount) throws UserException,Exception { String strSqlStatement = ""; DBPrpTimeRegister dbPrpTimeRegister = new DBPrpTimeRegister(); if (iLimitCount > 0 && dbPrpTimeRegister.getCount(iWherePart) > iLimitCount) { throw new UserException(-98,-1003,"BLPrpTimeRegister.query"); } else { initArr(); strSqlStatement = " SELECT * FROM PrpTimeRegister WHERE " + iWherePart; schemas = dbPrpTimeRegister.findByConditions(strSqlStatement); } } /** *按照查询条件得到一组记录数,并将这组记录赋给schemas对象 *@param dbpool 全局池 *@param iWherePart 查询条件(包括排序字句) *@throws UserException *@throws Exception */ public void query(DbPool dbpool,String iWherePart) throws UserException,Exception { this.query(dbpool,iWherePart,Integer.parseInt(SysConst.getProperty("QUERY_LIMIT_COUNT").trim())); } /** *按照查询条件和记录数限制得到一组记录数,并将这组记录赋给schemas对象 *@param dbpool 全局池 *@param iWherePart 查询条件(包括排序字句) *@param iLimitCount 记录数限制(iLimitCount=0: 无限制) *@throws UserException *@throws Exception */ public void query(DbPool dbpool,String iWherePart,int iLimitCount) throws UserException,Exception { String strSqlStatement = ""; DBPrpTimeRegister dbPrpTimeRegister = new DBPrpTimeRegister(); if (iLimitCount > 0 && dbPrpTimeRegister.getCount(dbpool, iWherePart) > iLimitCount) { throw new UserException(-98,-1003,"BLPrpTimeRegister.query"); } else { initArr(); strSqlStatement = " SELECT * FROM PrpTimeRegister WHERE " + iWherePart; schemas = dbPrpTimeRegister.findByConditions(dbpool,strSqlStatement); } } /** *带dbpool的save方法 *@param 无 *@return 无 */ public void save(DbPool dbpool) throws Exception { DBPrpTimeRegister dbPrpTimeRegister = new DBPrpTimeRegister(); int i = 0; for(i = 0; i< schemas.size(); i++) { dbPrpTimeRegister.setSchema((PrpTimeRegisterSchema)schemas.get(i)); dbPrpTimeRegister.insert(dbpool); } } /** *不带dbpool的XXXXX存方法 *@param 无 *@return 无 */ public void save() throws Exception { DbPool dbpool = new DbPool(); dbpool.open(SysConst.getProperty("DDCCDATASOURCE")); try { dbpool.beginTransaction(); save(dbpool); dbpool.commitTransaction(); } catch (Exception e) { dbpool.rollbackTransaction(); } finally { dbpool.close(); } } /** *带dbpool的删除方法 *@param dbpool 连接池 *@param iProposalNo 业务号 *@return 无 */ public void cancel(DbPool dbpool,String iBusinessNo) throws Exception { String strSqlStatement = " DELETE FROM PrpTimeRegister WHERE BusinessNo= ?"; dbpool.prepareInnerStatement(strSqlStatement); dbpool.setString(1, iBusinessNo); dbpool.executePreparedUpdate(); dbpool.closePreparedStatement(); } /** * 不带dbpool的删除方法 *@param iProposalNo 业务号 *@return 无 */ public void cancel(String iBusinessNo ) throws Exception { DbPool dbpool = new DbPool(); dbpool.open(SysConst.getProperty("DDCCDATASOURCE")); try { dbpool.beginTransaction(); cancel(dbpool,iBusinessNo); dbpool.commitTransaction(); } catch (Exception e) { dbpool.rollbackTransaction(); } finally { dbpool.close(); } } /** * 不带dbpool的更新方法 *@param iPolicyNo XX号 *@return 无 */ public void update() throws Exception { DbPool dbpool = new DbPool(); try { dbpool.open(SysConfig.CONST_DDCCDATASOURCE); dbpool.beginTransaction(); update(dbpool); dbpool.commitTransaction(); } catch (Exception e) { dbpool.rollbackTransaction(); } finally { dbpool.close(); } } /** *带dbpool的更新方法 *@param dbpool 连接池 *@param iPolicyNo XX号 *@return 无 */ public void update(DbPool dbpool) throws Exception { DBPrpTimeRegister dbPrpTimeRegister = new DBPrpTimeRegister(); int i = 0; for(i = 0; i< schemas.size(); i++) { dbPrpTimeRegister.setSchema((PrpTimeRegisterSchema)schemas.get(i)); dbPrpTimeRegister.update(dbpool); } } /** * 带dbpool根据XX单号获取数据 *@param iProposalNo 业务号 *@return 无 */ public void getData(String iBusinessNo) throws Exception { DbPool dbpool = new DbPool(); dbpool.open(SysConst.getProperty("DDCCDATASOURCE")); getData(dbpool,iBusinessNo); dbpool.close(); } /** * 不带dbpool根据XX单号获取数据 *@param dbpool 连接池 *@param iProposalNo 业务号 *@return 无 */ public void getData(DbPool dbpool,String iBusinessNo) throws Exception { String strWherePart = " BusinessNo= ? "; ArrayList arrWhereValue = new ArrayList(); arrWhereValue.add(iBusinessNo); query(dbpool, strWherePart, arrWhereValue, 0); } /** *按照查询条件和记录数限制得到一组记录数,并将这组记录赋给schemas对象 *@author wangchuanzhong 20100602 *@param dbpool 全局池 *@param iWherePart 查询条件,传入条件均已绑定变量形式,问号个数与属性值个数一致 *@param iWhereValue 查询条件各字段值 *@param iLimitCount 记录数限制(iLimitCount=0: 无限制) *@throws UserException *@throws Exception */ public void query(DbPool dbpool,String iWherePart,ArrayList iWhereValue, int iLimitCount) throws UserException,Exception { String strSqlStatement = ""; DBPrpTimeRegister dbPrpTimeRegister = new DBPrpTimeRegister(); if (iLimitCount > 0 && dbPrpTimeRegister.getCount(dbpool,iWherePart,iWhereValue) > iLimitCount) { throw new UserException(-98,-1003,"BLPrpTimeRegister.query"); }else { initArr(); strSqlStatement = " SELECT * FROM PrpTimeRegister WHERE " + iWherePart; schemas = dbPrpTimeRegister.findByConditions(dbpool,strSqlStatement,iWhereValue); } } /** * 主函数 * @param args 参数列表 */ public static void main(String[] args){ } }
[ "xiangzhenfa@haier.com" ]
xiangzhenfa@haier.com
1d80d66cbdcc021f87663e6a48dc007a15063093
d12082143aa843104dfcaf51f6c738565e65e6a4
/src/main/java/ru/intech/ussd/modeler/graphobjects/EdgeFinish.java
2575f95ff1bbf12cbd812e2d7772f5106db0e37b
[]
no_license
gedr/room-action-modeler
99b29536fb6a5410462d720b391de390cc190dae
3a64afa2585ca5f358a6aff98780479bab8703ac
refs/heads/master
2021-01-17T07:09:14.413153
2016-10-07T14:37:07
2016-10-07T14:37:07
41,827,217
0
0
null
null
null
null
UTF-8
Java
false
false
2,005
java
package ru.intech.ussd.modeler.graphobjects; public class EdgeFinish implements Edge{ // ================================================================================================================= // Constants // ================================================================================================================= // ================================================================================================================= // Fields // ================================================================================================================= // ================================================================================================================= // Constructors // ================================================================================================================= public EdgeFinish() { } // ================================================================================================================= // Methods for/from SuperClass/Interface // ================================================================================================================= public boolean isChanged() { return false; } public void applyChanges() { } // ================================================================================================================= // Getter & Setter // ================================================================================================================= // ================================================================================================================= // Methods // ================================================================================================================= // ================================================================================================================= // Inner and Anonymous Classes // ================================================================================================================= }
[ "Ed@Ed_Desktop" ]
Ed@Ed_Desktop
4387706afceb4dd4d5df33b6370a989e36a3d89a
2317cca7cac187f0d5c25a62e8708ca3a95cd7ac
/studs/grades/src/cn/grades/teacher/service/TeacherService.java
59964e68bcb6c873bd4ea0c119203bdf0e8c5339
[]
no_license
wangjianme/weric
d17c6efd3939be0f62cb6467b0db03305ab09372
9d44c0b688fa7dfed398b878ba63f7cd8f69b1b6
refs/heads/master
2020-12-30T14:01:22.900222
2018-07-07T13:29:48
2018-07-07T13:29:48
91,281,088
1
1
null
null
null
null
UTF-8
Java
false
false
1,083
java
package cn.grades.teacher.service; import java.util.List; import java.util.Map; import cn.grades.domain.Degrees; import cn.grades.domain.Department; import cn.grades.domain.Teacher; import cn.grades.domain.Title; import cn.grades.teacher.dao.ITeacherDao; import cn.grades.teacher.dao.TeacherDaojdbc; public class TeacherService implements ITeacherService { private ITeacherDao dao = new TeacherDaojdbc(); @Override public Map<String, Object> query(int page, int rows) { return dao.query(page, rows); } @Override public Teacher save(Teacher teacher) { return dao.save(teacher); } @Override public int delete(String id) { return dao.delete(id); } @Override public int update(Teacher teacher) { return dao.update(teacher); } @Override public List<Department> ins() { return dao.ins(); } @Override public List<Degrees> edu() { return dao.edu(); } @Override public List<Title> rank() { return dao.rank(); } public Map<String, Object> select(Teacher teacher) { // TODO Auto-generated method stub return dao.select(teacher); } }
[ "wangjian_me@126.com" ]
wangjian_me@126.com
a961300f58d123d211093b12776b5691b7453398
eb7719606477bc9649fade79cc1115e36f16983d
/chap03/src/sec04/exam04_arithmetic/InfinityAndNanCheckExample.java
6aa0f70a2730847882385b6e0722b1a95e4b6034
[]
no_license
Sim-1122/OAK
16f50f4259812502a8c65502e76428abfdda8476
a46cbc4203f5426c26235a73955c914d1bc75160
refs/heads/master
2022-11-23T12:24:31.281013
2020-07-27T08:39:12
2020-07-27T08:39:12
281,618,103
1
0
null
null
null
null
UHC
Java
false
false
623
java
package sec04.exam04_arithmetic; public class InfinityAndNanCheckExample { public static void main(String[] args) { /*int x=5; double y = 0.0; //double z = 5 / y; double z = x%y; System.out.println(Double.isInfinite(z)); System.out.println(Double.isNaN(z)); System.out.println(z+2); if(Double.isInfinite(z) || Double.isNaN(z)) { System.out.println("값 산출 불가"); } else { System.out.println(z+2); } } */ int x=5; int y=0; try { int z= x/y; System.out.println("z=" + z); } catch (ArithmeticException e) { System.out.println("0으로 나누면 안됨"); } } }
[ "jini1122@koreatech.ac.kr" ]
jini1122@koreatech.ac.kr
8b85774cc81b2105c35c00d54edb699eb9deffaa
eb996b04857efc3022bb12beb64a9313603bdb9f
/src/LinkedListPractice/Palindrome.java
604472faa5fb7f89a09f2b966fb96678b73e8516
[]
no_license
Benpou/dataStructure
8c604645d8a04821174e722dc39d8edb96b9428b
c442e2f0331d1a8a4da99d7402542dc301c0fd8d
refs/heads/master
2023-06-29T16:01:56.891466
2021-08-04T14:58:07
2021-08-04T14:58:07
262,215,727
0
0
null
null
null
null
UTF-8
Java
false
false
109
java
package LinkedListPractice; public class Palindrome { public static void main(String[] args) { } }
[ "benpou2012@gmail.com" ]
benpou2012@gmail.com
36b16824502344d8e1a767cf505c47afe52b1093
6f1800437bbbaea120d89ccc328e4a0a1c9b48bc
/Betfair/src/main/java/betfair/services/fileServices/ReadCSV.java
03ce99cc61d63c2d0dbcb622621e76e2bfe493ca
[]
no_license
labdul/la-svn
ea5afa21143c3136c44d70f7d4944595e0c1c5b3
4b438bd3fccb63322bd3d300adbac54090f436db
refs/heads/master
2021-01-10T08:00:32.263770
2015-11-26T23:22:03
2015-11-26T23:22:03
46,950,196
0
0
null
null
null
null
UTF-8
Java
false
false
5,190
java
package betfair.services.fileServices; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import au.com.bytecode.opencsv.CSVReader; /* * This function does the low level task of opening the CSV file and reading in data. */ public class ReadCSV { public String FILENAME; public char SEPARATOR= ','; public char QUOTECHAR = '\u0000'; public int SKIPLINES = 0; public CSVReader Reader; /** This constructor will read the contents of a CSV file with the default separator of ',' * @param Filename : The file name with the full path to the file. * @throws FileNotFoundException */ public ReadCSV(String Filename) { this.FILENAME = Filename; } /** This constructor will read contents of a CSV file with the passes separator * @param Filename : The file name with the full path to the file. * @param Separator : The separator character. * @throws FileNotFoundException */ public ReadCSV(String Filename, char Separator){ this.FILENAME = Filename; this.SEPARATOR = Separator; } /** This constructor will read contents of a CSV file with the passes separator (','/';')&amp; quote character ('"'/'''). * @param Filename : The file name with the full path to the file. * @param Separator : The character that separates the columns on a line. * @param Quotechar : The character that is used to quote a value in column. * @throws FileNotFoundException */ public ReadCSV(String Filename, char Separator, char Quotechar) { this.FILENAME = Filename; this.SEPARATOR = Separator; this.QUOTECHAR = Quotechar; } /** This constructor will read contents of a CSV file with the passes separator, quote character &amp; number of lines from top to skip. * @param Filename : The file name with the full path to the file. * @param Separator : The character that separates the columns on a line. * @param Quotechar : The character that is used to quote a value in column. * @param skipLines : Number of lines to skip from the top * @throws FileNotFoundException */ public ReadCSV(String Filename, char Separator, char Quotechar, int skipLines) { this.FILENAME = Filename; this.SEPARATOR = Separator; this.QUOTECHAR = Quotechar; this.SKIPLINES = skipLines; } /** This is to read a CSV file to be passed onto DataProvider function of TestNG * @return An instance of the same class with a predefined separator,quote character &amp; lines to skip. * @throws FileNotFoundException */ public ReadCSV skipHeader() { SEPARATOR = ','; QUOTECHAR = '\u0000'; //NULL for char data type SKIPLINES = 1; //Skip the first line as its expected to be the header for the data in the CSV file. return this; } public List<String[]> ReadValues() throws IOException { List<String[]> lValues = null; InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(FILENAME); InputStreamReader inputStreamReader = new InputStreamReader(inputStream); Reader = new CSVReader(inputStreamReader,SEPARATOR,QUOTECHAR,SKIPLINES); lValues = Reader.readAll(); Reader.close(); return lValues; } /** This will return values in a test data CVS file as an 2-dimensional array. * @return returns the contents of the CSVReader object as a two-dimensional array. * @throws IOException */ public String [][] ReadIncludedTestData() throws IOException { int count = 0, width=0; List<String[]> lValues = ReadValues();//Reader.readAll(); //Counts the rows which is set to be included in the test for (String[] cValues : lValues) { if (cValues[0].equalsIgnoreCase("Y")){ count++; } if (width == 0) width = cValues.length-1; } //Initialise the Array with the count taken above String[][] Values = new String[count][width]; //Read the data into the Array from the list count = 0; //New way to read the data - START for (String[] cValues : lValues) { if (cValues[0].equalsIgnoreCase("Y")){ for (int wCount=0; wCount < width; wCount++){ //Values[count] = cValues; Values[count][wCount] = cValues[wCount+1]; } count++; } } //New way to read the data - END return Values; } /** * This will return values in a test data CVS file as an list of object array. * @return returns the contents of the CSVReader object as a two-dimensional array. * @throws IOException */ public ArrayList<Object[]> ReadData() throws IOException { List<String[]> lValues = ReadValues(); List<Object[]> rValues = new ArrayList<Object[]>(); //Add the String values to object so that it can be returned as ArrayList<Object[]> for(String [] cValues:lValues) { rValues.add(cValues); } return (ArrayList<Object[]>) rValues; } public String [] ReadHeader() throws IOException { //Reader = new CSVReader(new FileReader(FILENAME),SEPARATOR,QUOTECHAR,SKIPLINES); Reader = new CSVReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(FILENAME)),SEPARATOR,QUOTECHAR,SKIPLINES); String Header[] = Reader.readNext(); Reader.close(); return Header; } }
[ "abdulsalam12000@gmail.com" ]
abdulsalam12000@gmail.com
91642104647b73a02e614bbacffee81bed9ef6dd
84e6ed32d0b428ecd70692c4155a8d4db6db8580
/src/main/java/com/ariht/maven/plugins/config/io/FileInfo.java
dd259b1c31738363c71437265c532583e8cf7aac
[ "Apache-2.0" ]
permissive
ghusta/config-generation-maven-plugin
057184d46c772cb224bafbc8203a8bcb610b4cd5
ced78f0bc4fd7978039e652c98d5a1ef4f361170
refs/heads/master
2021-05-09T23:12:32.727110
2018-01-24T15:22:30
2018-01-24T15:22:30
118,773,618
0
0
null
2018-01-24T14:07:34
2018-01-24T14:07:33
null
UTF-8
Java
false
false
3,782
java
/* * Copyright 2014 Software Design Studio Ltd. * * 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.ariht.maven.plugins.config.io; import com.google.common.base.Joiner; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import org.apache.maven.plugin.logging.Log; import java.io.File; import java.io.IOException; import java.util.LinkedList; import java.util.List; /** * Container to information about a file so that the processor can access relative * paths, filename (without extension) and the File instance with further processing. */ public class FileInfo { private final File file; private final Log log; private String relativeSubDirectory; private List<File> externalFiles; public FileInfo(final Log log, final File file) { this.file = file; this.log = log; } public void setRelativeSubDirectory(final String relativeSubDirectory) { this.relativeSubDirectory = relativeSubDirectory; } public String getRelativeSubDirectory() { return relativeSubDirectory; } public String getNameWithoutExtension() { return FilenameUtils.removeExtension(file.getName()); } public String getName() { return file.getName(); } public File getFile() { return file; } private String getRelativeSubDirectoryAndFilename(final File file) throws IOException { return file.getCanonicalPath() + "/" + getName(); } public String getAllSources() throws IOException { final List<String> allFileNames = new LinkedList<String>(); allFileNames.add(FilenameUtils.separatorsToUnix(relativeSubDirectory + "/" + getName())); if (this.externalFiles != null) { for (final File f : externalFiles) { allFileNames.add(FilenameUtils.separatorsToUnix(f.getCanonicalPath() + "/" + f.getName())); } } return "[" + Joiner.on(", ").join(allFileNames) + "]"; } public List<File> getFiles() { final List<File> filesList = new LinkedList<File>(); filesList.add(file); if (externalFiles != null && !externalFiles.isEmpty()) { filesList.addAll(externalFiles); } return filesList; } public void lookForExternalFiles(final List<String> externalBasePaths) { if (externalBasePaths == null || externalBasePaths.isEmpty()) { return; } externalFiles = new LinkedList<File>(); for (final String basePath : externalBasePaths) { final String fullCanonicalFilename = FilenameUtils.separatorsToUnix(basePath + relativeSubDirectory + "/" + this.getName()); log.debug("Searching for: [" + fullCanonicalFilename + "]"); final File externalFile = new File(fullCanonicalFilename); if (externalFile.exists()) { log.debug("Including external file: [" + fullCanonicalFilename + "]"); externalFiles.add(externalFile); } } } @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } }
[ "david.green@softwaredesignstudio.co.uk" ]
david.green@softwaredesignstudio.co.uk
5027639ebea4adabbed8548afa672fcdcdcf5085
15799f09bfe5d1469446e199ed57b47ce1109b64
/src/main/java/com/weisen/www/code/yjf/extension/security/oauth2/CookiesHttpServletRequestWrapper.java
661c475d3ad4b8fbae885e943b5507849bf84234
[]
no_license
hupig-cn/web-extension
640802382512f789c1f726e7a4c54bb580a09737
c2e4fb40fb8120b456e8662f798249308c198092
refs/heads/master
2021-07-18T00:47:09.497894
2019-06-20T10:44:43
2019-06-20T10:44:43
192,901,879
0
0
null
2020-07-17T09:44:27
2019-06-20T10:42:58
Java
UTF-8
Java
false
false
1,161
java
package com.weisen.www.code.yjf.extension.security.oauth2; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; /** * A request mapper used to modify the cookies in the original request. * This is needed such that we can modify the cookies of the request during a token refresh. * The token refresh happens before authentication by the {@code OAuth2AuthenticationProcessingFilter} * so we must make sure that further in the filter chain, we have the new cookies and not the expired/missing ones. */ class CookiesHttpServletRequestWrapper extends HttpServletRequestWrapper { /** * The new cookies of the request. Use these instead of the ones found in the wrapped request. */ private Cookie[] cookies; public CookiesHttpServletRequestWrapper(HttpServletRequest request, Cookie[] cookies) { super(request); this.cookies = cookies; } /** * Return the modified cookies instead of the original ones. * @return the modified cookies. */ @Override public Cookie[] getCookies() { return cookies; } }
[ "lixin520gj@163.com" ]
lixin520gj@163.com
577c88d4133ba58058176332f664fdfac93ab523
677d7dbfba209cff6bb6b51411d09b4f9a65e169
/ess/src/main/java/progress/hrStaffGeneral/form/wsdl/InsertRehireWithNewDataResponse.java
17ce7a4e579413f2050cc85835e1a1d79b75e350
[]
no_license
BloomingLotus/progress-ess
a5409bf0be88f2a5d04f60d8089bbbc971783259
ad96dfda9bcf7d209f218892f9593f9c9bd18727
refs/heads/master
2021-01-01T19:34:59.074875
2016-01-13T09:15:14
2016-01-13T09:15:14
32,516,203
4
0
null
null
null
null
UTF-8
Java
false
false
2,218
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // 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: 2015.06.20 at 03:45:15 PM ICT // package progress.hrStaffGeneral.form.wsdl; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="InsertRehireWithNewDataResult" type="{http://tempuri.org/}ReturnObjectKey" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "insertRehireWithNewDataResult" }) @XmlRootElement(name = "InsertRehireWithNewDataResponse") public class InsertRehireWithNewDataResponse { @XmlElement(name = "InsertRehireWithNewDataResult") protected ReturnObjectKey insertRehireWithNewDataResult; /** * Gets the value of the insertRehireWithNewDataResult property. * * @return * possible object is * {@link ReturnObjectKey } * */ public ReturnObjectKey getInsertRehireWithNewDataResult() { return insertRehireWithNewDataResult; } /** * Sets the value of the insertRehireWithNewDataResult property. * * @param value * allowed object is * {@link ReturnObjectKey } * */ public void setInsertRehireWithNewDataResult(ReturnObjectKey value) { this.insertRehireWithNewDataResult = value; } }
[ "dbuaklee@hotmail.com" ]
dbuaklee@hotmail.com
905fffc3e351a23c68a055220c80fa72aaca64af
5afc1e039d0c7e0e98216fa265829ce2168100fd
/base-bean/src/main/java/cn/honry/base/bean/model/PersonalAddressList.java
1c26a560a1d12ecb74c2f5f346092526e5e10693
[]
no_license
konglinghai123/his
66dc0c1ecbde6427e70b8c1087cddf60f670090d
3dc3eb064819cb36ce4185f086b25828bb4bcc67
refs/heads/master
2022-01-02T17:05:27.239076
2018-03-02T04:16:41
2018-03-02T04:16:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,094
java
package cn.honry.base.bean.model; import java.util.Date; import cn.honry.base.bean.business.Entity; /** * * 个人通讯录实体 * @Author:zxl * @CreateDate: 2017年7月15日 下午4:24:32 * @Modifier: zxl * @ModifyDate: 2017年7月15日 下午4:24:32 * @ModifyRmk: * @version: V1.0 PersonalAddressList */ public class PersonalAddressList extends Entity{ /** * 姓名 */ private String perName; /** * 性别 */ private String perSex; /** * 生日 */ private Date perBirthday; /** * 拼音 */ private String perPinyin; /** * 五笔 */ private String perWb; /** * 自定义码 */ private String perInputCode; /** * 移动电话 */ private String mobilePhone; /** * 办公电话 */ private String workPhone; /** * 家庭住址 */ private String perAddress; /** * 电子邮箱 */ private String perEmail; /** * 备注 */ private String perRemark; /** * 是否分组 */ private Integer ifGroup; /** * 所属分组name */ private String belongGroupName; /** * 所属分组Name */ private String groupName; /** * 父级code */ private String parentCode; /** * 父级路径 */ private String parentUppath; /** * 所属用户 */ private String belongUser; /** * 排序 */ private Integer perOrder; public String getPerName() { return perName; } public void setPerName(String perName) { this.perName = perName; } public String getPerSex() { return perSex; } public void setPerSex(String perSex) { this.perSex = perSex; } public Date getPerBirthday() { return perBirthday; } public void setPerBirthday(Date perBirthday) { this.perBirthday = perBirthday; } public String getPerPinyin() { return perPinyin; } public void setPerPinyin(String perPinyin) { this.perPinyin = perPinyin; } public String getPerWb() { return perWb; } public void setPerWb(String perWb) { this.perWb = perWb; } public String getPerInputCode() { return perInputCode; } public void setPerInputCode(String perInputCode) { this.perInputCode = perInputCode; } public String getMobilePhone() { return mobilePhone; } public void setMobilePhone(String mobilePhone) { this.mobilePhone = mobilePhone; } public String getWorkPhone() { return workPhone; } public void setWorkPhone(String workPhone) { this.workPhone = workPhone; } public String getPerAddress() { return perAddress; } public void setPerAddress(String perAddress) { this.perAddress = perAddress; } public String getPerEmail() { return perEmail; } public void setPerEmail(String perEmail) { this.perEmail = perEmail; } public String getPerRemark() { return perRemark; } public void setPerRemark(String perRemark) { this.perRemark = perRemark; } public Integer getIfGroup() { return ifGroup; } public void setIfGroup(Integer ifGroup) { this.ifGroup = ifGroup; } public String getBelongGroupName() { return belongGroupName; } public void setBelongGroupName(String belongGroupName) { this.belongGroupName = belongGroupName; } public String getGroupName() { return groupName; } public void setGroupName(String groupName) { this.groupName = groupName; } public String getParentCode() { return parentCode; } public void setParentCode(String parentCode) { this.parentCode = parentCode; } public String getParentUppath() { return parentUppath; } public void setParentUppath(String parentUppath) { this.parentUppath = parentUppath; } public String getBelongUser() { return belongUser; } public void setBelongUser(String belongUser) { this.belongUser = belongUser; } public Integer getPerOrder() { return perOrder; } public void setPerOrder(Integer perOrder) { this.perOrder = perOrder; } }
[ "user3@163.com" ]
user3@163.com
dea6a857840603cbf5bbac669b0d8572ea591f36
958b13739d7da564749737cb848200da5bd476eb
/src/main/java/com/alipay/api/response/AlipayTradeRepaybillOrderRefundResponse.java
8c134884d4ba09d88ef4d6a4f1c8cb6b4ed2e298
[ "Apache-2.0" ]
permissive
anywhere/alipay-sdk-java-all
0a181c934ca84654d6d2f25f199bf4215c167bd2
649e6ff0633ebfca93a071ff575bacad4311cdd4
refs/heads/master
2023-02-13T02:09:28.859092
2021-01-14T03:17:27
2021-01-14T03:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,311
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.trade.repaybill.order.refund response. * * @author auto create * @since 1.0, 2020-09-30 16:26:29 */ public class AlipayTradeRepaybillOrderRefundResponse extends AlipayResponse { private static final long serialVersionUID = 6469416482256479159L; /** * 支付宝还款账单编号,和请求入参保持一致 */ @ApiField("bill_no") private String billNo; /** * 支付宝系统资金处理成功时间,格式为"yyyy-MM-dd HH:mm:ss" */ @ApiField("gmt_refund_pay") private String gmtRefundPay; /** * 本次退款请求的外部请求号,和请求入参保持一致 */ @ApiField("out_request_no") private String outRequestNo; public void setBillNo(String billNo) { this.billNo = billNo; } public String getBillNo( ) { return this.billNo; } public void setGmtRefundPay(String gmtRefundPay) { this.gmtRefundPay = gmtRefundPay; } public String getGmtRefundPay( ) { return this.gmtRefundPay; } public void setOutRequestNo(String outRequestNo) { this.outRequestNo = outRequestNo; } public String getOutRequestNo( ) { return this.outRequestNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
06dd0c0aa5e5a2fe8d19c8902835c89054e25b1d
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v1-release_source_from_JADX/sources/com/google/zxing/qrcode/detector/Detector.java
4a691d81c50228c2fbbfb134fe1b2ade4b304ff4
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
10,798
java
package com.google.zxing.qrcode.detector; import com.google.zxing.DecodeHintType; import com.google.zxing.FormatException; import com.google.zxing.NotFoundException; import com.google.zxing.ResultPoint; import com.google.zxing.ResultPointCallback; import com.google.zxing.common.BitMatrix; import com.google.zxing.common.DetectorResult; import com.google.zxing.common.GridSampler; import com.google.zxing.common.PerspectiveTransform; import com.google.zxing.common.detector.MathUtils; import com.google.zxing.qrcode.decoder.Version; import java.util.Map; public class Detector { private final BitMatrix image; private ResultPointCallback resultPointCallback; public Detector(BitMatrix bitMatrix) { this.image = bitMatrix; } /* access modifiers changed from: protected */ public final BitMatrix getImage() { return this.image; } /* access modifiers changed from: protected */ public final ResultPointCallback getResultPointCallback() { return this.resultPointCallback; } public DetectorResult detect() throws NotFoundException, FormatException { return detect((Map<DecodeHintType, ?>) null); } public final DetectorResult detect(Map<DecodeHintType, ?> map) throws NotFoundException, FormatException { ResultPointCallback resultPointCallback2; if (map == null) { resultPointCallback2 = null; } else { resultPointCallback2 = (ResultPointCallback) map.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK); } this.resultPointCallback = resultPointCallback2; return processFinderPatternInfo(new FinderPatternFinder(this.image, resultPointCallback2).find(map)); } /* access modifiers changed from: protected */ public final DetectorResult processFinderPatternInfo(FinderPatternInfo finderPatternInfo) throws NotFoundException, FormatException { ResultPoint[] resultPointArr; FinderPattern topLeft = finderPatternInfo.getTopLeft(); FinderPattern topRight = finderPatternInfo.getTopRight(); FinderPattern bottomLeft = finderPatternInfo.getBottomLeft(); float calculateModuleSize = calculateModuleSize(topLeft, topRight, bottomLeft); if (calculateModuleSize >= 1.0f) { int computeDimension = computeDimension(topLeft, topRight, bottomLeft, calculateModuleSize); Version provisionalVersionForDimension = Version.getProvisionalVersionForDimension(computeDimension); int dimensionForVersion = provisionalVersionForDimension.getDimensionForVersion() - 7; AlignmentPattern alignmentPattern = null; if (provisionalVersionForDimension.getAlignmentPatternCenters().length > 0) { float x = (topRight.getX() - topLeft.getX()) + bottomLeft.getX(); float y = (topRight.getY() - topLeft.getY()) + bottomLeft.getY(); float f = 1.0f - (3.0f / ((float) dimensionForVersion)); int x2 = (int) (topLeft.getX() + ((x - topLeft.getX()) * f)); int y2 = (int) (topLeft.getY() + (f * (y - topLeft.getY()))); int i = 4; while (true) { if (i > 16) { break; } try { alignmentPattern = findAlignmentInRegion(calculateModuleSize, x2, y2, (float) i); break; } catch (NotFoundException unused) { i <<= 1; } } } BitMatrix sampleGrid = sampleGrid(this.image, createTransform(topLeft, topRight, bottomLeft, alignmentPattern, computeDimension), computeDimension); if (alignmentPattern == null) { resultPointArr = new ResultPoint[]{bottomLeft, topLeft, topRight}; } else { resultPointArr = new ResultPoint[]{bottomLeft, topLeft, topRight, alignmentPattern}; } return new DetectorResult(sampleGrid, resultPointArr); } throw NotFoundException.getNotFoundInstance(); } private static PerspectiveTransform createTransform(ResultPoint resultPoint, ResultPoint resultPoint2, ResultPoint resultPoint3, ResultPoint resultPoint4, int i) { float f; float f2; float f3; float f4 = ((float) i) - 3.5f; if (resultPoint4 != null) { f2 = resultPoint4.getX(); f = resultPoint4.getY(); f3 = f4 - 3.0f; } else { f2 = (resultPoint2.getX() - resultPoint.getX()) + resultPoint3.getX(); f = (resultPoint2.getY() - resultPoint.getY()) + resultPoint3.getY(); f3 = f4; } return PerspectiveTransform.quadrilateralToQuadrilateral(3.5f, 3.5f, f4, 3.5f, f3, f3, 3.5f, f4, resultPoint.getX(), resultPoint.getY(), resultPoint2.getX(), resultPoint2.getY(), f2, f, resultPoint3.getX(), resultPoint3.getY()); } private static BitMatrix sampleGrid(BitMatrix bitMatrix, PerspectiveTransform perspectiveTransform, int i) throws NotFoundException { return GridSampler.getInstance().sampleGrid(bitMatrix, i, i, perspectiveTransform); } private static int computeDimension(ResultPoint resultPoint, ResultPoint resultPoint2, ResultPoint resultPoint3, float f) throws NotFoundException { int round = ((MathUtils.round(ResultPoint.distance(resultPoint, resultPoint2) / f) + MathUtils.round(ResultPoint.distance(resultPoint, resultPoint3) / f)) / 2) + 7; int i = round & 3; if (i == 0) { return round + 1; } if (i == 2) { return round - 1; } if (i != 3) { return round; } throw NotFoundException.getNotFoundInstance(); } /* access modifiers changed from: protected */ public final float calculateModuleSize(ResultPoint resultPoint, ResultPoint resultPoint2, ResultPoint resultPoint3) { return (calculateModuleSizeOneWay(resultPoint, resultPoint2) + calculateModuleSizeOneWay(resultPoint, resultPoint3)) / 2.0f; } private float calculateModuleSizeOneWay(ResultPoint resultPoint, ResultPoint resultPoint2) { float sizeOfBlackWhiteBlackRunBothWays = sizeOfBlackWhiteBlackRunBothWays((int) resultPoint.getX(), (int) resultPoint.getY(), (int) resultPoint2.getX(), (int) resultPoint2.getY()); float sizeOfBlackWhiteBlackRunBothWays2 = sizeOfBlackWhiteBlackRunBothWays((int) resultPoint2.getX(), (int) resultPoint2.getY(), (int) resultPoint.getX(), (int) resultPoint.getY()); if (Float.isNaN(sizeOfBlackWhiteBlackRunBothWays)) { return sizeOfBlackWhiteBlackRunBothWays2 / 7.0f; } return Float.isNaN(sizeOfBlackWhiteBlackRunBothWays2) ? sizeOfBlackWhiteBlackRunBothWays / 7.0f : (sizeOfBlackWhiteBlackRunBothWays + sizeOfBlackWhiteBlackRunBothWays2) / 14.0f; } private float sizeOfBlackWhiteBlackRunBothWays(int i, int i2, int i3, int i4) { float f; float f2; float sizeOfBlackWhiteBlackRun = sizeOfBlackWhiteBlackRun(i, i2, i3, i4); int i5 = i - (i3 - i); int i6 = 0; if (i5 < 0) { f = ((float) i) / ((float) (i - i5)); i5 = 0; } else if (i5 >= this.image.getWidth()) { f = ((float) ((this.image.getWidth() - 1) - i)) / ((float) (i5 - i)); i5 = this.image.getWidth() - 1; } else { f = 1.0f; } float f3 = (float) i2; int i7 = (int) (f3 - (((float) (i4 - i2)) * f)); if (i7 < 0) { f2 = f3 / ((float) (i2 - i7)); } else if (i7 >= this.image.getHeight()) { f2 = ((float) ((this.image.getHeight() - 1) - i2)) / ((float) (i7 - i2)); i6 = this.image.getHeight() - 1; } else { i6 = i7; f2 = 1.0f; } return (sizeOfBlackWhiteBlackRun + sizeOfBlackWhiteBlackRun(i, i2, (int) (((float) i) + (((float) (i5 - i)) * f2)), i6)) - 1.0f; } private float sizeOfBlackWhiteBlackRun(int i, int i2, int i3, int i4) { int i5; int i6; int i7; int i8; int i9; boolean z; Detector detector; boolean z2; int i10 = 1; boolean z3 = Math.abs(i4 - i2) > Math.abs(i3 - i); if (z3) { i7 = i; i8 = i2; i5 = i3; i6 = i4; } else { i8 = i; i7 = i2; i6 = i3; i5 = i4; } int abs = Math.abs(i6 - i8); int abs2 = Math.abs(i5 - i7); int i11 = (-abs) / 2; int i12 = -1; int i13 = i8 < i6 ? 1 : -1; if (i7 < i5) { i12 = 1; } int i14 = i6 + i13; int i15 = i8; int i16 = i7; int i17 = 0; while (true) { if (i15 == i14) { i9 = i14; break; } int i18 = z3 ? i16 : i15; int i19 = z3 ? i15 : i16; if (i17 == i10) { detector = this; z = z3; i9 = i14; z2 = true; } else { detector = this; z = z3; i9 = i14; z2 = false; } if (z2 == detector.image.get(i18, i19)) { if (i17 == 2) { return MathUtils.distance(i15, i16, i8, i7); } i17++; } i11 += abs2; if (i11 > 0) { if (i16 == i5) { break; } i16 += i12; i11 -= abs; } i15 += i13; i14 = i9; z3 = z; i10 = 1; } if (i17 == 2) { return MathUtils.distance(i9, i5, i8, i7); } return Float.NaN; } /* access modifiers changed from: protected */ public final AlignmentPattern findAlignmentInRegion(float f, int i, int i2, float f2) throws NotFoundException { int i3 = (int) (f2 * f); int max = Math.max(0, i - i3); int min = Math.min(this.image.getWidth() - 1, i + i3) - max; float f3 = 3.0f * f; if (((float) min) >= f3) { int max2 = Math.max(0, i2 - i3); int min2 = Math.min(this.image.getHeight() - 1, i2 + i3) - max2; if (((float) min2) >= f3) { return new AlignmentPatternFinder(this.image, max, max2, min, min2, f, this.resultPointCallback).find(); } throw NotFoundException.getNotFoundInstance(); } throw NotFoundException.getNotFoundInstance(); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
a7724d3808e2b1704c9315b1b12891e996fc3e23
ac58a203b9586d7cbfbd50159f65bc9ff0602207
/src/main/java/com/packt/webstore/service/ProductService.java
aaf86767e68711c5b0814ecc56208dfa254a27e4
[]
no_license
smolamarcin/springMVC
84d81c425b0504ee55e333e2f1d541fe92cff455
549222dae2d55849fd1775e050137a4caf37fd22
refs/heads/master
2021-01-25T00:29:30.038489
2019-02-20T15:24:10
2019-02-20T15:24:10
123,297,705
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package com.packt.webstore.service; import com.packt.webstore.domain.Product; import java.util.List; import java.util.Map; import java.util.Set; public interface ProductService { List<Product> getAllProducts(); List<Product> getProductsByCategory(String category); Set<Product> getProductsByFilter(Map<String, List<String>> filterParams); Product getProductById(String productId); List<Product> getProductByCategoryAndPrice(String category, String price); List<Product> getProductsByPrice(String price); }
[ "marcin.smola7@gmail.com" ]
marcin.smola7@gmail.com
658ab84fca136913da16e39f1a0a7b23cc28ec1c
6ee4db031eb8cc1bdffe4fb699d2936544686269
/src/com/dapeng/web/action/UserAction.java
85ff1d0e3b429caa5a4211c354413e16891c5120
[]
no_license
zdapeng/ssh_crm
e037b296c266adf765693cc9b4a648668e3bc1c7
f9d6dbce6287bba7994657f46e5b8eb2c0016505
refs/heads/master
2020-03-07T18:11:48.565468
2018-04-14T09:13:10
2018-04-14T09:13:10
110,517,636
1
0
null
null
null
null
UTF-8
Java
false
false
349
java
package com.dapeng.web.action; import com.dapeng.service.UserService; import com.opensymphony.xwork2.ActionSupport; public class UserAction extends ActionSupport{ private UserService us; public String login() throws Exception { System.out.println(us); return super.execute(); } public void setUs(UserService us) { this.us = us; } }
[ "z_dapeng@mail.dlut.edu.cn" ]
z_dapeng@mail.dlut.edu.cn
33717427be3904826446d212c1c781e4364c1e71
8cb2dcc9b126ec22797195564c341bf980c70155
/colorcode.java
8973f4ba89aed53b00845745031eeaf19e5ecf55
[]
no_license
Yashodha-Nesaragi/Assignment1_conditional
f81e481c2b30110dbd42f71977c1663b32f2b786
2d9bc083bc5d5d04314037a5d0df3e6db1c7b4c9
refs/heads/main
2023-02-25T07:04:32.799791
2021-02-01T06:01:34
2021-02-01T06:01:34
334,845,774
0
0
null
null
null
null
UTF-8
Java
false
false
875
java
package assignment1week1; import java.util.Scanner; public class colorcode { public static void main(String[] args) { // TODO Auto-generated method stub Scanner ch = new Scanner(System.in); System.out.println("Enter the Colour Code : "); char choice = ch.next().charAt(0); switch(choice) { case 'R' : case 'r' : System.out.println("Red"); break; case 'B' : case 'b' : System.out.println("Blue"); break; case 'G' : case 'g' : System.out.println("Green"); break; case 'O' : case 'o' : System.out.println("Orange"); break; case 'Y' : case 'y' : System.out.println("Yellow"); break; case 'W' : case 'w' : System.out.println("White"); break; default : System.out.println("Invalid Code"); break; } ch.close(); } }
[ "noreply@github.com" ]
noreply@github.com
56fc79e69825cf6917981846f00cb9f7cc4c7233
c015c4044fc58afbf78ecb3e5e87117d52ce52fd
/src/spil/Field.java
c4d02854aa040810164a4f8d8430ee3640105681
[]
no_license
fagnig/CDIO_2
ee15cd76b1b27b1e2be271d388155595b270ea8d
ff6e770f80875fe12f1a119373f6015de89a88f7
refs/heads/master
2021-08-08T13:21:45.748614
2017-11-10T10:59:29
2017-11-10T10:59:29
107,985,785
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package spil; public class Field { private int id; private String titleText; private String subText; public Field(int id, String tt, String st) { this.id = id; this.titleText = tt; this.subText = st; } public int getId() { return id; } public String getTitle() { return titleText; } public String getSubtext() { return subText; } }
[ "fagnig@github.com" ]
fagnig@github.com
c0ee659f6bf13db33efaf35f7d1ce23b98f04823
971d19d660c32c3b2525fab468f044f325129907
/src/framelisteners/Database/DoctorChase/LoadTelmedLeads.java
c7f3ebf3a812eeb0ebe682fc15b20097fa9f8a2d
[]
no_license
Tkuenzler/Fax-app
00490c6340c2cdbf95b55a6b4fb45069b917a622
dfec07f989a3a5cebee8ca111be483504d8689f4
refs/heads/master
2023-01-24T14:18:12.120198
2020-12-06T00:57:39
2020-12-06T00:57:39
284,840,407
0
0
null
null
null
null
UTF-8
Java
false
false
899
java
package framelisteners.Database.DoctorChase; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JOptionPane; import Clients.DatabaseClient; import source.CSVFrame; import table.Record; public class LoadTelmedLeads implements ActionListener { @Override public void actionPerformed(ActionEvent arg0) { // TODO Auto-generated method stub DatabaseClient client = new DatabaseClient(false); if(client.getDatabaseName()==null || client.getTableName()==null) return; ResultSet set = client.loadTelmedLeads(); try { while(set.next()) { CSVFrame.model.addRow(new Record(set,client.getDatabaseName(),client.getTableName())); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } client.close(); } }
[ "jm734@192.168.0.23" ]
jm734@192.168.0.23
44b3351aa9aa2c67686d8b3d2adacf99ad3b4c96
68871cfeaf37c12fd2e3608180d6ebd1689e9fec
/gen/com/numhero/client/widget/submenu/TrackTimeSubmenu_TrackTimeSubmenuUiBinderImpl.java
96e821ad996dde6a8534d2fb6e952db323c26a14
[]
no_license
uberto/netnumero
5e0170ed14d3f343f5eba651b73a6c82f8ec5d0e
18c462fed7a046281f88edcf3b47fcc61dedcbf6
refs/heads/master
2021-04-06T19:29:13.461683
2017-03-10T10:03:07
2017-03-10T10:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,289
java
package com.numhero.client.widget.submenu; import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Element; import com.google.gwt.safehtml.client.SafeHtmlTemplates; import com.google.gwt.safehtml.shared.SafeHtml; import com.google.gwt.safehtml.shared.SafeHtmlUtils; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiBinderUtil; import com.google.gwt.user.client.ui.Widget; public class TrackTimeSubmenu_TrackTimeSubmenuUiBinderImpl implements UiBinder<com.google.gwt.user.client.ui.Widget, com.numhero.client.widget.submenu.TrackTimeSubmenu>, com.numhero.client.widget.submenu.TrackTimeSubmenu.TrackTimeSubmenuUiBinder { static TrackTimeSubmenuTrackTimeSubmenuUiBinderImplGenMessages messages = (TrackTimeSubmenuTrackTimeSubmenuUiBinderImplGenMessages) GWT.create(TrackTimeSubmenuTrackTimeSubmenuUiBinderImplGenMessages.class); interface Template extends SafeHtmlTemplates { @Template("<dl class='inh-menu'> <dt class='inh-menu'> <a class='inh-menu' href='#timeentry'> {0} </a> </dt> <dt class='inh-menu-end'> <a class='inh-menu' href='#timeentries'> {1} </a> </dt> </dl>") SafeHtml html1(SafeHtml arg0, SafeHtml arg1); } Template template = GWT.create(Template.class); public com.google.gwt.user.client.ui.Widget createAndBindUi(final com.numhero.client.widget.submenu.TrackTimeSubmenu owner) { com.numhero.client.widget.submenu.TrackTimeSubmenu_TrackTimeSubmenuUiBinderImpl_GenBundle clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay = (com.numhero.client.widget.submenu.TrackTimeSubmenu_TrackTimeSubmenuUiBinderImpl_GenBundle) GWT.create(com.numhero.client.widget.submenu.TrackTimeSubmenu_TrackTimeSubmenuUiBinderImpl_GenBundle.class); com.numhero.client.widget.submenu.TrackTimeSubmenu_TrackTimeSubmenuUiBinderImpl_GenCss_style style = clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style(); com.google.gwt.user.client.ui.HTMLPanel f_HTMLPanel1 = new com.google.gwt.user.client.ui.HTMLPanel(template.html1(SafeHtmlUtils.fromSafeConstant(messages.message1()), SafeHtmlUtils.fromSafeConstant(messages.message2())).asString()); clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style().ensureInjected(); return f_HTMLPanel1; } }
[ "antonio.signore@gmail.com" ]
antonio.signore@gmail.com
fc6bba1aa631fc9154a75846860fe72d63fb87c1
b46a920d63b23248f0c97039a11a0b302ba01da2
/src/main/java/top/mcpbs/games/uhc/SettlementFormTask.java
95e9021ea441b82c3358e922358b4cbbecd6511c
[]
no_license
smartcmd/pbsgames
c3dfa65c94292bf2e9b051f1115d72b298568691
75e7b3fa05d17a75abb7616f3b1d58bac18ff6d8
refs/heads/master
2023-01-19T06:35:21.362932
2020-11-21T11:43:56
2020-11-21T11:43:56
305,742,696
2
0
null
null
null
null
UTF-8
Java
false
false
501
java
package top.mcpbs.games.uhc; import cn.nukkit.Player; import cn.nukkit.plugin.Plugin; import cn.nukkit.scheduler.PluginTask; public class SettlementFormTask extends PluginTask { boolean iswinner; Player player; public SettlementFormTask(Plugin owner, Player player, boolean iswinner) { super(owner); this.iswinner = iswinner; this.player = player; } @Override public void onRun(int i) { Forms.IncomeSettlementForm(player,iswinner); } }
[ "3523206925@qq.com" ]
3523206925@qq.com
6cfb3d9845db626482cbd079a025f9430000c7b6
56ab1fbaf6f238e3c6eb2dcc181019a33a0da60d
/android/app/src/main/java/com/mobile_17_octt_dev_13483/MainApplication.java
1eecd6fff7a40303aedf178a56624649a1b51673
[]
no_license
crowdbotics-apps/mobile-17-octt-dev-13483
15b5287c89a3ab2e4db9e58e1968bf096fa8d39c
acd6836ffa844ea0e78b8f0410c9865cf1ed6914
refs/heads/master
2022-12-31T12:36:42.666711
2020-10-17T11:48:58
2020-10-17T11:48:58
304,864,728
0
0
null
null
null
null
UTF-8
Java
false
false
2,701
java
package com.mobile_17_octt_dev_13483; import android.app.Application; import android.content.Context; import com.facebook.react.PackageList; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } /** * Loads Flipper in React Native templates. Call this in the onCreate method with something like * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); * * @param context * @param reactInstanceManager */ private static void initializeFlipper( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class<?> aClass = Class.forName("com.rndiffapp.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
b92cc75831c62dec35747bb929131c2408d31a59
ad8711303e2a79a322e833da9803a3f18db3b0e5
/EZJava/Statements/src/whilestmt/WhileStatement8.java
58da8c1f92cd5700b8fe0878a3f90e14573412d5
[]
no_license
jsb5589/JAVAStudy
be2f7de7339301c3ce88abd1ef737eab6f3bb15b
efeac440b02a5670c1bf848f41b2fac57f05f3f9
refs/heads/master
2023-07-11T13:24:42.827122
2021-08-18T06:12:24
2021-08-18T06:12:24
395,255,932
0
0
null
null
null
null
UHC
Java
false
false
774
java
package whilestmt; /* * 반복문(while, for) * [문제11] 구구단 * - 2단부터 5단까지는 30미만을 출력 * - 6단부터 9단까지는 30이상을 출력 */ public class WhileStatement8 { public static void main(String[] args) { int cnt = 0; int x = 2; while(x <= 9) { System.out.printf("[%d단]\n", x); for(int y=1; y <= 9; y++) { int z = x * y; if((x >= 2 && x <=5) && z < 30) { System.out.printf("[%d]*[%d]=[%d]%n", x, y, z); } else if((x >= 6 && x <= 9) && z >= 30) { System.out.printf("[%d]*[%d]=[%d]%n", x, y, z); } ++cnt; } // for(y) x++; System.out.println("-----------------------------------"); } // while(x) System.out.println("[while end] total count=" + cnt); } }
[ "jsb5589@naver.com" ]
jsb5589@naver.com
e430afcae74fe87611a50b459fb17523c8624d1a
0adcb787c2d7b3bbf81f066526b49653f9c8db40
/src/main/java/com/alipay/api/domain/ArrangementOpenQueryResultVO.java
c1633879bbf310da249d26f9c0bc0965e11174f1
[ "Apache-2.0" ]
permissive
yikey/alipay-sdk-java-all
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
91d84898512c5a4b29c707b0d8d0cd972610b79b
refs/heads/master
2020-05-22T13:40:11.064476
2019-04-11T14:11:02
2019-04-11T14:11:02
186,365,665
1
0
null
2019-05-13T07:16:09
2019-05-13T07:16:08
null
UTF-8
Java
false
false
1,846
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 合约查询结果bean * * @author auto create * @since 1.0, 2017-03-10 17:03:54 */ public class ArrangementOpenQueryResultVO extends AlipayObject { private static final long serialVersionUID = 6587122829581757518L; /** * 合约编号 */ @ApiField("ar_no") private String arNo; /** * 合约状态 未生效:UN_INVALID 已取消:CANCEL 已生效:VALID 已失效:INVALID */ @ApiField("ar_status") private String arStatus; /** * JSON结构的扩展字段,备用字段 */ @ApiField("ext_data") private String extData; /** * 有效期截止时间 */ @ApiField("invalid_date") private Date invalidDate; /** * 签约时间 */ @ApiField("sign_date") private Date signDate; /** * 有效期起始时间 */ @ApiField("valid_date") private Date validDate; public String getArNo() { return this.arNo; } public void setArNo(String arNo) { this.arNo = arNo; } public String getArStatus() { return this.arStatus; } public void setArStatus(String arStatus) { this.arStatus = arStatus; } public String getExtData() { return this.extData; } public void setExtData(String extData) { this.extData = extData; } public Date getInvalidDate() { return this.invalidDate; } public void setInvalidDate(Date invalidDate) { this.invalidDate = invalidDate; } public Date getSignDate() { return this.signDate; } public void setSignDate(Date signDate) { this.signDate = signDate; } public Date getValidDate() { return this.validDate; } public void setValidDate(Date validDate) { this.validDate = validDate; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
5692f7bb431e35d272937a8f907f5365ed1ee117
74b47b895b2f739612371f871c7f940502e7165b
/aws-java-sdk-workmail/src/main/java/com/amazonaws/services/workmail/model/DescribeInboundDmarcSettingsResult.java
5dd2e46c7478f7c22589ec95022b7531c4f35e0e
[ "Apache-2.0" ]
permissive
baganda07/aws-sdk-java
fe1958ed679cd95b4c48f971393bf03eb5512799
f19bdb30177106b5d6394223a40a382b87adf742
refs/heads/master
2022-11-09T21:55:43.857201
2022-10-24T21:08:19
2022-10-24T21:08:19
221,028,223
0
0
Apache-2.0
2019-11-11T16:57:12
2019-11-11T16:57:11
null
UTF-8
Java
false
false
4,185
java
/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.workmail.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeInboundDmarcSettings" * target="_top">AWS API Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeInboundDmarcSettingsResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable { /** * <p> * Lists the enforcement setting of the applied policy. * </p> */ private Boolean enforced; /** * <p> * Lists the enforcement setting of the applied policy. * </p> * * @param enforced * Lists the enforcement setting of the applied policy. */ public void setEnforced(Boolean enforced) { this.enforced = enforced; } /** * <p> * Lists the enforcement setting of the applied policy. * </p> * * @return Lists the enforcement setting of the applied policy. */ public Boolean getEnforced() { return this.enforced; } /** * <p> * Lists the enforcement setting of the applied policy. * </p> * * @param enforced * Lists the enforcement setting of the applied policy. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeInboundDmarcSettingsResult withEnforced(Boolean enforced) { setEnforced(enforced); return this; } /** * <p> * Lists the enforcement setting of the applied policy. * </p> * * @return Lists the enforcement setting of the applied policy. */ public Boolean isEnforced() { return this.enforced; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getEnforced() != null) sb.append("Enforced: ").append(getEnforced()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeInboundDmarcSettingsResult == false) return false; DescribeInboundDmarcSettingsResult other = (DescribeInboundDmarcSettingsResult) obj; if (other.getEnforced() == null ^ this.getEnforced() == null) return false; if (other.getEnforced() != null && other.getEnforced().equals(this.getEnforced()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnforced() == null) ? 0 : getEnforced().hashCode()); return hashCode; } @Override public DescribeInboundDmarcSettingsResult clone() { try { return (DescribeInboundDmarcSettingsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }
[ "" ]
f7cb8026b4a666864b0782ea564f60d270cd175d
76c0892c52c049fe9c09951e9d4962fc07973069
/src/test/java/edu/jhu/prim/sort/DoubleSortTest.java
f9c57ac173fa9ac165fae0343c9d9540392e570f
[ "Apache-2.0" ]
permissive
rkawajiri/prim
0b00bafc92031bcf9d8276b7ad1a540b1efd4db6
a6a0b742ed51e23e69ef46dc74f5c23b509e7013
refs/heads/master
2021-01-16T20:54:24.468117
2014-06-21T00:50:57
2014-06-21T00:50:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,733
java
package edu.jhu.prim.sort; import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.Random; import org.junit.Test; import edu.jhu.prim.util.JUnitUtils; public class DoubleSortTest { /* ---------- Doubles only --------------*/ @Test public void testQuicksortAsc() { double[] values = new double[]{ 1.0f, 3.0f, 2.0f, -1.0, 5.0}; DoubleSort.sortAsc(values); System.out.println(Arrays.toString(values)); JUnitUtils.assertArrayEquals(new double[]{ -1.0, 1.0f, 2.0, 3.0f, 5.0}, values, 1e-13); } @Test public void testQuicksortDesc() { double[] values = new double[]{ 1.0f, 3.0f, 2.0f, -1.0, 5.0}; DoubleSort.sortDesc(values); System.out.println(Arrays.toString(values)); JUnitUtils.assertArrayEquals(new double[]{5.0, 3.0, 2.0, 1.0, -1.0}, values, 1e-13); } @Test public void testQuicksortOnRandomInput() { Random random = new Random(); double[] values = new double[]{ 1.0f, 3.0f, 2.0f, -1.0, 5.0}; for (int i=0; i<10; i++) { for (int j=0; j<values.length; j++) { values[j] = random.nextDouble(); } DoubleSort.sortAsc(values); System.out.println(Arrays.toString(values)); assertTrue(DoubleSort.isSortedAsc(values)); } for (int i=0; i<10; i++) { for (int j=0; j<values.length; j++) { values[j] = random.nextDouble(); } DoubleSort.sortDesc(values); System.out.println(Arrays.toString(values)); assertTrue(DoubleSort.isSortedDesc(values)); } } }
[ "mrg@cs.jhu.edu" ]
mrg@cs.jhu.edu
0c34fe6435fd53fb1005b442425471bcc5ecf103
c2e6f7c40edce79fd498a5bbaba4c2d69cf05e0c
/src/main/java/kotlin/random/FallbackThreadLocalRandom$implStorage$1.java
0cd892cf7c94fe6f29a4ef98c7b60baba1c644d0
[]
no_license
pengju1218/decompiled-apk
7f64ee6b2d7424b027f4f112c77e47cd420b2b8c
b60b54342a8e294486c45b2325fb78155c3c37e6
refs/heads/master
2022-03-23T02:57:09.115704
2019-12-28T23:13:07
2019-12-28T23:13:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
830
java
package kotlin.random; import java.util.Random; import kotlin.Metadata; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0011\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\b\u0010\u0003\u001a\u00020\u0002H\u0014¨\u0006\u0004"}, d2 = {"kotlin/random/FallbackThreadLocalRandom$implStorage$1", "Ljava/lang/ThreadLocal;", "Ljava/util/Random;", "initialValue", "kotlin-stdlib"}, k = 1, mv = {1, 1, 15}) public final class FallbackThreadLocalRandom$implStorage$1 extends ThreadLocal<Random> { FallbackThreadLocalRandom$implStorage$1() { } /* access modifiers changed from: protected */ @NotNull /* renamed from: a */ public Random initialValue() { return new Random(); } }
[ "apoorwaand@gmail.com" ]
apoorwaand@gmail.com
16560321753074fa09b60ab820f1d8743e980370
98ac8390217350fe0b27e4775a3af0db5b327507
/Java/StackStabilization1.java
751be4d03efc3e2afe17eacc9684981ddffc5111
[]
no_license
thattazhi/Coding_Problems
db564975d8a7cddb9a2c9eaae2626a3548885327
6ded1edce9e3970816f691802f61d7e08f871f15
refs/heads/master
2022-03-15T22:05:00.947009
2022-02-27T20:28:43
2022-02-27T20:28:43
166,294,535
0
0
null
null
null
null
UTF-8
Java
false
false
574
java
public class StackStabilization1 { public static int getMinimumDeflatedDiscCount(int N, int[] R) { if(R[N - 1] < N) return -1; int ans = 0; for(int i = N - 2; i >= 0; i--) { if(R[i] < i + 1) return -1; if(R[i] >= R[i + 1]){ R[i] = R[i + 1] - 1; ans++; } } return ans; } public static void main(String[] args) { int N = 5; int R[] = {2, 5, 3, 6, 5}; System.out.println(getMinimumDeflatedDiscCount(N, R)); } }
[ "sajiththattazhi14@gmail.com" ]
sajiththattazhi14@gmail.com
6ec58e1fc53ae08899eb62c91bb2217c9ea83e5f
c2fa6a2bbf47497a9b67180e4f42ac1ef47baece
/app/src/main/java/com/innovationtechnology/app/hotelturismoapp/Usuario.java
3e01c36da1a4c993ddf8cc468b1a77f1d30e3b19
[]
no_license
ARosentiehl24/HotelTurismoApp
f961d34d0ebdb19acb4d15e897eb6955cb2e267f
bf7aefcad17e7b3e997e32a89d6e223291c9f4a8
refs/heads/master
2022-10-13T06:01:26.547732
2016-05-18T23:06:26
2016-05-18T23:06:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
81
java
package com.innovationtechnology.app.hotelturismoapp; public class Usuario { }
[ "alberto9.24.93@gmail.com" ]
alberto9.24.93@gmail.com
18e68f6aad4fa61d7f78f707dc276d4da8f398dd
57b7e5fbe0d2f0aa2da4789c33a1f1bf57198632
/src/com/skymiracle/server/tcpServer/cmdStorageServer/UserMailAddClassCommander.java
6f0adfd20e47b72c47232d6abb59f34831c7ce04
[]
no_license
neorayer/SkyJLib
9285c2794876de875617faab37c4cb49bfd71bd0
02ca96cea8806a0261375703f53bdc5056d2c4b1
refs/heads/master
2021-01-21T13:40:28.243412
2019-03-07T00:13:37
2019-03-07T00:13:37
52,416,765
1
0
null
null
null
null
UTF-8
Java
false
false
973
java
package com.skymiracle.server.tcpServer.cmdStorageServer; import com.skymiracle.fileBox.MailClass; import com.skymiracle.server.tcpServer.cmdServer.CmdConnHandler; public class UserMailAddClassCommander extends UserDomainCommander { public UserMailAddClassCommander(CmdConnHandler connHandler) { super(connHandler); // TODO Auto-generated constructor stub } @Override protected byte[] doCmd(String username, String domain, String tail) throws Exception { String[] args = tail.split(" "); if (args.length < 5) return getHelpBytesCRLF("mailClassName mailClassFolderName target op keyWord "); String mailClassName = args[0]; String mailClassFolderName = args[1]; String target = args[2]; String op = args[3]; String keyWord = args[4]; MailClass mailClass = new MailClass(mailClassName, mailClassFolderName, target, op, keyWord); getUsMailAccessorLocal(username, domain).mailAddClass(mailClass); return getBytesCRLF("220 OK"); } }
[ "neorayer@gmail.com" ]
neorayer@gmail.com
c384dae6444963ea7775777dda86a95a34b09c3e
eadbd6ba5a2d5c960ffa9788f5f7e79eeb98384d
/src/android/support/v7/internal/view/menu/ListMenuPresenter.java
bf239f209aa412ff67c9e9e03e26aad61f83fec0
[]
no_license
marcoucou/com.tinder
37edc3b9fb22496258f3a8670e6349ce5b1d8993
c68f08f7cacf76bf7f103016754eb87b1c0ac30d
refs/heads/master
2022-04-18T23:01:15.638983
2020-04-14T18:04:10
2020-04-14T18:04:10
255,685,521
0
0
null
2020-04-14T18:00:06
2020-04-14T18:00:05
null
UTF-8
Java
false
false
6,875
java
package android.support.v7.internal.view.menu; import android.content.Context; import android.os.Bundle; import android.os.Parcelable; import android.support.v7.appcompat.R.layout; import android.util.SparseArray; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.ListAdapter; import java.util.ArrayList; public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClickListener { private static final String TAG = "ListMenuPresenter"; public static final String VIEWS_TAG = "android:menu:list"; MenuAdapter mAdapter; private MenuPresenter.Callback mCallback; Context mContext; private int mId; LayoutInflater mInflater; private int mItemIndexOffset; int mItemLayoutRes; MenuBuilder mMenu; ExpandedMenuView mMenuView; int mThemeRes; public ListMenuPresenter(int paramInt1, int paramInt2) { mItemLayoutRes = paramInt1; mThemeRes = paramInt2; } public ListMenuPresenter(Context paramContext, int paramInt) { this(paramInt, 0); mContext = paramContext; mInflater = LayoutInflater.from(mContext); } public boolean collapseItemActionView(MenuBuilder paramMenuBuilder, MenuItemImpl paramMenuItemImpl) { return false; } public boolean expandItemActionView(MenuBuilder paramMenuBuilder, MenuItemImpl paramMenuItemImpl) { return false; } public boolean flagActionItems() { return false; } public ListAdapter getAdapter() { if (mAdapter == null) { mAdapter = new MenuAdapter(); } return mAdapter; } public int getId() { return mId; } int getItemIndexOffset() { return mItemIndexOffset; } public MenuView getMenuView(ViewGroup paramViewGroup) { if (mAdapter == null) { mAdapter = new MenuAdapter(); } if (!mAdapter.isEmpty()) { if (mMenuView == null) { mMenuView = ((ExpandedMenuView)mInflater.inflate(R.layout.abc_expanded_menu_layout, paramViewGroup, false)); mMenuView.setAdapter(mAdapter); mMenuView.setOnItemClickListener(this); } return mMenuView; } return null; } public void initForMenu(Context paramContext, MenuBuilder paramMenuBuilder) { if (mThemeRes != 0) { mContext = new ContextThemeWrapper(paramContext, mThemeRes); mInflater = LayoutInflater.from(mContext); } for (;;) { mMenu = paramMenuBuilder; if (mAdapter != null) { mAdapter.notifyDataSetChanged(); } return; if (mContext != null) { mContext = paramContext; if (mInflater == null) { mInflater = LayoutInflater.from(mContext); } } } } public void onCloseMenu(MenuBuilder paramMenuBuilder, boolean paramBoolean) { if (mCallback != null) { mCallback.onCloseMenu(paramMenuBuilder, paramBoolean); } } public void onItemClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong) { mMenu.performItemAction(mAdapter.getItem(paramInt), 0); } public void onRestoreInstanceState(Parcelable paramParcelable) { restoreHierarchyState((Bundle)paramParcelable); } public Parcelable onSaveInstanceState() { if (mMenuView == null) { return null; } Bundle localBundle = new Bundle(); saveHierarchyState(localBundle); return localBundle; } public boolean onSubMenuSelected(SubMenuBuilder paramSubMenuBuilder) { if (!paramSubMenuBuilder.hasVisibleItems()) { return false; } new MenuDialogHelper(paramSubMenuBuilder).show(null); if (mCallback != null) { mCallback.onOpenSubMenu(paramSubMenuBuilder); } return true; } public void restoreHierarchyState(Bundle paramBundle) { paramBundle = paramBundle.getSparseParcelableArray("android:menu:list"); if (paramBundle != null) { mMenuView.restoreHierarchyState(paramBundle); } } public void saveHierarchyState(Bundle paramBundle) { SparseArray localSparseArray = new SparseArray(); if (mMenuView != null) { mMenuView.saveHierarchyState(localSparseArray); } paramBundle.putSparseParcelableArray("android:menu:list", localSparseArray); } public void setCallback(MenuPresenter.Callback paramCallback) { mCallback = paramCallback; } public void setId(int paramInt) { mId = paramInt; } public void setItemIndexOffset(int paramInt) { mItemIndexOffset = paramInt; if (mMenuView != null) { updateMenuView(false); } } public void updateMenuView(boolean paramBoolean) { if (mAdapter != null) { mAdapter.notifyDataSetChanged(); } } private class MenuAdapter extends BaseAdapter { private int mExpandedIndex = -1; public MenuAdapter() { findExpandedIndex(); } void findExpandedIndex() { MenuItemImpl localMenuItemImpl = mMenu.getExpandedItem(); if (localMenuItemImpl != null) { ArrayList localArrayList = mMenu.getNonActionItems(); int j = localArrayList.size(); int i = 0; while (i < j) { if ((MenuItemImpl)localArrayList.get(i) == localMenuItemImpl) { mExpandedIndex = i; return; } i += 1; } } mExpandedIndex = -1; } public int getCount() { int i = mMenu.getNonActionItems().size() - mItemIndexOffset; if (mExpandedIndex < 0) { return i; } return i - 1; } public MenuItemImpl getItem(int paramInt) { ArrayList localArrayList = mMenu.getNonActionItems(); int i = mItemIndexOffset + paramInt; paramInt = i; if (mExpandedIndex >= 0) { paramInt = i; if (i >= mExpandedIndex) { paramInt = i + 1; } } return (MenuItemImpl)localArrayList.get(paramInt); } public long getItemId(int paramInt) { return paramInt; } public View getView(int paramInt, View paramView, ViewGroup paramViewGroup) { if (paramView == null) { paramView = mInflater.inflate(mItemLayoutRes, paramViewGroup, false); } for (;;) { ((MenuView.ItemView)paramView).initialize(getItem(paramInt), 0); return paramView; } } public void notifyDataSetChanged() { findExpandedIndex(); super.notifyDataSetChanged(); } } } /* Location: * Qualified Name: android.support.v7.internal.view.menu.ListMenuPresenter * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
d59214ebc714a65dd8c6eb444ff76c7f2958391b
8f5fd02b91e6fb9fe13abbae4fc3dffc724fc77d
/src/day41_OOP/Elevator.java
9f348e1a9830de5ca82421acd98f42018f117192
[]
no_license
dleo555/JavaProgramming
7c800c48e2a9b064810646805a66866694d61a91
d9fec7e9d7fded48b26b8371b48e9e3ed0469342
refs/heads/master
2021-05-15T02:51:31.306583
2020-03-26T22:11:34
2020-03-26T22:11:34
250,383,175
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
package day41_OOP; public class Elevator { private int currentFloor; public void goToFloor(int newFloor) { if (newFloor >= 0 && newFloor <= 6) { if (newFloor > currentFloor) { for (int i = currentFloor; i < newFloor; i++) { System.out.println("going to floor " + (i + 1)); } } else if (newFloor < currentFloor) { for (int i = currentFloor; i > newFloor; i--) { System.out.println("going to floor " + (i - 1)); } } else if (newFloor == currentFloor) { System.out.println("You are already in floor " + newFloor); } else { System.out.println("Invalid floor number"); } } } }
[ "dleonov555@gmail.com" ]
dleonov555@gmail.com
f6981b09ad2fc027af49191c1124af7645d14074
82f693c0cf7306afc841c72255e6a6b0aa04eaf2
/src/main/java/service/GenericService.java
00fcaaa00bf5db1088b505d8ed962323fd020f1d
[]
no_license
dgulevich/studentJournal
4f70f337caa9105077d1252518594f8d6a5edbdd
fa19dc1685d52c55f49275eb9f627365abd1a7b7
refs/heads/master
2020-06-13T04:30:56.538660
2019-08-19T21:58:41
2019-08-19T21:58:41
194,534,761
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package main.java.service; import java.util.Collection; import java.util.Optional; public interface GenericService<T> { Optional<T> save(T object); Optional<T> update(T object); Collection<T> getAll(); Optional<T> getById(Long id); void delete(T object); void deleteAll(); void deleteById(Long id); }
[ "gulevi4@gmail.com" ]
gulevi4@gmail.com
2d48b91b64eae68f9ae13575b1d22717b32b0fb7
7b198fad75196f7e474ba702bf7eb9067c81b3b4
/src/main/dev/com/wonders/fzb/legislation/beans/LegislationProcessTask.java
642de1991ec054b27dc05e65d1c1392fcc041863
[]
no_license
nfzbgroup/nfzb
6398455aee1aa05e9412103ec9d072a49bf2b851
d83a823f756d164dbe56458292d3e4860ab3ca98
refs/heads/master
2020-04-27T11:53:46.515579
2019-05-27T10:14:07
2019-05-27T10:14:07
174,313,187
0
2
null
null
null
null
UTF-8
Java
false
false
8,786
java
package com.wonders.fzb.legislation.beans; import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; import java.io.Serializable; import java.util.Date; /** * LEGISLATION_PROCESS_TASK Bean (操作业务实体) * autoCreated by lj */ @SuppressWarnings("serial") @Entity @Table(name = "LEGISLATION_PROCESS_TASK") public class LegislationProcessTask implements Serializable { public static final String LegislationProcessTask = "LEGISLATION_PROCESS_TASK"; public LegislationProcessTask() { } /** * ST_DEAL_ID */ @Column(name = "ST_DEAL_ID") private String stDealId; /** * ST_DEAL_ID */ public String getStDealId(){ return stDealId; } /** * ST_DEAL_ID */ public void setStDealId (String stDealId){ this.stDealId = stDealId; } /** * ST_DOC_ID */ @Column(name = "ST_DOC_ID") private String stDocId; /** * ST_DOC_ID */ public String getStDocId(){ return stDocId; } /** * ST_DOC_ID */ public void setStDocId (String stDocId){ this.stDocId = stDocId; } /** * ST_TASK_ID */ @Id @GenericGenerator(name = "id", strategy = "assigned") @GeneratedValue(generator = "id") @Column(name = "ST_TASK_ID") private String stTaskId; /** * ST_TASK_ID */ public String getStTaskId(){ return stTaskId; } /** * ST_TASK_ID */ public void setStTaskId (String stTaskId){ this.stTaskId = stTaskId; } /** * DT_DEAD_DATE */ @Column(name = "DT_DEAD_DATE") private Date dtDeadDate; /** * DT_DEAD_DATE */ public Date getDtDeadDate(){ return dtDeadDate; } /** * DT_DEAD_DATE */ public void setDtDeadDate (Date dtDeadDate){ this.dtDeadDate = dtDeadDate; } /** * ST_NODE_NAME */ @Column(name = "ST_NODE_NAME") private String stNodeName; /** * ST_NODE_NAME */ public String getStNodeName(){ return stNodeName; } /** * ST_NODE_NAME */ public void setStNodeName (String stNodeName){ this.stNodeName = stNodeName; } /** * ST_TEAM_ID */ @Column(name = "ST_TEAM_ID") private String stTeamId; /** * ST_TEAM_ID */ public String getStTeamId(){ return stTeamId; } /** * ST_TEAM_ID */ public void setStTeamId (String stTeamId){ this.stTeamId = stTeamId; } /** * ST_ENABLE */ @Column(name = "ST_ENABLE") private String stEnable; /** * ST_ENABLE */ public String getStEnable(){ return stEnable; } /** * ST_ENABLE */ public void setStEnable (String stEnable){ this.stEnable = stEnable; } /** * ST_TEAM_NAME */ @Column(name = "ST_TEAM_NAME") private String stTeamName; /** * ST_TEAM_NAME */ public String getStTeamName(){ return stTeamName; } /** * ST_TEAM_NAME */ public void setStTeamName (String stTeamName){ this.stTeamName = stTeamName; } /** * ST_PARENT_ID */ @Column(name = "ST_PARENT_ID") private String stParentId; /** * ST_PARENT_ID */ public String getStParentId(){ return stParentId; } /** * ST_PARENT_ID */ public void setStParentId (String stParentId){ this.stParentId = stParentId; } /** * ST_COMMENT1 */ @Column(name = "ST_COMMENT1") private String stComment1; /** * ST_COMMENT1 */ public String getStComment1(){ return stComment1; } /** * ST_COMMENT1 */ public void setStComment1 (String stComment1){ this.stComment1 = stComment1; } /** * ST_COMMENT2 */ @Column(name = "ST_COMMENT2") private String stComment2; /** * ST_COMMENT2 */ public String getStComment2(){ return stComment2; } /** * ST_COMMENT2 */ public void setStComment2 (String stComment2){ this.stComment2 = stComment2; } /** * ST_FLOW_ID */ @Column(name = "ST_FLOW_ID") private String stFlowId; /** * ST_FLOW_ID */ public String getStFlowId(){ return stFlowId; } /** * ST_FLOW_ID */ public void setStFlowId (String stFlowId){ this.stFlowId = stFlowId; } /** * ST_ROLE_NAME */ @Column(name = "ST_ROLE_NAME") private String stRoleName; /** * ST_ROLE_NAME */ public String getStRoleName(){ return stRoleName; } /** * ST_ROLE_NAME */ public void setStRoleName (String stRoleName){ this.stRoleName = stRoleName; } /** * ST_ROLE_ID */ @Column(name = "ST_ROLE_ID") private String stRoleId; /** * ST_ROLE_ID */ public String getStRoleId(){ return stRoleId; } /** * ST_ROLE_ID */ public void setStRoleId (String stRoleId){ this.stRoleId = stRoleId; } /** * ST_USER_NAME */ @Column(name = "ST_USER_NAME") private String stUserName; /** * ST_USER_NAME */ public String getStUserName(){ return stUserName; } /** * ST_USER_NAME */ public void setStUserName (String stUserName){ this.stUserName = stUserName; } /** * ST_BAK_TWO */ @Column(name = "ST_BAK_TWO") private String stBakTwo; /** * ST_BAK_TWO */ public String getStBakTwo(){ return stBakTwo; } /** * ST_BAK_TWO */ public void setStBakTwo (String stBakTwo){ this.stBakTwo = stBakTwo; } /** * ST_ACTIVE */ @Column(name = "ST_ACTIVE") private String stActive; /** * ST_ACTIVE */ public String getStActive(){ return stActive; } /** * ST_ACTIVE */ public void setStActive (String stActive){ this.stActive = stActive; } /** * DT_BAK_DATE */ @Column(name = "DT_BAK_DATE") private Date dtBakDate; /** * DT_BAK_DATE */ public Date getDtBakDate(){ return dtBakDate; } /** * DT_BAK_DATE */ public void setDtBakDate (Date dtBakDate){ this.dtBakDate = dtBakDate; } /** * ST_DEAL_NAME */ @Column(name = "ST_DEAL_NAME") private String stDealName; /** * ST_DEAL_NAME */ public String getStDealName(){ return stDealName; } /** * ST_DEAL_NAME */ public void setStDealName (String stDealName){ this.stDealName = stDealName; } /** * DT_DEAL_DATE */ @Column(name = "DT_DEAL_DATE") private Date dtDealDate; /** * DT_DEAL_DATE */ public Date getDtDealDate(){ return dtDealDate; } /** * DT_DEAL_DATE */ public void setDtDealDate (Date dtDealDate){ this.dtDealDate = dtDealDate; } /** * ST_USER_ID */ @Column(name = "ST_USER_ID") private String stUserId; /** * ST_USER_ID */ public String getStUserId(){ return stUserId; } /** * ST_USER_ID */ public void setStUserId (String stUserId){ this.stUserId = stUserId; } /** * DT_OPEN_DATE */ @Column(name = "DT_OPEN_DATE") private Date dtOpenDate; /** * DT_OPEN_DATE */ public Date getDtOpenDate(){ return dtOpenDate; } /** * DT_OPEN_DATE */ public void setDtOpenDate (Date dtOpenDate){ this.dtOpenDate = dtOpenDate; } /** * ST_TASK_STATUS */ @Column(name = "ST_TASK_STATUS") private String stTaskStatus; /** * ST_TASK_STATUS */ public String getStTaskStatus(){ return stTaskStatus; } /** * ST_TASK_STATUS */ public void setStTaskStatus (String stTaskStatus){ this.stTaskStatus = stTaskStatus; } /** * ST_BAK_ONE */ @Column(name = "ST_BAK_ONE") private String stBakOne; /** * ST_BAK_ONE */ public String getStBakOne(){ return stBakOne; } /** * ST_BAK_ONE */ public void setStBakOne (String stBakOne){ this.stBakOne = stBakOne; } /** * ST_NODE_ID */ @Column(name = "ST_NODE_ID") private String stNodeId; /** * ST_NODE_ID */ public String getStNodeId(){ return stNodeId; } /** * ST_NODE_ID */ public void setStNodeId (String stNodeId){ this.stNodeId = stNodeId; } /** * DT_CLOSE_DATE */ @Column(name = "DT_CLOSE_DATE") private Date dtCloseDate; /** * DT_CLOSE_DATE */ public Date getDtCloseDate(){ return dtCloseDate; } /** * DT_CLOSE_DATE */ public void setDtCloseDate (Date dtCloseDate){ this.dtCloseDate = dtCloseDate; } @Transient private boolean hasSendReturn=false; @Transient private boolean hasGatherReturn=false; public boolean isHasSendReturn() { return hasSendReturn; } public void setHasSendReturn(boolean hasSendReturn) { this.hasSendReturn = hasSendReturn; } public static String getLegislationProcessTask() { return LegislationProcessTask; } public boolean isHasGatherReturn() { return hasGatherReturn; } public void setHasGatherReturn(boolean hasGatherReturn) { this.hasGatherReturn = hasGatherReturn; } }
[ "11654435@qq.com" ]
11654435@qq.com
b6cecef2b91e3ee121db01baceeb93ad123ba49c
d8b0208c4c8f243b49954c1048d0bce89a5fb4e0
/src/main/java/models/APITreeBean.java
4a53e8603610f524d5417be1757a0474eb491289
[]
no_license
jumormt/CppAntlrErrorRecover
87a484a4ddda3549edd5aedf7bb3d3d468ef8dbd
1d8e79022cb31a6ee7e33cb309c76e9ac1ece8fb
refs/heads/master
2020-04-15T20:17:40.534604
2019-01-14T12:51:36
2019-01-14T12:51:36
164,986,400
0
0
null
null
null
null
UTF-8
Java
false
false
1,359
java
package models; import org.antlr.v4.runtime.tree.ParseTree; import java.util.ArrayList; public class APITreeBean { ParseTree APITree = null; // 该api所在行的tree ParseTree topTree = null; // 该api所属函数的tree ArrayList<String> paramList = new ArrayList<>(); // 该api的形参 String APIName = null; String topName = null; public Integer getApiLine() { return apiLine; } public void setApiLine(Integer apiLine) { this.apiLine = apiLine; } Integer apiLine = null; public APITreeBean(){ } public ParseTree getAPITree() { return APITree; } public ParseTree getTopTree() { return topTree; } public ArrayList<String> getParamList() { return paramList; } public String getAPIName() { return APIName; } public String getTopName() { return topName; } public void setAPITree(ParseTree APITree) { this.APITree = APITree; } public void setParamList(ArrayList<String> paramList) { this.paramList = paramList; } public void setTopTree(ParseTree topTree) { this.topTree = topTree; } public void setAPIName(String APIName) { this.APIName = APIName; } public void setTopName(String TopName){ this.topName = TopName; } }
[ "769478099@qq.com" ]
769478099@qq.com
cae1401bad2ca9e2aafc4d479a81066e4a3dab3d
cb9756a5857c5aed806bf93b7aa8770b5e4bf4ff
/src/main/java/com/mlsc/yifeiwang/entwaste/model/EntWasteModel.java
c408183be45b6d20e7ac069f67b1f85a9d41127b
[]
no_license
SUZHOUTEAM/swp
f28b2dc192a2258c1f96c6492bf20bbf5ea18fae
d5b62d2748b660e65f9ff834b2359453cd664eb2
refs/heads/master
2020-03-28T15:38:21.455615
2018-09-13T08:22:42
2018-09-13T08:22:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,825
java
package com.mlsc.yifeiwang.entwaste.model; import com.mlsc.entity.UploadFile; import java.io.Serializable; import java.util.List; /** * Created by user on 2017/9/12. */ public class EntWasteModel implements Serializable{ private String entWasteId; //企业危废id private String wasteId;//危废Id private String wasteCode;//8位码 private String wasteNameId;//危废名称id private String wasteName;//危废名称 private String unitCode;//单位code private String unitValue;//单位 private String wasteTypeDesc;//二位码和描述 private Boolean inquiried;//是否已询价 private String harmfulSubstance; //有害物质名称和含量 private List<UploadFile> fileList; //危废图片 private List<String> wasteNameList; public String getEntWasteId() { return entWasteId; } public void setEntWasteId(String entWasteId) { this.entWasteId = entWasteId; } public String getWasteId() { return wasteId; } public void setWasteId(String wasteId) { this.wasteId = wasteId; } public String getWasteCode() { return wasteCode; } public void setWasteCode(String wasteCode) { this.wasteCode = wasteCode; } public String getWasteNameId() { return wasteNameId; } public void setWasteNameId(String wasteNameId) { this.wasteNameId = wasteNameId; } public String getWasteName() { return wasteName; } public void setWasteName(String wasteName) { this.wasteName = wasteName; } public String getUnitCode() { return unitCode; } public void setUnitCode(String unitCode) { this.unitCode = unitCode; } public String getUnitValue() { return unitValue; } public void setUnitValue(String unitValue) { this.unitValue = unitValue; } public String getWasteTypeDesc() { return wasteTypeDesc; } public void setWasteTypeDesc(String wasteTypeDesc) { this.wasteTypeDesc = wasteTypeDesc; } public Boolean getInquiried() { return inquiried; } public void setInquiried(Boolean inquiried) { this.inquiried = inquiried; } public String getHarmfulSubstance() { return harmfulSubstance; } public void setHarmfulSubstance(String harmfulSubstance) { this.harmfulSubstance = harmfulSubstance; } public List<UploadFile> getFileList() { return fileList; } public void setFileList(List<UploadFile> fileList) { this.fileList = fileList; } public List<String> getWasteNameList() { return wasteNameList; } public void setWasteNameList(List<String> wasteNameList) { this.wasteNameList = wasteNameList; } }
[ "517829464@qq.com" ]
517829464@qq.com
7a1922cc00147b8fb0ef3dddab9dcf0fa975460e
1b50dbd2e87d2c17c5d695cfc50781a458402a38
/src/goryachev/common/io/StreamingInput.java
377d258685a68595948b8b4e141be8c04401b63a
[ "Apache-2.0" ]
permissive
rrohm/FxTextEditor
104d7d29d46719e98c371e53424c8fb46d936bf8
2b973fb503a54c08b941fddfedb636826d0603f4
refs/heads/master
2023-06-26T11:52:34.914364
2021-08-02T02:52:23
2021-08-02T02:52:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
// Copyright © 2011-2021 Andy Goryachev <andy@goryachev.com> package goryachev.common.io; public interface StreamingInput<T> { public T readFromStream(); }
[ "andy@goryachev.com" ]
andy@goryachev.com
93dc99c00a76fa9e615f3fd2498e4c1d50782d1a
02c591fed1a19c3a2e50347323f1b7a008ff0d92
/dataStructure/List1.java
00753fd3a385004c529cda3afe4e9cecb8397221
[]
no_license
Sameer8897/Edac-may2021
8219264d72661fb2b8c7c2aaa8d731caf2c96697
5d009a8837c365464f7d93cc811071b18b452ed2
refs/heads/main
2023-06-17T07:27:45.190688
2021-07-14T19:07:14
2021-07-14T19:07:14
365,252,740
0
0
null
null
null
null
UTF-8
Java
false
false
402
java
package dataStructure; class List1 { Node head; static class Node { int data; Node next; public Node(int d) { data=d; next=null; } } public static void main(String[] args) { List1 l1=new List1(); l1.head=new Node(22); Node second=new Node(11); Node third=new Node(33); l1.head.next=second; second.next=third; } }
[ "noreply@github.com" ]
noreply@github.com
bc5e52377c7b65e1c71334eac2a40755f32a4ec4
1f19aec2ecfd756934898cf0ad2758ee18d9eca2
/u-1/u-1-f9039.java
207910f48660c4c7bc0440fb5258e1e04b5ae861
[]
no_license
apertureatf/perftest
f6c6e69efad59265197f43af5072aa7af8393a34
584257a0c1ada22e5486052c11395858a87b20d5
refs/heads/master
2020-06-07T17:52:51.172890
2019-06-21T18:53:01
2019-06-21T18:53:01
193,039,805
0
0
null
null
null
null
UTF-8
Java
false
false
105
java
mastercard 5555555555554444 4012888888881881 4222222222222 378282246310005 6011111111111117 795582751275
[ "jenkins@khan.paloaltonetworks.local" ]
jenkins@khan.paloaltonetworks.local
080c041e70f25c4dc2c04f2d1967807dc0997521
a17f37b218f1eaa49b1abc2669f3c0be47787317
/poo/exercicios/p2/codigo/pacote2/Classe4.java
00cc09826ea7432f61455f8672ad3b9ef682eb32
[]
no_license
LucasPLopes/unb-monitorias
09da85b54b7ef13cb9cfe81b10291bbae5c680c2
9bd0d27e36473833abe353ac6c0d91ab4131341f
refs/heads/master
2021-07-05T19:14:57.778706
2020-09-29T11:58:46
2020-09-29T11:58:46
184,266,184
0
0
null
2020-09-29T11:41:07
2019-04-30T13:22:50
Java
UTF-8
Java
false
false
138
java
package pacote2; public class Classe4{ public static float atrib9; protected int atrib10; void m8(){} public void m9(); }
[ "l.lopes.fga@gmail.com" ]
l.lopes.fga@gmail.com
a4a6be5c1b72f83d60a9caedad6a21a5401c02fb
066ba35a9ca44476a121601dc4d1bfd2ec352684
/coursedemo/src/androidTest/java/com/example/coursedemo/ApplicationTest.java
8c81cdc922b97120285df7a6372cede080382df3
[]
no_license
QunxingHu/AndroidCourseDemo
bc015df65453842f54082abb77ca172e1168720f
2b6b6a7ba8a54e758b6af3b19c4f6872924196a6
refs/heads/master
2021-01-24T02:06:35.123372
2016-06-29T03:24:32
2016-06-29T03:24:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package com.example.coursedemo; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "waterzhj@ustc.edu.cn" ]
waterzhj@ustc.edu.cn
1d24b35298749d89fe63a831a20de80d7e482f9b
052d648a7b0f6c249804bc026db19075d7975aed
/BusinessLogic/src/com/dtv/oss/service/command/config/BillBoardCommand.java
78c05641e0d52c096837a316296528f15ba89781
[]
no_license
worldup/boss
84fa357934a7a374d3d0617607391d0446e3b37d
667dc568c35c3f38b506d21375e298819e58bc33
refs/heads/master
2021-01-13T01:36:56.187120
2015-02-10T14:01:37
2015-02-10T14:01:37
30,594,799
0
1
null
null
null
null
GB18030
Java
false
false
3,491
java
package com.dtv.oss.service.command.config; import com.dtv.oss.dto.BillBoardDTO; import com.dtv.oss.log.LogLevel; import com.dtv.oss.log.LogUtility; import com.dtv.oss.service.ServiceContext; import com.dtv.oss.service.ServiceException; import com.dtv.oss.service.command.Command; import com.dtv.oss.service.command.CommandException; import com.dtv.oss.service.commandresponse.CommandResponse; import com.dtv.oss.service.commandresponse.CommandResponseImp; import com.dtv.oss.service.component.BoardService; import com.dtv.oss.service.ejbevent.EJBEvent; import com.dtv.oss.service.ejbevent.config.BillboardEJBEvent; import com.dtv.oss.service.util.SystemLogRecorder; /** * 历史公告维护 * * @author chenjiang * */ public class BillBoardCommand extends Command { private int operatorID = 0; private String machineName = ""; CommandResponseImp response = null; private ServiceContext context; /** * */ public CommandResponse execute(EJBEvent ev) throws CommandException { response = new CommandResponseImp(null); BillboardEJBEvent inEvent = (BillboardEJBEvent) ev; operatorID = inEvent.getOperatorID(); machineName = ev.getRemoteHostAddress(); LogUtility.log(this.getClass(), LogLevel.DEBUG, "公告信息维护开始执行"); try { switch (inEvent.getActionType()) { case EJBEvent.BILLBOARD_CREATE: // 创建公告信息 this.createBoard(inEvent); break; case EJBEvent.BILLBOARD_MODIFY: // 公告信息修改 this.modifyBoard(inEvent); break; case EJBEvent.BILLBOARD_DELE: // 删除公告信息 this.deleteBoard(inEvent); break; default: break; } } catch (ServiceException ce) { LogUtility.log(this.getClass(), LogLevel.ERROR, this, ce); throw new CommandException(ce.getMessage()); } catch (Throwable unkown) { LogUtility.log(this.getClass(), LogLevel.FATAL, this, unkown); throw new CommandException("未知错误。"); } return response; } private void createBoard(BillboardEJBEvent inEvent) throws ServiceException { this.context = new ServiceContext(); BillBoardDTO dto = inEvent.getDto(); BoardService service = new BoardService(this.context); service.createBoard(dto); SystemLogRecorder.createSystemLog(machineName, new Integer(operatorID) .intValue(), 0, SystemLogRecorder.LOGMODULE_CONFIG, "增加", "添加公告信息,seqno为:"+dto.getSeqNo(), SystemLogRecorder.LOGCLASS_NORMAL, SystemLogRecorder.LOGTYPE_APP); } private void modifyBoard(BillboardEJBEvent inEvent) throws ServiceException { this.context = new ServiceContext(); BillBoardDTO dto = inEvent.getDto(); BoardService service = new BoardService(this.context); service.updateBoard(dto); SystemLogRecorder.createSystemLog(machineName, new Integer(operatorID) .intValue(), 0, SystemLogRecorder.LOGMODULE_CONFIG, "修改", "货架公告信息,seqno为:"+dto.getSeqNo(), SystemLogRecorder.LOGCLASS_NORMAL, SystemLogRecorder.LOGTYPE_APP); } private void deleteBoard(BillboardEJBEvent inEvent) throws ServiceException { this.context = new ServiceContext(); BoardService service = new BoardService(this.context); BillBoardDTO dto = inEvent.getDto(); service.deleteBoard(dto); SystemLogRecorder.createSystemLog(machineName, new Integer(operatorID) .intValue(), 0, SystemLogRecorder.LOGMODULE_CONFIG, "删除", "货架公告信息删除,seqno为:"+dto.getSeqNo(), SystemLogRecorder.LOGCLASS_NORMAL, SystemLogRecorder.LOGTYPE_APP); } }
[ "worldup@163.com" ]
worldup@163.com
7c0b2a83fe81c9ff3ff817926c39389a68e2a40e
4a85c0df19377e27e61e15f6d8ceef088a698d40
/src/main/java/cn/zhiyingyun/zone/domain/DspUser.java
eab882ed41f185f1909a34ed537f0bfbceeb1c18
[]
no_license
lelezhao/smart-dsp-access
452dc38ae5070ee9006abad89ebfca76ff1d7a00
d4897379b75b03a9b449476e9968f07a35e44a81
refs/heads/master
2021-03-30T21:11:20.168037
2018-03-15T13:00:07
2018-03-15T13:00:07
124,832,619
0
0
null
null
null
null
UTF-8
Java
false
false
4,952
java
package cn.zhiyingyun.zone.domain; import javax.persistence.*; import java.sql.Timestamp; @Entity @Table(name = "dsp_user", schema = "smart_dsp", catalog = "") public class DspUser { private Integer id; private String account; private String password; private Integer dspId; private String dspName; private String requestUrl; private String token; private String noticeType; private String companyName; private Timestamp createTime; private Timestamp updateTime; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", nullable = false) public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Basic @Column(name = "account", nullable = false, length = 32) public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } @Basic @Column(name = "password", nullable = false, length = 64) public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Basic @Column(name = "dsp_id", nullable = false) public Integer getDspId() { return dspId; } public void setDspId(Integer dspId) { this.dspId = dspId; } @Basic @Column(name = "dsp_name", nullable = false, length = 255) public String getDspName() { return dspName; } public void setDspName(String dspName) { this.dspName = dspName; } @Basic @Column(name = "request_url", nullable = false, length = 255) public String getRequestUrl() { return requestUrl; } public void setRequestUrl(String requestUrl) { this.requestUrl = requestUrl; } @Basic @Column(name = "token", nullable = false, length = 255) public String getToken() { return token; } public void setToken(String token) { this.token = token; } @Basic @Column(name = "notice_type", nullable = true, length = 255) public String getNoticeType() { return noticeType; } public void setNoticeType(String noticeType) { this.noticeType = noticeType; } @Basic @Column(name = "company_name", nullable = true, length = 255) public String getCompanyName() { return companyName; } public void setCompanyName(String companyName) { this.companyName = companyName; } @Basic @Column(name = "create_time", nullable = false) public Timestamp getCreateTime() { return createTime; } public void setCreateTime(Timestamp createTime) { this.createTime = createTime; } @Basic @Column(name = "update_time", nullable = false) public Timestamp getUpdateTime() { return updateTime; } public void setUpdateTime(Timestamp updateTime) { this.updateTime = updateTime; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DspUser dspUser = (DspUser) o; if (id != null ? !id.equals(dspUser.id) : dspUser.id != null) return false; if (account != null ? !account.equals(dspUser.account) : dspUser.account != null) return false; if (password != null ? !password.equals(dspUser.password) : dspUser.password != null) return false; if (dspId != null ? !dspId.equals(dspUser.dspId) : dspUser.dspId != null) return false; if (dspName != null ? !dspName.equals(dspUser.dspName) : dspUser.dspName != null) return false; if (requestUrl != null ? !requestUrl.equals(dspUser.requestUrl) : dspUser.requestUrl != null) return false; if (token != null ? !token.equals(dspUser.token) : dspUser.token != null) return false; if (noticeType != null ? !noticeType.equals(dspUser.noticeType) : dspUser.noticeType != null) return false; if (companyName != null ? !companyName.equals(dspUser.companyName) : dspUser.companyName != null) return false; if (createTime != null ? !createTime.equals(dspUser.createTime) : dspUser.createTime != null) return false; if (updateTime != null ? !updateTime.equals(dspUser.updateTime) : dspUser.updateTime != null) return false; return true; } @Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (account != null ? account.hashCode() : 0); result = 31 * result + (password != null ? password.hashCode() : 0); result = 31 * result + (dspId != null ? dspId.hashCode() : 0); result = 31 * result + (dspName != null ? dspName.hashCode() : 0); result = 31 * result + (requestUrl != null ? requestUrl.hashCode() : 0); result = 31 * result + (token != null ? token.hashCode() : 0); result = 31 * result + (noticeType != null ? noticeType.hashCode() : 0); result = 31 * result + (companyName != null ? companyName.hashCode() : 0); result = 31 * result + (createTime != null ? createTime.hashCode() : 0); result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0); return result; } }
[ "460996585@qq.com" ]
460996585@qq.com
c753dda69abe49e387268b1088df6292b509f35c
5b62b75372c24f95f37d900833c81bd4b62a38ab
/flutter_study-master/android/app/src/main/java/com/jzhu/flutterstudy/plugin/FlutterPluginJumpToAct.java
32d709100b52a3f3fba30640261f183f89b58da6
[]
no_license
luckychenheng/flutter
17e8d1394c6183e0b83831d9cf9af76c8926b386
cde5cc83d6c8c6ed2203ea1e38ff827b2021488a
refs/heads/master
2020-04-13T14:18:23.299492
2019-02-12T13:14:42
2019-02-12T13:14:42
163,258,289
0
1
null
null
null
null
UTF-8
Java
false
false
2,099
java
package com.jzhu.flutterstudy.plugin; import android.app.Activity; import android.content.Intent; import com.jzhu.flutterstudy.OneActivity; import com.jzhu.flutterstudy.TwoActivity; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; import io.flutter.plugin.common.PluginRegistry; public class FlutterPluginJumpToAct implements MethodChannel.MethodCallHandler { public static String CHANNEL = "com.jzhu.jump/plugin"; static MethodChannel channel; private Activity activity; private FlutterPluginJumpToAct(Activity activity) { this.activity = activity; } public static void registerWith(PluginRegistry.Registrar registrar) { channel = new MethodChannel(registrar.messenger(), CHANNEL); FlutterPluginJumpToAct instance = new FlutterPluginJumpToAct(registrar.activity()); //setMethodCallHandler在此通道上接收方法调用的回调 channel.setMethodCallHandler(instance); } @Override public void onMethodCall(MethodCall call, MethodChannel.Result result) { //通过MethodCall可以获取参数和方法名,然后再寻找对应的平台业务,本案例做了2个跳转的业务 //接收来自flutter的指令oneAct if (call.method.equals("oneAct")) { //跳转到指定Activity Intent intent = new Intent(activity, OneActivity.class); activity.startActivity(intent); //返回给flutter的参数 result.success("success"); } //接收来自flutter的指令twoAct else if (call.method.equals("twoAct")) { //解析参数 String text = call.argument("flutter"); //带参数跳转到指定Activity Intent intent = new Intent(activity, TwoActivity.class); intent.putExtra(TwoActivity.VALUE, text); activity.startActivity(intent); //返回给flutter的参数 result.success("success"); } else { result.notImplemented(); } } }
[ "seemac@seedeMacBook-Pro.local" ]
seemac@seedeMacBook-Pro.local
04336b5e0752f7d953f25b4b923951097da71e4a
8eaace7de52f3f91440368aecd94073a9ee79af8
/src/test/java/uk/ac/ebi/ddi/pride/web/service/client/assay/ProjectAssaysWsClientTest.java
ad881d522fc2a8ef5229593c31bd75df7bdc1b0f
[]
no_license
gccong/pride-ws-client-sirius
fd88ee705632e06f91981875e013dc21551322bf
d6bb00a4c5da934d86566c61c5af3219d3311b91
refs/heads/master
2021-01-17T08:53:10.488653
2015-12-04T11:52:26
2015-12-04T11:52:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,193
java
package uk.ac.ebi.ddi.pride.web.service.client.assay; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import uk.ac.ebi.ddi.pride.web.service.config.AbstractArchiveWsConfig; import uk.ac.ebi.ddi.pride.web.service.model.assay.AssayList; import static org.junit.Assert.*; @ContextConfiguration(locations = {"/test-context.xml"}) @RunWith(SpringJUnit4ClassRunner.class) public class ProjectAssaysWsClientTest { @Autowired AbstractArchiveWsConfig archiveWsConfig; ProjectAssaysWsClient projectAssaysWsClient; @Before public void setUp() throws Exception { projectAssaysWsClient = new ProjectAssaysWsClient(archiveWsConfig); } @Test public void testFindAllByProjectAccession() throws Exception { AssayList res = projectAssaysWsClient.findAllByProjectAccession("PXD000402"); assertTrue(res != null); assertTrue(res.list.length == 4); assertTrue(res.list[0].proteinCount == 1004); } }
[ "ypriverol@gmail.com" ]
ypriverol@gmail.com
cbf4b8efbc40c1f267487547f645b2750c4763a4
4b8b4dd5fe936c5a87d9e6281f5cc609dd286027
/src/main/java/org/liukai/DesignPatterns/creational/FactoryMethod/demo1/ConcreteFactory.java
de634d2955edafffe1acccb925c8e9fc084a2d3b
[]
no_license
kai8406/DesignPatterns
0426e01c282aa34c0de605392f2e538054d3179b
ff3f7c98af9ad379d2356f23943b632dfc016d02
refs/heads/master
2021-01-25T07:40:04.410168
2013-04-26T02:39:58
2013-04-26T02:39:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package org.liukai.DesignPatterns.creational.FactoryMethod.demo1; public class ConcreteFactory extends Factory { @SuppressWarnings("unchecked") @Override public <T extends IProduct> T createProduct(Class<T> c) { T product = null; try { product = (T) Class.forName(c.getName()).newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } return product; } }
[ "kai8406@gmail.com" ]
kai8406@gmail.com
709fd5b4275ecc3407b6e8323391c5f7e81cb597
c7adcffe861e041f8bad5ce273b47261df7098dc
/seisme/src/com/projetioc/seisme/SeismeApp.java
7c0459bef118324f3b18c2d8ad6a78f23f058886
[]
no_license
cegepmatane/projet-ioc-2018-florianlev
8b397a20358f0695a38f03417c5bf4ded8d55e57
f848eabbdc39ccb3299cda2e950140707075b390
refs/heads/master
2021-03-27T11:59:41.706193
2018-03-16T20:18:39
2018-03-16T20:18:39
120,648,578
0
2
null
null
null
null
UTF-8
Java
false
false
724
java
package com.projetioc.seisme; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.projetioc.seisme.action.ControleurSeisme; import com.projetioc.seisme.dao.DaoSeisme; import com.projetioc.seisme.modele.Ville; import com.projetioc.seisme.vue.SeismeVue; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import com.projetioc.seisme.action.ControleurSeisme; public class SeismeApp { SeismeVue seismeVue; public static void main(String[] parametres) { // TODO Auto-generated method stub SeismeVue seismeVue = new SeismeVue(); SeismeVue.launch(SeismeVue.class, parametres); } }
[ "flolevy33@gmail.com" ]
flolevy33@gmail.com
ec18bbc92b1dcdd94b33044bbdfe62cae1c50a48
b7ed6cd4a69a8c1c26337b170753f9e0af1c7e54
/src/com/eilers/tatanpoker09/tsm/Manager.java
4b4fd6f8f9fb021e0aa92fdc7ee5c2ebcedc13ef
[]
no_license
tatanpoker09/TreeServerManager
885ccd57484d9865ce683372ab09d27200d01123
7bf5ef781d5e2037400fdc71be7892b1374637c8
refs/heads/master
2022-07-07T09:17:37.927678
2022-02-05T17:14:15
2022-02-05T17:14:15
218,605,779
0
0
null
2022-06-21T04:23:49
2019-10-30T19:25:24
Java
UTF-8
Java
false
false
110
java
package com.eilers.tatanpoker09.tsm; public interface Manager { boolean setup(); void postSetup(); }
[ "christian@eilers.cl" ]
christian@eilers.cl
1226f77b7ac8d47b6f0cba07840a7231134708f4
10b4db1d4f894897b5ee435780bddfdedd91caf7
/thrift/compiler/test/fixtures/adapter/gen-java/com/facebook/thrift/annotation/Struct.java
26a29401736e3f2170a715657d5d5137880b0766
[ "Apache-2.0" ]
permissive
SammyEnigma/fbthrift
04f4aca77a64c65f3d4537338f7fbf3b8214e06a
31d7b90e30de5f90891e4a845f6704e4c13748df
refs/heads/master
2021-11-11T16:59:04.628193
2021-10-12T11:19:22
2021-10-12T11:20:27
211,245,426
1
0
Apache-2.0
2021-07-15T21:12:07
2019-09-27T05:50:42
C++
UTF-8
Java
false
false
3,927
java
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.facebook.thrift.annotation; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; import java.util.Collections; import java.util.BitSet; import java.util.Arrays; import com.facebook.thrift.*; import com.facebook.thrift.annotations.*; import com.facebook.thrift.async.*; import com.facebook.thrift.meta_data.*; import com.facebook.thrift.server.*; import com.facebook.thrift.transport.*; import com.facebook.thrift.protocol.*; @SuppressWarnings({ "unused", "serial" }) public class Struct implements TBase, java.io.Serializable, Cloneable, Comparable<Struct> { private static final TStruct STRUCT_DESC = new TStruct("Struct"); public static final Map<Integer, FieldMetaData> metaDataMap; static { Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>(); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { FieldMetaData.addStructMetaDataMap(Struct.class, metaDataMap); } public Struct() { } public static class Builder { public Builder() { } public Struct build() { Struct result = new Struct(); return result; } } public static Builder builder() { return new Builder(); } /** * Performs a deep copy on <i>other</i>. */ public Struct(Struct other) { } public Struct deepCopy() { return new Struct(this); } public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof Struct)) return false; Struct that = (Struct)_that; return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {}); } @Override public int compareTo(Struct other) { if (other == null) { // See java.lang.Comparable docs throw new NullPointerException(); } if (other == this) { return 0; } int lastComparison = 0; return 0; } public void read(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(metaDataMap); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; StringBuilder sb = new StringBuilder("Struct"); sb.append(space); sb.append("("); sb.append(newLine); boolean first = true; sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
226961eca1649a94563c1a38ee852f0c07cd9cbe
2ebe6ab0ade2e3bf161a7d140115d42441254cb3
/app/src/main/java/com/example/learnlanguages/CustomAdapter.java
9959aa61c5232cf0025b00b8c1faecb95b88793a
[]
no_license
marcinvxy/Learn-Languages
f934c78446ea54a75344e5ff84785713b114fc83
bd7fbf0153aee3b18bc2cdf7d5a4ffd885656d39
refs/heads/master
2023-03-31T12:52:39.350958
2021-03-24T13:59:04
2021-03-24T13:59:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
package com.example.learnlanguages; import android.content.Context; import android.os.Build; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import androidx.annotation.RequiresApi; import java.util.List; public class CustomAdapter extends ArrayAdapter<String> { CustomAdapter(Context context, List listOfTabels) { super(context, R.layout.custom_adapter, listOfTabels); } @RequiresApi(api = Build.VERSION_CODES.O) @Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater buckysInflanter__1 = LayoutInflater.from(getContext()); View customView = buckysInflanter__1.inflate(R.layout.custom_adapter, parent, false); String getPosition = getItem(position); TextView textView = customView.findViewById(R.id.textView_custom_adapter); textView.setText(getPosition); return customView; } }
[ "marcinvxy@gmail.com" ]
marcinvxy@gmail.com
8fbf34075959de9d1cf0252a4e9dcbfa0f9d9a2f
79897a7257a6b5998fc342536a910b403ea75d28
/src/test/java/tech/aroma/service/operations/GetApplicationMessagesOperationTest.java
2e082b5164a0523119a73fd896efa9b320cedfd3
[ "Apache-2.0" ]
permissive
RedRoma/aroma-service
35a599be01d60369a7b864f87a3bec122bd47ff8
9049ac64e0f518f9ae683045cc3b62aeb73701ec
refs/heads/develop
2021-05-01T09:20:29.862548
2017-08-29T18:00:30
2017-08-29T18:00:30
47,442,739
0
0
null
2017-06-02T23:14:53
2015-12-05T04:47:27
Java
UTF-8
Java
false
false
7,350
java
/* * Copyright 2017 RedRoma, Inc. * * 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 tech.aroma.service.operations; import java.util.Comparator; import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import sir.wellington.alchemy.collections.lists.Lists; import tech.aroma.data.*; import tech.aroma.thrift.Application; import tech.aroma.thrift.Message; import tech.aroma.thrift.exceptions.*; import tech.aroma.thrift.service.GetApplicationMessagesRequest; import tech.aroma.thrift.service.GetApplicationMessagesResponse; import tech.sirwellington.alchemy.test.junit.runners.*; import static java.util.stream.Collectors.toList; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.*; import static tech.sirwellington.alchemy.generator.AlchemyGenerator.Get.one; import static tech.sirwellington.alchemy.generator.NumberGenerators.negativeIntegers; import static tech.sirwellington.alchemy.generator.StringGenerators.alphabeticStrings; import static tech.sirwellington.alchemy.test.junit.ThrowableAssertion.*; import static tech.sirwellington.alchemy.test.junit.runners.GenerateString.Type.UUID; /** * @author SirWellington */ @Repeat(50) @RunWith(AlchemyTestRunner.class) public class GetApplicationMessagesOperationTest { @Mock private ApplicationRepository appRepo; @Mock private FollowerRepository followerRepo; @Mock private MessageRepository messageRepo; private GetApplicationMessagesOperation instance; @GeneratePojo private GetApplicationMessagesRequest request; @GenerateString(UUID) private String appId; @GenerateString(UUID) private String userId; @GeneratePojo private Application app; @GenerateList(Message.class) private List<Message> messages; private List<Message> sortedMessages; @Before public void setUp() throws Exception { setupData(); setupMocks(); instance = new GetApplicationMessagesOperation(appRepo, followerRepo, messageRepo); } private void setupData() throws Exception { request.applicationId = appId; request.token.userId = userId; app.owners.add(userId); sortedMessages = messages.stream() .sorted(Comparator.comparingLong(Message::getTimeMessageReceived).reversed()) .limit(request.limit) .collect(toList()); } private void setupMocks() throws Exception { when(appRepo.getById(appId)).thenReturn(app); when(messageRepo.getByApplication(appId)) .thenReturn(messages); } @DontRepeat @Test public void testConstructor() throws Exception { assertThrows(() -> new GetApplicationMessagesOperation(null, followerRepo, messageRepo)); assertThrows(() -> new GetApplicationMessagesOperation(appRepo, null, messageRepo)); assertThrows(() -> new GetApplicationMessagesOperation(appRepo, followerRepo, null)); } @Test public void testProcess() throws Exception { GetApplicationMessagesResponse response = instance.process(request); assertThat(response, notNullValue()); assertThat(response.messages, is(sortedMessages)); } @DontRepeat @Test public void testWhenNoMessages() throws Exception { when(messageRepo.getByApplication(appId)) .thenReturn(Lists.emptyList()); GetApplicationMessagesResponse response = instance.process(request); assertThat(response, notNullValue()); assertThat(response.messages, is(empty())); } @DontRepeat @Test public void testWhenMessageRepoFails() throws Exception { when(messageRepo.getByApplication(appId)) .thenThrow(new OperationFailedException()); assertThrows(() -> instance.process(request)) .isInstanceOf(OperationFailedException.class); } @Test public void testWhenUserIsAnOwnerButNotAFollower() throws Exception { when(followerRepo.followingExists(userId, appId)) .thenReturn(false); GetApplicationMessagesResponse response = instance.process(request); assertThat(response.messages, is(sortedMessages)); } @Test public void testWhenUserIsNotAnOwnerButIsAFollower() throws Exception { app.owners.remove(userId); when(followerRepo.followingExists(userId, appId)).thenReturn(true); GetApplicationMessagesResponse response = instance.process(request); assertThat(response, notNullValue()); assertThat(response.messages, not(empty())); assertThat(response.messages, is(sortedMessages)); } @DontRepeat @Test public void testWhenAppRepoFails() throws Exception { when(appRepo.getById(appId)) .thenThrow(new DoesNotExistException()); assertThrows(() -> instance.process(request)) .isInstanceOf(DoesNotExistException.class); } @Test public void testWhenFollowerRepoFails() throws Exception { app.owners.remove(userId); when(followerRepo.followingExists(userId, appId)) .thenThrow(new OperationFailedException()); assertThrows(() -> instance.process(request)) .isInstanceOf(OperationFailedException.class); } @DontRepeat @Test public void testWithBadRequest() throws Exception { assertThrows(() -> instance.process(null)) .isInstanceOf(InvalidArgumentException.class); GetApplicationMessagesRequest emptyRequest = new GetApplicationMessagesRequest(); assertThrows(() -> instance.process(emptyRequest)) .isInstanceOf(InvalidArgumentException.class); GetApplicationMessagesRequest requestWithoutAppId = new GetApplicationMessagesRequest(request); requestWithoutAppId.unsetApplicationId(); assertThrows(() -> instance.process(requestWithoutAppId)) .isInstanceOf(InvalidArgumentException.class); GetApplicationMessagesRequest requestWithBadLimit = new GetApplicationMessagesRequest(request) .setLimit(one(negativeIntegers())); assertThrows(() -> instance.process(requestWithBadLimit)) .isInstanceOf(InvalidArgumentException.class); String badId = one(alphabeticStrings()); GetApplicationMessagesRequest requestWithBadId = new GetApplicationMessagesRequest(request) .setApplicationId(badId); assertThrows(() -> instance.process(requestWithoutAppId)) .isInstanceOf(InvalidArgumentException.class); } }
[ "jwellington.moreno@gmail.com" ]
jwellington.moreno@gmail.com
dce6e896e260e3ebc4bf0da52e2570719aab6644
4d1957c8bd8045c4dada09af8b44675f6b5f9e06
/app/src/main/java/com/qiaoyi/secondworker/ui/shake/activity/LoginActivity.java
d6793c6f83303b4951ea0114aa6dece0a2b438c6
[]
no_license
secondworkers/SecondWorker
3bbe89d6bbb014f874e823c9c998faec9360da7a
348b62402e5c4b1cebbb8b59610d095aea69643e
refs/heads/master
2020-05-16T15:41:06.047330
2019-04-24T03:26:23
2019-04-24T03:26:23
183,138,125
0
0
null
null
null
null
UTF-8
Java
false
false
3,824
java
package com.qiaoyi.secondworker.ui.shake.activity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.text.TextUtils; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.qiaoyi.secondworker.BaseActivity; import com.qiaoyi.secondworker.R; import com.qiaoyi.secondworker.net.Contacts; import com.qiaoyi.secondworker.net.RespBean; import com.qiaoyi.secondworker.net.Response; import com.qiaoyi.secondworker.net.ServiceCallBack; import com.qiaoyi.secondworker.remote.ApiUserService; import com.qiaoyi.secondworker.ui.center.LocationActivity; import com.qiaoyi.secondworker.utlis.StatusBarUtil; import java.util.regex.Pattern; import cn.isif.alibs.utils.ALog; import cn.isif.alibs.utils.ToastUtils; /** * Created on 2019/4/19 * 登录 * @author Spirit */ public class LoginActivity extends BaseActivity implements View.OnClickListener { private EditText et_phone; private EditText et_code; private TextView tv_getcode; private TextView tv_login; private ImageView iv_wechat; public static void startLoginActivity(Activity context, int requestCode) { Intent intent = new Intent(context, LoginActivity.class); context.startActivityForResult(intent, requestCode); } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); StatusBarUtil.setTranslucentStatus(this); StatusBarUtil.setStatusBarDarkTheme(this, true); // StatusBarUtil.setStatusBarColor(this,0xffffff); setContentView(R.layout.activity_login); initView(); } private void initView() { et_phone = (EditText) findViewById(R.id.et_phone); et_code = (EditText) findViewById(R.id.et_code); tv_getcode = (TextView) findViewById(R.id.tv_getcode); tv_login = (TextView) findViewById(R.id.tv_login); iv_wechat = (ImageView) findViewById(R.id.iv_wechat); tv_getcode.setOnClickListener(this); tv_login.setOnClickListener(this); iv_wechat.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.tv_getcode: regexPhone(); break; case R.id.tv_login: submit(); break; case R.id.iv_wechat: ToastUtils.showShort("微信登录"); break; } } /** * 验证手机号 */ private void regexPhone() { String phone = et_phone.getText().toString().trim(); if (TextUtils.isEmpty(phone) || Pattern.matches(Contacts.REGEX_PHONE_NUM,phone)) { Toast.makeText(this, "请填写正确的手机号", Toast.LENGTH_SHORT).show(); return; }else ApiUserService.sendSms(phone, new ServiceCallBack() { @Override public void failed(int code, String errorInfo, String source) { ALog.e("失败"); } @Override public void success(RespBean resp, Response payload) { ALog.e("成功"); } }); } private void submit() { // validate String code = et_code.getText().toString().trim(); if (TextUtils.isEmpty(code)) { Toast.makeText(this, "请填写验证码", Toast.LENGTH_SHORT).show(); return; } // TODO validate success, do something } public void gotoLocationManger(){ startActivity(new Intent(this,LocationActivity.class)); finish(); } }
[ "15664460099@163.com" ]
15664460099@163.com
d72b2e563753e839d7e6ba4ed656033feec0351d
e60a327c7659f731290cf151e4f61d8d802cae06
/p1/src/main/java/com/yw/security/CustomUserFailHandler.java
279b2d518cd41d67eba606c6a847afbf0f1a0c47
[]
no_license
duddnd11/mini
609f84c7b30166537127b0985ceff036a38b4c33
4a273c105d7388fab57e37f66925f1d65b1a9576
refs/heads/main
2023-07-16T10:39:16.190054
2021-08-27T13:35:45
2021-08-27T13:35:45
329,334,869
0
0
null
null
null
null
UTF-8
Java
false
false
2,793
java
package com.yw.security; import java.io.IOException; import java.net.URLEncoder; import java.security.Principal; import java.util.Collection; import java.util.UUID; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.PageContext; import org.springframework.security.authentication.AnonymousAuthenticationToken; import org.springframework.security.authentication.AuthenticationServiceException; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.authentication.AnonymousAuthenticationFilter; import org.springframework.security.web.authentication.AuthenticationFailureHandler; import org.springframework.security.web.csrf.CsrfLogoutHandler; import org.springframework.web.servlet.mvc.support.RedirectAttributes; public class CustomUserFailHandler implements AuthenticationFailureHandler { @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { String loginFailMsg =""; if (exception instanceof AuthenticationServiceException) { loginFailMsg=URLEncoder.encode("존재하지 않는 사용자 입니다.", "UTF-8"); request.setAttribute("loginFailMsg", loginFailMsg); } else if(exception instanceof BadCredentialsException) { loginFailMsg=URLEncoder.encode("아이디 또는 비밀번호가 틀립니다.", "UTF-8"); request.setAttribute("loginFailMsg", loginFailMsg); } Principal principal = request.getUserPrincipal(); System.out.println(principal+",실패,"); Authentication auth = SecurityContextHolder.getContext().getAuthentication(); System.out.println("1:"+auth); AnonymousAuthenticationFilter filter = new AnonymousAuthenticationFilter(UUID.randomUUID().toString()); System.out.println("filter:"+filter); System.out.println("filter:"+filter.getPrincipal()); //AnonymousAuthenticationToken token = new AnonymousAuthenticationToken(key, principal, authorities); // 로그인 페이지로 다시 포워딩 RequestDispatcher dispatcher = request.getRequestDispatcher("/userLogin2"); // dispatcher.forward(request, response); // 리다이렉트 response.sendRedirect("/www/userLogin2?loginFailMsg="+loginFailMsg); } }
[ "ljk80@14.38.136.211" ]
ljk80@14.38.136.211
6cb17a7f57ac1b6ebe28d1ed9b94116a626ed998
f2e9c5465bc916dd44ea4644546c4d4a1b8c1277
/src/main/java/org/everit/templating/html/internal/CompiledTemplateImpl.java
99461a41c08a2afa69f38a56a501be629d43e3c7
[]
no_license
zsigmond-czine-everit/templating-html
d927b9937ed260fe08fda4e2288ba63a00d24fd4
b16fe0139bade3ff3ffdae78a64b6434d0c6c8ba
refs/heads/master
2021-01-16T22:17:54.492326
2015-12-18T15:24:28
2015-12-18T15:24:28
44,956,514
0
0
null
2015-10-26T08:52:12
2015-10-26T08:52:12
null
UTF-8
Java
false
false
2,028
java
/* * Copyright (C) 2011 Everit Kft. (http://www.everit.biz) * * 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 org.everit.templating.html.internal; import java.io.Writer; import java.util.Map; import org.everit.templating.CompiledTemplate; import org.everit.templating.TemplateConstants; import org.everit.templating.util.InheritantMap; /** * The compiled HTML/XML template that can be rendered. */ public class CompiledTemplateImpl implements CompiledTemplate { private final RootNode rootNode; public CompiledTemplateImpl(final RootNode rootNode) { this.rootNode = rootNode; } @Override public void render(final Writer writer, final Map<String, Object> vars) { render(writer, vars, null); } @Override public void render(final Writer writer, final Map<String, Object> vars, final String fragmentId) { ParentNode parentNode; String evaluatedBookmark = fragmentId; if (fragmentId == null) { parentNode = rootNode; evaluatedBookmark = TemplateConstants.FRAGMENT_ROOT; } else { parentNode = rootNode.getFragment(fragmentId); if (parentNode == null) { return; } } InheritantMap<String, Object> scopedVars = new InheritantMap<String, Object>(vars, false); TemplateContextImpl templateContext = new TemplateContextImpl(this, evaluatedBookmark, scopedVars, writer); scopedVars.putWithoutChecks(TemplateConstants.VAR_TEMPLATE_CONTEXT, templateContext); parentNode.render(templateContext); } }
[ "balazs.zsoldos@everit.biz" ]
balazs.zsoldos@everit.biz
286c9f246fd5fa8b222936784972a77ee233c61e
82ea4270905f99a9c552ed1d5279f667009f811a
/src/org/usfirst/frc2084/CMonster2018/PID/HeadingPID.java
5415460484db72af39c96767da6abd9994edc92b
[]
no_license
RobotsByTheC/CMonster2018
7661b5088725f2421b75e482a8c3df10bfa8450b
0bae596be365e18857b877f767877c996fa7a5cd
refs/heads/master
2021-05-14T02:36:12.782726
2018-04-09T01:21:37
2018-04-09T01:21:37
116,599,068
0
1
null
2018-02-16T16:35:47
2018-01-07T21:05:02
Java
UTF-8
Java
false
false
1,251
java
package org.usfirst.frc2084.CMonster2018.PID; import org.usfirst.frc2084.CMonster2018.RobotMap; import edu.wpi.first.wpilibj.command.PIDSubsystem; import edu.wpi.first.wpilibj.livewindow.LiveWindow; public class HeadingPID extends PIDSubsystem{ double Output; double yawOutput; public HeadingPID () { super("HeadingPID", 0.28, 0.0, 0.0); //calls the parent constructor with arguments P,I,D //NEED TO BE TUNED setAbsoluteTolerance(0.3); // more parameters //maybe increase tolerance to stop oscillations? -- TEST getPIDController().setContinuous(false); setInputRange(-180.0, 180.0); setOutputRange(-0.5, 0.5); } public void ResetPID(){ //reset the PID controller getPIDController().reset(); } @Override protected void initDefaultCommand() { // TODO Auto-generated method stub } @Override protected double returnPIDInput() { // TODO Auto-generated method stub yawOutput = (double) RobotMap.ahrs.getYaw(); yawOutput *= -1; return yawOutput; } @Override protected void usePIDOutput(double output) { // TODO Auto-generated method stub Output = (output); } public double getOutput(){ // called from the DriveBasePID return Output; } }
[ "mariasoccer2123@gmail.com" ]
mariasoccer2123@gmail.com
03fafdefad8cf6424d190656d170b7d274ed7956
35579267039a3b784abe1a35b98a3d93a1bac750
/gdx-fireapp-ios-moe/tests/mk/gdx/firebase/ios/analytics/AnalyticsTest.java
93617678d921568bbccbfc7114506709a9ac55e8
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
SanKoKo/gdx-fireapp
a4c432c596aa76b39974dd6e25323e452a184468
495ddf9b79bebe24ca25d0979708324392071080
refs/heads/master
2020-04-14T03:20:44.989954
2018-12-15T22:31:00
2018-12-15T22:31:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,481
java
/* * Copyright 2018 mk * * 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 mk.gdx.firebase.ios.analytics; import org.junit.Test; import org.mockito.Mockito; import org.mockito.internal.verification.VerificationModeFactory; import org.moe.natj.general.NatJ; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import java.util.Collections; import apple.foundation.NSDictionary; import apple.foundation.NSMutableDictionary; import apple.foundation.NSString; import bindings.google.firebaseanalytics.FIRAnalytics; import mk.gdx.firebase.ios.GdxIOSAppTest; @PrepareForTest({FIRAnalytics.class, NatJ.class, NSDictionary.class, NSMutableDictionary.class, NSString.class}) public class AnalyticsTest extends GdxIOSAppTest { @Override public void setup() { super.setup(); PowerMockito.mockStatic(FIRAnalytics.class); } @Test public void logEvent() { // Given PowerMockito.mockStatic(NSDictionary.class); PowerMockito.mockStatic(NSMutableDictionary.class); PowerMockito.mockStatic(NSString.class); NSMutableDictionary dictionary = PowerMockito.mock(NSMutableDictionary.class); NSString string = PowerMockito.mock(NSString.class); Mockito.when(NSMutableDictionary.alloc()).thenReturn(dictionary); Mockito.when(NSString.alloc()).thenReturn(string); Mockito.when(dictionary.init()).thenReturn(dictionary); Analytics analytics = new Analytics(); // When analytics.logEvent("test", Collections.singletonMap("test_key", "test_value")); // Then PowerMockito.verifyStatic(FIRAnalytics.class, VerificationModeFactory.times(1)); FIRAnalytics.logEventWithNameParameters(Mockito.eq("test"), Mockito.any(NSDictionary.class)); } @Test public void setScreen() { // Given Analytics analytics = new Analytics(); // When analytics.setScreen("test", AnalyticsTest.class); // Then PowerMockito.verifyStatic(FIRAnalytics.class, VerificationModeFactory.times(1)); FIRAnalytics.setScreenNameScreenClass(Mockito.eq("test"), Mockito.eq(AnalyticsTest.class.getSimpleName())); } @Test public void setUserProperty() { // Given Analytics analytics = new Analytics(); // When analytics.setUserProperty("test", "test_value"); // Then PowerMockito.verifyStatic(FIRAnalytics.class, VerificationModeFactory.times(1)); FIRAnalytics.setUserPropertyStringForName(Mockito.eq("test_value"), Mockito.eq("test")); } @Test public void setUserId() { // Given Analytics analytics = new Analytics(); // When analytics.setUserId("test"); // Then PowerMockito.verifyStatic(FIRAnalytics.class, VerificationModeFactory.times(1)); FIRAnalytics.setUserID(Mockito.eq("test")); } }
[ "git@mk5.pl" ]
git@mk5.pl
e888b3e53c15aaf286efcd69d258195dc7e900fd
566c7f78c0cd430ded041094e9dacf3164a2b5da
/src/main/java/com/mitocode/controller/MedicoController.java
31279c0b481a76215d1f961cb0fe5e2cefee6007
[]
no_license
kenyoJoel903/mediapp-backend
016c803d6d49f448866bec7a697a257606995902
9e6ea3cb65424ef5ab807912ef01a72eddfdb745
refs/heads/master
2020-04-02T02:50:30.088033
2018-12-08T05:40:01
2018-12-08T05:40:01
153,931,045
0
0
null
null
null
null
UTF-8
Java
false
false
3,351
java
package com.mitocode.controller; import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; import static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn; import java.net.URI; import java.util.ArrayList; import java.util.List; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.hateoas.Resource; import org.springframework.hateoas.mvc.ControllerLinkBuilder; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import com.mitocode.exception.ModeloNotFoundException; import com.mitocode.model.Medico; import com.mitocode.service.IMedicoService; @RestController @RequestMapping("/medicos") public class MedicoController { @Autowired private IMedicoService service; @PreAuthorize("@restAuthService.hasAccess('listar')") @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Medico>> listar(){ List<Medico> medicos = new ArrayList<>(); medicos = service.listar(); return new ResponseEntity<List<Medico>>(medicos, HttpStatus.OK); } @PreAuthorize("hasAuthority('ADMIN') or hasAuthority('USER')") @GetMapping(value = "/{id}") public Resource<Medico> listarId(@PathVariable("id") Integer id) { Medico med = service.listarId(id); if (med == null) { throw new ModeloNotFoundException("ID: " + id); } Resource<Medico> resource = new Resource<Medico>(med); ControllerLinkBuilder linkTo = linkTo(methodOn(this.getClass()).listarId(id)); resource.add(linkTo.withRel("Medico-resource")); return resource; } @PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> registrar(@Valid @RequestBody Medico Medico){ Medico med = new Medico(); med = service.registrar(Medico); URI location = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}").buildAndExpand(med.getIdMedico()).toUri(); return ResponseEntity.created(location).build(); } @PutMapping(consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> actualizar(@Valid @RequestBody Medico Medico) { service.modificar(Medico); return new ResponseEntity<Object>(HttpStatus.OK); } @DeleteMapping(value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public void eliminar(@PathVariable Integer id) { Medico med = service.listarId(id); if (med == null) { throw new ModeloNotFoundException("ID: " + id); } else { service.eliminar(id); } } }
[ "kenyojoel903@gmail.com" ]
kenyojoel903@gmail.com
40e9b943d66813f2015aa9d1618dab879ab9ae56
d2595c4ad54a99c81c1fe86e816c2b53da831e59
/src/main/java/jk/weid/com/sqlyj/SqlUtil.java
b64dfaffa58b4e59bc698605c9239681041db9fa
[]
no_license
jkweid/sql
095ec39974a10b2df98be7ce3268dbd36949e75e
ef076098722d81bbdc0e01e3e053784a38f7d25f
refs/heads/master
2020-07-26T09:29:36.405014
2019-09-15T14:15:02
2019-09-15T14:15:02
208,603,873
0
0
null
null
null
null
UTF-8
Java
false
false
4,814
java
package jk.weid.com.sqlyj; import lombok.SneakyThrows; import org.apache.ibatis.jdbc.SQL; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import java.util.Map; public class SqlUtil { //将实体类名转换成对应的数据库表名(表名必须是骆驼峰的形式) public static String toChar(String Stg) { return Stg.replace(Stg.charAt(0), Character.toLowerCase(Stg.charAt(0))); } protected static String Mark(String Filed) { return "`"+Filed+"`"; } protected static String Lead(String value){return "'"+value+"'"+" ";} //将实体类名转换为数据库的表名 protected static String RawTable(Object obj) { String table= SqlUtil.toChar(obj.getClass().getSimpleName()); return Mark(table); } //将实体类名转换为数据库的视图名 protected static String ViwTable(Object obj) { String table= SqlUtil.toChar(obj.getClass().getSimpleName()); if(table.indexOf("V")>0) { return Mark(table); } else { return Mark(table + "V"); } } //去除多余字符串的方法 protected static String Remove(StringBuffer Str,String Pam1,String Pam2) { if (!Str.toString().equals("")) { Str.delete(Str.lastIndexOf(Pam1),Str.lastIndexOf(Pam2) + 1); return Str.toString(); } return Str.toString(); } //根据逗号进行切割 protected static String[] Cutting(String Str) { String [] Arr=Str.split(","); return Arr; } //反射获取多个字段 protected static Field[] Fields(Object Obj) { Field[] Fields = Obj.getClass().getDeclaredFields(); return Fields; } /*================================================================================================================*/ /*========================添加语句的生成==========================================================================*/ public String Insert(Map<Object,Object> para) { Insert insert=(Insert)para.get("Obj"); return insert.getINSERT(); } /*================================================================================================================*/ /*==================================================修改语句的生成================================================*/ @SneakyThrows(IllegalAccessException.class) public static SQL SET(Object Obj, SQL sql) { Field[] fields = Obj.getClass().getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); //过滤掉为id的字段 if ("id".equals(field.getName())) { continue; } if (field.get(Obj) != null && !"".equals(field.get(Obj))) { sql = sql.SET("`" + field.getName() + "`" + "=" + "'" + field.get(Obj) + "'"); } } return sql; } /*================================================================================================================*/ /*==================================================查找字段的生成================================================*/ protected static String SelAllField(Object Obj) { StringBuffer Sfr=new StringBuffer(""); for(Field field:Fields(Obj)) { field.setAccessible(true); //过滤有该注解的字段 if (field.isAnnotationPresent(NoColumn.class)) { continue; } else { Sfr.append(Mark(field.getName())+","); } } return Remove(Sfr,",",","); } //查询指定的表字段 public static String SelField(String str) { String[] fields=str.split(","); StringBuffer Sfr=new StringBuffer(""); for (int i = 0; i < fields.length; i++) { Sfr.append(Mark(fields[i])+","); } return Remove(Sfr,",",","); } /*================================================================================================================*/ //SQL语句的输出 public String RunSql(Map<String,Object> para) { return sql(para.get("Obj")); } @SneakyThrows(Exception.class) public static String sql(Object Obj) { StringBuffer SQL = new StringBuffer(""); for (Field field :Fields(Obj)) { field.setAccessible(true); if("Obj".equals(field.getName())) { continue; } SQL.append(field.get(Obj)); } return SQL.toString(); } }
[ "13250441774@163.com" ]
13250441774@163.com
6eb532cbf25e3d64198be482c74c28473c330554
36c0456770ba9b93a35d1c46f72068b7c95f74a0
/modsecurityWafProject/src/main/java/com/fich/wafproject/service/RuleServiceImpl.java
3c51c8acf2962224c8f54de3e1fb3e20b7910743
[ "Apache-2.0" ]
permissive
MjoaquinM/ModSecurityProyect
c3672a61b625272972b6fe10efe484b07d5561eb
943a7973c48a9e7bcafd761b922afe5c4ce18c17
refs/heads/master
2021-01-21T16:00:44.215266
2018-04-21T22:37:00
2018-04-21T22:37:00
91,868,923
0
0
null
null
null
null
UTF-8
Java
false
false
769
java
package com.fich.wafproject.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.fich.wafproject.dao.RuleDao; import com.fich.wafproject.model.Rule; import java.util.List; @Service("ruleService") @Transactional public class RuleServiceImpl implements RuleService { @Autowired private RuleDao dao; @Override public void saveRule(Rule rule) { dao.saveRule(rule); } @Override public Rule findByRuleId(String ruleId) { Rule rule = dao.findByRuleId(ruleId); return rule; } @Override public List<Rule> findAllRules() { return dao.findAllRules(); } }
[ "mcardoso821@gmail.com" ]
mcardoso821@gmail.com
ef176d66f7566027528c2eb4e17ea3430e4007f1
7936a3fece18f52d16dcb1ccd9ebd5350db2f45c
/src/gameframework/core/GameUniverseDefaultImpl.java
9b70dc75190c9d54eb88e4dc2ffa1cf4cdea2a7b
[ "MIT" ]
permissive
AamuLumi/RTS_Bdx
0b325e8acecaa8ac1bee3f7e19f1d129e438fd03
637bf6a95d9c6c595cd5cf85d8ccc53ec87f3865
refs/heads/master
2021-01-11T20:26:22.616371
2017-01-27T13:00:06
2017-01-27T13:00:06
79,114,772
1
1
null
null
null
null
UTF-8
Java
false
false
1,642
java
package gameframework.core; import gameframework.moves_rules.MoveBlocker; import gameframework.moves_rules.MoveBlockerChecker; import gameframework.moves_rules.OverlapProcessor; import java.util.Iterator; import java.util.concurrent.ConcurrentLinkedQueue; public class GameUniverseDefaultImpl implements GameUniverse { private ConcurrentLinkedQueue<GameEntity> gameEntities = new ConcurrentLinkedQueue<GameEntity>(); private OverlapProcessor overlapProcessor; private MoveBlockerChecker moveBlockerChecker; public Iterator<GameEntity> gameEntities() { return gameEntities.iterator(); } public GameUniverseDefaultImpl(MoveBlockerChecker obs, OverlapProcessor col) { overlapProcessor = col; moveBlockerChecker = obs; } public synchronized void addGameEntity(GameEntity gameEntity) { gameEntities.add(gameEntity); if (gameEntity instanceof Overlappable) { overlapProcessor.addOverlappable((Overlappable) gameEntity); } if (gameEntity instanceof MoveBlocker) { moveBlockerChecker.addMoveBlocker((MoveBlocker) gameEntity); } } public synchronized void removeGameEntity(GameEntity gameEntity) { gameEntities.remove(gameEntity); if (gameEntity instanceof Overlappable) { overlapProcessor.removeOverlappable((Overlappable) gameEntity); } if (gameEntity instanceof MoveBlocker) { moveBlockerChecker.removeMoveBlocker((MoveBlocker) gameEntity); } } public void allOneStepMoves() { for (GameEntity entity : gameEntities) { if (entity instanceof Movable) { ((Movable) entity).oneStepMove(); } } } public void processAllOverlaps() { overlapProcessor.processOverlapsAll(); } }
[ "florian@kauder.fr" ]
florian@kauder.fr
a65c178abed13e55e853890b7fe757a5f6addfda
f2884dbb8869abe1ab1af6a1e152501aab6b3db0
/Code/bookshop/src/main/java/bookshop/code/BookSearchCriteria.java
d6ed117648477ce3f061631f2e54f1a0270739c6
[]
no_license
denilv/bookshop_java
73e410e962b5b7574f98b31725885e6b258a5f1a
7a1730ee41c11e30e54ff3a004f53f97c6cddb9f
refs/heads/master
2020-09-25T22:34:08.675644
2016-09-04T20:27:31
2016-09-04T20:27:31
67,366,711
0
0
null
null
null
null
UTF-8
Java
false
false
791
java
package bookshop.code; public class BookSearchCriteria { private Author author; private String title; private Genre genre; private Integer upPrice; private Integer lowPrice; public Author getAuthor() { return author; } public void setAuthor(Author author) { this.author = author; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Genre getGenre() { return genre; } public void setGenre(Genre genre) { this.genre = genre; } public Integer getUpPrice() { return upPrice; } public void setUpPrice(Integer upPrice) { this.upPrice = upPrice; } public Integer getLowPrice() { return lowPrice; } public void setLowPrice(Integer lowPrice) { this.lowPrice = lowPrice; } }
[ "denilv@mail.ru" ]
denilv@mail.ru
7186c7b5f980a394d40d8b5e5d885631768901fd
1b068a2123184fcd8ccbcfaac3d0a5d96cb5e6b6
/LeetCode/src/E1342_Number_of_Steps_to_Reduce_a_Number_to_Zero.java
99044e14bfb977f22c5c40b9f7c5e51cdf197e5d
[]
no_license
MDY429/LeetCode_Practice
8a0d1547792cc054c13f298bad3ea559b2a3e243
c7dda8fecb13e66ed70b4935885ba4cdaef47741
refs/heads/master
2021-04-23T21:54:00.745977
2021-02-08T13:35:03
2021-02-08T13:35:03
250,013,949
0
0
null
null
null
null
UTF-8
Java
false
false
1,698
java
/** * url: * https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/ * * Given a non-negative integer num, return the number of steps to reduce it to * zero. If the current number is even, you have to divide it by 2, otherwise, * you have to subtract 1 from it. * * Example 1: Input: num = 14 Output: 6 * * Explanation: * Step 1) 14 is even; divide by 2 and obtain 7. * Step 2) 7 is odd; subtract 1 and obtain 6. * Step 3) 6 is even; divide by 2 and obtain 3. * Step 4) 3 is odd; subtract 1 and obtain 2. * Step 5) 2 is even; divide by 2 and obtain 1. * Step 6) 1 is odd; subtract 1 and obtain 0. * * Example 2: Input: num = 8 Output: 4 * * Explanation: * Step 1) 8 is even; divide by 2 and obtain 4. * Step 2) 4 is even; divide by 2 and obtain 2. * Step 3) 2 is even; divide by 2 and obtain 1. * Step 4) 1 is odd; subtract 1 and obtain 0. * * Example 3: Input: num = 123 Output: 12 * * Constraints: 0 <= num <= 10^6 */ public class E1342_Number_of_Steps_to_Reduce_a_Number_to_Zero { /** * Use bitwise to find the step to reduce to zero. * * @param num The input of number. * @return The step. */ public int numberOfSteps(int num) { int step = 0; while (num > 0) { if ((num & 1) == 1) { num--; } else { num >>= 1; } step++; } return step; } public static void main(String[] args) { E1342_Number_of_Steps_to_Reduce_a_Number_to_Zero e1342 = new E1342_Number_of_Steps_to_Reduce_a_Number_to_Zero(); int num = 8; System.out.println(e1342.numberOfSteps(num)); } }
[ "michael6229@gmail.com" ]
michael6229@gmail.com
55fe5dc99c7660e73444f27c04032f05f88767ec
bce5b2859bdaee188985725200dd2b0b702a0f96
/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultReason.java
f13fd3f080111fe197f747654e83e139eb4bf9fc
[ "Apache-2.0" ]
permissive
wso2/wso2-axiom
6c2fd0ecf23ba8321230d82d90bd26b1373caee0
c815e34d9866465bff53b785067cd0e8aa873635
refs/heads/master
2023-09-05T02:27:44.573813
2022-11-08T03:00:05
2022-11-08T03:00:05
16,400,930
34
83
null
2022-11-08T02:39:07
2014-01-31T05:58:21
Java
UTF-8
Java
false
false
1,207
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.axiom.soap; import org.apache.axiom.om.OMElement; import java.util.List; public interface SOAPFaultReason extends OMElement { /** Eran Chinthaka (chinthaka@apache.org) */ void addSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException; SOAPFaultText getFirstSOAPText(); List getAllSoapTexts(); SOAPFaultText getSOAPFaultText(String language); }
[ "eranda@wso2.com" ]
eranda@wso2.com
4724247bb66ed21040ba82c6b682a0028bd70d1c
7958fe8ad61c2946c98624a650507bfb701d6888
/lemon-apply/src/main/java/com/lemon/web/order/rest/OrderController.java
f1e6b92b450011b948f6403e480a9ec40f707a3e
[ "MIT" ]
permissive
ATSJP/lemon
ccfa0a6f6b38c161b777f31e3cfd81b4e8bcbfcd
cae28cf9ae3284df8debc2bf3587fa5b63b22f53
refs/heads/master
2023-06-22T20:47:26.760347
2021-12-28T05:31:13
2021-12-28T05:31:13
166,515,713
2
0
MIT
2023-06-14T22:36:40
2019-01-19T06:46:37
Java
UTF-8
Java
false
false
2,277
java
package com.lemon.web.order.rest; import com.lemon.entity.OrderInfoEntity; import com.lemon.repository.OrderInfoRepository; import com.lemon.utils.DateUtils; import com.lemon.utils.EncryptUtils; import com.lemon.utils.SnowFlake; import com.lemon.web.constant.ConstantOrder; import com.lemon.web.constant.base.ConstantEncryKey; import com.lemon.web.order.request.OrderRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * OrderController * * @author sjp * @date 2019/5/23 */ @Controller public class OrderController { @Resource private OrderInfoRepository orderInfoRepository; @Resource private SnowFlake snowFlake; @RequestMapping("/toPay") public void toPay(HttpServletResponse httpResponse, OrderRequest request) throws IOException { String msg = "error"; Short prodId = request.getProdId(); if (ConstantOrder.PROD_INFO.isCorrectProdId(prodId)) { long orderId = snowFlake.nextId(); ConstantOrder.PROD_INFO prodInfo = ConstantOrder.PROD_INFO.getProdInfo(prodId); if (prodInfo != null) { OrderInfoEntity orderInfoEntity = new OrderInfoEntity(); orderInfoEntity.setOrderId(orderId); orderInfoEntity.setLoginId(request.getUid()); orderInfoEntity.setProdName(prodInfo.desc); orderInfoEntity.setPayAmt(prodInfo.amt); orderInfoEntity.setRealAmt(prodInfo.amt); orderInfoEntity.setDiscount(prodInfo.amt); orderInfoEntity.setUpdateId(request.getUid()); orderInfoEntity.setCreateId(request.getUid()); orderInfoEntity.setCreateTime(DateUtils.getCurrentTime()); orderInfoEntity.setUpdateTime(DateUtils.getCurrentTime()); orderInfoRepository.save(orderInfoEntity); String orderIdEn = EncryptUtils.encode3Des(ConstantEncryKey.ORDER_ENCRY_KEY, orderId + ""); msg = "<script>window.location.replace(\"http://lemon.shijianpeng.top/p/pay?orderIdEn=" + orderIdEn + "\")</script> "; } } // 直接将完整的表单html输出到页面 httpResponse.getWriter().write(msg); httpResponse.getWriter().flush(); httpResponse.getWriter().close(); } }
[ "572948072@qq.com" ]
572948072@qq.com
3214b9d5ffe86ea39dd4635adfd884b4e8120e77
37fc111448bf8e8468e5df8ec4bf3a76e8067624
/monoton_asal_sayilar/src/monoton_asal_sayilar/monoton.java
1ae57a24b1ee878fe615902fa13cf637dd31cffb
[]
no_license
MehmedMazlum/Java-Gsu
daeb1ac97247d7e757d5f262ea74ad743ab9d4cf
294898a2b88807ee3f4010659ab688f3c43b5167
refs/heads/master
2021-05-12T00:46:51.236280
2018-01-15T12:34:03
2018-01-15T12:34:03
117,542,795
0
0
null
null
null
null
UTF-8
Java
false
false
950
java
package monoton_asal_sayilar; /* 2013 vizesi monoton asal sayilar */ import java.util.Scanner ; public class monoton { public static void main(String args[]) { int i = 0 ; int t = 0 ; int g = 1 ; int[] a = new int[5]; int j = 0 ; int k ; int h = 0 ; Scanner bilgi = new Scanner(System.in) ; i = bilgi.nextInt() ; a[0] = i/10000 ; a[1] = (i/1000)%10 ; a[2] = (i/100)%10 ; a[3] = (i%100)/10 ; a[4] = i%10 ; k = 0 ; for(j=0 ; j<4 ; j++ ) { if( (a[j+1]-a[j] == 0) || (a[j+1]-a[j] == 1) || (a[j+1]- a[j] == -1) ) { k = k + 1 ; if (a[0] == a[j+1] ) { g = g + 1 ; } else if (a[0] != a[j+1]) { t = t + 1 ; } } else k = 0 ; } j = 0 ; for ( j = 2 ; j<Math.sqrt(i);j++ ) { if (i%j == 0 ) h = h + 1 ; else h = 0 ; } if ( k == 4 && (g == 4 || t == 4 ) && (h == 0) ) { System.out.println("dogrudur"); } else System.out.println("bir yanlisin var"); bilgi.close(); } }
[ "daskin_daskin@hotmail.com" ]
daskin_daskin@hotmail.com
a8784a733578bf7bac420091c50064b17d348425
a04a728dea5f5c6262a9a061ca184ca2b0f53a4a
/struts2/src/test/java/com/crown/AppTest.java
2ce562db1acc098821f2bb3af8971dcbd146b122
[]
no_license
jianwenkang/edu
adc6c509be96907bcc258a2c85dcee93a5a5b7c7
f41960b5cf0d176aa52bb33c2d81f4a4ba12fabf
refs/heads/master
2022-12-21T04:37:21.166509
2021-01-06T04:56:35
2021-01-06T04:56:35
162,111,760
1
0
null
2022-12-16T04:24:17
2018-12-17T10:13:08
Java
UTF-8
Java
false
false
281
java
package com.crown; import org.junit.Test; import static org.junit.Assert.assertTrue; /** * Unit test for simple App. */ public class AppTest { /** * Rigorous Test :-) */ @Test public void shouldAnswerWithTrue() { assertTrue( true ); } }
[ "kangjianwen22@gmail.com" ]
kangjianwen22@gmail.com
018571723c2a127fa7472c5f38f9de308d5d1b0a
d7f1d17d9d798db994e7acdd358d49562f6b8c8f
/mechanics/gui/colorselector/ColorSelectorShader.java
1781e0f685d3d7104b29c116e9f45cac131d97cb
[]
no_license
MattdewT/Engine
90f9e4154eb9f0ccee651ad3d1cb0a7a37adc92a
9284ab1772d23515dd1dfaaa099e117be07e120f
refs/heads/master
2020-12-30T11:16:00.334116
2017-06-08T23:08:50
2017-06-08T23:08:50
91,548,227
0
0
null
2017-06-08T23:08:50
2017-05-17T07:47:59
null
UTF-8
Java
false
false
1,959
java
package de.matze.Blocks.mechanics.gui.colorselector; import de.matze.Blocks.graphics.Shader; import de.matze.Blocks.maths.Matrix4f; import de.matze.Blocks.maths.Vector3f; /** * @autor matze * @date 21.02.2017 */ public class ColorSelectorShader extends Shader{ private final static String vertPath = "src/de/matze/Blocks/mechanics/gui/colorselector/ColorSelectorShader.vs"; private final static String fragPath = "src/de/matze/Blocks/mechanics/gui/colorselector/ColorSelectorShader.fs"; private int Location_pr_matrix; private int Location_custom_color; private int Location_ml_matrix; private int Location_animation_matrix; private int Location_mix_value; public ColorSelectorShader() { super(vertPath, fragPath); } @Override protected void bindAttributes() { bindAttribute(0, "position"); bindAttribute(1, "color"); } @Override protected void getAllUniformLocations() { Location_pr_matrix = getUniformLocation("pr_matrix"); Location_custom_color = getUniformLocation("custom_color"); Location_ml_matrix = getUniformLocation("ml_matrix"); Location_animation_matrix = getUniformLocation("anim_matrix"); Location_mix_value = getUniformLocation("mix_value"); } public void setProjectionMatrix(Matrix4f gui_pr_matrix) { setUniformMat4f(Location_pr_matrix, gui_pr_matrix); } public void setCustomColor(Vector3f color) { setUniform3f(Location_custom_color, color); } public void setModelMatrix(Matrix4f ml_matrix) { setUniformMat4f(Location_ml_matrix, ml_matrix); } public void setAnimationMatrix(Matrix4f anim_matrix) { super.setUniformMat4f(Location_animation_matrix, anim_matrix); } public void setMixValue(float mixValue) { super.setUniform1f(Location_mix_value, mixValue); } }
[ "noreply@github.com" ]
noreply@github.com
c7e34bfc0d99edaab549362bb17731a6c8259a09
f0bdd354daed1f254d2203e5bda9186be3714e51
/app/src/androidTest/java/com/bestretailers/data/TestDb.java
302e0d4116b0660175a4ab8dedbac3e82eacd52b
[]
no_license
andreitognolo/BestRetailers
6bc35f255be228730f00bae81c399e77f1de1646
56b6e17ca159c64f9180a49d1a9bfa58a6568677
refs/heads/master
2021-01-22T11:29:39.012682
2015-07-01T23:18:43
2015-07-01T23:18:43
38,325,757
0
0
null
2015-06-30T18:23:01
2015-06-30T18:23:00
Java
UTF-8
Java
false
false
6,554
java
package com.bestretailers.data; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.test.AndroidTestCase; import java.util.HashSet; /** * Created by daniele on 25/06/15. */ public class TestDb extends AndroidTestCase { public static final String LOG_TAG = TestDb.class.getSimpleName(); // Since we want each test to start with a clean slate void deleteTheDatabase() { mContext.deleteDatabase(BestRetailersDbHelper.DATABASE_NAME); } /* This function gets called before each test is executed to delete the database. This makes sure that we always have a clean test. */ public void setUp() { deleteTheDatabase(); } public void testCreateDb() throws Throwable { // build a HashSet of all of the table names we wish to look for // Note that there will be another table in the DB that stores the // Android metadata (db version information) final HashSet<String> tableNameHashSet = new HashSet<String>(); tableNameHashSet.add(BestRetailersContract.BestBuyStoreEntry.TABLE_NAME); //tableNameHashSet.add(BestRetailers.WeatherEntry.TABLE_NAME); mContext.deleteDatabase(BestRetailersDbHelper.DATABASE_NAME); SQLiteDatabase db = new BestRetailersDbHelper( this.mContext).getWritableDatabase(); assertEquals(true, db.isOpen()); // have we created the tables we want? Cursor c = db.rawQuery("SELECT name FROM sqlite_master WHERE type='table'", null); assertTrue("Error: This means that the database has not been created correctly", c.moveToFirst()); // verify that the tables have been created do { tableNameHashSet.remove(c.getString(0)); } while (c.moveToNext()); // if this fails, it means that your database doesn't contain the store entry // and other tables... (add them upon implementing) assertTrue("Error: Your database was created without both the location entry and weather entry tables", tableNameHashSet.isEmpty()); // now, do our tables contain the correct columns? c = db.rawQuery("PRAGMA table_info(" + BestRetailersContract.BestBuyStoreEntry.TABLE_NAME + ")", null); assertTrue("Error: This means that we were unable to query the database for table information.", c.moveToFirst()); // Build a HashSet of all of the column names we want to look for final HashSet<String> storeColumnHashSet = new HashSet<String>(); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry._ID); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_STORE_ID); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_COUNTRY); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_REGION); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_CITY); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_NAME); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_LONG_NAME); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_TYPE); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_COORD_LAT); storeColumnHashSet.add(BestRetailersContract.BestBuyStoreEntry.COLUMN_COORD_LONG); int columnNameIndex = c.getColumnIndex("name"); do { String columnName = c.getString(columnNameIndex); storeColumnHashSet.remove(columnName); } while (c.moveToNext()); // if this fails, it means that your database doesn't contain all of the required store // entry columns assertTrue("Error: The database doesn't contain all of the required store entry columns", storeColumnHashSet.isEmpty()); db.close(); } public void testStoreTable(){ insertStore(); } public long insertStore(){ // First step: Get reference to writable database // If there's an error in those massive SQL table creation Strings, // errors will be thrown here when you try to get a writable database. BestRetailersDbHelper dbHelper = new BestRetailersDbHelper(mContext); SQLiteDatabase db = dbHelper.getWritableDatabase(); // Second Step: Create ContentValues of what you want to insert // (you can use the createNorthPoleLocationValues if you wish) ContentValues testValues = TestUtilities.createFakeStoreValues(); // Third Step: Insert ContentValues into database and get a row ID back long storeRowId; storeRowId = db.insert(BestRetailersContract.BestBuyStoreEntry.TABLE_NAME, null, testValues); // Verify we got a row back. assertTrue(storeRowId != -1); // Data's inserted. IN THEORY. Now pull some out to stare at it and verify it made // the round trip. // Fourth Step: Query the database and receive a Cursor back // A cursor is your primary interface to the query results. Cursor cursor = db.query( BestRetailersContract.BestBuyStoreEntry.TABLE_NAME, // Table to Query null, // all columns null, // Columns for the "where" clause null, // Values for the "where" clause null, // columns to group by null, // columns to filter by row groups null // sort order ); // Move the cursor to a valid database row and check to see if we got any records back // from the query assertTrue( "Error: No Records returned from location query", cursor.moveToFirst() ); // Fifth Step: Validate data in resulting Cursor with the original ContentValues // (you can use the validateCurrentRecord function in TestUtilities to validate the // query if you like) TestUtilities.validateCurrentRecord("Error: Location Query Validation Failed", cursor, testValues); // Move the cursor to demonstrate that there is only one record in the database assertFalse( "Error: More than one record returned from store query", cursor.moveToNext() ); // Sixth Step: Close Cursor and Database cursor.close(); db.close(); return storeRowId; } }
[ "daniele.stirp@gmail.com" ]
daniele.stirp@gmail.com
1242e068a22980a4b191f87d1a05a02978366e9b
240db2a7719aca863b10c18aa76591dd7e59bae5
/jfinal_maven/src/main/java/com/demo/common/model/UserGroup.java
4cca87415adf70f401a65cee4c68b31e3da49e31
[]
no_license
abook23/MavenProjects
355bbc80307328cfad54c3c4f0f6edc8835e1d49
3e952414b4a32129537760688612e0c3be9bb089
refs/heads/master
2021-01-12T05:52:55.006009
2017-02-08T08:39:23
2017-02-08T08:39:23
77,226,145
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package com.demo.common.model; import com.demo.common.model.base.BaseUserGroup; /** * Generated by JFinal. */ @SuppressWarnings("serial") public class UserGroup extends BaseUserGroup<UserGroup> { public static final UserGroup dao = new UserGroup(); }
[ "abook23@163.com" ]
abook23@163.com
41facbaaf6566efd582723ec28d74b6e64c1aeb5
7232587e689dfc4838c73406f58d0fad5b4ff495
/src/main/java/edu/kis/powp/command/ComplexCommand.java
58e8a7029907f4bf31e9c8ad0a07ee7abb590254
[]
no_license
SzymonGrzelak/powp_jobs2d_project
91a541d3399e9ff9d51c5875e37025b3533f9cd3
315716253a621b335ddf70c75a6765525ad0ea69
refs/heads/master
2020-05-07T18:55:28.526514
2019-05-04T11:48:47
2019-05-04T11:48:47
180,789,477
0
0
null
2019-04-11T12:41:25
2019-04-11T12:41:25
null
UTF-8
Java
false
false
464
java
package edu.kis.powp.command; import java.util.ArrayList; import java.util.List; public class ComplexCommand implements DriverCommand { private List<DriverCommand> commandsList = new ArrayList<>(); public void addCommand(DriverCommand driver) { commandsList.add(driver); } @Override public void execute() { for (DriverCommand command : commandsList) { command.execute(); } } }
[ "szy.grzelak@gmail.com" ]
szy.grzelak@gmail.com
a61d06a80150a3dfde4340df3d6b62daa86fa9ee
50e607243eb253a1cf5091373bb0b2724adeb0d6
/TreesAndGraphs/DeepestLeavesSum/src/deepestleavessum/TreeNode.java
eba9cd476a088bd438dc29f119320c1786a6db4b
[]
no_license
souravpalitrana/Java-DataStructure-Algorithm-Problem
fa3ba233bdd74f4e0f08f5adcbce5b8c4b8f1f9e
74ba9e0ab9883c3508bc7f08ff5abb67d9367b25
refs/heads/master
2022-10-08T08:33:22.605093
2022-09-24T13:06:53
2022-09-24T13:06:53
165,913,630
0
0
null
2022-03-03T20:46:49
2019-01-15T19:50:30
Java
UTF-8
Java
false
false
544
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 deepestleavessum; /** * * @author souravpalit */ public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode() { } TreeNode(int val) { this.val = val; } TreeNode(int val, TreeNode left, TreeNode right) { this.val = val; this.left = left; this.right = right; } }
[ "souravpalitrana@gmail.com" ]
souravpalitrana@gmail.com
9ef186c0597034f19cdb44671b6e0315e65f8e9d
b4860565b71bdbeb6eaafad97393e049781448cf
/com.lvdou/src/test/java/com/lvdou/TesDecrease.java
c7fa65a12e463944c338c2ce5de3e0e129949607
[]
no_license
xandon01/lvdou-2021callforcode
c0ccae3614d5c47c77488f5b6c36548e79d69e66
329186f1fa9ee2058a32ba7c5558e4393a8b12c5
refs/heads/main
2023-06-21T06:58:20.106832
2021-07-30T12:04:41
2021-07-30T12:04:41
385,966,676
0
0
null
null
null
null
UTF-8
Java
false
false
2,815
java
package com.lvdou; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.security.InvalidKeyException; import java.security.PrivateKey; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.EnumSet; import java.util.Properties; import org.hyperledger.fabric.gateway.Contract; import org.hyperledger.fabric.gateway.Gateway; import org.hyperledger.fabric.gateway.Identities; import org.hyperledger.fabric.gateway.Network; import org.hyperledger.fabric.gateway.Wallet; import org.hyperledger.fabric.gateway.Wallets; import org.hyperledger.fabric.sdk.Peer; import org.junit.Test; /** * 调用绿豆的“转豆” */ public class TesDecrease { @Test public void Test01() { try { // 获取相应参数 Properties properties = new Properties(); InputStream inputStream = TesDecrease.class.getResourceAsStream("/fabric.config.properties"); properties.load(inputStream); String networkConfigPath = properties.getProperty("networkConfigPath"); String channelName = properties.getProperty("channelName"); String contractName = properties.getProperty("contractName"); String certificatePath = properties.getProperty("certificatePath"); X509Certificate certificate = readX509Certificate(Paths.get(certificatePath)); String privateKeyPath = properties.getProperty("privateKeyPath"); PrivateKey privateKey = getPrivateKey(Paths.get(privateKeyPath)); Wallet wallet = Wallets.newInMemoryWallet(); wallet.put("user1", Identities.newX509Identity("Org1MSP", certificate, privateKey)); Gateway.Builder builder = Gateway.createBuilder().identity(wallet, "user1") .networkConfig(Paths.get(networkConfigPath)); Gateway gateway = builder.connect(); Network network = gateway.getNetwork(channelName); Contract contract = network.getContract(contractName); contract.createTransaction("Decrease") .setEndorsingPeers(network.getChannel().getPeers(EnumSet.of(Peer.PeerRole.ENDORSING_PEER))) .submit("456","200"); } catch (Exception e) { e.printStackTrace(); } } private static X509Certificate readX509Certificate(final Path certificatePath) throws IOException, CertificateException { try (Reader certificateReader = Files.newBufferedReader(certificatePath, StandardCharsets.UTF_8)) { return Identities.readX509Certificate(certificateReader); } } private static PrivateKey getPrivateKey(final Path privateKeyPath) throws IOException, InvalidKeyException { try (Reader privateKeyReader = Files.newBufferedReader(privateKeyPath, StandardCharsets.UTF_8)) { return Identities.readPrivateKey(privateKeyReader); } } }
[ "67516652@qq.com" ]
67516652@qq.com
cb336e72908dfe0654132a4703bfa99074762681
92eab342ed14f9c9e5745c6675774c9aec5096a9
/src/main/java/com/Many_to_Many/Many_to_Many_Uni/Entity/Course.java
00efaa69469267434e1ade7d6f601414552376ac
[]
no_license
prince23696/Many_to_Many_Unidirectional
f15881c1815aa13ad41abb19af205393913ac245
23decfcf824c428dfce77581e2948bc1bea7c1ce
refs/heads/master
2023-08-22T20:23:44.823072
2021-09-17T07:43:27
2021-09-17T07:43:27
407,451,087
0
0
null
null
null
null
UTF-8
Java
false
false
1,192
java
package com.Many_to_Many.Many_to_Many_Uni.Entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class Course { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int c_id; private String c_name; private int fee; public Course() { } public Course(int c_id) { this.c_id = c_id; } public Course(int c_id, String c_name, int fee) { this.c_id = c_id; this.c_name = c_name; this.fee = fee; } public int getC_id() { return c_id; } public void setC_id(int c_id) { this.c_id = c_id; } public String getC_name() { return c_name; } public void setC_name(String c_name) { this.c_name = c_name; } public int getFee() { return fee; } public void setFee(int fee) { this.fee = fee; } @Override public String toString() { return "Course{" + "c_id=" + c_id + ", c_name='" + c_name + '\'' + ", fee=" + fee + '}'; } }
[ "prince@prince.gupta" ]
prince@prince.gupta
ee58120d23793661ff4dbc7494de2f702e35a631
cabf9ec47ce4efe9fa026e6ac96d2fe40723f3de
/src/main/java/com/practice/spring/business/domain/RoomReservation.java
e6c85a27754e4d70acedc963c5f46451c0102813
[]
no_license
Sreenadh1543/microservice
b098c7fdb0d6e96ab1be96bf9347b8eabe4c0def
d21207572c7a9830fb24b34fdd45c32b37b36db2
refs/heads/master
2022-11-17T18:29:52.460469
2020-07-15T20:29:07
2020-07-15T20:29:07
278,732,826
0
0
null
null
null
null
UTF-8
Java
false
false
359
java
package com.practice.spring.business.domain; import lombok.Getter; import lombok.Setter; import java.util.Date; @Getter @Setter public class RoomReservation { private long roomId; private long guestId; private String roomName; private String roomNumber; private String firstName; private String lastName; private Date date; }
[ "sreenadh1543@gmail.com" ]
sreenadh1543@gmail.com
fca94a14a384151687a0233856e2202095afbcde
27673ea1e5c29c2bd1be478ca6224a05a0f4687e
/src/main/java/org/michiganchineseschool/speech/dao/TimeLimitRuleDaoImpl.java
4343aca5902f4c18ce4aaef0fb7e654f8a190d8e
[]
no_license
chcid/chcid-sservice
2c89a0623fa8b23e893013355114d8869d63a6db
cfc16b88a063cc50ee1b70c147e3df6816e54760
refs/heads/master
2020-06-06T01:19:01.389205
2015-04-07T12:42:19
2015-04-07T12:42:19
16,878,615
0
0
null
null
null
null
UTF-8
Java
false
false
1,653
java
package org.michiganchineseschool.speech.dao; import java.util.List; import org.michiganchineseschool.speech.dao.mapper.TimeLimitRuleRowMapper; import org.michiganchineseschool.speech.model.TimeLimitRule; public class TimeLimitRuleDaoImpl extends BaseDaoImpl implements TimeLimitRuleDao { private final static String TableName = "time_limit_rule"; @Override public void insert(TimeLimitRule record) throws Exception { String sql = "INSERT INTO " + TableName + " ( MAX_LIMIT, MIN_LIMIT, NAME ) VALUES ( ?, ?, ? )"; getJdbcTemplate().update( sql, new Object[] { record.getMaxLimit(), record.getMinLimit(), record.getName() }); } @Override public void update(TimeLimitRule record) throws Exception { String sql = "UPDATE " + TableName + " SET MAX_LIMIT = ? , MIN_LIMIT = ?, NAME = ? WHERE ID" + TableName + " = ?"; getJdbcTemplate().update( sql, new Object[] { record.getMaxLimit(), record.getMinLimit(), record.getName(), record.getIdtime_limit_rule() }); } @Override public List<TimeLimitRule> selectAll() throws Exception { String sql = "SELECT * FROM " + TableName; return getJdbcTemplate().query(sql, new TimeLimitRuleRowMapper()); } @Override public void delete(String id) throws Exception { delete(id, TableName); } @Override public TimeLimitRule select(String id) throws Exception { if (null == id) { return new TimeLimitRule(); } String sql = "Select * FROM " + TableName + " WHERE ID" + TableName + " = " + id; return getJdbcTemplate().queryForObject(sql, new TimeLimitRuleRowMapper()); } }
[ "andychchen@yahoo.com" ]
andychchen@yahoo.com
48255c520371f46624fcdcdb52c8d58301819f67
adc803ef0959c60486cedf5538794520c80f9516
/SpringBoot/备份/myblog/src/main/java/com/niuben/myblog/domain/HotType.java
3002b363f6d4b7cde5fe411ca3f153cf7f4b05ab
[]
no_license
newbens/JavaPractice
d1ebc42ac2b2ad8b1054a22c121e77390ca92849
7af1301780d211b459eb0c936b2ff5b494054a57
refs/heads/main
2023-04-05T10:42:05.304136
2021-04-04T14:19:19
2021-04-04T14:19:19
354,561,466
0
0
null
null
null
null
UTF-8
Java
false
false
780
java
package com.niuben.myblog.domain; public class HotType { private Long id; private String typeName; private Long num; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTypeName() { return typeName; } public void setTypeName(String typeName) { this.typeName = typeName; } public Long getNum() { return num; } public void setNum(Long num) { this.num = num; } @Override public String toString() { return "HotType{" + // "id=" + id + ", typeName='" + typeName + '\'' + ", num=" + num + '}'; } }
[ "newbens@163.com" ]
newbens@163.com
7e6f0e74ec52634668f3b225563bdff1f0e1ccc1
1700f5dbccf5633e3fa16c85ee7e97153951634d
/src/main/java/com/org/config/SwaggerConfig.java
062085a155c59f7579b08a1d3e426bb399d5abc2
[]
no_license
aniljha91/config-server
593180fdfd7cef322652e567339b589c0eda6fcd
75437a8eb57be6c236771d117166ee0fb3c7a50e
refs/heads/master
2021-01-01T17:53:28.776154
2017-07-24T12:37:05
2017-07-24T12:37:05
98,187,732
0
0
null
null
null
null
UTF-8
Java
false
false
2,378
java
package com.org.config; import static springfox.documentation.builders.PathSelectors.regex; import org.springframework.boot.bind.RelaxedPropertyResolver; import org.springframework.context.EnvironmentAware; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.core.env.Environment; import com.org.common.ProfileConstants; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 @Profile("!"+ProfileConstants.SPRING_PROFILE_PRODUCTION) public class SwaggerConfig implements EnvironmentAware { public static final String DEFAULT_INCLUDE_PATTERN = "/.*"; private RelaxedPropertyResolver propertyResolver; @Override public void setEnvironment(Environment environment) { this.propertyResolver = new RelaxedPropertyResolver(environment, "swagger."); } @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() //.apis(RequestHandlerSelectors.any()) //.paths(PathSelectors.any()) .apis(RequestHandlerSelectors.basePackage("org.springframework.cloud.config.server")) .paths(regex(DEFAULT_INCLUDE_PATTERN)) .build(); } /** * API Info as it appears on the swagger-ui page. */ private ApiInfo apiInfo() { return new ApiInfo( propertyResolver.getProperty("title"), propertyResolver.getProperty("description"), "Prototype version - v1", propertyResolver.getProperty("termsOfServiceUrl"), new Contact(propertyResolver.getProperty("contact.name"), propertyResolver.getProperty("contact.url"), propertyResolver.getProperty("contact.email")), propertyResolver.getProperty("license"), propertyResolver.getProperty("licenseUrl") ); } }
[ "aniljha_91@yahoo.co.in" ]
aniljha_91@yahoo.co.in
fbdf6a238ee0c7a69508896980a2e54575621013
c48849992cf127ff3af0aa7dfc0ff2019d5a5cfa
/adds/poc-app-adds-xmlview/src/main/java/com/spaeth/appbase/adds/xmlview/service/AbstractXmlVisualComponentTranslator.java
a2ae3442206f46015f0c7e3bbd2e694e3fec5e48
[]
no_license
franciscospaeth/poc
de68be26cdb0b1188516b8b3d1238f5263c7cb44
8548b22680ecd335d87673687cc9d214ac188cf2
refs/heads/master
2021-01-13T04:27:12.296694
2014-02-18T14:50:37
2014-02-18T14:50:37
13,888,917
0
2
null
null
null
null
UTF-8
Java
false
false
772
java
package com.spaeth.appbase.adds.xmlview.service; import static com.spaeth.appbase.adds.xmlview.service.XmlViewTranslatorHelper.aggregateVisualComponentProperties; import org.w3c.dom.Element; import com.spaeth.appbase.adds.xmlview.XmlViewContext; import com.spaeth.appbase.component.VisualComponent; public abstract class AbstractXmlVisualComponentTranslator<TranslatedObject extends VisualComponent> extends AbstractXmlTranslator<TranslatedObject> { AbstractXmlVisualComponentTranslator(FrontXmlTranslator frontTranslator) { super(frontTranslator); } @Override protected void configure(TranslatedObject result, Element source, XmlViewContext context) { super.configure(result, source, context); aggregateVisualComponentProperties(source, result); } }
[ "spaeth@philippines" ]
spaeth@philippines
c98024130a0621cf1308a1a06467c2b39934744f
db42154d1d921458a0756342704fdcb5a0605dd2
/app/src/main/java/shproject/com/shpdemo/mvp/adapter/BookListAdapter.java
b0974db93c4c5d98ba6c94aa8d97b42702c5d034
[]
no_license
eggbrid/SHPDemo
caf6ea3d354a2e124d1304ece11f8e1af3a1dcee
3c4795b165463fa41e8941cb61797b2c743c65d0
refs/heads/master
2020-05-25T05:57:47.135754
2017-03-23T11:16:12
2017-03-23T11:16:12
84,916,585
3
0
null
null
null
null
UTF-8
Java
false
false
1,661
java
package shproject.com.shpdemo.mvp.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import java.util.ArrayList; import java.util.List; import shproject.com.shpdemo.R; import shproject.com.shpdemo.mvp.model.BookModel; /** * Created by xus on 2017/3/23. */ public class BookListAdapter extends BaseAdapter { private Context context; private List<BookModel> list=new ArrayList<>(); public List<BookModel> getList() { return list; } public void setList(List<BookModel> list) { this.list = list; } public BookListAdapter(Context context) { this.context = context; } @Override public int getCount() { return list.size(); } @Override public Object getItem(int i) { return list.get(i); } @Override public long getItemId(int i) { return i; } @Override public View getView(int i, View view, ViewGroup viewGroup) { BookModel bookModel=list.get(i); if (view == null) { view = LayoutInflater.from(context).inflate(R.layout.mvp_booklist_item, null); } TextView name = (TextView) view.findViewById(R.id.name); TextView page = (TextView) view.findViewById(R.id.page); TextView author = (TextView) view.findViewById(R.id.author); name.setText("书名:"+bookModel.getName()); page.setText("共"+bookModel.getPageSize()+"页"); author.setText("作者"+bookModel.getAother()); return view; } }
[ "1340888417@qq.com" ]
1340888417@qq.com