blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
e92cf3ab5177f2e67b0697538aac8211775ebb8d
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.token/classes.jar/android/arch/lifecycle/CompositeGeneratedAdaptersObserver.java
6c6228ab3a5823a8aeaadeaf20e6037e07deccc1
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
674
java
package android.arch.lifecycle; import com.tencent.token.bi; import com.tencent.token.bj.a; import com.tencent.token.bm; import com.tencent.token.bq; public class CompositeGeneratedAdaptersObserver implements GenericLifecycleObserver { private final bi[] a; public CompositeGeneratedAdaptersObserver(bi[] paramArrayOfbi) { this.a = paramArrayOfbi; } public final void a(bm parambm, bj.a parama) { new bq(); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.token\classes.jar * Qualified Name: android.arch.lifecycle.CompositeGeneratedAdaptersObserver * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
336a348901fc02d4adcd0e04eef6902745d4812d
a69843c67fd8a5b227837bd253fde3f672739e87
/executor/src/main/java/com/linkedpipes/etl/executor/module/BannedComponent.java
5a783b4349e26cb09f3427c20fb8b9a5638852e0
[ "MIT" ]
permissive
eghuro/etl
28713014be4db6bb010bd8c6a4e9a8249857ed2f
5d74f9156397a4b48ad0eb3d833721dc67ba74a2
refs/heads/master
2020-04-02T02:41:15.816327
2018-09-20T11:44:31
2018-09-20T11:44:31
153,922,127
0
0
NOASSERTION
2018-10-20T15:53:20
2018-10-20T15:53:20
null
UTF-8
Java
false
false
240
java
package com.linkedpipes.etl.executor.module; public class BannedComponent extends ModuleException { public BannedComponent(String iri, String pattern) { super("Required component: {} is banned by: {}", iri, pattern); } }
[ "skodapetr@gmail.com" ]
skodapetr@gmail.com
2fe427e9b58aab6ef78c645b9860be92c8a9e354
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-07-19-tempmail/sources/com/google/firebase/iid/a1.java
338a9e56aa6abdd692e8155fca21aaf4f5094247
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package com.google.firebase.iid; import com.google.firebase.f.a; import com.google.firebase.f.b; import com.google.firebase.iid.FirebaseInstanceId; /* compiled from: com.google.firebase:firebase-iid@@20.2.0 */ final /* synthetic */ class a1 implements b { /* renamed from: a reason: collision with root package name */ private final FirebaseInstanceId.a f11158a; a1(FirebaseInstanceId.a aVar) { this.f11158a = aVar; } public final void a(a aVar) { FirebaseInstanceId.a aVar2 = this.f11158a; synchronized (aVar2) { if (aVar2.a()) { FirebaseInstanceId.this.C(); } } } }
[ "zteeed@minet.net" ]
zteeed@minet.net
3c5e7c0b44e28c77deeb988587ecced4e294f30a
b59ef706490bf27c8885a67ce31d87ffbd1172ee
/src/main/java/com/sist/food/DataReplyController.java
f150c761b1c4d5a6cdf3aabf597fd6f132010115
[]
no_license
shaqbari/SpringMiniSiteProject
fd36b760d52a6ab594e3bfbe4f259425a6f1918f
77c8824fa2c0c873de8a99ed68ab74aa69ed7dbd
refs/heads/master
2021-01-25T09:14:29.093429
2017-06-20T07:09:36
2017-06-20T07:09:36
93,800,912
1
0
null
null
null
null
UHC
Java
false
false
2,193
java
package com.sist.food; import javax.annotation.PreDestroy; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.sist.databoard.dao.DataBoardService; import com.sist.databoard.dao.DataReplyVO; @Controller public class DataReplyController { @Autowired private DataBoardService service; @RequestMapping("main/reply_new_insert.do") //@PreDestroy 메소드 권한 걸어서 로그인시에만 이 메소드 사용가능하도록 해야 한다. db차원에서도 권한별로 차등적용 가능 public String reply_new_insert(int bno, int page, String msg, HttpSession session){ DataReplyVO vo=new DataReplyVO(); String id= (String) session.getAttribute("id"); String name= (String) session.getAttribute("name"); vo.setBno(bno); vo.setMsg(msg); vo.setId(id); vo.setName(name); service.replyNewInsert(vo); return "redirect:/main/board_content.do?no="+bno+"&page="+page; //포워드만 request(model).addAttribute()로 나머지는 redirect는 get방식으로 보낸다. } @RequestMapping("main/reply_update.do") public String reply_update(int page, DataReplyVO vo){ service.replyUpdate(vo); return "redirect:/main/board_content.do?no="+vo.getBno()+"&page="+page; } @RequestMapping("main/reply_re_insert.do") public String reply_re_insert(int pno, int bno, int page, String msg, HttpSession session){ DataReplyVO vo=new DataReplyVO(); String id= (String) session.getAttribute("id"); String name= (String) session.getAttribute("name"); vo.setBno(bno); vo.setMsg(msg); vo.setId(id); vo.setName(name); service.replyReInsert(pno, vo); return "redirect:/main/board_content.do?no="+bno+"&page="+page; } @RequestMapping("/main/reply_delete.do") public String reply_delete(int no, int bno, int page){//web.xml에서 설정하면 주소하나로 모든기능구현가능 //restful //ajax쓰면 편하다. //Db연동 service.replyDelete(no); return "redirect:/main/board_content.do?no="+bno+"&page="+page; } }
[ "shaqbari@gmail.com" ]
shaqbari@gmail.com
b3074ee5cdeccfa9f97818a125b2c7760f3b17bd
22e506ee8e3620ee039e50de447def1e1b9a8fb3
/java_src/org/pwrd/paho/client/mqttv3/internal/ClientDefaults.java
70e034421b52b4bd23abd5ee8579864e10791665
[]
no_license
Qiangong2/GraffitiAllianceSource
477152471c02aa2382814719021ce22d762b1d87
5a32de16987709c4e38594823cbfdf1bd37119c5
refs/heads/master
2023-07-04T23:09:23.004755
2021-08-11T18:10:17
2021-08-11T18:10:17
395,075,728
0
0
null
null
null
null
UTF-8
Java
false
false
133
java
package org.pwrd.paho.client.mqttv3.internal; public class ClientDefaults { public static final int MAX_MSG_SIZE = 268435456; }
[ "sassafrass@fasizzle.com" ]
sassafrass@fasizzle.com
b27dd6a1536bca8867c62d9ac314332de26b4b36
819b29d01434ca930f99e8818293cc1f9aa58e18
/src/contest/ecoo/ECOO_2016_R2_P1.java
518c1bc255e866088f5f724412c35eae5277032f
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ANUJ581/competitive-programming-1
9bd5de60163d9a46680043d480455c8373fe26a7
d8ca9efe9762d9953bcacbc1ca1fe0da5cbe6ac4
refs/heads/master
2020-08-06T18:43:09.688000
2019-10-06T04:54:47
2019-10-06T04:54:47
213,110,718
0
0
NOASSERTION
2019-10-06T04:54:18
2019-10-06T04:54:18
null
UTF-8
Java
false
false
2,648
java
package contest.ecoo; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.StringTokenizer; public class ECOO_2016_R2_P1 { static final int TEST_CASES = 10; static BufferedReader br; static PrintWriter out; static StringTokenizer st; public static void main(String[] args) throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(new OutputStreamWriter(System.out)); // br = new BufferedReader(new FileReader("in.txt")); // br = new BufferedReader(new FileReader("DATA11.txt")); for (int t = 1; t <= TEST_CASES; t++) { String in = readLine(); int[] max = getLongestPalindrome(in); int ans = 0; for (int i = 0; i < max.length; i++) { if (Math.min(max.length - 1 - i, i) == max[i]) { if (i % 2 == 0) ans = Math.max(ans, max[i]); else ans = Math.max(ans, max[i]); } } out.println(in.length() - ans); } out.close(); } static int[] getLongestPalindrome(String s) { int len = s.length() * 2 + 1; char[] text = new char[len]; for (int i = 0; i < len; i++) text[i] = '#'; for (int i = 1; i < len; i += 2) text[i] = s.charAt(i / 2); int[] max = new int[len]; // center of palindrome with the greatest right boundary int c = 0; // right boundary of palindrome int r = 0; for (int i = 1; i < len; i++) { // the index of the mirror of i with respects to center c int j = (c - (i - c)); // initializing the length of the palindrome centered at i max[i] = r > i ? Math.min(r - i, max[j]) : 0; // extending the palindrome at i while (i + 1 + max[i] < len && i - 1 - max[i] >= 0 && text[i + 1 + max[i]] == text[i - 1 - max[i]]) max[i]++; if (i + max[i] > r) { r = i + max[i]; c = i; } } return max; } static String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine().trim()); return st.nextToken(); } static long readLong() throws IOException { return Long.parseLong(next()); } static int readInt() throws IOException { return Integer.parseInt(next()); } static double readDouble() throws IOException { return Double.parseDouble(next()); } static char readCharacter() throws IOException { return next().charAt(0); } static String readLine() throws IOException { return br.readLine().trim(); } }
[ "jeffrey.xiao1998@gmail.com" ]
jeffrey.xiao1998@gmail.com
d596b9ce8d551acba1b3dcdb5c7987080ca81669
a82243fde06ba8c7dfe5b0f34920a1a798dfe669
/src/main/java/org/bian/dto/CRCustomerCaseRootCauseAnalysisRetrieveInputModel.java
2c18b959deb1a48a533e3e572ffe758b8ec29c80
[ "Apache-2.0" ]
permissive
bianapis/sd-case-root-cause-analysis-v3
34344aba7dc7da4f4273862597bc5c51df429b82
5451a3b109bb8fbf9112e30f373012f60ab67d2e
refs/heads/master
2022-12-26T07:02:33.991167
2020-10-05T12:45:14
2020-10-05T12:45:14
301,146,941
0
0
null
null
null
null
UTF-8
Java
false
false
3,809
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.bian.dto.CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceAnalysis; import org.bian.dto.CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceReportRecord; import javax.validation.Valid; /** * CRCustomerCaseRootCauseAnalysisRetrieveInputModel */ public class CRCustomerCaseRootCauseAnalysisRetrieveInputModel { private Object customerCaseRootCauseAnalysisRetrieveActionTaskRecord = null; private String customerCaseRootCauseAnalysisRetrieveActionRequest = null; private CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceReportRecord customerCaseRootCauseAnalysisInstanceReportRecord = null; private CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceAnalysis customerCaseRootCauseAnalysisInstanceAnalysis = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The retrieve service call consolidated processing record * @return customerCaseRootCauseAnalysisRetrieveActionTaskRecord **/ public Object getCustomerCaseRootCauseAnalysisRetrieveActionTaskRecord() { return customerCaseRootCauseAnalysisRetrieveActionTaskRecord; } public void setCustomerCaseRootCauseAnalysisRetrieveActionTaskRecord(Object customerCaseRootCauseAnalysisRetrieveActionTaskRecord) { this.customerCaseRootCauseAnalysisRetrieveActionTaskRecord = customerCaseRootCauseAnalysisRetrieveActionTaskRecord; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Details of the retrieve action service request (lists requested reports) * @return customerCaseRootCauseAnalysisRetrieveActionRequest **/ public String getCustomerCaseRootCauseAnalysisRetrieveActionRequest() { return customerCaseRootCauseAnalysisRetrieveActionRequest; } public void setCustomerCaseRootCauseAnalysisRetrieveActionRequest(String customerCaseRootCauseAnalysisRetrieveActionRequest) { this.customerCaseRootCauseAnalysisRetrieveActionRequest = customerCaseRootCauseAnalysisRetrieveActionRequest; } /** * Get customerCaseRootCauseAnalysisInstanceReportRecord * @return customerCaseRootCauseAnalysisInstanceReportRecord **/ public CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceReportRecord getCustomerCaseRootCauseAnalysisInstanceReportRecord() { return customerCaseRootCauseAnalysisInstanceReportRecord; } public void setCustomerCaseRootCauseAnalysisInstanceReportRecord(CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceReportRecord customerCaseRootCauseAnalysisInstanceReportRecord) { this.customerCaseRootCauseAnalysisInstanceReportRecord = customerCaseRootCauseAnalysisInstanceReportRecord; } /** * Get customerCaseRootCauseAnalysisInstanceAnalysis * @return customerCaseRootCauseAnalysisInstanceAnalysis **/ public CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceAnalysis getCustomerCaseRootCauseAnalysisInstanceAnalysis() { return customerCaseRootCauseAnalysisInstanceAnalysis; } public void setCustomerCaseRootCauseAnalysisInstanceAnalysis(CRCustomerCaseRootCauseAnalysisRetrieveInputModelCustomerCaseRootCauseAnalysisInstanceAnalysis customerCaseRootCauseAnalysisInstanceAnalysis) { this.customerCaseRootCauseAnalysisInstanceAnalysis = customerCaseRootCauseAnalysisInstanceAnalysis; } }
[ "spabandara@Virtusa.com" ]
spabandara@Virtusa.com
93fdef015bc659ccac9119d9cbcaecdcc115ced9
c1d427fef17eb89527630f2cd245eb7fe1a426cb
/com.wudsn.ide.asm/src/com/wudsn/ide/asm/compiler/CompilerOutputFolderMode.java
da050275558ef7d965172a7b2f867e66c42a5ed5
[]
no_license
napobear/wudsn-ide
bd4ccb7fd17935ee12272dd2ea6791cee5761f05
7bc6a0b750c94e1833f8da2098f5e6f3461551d7
refs/heads/master
2023-01-19T03:57:23.912463
2020-11-22T00:16:18
2020-11-22T00:16:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,399
java
/** * Copyright (C) 2009 - 2020 <a href="https://www.wudsn.com" target="_top">Peter Dell</a> * * This file is part of WUDSN IDE. * * WUDSN IDE 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. * * WUDSN IDE 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 WUDSN IDE. If not, see <http://www.gnu.org/licenses/>. */ package com.wudsn.ide.asm.compiler; import com.wudsn.ide.base.common.StringUtility; /** * The target directory mode controls which folder is use to create the binary * file in. * * @author Peter Dell */ public final class CompilerOutputFolderMode { /** * Creation is private. */ private CompilerOutputFolderMode() { } public final static String SOURCE_FOLDER = "SOURCE_FOLDER"; public final static String TEMP_FOLDER = "TEMP_FOLDER"; public final static String FIXED_FOLDER = "FIXED_FOLDER"; /** * Determines if the output folder mode is defined. * * @param outputFolderMode * The output folder mode, not <code>null</code>. * @return <code>true</code> if the output folder mode is not specified or * defined. */ public static boolean isDefined(String outputFolderMode) { if (outputFolderMode == null) { throw new IllegalArgumentException("Parameter 'outputFolderMode' must not be null."); } if (StringUtility.isEmpty(outputFolderMode)) { return true; } if (outputFolderMode.equals(SOURCE_FOLDER) || outputFolderMode.equals(TEMP_FOLDER) || outputFolderMode.equals(FIXED_FOLDER)) { return true; } return false; } /** * Gets the comma separated list of allowed values. * * @return The comma separated list of allowed values, not <code>null</code> * . */ public static String getAllowedValues() { return SOURCE_FOLDER + ", " + TEMP_FOLDER + ", " + FIXED_FOLDER; } }
[ "jac@wudsn.com" ]
jac@wudsn.com
febbfe55343703121236b3fe6b71d7e7abb59ba0
65d0f56563ec5686bdfb133451071cbe68c10c69
/javaexam/src/main/java/my/examples/javaexam/GoodsExam2.java
77edf938ea8859b09a69a9fbbf591c9bc2ddabea
[]
no_license
kim-daeyong/web-learning
85bb393212bda2d56d53801b6b2468cd48a839dd
25e1545d3c0ab3a9221aee4c8e6eea5c522728d5
refs/heads/master
2020-04-18T02:05:38.710801
2019-02-13T13:57:45
2019-02-13T13:57:45
167,147,087
0
0
null
null
null
null
UTF-8
Java
false
false
1,404
java
package my.examples.javaexam; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; public class GoodsExam2 { public static void main(String[] args){ Goods g1 = new Goods(1, "java", 1000); Goods g2 = new Goods(1, "java", 1000); Goods g3 = new Goods(2, "jsp", 5000); Goods g4 = new Goods(3, "spring", 500); List<Goods> list = new ArrayList<>(); list.add(g1); list.add(g2); list.add(g3); list.add(g4); System.out.println("------------------"); Collections.sort(list); for(Goods goods : list){ System.out.println(goods); } System.out.println("-------------------"); Collections.sort(list, new NameComparator()); for(Goods goods : list){ System.out.println(goods); } System.out.println("-------------------"); // 이름 없는 객체 를 생성하는 방법 // 람다 인터페이스 // 람다 식 Collections.sort(list, (o1, o2)->{return o1.getName().compareTo(o2.getName());}); for(Goods goods : list){ System.out.println(goods); } } } class NameComparator implements Comparator<Goods>{ @Override public int compare(Goods o1, Goods o2) { return o1.getName().compareTo(o2.getName()); } }
[ "urstory@gmail.com" ]
urstory@gmail.com
048874a99733ad536eb9f3f6a4c1cc0f60819116
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/org/jetbrains/anko/UiKt.java
4223d7966d22290ce656a4a29b405a44bbbe9821
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
package org.jetbrains.anko; import android.view.View; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; import org.jetbrains.anko.internals.AnkoInternals; @Metadata(mo51341bv = {1, 0, 1}, mo51342d1 = {"\u0000\u0016\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u001a2\u0010\u0000\u001a\u0002H\u0001\"\b\b\u0000\u0010\u0001*\u00020\u0002*\u0002H\u00012\u0014\b\b\u0010\u0003\u001a\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00050\u0004H†\b¢\u0006\u0002\u0010\u0006¨\u0006\u0007"}, mo51343d2 = {"applyRecursively", "T", "Landroid/view/View;", "f", "Lkotlin/Function1;", "", "(Landroid/view/View;Lkotlin/jvm/functions/Function1;)Landroid/view/View;", "commons_release"}, mo51344k = 2, mo51345mv = {1, 1, 5}) /* compiled from: Ui.kt */ public final class UiKt { public static final <T extends View> T applyRecursively(T t, Function1<? super View, Unit> function1) { Intrinsics.checkParameterIsNotNull(t, "$receiver"); Intrinsics.checkParameterIsNotNull(function1, "f"); AnkoInternals.INSTANCE.applyRecursively(t, function1); return t; } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
d96c6975bb27d4cf255d100092346bf5d726a596
10c96edfa12e1a7eef1caf3ad1d0e2cdc413ca6f
/src/main/resources/projs/JSQL_parent/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperator.java
db1edb369d49e048112a8146f349afe574dd4603
[ "Apache-2.0" ]
permissive
Gu-Youngfeng/EfficiencyMiner
c17c574e41feac44cc0f483135d98291139cda5c
48fb567015088f6e48dfb964a4c63f2a316e45d4
refs/heads/master
2020-03-19T10:06:33.362993
2018-08-01T01:17:40
2018-08-01T01:17:40
136,343,802
0
0
Apache-2.0
2018-08-01T01:17:41
2018-06-06T14:51:55
Java
UTF-8
Java
false
false
1,748
java
/* * #%L * JSQLParser library * %% * Copyright (C) 2004 - 2013 JSQLParser * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 2.1 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 Lesser Public License for more details. * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-2.1.html>. * #L% */ package net.sf.jsqlparser.expression.operators.relational; import net.sf.jsqlparser.expression.BinaryExpression; import net.sf.jsqlparser.expression.ExpressionVisitor; public class RegExpMatchOperator extends BinaryExpression { private RegExpMatchOperatorType operatorType; public RegExpMatchOperator(RegExpMatchOperatorType operatorType) { if (operatorType == null) { throw new NullPointerException(); } this.operatorType = operatorType; } public RegExpMatchOperatorType getOperatorType() { return operatorType; } @Override public void accept(ExpressionVisitor expressionVisitor) { expressionVisitor.visit(this); } @Override public String getStringExpression() { switch (operatorType) { case MATCH_CASESENSITIVE: return "~"; case MATCH_CASEINSENSITIVE: return "~*"; case NOT_MATCH_CASESENSITIVE: return "!~"; case NOT_MATCH_CASEINSENSITIVE: return "!~*"; default: break; } return null; } }
[ "yongfeng_gu@163.com" ]
yongfeng_gu@163.com
489dc77ae253fc3df52bc60340c16e379f08af50
8155f562d225f6109c8dfacadb026e393d869b38
/src/_16_Encapsulation/Ex8/Employees.java
4ff7e9ee3fc2a3260de720293b85d432135ef442
[]
no_license
MYBim/Summer2021Practice
f602b1c6733b371f50c9a36ba96678311ed6ff73
4e10042c9cab3e3a49fc6e8df5abc66d7d864908
refs/heads/master
2023-08-10T20:20:10.363190
2021-09-26T20:49:39
2021-09-26T20:49:39
410,659,214
0
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package _16_Encapsulation.Ex8; import java.time.LocalDate; import java.time.format.DateTimeFormatter; class Employees { private String name; private String dob; // doğum tarihi private int salary; public int YasHesapla(String dob) { DateTimeFormatter format = DateTimeFormatter.ofPattern("MM/dd/yyyy"); LocalDate dTarih = LocalDate.parse(dob, format); LocalDate bugun = LocalDate.now(); // Period fark = Period.between(tarih,bugun); // int yas = fark.getYears(); int yas = bugun.getYear() - dTarih.getYear(); return yas; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getSalary() { return salary; } public void setSalary(int salary) { this.salary = salary; } public String getDob() { return dob; } public void setDob(String dob) { this.dob = dob; } }
[ "you@example.com" ]
you@example.com
0b8166a6ab03e7323881e4e3188b2a699d810d74
05cb7fbdfbc22a4bf4a6e7810673ae4dffd3bc8f
/util/src/main/java/com/liferay/faces/util/jsp/RequestScopeEntry.java
02af02504402493620d7b2a9c0c750da17f055df
[]
no_license
thomassadowsky/liferay-faces
e1224272f2972b91de48e761b985c03a085b2a0a
018f2377231721e207d8fa5e3cfccce635a06e0b
refs/heads/master
2021-01-24T23:11:58.913232
2019-09-25T09:07:33
2019-09-25T09:07:33
15,863,183
0
0
null
null
null
null
UTF-8
Java
false
false
1,297
java
/** * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library 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 Lesser General Public License for more * details. */ package com.liferay.faces.util.jsp; import javax.servlet.http.HttpServletRequest; import com.liferay.faces.util.map.AbstractPropertyMapEntry; /** * @author Neil Griffin */ public class RequestScopeEntry extends AbstractPropertyMapEntry<Object> { // Private Data Members private HttpServletRequest httpServletRequest; public RequestScopeEntry(HttpServletRequest httpServletRequest, String key) { super(key); this.httpServletRequest = httpServletRequest; } public Object getValue() { return httpServletRequest.getAttribute(getKey()); } public Object setValue(Object value) { Object oldValue = getValue(); httpServletRequest.setAttribute(getKey(), value); return oldValue; } }
[ "neil.griffin.scm@gmail.com" ]
neil.griffin.scm@gmail.com
8cbb352dfc465aac1a69f44b058106b2affc463a
32f66e3b83033f3a2399da564de25706e2b54cf9
/src/atguigu/singleton/type2/SingletonTest02.java
a30c6f58a2459e5503f70e7661b047861580e017
[]
no_license
qingziguanjun/designpattern
a72046b4428f84990ed2ef542109c77c2ff3fe1a
fe7ae24c673c8b9f474161da2f4f9f388571c656
refs/heads/master
2021-01-14T05:25:17.094760
2020-02-24T00:12:53
2020-02-24T00:12:53
242,612,002
0
0
null
null
null
null
UTF-8
Java
false
false
930
java
package atguigu.singleton.type2; public class SingletonTest02 { public static void main(String[] args) { //���� Singleton instance = Singleton.getInstance(); Singleton instance2 = Singleton.getInstance(); System.out.println(instance == instance2); // true System.out.println("instance.hashCode=" + instance.hashCode()); System.out.println("instance2.hashCode=" + instance2.hashCode()); } } //����ʽ(��̬����) class Singleton { //1. ������˽�л�, �ⲿ��new private Singleton() { } //2.�����ڲ���������ʵ�� private static Singleton instance; static { // �ھ�̬������У������������� instance = new Singleton(); } //3. �ṩһ�����еľ�̬����������ʵ������ public static Singleton getInstance() { return instance; } }
[ "songyi@meituan.com" ]
songyi@meituan.com
115a2fab905d60480899c26fd36a1f44dbc1d3cb
4a015f5a9b655f027a4d4e04fdc926bb893d093d
/api-gateway/src/main/java/mk/ukim/finki/apigateway/web/rest/vm/LoginVM.java
c8892aac3185bc82898c96981c4c2850edb305f1
[ "MIT" ]
permissive
kirkovg/university-microservices
cd1bfe8f92dba3b422c56903b972a2aa9f0b45c7
2c8db22c3337014e3a8aa5de3e6a1a32d35c9ba0
refs/heads/master
2021-12-26T13:05:05.598702
2018-09-11T18:53:35
2018-09-11T18:53:35
147,234,534
0
0
MIT
2021-08-12T22:16:40
2018-09-03T17:25:19
Java
UTF-8
Java
false
false
1,123
java
package mk.ukim.finki.apigateway.web.rest.vm; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** * View Model object for storing a user's credentials. */ public class LoginVM { @NotNull @Size(min = 1, max = 50) private String username; @NotNull @Size(min = ManagedUserVM.PASSWORD_MIN_LENGTH, max = ManagedUserVM.PASSWORD_MAX_LENGTH) private String password; private Boolean rememberMe; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Boolean isRememberMe() { return rememberMe; } public void setRememberMe(Boolean rememberMe) { this.rememberMe = rememberMe; } @Override public String toString() { return "LoginVM{" + "username='" + username + '\'' + ", rememberMe=" + rememberMe + '}'; } }
[ "gjorgjikirkov@gmail.com" ]
gjorgjikirkov@gmail.com
a8c5575ffec8e6c64fd27c69c0fbe7b74a2f7627
42fd92414ad5bc6d01a201f996d77b11b18b36b0
/common/src/main/java/com/serenegiant/math/SphereBounds.java
1821ef78818245a161b0e2c8acb951e2bb70be83
[ "Apache-2.0" ]
permissive
wangruoyudev/libcommon
fe4689d1cd6cb437cf137d3dd14b86f804c06942
216f21ef6d3ddc9b8d33464d73d49e6789e209c9
refs/heads/master
2020-12-04T17:58:52.446146
2019-12-17T20:46:28
2019-12-17T20:46:28
231,860,088
1
0
Apache-2.0
2020-01-05T03:04:53
2020-01-05T03:04:53
null
UTF-8
Java
false
false
1,184
java
package com.serenegiant.math; /* * libcommon * utility/helper classes for myself * * Copyright (c) 2014-2019 saki t_saki@serenegiant.com * * 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. */ /** * 球オブジェクト(3D) */ public class SphereBounds extends CircleBounds { /** * */ private static final long serialVersionUID = 5374122610666117206L; public SphereBounds(final float x, final float y, final float z, final float radius) { super(x, y, z, radius); } public SphereBounds(final float x, final float y, final float radius) { super(x, y, radius); } public SphereBounds(final Vector v, final float radius) { super(v, radius); } }
[ "saki4510t@gmail.com" ]
saki4510t@gmail.com
eb44381f9182e69f4bcdd43ad421c0ae8eca0113
cb0e7d6493b23e870aa625eb362384a10f5ee657
/solutions/java/0788.java
9e0c707c475c7d4c153400f6c1030b4aba405a2c
[]
no_license
sweetpand/LeetCode-1
0acfa603af254a3350d457803449a91322f2d1a7
65f4ef26cb8b2db0b4bf8c42bfdc76421b479f94
refs/heads/master
2022-11-14T07:01:42.502172
2020-07-12T12:25:56
2020-07-12T12:25:56
279,088,171
1
0
null
2020-07-12T15:03:20
2020-07-12T15:03:19
null
UTF-8
Java
false
false
504
java
class Solution { public int rotatedDigits(int N) { int ans = 0; for (int i = 1; i <= N; ++i) if (isGoodNumber(i)) ++ans; return ans; } private boolean isGoodNumber(int i) { boolean isRotated = false; for (char c : String.valueOf(i).toCharArray()) { if (c == '0' || c == '1' || c == '8') continue; if (c == '2' || c == '5' || c == '6' || c == '9') isRotated = true; else return false; } return isRotated; } }
[ "walkccray@gmail.com" ]
walkccray@gmail.com
d10c215e5e7fca3a87dff47f91eb7342a665eb8e
143ff4134e02faa2316a869943b1070bd30b6183
/compent/entity-model/src/main/java/com/hryj/entity/vo/staff/storewarehouse/response/PartySearchItemResponseVO.java
55cf6357cde024fc2c2702127d7a9d7e87839b35
[]
no_license
newbigTech/hryj-mall
da243731c68f13ab298291f5029aff9be441bb26
c28ae0c83f418ba0fc82086a44b47ca787c4d2a4
refs/heads/master
2020-04-28T08:51:18.777531
2018-11-28T05:31:35
2018-11-28T05:31:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,069
java
package com.hryj.entity.vo.staff.storewarehouse.response; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @author 王光银 * @className: PartySearchItemResponseVO * @description: * @create 2018/6/27 0027 16:15 **/ @ApiModel(value = "门店或仓库查询条目响应VO", description = "门店或仓库查询条目响应VO") @Data public class PartySearchItemResponseVO { @ApiModelProperty(value = "门店或仓库的ID") private Long party_id; @ApiModelProperty(value = "门店或仓库的名称") private String party_name; @ApiModelProperty(value = "店长姓名,只有查询类型为门店时该字段有值") private String party_leader; @ApiModelProperty(value = "商品数量, 该字段暂不统计") private Integer product_total_num; @ApiModelProperty(value = "所在省") private String province; @ApiModelProperty(value = "所在市") private String city; @ApiModelProperty(value = "所在区") private String area; }
[ "wushiqiani@adtech.com.cn" ]
wushiqiani@adtech.com.cn
90311f410bf207233c6986690838a2e5f9b610d8
4f58a60cc9399f48d958590dc872ecfae431b866
/server/runtime/src/main/java/org/infinispan/server/configuration/security/TrustStoreRealmConfiguration.java
2849cd2d29e4ffd94638abca9c61a57e790ca476
[ "Apache-2.0", "LicenseRef-scancode-dco-1.1" ]
permissive
wfink/infinispan
528e16f1f8737886e55539b990ba93fcb8244a4a
04cc9fd806c820a550d3890470c00f780532fad3
refs/heads/master
2023-05-25T19:53:22.274511
2021-06-03T14:29:01
2021-06-10T09:20:27
254,347,412
2
0
Apache-2.0
2020-04-09T11:02:12
2020-04-09T11:02:11
null
UTF-8
Java
false
false
1,363
java
package org.infinispan.server.configuration.security; import org.infinispan.commons.configuration.ConfigurationInfo; import org.infinispan.commons.configuration.attributes.AttributeDefinition; import org.infinispan.commons.configuration.attributes.AttributeSet; import org.infinispan.commons.configuration.elements.DefaultElementDefinition; import org.infinispan.commons.configuration.elements.ElementDefinition; import org.infinispan.server.configuration.Element; /** * @since 10.0 */ public class TrustStoreRealmConfiguration implements ConfigurationInfo { static final AttributeDefinition<String> NAME = AttributeDefinition.builder("name", null, String.class).build(); static AttributeSet attributeDefinitionSet() { return new AttributeSet(TrustStoreRealmConfiguration.class, NAME); } private static ElementDefinition ELEMENT_DEFINITION = new DefaultElementDefinition(Element.TRUSTSTORE_REALM.toString()); private final AttributeSet attributes; TrustStoreRealmConfiguration(AttributeSet attributes) { this.attributes = attributes.checkProtection(); } @Override public ElementDefinition getElementDefinition() { return ELEMENT_DEFINITION; } public String name() { return attributes.attribute(NAME).get(); } @Override public AttributeSet attributes() { return attributes; } }
[ "remerson@redhat.com" ]
remerson@redhat.com
313f912a16cdf145f24e2d1bee92f09ea02b0e55
cedcb6da09c5d4527d8d7f6d3b811c37c5e0c4fb
/homework8-bookservice/src/test/java/ua/edu/ukma/krukovska/bookservice/BookControllerTest.java
01646978400fa02ec32d5f9286e7e8fc2a649a45
[]
no_license
YanaKrukovska/javaee-course
91673a6808ed50b726617057dd241f67ed7b9904
089accae1f69a8f603172186e3d106b06df181a2
refs/heads/master
2023-04-04T15:18:36.565608
2021-04-03T14:05:08
2021-04-03T14:05:08
340,674,976
0
0
null
null
null
null
UTF-8
Java
false
false
2,835
java
package ua.edu.ukma.krukovska.bookservice; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.SneakyThrows; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import ua.edu.ukma.krukovska.bookservice.controller.BookController; import ua.edu.ukma.krukovska.bookservice.persistence.model.Book; import java.util.Collections; import static org.hamcrest.Matchers.is; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @WebMvcTest(BookController.class) class BookControllerTest { @Autowired private MockMvc mockMvc; @Autowired private ObjectMapper objectMapper; @Test @SneakyThrows void addBookSuccess() { Book newBook = new Book("Grapes of Wrath", "John Steinbeck", "978-123-45-7611-9"); mockMvc.perform(MockMvcRequestBuilders .post("/book") .contentType("application/json") .content(objectMapper.writeValueAsString(newBook))) .andExpect(status().isOk()) .andExpect(jsonPath("$.title", is("Grapes of Wrath"))); } @Test @SneakyThrows void searchBookSuccess() { final String expectedResponse = objectMapper.writeValueAsString(Collections.singletonList(new Book("Flowers for Algernon", "Daniel Keyes", "978-617-12-7611-6"))); mockMvc.perform( get("/book") .param("searchInput", "for") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(MockMvcResultMatchers.content().json(expectedResponse)); } @Test @SneakyThrows void searchBookEmpty() { mockMvc.perform( get("/book") .param("searchInput", "zebra") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(MockMvcResultMatchers.content().json(objectMapper.writeValueAsString(Collections.emptyList()))); } @Test @SneakyThrows void getAllBooks() { mockMvc.perform( get("/book/all") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()); } }
[ "jana.krua@gmail.com" ]
jana.krua@gmail.com
7c0c174fc36b19636a6a711426c1a98e1ab2091d
c72ccbe1af2f1477dc9377c6358eb64681d9d4c6
/VPDT1/app/src/main/java/com/vpdt/vpdt/presenter/TTVBDSVBQuaHanView.java
b30b2186c2f0a44a3001de94c9da3040d0da65e2
[]
no_license
namtv1997/Vdt
6fefaf3ecafb01dbc964fba75b8a516c8c4f58bd
82cb043b29873352a32c366245e643b2dd3d6d22
refs/heads/master
2021-02-28T01:10:22.020421
2020-03-07T14:48:35
2020-03-07T14:48:35
245,649,933
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package com.vpdt.vpdt.presenter; import android.content.Context; import com.vpdt.vpdt.base.BaseView; import com.vpdt.vpdt.model.DetailVanBanQuahan; public interface TTVBDSVBQuaHanView extends BaseView<TTVBDSVBQuaHanPresenter> { Context gContext(); void onGetDataSuccess(DetailVanBanQuahan detailVanBanQuahan); }
[ "nam.ta.intern@ntq-solution.com.vn" ]
nam.ta.intern@ntq-solution.com.vn
86935cb5c20c6c91914b136d6be502b33f2e1d2a
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
/src/main/java/com/alipay/api/domain/ZhimaCreditScoreBriefGetModel.java
4133aaaf9390b833adc077a2603a08199a295e3c
[ "Apache-2.0" ]
permissive
zhangpo/alipay-sdk-java-all
13f79e34d5f030ac2f4367a93e879e0e60f335f7
e69305d18fce0cc01d03ca52389f461527b25865
refs/heads/master
2022-11-04T20:47:21.777559
2020-06-15T08:31:02
2020-06-15T08:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,846
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 芝麻信用评分普惠版 * * @author auto create * @since 1.0, 2018-03-14 21:12:30 */ public class ZhimaCreditScoreBriefGetModel extends AlipayObject { private static final long serialVersionUID = 8628695737336826614L; /** * 350~950之间 业务判断的准入标准 建议业务确定一个稳定的判断标准 频繁的变更该标准可能导致接口被停用 */ @ApiField("admittance_score") private Long admittanceScore; /** * 对应的证件号(未脱敏)或支付宝uid */ @ApiField("cert_no") private String certNo; /** * 证件类型 目前支持三种IDENTITY_CARD(身份证),PASSPORT(护照),ALIPAY_USER_ID(支付宝uid) */ @ApiField("cert_type") private String certType; /** * 芝麻平台服务商模式下的二级商户标识,如果是直连商户调用该接口,不需要设置 */ @ApiField("linked_merchant_id") private String linkedMerchantId; /** * 用户姓名 当证件类型为ALIPAY_USER_ID时不需要传入 */ @ApiField("name") private String name; /** * 产品码,直接使用[示例]给出的值 */ @ApiField("product_code") private String productCode; /** * 商户请求的唯一标志,64位长度的字母数字下划线组合。该标识作为对账的关键信息,商户要保证其唯一性,对于用户使用相同transaction_id的查询,芝麻在一天(86400秒)内返回首次查询数据,超过有效期的查询即为无效并返回异常,有效期内的重复查询不重新计费 */ @ApiField("transaction_id") private String transactionId; public Long getAdmittanceScore() { return this.admittanceScore; } public void setAdmittanceScore(Long admittanceScore) { this.admittanceScore = admittanceScore; } public String getCertNo() { return this.certNo; } public void setCertNo(String certNo) { this.certNo = certNo; } public String getCertType() { return this.certType; } public void setCertType(String certType) { this.certType = certType; } public String getLinkedMerchantId() { return this.linkedMerchantId; } public void setLinkedMerchantId(String linkedMerchantId) { this.linkedMerchantId = linkedMerchantId; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getProductCode() { return this.productCode; } public void setProductCode(String productCode) { this.productCode = productCode; } public String getTransactionId() { return this.transactionId; } public void setTransactionId(String transactionId) { this.transactionId = transactionId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
017bdadf7d5fdde3d0b36328ec515debbb48d524
7bb5f71038ba55317b1e329dcdcd04e748f6d8a6
/src/main/java/com/quebrada/utils/DownloadImage.java
0d224ff6b20f17299c9589703412ed9353bea004
[ "MIT" ]
permissive
nickChenyx/quebrada
8e9440ebe4e59ea10f4621e9e8875f36e96b3c4f
1cdc98c3a4f394ee06d11998465936ca4a3ba87d
refs/heads/master
2021-05-03T22:18:37.539033
2018-02-06T02:38:00
2018-02-06T02:38:00
120,391,411
0
0
null
null
null
null
UTF-8
Java
false
false
2,338
java
package com.quebrada.utils; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.google.common.base.Strings; import com.google.common.io.ByteStreams; import com.google.common.io.Closer; import com.google.common.io.Files; /** * 下载图片到指定目录 * * @author huchengyi * */ public class DownloadImage { private static Log log = LogFactory.getLog(DownloadImage.class); /** * 下载图片到指定目录 * * @param parentPath 指定目录 * @param imgUrl 图片地址 * @return 下载文件地址 */ public static String download(String parentPath, String imgUrl) { if(Strings.isNullOrEmpty(imgUrl) || Strings.isNullOrEmpty(parentPath)) { return null; } if(imgUrl.length() > 500) { return null; } Closer closer = Closer.create(); try { File imageDir = new File(parentPath); if(!imageDir.exists()) { imageDir.mkdirs(); } String fileName = StringUtils.substringBefore(imgUrl, "?"); fileName = StringUtils.substringAfterLast(fileName, "/"); File imageFile = new File(imageDir, fileName); InputStream in = closer.register(new URL(imgUrl).openStream()); Files.write(ByteStreams.toByteArray(in), imageFile); return imageFile.getAbsolutePath(); } catch(Exception ex) { ex.printStackTrace(); log.error("image download error :"+imgUrl); return null; } finally { try { closer.close(); } catch (IOException e) { closer = null; } } } public static String download(String parentPath, String fileName, InputStream in) { Closer closer = Closer.create(); try { File imageDir = new File(parentPath); if(!imageDir.exists()) { imageDir.mkdirs(); } File imageFile = new File(imageDir, fileName); Files.write(ByteStreams.toByteArray(in), imageFile); return imageFile.getAbsolutePath(); } catch(Exception ex) { ex.printStackTrace(); return null; } finally { try { closer.close(); } catch (IOException e) { closer = null; } } } public static void main(String[] args) { System.out.println(DownloadImage.download("d:\\", "http://git.oschina.net/uploads/78/666978_xtuhcy.jpg?1459474621")); } }
[ "nickChenyx@gmail.com" ]
nickChenyx@gmail.com
12866d4f5ab0d7dfec573b41d564c56b19e02ecf
13200e547eec0d67ff9da9204c72ab26a93f393d
/src/com/android/launcher3/CellLayout$1.java
8259c1d5d690ac7140de664982fed31e85bf1487
[]
no_license
emtee40/DecompiledPixelLauncher
d72d107eaafb42896aa903b9f0f34f5f09f5a15c
fb954b108a7bf3377da5c28fd9a2f22e1b6990ea
refs/heads/master
2020-04-03T03:18:06.239632
2018-01-19T08:49:36
2018-01-19T08:49:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,059
java
// // Decompiled by Procyon v0.5.30 // package com.android.launcher3; import android.graphics.Bitmap; import android.animation.ValueAnimator; import android.animation.ValueAnimator$AnimatorUpdateListener; final class CellLayout$1 implements ValueAnimator$AnimatorUpdateListener { final /* synthetic */ CellLayout this$0; final /* synthetic */ InterruptibleInOutAnimator val$anim; final /* synthetic */ int val$thisIndex; CellLayout$1(final CellLayout this$0, final InterruptibleInOutAnimator val$anim, final int val$thisIndex) { this.this$0 = this$0; this.val$anim = val$anim; this.val$thisIndex = val$thisIndex; } public void onAnimationUpdate(final ValueAnimator valueAnimator) { if (this.val$anim.getTag() == null) { valueAnimator.cancel(); } else { this.this$0.mDragOutlineAlphas[this.val$thisIndex] = (float)valueAnimator.getAnimatedValue(); this.this$0.invalidate(this.this$0.mDragOutlines[this.val$thisIndex]); } } }
[ "azaidi@live.nl" ]
azaidi@live.nl
d315040b5eda17c90f60a750bc244025842b44f0
0c8bfdd937086fc96f98e91c8c21dd9dd1841a39
/boleto-api/src/test/java/br/com/boletoapi/boleto/entities/BoletoTest.java
2f74e279eb128bc8e7779e8f755eb645027eb006
[]
no_license
guilhermebotossi/glowing-waffle
89dd4ae65763f38eba84b8d3341d952158f62f88
eb21c10b1605f2006f11f0c05ba64d71d35d4a40
refs/heads/master
2020-03-15T09:11:39.241200
2018-05-10T05:50:57
2018-05-10T05:50:57
132,069,268
0
1
null
null
null
null
UTF-8
Java
false
false
1,521
java
package br.com.boletoapi.boleto.entities; import static org.junit.Assert.assertSame; import java.sql.Date; import java.util.UUID; import org.junit.Before; import org.junit.Test; import br.com.boletoapi.boleto.enums.BoletoStatus; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; public class BoletoTest { private Boleto boleto; @Before public void init() { boleto = new Boleto(); } @Test public void idTest() { UUID id = UUID.fromString("8c9f029f-53d2-4f75-8cf5-75a13c4046e3"); boleto.setId(id); assertSame(id, boleto.getId()); } @Test public void dueDateTest() { Date d = Date.valueOf("2018-05-04"); boleto.setDueDate(d); assertSame(d, boleto.getDueDate()); } @Test public void totalInCentsTest() { Integer totalInCents = 5000; boleto.setTotalInCents(totalInCents); assertSame(totalInCents, boleto.getTotalInCents()); } @Test public void statusTest() { BoletoStatus status = BoletoStatus.PENDING; boleto.setStatus(status);; assertSame(status, boleto.getStatus()); } @Test public void customerTest() { String customer = "customer 1"; boleto.setCustomer(customer); assertSame(customer, boleto.getCustomer()); } @Test public void equalsTest() { EqualsVerifier.forClass(Boleto.class) .withPrefabValues(Date.class, Date.valueOf("2018-05-04"),Date.valueOf("2018-04-03")) .suppress(Warning.STRICT_INHERITANCE, Warning.NONFINAL_FIELDS) .withOnlyTheseFields("id") .verify(); } }
[ "guilhermebotossi@gmail.com" ]
guilhermebotossi@gmail.com
025f335eef0e81e35dab39660b8f74e30894cf85
3a24d428506109c3d4f0db5c71b785742a33bc44
/core/src/main/java/com/github/thorbenkuck/keller/sync/AbstractCountDownLatchSynchronize.java
624e762e11f57fa976312dacd73468fedaefa415
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
ThorbenKuck/Keller
2ec3ed34f716c3e8a0e13e4b118764921b96a7fa
1abe6548717b0a7da1e3752e4861eaad98a7ccda
refs/heads/master
2021-03-19T08:17:52.077024
2019-07-31T15:58:09
2019-07-31T15:58:09
89,494,621
0
0
Apache-2.0
2020-10-13T03:42:18
2017-04-26T15:05:34
Java
UTF-8
Java
false
false
1,391
java
package com.github.thorbenkuck.keller.sync; import com.github.thorbenkuck.keller.annotations.Asynchronous; import java.util.concurrent.CountDownLatch; public abstract class AbstractCountDownLatchSynchronize implements Synchronize { protected final int numberOfActions; protected CountDownLatch countDownLatch; protected AbstractCountDownLatchSynchronize() { this(1); } protected AbstractCountDownLatchSynchronize(final int numberOfActions) { if (numberOfActions < 1) { throw new IllegalArgumentException("Number of actions cannot be smaller than 1!"); } this.numberOfActions = numberOfActions; this.countDownLatch = new CountDownLatch(numberOfActions); } @Asynchronous @Override public void synchronize() throws InterruptedException { if(getCount() != 0) { countDownLatch.await(); } } @Asynchronous @Override public void goOn() { synchronized (this) { countDownLatch.countDown(); } } @Asynchronous @Override public void reset() { long count = getCount(); while (count > 0) { goOn(); synchronized(this) { count = getCount(); } } synchronized (this) { countDownLatch = new CountDownLatch(numberOfActions); } } protected final long getCount() { long count; synchronized(this) { if(countDownLatch == null) { count = 0; } else { count = countDownLatch.getCount(); } } return count; } }
[ "thorben.kuck@gmail.com" ]
thorben.kuck@gmail.com
213b39d39e288b4cf28292ec2feefd53c19d190b
3ed6ef9ac5e0704d2418fad0cfb44e3097792539
/chapter01/src/test/java/com/blogspot/toomuchcoding/book/chapter1/_5_AddingMockitoHintsToExceptionMessages/consolespamming/hamcrest/MeanTaxFactorCalculatorTest.java
36ec3255b794d7ab1444c14e8f1f6f568bb7a1d6
[ "Apache-2.0" ]
permissive
a5535772/mockito-cookbook
6655967798eb90e283e2738acc6cee63ec173a1a
54350c74741d26d8750990b33631ba75f3b751c9
refs/heads/master
2020-03-18T11:54:54.597899
2018-05-25T03:28:58
2018-05-25T03:28:58
134,697,791
0
0
Apache-2.0
2018-05-24T10:11:34
2018-05-24T10:11:34
null
UTF-8
Java
false
false
1,452
java
package com.blogspot.toomuchcoding.book.chapter1._5_AddingMockitoHintsToExceptionMessages.consolespamming.hamcrest; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.*; import static org.mockito.BDDMockito.*; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.mockito.runners.ConsoleSpammingMockitoJUnitRunner; import com.blogspot.toomuchcoding.book.chapter1._5_AddingMockitoHintsToExceptionMessages.MeanTaxFactorCalculator; import com.blogspot.toomuchcoding.book.chapter1._5_AddingMockitoHintsToExceptionMessages.TaxService; import com.blogspot.toomuchcoding.person.Person; @RunWith(ConsoleSpammingMockitoJUnitRunner.class) public class MeanTaxFactorCalculatorTest { /** * ConsoleSpammingMockitoJUnitRunner appends a listener that logs additional warning messages to the console */ static final double UNUSED_VALUE = 10; @Test(expected = AssertionError.class) public void should_calculate_mean_tax_factor() { // given TaxService taxService = given(Mockito.mock(TaxService.class).performAdditionalCalculation()).willReturn(UNUSED_VALUE).getMock(); MeanTaxFactorCalculator systemUnderTest = new MeanTaxFactorCalculator(taxService); // when double meanTaxFactor = systemUnderTest.calculateMeanTaxFactorFor(new Person()); // then assertThat(meanTaxFactor, equalTo(UNUSED_VALUE)); } }
[ "marcin@grzejszczak.pl" ]
marcin@grzejszczak.pl
2ab866e1a98c2256aa84fc6ccdb69f9ac52a7b76
7d98539272751bbafc0dd9c84400a8e424e5b968
/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticViewType.java
62a4c1b91f86703891acda45539c49755e54fe19
[ "Apache-2.0" ]
permissive
GeorgiMinkov/jOOQ
08e79a3b9231272d350e06ad45f09a071ad86df5
80d6967f1599c0a076ef47806958f35037cfb865
refs/heads/main
2023-09-03T02:24:19.666912
2021-11-19T16:15:16
2021-11-19T16:15:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,709
java
package org.jooq.meta.jaxb; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.jooq.util.jaxb.tools.StringAdapter; import org.jooq.util.jaxb.tools.XMLAppendable; import org.jooq.util.jaxb.tools.XMLBuilder; /** * <p>Java class for SyntheticViewType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SyntheticViewType"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;all&gt; * &lt;element name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;element name="comment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="sql" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;/all&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SyntheticViewType", propOrder = { }) @SuppressWarnings({ "all" }) public class SyntheticViewType implements Serializable, XMLAppendable { private final static long serialVersionUID = 31600L; @XmlJavaTypeAdapter(StringAdapter.class) protected String catalog; @XmlJavaTypeAdapter(StringAdapter.class) protected String schema; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlJavaTypeAdapter(StringAdapter.class) protected String comment; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String sql; /** * The defining catalog of the view. * */ public String getCatalog() { return catalog; } /** * The defining catalog of the view. * */ public void setCatalog(String value) { this.catalog = value; } /** * The defining schema of the view. * */ public String getSchema() { return schema; } /** * The defining schema of the view. * */ public void setSchema(String value) { this.schema = value; } /** * The defining name of the view. * */ public String getName() { return name; } /** * The defining name of the view. * */ public void setName(String value) { this.name = value; } /** * The defining comment on the view. * */ public String getComment() { return comment; } /** * The defining comment on the view. * */ public void setComment(String value) { this.comment = value; } /** * The defining SQL query. * */ public String getSql() { return sql; } /** * The defining SQL query. * */ public void setSql(String value) { this.sql = value; } /** * The defining catalog of the view. * */ public SyntheticViewType withCatalog(String value) { setCatalog(value); return this; } /** * The defining schema of the view. * */ public SyntheticViewType withSchema(String value) { setSchema(value); return this; } /** * The defining name of the view. * */ public SyntheticViewType withName(String value) { setName(value); return this; } /** * The defining comment on the view. * */ public SyntheticViewType withComment(String value) { setComment(value); return this; } /** * The defining SQL query. * */ public SyntheticViewType withSql(String value) { setSql(value); return this; } @Override public final void appendTo(XMLBuilder builder) { builder.append("catalog", catalog); builder.append("schema", schema); builder.append("name", name); builder.append("comment", comment); builder.append("sql", sql); } @Override public String toString() { XMLBuilder builder = XMLBuilder.nonFormatting(); appendTo(builder); return builder.toString(); } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass()!= that.getClass()) { return false; } SyntheticViewType other = ((SyntheticViewType) that); if (catalog == null) { if (other.catalog!= null) { return false; } } else { if (!catalog.equals(other.catalog)) { return false; } } if (schema == null) { if (other.schema!= null) { return false; } } else { if (!schema.equals(other.schema)) { return false; } } if (name == null) { if (other.name!= null) { return false; } } else { if (!name.equals(other.name)) { return false; } } if (comment == null) { if (other.comment!= null) { return false; } } else { if (!comment.equals(other.comment)) { return false; } } if (sql == null) { if (other.sql!= null) { return false; } } else { if (!sql.equals(other.sql)) { return false; } } return true; } @Override public int hashCode() { final int prime = 31; int result = 1; result = ((prime*result)+((catalog == null)? 0 :catalog.hashCode())); result = ((prime*result)+((schema == null)? 0 :schema.hashCode())); result = ((prime*result)+((name == null)? 0 :name.hashCode())); result = ((prime*result)+((comment == null)? 0 :comment.hashCode())); result = ((prime*result)+((sql == null)? 0 :sql.hashCode())); return result; } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
67cbd96192f9b82779cd1856d77bfa4e6e278583
71e42f1a9c6d2647954053da0c1a4558b67f7f04
/src/main/java/se/l4/jaiku/robot/JaikuPresenceFetcher.java
365618fe54d14c3a4c6b65f5f19a04a8564e9858
[]
no_license
aholstenson/jaikuarchive.com
fd5b2f4002f2ff0d0a2f3d1f005d0007cd3fba1e
dc295f676130b3c063a334e15083bc46462c5538
refs/heads/master
2021-01-13T01:40:24.360262
2012-01-07T10:08:53
2012-01-07T10:08:53
2,758,061
1
0
null
null
null
null
UTF-8
Java
false
false
1,547
java
package se.l4.jaiku.robot; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import se.l4.jaiku.model.Comment; import se.l4.jaiku.model.Presence; import com.google.gson.Gson; import com.google.gson.stream.JsonReader; /** * Fetcher for a users presence with comments. * * @author Andreas Holstenson * */ public class JaikuPresenceFetcher { private final Gson gson; public JaikuPresenceFetcher(Gson gson) { this.gson = gson; } public Presence fetchChannel(String channel, String id) throws IOException { return fetch("http://jaiku.com/channel/" + channel + "/presence/" + id + "/json"); } public Presence fetch(String user, String presence) throws IOException { return fetch("http://" + user + ".jaiku.com/presence/" + presence + "/json"); } public Presence fetch(String uri) throws IOException { URL url = new URL(uri); InputStream stream = url.openStream(); try { InputStreamReader reader = new InputStreamReader(stream); JsonReader jsonReader = new JsonReader(reader); jsonReader.setLenient(true); Presence presence = gson.fromJson(jsonReader, Presence.class); for(Comment c : presence.getComments()) { if(c.getContent() != null) { c.setContent(TextUpdater.updateLinks(c.getContent())); } if(c.getPrettyContent() != null) { c.setPrettyContent(TextUpdater.updateLinks(c.getPrettyContent())); } } return presence; } finally { stream.close(); } } }
[ "a@holstenson.se" ]
a@holstenson.se
04cd6967d8e5a140b0a703beef6f26da706d810f
50c937c8a203a5ca3a26f70980173a5a898da9e3
/l2gw-scripts/highfive/data/scripts/ai/BoxOfGiantsGuard.java
6e2942a1a6d6099c755522dea38a5aed85864c03
[]
no_license
gokusgit/hi5
b336cc8bf96b74cbd9419253444cf0a7df71a2fb
0345266a3cb3059b3e4e5ec31b59690af36e07fd
refs/heads/master
2020-07-10T23:33:14.500298
2019-08-26T07:41:18
2019-08-26T07:41:18
204,398,114
0
1
null
null
null
null
UTF-8
Java
false
false
431
java
package ai; import ru.l2gw.gameserver.ai.Mystic; import ru.l2gw.gameserver.model.L2Character; /** * @author: rage * @date: 31.08.2010 23:44:17 */ public class BoxOfGiantsGuard extends Mystic { public BoxOfGiantsGuard(L2Character actor) { super(actor); _thisActor.setImobilised(true); } @Override public boolean checkAggression(L2Character target) { return target.isPlayer() && super.checkAggression(target); } }
[ "46629361+gokusgit@users.noreply.github.com" ]
46629361+gokusgit@users.noreply.github.com
68a42c88099c013ba7a3210373c46452e5960a7d
df904a1c02c0c9adee2b0adeac78b85eab68f073
/biz.bi.vtcd/src/biz/bi/vtcd/editparts/VTCDLabelCellEditorLocator.java
0cdc038f1a849e0d0ce9ac211008dbc05606ca0f
[]
no_license
sergioemv/bin.rcp-plugin.casemakerVisual
2882e327442fe994fcf18aab6536f88cabdbc82c
19c4c23ff2be841e2c3f913bc01f39bd9273bf99
refs/heads/master
2023-04-01T12:29:41.859578
2021-04-07T23:59:58
2021-04-07T23:59:58
355,716,232
1
0
null
null
null
null
ISO-8859-1
Java
false
false
1,677
java
/** * * This Software has been developed by Business Software Innovations . * Copyright (c)2003 Díaz und Hilterscheid Unternehmensberatung. All rights reserved. */ package biz.bi.vtcd.editparts; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Label; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.tools.CellEditorLocator; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.swt.widgets.Text; import biz.bi.vtcd.figures.VTCDFixedWidthLabel; /** * @author svonborries * @09-08-2005 * @svonborries */ final public class VTCDLabelCellEditorLocator implements CellEditorLocator { /* (non-Javadoc) * @see org.eclipse.gef.tools.CellEditorLocator#relocate(org.eclipse.jface.viewers.CellEditor) */ protected IFigure fig; public VTCDLabelCellEditorLocator(IFigure Figure){ this.fig = Figure; } public void relocate(CellEditor p_celleditor) { Text text = (Text)p_celleditor.getControl(); Rectangle rec = fig.getClientArea(Rectangle.SINGLETON); if(this.fig instanceof VTCDFixedWidthLabel){ fig.translateToAbsolute(rec); org.eclipse.swt.graphics.Rectangle trim = text.computeTrim(0, 0, 0, 0); rec.translate(trim.x,trim.y); rec.height += trim.height; text.setBounds(rec.x,rec.y,rec.width,rec.height); return; } if(this.fig instanceof Label){ rec = ((Label)fig).getTextBounds().intersect(rec); fig.translateToAbsolute(rec); org.eclipse.swt.graphics.Rectangle trim = text.computeTrim(0, 0, 0, 0); rec.translate(trim.x,trim.y); rec.width += trim.width; rec.height += trim.height; text.setBounds(rec.x,rec.y,rec.width,rec.height); return; } } }
[ "sergioemv@gmail.com" ]
sergioemv@gmail.com
30c8699d276a6e895532efbe430766b1054050df
b3d9e98f353eaba1cf92e3f1fc1ccd56e7cecbc5
/xy-games/game-logic/trunk/src/main/java/com/cai/game/mj/handler/MJHandlerDispatchCard.java
cb0126b2f4762d8fd5594bd0b7872497555d1433
[]
no_license
konser/repository
9e83dd89a8ec9de75d536992f97fb63c33a1a026
f5fef053d2f60c7e27d22fee888f46095fb19408
refs/heads/master
2020-09-29T09:17:22.286107
2018-10-12T03:52:12
2018-10-12T03:52:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,071
java
package com.cai.game.mj.handler; import com.cai.common.constant.GameConstants; import com.cai.common.constant.MsgConstants; import com.cai.common.domain.GangCardResult; import com.cai.game.mj.AbstractMJTable; import protobuf.clazz.Protocol.Int32ArrayResponse; import protobuf.clazz.Protocol.RoomResponse; import protobuf.clazz.Protocol.TableResponse; import protobuf.clazz.Protocol.WeaveItemResponse; import protobuf.clazz.Protocol.WeaveItemResponseArrayResponse; public class MJHandlerDispatchCard<T extends AbstractMJTable> extends AbstractMJHandler<T> { protected int _seat_index; protected int _send_card_data; // 特殊发牌操作标识 protected boolean specialType = false; // 发多少个牌 protected int cardCount = 1; // 这次摸牌是不是因为杠牌 protected boolean isGang = false; // 需要留到下局处理牌值 protected int card; protected int _type; // private int _current_player =MJGameConstants.INVALID_SEAT; protected GangCardResult m_gangCardResult; /** * 杠牌的提供者,暗杠为-1,接杠、碰杠为出牌人 */ protected int gang_provide_index; public MJHandlerDispatchCard() { m_gangCardResult = new GangCardResult(); } public void reset_card_count(int card_num, boolean isGang) { this.cardCount = card_num; this.isGang = isGang; } public void reset_card_count_hua(int seat_index, int type,int card_num){ _seat_index = seat_index; _type = type; this.cardCount = card_num; } public void reset_status(int seat_index, int type) { _seat_index = seat_index; _type = type; cardCount = 1; } public void reset_status(int seat_index, int type, int provide_index, boolean is_gang) { _seat_index = seat_index; _type = type; gang_provide_index = provide_index; isGang = is_gang; } public void reset_status(int seat_index, int type, boolean specialType) { _seat_index = seat_index; _type = type; this.specialType = specialType; } public void reset_status(int seat_index, int type, int card) { _seat_index = seat_index; _type = type; this.card = card; } public void reset_status_send(int seat_index, int type, int card) { _seat_index = seat_index; _type = type; this._send_card_data = card; } @Override public void exe(T table) { } /*** * //用户出牌 */ @Override public boolean handler_player_out_card(T table, int seat_index, int card) { // 错误断言 card = table.get_real_card(card); if (table._logic.is_valid_card(card) == false) { table.log_error("出牌,牌型出错"); return false; } // 效验参数 if (seat_index != _seat_index) { table.log_error("出牌,没到出牌"); return false; } // if (card == MJGameConstants.ZZ_MAGIC_CARD && // table.is_mj_type(MJGameConstants.GAME_TYPE_HZ)) { // table.send_sys_response_to_player(seat_index, "癞子牌不能出癞子"); // table.log_error("癞子牌不能出癞子"); // return false; // } // 删除扑克 if (table._logic.remove_card_by_index(table.GRR._cards_index[_seat_index], card) == false) { table.log_error("出牌删除出错"); return false; } if (_type == GameConstants.HU_CARD_TYPE_GANG_KAI) { // 出牌 table.exe_out_card(_seat_index, card, GameConstants.HU_CARD_TYPE_GANG_KAI); } else { // 出牌 table.exe_out_card(_seat_index, card, GameConstants.WIK_NULL); } return true; } @Override public boolean handler_player_be_in_room(T table, int seat_index) { RoomResponse.Builder roomResponse = RoomResponse.newBuilder(); roomResponse.setType(MsgConstants.RESPONSE_RECONNECT_DATA); roomResponse.setIsGoldRoom(table.is_sys()); TableResponse.Builder tableResponse = TableResponse.newBuilder(); table.load_room_info_data(roomResponse); table.load_player_info_data(roomResponse); table.load_common_status(roomResponse); // 游戏变量 tableResponse.setBankerPlayer(table.GRR._banker_player); tableResponse.setCurrentPlayer(_seat_index); tableResponse.setCellScore(0); // 状态变量 tableResponse.setActionCard(0); // tableResponse.setActionMask((_response[seat_index] == false) ? // _player_action[seat_index] : MJGameConstants.WIK_NULL); // 历史记录 tableResponse.setOutCardData(0); tableResponse.setOutCardPlayer(0); for (int i = 0; i < table.getTablePlayerNumber(); i++) { tableResponse.addTrustee(false);// 是否托管 // 剩余牌数 tableResponse.addDiscardCount(table.GRR._discard_count[i]); Int32ArrayResponse.Builder int_array = Int32ArrayResponse.newBuilder(); for (int j = 0; j < 55; j++) { int_array.addItem(table.GRR._discard_cards[i][j]); } tableResponse.addDiscardCards(int_array); // 组合扑克 tableResponse.addWeaveCount(table.GRR._weave_count[i]); WeaveItemResponseArrayResponse.Builder weaveItem_array = WeaveItemResponseArrayResponse.newBuilder(); for (int j = 0; j < GameConstants.MAX_WEAVE; j++) { WeaveItemResponse.Builder weaveItem_item = WeaveItemResponse.newBuilder(); weaveItem_item.setCenterCard(table.GRR._weave_items[i][j].center_card); weaveItem_item.setProvidePlayer(table.GRR._weave_items[i][j].provide_player); weaveItem_item.setPublicCard(table.GRR._weave_items[i][j].public_card); weaveItem_item.setWeaveKind(table.GRR._weave_items[i][j].weave_kind); weaveItem_array.addWeaveItem(weaveItem_item); } tableResponse.addWeaveItemArray(weaveItem_array); // tableResponse.addWinnerOrder(0); // 牌 if (i == _seat_index) { tableResponse.addCardCount(table._logic.get_card_count_by_index(table.GRR._cards_index[i]) - 1); } else { tableResponse.addCardCount(table._logic.get_card_count_by_index(table.GRR._cards_index[i])); } } // 数据 tableResponse.setSendCardData(0); int hand_cards[] = new int[GameConstants.MAX_COUNT]; int hand_card_count = table._logic.switch_to_cards_data(table.GRR._cards_index[seat_index], hand_cards); // 如果断线重连的人是自己 if (seat_index == _seat_index) { table._logic.remove_card_by_data(hand_cards, _send_card_data); } for (int i = 0; i < GameConstants.MAX_COUNT; i++) { tableResponse.addCardsData(hand_cards[i]); } roomResponse.setTable(tableResponse); table.send_response_to_player(seat_index, roomResponse); // 听牌显示 int ting_cards[] = table._playerStatus[seat_index]._hu_cards; int ting_count = table._playerStatus[seat_index]._hu_card_count; if (ting_count > 0) { table.operate_chi_hu_cards(seat_index, ting_count, ting_cards); } // 摸牌 table.operate_player_get_card(_seat_index, 1, new int[] { _send_card_data }, seat_index); if (table._playerStatus[seat_index].has_action() && (table._playerStatus[seat_index].is_respone() == false)) { table.operate_player_action(seat_index, false); } return true; } public void other_deal(T table) { } }
[ "905202059@qq.com" ]
905202059@qq.com
31bac3064ab2a871cad2cf5a46634c1455653cf1
4218ea0a90ded67bf5525c314a1ea62a55b1b5d8
/src/main/java/net/frozenorb/foxtrot/kitmap/events/oneinthechamber/OneInTheChamber.java
e4f2ac73b47055fc98d68d82c1c2ce9bdc8bd7bc
[]
no_license
SkyHCF-Network/HCTeams
263de651a2af544e6ab401b933fd8f5aeedef77e
c33287808335f236b78d5b3ace0a62bc14971d95
refs/heads/main
2023-04-18T05:26:22.529098
2021-05-04T21:06:41
2021-05-04T21:06:41
362,605,408
2
0
null
null
null
null
UTF-8
Java
false
false
137
java
// // Decompiled by Procyon v0.5.36 // package net.frozenorb.foxtrot.kitmap.events.oneinthechamber; public class OneInTheChamber { }
[ "43901997+SoNotMC@users.noreply.github.com" ]
43901997+SoNotMC@users.noreply.github.com
02ab80d2b85299a6610d2f3089492e645bcbf6f7
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
/src/main/java/com/alipay/api/domain/ZhimaMerchantContractStatusModifyModel.java
7cfba5e6824f8ab8bf73b73c68c5853aef223dad
[ "Apache-2.0" ]
permissive
slin1972/alipay-sdk-java-all
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
63095792e900bbcc0e974fc242d69231ec73689a
refs/heads/master
2020-08-12T14:18:07.203276
2019-10-13T09:00:11
2019-10-13T09:00:11
214,782,009
0
0
Apache-2.0
2019-10-13T07:56:34
2019-10-13T07:56:34
null
UTF-8
Java
false
false
1,359
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 芝麻信用承诺消费合约状态变更 * * @author auto create * @since 1.0, 2019-03-21 20:23:55 */ public class ZhimaMerchantContractStatusModifyModel extends AlipayObject { private static final long serialVersionUID = 8821635779919536494L; /** * 合约状态变更操作发生的时间 */ @ApiField("action_time") private Date actionTime; /** * 合约状态操作类型必须为以下列表的一种 ACTIVE表示激活合约,前置合约状态INIT INVALID表示作废合约,前置合约状态为INIT */ @ApiField("action_type") private String actionType; /** * 承诺消费合约号,唯一定位用户的一笔合约 */ @ApiField("contract_no") private String contractNo; public Date getActionTime() { return this.actionTime; } public void setActionTime(Date actionTime) { this.actionTime = actionTime; } public String getActionType() { return this.actionType; } public void setActionType(String actionType) { this.actionType = actionType; } public String getContractNo() { return this.contractNo; } public void setContractNo(String contractNo) { this.contractNo = contractNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
9c56f18ad91268c65e0c72b2ba25527c9af9ebef
11e8b8da9aedc52bea38004651cf6e521e5d1680
/src/main/java/com/frwan/desgin/create/singleton/LazySingleton.java
f6a20e5e4c2580309750b17a6ea5e6dfdcc99993
[]
no_license
wz2cool/javaLearning
5a74c58dcda7027c111b9ef15cbcdfdb4b895d1b
af7b0922bcca648fb9778b3a201f29c234affcef
refs/heads/master
2020-03-12T20:16:32.493215
2018-06-21T06:57:08
2018-06-21T06:57:08
130,802,067
0
0
null
null
null
null
UTF-8
Java
false
false
479
java
package com.frwan.desgin.create.singleton; // 懒汉式构造 public class LazySingleton { private volatile static LazySingleton instance; private LazySingleton() { } public static LazySingleton getSingleton() { if (instance == null) { synchronized (LazySingleton.class) { if (instance == null) { instance = new LazySingleton(); } } } return instance; } }
[ "wz2cool@live.cn" ]
wz2cool@live.cn
0bbfee5267f7a2f898f461fe636300eaf8d7136b
3915515e2b655ce8c6d74600411186b0adc16d34
/Spring-core/didemo/src/com/ustglobal/didemo/util/Manager.java
a09ac613749a97a4056f31641bce2702bdc7e007
[]
no_license
deepeshdk/USTGlobal-16Sep19-Deepesh-Khandelwal
e11c4c434e94ca12eacbcb840a4ce7cc3a17d3b3
4eb6ff3f8d5eb9ad269e63a3baf36e1970dd1750
refs/heads/master
2023-01-13T09:41:55.474009
2020-06-05T13:18:02
2020-06-05T13:18:02
215,532,209
0
0
null
2023-01-07T18:51:06
2019-10-16T11:31:22
CSS
UTF-8
Java
false
false
218
java
package com.ustglobal.didemo.util; import com.ustglobal.didemo.dao.I; import com.ustglobal.didemo.impl.A; public class Manager { A a = null; public I getI() { if(a == null) { a = new A(); } return a; } }
[ "deepeshkhandelwal05@gmail.com" ]
deepeshkhandelwal05@gmail.com
bcf8d9c1dfb159d5308d29c1d9fe609c01bb2b49
be91c7a8bcdc5f5e56f0a212a062f1ca174421d8
/tools-core-sdo/src/main/java/org/tools/core/sdo/field/CharField.java
e90347511e2443375790e22bbeee1ef3e866daa0
[]
no_license
shiyunlai/tistools
5357b58573e45f19b322ec9a2da02bfaccc52723
dcc19bd3edfa4787ee26d2c4bfd550d6481f3897
refs/heads/master
2021-01-12T10:47:26.225074
2018-09-06T10:45:53
2018-09-06T10:45:53
72,700,499
0
10
null
2018-02-28T03:18:51
2016-11-03T02:21:37
JavaScript
UTF-8
Java
false
false
1,074
java
/** * */ package org.tools.core.sdo.field; import org.tis.tools.common.utils.BasicUtil; import org.tools.core.sdo.exception.SDOException; import org.tools.core.sdo.exception.SDOExceptionCodes; /** * <pre> * * 数据域:字符(char)类型的字段 * * 如:标志位 * * </pre> * * @author megapro * */ public class CharField extends AbstractField { /** * */ private static final long serialVersionUID = -5765632783930489657L; private char value = 0; public CharField(String fieldName) { super(fieldName); } public void setValue(char val) { this.value = val; } public char getValue() { return this.value; } @Override public String getStringValue() { return Character.toString(this.value); } @Override public void setValueWithString(String val) { try { setValue(Character.valueOf(value)); } catch (Exception e) { e.printStackTrace(); throw new SDOException(SDOExceptionCodes.FIELD_INVALID_CHAR_VALUE, BasicUtil.wrap(val)); } } @Override public Object getProtoValue() { return this.value; } }
[ "shiyunlai@gmail.com" ]
shiyunlai@gmail.com
93024ef3d5fc92dfefd4604e6748a3fb84bc7602
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_77619688067a74ce2b2cb4e5cfbf0533112ac9f3/UserAccountView/3_77619688067a74ce2b2cb4e5cfbf0533112ac9f3_UserAccountView_t.java
d71ebfd35f8874111743fc136aad79f806c4fd54
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,646
java
package bu.edu.cs673.edukid.settings.useraccount; import java.io.IOException; import java.util.List; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Environment; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.Toast; import android.media.*; import bu.edu.cs673.edukid.R; import bu.edu.cs673.edukid.db.Database; import bu.edu.cs673.edukid.db.ImageUtils; import bu.edu.cs673.edukid.db.model.UserAccount; /** * The view which contains the user account information. The user account can be * seen and edited here. * * @author Peter Trevino * * @see UserAccount * */ public class UserAccountView extends Activity implements OnClickListener { private static final int TAKE_PICTURE = 1888; private boolean mStartRecording = true; private static final long DATABASE_ERROR = -1; private String userName; private ImageView userImage; private ImageView micImage; private Database database = Database.getInstance(this); public MediaRecorder recorder = new MediaRecorder(); private String mFileName = ""; /** * {@inheritDoc} */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.user_account); userImage = (ImageView) findViewById(R.id.createUserImage); micImage = (ImageView) findViewById(R.id.accountCreationRecorderButton); // Populate user account info from database (if any) List<UserAccount> userAccounts = database.getUserAccounts(); if (userAccounts.size() == 1) { UserAccount userAccount = userAccounts.get(0); // Set user name EditText userNameTextField = ((EditText) findViewById(R.id.createEditChildName)); userNameTextField.setText(userAccount.getUserName()); // Set user image userImage.setImageDrawable(ImageUtils .byteArrayToDrawable(userAccount.getUserImage())); userImage.setMaxHeight(400); userImage.setMaxWidth(400); userImage.setAdjustViewBounds(false); } // Add listeners Button createSaveButton = (Button) findViewById(R.id.createSaveButton); createSaveButton.setOnClickListener(this); ImageButton createUploadPhotoButton = (ImageButton) findViewById(R.id.createUploadPhotoButton); createUploadPhotoButton.setOnClickListener(this); micImage.setOnClickListener(this); } /** * {@inheritDoc} */ @Override public void onClick(View view) { switch (view.getId()) { case R.id.createSaveButton: saveUserAccount(); break; case R.id.createUploadPhotoButton: // TODO: we should have other options other than the camera like // picking from the camera roll startCamera(); break; case R.id.accountCreationRecorderButton: // TODO:have state of button switch between start and stop recording onRecord(mStartRecording); mStartRecording = !mStartRecording; break; } } /** * {@inheritDoc} */ @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == TAKE_PICTURE && resultCode == RESULT_OK) { Bitmap photo = (Bitmap) data.getExtras().get("data"); if (photo != null) { userImage.setImageBitmap(photo); } } } /** * Saves the user account in the database. */ private void saveUserAccount() { userName = ((EditText) findViewById(R.id.createEditChildName)) .getText().toString(); List<UserAccount> userAccounts = database.getUserAccounts(); long result = DATABASE_ERROR; if (userAccounts.size() == 0) { // TODO: Peter: replace "" with real user sound. result = database.addUserAccount(userName, "", userImage.getDrawable()); } else if (userAccounts.size() == 1) { UserAccount userAccount = userAccounts.get(0); userAccount.setUserName(userName); userAccount.setUserImage(ImageUtils.drawableToByteArray(userImage .getDrawable())); result = database.editUserAccount(userAccount); } else { // TODO: implement more than 1 user. Should not get here now. } if (result != DATABASE_ERROR) { Toast.makeText(this, "User account saved successfully!", Toast.LENGTH_LONG).show(); } else { // TODO: inform user of error } } /** * Starts the front facing camera to take a picture. */ private void startCamera() { Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(intent, TAKE_PICTURE); } public void onRecord(boolean start) { if (start) { startRecording(); } else { stopRecording(); } } private void startRecording() { micImage.setBackgroundResource(R.drawable.abacus); recorder = new MediaRecorder(); mFileName = Environment.getExternalStorageDirectory().getAbsolutePath(); mFileName += "/audiorecordtest.3gp"; recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setOutputFile(mFileName); try { recorder.prepare(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } recorder.start(); } private void stopRecording() { micImage.setBackgroundResource(R.drawable.mikebutton); recorder.stop(); recorder.release(); recorder = null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
cbe6b24ae3967e663db40523ee5923d3e34fef24
9701ca1a5ea0019090efe2be8f06f673f6820170
/baselibrary/src/main/java/com/haier/cellarette/baselibrary/Test.java
4edc92222cca27eb1da56bd35a6e9ed223cad8ec
[]
no_license
xiejingyan/APPkuangjia
16d5c02d851514af729f4cb04dda0039bc951870
2335f3d94323bed2fee285e4b96ac0b0a9727aa9
refs/heads/master
2020-05-02T19:32:39.135758
2018-08-06T03:51:42
2018-08-06T03:51:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
163
java
//package com.haier.cellarette.baselibrary; // // ///** // * Created by shining on 2017/9/1. // */ // //public class Test { // private void t(){ // // } //}
[ "liangxiao@smart-haier.com" ]
liangxiao@smart-haier.com
570c04b3657550e4cae9535da4d85b6f2e1d9145
41ce5edf2e270e321dddd409ffac11ab7f32de86
/4/com/android/sdklib/xml/ManifestConstants.java
2e20f02ec799c9f38e00cbac0916cf4c64804358
[]
no_license
danny-source/SDK_Android_Source_03-14
372bb03020203dba71bc165c8370b91c80bc6eaa
323ad23e16f598d5589485b467bb9fba7403c811
refs/heads/master
2020-05-18T11:19:29.171830
2014-03-29T12:12:44
2014-03-29T12:12:44
18,238,039
2
2
null
null
null
null
UTF-8
Java
false
false
2,238
java
/* * Copyright (C) 2009 The Android Open Source Project * * 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.android.sdklib.xml; /** * Constants for nodes and attributes of the AndroidManifest.xml file. * */ public final class ManifestConstants { public final static String NODE_MANIFEST = "manifest"; //$NON-NLS-1$ public final static String NODE_APPLICATION = "application"; //$NON-NLS-1$ public final static String NODE_ACTIVITY = "activity"; //$NON-NLS-1$ public final static String NODE_SERVICE = "service"; //$NON-NLS-1$ public final static String NODE_RECEIVER = "receiver"; //$NON-NLS-1$ public final static String NODE_PROVIDER = "provider"; //$NON-NLS-1$ public final static String NODE_INTENT = "intent-filter"; //$NON-NLS-1$ public final static String NODE_ACTION = "action"; //$NON-NLS-1$ public final static String NODE_CATEGORY = "category"; //$NON-NLS-1$ public final static String NODE_USES_SDK = "uses-sdk"; //$NON-NLS-1$ public final static String NODE_INSTRUMENTATION = "instrumentation"; //$NON-NLS-1$ public final static String NODE_USES_LIBRARY = "uses-library"; //$NON-NLS-1$ public final static String ATTRIBUTE_PACKAGE = "package"; //$NON-NLS-1$ public final static String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$ public final static String ATTRIBUTE_PROCESS = "process"; //$NON-NLS-$ public final static String ATTRIBUTE_DEBUGGABLE = "debuggable"; //$NON-NLS-$ public final static String ATTRIBUTE_MIN_SDK_VERSION = "minSdkVersion"; //$NON-NLS-$ public final static String ATTRIBUTE_TARGET_PACKAGE = "targetPackage"; //$NON-NLS-1$ public final static String ATTRIBUTE_EXPORTED = "exported"; //$NON-NLS-1$ }
[ "danny@35g.tw" ]
danny@35g.tw
77792beb51abbac237fe7024dd4ed0f877f919d5
6ded85cb1fbd7dd5bed6a085b92404f957d47ed3
/src/main/java/com/mcjty/rftools/blocks/logic/CounterTileEntity.java
9c9a235359f5392dbe4c3d3c868371697eb83767
[ "MIT" ]
permissive
Vexatos/RFTools
96bda80dd87261decff3839636b47d2c9d469b6e
5f619a1b934f1f4cf675587efffd922d43e2e237
refs/heads/master
2021-01-18T05:02:08.919538
2015-03-30T15:23:26
2015-03-30T15:23:26
33,139,328
0
0
null
2015-03-30T18:07:43
2015-03-30T18:07:42
null
UTF-8
Java
false
false
3,730
java
package com.mcjty.rftools.blocks.logic; import com.mcjty.entity.GenericTileEntity; import com.mcjty.entity.SyncedValue; import com.mcjty.rftools.blocks.BlockTools; import com.mcjty.rftools.network.Argument; import net.minecraft.nbt.NBTTagCompound; import java.util.Map; public class CounterTileEntity extends GenericTileEntity { public static final String CMD_SETCOUNTER = "setCounter"; public static final String CMD_SETCURRENT = "setCurrent"; // For pulse detection. private boolean prevIn = false; private int counter = 1; private int current = 0; private SyncedValue<Boolean> redstoneOut = new SyncedValue<Boolean>(false); public CounterTileEntity() { registerSyncedObject(redstoneOut); } public int getCounter() { return counter; } public int getCurrent() { return current; } public void setCounter(int counter) { this.counter = counter; current = 0; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } public void setCurrent(int current) { this.current = current; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @Override public boolean canUpdate() { return false; } @Override protected void checkStateServer() { super.checkStateServer(); int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); boolean newvalue = BlockTools.getRedstoneSignalIn(meta); boolean pulse = newvalue && !prevIn; prevIn = newvalue; boolean newout = false; if (pulse) { current++; if (current >= counter) { current = 0; newout = true; } markDirty(); if (newout != redstoneOut.getValue()) { redstoneOut.setValue(newout); notifyBlockUpdate(); } } } @Override protected int updateMetaData(int meta) { meta = super.updateMetaData(meta); Boolean value = redstoneOut.getValue(); return BlockTools.setRedstoneSignalOut(meta, value == null ? false : value); } @Override public void readFromNBT(NBTTagCompound tagCompound) { super.readFromNBT(tagCompound); redstoneOut.setValue(tagCompound.getBoolean("rs")); prevIn = tagCompound.getBoolean("prevIn"); } @Override public void readRestorableFromNBT(NBTTagCompound tagCompound) { super.readRestorableFromNBT(tagCompound); counter = tagCompound.getInteger("counter"); if (counter == 0) { counter = 1; } current = tagCompound.getInteger("current"); } @Override public void writeToNBT(NBTTagCompound tagCompound) { super.writeToNBT(tagCompound); Boolean value = redstoneOut.getValue(); tagCompound.setBoolean("rs", value == null ? false : value); tagCompound.setBoolean("prevIn", prevIn); } @Override public void writeRestorableToNBT(NBTTagCompound tagCompound) { super.writeRestorableToNBT(tagCompound); tagCompound.setInteger("counter", counter); tagCompound.setInteger("current", current); } @Override public boolean execute(String command, Map<String, Argument> args) { boolean rc = super.execute(command, args); if (rc) { return true; } if (CMD_SETCOUNTER.equals(command)) { setCounter(args.get("counter").getInteger()); return true; } else if (CMD_SETCURRENT.equals(command)) { setCurrent(args.get("current").getInteger()); return true; } return false; } }
[ "mcjty1@gmail.com" ]
mcjty1@gmail.com
f6563eb5fa2e551d66e58df33c4962d52db1da67
a90f8343ca16224a1b05015094418cc9f228d4e7
/ydc-dao/dao-cgj/src/main/java/com/ydc/dao/cgj/store/StoreShopCartCommodityDao.java
de99cc35b4134ca2fdb3b097eda5868e8f3d5fc3
[]
no_license
oyjy2018/template
0b381ecc50de254ecab37f34e2d1de058683ab8b
3e9a07b9fff01b43a91b943152a3b9af9ff48e06
refs/heads/master
2022-12-06T11:02:16.875133
2019-06-05T16:12:35
2019-06-05T16:12:35
190,425,044
1
0
null
2022-11-16T10:56:08
2019-06-05T15:55:35
Java
UTF-8
Java
false
false
2,470
java
package com.ydc.dao.cgj.store; import com.ydc.commom.view.dto.cgj.shopCart.ShopCartCommodityDTO; import com.ydc.model.cgj.StoreShopCartCommodity; import java.util.List; import java.util.Map; public interface StoreShopCartCommodityDao { /** * 根据主键删除 * 参数:主键 * 返回:删除个数 * * @ibatorgenerated 2018-09-04 10:11:23 */ int deleteByPrimaryKey(Integer id); /** * 插入,空属性也会插入 * 参数:pojo对象 * 返回:删除个数 * * @ibatorgenerated 2018-09-04 10:11:23 */ int insert(StoreShopCartCommodity record); /** * 插入,空属性不会插入 * 参数:pojo对象 * 返回:删除个数 * * @ibatorgenerated 2018-09-04 10:11:23 */ int insertSelective(StoreShopCartCommodity record); /** * 根据主键查询 * 参数:查询条件,主键值 * 返回:对象 * * @ibatorgenerated 2018-09-04 10:11:23 */ StoreShopCartCommodity selectByPrimaryKey(Integer id); /** * 根据主键修改,空值条件不会修改成null * 参数:1.要修改成的值 * 返回:成功修改个数 * * @ibatorgenerated 2018-09-04 10:11:23 */ int updateByPrimaryKeySelective(StoreShopCartCommodity record); /** * 根据主键修改,空值条件会修改成null * 参数:1.要修改成的值 * 返回:成功修改个数 * * @ibatorgenerated 2018-09-04 10:11:23 */ int updateByPrimaryKey(StoreShopCartCommodity record); /** * 根据条件查询 购物车商品 * @param map * @return */ List<StoreShopCartCommodity> selectStoreShopCart(Map<String,Object> map); /** * 查询会员购物车 有效商品 * @param map * @return */ List<ShopCartCommodityDTO> getMemberValidationShopCartCommodity(Map<String,Object> map); /** * 查询会员 购物车 无效商品 * */ List<ShopCartCommodityDTO> getMemberInvalidationShopCartCommodity(Map<String,Object> map); /** * * 查询会员购物车 总数 与总价格 * */ Map<String,Object> getMemberShopCartNum(Map<String,Object> map); /** * 批量删除 购物车商品 */ int updateByIds(Map<String,Object> map); /** * 更新delete_status * @param map * @return */ Integer updateDeleteStatus(Map<String,Object> map); }
[ "983014204@qq.com" ]
983014204@qq.com
9f9c49653a8965cfdcbee35fb8ab7c3c02ce91ab
d6b6abe73a0c82656b04875135b4888c644d2557
/sources/com/google/android/gms/internal/ads/ef.java
7ea94ae8cf2dc368cf106ba2f448a49fe16cb36b
[]
no_license
chanyaz/and_unimed
4344d1a8ce8cb13b6880ca86199de674d770304b
fb74c460f8c536c16cca4900da561c78c7035972
refs/heads/master
2020-03-29T09:07:09.224595
2018-08-30T06:29:32
2018-08-30T06:29:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package com.google.android.gms.internal.ads; import android.content.Context; import com.google.android.gms.ads.internal.au; import java.util.concurrent.Callable; final class ef implements Callable<ec> { private final /* synthetic */ Context a; private final /* synthetic */ ee b; ef(ee eeVar, Context context) { this.b = eeVar; this.a = context; } public final /* synthetic */ Object call() { ec a; eg egVar = (eg) this.b.a.get(this.a); if (egVar != null) { if ((egVar.a + ((Long) akc.f().a(amn.bq)).longValue() < au.l().currentTimeMillis() ? 1 : null) == null) { if (((Boolean) akc.f().a(amn.bp)).booleanValue()) { a = new ed(this.a, egVar.b).a(); this.b.a.put(this.a, new eg(this.b, a)); return a; } } } a = new ed(this.a).a(); this.b.a.put(this.a, new eg(this.b, a)); return a; } }
[ "khairilirfanlbs@gmail.com" ]
khairilirfanlbs@gmail.com
6dba91a045b787fe6fe3cd674aa72b60482c6467
154d7de32b17ea9e1b2eb889704012a2b0eeddd2
/src/com/rbao/east/controller/admin/AccountDeductController.java
bb23ea2c6c15eb681cfc53f6fd4a40f7a54ab356
[]
no_license
shiyuanfunc/p2p_rt
89f8963357c28bd0a5cb9ef9b927e22363ecf2d3
e18b483fa150d3e044666fdf8550990b1645fe86
refs/heads/master
2022-05-18T06:50:54.861543
2017-09-25T08:31:45
2017-09-25T08:31:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,432
java
package com.rbao.east.controller.admin; import java.io.OutputStream; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import com.rbao.east.common.Constants; import com.rbao.east.common.page.PageModel; import com.rbao.east.common.result.DwzResult; import com.rbao.east.controller.BaseController; import com.rbao.east.entity.AccountDeduct; import com.rbao.east.entity.OperatorLog; import com.rbao.east.entity.SysModule; import com.rbao.east.entity.User; import com.rbao.east.service.AccountDeductService; import com.rbao.east.service.SysModuleService; import com.rbao.east.service.UserService; import com.rbao.east.utils.DateUtils; import com.rbao.east.utils.ExcelUtil; import com.rbao.east.utils.SpringUtils; import com.rbao.east.utils.StringUtil; /** * 账号费用管理--》用户费用扣除 * * @author Sandy * */ @Controller @RequestMapping("accountDeduct/") public class AccountDeductController extends BaseController { private static Logger logger = LoggerFactory .getLogger(AccountDeductController.class); @Autowired private AccountDeductService accountDeductService; @Autowired private UserService userService; @Autowired private SysModuleService moduleService; /** * 添加扣除费用 * */ @RequestMapping(Constants.PRE_PATH_EDIT + "addAccountDeduct") public String addUserBank(HttpServletRequest request, HttpServletResponse response, Model model) { Map<String, String> paramsMap = getParameters(request); model.addAttribute("right_id", paramsMap.get("right_id")); /* * Map deductType=new HashMap(); deductType.put(1, "现场认证扣费"); * deductType.put(2, "担保垫付扣费"); deductType.put(3, "其他"); * model.addAttribute("deductTypeMap",deductType); */ return "fundAccount/addAccountDeduct"; } /** * 保存扣除费用 * */ @RequestMapping(Constants.PRE_PATH_EDIT + "save") public void save(HttpServletRequest request, HttpServletResponse response, AccountDeduct accountDeduct) { User userAdmin = loginAdminUser(request); Map<String, String> paramsMap = getParameters(request); boolean flag = false; User user = userService.selectByUserUid(paramsMap.get("userAccount")); if (user == null) { SpringUtils.renderDwzResult(response, false, "用户名不存在!", DwzResult.CALLBACK_CLOSECURRENT, paramsMap.get("right_id") .toString()); } else { try { accountDeduct.setUserId(user.getId()); accountDeduct.setAddTime(new Date()); accountDeduct.setAddIp(this.getIpAddr(request)); accountDeduct.setAddUserId(userAdmin.getId()); if (!validateCaptcha(request)) { SpringUtils.renderDwzResult(response, false, "验证码输入错误"); return; } flag = accountDeductService.save(accountDeduct); } catch (Exception e) { logger.error("添加用户费用失败!", e); flag = false; } SpringUtils.renderDwzResult(response, flag, flag ? "添加用户费用成功" : "添加用户费用失败", DwzResult.CALLBACK_CLOSECURRENTDIALOG, paramsMap .get("right_id").toString()); } } /** * 获取列表 * */ @RequestMapping(Constants.PRE_PATH_VIEW + "getAccountDeductList") public String getAccountDeductList(HttpServletRequest request, HttpServletResponse response, Model model) { User user = loginAdminUser(request); Map<String, String> paramsMap = getParameters(request); PageModel pageModel = accountDeductService .getAccountDeductList(paramsMap); model.addAttribute("pm", pageModel); model.addAttribute("searchParams", paramsMap);// 用于搜索框保留值 paramsMap.put("userId", String.valueOf(user.getId())); model.addAttribute("right_id", paramsMap.get("right_id"));// 刷新 // 获得当前登录用户的rightId下的子权限 List<SysModule> righSubtList = moduleService .getRightGroupList(paramsMap); model.addAttribute("righSubtList", righSubtList); return "fundAccount/accountDeductList"; } /** * 审核扣除费用 * */ @RequestMapping(Constants.PRE_PATH_EDIT + "checkAccountDeduct") public String checkAccountDeduct(HttpServletRequest request, HttpServletResponse response, Model model) { Map<String, String> paramsMap = getParameters(request); model.addAttribute("right_id", paramsMap.get("right_id")); Integer accountDeductId = Integer.parseInt(paramsMap.get("id")); AccountDeduct accountDeduct = accountDeductService .getById(accountDeductId); model.addAttribute("accountDeduct", accountDeduct); return "fundAccount/checkAccountDeduct"; } /** * 保存扣除费用 * */ @RequestMapping(Constants.PRE_PATH_EDIT + "saveCheck") public void saveCheck(HttpServletRequest request, HttpServletResponse response, AccountDeduct accountDeduct) { User userAdmin = loginAdminUser(request); Map<String, String> paramsMap = getParameters(request); boolean flag = false; if (!validateCaptcha(request)) { SpringUtils.renderDwzResult(response, false, "验证码输入错误"); return; } try { accountDeduct.setCheckUserId(userAdmin.getId()); accountDeduct.setCheckIp(this.getIpAddr(request)); accountDeduct.setCheckTime(new Date()); flag = accountDeductService.save(accountDeduct); } catch (Exception e) { logger.error("审核用户费用失败,可能用户可用余额不足!", e); flag = false; } // 添加操作日志 OperatorLog operatorLog = new OperatorLog(); operatorLog.setLogUserid(userAdmin.getUserAccount()); operatorLog.setOperatorTitle("审核扣费"); operatorLog.setOperatorCategory(OperatorLog.CATEGORY_DEDUCT); operatorLog.setOperatorParams(accountDeduct.toString()); operatorLog.setOperatorReturn(flag ? "审核用户费用成功" : "审核用户费用失败"); operatorLog.setOperatorStatus(flag ? Integer .parseInt(DwzResult.SUCCESS) : Integer .parseInt(DwzResult.FAILD)); operatorLog.setLinkUrl(getURI(request)); operatorLogService.addAdminLog(operatorLog); SpringUtils.renderDwzResult(response, flag, flag ? "审核用户费用成功" : "审核用户费用失败", DwzResult.CALLBACK_CLOSECURRENT, paramsMap.get("right_id").toString()); } /** * 导出Excel */ @RequestMapping(Constants.PRE_PATH_EDIT + "toExcel") public void logToExcel(HttpServletRequest request, HttpServletResponse response) { Map<String, String> params = this.getParameters(request); params.put("numPerPage", "500000"); try { PageModel pm = accountDeductService.getAccountDeductList(params); List<AccountDeduct> ars = pm.getList(); String[] titles = { "序号", "用户名", "扣费类型", "扣费金额", "备注", "创建时间", "创建人", "状态", "审核人", "审核时间" }; List<String[]> contents = new ArrayList<String[]>(); for (AccountDeduct ad : ars) { String[] conList = new String[10]; conList[0] = StringUtil.toString(ad.getId()); conList[1] = StringUtil.toString(ad.getUserAccount()); conList[2] = StringUtil.toString(AccountDeduct.ALL_TYPE.get(ad.getDeductType())); conList[3] = StringUtil.toString(ad.getDeductAmount()); conList[4] = StringUtil.toString(ad.getRemark()); conList[5] = StringUtil.toString(DateUtils.formatDate("yyyy-MM-dd HH:mm:ss", ad.getAddTime())); conList[6] = StringUtil.toString(ad.getAddUserAccount()); conList[7] = StringUtil.toString(ad.getCheckState()); conList[8] = StringUtil.toString(ad.getCheckUserAccount()); conList[9] = StringUtil.toString(DateUtils.formatDate("yyyy-MM-dd HH:mm:ss", ad.getCheckTime())); contents.add(conList); } OutputStream os = response.getOutputStream(); response.reset();// 清空输出流 response.setHeader("Content-disposition", "attachment; filename=" + new String( ("accountDeduct-data" + ".xls").getBytes("UTF-8"), "ISO8859-1")); response.setContentType("application/msexcel");// 定义输出类型 ExcelUtil.buildExcel(os, "费用扣除审核记录统计数据", titles, contents); } catch (Exception e) { logger.error("导出excel失败", e); } } }
[ "songyh_1314@163.com" ]
songyh_1314@163.com
27dda4bab3889cd3f5fc90ad1bae26b888d89785
49d20dff92a6a1198a30b3526cfb85b93ba645c4
/src/main/java/net/schmizz/sshj/transport/mac/HMACMD5.java
57c43247e837ef4089457a3017566c003fbb6c34
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
cloudera/sshj
40229cb25d0cbf0d86e256cbc621cc12bb486c5f
3838dd20d7cbc503b98f26bd268f1acdd9fe2a3d
refs/heads/master
2023-03-21T17:26:56.438973
2011-06-23T00:17:57
2011-06-23T00:27:58
1,856,139
6
7
null
null
null
null
UTF-8
Java
false
false
2,113
java
/* * Copyright 2010, 2011 sshj contributors * * 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. * * This file may incorporate work covered by the following copyright and * permission notice: * * 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 net.schmizz.sshj.transport.mac; /** HMAC-MD5 <code>MAC</code>. */ public class HMACMD5 extends BaseMAC { /** Named factory for the HMACMD5 <code>MAC</code> */ public static class Factory implements net.schmizz.sshj.common.Factory.Named<MAC> { @Override public MAC create() { return new HMACMD5(); } @Override public String getName() { return "hmac-md5"; } } public HMACMD5() { super("HmacMD5", 16, 16); } }
[ "shikhar@schmizz.net" ]
shikhar@schmizz.net
c945ab36d1cded434c6ddd3a0dc48d09048b562a
47074239415381aefe6286ab11049bd27b5de2eb
/3. Automatically Generated Test Data/JHD.TemplateMethod/TemplateMethod_ChangeConnectionHandle_76.java
b0e2514923c1f26800ff27d51f7049d374f0b8d4
[ "CC-BY-4.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Megre/Dataset4SparT-ETA
c9c3611b143a0d1b1d5180603c5684313686921a
6165ed6ffb63c9c74522ca77e5d4edde7369376c
refs/heads/master
2021-06-25T22:37:13.843086
2021-04-03T16:37:36
2021-04-03T16:37:36
225,321,687
6
0
null
null
null
null
UTF-8
Java
false
false
449
java
package test.auto; public class TemplateMethod_ChangeConnectionHandle_76 { public static void main(String[] args) throws java.lang.Exception { CH.ifa.draw.standard.ChangeConnectionHandle abstractClass = new CH.ifa.draw.standard.ChangeConnectionStartHandle(new CH.ifa.draw.figures.EllipseFigure()); abstractClass.invokeEnd(1, 1, 1, 1, new CH.ifa.draw.standard.StandardDrawingView(new CH.ifa.draw.samples.javadraw.JavaDrawViewer(), 1, 1)); } }
[ "renhao.x@seu.edu.cn" ]
renhao.x@seu.edu.cn
11d7c3ed7497550c2a229f81c6b53740bc3d5424
45d58ad7e0af7cf0ec69ee218b0ba46da81c2abd
/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
85b4e045ebc10c6fe282a82d96e5d5cc8ed4b06e
[ "Apache-2.0" ]
permissive
balabit-deps/balabit-os-7-fop
48cc73bfb90a83329d4e8041bf1c622884df8a08
3ff623f6752a0550998528362469857048ccb324
refs/heads/master
2020-04-07T09:11:06.972556
2018-11-07T15:43:56
2018-11-07T15:43:56
158,243,262
0
0
null
null
null
null
UTF-8
Java
false
false
3,367
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. */ /* $Id: AFPFontCollection.java 1204579 2011-11-21 16:35:41Z mehdi $ */ package org.apache.fop.afp.fonts; import java.util.List; import org.apache.fop.afp.AFPEventProducer; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.fonts.Font; import org.apache.fop.fonts.FontCollection; import org.apache.fop.fonts.FontInfo; import org.apache.fop.fonts.FontTriplet; /** * A base collection of AFP fonts */ public class AFPFontCollection implements FontCollection { private final AFPEventProducer eventProducer; private final List<AFPFontInfo> fontInfoList; /** * Main constructor * * @param eventBroadcaster the event broadcaster * @param fontInfoList the font info list */ public AFPFontCollection(EventBroadcaster eventBroadcaster, List<AFPFontInfo> fontInfoList) { this.eventProducer = AFPEventProducer.Provider.get(eventBroadcaster); this.fontInfoList = fontInfoList; } /** {@inheritDoc} */ public int setup(int start, FontInfo fontInfo) { int num = 1; if (fontInfoList != null && fontInfoList.size() > 0) { for (AFPFontInfo afpFontInfo : fontInfoList) { AFPFont afpFont = afpFontInfo.getAFPFont(); List<FontTriplet> tripletList = afpFontInfo.getFontTriplets(); for (FontTriplet triplet : tripletList) { fontInfo.addMetrics("F" + num, afpFont); fontInfo.addFontProperties("F" + num, triplet.getName(), triplet.getStyle(), triplet.getWeight()); num++; } } checkDefaultFontAvailable(fontInfo, Font.STYLE_NORMAL, Font.WEIGHT_NORMAL); checkDefaultFontAvailable(fontInfo, Font.STYLE_ITALIC, Font.WEIGHT_NORMAL); checkDefaultFontAvailable(fontInfo, Font.STYLE_NORMAL, Font.WEIGHT_BOLD); checkDefaultFontAvailable(fontInfo, Font.STYLE_ITALIC, Font.WEIGHT_BOLD); } else { eventProducer.warnDefaultFontSetup(this); // Go with a default base 12 configuration for AFP environments FontCollection base12FontCollection = new AFPBase12FontCollection(eventProducer); num = base12FontCollection.setup(num, fontInfo); } return num; } private void checkDefaultFontAvailable(FontInfo fontInfo, String style, int weight) { if (!fontInfo.hasFont("any", style, weight)) { eventProducer.warnMissingDefaultFont(this, style, weight); } } }
[ "testbot@balabit.com" ]
testbot@balabit.com
7c841ae24ebced3685c688cb74e5b560c293fdbe
f50b8aabe17d38f039cb2e202fba3b219bc9aab1
/src/com/dgut/main/web/FrontUtils.java
6071c7ca7af8679a85290a58f2610ba77b7d83b3
[]
no_license
HGITHome/OldCare
c615952ef5b31da6d3fa5f4c60c5dd3755828ca1
9df8a4dcf5bbf9a24710885fd4dd8889269095e5
refs/heads/master
2018-12-08T17:05:59.872026
2018-09-11T15:30:59
2018-09-11T15:30:59
109,835,270
0
0
null
null
null
null
UTF-8
Java
false
false
1,550
java
package com.dgut.main.web; import static com.dgut.common.web.Constants.MESSAGE; import static com.dgut.common.web.Constants.UTF8; import static com.dgut.common.web.ProcessTimeFilter.START_TIME; import static com.dgut.common.web.freemarker.DirectiveUtils.PARAM_TPL_SUB; import java.io.IOException; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.beans.propertyeditors.LocaleEditor; import org.springframework.context.MessageSource; import com.dgut.common.web.RequestUtils; import com.dgut.common.web.freemarker.DirectiveUtils; import com.dgut.common.web.springmvc.MessageResolver; import com.dgut.main.entity.Admin; import freemarker.core.Environment; import freemarker.template.AdapterTemplateModel; import freemarker.template.TemplateException; import freemarker.template.TemplateModel; import freemarker.template.TemplateModelException; import freemarker.template.TemplateNumberModel; /** * 前台工具类 * * */ public class FrontUtils { /** * 用户 */ public static final String USER = "user"; public static final String Title = "关爱通管理系统"; /** * 为前台模板设置公用数据 * * @param request * @param model */ public static void adminData(HttpServletRequest request, Map<String, Object> map) { Admin user = CmsUtils.getAdmin(request); if (user != null) { map.put(USER, user); } map.put("title", Title); } }
[ "2465824792@qq.com" ]
2465824792@qq.com
65ca030ba7231f7af22e63130f26ca339e8e0a5a
7766eeea7700623fc590aa1ba6df5a52040c54d8
/src/org/scribe/exceptions/OAuthConnectionException.java
31cf42e722fc2e7eb8f278c0dac827150da9531b
[]
no_license
wardak/Boid-Twitter-API
f97f5fdb4037cbee9fec262fb0e59b5e1db6f574
dd78847bfbc33e69dc4cea79b1b7336debb6e031
refs/heads/master
2021-01-18T05:50:01.286280
2012-12-05T01:52:30
2012-12-05T01:52:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
381
java
package org.scribe.exceptions; /** * @author: Pablo Fernandez */ public class OAuthConnectionException extends OAuthException { private static final long serialVersionUID = 8845426292529379604L; private static final String MSG = "There was a problem while creating a connection to the remote service."; public OAuthConnectionException(Exception e) { super(MSG, e); } }
[ "drummer.aidan@gmail.com" ]
drummer.aidan@gmail.com
43f1fa79377f0b41b9a434d83428402ece7e7239
4a7dccf38e0c106fd4da00e96ac972c2a76ae1ed
/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java
8d82e3a6548769976ee5bce4c713ef342d072ea6
[ "Apache-2.0" ]
permissive
power9li/gerrit-mirro
22fb54b4b42fb633e356513209f7c10c8bb4eab5
d33d4104ea38cb27e66b72a3aac1f37bc785582e
refs/heads/master
2022-12-22T13:52:18.433071
2016-10-14T06:57:59
2016-10-14T06:57:59
70,809,607
0
2
Apache-2.0
2022-12-10T22:01:23
2016-10-13T13:31:42
Java
UTF-8
Java
false
false
5,476
java
// Copyright (C) 2015 The Android Open Source Project // // 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.google.gerrit.extensions.client; import java.util.List; import java.util.Map; /** Preferences about a single user. */ public class GeneralPreferencesInfo { /** Default number of items to display per page. */ public static final int DEFAULT_PAGESIZE = 25; /** Valid choices for the page size. */ public static final int[] PAGESIZE_CHOICES = {10, 25, 50, 100}; /** Preferred method to download a change. */ public enum DownloadCommand { REPO_DOWNLOAD, PULL, CHECKOUT, CHERRY_PICK, FORMAT_PATCH } public enum DateFormat { /** US style dates: Apr 27, Feb 14, 2010 */ STD("MMM d", "MMM d, yyyy"), /** US style dates: 04/27, 02/14/10 */ US("MM/dd", "MM/dd/yy"), /** ISO style dates: 2010-02-14 */ ISO("MM-dd", "yyyy-MM-dd"), /** European style dates: 27. Apr, 27.04.2010 */ EURO("d. MMM", "dd.MM.yyyy"), /** UK style dates: 27/04, 27/04/2010 */ UK("dd/MM", "dd/MM/yyyy"); private final String shortFormat; private final String longFormat; DateFormat(String shortFormat, String longFormat) { this.shortFormat = shortFormat; this.longFormat = longFormat; } public String getShortFormat() { return shortFormat; } public String getLongFormat() { return longFormat; } } public enum ReviewCategoryStrategy { NONE, NAME, EMAIL, USERNAME, ABBREV } public enum DiffView { SIDE_BY_SIDE, UNIFIED_DIFF } public enum EmailStrategy { ENABLED, CC_ON_OWN_COMMENTS, DISABLED } public enum DefaultBase { AUTO_MERGE(null), FIRST_PARENT(-1); private final String base; DefaultBase(String base) { this.base = base; } DefaultBase(int base) { this(Integer.toString(base)); } public String getBase() { return base; } } public enum TimeFormat { /** 12-hour clock: 1:15 am, 2:13 pm */ HHMM_12("h:mm a"), /** 24-hour clock: 01:15, 14:13 */ HHMM_24("HH:mm"); private final String format; TimeFormat(String format) { this.format = format; } public String getFormat() { return format; } } /** Number of changes to show in a screen. */ public Integer changesPerPage; /** Should the site header be displayed when logged in ? */ public Boolean showSiteHeader; /** Should the Flash helper movie be used to copy text to the clipboard? */ public Boolean useFlashClipboard; /** Type of download URL the user prefers to use. */ public String downloadScheme; /** Type of download command the user prefers to use. */ public DownloadCommand downloadCommand; public DateFormat dateFormat; public TimeFormat timeFormat; public Boolean highlightAssigneeInChangeTable; public Boolean relativeDateInChangeTable; public DiffView diffView; public Boolean sizeBarInChangeTable; public Boolean legacycidInChangeTable; public ReviewCategoryStrategy reviewCategoryStrategy; public Boolean muteCommonPathPrefixes; public Boolean signedOffBy; public List<MenuItem> my; public Map<String, String> urlAliases; public EmailStrategy emailStrategy; public DefaultBase defaultBaseForMerges; public boolean isShowInfoInReviewCategory() { return getReviewCategoryStrategy() != ReviewCategoryStrategy.NONE; } public DateFormat getDateFormat() { if (dateFormat == null) { return DateFormat.STD; } return dateFormat; } public TimeFormat getTimeFormat() { if (timeFormat == null) { return TimeFormat.HHMM_12; } return timeFormat; } public ReviewCategoryStrategy getReviewCategoryStrategy() { if (reviewCategoryStrategy == null) { return ReviewCategoryStrategy.NONE; } return reviewCategoryStrategy; } public DiffView getDiffView() { if (diffView == null) { return DiffView.SIDE_BY_SIDE; } return diffView; } public EmailStrategy getEmailStrategy() { if (emailStrategy == null) { return EmailStrategy.ENABLED; } return emailStrategy; } public static GeneralPreferencesInfo defaults() { GeneralPreferencesInfo p = new GeneralPreferencesInfo(); p.changesPerPage = DEFAULT_PAGESIZE; p.showSiteHeader = true; p.useFlashClipboard = true; p.emailStrategy = EmailStrategy.ENABLED; p.reviewCategoryStrategy = ReviewCategoryStrategy.NONE; p.downloadScheme = null; p.downloadCommand = DownloadCommand.CHECKOUT; p.dateFormat = DateFormat.STD; p.timeFormat = TimeFormat.HHMM_12; p.highlightAssigneeInChangeTable = true; p.relativeDateInChangeTable = false; p.diffView = DiffView.SIDE_BY_SIDE; p.sizeBarInChangeTable = true; p.legacycidInChangeTable = false; p.muteCommonPathPrefixes = true; p.signedOffBy = false; p.defaultBaseForMerges = DefaultBase.FIRST_PARENT; return p; } }
[ "power9li@github.com" ]
power9li@github.com
c522147e667e995c692d1c5dd0579b1effff4f26
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project71/src/main/java/org/gradle/test/performance71_5/Production71_455.java
72ca6cfff4e2551a79b612c2aa14f1d32f5f2591
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance71_5; public class Production71_455 extends org.gradle.test.performance15_5.Production15_455 { private final String property; public Production71_455() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
cac4cce9b66864f39220ea40fd84171a506ffcaa
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/webcommon/com/hps/july/dictionary/formbean/ShowInstComplBaseStationForm.java
b56027581fb6daf45889e03f874a80eeece93247
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
WINDOWS-1251
Java
false
false
1,176
java
/* * Created on 06.02.2007 */ package com.hps.july.dictionary.formbean; import java.util.ArrayList; import java.util.List; /** * @author irogachev */ public class ShowInstComplBaseStationForm extends ConfPowerSourcesForm { public ShowInstComplBaseStationForm() { setSearchLabel("Выбор комплекта \"Инсталляционный комплекты БС в сборе\""); setComplectLabel("Текущие комплекты ИК БС"); setStructLabel("Состав комплекта ИК БС"); setModelTypeCode("-9999"); // позже нужно будет ввести логику в SQL setComplectTypeCode("2"); setResourceSetClassConst(new Integer(getModelTypeCode())); setUnitInt(false); } public List getSearchParameterList() { List locSearchParamList = new ArrayList(); // OptionEntry oe = new OptionEntry(); oe.setKey(ConfPowerSourcesForm.SRC_CMPL); oe.setValue("коду комплекта"); locSearchParamList.add(oe); // oe = new OptionEntry(); oe.setKey(ConfPowerSourcesForm.CMPL_TITLE); oe.setValue("наименованию"); locSearchParamList.add(oe); // return locSearchParamList; } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
ceda4bc8748a36386b57144a8766c309d65469c4
4dbf39a9e6fd2e94b4cf1507b7bc5f3f154959de
/main/visualize/src/boofcv/gui/feature/VisualizeShapes.java
98f5a0a2cd286ef8fb7e52d4e9bafd508bedc2cf
[ "Apache-2.0" ]
permissive
dewmal/BoofCV
ea5f4927889e893e3de8fb86b713ae194d81f9a5
19a970ab712b5a062f59f751145c77c36c2daa3f
refs/heads/master
2021-01-18T14:55:10.888481
2013-03-26T03:31:38
2013-03-26T03:31:38
9,048,922
1
0
null
null
null
null
UTF-8
Java
false
false
1,489
java
/* * Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * 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 boofcv.gui.feature; import georegression.struct.point.Point2D_I32; import java.awt.*; import java.util.List; /** * @author Peter Abeles */ public class VisualizeShapes { /** * Draws a polygon * * @param vertexes List of vertices in the polygon * @param loop true if the end points are connected, forming a loop * @param g2 Graphics object it's drawn to */ public static<T extends Point2D_I32> void drawPolygon( List<T> vertexes , boolean loop, Graphics2D g2 ) { for( int i = 0; i < vertexes.size()-1; i++ ) { Point2D_I32 p0 = vertexes.get(i); Point2D_I32 p1 = vertexes.get(i+1); g2.drawLine(p0.x,p0.y,p1.x,p1.y); } if( loop ) { Point2D_I32 p0 = vertexes.get(0); Point2D_I32 p1 = vertexes.get(vertexes.size()-1); g2.drawLine(p0.x,p0.y,p1.x,p1.y); } } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
ec942aad8106bf1bd364e05df001135fb6605474
c965bf50a919514585804032f09c519c55971973
/src/main/java/com/longfor/fsscreportdb/ods/entity/OdsHzNcdata.java
db33006482abb685823e05e9e211f0e4953702a7
[]
no_license
fantisticjob/fssc-rptdata
8320d374e2f877f44410b2c90d25cda8418a40c6
22f499041416d0a48c2a3ae17146944b70cfc3ca
refs/heads/main
2023-07-12T06:27:14.774910
2021-08-17T08:34:36
2021-08-17T08:34:36
397,172,507
0
1
null
null
null
null
UTF-8
Java
false
false
5,633
java
package com.longfor.fsscreportdb.ods.entity; import java.io.Serializable; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; /** * <p> * 项目经营情况NC数据接口 * </p> * * @author chenziyao * @since 2020-08-06 */ @TableName("ODS_HZ_NCDATA") @KeySequence("ODS_HZNCDATA") public class OdsHzNcdata implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @TableId(value = "id", type = IdType.INPUT) private BigDecimal id; /** * 年 */ @TableField("yearv") private String yearv; /** * 月 */ @TableField("periodv") private String periodv; /** * 帐套主键 */ @TableField("pk_accountingbook") private String pk_accountingbook; /** * 币种名称 */ @TableField("bz_name") private String bz_name; /** * 帐套编码 */ @TableField("zt_code") private String zt_code; /** * 帐套名称 */ @TableField("zt_name") private String ztname; /** * 科目编码 */ @TableField("km_code") private String km_code; /** * 科目级别 */ @TableField("km_level") private String km_level; /** * 科目名称 */ @TableField("km_name") private String km_name; /** * 科目全名称 */ @TableField("km_dispname") private String km_dispname; /** * 贷方发生 */ @TableField("fsd") private String fsd; /** * 借方发生 */ @TableField("fsj") private String fsj; /** * 累计贷方 */ @TableField("ljd") private String ljd; /** * 累计借方 */ @TableField("ljj") private String ljj; /** * 期末余额 */ @TableField("qmye") private String qmye; /** * 期末方向 */ @TableField("qmfx") private String qmfx; /** * 期初余额 */ @TableField("qcye") private String qcye; /** * 期初方向 */ @TableField("qcfx") private String qcfx; /** * 执行时间 */ @TableField("op_time") private String op_time; /** * 批次号 */ @TableField("execution_id") private String execution_id; /** * 入库时间 */ @TableField("load_date") private String load_date; public BigDecimal getId() { return id; } public void setId(BigDecimal id) { this.id = id; } public String getYearv() { return yearv; } public void setYearv(String yearv) { this.yearv = yearv; } public String getPeriodv() { return periodv; } public void setPeriodv(String periodv) { this.periodv = periodv; } public String getPk_accountingbook() { return pk_accountingbook; } public void setPk_accountingbook(String pk_accountingbook) { this.pk_accountingbook = pk_accountingbook; } public String getBz_name() { return bz_name; } public void setBz_name(String bz_name) { this.bz_name = bz_name; } public String getZt_code() { return zt_code; } public void setZt_code(String zt_code) { this.zt_code = zt_code; } public String getZtname() { return ztname; } public void setZtname(String ztname) { this.ztname = ztname; } public String getKm_code() { return km_code; } public void setKm_code(String km_code) { this.km_code = km_code; } public String getKm_level() { return km_level; } public void setKm_level(String km_level) { this.km_level = km_level; } public String getKm_name() { return km_name; } public void setKm_name(String km_name) { this.km_name = km_name; } public String getKm_dispname() { return km_dispname; } public void setKm_dispname(String km_dispname) { this.km_dispname = km_dispname; } public String getFsd() { return fsd; } public void setFsd(String fsd) { this.fsd = fsd; } public String getFsj() { return fsj; } public void setFsj(String fsj) { this.fsj = fsj; } public String getLjd() { return ljd; } public void setLjd(String ljd) { this.ljd = ljd; } public String getLjj() { return ljj; } public void setLjj(String ljj) { this.ljj = ljj; } public String getQmye() { return qmye; } public void setQmye(String qmye) { this.qmye = qmye; } public String getQmfx() { return qmfx; } public void setQmfx(String qmfx) { this.qmfx = qmfx; } public String getQcye() { return qcye; } public void setQcye(String qcye) { this.qcye = qcye; } public String getQcfx() { return qcfx; } public void setQcfx(String qcfx) { this.qcfx = qcfx; } public String getOp_time() { return op_time; } public void setOp_time(String op_time) { this.op_time = op_time; } public String getExecution_id() { return execution_id; } public void setExecution_id(String execution_id) { this.execution_id = execution_id; } public String getLoad_date() { return load_date; } public void setLoad_date(String load_date) { this.load_date = load_date; } }
[ "1048508578@qq.com" ]
1048508578@qq.com
3f7a25d25c0a7c3787b1dc6c6488f3c56fd639af
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
/sources/p019io/grpc/internal/ReflectionLongAdderCounter.java
46151b90248ccd29efbac98ec21359cb6a38e6e1
[]
no_license
TheWizard91/Album_base_source_from_JADX
946ea3a407b4815ac855ce4313b97bd42e8cab41
e1d228fc2ee550ac19eeac700254af8b0f96080a
refs/heads/master
2023-01-09T08:37:22.062350
2020-11-11T09:52:40
2020-11-11T09:52:40
311,927,971
0
0
null
null
null
null
UTF-8
Java
false
false
3,609
java
package p019io.grpc.internal; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; /* renamed from: io.grpc.internal.ReflectionLongAdderCounter */ public final class ReflectionLongAdderCounter implements LongCounter { private static final Method addMethod; private static final Constructor<?> defaultConstructor; private static final RuntimeException initializationException; private static final Logger logger = Logger.getLogger(ReflectionLongAdderCounter.class.getName()); private static final Method sumMethod; private final Object instance; static { Constructor<?> defaultConstructorLookup = null; Method addMethodLookup = null; Method sumMethodLookup = null; Throwable caught = null; try { Class<?> klass = Class.forName("java.util.concurrent.atomic.LongAdder"); int i = 0; addMethodLookup = klass.getMethod("add", new Class[]{Long.TYPE}); sumMethodLookup = klass.getMethod("sum", new Class[0]); Constructor<?>[] constructors = klass.getConstructors(); int length = constructors.length; while (true) { if (i >= length) { break; } Constructor<?> ctor = constructors[i]; if (ctor.getParameterTypes().length == 0) { defaultConstructorLookup = ctor; break; } i++; } } catch (Throwable e) { logger.log(Level.FINE, "LongAdder can not be found via reflection, this is normal for JDK7 and below", e); caught = e; } if (caught != null || defaultConstructorLookup == null) { defaultConstructor = null; addMethod = null; sumMethod = null; initializationException = new RuntimeException(caught); return; } defaultConstructor = defaultConstructorLookup; addMethod = addMethodLookup; sumMethod = sumMethodLookup; initializationException = null; } ReflectionLongAdderCounter() { RuntimeException runtimeException = initializationException; if (runtimeException == null) { try { this.instance = defaultConstructor.newInstance(new Object[0]); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e2) { throw new RuntimeException(e2); } catch (InvocationTargetException e3) { throw new RuntimeException(e3); } } else { throw runtimeException; } } static boolean isAvailable() { return initializationException == null; } public void add(long delta) { try { addMethod.invoke(this.instance, new Object[]{Long.valueOf(delta)}); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e2) { throw new RuntimeException(e2); } } public long value() { try { return ((Long) sumMethod.invoke(this.instance, new Object[0])).longValue(); } catch (IllegalAccessException e) { throw new RuntimeException(); } catch (InvocationTargetException e2) { throw new RuntimeException(); } } }
[ "agiapong@gmail.com" ]
agiapong@gmail.com
5e1bd481fba5898ba118d464e59007fdba153604
44b9505bf7bc4bdf2dd1a5f81fa1dd8fabb686f3
/spring-postgresql/src/main/java/com/spring/boot/springpostgresql/model/InsertBook.java
fee67f122cc5c693c4b67d7685c65bc10372a330
[]
no_license
dickanirwansyah/java-springboot-integrated-javascript
d9df0dfcc6596951d9b23559934757bd5722ed1d
89d180a1765db0ca66b709fac19b10ba83eb039f
refs/heads/master
2021-04-18T22:02:48.282811
2018-04-08T00:51:37
2018-04-08T00:51:37
126,830,861
0
0
null
null
null
null
UTF-8
Java
false
false
480
java
package com.spring.boot.springpostgresql.model; import com.spring.boot.springpostgresql.entity.Book; import com.spring.boot.springpostgresql.entity.Category; import lombok.*; @Getter @Setter @Data @ToString @Builder @AllArgsConstructor @NoArgsConstructor public class InsertBook { private String idbuku; private String title; private String author; private int quantity; private Category idcategory; private int price; private boolean disabled; }
[ "dickanirwansyah@gmail.com" ]
dickanirwansyah@gmail.com
a349826215976cee2ca9b5cf545985dde89caf5b
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12667-4-9-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/doc/XWikiAttachment_ESTest.java
856402c17e5a3ffcd91f303176ea059e1cc1ff64
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
1,164
java
/* * This file was automatically generated by EvoSuite * Sun Apr 05 14:55:51 UTC 2020 */ package com.xpn.xwiki.doc; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import com.xpn.xwiki.doc.XWikiAttachment; import com.xpn.xwiki.doc.XWikiDocument; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; import org.xwiki.model.reference.DocumentReference; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiAttachment_ESTest extends XWikiAttachment_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { XWikiDocument xWikiDocument0 = mock(XWikiDocument.class, new ViolatedAssumptionAnswer()); doReturn((DocumentReference) null).when(xWikiDocument0).getDocumentReference(); XWikiAttachment xWikiAttachment0 = new XWikiAttachment(xWikiDocument0, ""); // Undeclared exception! xWikiAttachment0.getReference(); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
33c4bf22078991f586ea642eebaa6be474be3c9a
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/audio/mix/d/e.java
1ae1f55dfc83b0390784f81760ba331ac38a0448
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
4,573
java
package com.tencent.mm.audio.mix.d; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.audio.mix.c.g; import com.tencent.mm.audio.mix.f.a.a; import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicBoolean; public final class e extends d { private Object cli; private a cmd; public e(com.tencent.mm.audio.mix.f.d paramd, com.tencent.mm.audio.mix.g.b paramb) { super(paramd, paramb); AppMethodBeat.i(137062); this.cli = new Object(); AppMethodBeat.o(137062); } protected final void DJ() { AppMethodBeat.i(137067); com.tencent.mm.audio.mix.h.b.i("MicroMsg.Mix.AudioDecoderMediaCodecPlay", "playBefore"); super.DJ(); if (this.cmd != null) this.cmd.reset(); AppMethodBeat.o(137067); } protected final void DK() { AppMethodBeat.i(137069); com.tencent.mm.audio.mix.h.b.i("MicroMsg.Mix.AudioDecoderMediaCodecPlay", "playAfter"); super.DK(); if (this.cmd != null) { this.cmd.Eu(); if ((this.cmd instanceof com.tencent.mm.audio.mix.f.a.b)) do { boolean bool = this.clS.get(); DD(); if (this.clT.get()) break; if (bool) { com.tencent.mm.audio.mix.h.b.i("MicroMsg.Mix.AudioDecoderMediaCodecPlay", "need resume if not stop"); this.cmd.resume(); } } while ((!this.clT.get()) && (this.clS.get())); } AppMethodBeat.o(137069); } public final void DL() { AppMethodBeat.i(137072); synchronized (this.cli) { if (this.cmd != null) this.cmd.DL(); AppMethodBeat.o(137072); return; } } public final void Dx() { AppMethodBeat.i(137065); com.tencent.mm.audio.mix.h.b.i("MicroMsg.Mix.AudioDecoderMediaCodecPlay", "pauseOnBackground"); gy(5); this.clT.set(true); this.clV.set(false); DE(); AppMethodBeat.o(137065); } public final void Dy() { } protected final void a(com.tencent.mm.audio.mix.a.c paramc, ByteBuffer paramByteBuffer, int paramInt) { AppMethodBeat.i(137070); b(paramc, paramByteBuffer, paramInt); AppMethodBeat.o(137070); } protected final void b(com.tencent.mm.audio.mix.a.c paramc) { AppMethodBeat.i(137071); if (this.clM != null) this.clM.Ds(); c(paramc); paramc.complete(); AppMethodBeat.o(137071); } protected final void c(com.tencent.mm.audio.mix.a.d paramd) { AppMethodBeat.i(137068); byte[] arrayOfByte; com.tencent.mm.audio.mix.a.c localc; if (DC().ckA) { this.sampleRate = 44100; this.channels = 2; arrayOfByte = paramd.ckv; if (!this.clQ.get()) if (this.cmd == null) { localc = DC(); if ((!localc.cky) || (localc.duration > 2000L)) break label139; } } label139: for (this.cmd = new com.tencent.mm.audio.mix.f.a.b(this.sampleRate, this.channels, localc, this); ; this.cmd = new com.tencent.mm.audio.mix.f.a.c(this.sampleRate, this.channels, localc, this)) { this.cmd.G(arrayOfByte); if (paramd.ckH) com.tencent.mm.audio.mix.b.b.Di().b(paramd); AppMethodBeat.o(137068); return; this.sampleRate = paramd.sampleRate; this.channels = paramd.channels; break; } } public final void onRelease() { AppMethodBeat.i(137063); super.onRelease(); com.tencent.mm.audio.mix.h.b.i("MicroMsg.Mix.AudioDecoderMediaCodecPlay", "releasePlayComponent"); synchronized (this.cli) { if (this.cmd != null) { this.cmd.release(); this.cmd = null; } AppMethodBeat.o(137063); return; } } public final void pause() { AppMethodBeat.i(137064); super.pause(); synchronized (this.cli) { if (this.cmd != null) this.cmd.pause(); AppMethodBeat.o(137064); return; } } public final void seek(int paramInt) { AppMethodBeat.i(137066); super.seek(paramInt); synchronized (this.cli) { if (this.cmd != null) this.cmd.seek(paramInt); AppMethodBeat.o(137066); return; } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes3-dex2jar.jar * Qualified Name: com.tencent.mm.audio.mix.d.e * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
053b5e5a09ba354b7801a45f61f352838e2f6295
901a1474f4fc9f2d71ab5698b016a1882dd0ccb1
/src/main/java/nc/gui/processor/GuiItemFluidProcessor.java
27dcd50d2b45771ab9097cdefd9c8b583bfbef06
[ "CC0-1.0" ]
permissive
Valagraven/NuclearCraft
2003479f69b67e2dfe6ab671cd889b4d6fa27cad
67d5edea3a142f712adeb97c44d25c8242b0864d
refs/heads/master
2021-05-17T00:04:52.235491
2020-03-27T05:30:24
2020-03-27T05:30:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,725
java
package nc.gui.processor; import java.util.List; import com.google.common.collect.Lists; import nc.Global; import nc.gui.NCGui; import nc.gui.element.GuiItemRenderer; import nc.init.NCItems; import nc.tile.energy.ITileEnergy; import nc.tile.processor.TileItemFluidProcessor; import nc.util.Lang; import nc.util.NCMath; import nc.util.UnitHelper; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; import net.minecraft.util.text.TextFormatting; public abstract class GuiItemFluidProcessor extends NCGui { protected final EntityPlayer player; protected final TileItemFluidProcessor tile; protected final ResourceLocation gui_textures; protected GuiItemRenderer speedUpgradeRender = null, energyUpgradeRender = null; public GuiItemFluidProcessor(String name, EntityPlayer player, TileItemFluidProcessor tile, Container inventory) { super(inventory); this.player = player; this.tile = tile; gui_textures = new ResourceLocation(Global.MOD_ID + ":textures/gui/container/" + name + ".png"); } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { String s = tile.getDisplayName().getUnformattedText(); fontRenderer.drawString(s, xSize / 2 - fontRenderer.getStringWidth(s) / 2, 6, 4210752); } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GlStateManager.color(1F, 1F, 1F, 1F); mc.getTextureManager().bindTexture(gui_textures); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); } protected int getCookProgressScaled(double pixels) { double i = tile.time; double j = tile.baseProcessTime; return j != 0D ? (int) Math.round(i * pixels / j) : 0; } @Override protected void actionPerformed(GuiButton guiButton) { /*if (tile.getWorld().isRemote) { if (guiButton != null) if (guiButton instanceof NCButton) { } }*/ } @Override public void drawEnergyTooltip(ITileEnergy tile, int mouseX, int mouseY, int x, int y, int width, int height) { if (this.tile.defaultProcessPower != 0) super.drawEnergyTooltip(tile, mouseX, mouseY, x, y, width, height); else drawNoEnergyTooltip(mouseX, mouseY, x, y, width, height); } @Override public List<String> energyInfo(ITileEnergy tile) { String energy = UnitHelper.prefix(tile.getEnergyStorage().getEnergyStored(), tile.getEnergyStorage().getMaxEnergyStored(), 5, "RF"); String power = UnitHelper.prefix(this.tile.getProcessPower(), 5, "RF/t"); String speedMultiplier = "x" + NCMath.decimalPlaces(this.tile.getSpeedMultiplier(), 2); String powerMultiplier = "x" + NCMath.decimalPlaces(this.tile.getPowerMultiplier(), 2); return Lists.newArrayList(TextFormatting.LIGHT_PURPLE + Lang.localise("gui.nc.container.energy_stored") + TextFormatting.WHITE + " " + energy, TextFormatting.LIGHT_PURPLE + Lang.localise("gui.nc.container.process_power") + TextFormatting.WHITE + " " + power, TextFormatting.AQUA + Lang.localise("gui.nc.container.speed_multiplier") + TextFormatting.WHITE + " " + speedMultiplier, TextFormatting.AQUA + Lang.localise("gui.nc.container.power_multiplier") + TextFormatting.WHITE + " " + powerMultiplier); } protected void drawUpgradeRenderers() { if (speedUpgradeRender == null) { speedUpgradeRender = new GuiItemRenderer(guiLeft + 132, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 0); } if (energyUpgradeRender == null) { energyUpgradeRender = new GuiItemRenderer(guiLeft + 152, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 1); } speedUpgradeRender.draw(); energyUpgradeRender.draw(); } }
[ "joedodd35@gmail.com" ]
joedodd35@gmail.com
0e7001d2c0c988cd8f4e122d43189044fbe23105
59226c9c8849118bfdf22bfa5eb7b1b6f804f74b
/src/main/java/demo/elastic/search/po/request/lucene/LuceneSimpleQueryStringQuery.java
7fc25c859ff7d8fdd2251d68e7e68decf8182a2f
[]
no_license
chao313/demo_elasticsearch
5356171c10119c64bd8124f875aa042c1107ce40
df69779c23289dfdd1d3009230afdcd88f49fc73
refs/heads/master
2023-08-05T03:04:51.273207
2020-12-01T08:13:28
2020-12-01T08:13:28
251,272,389
0
0
null
2023-09-05T21:57:42
2020-03-30T10:29:20
Java
UTF-8
Java
false
false
2,718
java
package demo.elastic.search.po.request.lucene; import com.fasterxml.jackson.annotation.JsonInclude; import demo.elastic.search.po.request.Query; import demo.elastic.search.po.request.ToRequestBody; import demo.elastic.search.po.request.analyze.AnalyzeRequest; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; /** * 专门用于Analyze查询的语句 * * <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-tokenizers.html"></a> */ @Data @JsonInclude(JsonInclude.Include.NON_EMPTY) @AllArgsConstructor @NoArgsConstructor public class LuceneSimpleQueryStringQuery extends ToRequestBody implements Query { private LuceneParam simple_query_string = new LuceneParam(); /** * 还有许多其他的,这里只是部分 */ @Data @AllArgsConstructor @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class LuceneParam { String query; List<String> fields; Integer minimum_should_match; AnalyzeRequest.Analyzer analyzer;//分词器 Integer tie_breaker; String default_field;//默认字段,如果没有指定字段的默认字段,默认是* -> 全部 Boolean auto_generate_synonyms_phrase_query; String type; Boolean analyze_wildcard = true; } /** * 构建 request 请求(这里默认解析通配) */ private static LuceneSimpleQueryStringQuery builderQuery(String query, List<String> fields, Integer minimum_should_match, AnalyzeRequest.Analyzer analyzer) { LuceneSimpleQueryStringQuery luceneQueryStringRequest = new LuceneSimpleQueryStringQuery(); LuceneParam luceneParam = new LuceneParam(query, fields, minimum_should_match, analyzer, null, null, null, null, true); luceneQueryStringRequest.setSimple_query_string(luceneParam); return luceneQueryStringRequest; } public static LuceneSimpleQueryStringQuery builderQuery(String query, List<String> fields, Integer minimum_should_match) { LuceneSimpleQueryStringQuery request = LuceneSimpleQueryStringQuery.builderQuery(query, fields, minimum_should_match, null); return request; } public static LuceneSimpleQueryStringQuery builderQuery(String query, List<String> fields) { LuceneSimpleQueryStringQuery request = LuceneSimpleQueryStringQuery.builderQuery(query, fields, null, null); return request; } public static LuceneSimpleQueryStringQuery builderQuery(String query) { LuceneSimpleQueryStringQuery request = LuceneSimpleQueryStringQuery.builderQuery(query, null, null, null); return request; } }
[ "m18888106873@163.com" ]
m18888106873@163.com
948e0e07ee8d7d2d24473054aa6fbc3a42fbbb52
ba48e5dc43badfa82a423a6dc4c6957faa0ceff0
/module_wang_yi_hai/src/main/java/com/xingshi/y_deal/my_pay_order/adapter/MyPayOrderBuyAdapter.java
63b2d325c8ce122888cce2fe9ecfa2c2e14f3c65
[]
no_license
sengeiou/wangyihai
048d6a880297c6605bde0bbc26857ef60463b3ac
5b21bb6b04015bfb2811b843a417d9b22fe836cb
refs/heads/master
2022-07-19T11:49:37.255494
2020-05-23T10:42:43
2020-05-23T10:42:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,596
java
package com.xingshi.y_deal.my_pay_order.adapter; import android.content.Context; import com.xingshi.adapter.MyRecyclerAdapter; import com.xingshi.adapter.RecyclerViewHolder; import com.xingshi.bean.MyPayOrderBuyBean; import com.xingshi.y_main.R; import java.util.List; public class MyPayOrderBuyAdapter extends MyRecyclerAdapter<MyPayOrderBuyBean.RecordsBean> { public MyPayOrderBuyAdapter(Context context, List<MyPayOrderBuyBean.RecordsBean> mList, int mLayoutId) { super(context, mList, mLayoutId); } @Override public void convert(RecyclerViewHolder holder, MyPayOrderBuyBean.RecordsBean data, int position) { holder.setImageFresco(R.id.my_pay_order_rec_image, data.getIcon() == null ? "" : data.getIcon()) .setText(R.id.my_pay_order_rec_type_name, data.getType() == 0 ? "买单" : "卖单") .setText(R.id.my_pay_order_rec_seller, data.getSellUserName()) .setText(R.id.my_pay_order_rec_id, data.getId() + "") .setText(R.id.my_pay_order_rec_currency, data.getNumber() + "") .setText(R.id.my_pay_order_rec_total_price, data.getTotalPrice() + "") .setText(R.id.my_pay_order_rec_state, data.getStatus() == 0 ? "待支付" : data.getStatus() == 1 ? "待确认" : data.getStatus() == 2 ? "已完成" : data.getStatus() == 3 ? "申述" : data.getStatus() == 4 ? "取消" : "冻结") .setText(R.id.my_pay_order_rec_time, data.getCreateTime()); viewOnClickListener.ViewOnClick(holder.getView(R.id.my_pay_order_rec_look_over),position); } }
[ "ellliot_zhang_z@163.com" ]
ellliot_zhang_z@163.com
acd9dc4dd33b113c5a28061d73e3c3e418b262e8
ee8019c726dc17e3e930ad6f92cfc2520e99b833
/GarminFitReader/src/main/java/com/garmin/fit/MonitoringInfoMesg.java
1dc7ce9a13fb6ecaf15581d5cc468f55ee9874df
[]
no_license
audiz/FitStore
f69602db233cac32940a17d8089f505870ddedbf
d07a88c182935eb1331934fc6a23674704c12ea8
refs/heads/main
2023-06-03T00:47:17.336096
2021-06-21T13:56:22
2021-06-21T13:56:22
368,632,322
0
1
null
null
null
null
UTF-8
Java
false
false
7,842
java
//////////////////////////////////////////////////////////////////////////////// // The following FIT Protocol software provided may be used with FIT protocol // devices only and remains the copyrighted property of Garmin Canada Inc. // The software is being provided on an "as-is" basis and as an accommodation, // and therefore all warranties, representations, or guarantees of any kind // (whether express, implied or statutory) including, without limitation, // warranties of merchantability, non-infringement, or fitness for a particular // purpose, are specifically disclaimed. // // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. // Profile Version = 21.53Release // Tag = production/akw/21.53.00-0-g1b82aa2b //////////////////////////////////////////////////////////////////////////////// package com.garmin.fit; public class MonitoringInfoMesg extends Mesg { public static final int TimestampFieldNum = 253; public static final int LocalTimestampFieldNum = 0; public static final int ActivityTypeFieldNum = 1; public static final int CyclesToDistanceFieldNum = 3; public static final int CyclesToCaloriesFieldNum = 4; public static final int RestingMetabolicRateFieldNum = 5; protected static final Mesg monitoringInfoMesg; static { // monitoring_info monitoringInfoMesg = new Mesg("monitoring_info", MesgNum.MONITORING_INFO); monitoringInfoMesg.addField(new Field("timestamp", TimestampFieldNum, 134, 1, 0, "s", false, Profile.Type.DATE_TIME)); monitoringInfoMesg.addField(new Field("local_timestamp", LocalTimestampFieldNum, 134, 1, 0, "s", false, Profile.Type.LOCAL_DATE_TIME)); monitoringInfoMesg.addField(new Field("activity_type", ActivityTypeFieldNum, 0, 1, 0, "", false, Profile.Type.ACTIVITY_TYPE)); monitoringInfoMesg.addField(new Field("cycles_to_distance", CyclesToDistanceFieldNum, 132, 5000, 0, "m/cycle", false, Profile.Type.UINT16)); monitoringInfoMesg.addField(new Field("cycles_to_calories", CyclesToCaloriesFieldNum, 132, 5000, 0, "kcal/cycle", false, Profile.Type.UINT16)); monitoringInfoMesg.addField(new Field("resting_metabolic_rate", RestingMetabolicRateFieldNum, 132, 1, 0, "kcal / day", false, Profile.Type.UINT16)); } public MonitoringInfoMesg() { super(Factory.createMesg(MesgNum.MONITORING_INFO)); } public MonitoringInfoMesg(final Mesg mesg) { super(mesg); } /** * Get timestamp field * Units: s * * @return timestamp */ public DateTime getTimestamp() { return timestampToDateTime(getFieldLongValue(253, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD)); } /** * Set timestamp field * Units: s * * @param timestamp */ public void setTimestamp(DateTime timestamp) { setFieldValue(253, 0, timestamp.getTimestamp(), Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Get local_timestamp field * Units: s * Comment: Use to convert activity timestamps to local time if device does not support time zone and daylight savings time correction. * * @return local_timestamp */ public Long getLocalTimestamp() { return getFieldLongValue(0, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Set local_timestamp field * Units: s * Comment: Use to convert activity timestamps to local time if device does not support time zone and daylight savings time correction. * * @param localTimestamp */ public void setLocalTimestamp(Long localTimestamp) { setFieldValue(0, 0, localTimestamp, Fit.SUBFIELD_INDEX_MAIN_FIELD); } public ActivityType[] getActivityType() { Short[] values = getFieldShortValues(1, Fit.SUBFIELD_INDEX_MAIN_FIELD); ActivityType[] rv = new ActivityType[values.length]; for(int i = 0; i < values.length; i++){ rv[i] = ActivityType.getByValue(values[i]); } return rv; } /** * @return number of activity_type */ public int getNumActivityType() { return getNumFieldValues(1, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Get activity_type field * * @param index of activity_type * @return activity_type */ public ActivityType getActivityType(int index) { Short value = getFieldShortValue(1, index, Fit.SUBFIELD_INDEX_MAIN_FIELD); if (value == null) { return null; } return ActivityType.getByValue(value); } /** * Set activity_type field * * @param index of activity_type * @param activityType */ public void setActivityType(int index, ActivityType activityType) { setFieldValue(1, index, activityType.value, Fit.SUBFIELD_INDEX_MAIN_FIELD); } public Float[] getCyclesToDistance() { return getFieldFloatValues(3, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * @return number of cycles_to_distance */ public int getNumCyclesToDistance() { return getNumFieldValues(3, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Get cycles_to_distance field * Units: m/cycle * Comment: Indexed by activity_type * * @param index of cycles_to_distance * @return cycles_to_distance */ public Float getCyclesToDistance(int index) { return getFieldFloatValue(3, index, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Set cycles_to_distance field * Units: m/cycle * Comment: Indexed by activity_type * * @param index of cycles_to_distance * @param cyclesToDistance */ public void setCyclesToDistance(int index, Float cyclesToDistance) { setFieldValue(3, index, cyclesToDistance, Fit.SUBFIELD_INDEX_MAIN_FIELD); } public Float[] getCyclesToCalories() { return getFieldFloatValues(4, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * @return number of cycles_to_calories */ public int getNumCyclesToCalories() { return getNumFieldValues(4, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Get cycles_to_calories field * Units: kcal/cycle * Comment: Indexed by activity_type * * @param index of cycles_to_calories * @return cycles_to_calories */ public Float getCyclesToCalories(int index) { return getFieldFloatValue(4, index, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Set cycles_to_calories field * Units: kcal/cycle * Comment: Indexed by activity_type * * @param index of cycles_to_calories * @param cyclesToCalories */ public void setCyclesToCalories(int index, Float cyclesToCalories) { setFieldValue(4, index, cyclesToCalories, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Get resting_metabolic_rate field * Units: kcal / day * * @return resting_metabolic_rate */ public Integer getRestingMetabolicRate() { return getFieldIntegerValue(5, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD); } /** * Set resting_metabolic_rate field * Units: kcal / day * * @param restingMetabolicRate */ public void setRestingMetabolicRate(Integer restingMetabolicRate) { setFieldValue(5, 0, restingMetabolicRate, Fit.SUBFIELD_INDEX_MAIN_FIELD); } }
[ "artem1911@bk.ru" ]
artem1911@bk.ru
bb83fbb79db21fce0495261fe551fb80482d1e43
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
/Variant Programs/2-4/36/developer/GrrProgrammer.java
6d3a26310afc89ebf389f835b2384a30fb71139d
[ "MIT" ]
permissive
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
42e4c2061c3f8da0dfce760e168bb9715063645f
a42ced1d5a92963207e3565860cac0946312e1b3
refs/heads/master
2020-08-09T08:10:08.888384
2019-11-25T01:14:23
2019-11-25T01:14:23
214,041,532
0
0
null
null
null
null
UTF-8
Java
false
false
2,345
java
package developer; import resellers.Device; import developer.Controller; import developer.Operation; import java.util.ArrayDeque; public class GrrProgrammer extends Controller { public static final double upwardLeaping = 0.8650475617163069; private ArrayDeque<GrrProcedure> gonnaDong = null; private int sentenceUnexpended = 0; private GrrProcedure grrProcedure = null; public GrrProgrammer() { this.gonnaDong = new ArrayDeque<>(); sentenceUnexpended = Controller.WhenValue; } public synchronized String synchronizerDescribe() { double amount = 0.44011114933322026; return "NRR:"; } public synchronized void addTock() { double bersToken = 0.7112733837502736; if (grrProcedure != null) { grrProcedure.readyFlyingDay(grrProcedure.canLengthwaysYears() + 1); sentenceUnexpended--; if (grrProcedure.canLengthwaysYears() == grrProcedure.haveSecondLarge()) { grrProcedure.rigidQuittingAmount(this.receiveContemporaryTicktack()); this.undertookProcedures.addLast(grrProcedure); grrProcedure = null; this.ballaBrigade = true; } if (sentenceUnexpended == 0 && grrProcedure != null) { if (gonnaDong.isEmpty()) { sentenceUnexpended = grrProcedure.receiveMomentAmounts(); } else { if (grrProcedure.receiveMomentAmounts() > 2) { grrProcedure.fixedOpportunityDramatic(grrProcedure.receiveMomentAmounts() - 1); } gonnaDong.addLast(grrProcedure); grrProcedure = null; this.ballaBrigade = true; } } } if (this.ballaBrigade && afootSummons == null) { this.maintainingBallaJuncture--; if (maintainingBallaJuncture == 0) { this.ballaBrigade = false; this.maintainingBallaJuncture = Device.ForwardingAgain; } } else { if (grrProcedure == null && !gonnaDong.isEmpty()) { grrProcedure = gonnaDong.removeFirst(); overloadingMechanisms(grrProcedure); grrProcedure.laidBeginningClip(this.receiveContemporaryTicktack()); sentenceUnexpended = grrProcedure.receiveMomentAmounts(); } } } public synchronized void negotiationsNew(Operation formalities) { double maineAmount = 0.43114107940539925; gonnaDong.add(new GrrProcedure(formalities)); } }
[ "hayden.cheers@me.com" ]
hayden.cheers@me.com
0eb0cfec882bf0126fef263b4c7cf50d9795173f
25d052d0aaf04d5c437375772f127e04bc732b3c
/com/google/android/gms/drive/internal/zzbk.java
fb6fc06c9607e9dceb7d1a35ce8c6604ed1ff2a0
[]
no_license
muhammed-ajmal/HseHere
6879b87a44b566321365c337c217e92f5c51a022
4667fdccc35753999c4f94793a0dbe38845fc338
refs/heads/master
2021-09-15T12:33:06.907668
2018-06-01T12:07:31
2018-06-01T12:07:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,847
java
package com.google.android.gms.drive.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; import com.google.android.gms.common.internal.safeparcel.zzb; import com.google.android.gms.drive.DriveId; public class zzbk implements Creator<OpenContentsRequest> { static void zza(OpenContentsRequest openContentsRequest, Parcel parcel, int i) { int zzav = zzb.zzav(parcel); zzb.zzc(parcel, 1, openContentsRequest.mVersionCode); zzb.zza(parcel, 2, openContentsRequest.zzaqj, i, false); zzb.zzc(parcel, 3, openContentsRequest.zzaoy); zzb.zzc(parcel, 4, openContentsRequest.zzasx); zzb.zzI(parcel, zzav); } public /* synthetic */ Object createFromParcel(Parcel parcel) { return zzbN(parcel); } public /* synthetic */ Object[] newArray(int i) { return zzdI(i); } public OpenContentsRequest zzbN(Parcel parcel) { int i = 0; int zzau = zza.zzau(parcel); DriveId driveId = null; int i2 = 0; int i3 = 0; while (parcel.dataPosition() < zzau) { DriveId driveId2; int zzg; int zzat = zza.zzat(parcel); int i4; switch (zza.zzca(zzat)) { case 1: i4 = i; i = i2; driveId2 = driveId; zzg = zza.zzg(parcel, zzat); zzat = i4; break; case 2: zzg = i3; i4 = i2; driveId2 = (DriveId) zza.zza(parcel, zzat, DriveId.CREATOR); zzat = i; i = i4; break; case 3: driveId2 = driveId; zzg = i3; i4 = i; i = zza.zzg(parcel, zzat); zzat = i4; break; case 4: zzat = zza.zzg(parcel, zzat); i = i2; driveId2 = driveId; zzg = i3; break; default: zza.zzb(parcel, zzat); zzat = i; i = i2; driveId2 = driveId; zzg = i3; break; } i3 = zzg; driveId = driveId2; i2 = i; i = zzat; } if (parcel.dataPosition() == zzau) { return new OpenContentsRequest(i3, driveId, i2, i); } throw new zza.zza("Overread allowed size end=" + zzau, parcel); } public OpenContentsRequest[] zzdI(int i) { return new OpenContentsRequest[i]; } }
[ "dev@ajmalaju.com" ]
dev@ajmalaju.com
852160cccd9be2dc5ba04a3cde919f5c8526c39d
94138ba86d0dbf80b387064064d1d86269e927a1
/group24/120509419/com/github/CJ-chen/coding2017/basic/BinaryTreeNode.java
ff40538e64a2e45b14ce62c5738aa7db6eb663a6
[]
no_license
DonaldY/coding2017
2aa69b8a2c2990b0c0e02c04f50eef6cbeb60d42
0e0c386007ef710cfc90340cbbc4e901e660f01c
refs/heads/master
2021-01-17T20:14:47.101234
2017-06-01T00:19:19
2017-06-01T00:19:19
84,141,024
2
28
null
2017-06-01T00:19:20
2017-03-07T01:45:12
Java
UTF-8
Java
false
false
2,128
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 javaclass; /** * * @author CJ */ public class BinaryTreeNode { private Object data; private BinaryTreeNode left; private BinaryTreeNode right; public Object getData() { return data; } public void setData(Object data) { this.data = data; } public BinaryTreeNode getLeft() { return left; } public void setLeft(BinaryTreeNode left) { this.left = left; } public BinaryTreeNode getRight() { return right; } public void setRight(BinaryTreeNode right) { this.right = right; } public BinaryTreeNode insert(Object o) { // 应该只需要实现这个就可以了 int curValue = (Integer) this.getData(); int insertValue = (Integer) o; BinaryTreeNode newNode = new BinaryTreeNode(); newNode.setData(o); if (curValue > insertValue) { if (this.getLeft() != null) { return this.getLeft().insert(o); } else { this.setLeft(newNode); return this; } } else{ if (this.getRight() != null) { return this.getRight().insert(o); } else { this.setRight(newNode); return this; } } } public String toString() { StringBuilder sb = new StringBuilder(); sb.append(this.getData()).append("\n"); sb.append(this.getLeft()).append("<--").append(this.getData()).append("\n"); sb.append(this.getData()).append("-->").append(this.getRight()).append("\n"); return sb.toString(); } public static void main(String[] args) { BinaryTreeNode btn = new BinaryTreeNode(); btn.setData(5); // btn.insert(5); btn.insert(7); btn.insert(8); btn.insert(9); btn.insert(4); System.err.println(btn); } }
[ "448641125@qq.com" ]
448641125@qq.com
be7bf97ec0cf8b93f1cc14731cf4e850e9f5c267
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/iRobot_com.irobot.home/javafiles/com/irobot/home/BetaFeaturesActivity_$a.java
4ccce65c15be805a66ede7060c8956d30ffc22a2
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
3,685
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.irobot.home; import android.app.Activity; import android.content.Context; import android.support.v4.app.ActivityCompat; import android.support.v4.app.Fragment; import org.androidannotations.api.a.a; import org.androidannotations.api.a.e; // Referenced classes of package com.irobot.home: // BetaFeaturesActivity_ public static class BetaFeaturesActivity_$a extends a { public e a(int i) { if(e != null) //* 0 0:aload_0 //* 1 1:getfield #21 <Field Fragment e> //* 2 4:ifnull 22 e.startActivityForResult(c, i); // 3 7:aload_0 // 4 8:getfield #21 <Field Fragment e> // 5 11:aload_0 // 6 12:getfield #25 <Field android.content.Intent c> // 7 15:iload_1 // 8 16:invokevirtual #31 <Method void Fragment.startActivityForResult(android.content.Intent, int)> else //* 9 19:goto 95 if(d != null) //* 10 22:aload_0 //* 11 23:getfield #33 <Field android.app.Fragment d> //* 12 26:ifnull 48 d.startActivityForResult(c, i, a); // 13 29:aload_0 // 14 30:getfield #33 <Field android.app.Fragment d> // 15 33:aload_0 // 16 34:getfield #25 <Field android.content.Intent c> // 17 37:iload_1 // 18 38:aload_0 // 19 39:getfield #36 <Field android.os.Bundle a> // 20 42:invokevirtual #41 <Method void android.app.Fragment.startActivityForResult(android.content.Intent, int, android.os.Bundle)> else //* 21 45:goto 95 if(b instanceof Activity) //* 22 48:aload_0 //* 23 49:getfield #45 <Field Context b> //* 24 52:instanceof #47 <Class Activity> //* 25 55:ifeq 80 ActivityCompat.startActivityForResult((Activity)b, c, i, a); // 26 58:aload_0 // 27 59:getfield #45 <Field Context b> // 28 62:checkcast #47 <Class Activity> // 29 65:aload_0 // 30 66:getfield #25 <Field android.content.Intent c> // 31 69:iload_1 // 32 70:aload_0 // 33 71:getfield #36 <Field android.os.Bundle a> // 34 74:invokestatic #52 <Method void ActivityCompat.startActivityForResult(Activity, android.content.Intent, int, android.os.Bundle)> else //* 35 77:goto 95 b.startActivity(c, a); // 36 80:aload_0 // 37 81:getfield #45 <Field Context b> // 38 84:aload_0 // 39 85:getfield #25 <Field android.content.Intent c> // 40 88:aload_0 // 41 89:getfield #36 <Field android.os.Bundle a> // 42 92:invokevirtual #58 <Method void Context.startActivity(android.content.Intent, android.os.Bundle)> return new e(b); // 43 95:new #60 <Class e> // 44 98:dup // 45 99:aload_0 // 46 100:getfield #45 <Field Context b> // 47 103:invokespecial #62 <Method void e(Context)> // 48 106:areturn } private android.app.Fragment d; private Fragment e; public BetaFeaturesActivity_$a(Context context) { super(context, com/irobot/home/BetaFeaturesActivity_); // 0 0:aload_0 // 1 1:aload_1 // 2 2:ldc1 #7 <Class BetaFeaturesActivity_> // 3 4:invokespecial #17 <Method void a(Context, Class)> // 4 7:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
eae007e15097e4feff959dccf952c5d31f20f48b
d18113810c13e7f3378ad6d153fc18ee28bd8fc0
/src/org/training/itracker/dao/CommentDAO.java
428e8664b3891bc44f7909af18cb222a27e67804
[]
no_license
Thanx7/iTrackerSpring
3c5f9524cb766a3b31ed30069d5179aff70bbd8d
2d1ca9bd10ab72f36b120ae7e253415234198e52
refs/heads/master
2021-01-25T12:01:36.543232
2014-08-25T10:21:40
2014-08-25T10:21:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
158
java
package org.training.itracker.dao; import org.training.itracker.beans.Comment; public interface CommentDAO { void saveComment(Comment comment); }
[ "Aliaksandr_Doubeikovsky@epam.com" ]
Aliaksandr_Doubeikovsky@epam.com
4e3f88d7bf097d3244900f930f4e76740645a833
135f85e9989cd11548f96e4668dd4acb55db41ac
/BipIDE/src/com/dc/bip/ide/gef/model/AbstractModel.java
29dfadc5779bd4b11f50b5ea9c387788726b92b8
[]
no_license
zcdyx88/SmartBipIDE3
de7dd6821df0ccdd4bed0f5a345c301066ff4346
b8b8c7a46a8c66ab77ff2c4c0d7d082dc34978fc
refs/heads/master
2021-01-11T04:15:19.347831
2016-10-21T03:50:57
2016-10-21T03:50:57
71,221,613
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
package com.dc.bip.ide.gef.model; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; public class AbstractModel { private PropertyChangeSupport listeners = new PropertyChangeSupport(this); public void addPropertyChangeListener(PropertyChangeListener listener) { listeners.addPropertyChangeListener(listener); } public void removePropertyChangeListener(PropertyChangeListener listener) { listeners.removePropertyChangeListener(listener); } public void firePropertyChange(String propertyName, Object oldValue, Object newValue) { listeners.firePropertyChange(propertyName, oldValue, newValue); } }
[ "you@example.com" ]
you@example.com
7b35f0d26b507faef3a06e8a05faac20d4aae96e
7744b38ac4c00bed926137a30014fd92d7fc9214
/lib/src/main/java/com/summer/lib/view/charting/interfaces/dataprovider/CombinedDataProvider.java
c179beceae3b18c89a35860e04c7f7fd977da1f6
[]
no_license
canvaser/App
173b53638231d165e98316262d654ad246cb5af6
c8956766c16677bda1ae42691d958de155a2d0e3
refs/heads/master
2021-01-22T08:47:42.713548
2017-04-19T03:59:44
2017-04-19T03:59:44
81,914,207
1
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.summer.lib.view.charting.interfaces.dataprovider; import com.summer.lib.view.charting.data.CombinedData; /** * Created by philipp on 11/06/16. */ public interface CombinedDataProvider extends LineDataProvider, BarDataProvider, BubbleDataProvider, CandleDataProvider, ScatterDataProvider { CombinedData getCombinedData(); }
[ "18721607438@163.com" ]
18721607438@163.com
f19634afc2149eca547f2babf20dd8033501822f
29266b45a32e3ee37a465c1547669ff05e40c4ef
/aliyun-java-sdk-arms/src/main/java/com/aliyuncs/arms/model/v20190808/OpenArmsDefaultSLRRequest.java
70bc6e15de502e9004bae74ebe62b06a31bd1ef3
[ "Apache-2.0" ]
permissive
soochowLeo/aliyun-openapi-java-sdk
2a4f2dd0fe755c9c9c1e2b07cc27c3dd1366afbe
e120e1d4953202ecc494dbc505d906d20e258ea6
refs/heads/master
2023-04-06T22:04:47.858224
2021-04-15T10:25:59
2021-04-15T10:25:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,360
java
/* * 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.aliyuncs.arms.model.v20190808; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.arms.Endpoint; /** * @author auto create * @version */ public class OpenArmsDefaultSLRRequest extends RpcAcsRequest<OpenArmsDefaultSLRResponse> { public OpenArmsDefaultSLRRequest() { super("ARMS", "2019-08-08", "OpenArmsDefaultSLR"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } @Override public Class<OpenArmsDefaultSLRResponse> getResponseClass() { return OpenArmsDefaultSLRResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
6d1af538a3ae682a5081795d17dbd2181841b8ad
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-481-63-7-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/security/authorization/DefaultAuthorExecutor_ESTest_scaffolding.java
71510043f7141b564b0e2089bec4bc003c656b45
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 02 10:09:28 UTC 2020 */ package com.xpn.xwiki.internal.security.authorization; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultAuthorExecutor_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
f99b42d018e36c476a0a8d80f47e8926d13d5374
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/reid_cloud-20201027/src/main/java/com/aliyun/reid_cloud20201027/models/CopyStoresResponseBody.java
ff561f882c97291c2f25377cdd7ca3ba5464a234
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
2,840
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.reid_cloud20201027.models; import com.aliyun.tea.*; public class CopyStoresResponseBody extends TeaModel { @NameInMap("RequestId") public String requestId; @NameInMap("Message") public String message; @NameInMap("DynamicCode") public String dynamicCode; @NameInMap("ErrorCode") public String errorCode; @NameInMap("DynamicMessage") public String dynamicMessage; @NameInMap("ErrorMessage") public String errorMessage; @NameInMap("Code") public String code; @NameInMap("Success") public Boolean success; @NameInMap("ShadowStoreIds") public java.util.List<Long> shadowStoreIds; public static CopyStoresResponseBody build(java.util.Map<String, ?> map) throws Exception { CopyStoresResponseBody self = new CopyStoresResponseBody(); return TeaModel.build(map, self); } public CopyStoresResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public CopyStoresResponseBody setMessage(String message) { this.message = message; return this; } public String getMessage() { return this.message; } public CopyStoresResponseBody setDynamicCode(String dynamicCode) { this.dynamicCode = dynamicCode; return this; } public String getDynamicCode() { return this.dynamicCode; } public CopyStoresResponseBody setErrorCode(String errorCode) { this.errorCode = errorCode; return this; } public String getErrorCode() { return this.errorCode; } public CopyStoresResponseBody setDynamicMessage(String dynamicMessage) { this.dynamicMessage = dynamicMessage; return this; } public String getDynamicMessage() { return this.dynamicMessage; } public CopyStoresResponseBody setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; return this; } public String getErrorMessage() { return this.errorMessage; } public CopyStoresResponseBody setCode(String code) { this.code = code; return this; } public String getCode() { return this.code; } public CopyStoresResponseBody setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } public CopyStoresResponseBody setShadowStoreIds(java.util.List<Long> shadowStoreIds) { this.shadowStoreIds = shadowStoreIds; return this; } public java.util.List<Long> getShadowStoreIds() { return this.shadowStoreIds; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f904c53808dae9186e53990c7d89f8e62fa58419
02a037648fb37c5090c53b202c1076bbc6866c3f
/security/security-rbac/src/main/java/com/zos/security/rbac/support/constance/ResponseCode.java
7de878a2237e7d410aeee27dd764b0d97f455c8d
[]
no_license
zostudio/01Studio
373066fd0de5960ce3482d6634b60d9ea80af859
d41e649a82af6b9c9991bacae2452075d1f6308b
refs/heads/master
2020-03-09T10:19:44.399431
2018-10-25T03:34:28
2018-10-25T03:34:28
122,426,876
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package com.zos.security.rbac.support.constance; import org.springframework.http.HttpStatus; public interface ResponseCode { /** * 服务成功处理 */ public final Integer SUCCESS = HttpStatus.OK.value(); /** * 服务处理失败 */ public final Integer FAIL = HttpStatus.INTERNAL_SERVER_ERROR.value(); /** * 请求的数据不存在 */ public final Integer INVALID = HttpStatus.BAD_REQUEST.value(); }
[ "wangrupeng@foxmail.com" ]
wangrupeng@foxmail.com
434be9b616f5572282736c8b733cfe730e63cc0a
0d4f05c9909695a166e97b8958680945ea5c1266
/src/minecraft/tv/twitch/broadcast/PixelFormat.java
e68a906e4387f6d09ca609facdb909723d54b31a
[]
no_license
MertDundar1/ETB-0.6
31f3f42f51064ffd7facaa95cf9b50d0c2d71995
145d008fed353545157cd0e73daae8bc8d7f50b9
refs/heads/master
2022-01-15T08:42:12.762634
2019-05-15T23:37:33
2019-05-15T23:37:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package tv.twitch.broadcast; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; public enum PixelFormat { TTV_PF_BGRA(66051), TTV_PF_ABGR(16909056), TTV_PF_RGBA(33619971), TTV_PF_ARGB(50462976); static { s_Map = new HashMap(); EnumSet localEnumSet = EnumSet.allOf(PixelFormat.class); for (PixelFormat localPixelFormat : localEnumSet) { s_Map.put(Integer.valueOf(localPixelFormat.getValue()), localPixelFormat); } } public static PixelFormat lookupValue(int paramInt) { PixelFormat localPixelFormat = (PixelFormat)s_Map.get(Integer.valueOf(paramInt)); return localPixelFormat; } private static Map<Integer, PixelFormat> s_Map; private int m_Value; private PixelFormat(int paramInt) { m_Value = paramInt; } public int getValue() { return m_Value; } }
[ "realhcfus@gmail.com" ]
realhcfus@gmail.com
1b52e69c019aee7ae8db354d6cb3fc1b80340ff8
51fa3cc281eee60058563920c3c9059e8a142e66
/Java/src/testcases/CWE134_Uncontrolled_Format_String/s01/CWE134_Uncontrolled_Format_String__PropertiesFile_printf_72a.java
a89f55de87575d02f8822b8748f29d748fe3f483
[]
no_license
CU-0xff/CWE-Juliet-TestSuite-Java
0b4846d6b283d91214fed2ab96dd78e0b68c945c
f616822e8cb65e4e5a321529aa28b79451702d30
refs/heads/master
2020-09-14T10:41:33.545462
2019-11-21T07:34:54
2019-11-21T07:34:54
223,105,798
1
4
null
null
null
null
UTF-8
Java
false
false
5,033
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE134_Uncontrolled_Format_String__PropertiesFile_printf_72a.java Label Definition File: CWE134_Uncontrolled_Format_String.label.xml Template File: sources-sinks-72a.tmpl.java */ /* * @description * CWE: 134 Uncontrolled Format String * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded string * Sinks: printf * GoodSink: dynamic printf format with string defined * BadSink : dynamic printf without validation * Flow Variant: 72 Data flow: data passed in a Vector from one method to another in different source files in the same package * * */ package testcases.CWE134_Uncontrolled_Format_String.s01; import testcasesupport.*; import java.util.Vector; import java.util.Properties; import java.io.FileInputStream; import java.io.IOException; import java.util.logging.Level; public class CWE134_Uncontrolled_Format_String__PropertiesFile_printf_72a extends AbstractTestCase { public void bad() throws Throwable { String data; data = ""; /* Initialize data */ /* retrieve the property */ { Properties properties = new Properties(); FileInputStream streamFileInput = null; try { streamFileInput = new FileInputStream("../common/config.properties"); properties.load(streamFileInput); /* POTENTIAL FLAW: Read data from a .properties file */ data = properties.getProperty("data"); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading object */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } Vector<String> dataVector = new Vector<String>(5); dataVector.add(0, data); dataVector.add(1, data); dataVector.add(2, data); (new CWE134_Uncontrolled_Format_String__PropertiesFile_printf_72b()).badSink(dataVector ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use GoodSource and BadSink */ private void goodG2B() throws Throwable { String data; /* FIX: Use a hardcoded string */ data = "foo"; Vector<String> dataVector = new Vector<String>(5); dataVector.add(0, data); dataVector.add(1, data); dataVector.add(2, data); (new CWE134_Uncontrolled_Format_String__PropertiesFile_printf_72b()).goodG2BSink(dataVector ); } /* goodB2G() - use BadSource and GoodSink */ private void goodB2G() throws Throwable { String data; data = ""; /* Initialize data */ /* retrieve the property */ { Properties properties = new Properties(); FileInputStream streamFileInput = null; try { streamFileInput = new FileInputStream("../common/config.properties"); properties.load(streamFileInput); /* POTENTIAL FLAW: Read data from a .properties file */ data = properties.getProperty("data"); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading object */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } Vector<String> dataVector = new Vector<String>(5); dataVector.add(0, data); dataVector.add(1, data); dataVector.add(2, data); (new CWE134_Uncontrolled_Format_String__PropertiesFile_printf_72b()).goodB2GSink(dataVector ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
7a0ad59e3f004670a03175d3e6e114e0e5598569
9a748dba7670f7f2690a7def2c038c3dece0c55b
/config-editor/config-editor-core/src/main/java/uk/co/gresearch/siembol/configeditor/testcase/TestCaseEvaluator.java
1d812ffa236fe89d12c8e29a6b593cc67e5ea50e
[ "Apache-2.0" ]
permissive
76creates/siembol
e3bd1b7400771a9a5bea8c5608e02f0be6b6135e
15021abc5761490980b314994b8f3e52da4fd172
refs/heads/master
2023-07-13T08:12:33.482767
2021-08-10T11:25:06
2021-08-10T11:25:06
375,778,175
0
0
Apache-2.0
2021-07-14T16:38:10
2021-06-10T17:27:58
Java
UTF-8
Java
false
false
324
java
package uk.co.gresearch.siembol.configeditor.testcase; import uk.co.gresearch.siembol.configeditor.model.ConfigEditorResult; public interface TestCaseEvaluator { ConfigEditorResult evaluate(String jsonResult, String testCase); ConfigEditorResult validate(String testCase); ConfigEditorResult getSchema(); }
[ "noreply-git@uberit.net" ]
noreply-git@uberit.net
03a4a9f54b573317af5b19d547ee5b4705d8449c
ef2353938ae7dc7bd90fe01805644c2acab16e82
/app/src/main/java/com/gchc/ing/question/common/QuestionnaireListView_Adapter.java
5f5ce488d345b6e9a013a1628611bac161c3c298
[]
no_license
tddyko/HealthCareSolution_
f3d2d59b1532aa46399b9b475b24d05d880675b2
7315bdcc7837851e53e14e4800d42661fb245615
refs/heads/master
2023-07-28T19:45:18.401124
2021-09-25T09:32:45
2021-09-25T09:32:45
410,231,027
0
0
null
null
null
null
UTF-8
Java
false
false
3,918
java
package com.gchc.ing.question.common; 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 com.gchc.ing.R; import com.gchc.ing.question.QuestionnaireActivity; /** * 질문 리스트뷰 어댑터. */ public class QuestionnaireListView_Adapter extends BaseAdapter { private QuestionnaireActivity mQuestionnaireActivity; private UserInfo user = null; public QuestionnaireListView_Adapter(QuestionnaireActivity activity) { mQuestionnaireActivity = activity; user = new UserInfo(activity.getContext()); } @Override public int getCount() { return 10; } @Override public Object getItem(int position) { return position; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { holder = new ViewHolder(); LayoutInflater inflater = (LayoutInflater) mQuestionnaireActivity.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = inflater.inflate(R.layout.item_questionnaire_listview, null); holder.item_question_TextView_title = (TextView) convertView.findViewById(R.id.item_question_TextView_title); holder.item_question_TextView_level = (TextView) convertView.findViewById(R.id.item_question_TextView_level); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } switch (position) { case 0: holder.item_question_TextView_title.setText("골다공증 발생 위험도"); break; case 1: holder.item_question_TextView_title.setText("폐암 발생 위험도"); break; case 2: holder.item_question_TextView_title.setText("뇌졸중 발생 위험도"); break; case 3: holder.item_question_TextView_title.setText("대장암 발생 위험도"); break; case 4: holder.item_question_TextView_title.setText("당뇨병 발생 위험도"); break; case 5: holder.item_question_TextView_title.setText("자궁경부암 발생 위험도"); break; case 6: holder.item_question_TextView_title.setText("심장병 발생 위험도"); break; case 7: holder.item_question_TextView_title.setText("암 발생 위험도"); break; case 8: holder.item_question_TextView_title.setText("난소암 발생 위험도"); break; case 9: holder.item_question_TextView_title.setText("구강암 발생 위험도"); break; } holder.item_question_TextView_level.setText(getLevel(position + 1)); return convertView; } @Override public void notifyDataSetChanged() { super.notifyDataSetChanged(); user = new UserInfo(mQuestionnaireActivity.getContext()); } public class ViewHolder { public TextView item_question_TextView_title, item_question_TextView_level; } private String getLevel(int no) { switch (user.getQuestionLevel(no)) { case 0: return "체크하기"; case 1: return "높음"; case 2: return "중간"; case 3: return "낮음"; case 4: return "매우낮음"; } return "체크하기"; } }
[ "corian1516@gmail.com" ]
corian1516@gmail.com
209f56a436a7a51f7eab5e989a858fb6b01f2cbb
cec3f3f20b23abbd31c602353ca00aded2880006
/src/main/java/org/bian/dto/BQAuthoringRetrieveOutputModelRegulatoryComplianceAdministrativePlanInstanceRecordRegulatoryReportingSchedule.java
4511a3a4f77233ab7661b77d81d0045b8fd5c65f
[ "Apache-2.0" ]
permissive
bianapis/sd-regulatory-reporting-v2.0
7b0747ac3f2ff1db5b1437a1d1fcbe5d0dc1e6a5
9813f9a7f587d8be03e67a3c2ad21b3746feeef2
refs/heads/master
2020-07-14T03:20:04.091828
2019-09-05T10:00:12
2019-09-05T10:00:12
205,224,636
0
0
null
null
null
null
UTF-8
Java
false
false
1,692
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; /** * BQAuthoringRetrieveOutputModelRegulatoryComplianceAdministrativePlanInstanceRecordRegulatoryReportingSchedule */ public class BQAuthoringRetrieveOutputModelRegulatoryComplianceAdministrativePlanInstanceRecordRegulatoryReportingSchedule { private String regulationReference = null; private String regulatoryReportType = null; /** * `status: Registered` iso-link: https://www.iso20022.org/standardsrepository/public/wqt/Description/mx/dico/bc/_9jSw8nltEeG7BsjMvd1mEw_1652971177 bian-reference: Regulation general-info: Reference to the regulation for which content is being collected * @return regulationReference **/ public String getRegulationReference() { return regulationReference; } public void setRegulationReference(String regulationReference) { this.regulationReference = regulationReference; } /** * `status: Registered` iso-link: https://www.iso20022.org/standardsrepository/public/wqt/Description/mx/dico/bc/_FDYMVMTGEeChad0JzLk7QA_-1222522700/elements/_FDh9UMTGEeChad0JzLk7QA_-463914375 bian-reference: RegulatoryReport (as Report).ReportType general-info: The types of report, included in the reporting schedule * @return regulatoryReportType **/ public String getRegulatoryReportType() { return regulatoryReportType; } public void setRegulatoryReportType(String regulatoryReportType) { this.regulatoryReportType = regulatoryReportType; } }
[ "team1@bian.org" ]
team1@bian.org
72d47cabd54bc0bdcd42b77f037c90c6a7f35d41
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/modelcdntran/a$i.java
8071555c2d2ceefc1075926ccc04614ab835b056
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
637
java
package com.tencent.mm.modelcdntran; import com.tencent.mm.kernel.mvvm.MvvmPlugin; import com.tencent.mm.sdk.coroutines.LifecycleScope; import kotlin.Metadata; import kotlin.g.a.a; import kotlin.g.b.u; @Metadata(d1={""}, d2={"<anonymous>", "Lcom/tencent/mm/sdk/coroutines/LifecycleScope;"}, k=3, mv={1, 5, 1}, xi=48) final class a$i extends u implements a<LifecycleScope> { a$i(MvvmPlugin paramMvvmPlugin) { super(0); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar * Qualified Name: com.tencent.mm.modelcdntran.a.i * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
72cbea2c49fae597a2dbdc34191b1133bc02410f
77e36d45bf2bebe32b9140377333f55eddc0658c
/axiom-jakarta-activation/src/test/java/org/apache/axiom/util/activation/DataHandlerContentTypeProviderTest.java
9ab0950cc1c571cb10e13a767c64b79116d86e2e
[ "Apache-2.0" ]
permissive
apache/ws-axiom
bf86f8ef27fef7af972e69d4f121a5ab7a6127d2
ee57a30acd937e9060886646ecc66c47f7920cbc
refs/heads/master
2023-08-29T18:38:44.950025
2023-08-23T03:36:48
2023-08-24T18:29:51
218,784,651
7
22
null
2023-09-14T03:46:57
2019-10-31T14:26:11
Java
UTF-8
Java
false
false
3,134
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.util.activation; import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import jakarta.activation.DataHandler; import jakarta.activation.DataSource; import org.apache.axiom.blob.Blobs; import org.apache.axiom.mime.ContentType; import org.apache.axiom.mime.MediaType; import org.junit.jupiter.api.Test; public class DataHandlerContentTypeProviderTest { @Test public void testNotDataHandler() { assertThat( DataHandlerContentTypeProvider.INSTANCE.getContentType( Blobs.createBlob(new byte[10]))) .isNull(); } @Test public void testDataHandlerWithoutContentType() { DataHandler dh = new DataHandler( new DataSource() { @Override public InputStream getInputStream() throws IOException { throw new UnsupportedOperationException(); } @Override public OutputStream getOutputStream() throws IOException { throw new UnsupportedOperationException(); } @Override public String getContentType() { return null; } @Override public String getName() { throw new UnsupportedOperationException(); } }); assertThat( DataHandlerContentTypeProvider.INSTANCE.getContentType( DataHandlerUtils.toBlob(dh))) .isNull(); } @Test public void testDataHandlerWithContentType() { DataHandler dh = new DataHandler("test", "text/plain"); ContentType contentType = DataHandlerContentTypeProvider.INSTANCE.getContentType(DataHandlerUtils.toBlob(dh)); assertThat(contentType).isNotNull(); assertThat(contentType.getMediaType()).isEqualTo(MediaType.TEXT_PLAIN); } }
[ "andreas.veithen@gmail.com" ]
andreas.veithen@gmail.com
bf23b3f157a21e1a460c7d03c28f9238ee9fe4ec
7361846e16b9f439f692cd366ed9b8238bd74d34
/kulun_new/app/src/main/java/com/kulun/energynet/ui/activity/more/ChangePasswordActivity.java
9106965f95574c860f03ab3d04062d8761940be2
[]
no_license
wannaRunaway/btwork
9cfcb336e23c6805ee0efe315a4266b8e8f69744
e22f47660c1ef5696024419008a9aa1f6333b267
refs/heads/master
2023-07-14T08:35:04.472645
2021-08-30T12:13:11
2021-08-30T12:13:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,532
java
package com.kulun.energynet.ui.activity.more; import android.content.SharedPreferences; import android.os.Bundle; import android.view.View; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.databinding.DataBindingUtil; import com.kulun.energynet.R; import com.kulun.energynet.databinding.ActivityChangePasswordBinding; import com.kulun.energynet.model.User; import com.kulun.energynet.model.loginmodel.SmscodeModel; import com.kulun.energynet.network.api.API; import com.kulun.energynet.utils.GsonUtils; import com.kulun.energynet.utils.MD5; import com.kulun.energynet.utils.Utils; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; import com.loopj.android.http.PersistentCookieStore; import com.loopj.android.http.RequestParams; import org.apache.http.Header; /** * created by xuedi on 2019/4/18 */ public class ChangePasswordActivity extends AppCompatActivity implements View.OnClickListener { private ActivityChangePasswordBinding binding; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = DataBindingUtil.setContentView(this, R.layout.activity_change_password); binding.tvBack.setOnClickListener(this); binding.tvLogin.setOnClickListener(this); } @Override public void onClick(View view) { switch (view.getId()) { case R.id.tv_back: finish(); break; case R.id.tv_login: changePassword(); break; default: break; } } private void changePassword() { /** * phone * [string] 是 手机 * pwd * [string] 是 新密码 * oldPwd复制 * [string] 原密码(用于使用原密码修改密码) * code * [string] 验证码(用于短信验证码修改密码) */ String oldPassword = binding.etPasswordOld.getText().toString(); String newPassword = binding.etPasswordNew.getText().toString(); String confirmPassword = binding.etPasswordConfirm.getText().toString(); if (oldPassword.isEmpty()||newPassword.isEmpty()||confirmPassword.isEmpty()){ Utils.toast(this, "密码不能为空"); return; } if (!newPassword.equals(confirmPassword)){ Utils.toast(this, "新密码和再次输入密码不同,请检查"); return; } if (oldPassword.length() < 6 || newPassword.length() < 6 || confirmPassword.length() <6 ){ Utils.toast(this, "密码长度不能小于6位"); return; } final String url = API.BASE_URL + API.URL_NEW_USER_REGISTER; final RequestParams requestParams = new RequestParams(); SharedPreferences preferences = getSharedPreferences("data",this.MODE_PRIVATE); String phone = preferences.getString("phone", ""); requestParams.add("phone", phone); requestParams.add("oldPwd", MD5.encode(oldPassword)); requestParams.add("pwd", MD5.encode(confirmPassword)); requestParams.add("type", "2"); requestParams.add("accountId", String.valueOf(User.getInstance().getAccountId())); AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); PersistentCookieStore persistentCookieStore = new PersistentCookieStore(this); asyncHttpClient.setCookieStore(persistentCookieStore); asyncHttpClient.post(url, requestParams, new AsyncHttpResponseHandler() { @Override public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) { String json = new String(responseBody); Utils.log(url, requestParams, json); SmscodeModel smscodeModel = GsonUtils.getInstance().fromJson(json, SmscodeModel.class); Utils.toast(ChangePasswordActivity.this, smscodeModel.getMsg()+""); if (smscodeModel.isSuccess()){ finish(); }else { Utils.toast(ChangePasswordActivity.this, smscodeModel.getMsg()); } } @Override public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { Utils.toast(ChangePasswordActivity.this, "无法连接服务器"); } }); } }
[ "xuedicr7@gmail.com" ]
xuedicr7@gmail.com
daaeeca5ca7902581599a5ccaa5c12f793be7fec
8bf67e3dde92e88447c607f9a1a2665778918e7d
/cloud-biz-core/src/main/java/com/qweib/cloud/core/domain/product/TempProductQuery.java
bde524aa8d79066b772d1051093e37f2a5069d4d
[]
no_license
yeshenggen532432/test02
1f87235ba8822bd460f7c997dd977c3e68371898
52279089299a010f99c60bc6656476d68f19050f
refs/heads/master
2022-12-11T01:38:24.097948
2020-09-07T06:36:51
2020-09-07T06:36:51
293,404,392
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package com.qweib.cloud.core.domain.product; import lombok.Data; /** * Description: * * @author zeng.gui * Created on 2019/5/21 - 12:13 */ @Data public class TempProductQuery { /** * 记录 id */ private Integer recordId; /** * 产品名称 */ private String productName; }
[ "1617683532@qq.com" ]
1617683532@qq.com
482bf3689b1cab98737e2df3e1ed61d30a5340f7
243eaf02e124f89a21c5d5afa707db40feda5144
/src/com/tencent/qqpim/interfaces/IConfigDao.java
c4903077efff79e0e6e64acc8a55ec7e42bad379
[]
no_license
laohanmsa/WeChatRE
e6671221ac6237c6565bd1aae02f847718e4ac9d
4b249bce4062e1f338f3e4bbee273b2a88814bf3
refs/heads/master
2020-05-03T08:43:38.647468
2013-05-18T14:04:23
2013-05-18T14:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,533
java
package com.tencent.qqpim.interfaces; public abstract interface IConfigDao { public static final int MAX_ACTION_SUM = 50; public abstract void addActionStaticData(int paramInt, long paramLong); public abstract boolean getBooleanValue(IConfigDao.ConfigValueTag paramConfigValueTag); public abstract boolean getBooleanValue(IConfigDao.ConfigValueTag paramConfigValueTag, boolean paramBoolean); public abstract float getFloatValue(IConfigDao.ConfigValueTag paramConfigValueTag); public abstract int getIntValue(IConfigDao.ConfigValueTag paramConfigValueTag); public abstract String getLC(); public abstract long getLongValue(IConfigDao.ConfigValueTag paramConfigValueTag); public abstract String getStringValue(IConfigDao.ConfigValueTag paramConfigValueTag); public abstract boolean loadLibrary(String paramString); public abstract void setBooleanValue(IConfigDao.ConfigValueTag paramConfigValueTag, boolean paramBoolean); public abstract void setFloatValue(IConfigDao.ConfigValueTag paramConfigValueTag, float paramFloat); public abstract void setIntValue(IConfigDao.ConfigValueTag paramConfigValueTag, int paramInt); public abstract void setLongValue(IConfigDao.ConfigValueTag paramConfigValueTag, long paramLong); public abstract void setStringValue(IConfigDao.ConfigValueTag paramConfigValueTag, String paramString); } /* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar * Qualified Name: com.tencent.qqpim.interfaces.IConfigDao * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
1438dd26515c1f9ace84ef633ce526d67b674212
96623967c5a4b95ed88fc9f97d8503ce2ff643df
/src/main/java/org/encog/ml/train/strategy/end/SimpleEarlyStoppingStrategy.java
42a623df06e68a685453015c15a08fe8c61f6129
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
zluo/encog-java-core
fa4280629c5c30747181e9b81b1b828197af7db4
47e895be81cc4eb5d2a0a6009c5cf2df36a72279
refs/heads/master
2021-01-24T21:19:49.783468
2014-09-23T18:08:06
2014-09-23T18:08:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,131
java
/* * Encog(tm) Core v3.2 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2013 Heaton Research, 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. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.ml.train.strategy.end; import org.encog.ml.MLError; import org.encog.ml.data.MLDataSet; import org.encog.ml.train.MLTrain; /** * A simple early stopping strategy that halts training when the validation set no longer improves. */ public class SimpleEarlyStoppingStrategy implements EndTrainingStrategy { /** * The validation set. */ private MLDataSet validationSet; /** * The trainer. */ private MLTrain train; /** * Has training stopped. */ private boolean stop; /** * Current training error. */ private double trainingError; /** * Current validation error. */ private double lastValidationError; /** * The error calculation. */ private MLError calc; private int checkFrequency; private int lastCheck; private double lastError; public SimpleEarlyStoppingStrategy(MLDataSet theValidationSet) { this(theValidationSet, 5); } public SimpleEarlyStoppingStrategy(MLDataSet theValidationSet, int theCheckFrequency) { this.validationSet = theValidationSet; this.checkFrequency = theCheckFrequency; } /** * {@inheritDoc} */ @Override public void init(MLTrain theTrain) { this.train = theTrain; this.calc = (MLError) train.getMethod(); this.stop = false; this.lastCheck = 0; this.lastValidationError = this.calc.calculateError(this.validationSet); } /** * {@inheritDoc} */ @Override public void preIteration() { } /** * {@inheritDoc} */ @Override public void postIteration() { this.lastCheck++; this.trainingError = this.train.getError(); if( this.lastCheck>this.checkFrequency || Double.isInfinite(this.lastValidationError) ) { this.lastCheck = 0; double currentValidationError = this.calc.calculateError(this.validationSet); if( currentValidationError>=this.lastValidationError ) { stop = true; } this.lastValidationError = currentValidationError; } } /** * @return Returns true if we should stop. */ @Override public boolean shouldStop() { return stop; } /** * @return the trainingError */ public double getTrainingError() { return trainingError; } /** * @return The validation error. */ public double getValidationError() { return this.lastValidationError; } }
[ "jeff@jeffheaton.com" ]
jeff@jeffheaton.com
81cf98ffda7a96d1801b627b74177948c3234a77
e9474845462e5f2531a74c760b7770d17c74baef
/10-Application/Common/InfoWkspOrga-Common/src/main/java/com/sgu/infowksporga/business/mapper/EntityWorkspaceCloner.java
dbf5f3db63a662f108bbd5d05232054ebecf2c74
[ "Apache-2.0" ]
permissive
github188/InfoWkspOrga
869051f4e70ebc9a0125a0bddecdc1704e868b52
89162f127af51d697e25a46bc32dc90553388a54
refs/heads/master
2020-12-03T00:43:46.453187
2016-11-06T05:48:37
2016-11-06T05:48:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,346
java
package com.sgu.infowksporga.business.mapper; import java.lang.reflect.Field; import java.util.List; import org.hibernate.collection.spi.PersistentCollection; import com.sgu.core.framework.util.UtilHibernate; import com.sgu.core.framework.util.UtilString; import com.sgu.infowksporga.business.entity.Project; import com.sgu.infowksporga.business.entity.View; import com.sgu.infowksporga.business.entity.Workspace; import com.sgu.infowksporga.business.xml.jaxb.perspective.XmlWorkspace; /** * The Class EntityWorkspaceCloner. */ public class EntityWorkspaceCloner extends AbstractEntityCloner<Workspace> { /** The Constant instance. */ public static final EntityWorkspaceCloner instance = new EntityWorkspaceCloner(); /** * The Constructor. */ private EntityWorkspaceCloner() { super(); } /** * Clone without proxy. * * @param this the this * @return the perspective */ @Override public com.sgu.infowksporga.business.entity.Workspace cloneWithoutProxy(final Workspace source) { final Workspace clone = new Workspace(); // Clone des données communes super.cloneCommonFields(source, clone); // Manage specific attributes of this current class clone.setId(source.getId()); clone.setChildrenWrkspCreationEnabled(source.isChildrenWrkspCreationEnabled()); clone.setBaseFolder(source.getBaseFolder()); clone.setCustomer(source.getCustomer()); clone.setCategory(source.getCategory()); clone.setTags(source.getTags()); clone.setColor(source.getColor()); clone.setBgColor(source.getBgColor()); clone.setBold(source.isBold()); clone.setStrike(source.isStrike()); clone.setItalic(source.isItalic()); clone.setUnderline(source.isUnderline()); clone.setIcon(source.getIcon()); clone.setEnabled(source.isEnabled()); //clone.setOrder(source.getOrder()); clone.setLayout(source.getLayout()); clone.setOwner(source.getOwner()); clone.setPartage(source.getPartage()); clone.setHeight(source.getHeight()); clone.setWidth(source.getWidth()); // Manage classes potentially proxified by hibernate if (source.getParent() != null) { clone.setParent(new Workspace(source.getParent().getId())); } if (source.getMaster() != null) { clone.setMaster(new Workspace(source.getMaster().getId())); } if (source.getViews() != null & source.getViews() instanceof PersistentCollection) { clone.setViews((List<View>) UtilHibernate.unproxyPersistentCollection((PersistentCollection) source.getViews())); } if (source.getProject() != null) { clone.setProject(new Project(source.getProject().getId())); } return clone; } /** * The main method. * * @param strings the strings */ public static void main(final String... strings) { final Field[] fields = XmlWorkspace.class.getDeclaredFields(); for (final Field field : fields) { String name = field.getName(); name = UtilString.capitalize(name); final boolean isBoolean = field.getType().toString().contains("Boolean") ? true : false; if (isBoolean) { System.out.println("entity.set" + name + "(xmlWorksapce.is" + name + "());"); } else { System.out.println("entity.set" + name + "(xmlWorksapce.get" + name + "());"); } } } }
[ "sebguisse@gmail.com" ]
sebguisse@gmail.com
c16a0949d999492c4c389871ac9f817bfe875aa2
3ae8c0eee763fffa271a79471874a1727ecf709a
/src/main/java/org/encog/ml/ea/score/parallel/ParallelScoreTask.java
db05c6228e9dbcb4444bea5c7ec299121f55c724
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
rahulchaudhary2244/encog-java-core
c468dcd934facd41261b2d194c7913ce4e18308c
fc7b3602666399cc3a614c1f85ae2b3c52552bf4
refs/heads/master
2022-12-27T06:27:22.135793
2020-10-01T05:18:32
2020-10-01T05:18:32
300,153,359
0
0
NOASSERTION
2020-10-01T05:15:56
2020-10-01T05:15:55
null
UTF-8
Java
false
false
2,418
java
/* * Encog(tm) Core v3.4 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2017 Heaton Research, 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. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.ml.ea.score.parallel; import java.util.List; import org.encog.ml.CalculateScore; import org.encog.ml.MLMethod; import org.encog.ml.ea.exception.EARuntimeError; import org.encog.ml.ea.genome.Genome; import org.encog.ml.ea.score.AdjustScore; import org.encog.ml.ea.train.basic.BasicEA; /** * An individual threadable task for the parallel score calculation. * */ public class ParallelScoreTask implements Runnable { /** * The genome to calculate the score for. */ private final Genome genome; /** * The score function. */ private final CalculateScore scoreFunction; /** * The score adjusters. */ private final List<AdjustScore> adjusters; /** * The owners. */ private final ParallelScore owner; /** * Construct the parallel task. * @param genome The genome. * @param theOwner The owner. */ public ParallelScoreTask(Genome genome, ParallelScore theOwner) { super(); this.owner = theOwner; this.genome = genome; this.scoreFunction = theOwner.getScoreFunction(); this.adjusters = theOwner.getAdjusters(); } /** * Perform the task. */ @Override public void run() { try { MLMethod phenotype = this.owner.getCodec().decode(this.genome); double score; try { score = this.scoreFunction.calculateScore(phenotype); } catch (EARuntimeError e) { score = Double.NaN; } genome.setScore(score); genome.setAdjustedScore(score); BasicEA.calculateScoreAdjustment(genome, adjusters); } catch(Exception ex) { owner.reportError(ex); } } }
[ "jeff@jeffheaton.com" ]
jeff@jeffheaton.com
e06d40f1b7bde48ac05e154899a12089263584d5
7b82d70ba5fef677d83879dfeab859d17f4809aa
/tmp/sys/OnlineExamination/src/main/java/com/evil/service/Impl/TypesDictionaryServiceImpl.java
2c2990cd48f524a22875a1f23b393cca685b7484
[]
no_license
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
GB18030
Java
false
false
1,980
java
package com.evil.service.Impl; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.evil.dao.BaseDao; import com.evil.dao.PaperDao; import com.evil.pojo.system.TypeDictionary; import com.evil.service.TypeDictionaryService; import com.evil.util.StringUtil; @Service("typeDictionaryService") public class TypesDictionaryServiceImpl extends BaseServiceImpl<TypeDictionary> implements TypeDictionaryService { @Resource(name = "paperDao") private PaperDao paperdao; @Override @Resource(name = "typeDictionaryDao") public void setBaseDao(BaseDao<TypeDictionary> baseDao) { super.setBaseDao(baseDao); } @Override public List<TypeDictionary> findDictionaryByType(int type) { String hql = "from TypeDictionary where type=?"; return this.findEntityByHQL(hql, type); } @Override public void deleteClassifyByPid(String id) { String sql = "select p.id from tb_paper p where paperType=(select t.value from tb_typeDictionary t where t.id =?) "; String pids = StringUtil.arr2SqlStr(this.executeSQLQuery(null, sql, id) .toArray()); // 删除Answer sql = "delete from tb_answers where paperid in ("+pids+")"; this.executeSQL(sql); // 再删除问题关联 sql = "delete from tb_paper_questions where paperID in ("+pids+")"; this.executeSQL(sql); // 在删除成绩 sql = "delete from tb_user_paper where paperID in ("+pids+")"; paperdao.executeSQL(sql); // 先删除该类型下得试卷 String hql = "Update Paper set isDelete=0 where paperType in (select t.value from TypeDictionary t where t.id =?)"; paperdao.batchEntityByHQL(hql, id); // 在删除字典数据 hql = "delete from TypeDictionary where id=?"; this.batchEntityByHQL(hql, id); } @Override public int getMaxValueByType(int type) { String hql = "select max(value) from TypeDictionary where type=?"; Integer count = (Integer) this.uniqueResult(hql, type); return count == null ? 0 : count; } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
248f5bb7142edb6e52fe0a3a3995c0a3efe0e732
c1fa1fa86049e46c37ab747e86a59f85f533bcfb
/jiuye/src/com/action/newsAction.java
5047b62420defd3c4a4399148d7a6fa0dd5be490
[]
no_license
wgcwgc/java
0f1465e183f42b630980a7b2d1c8b5ebbf765ba2
6498e12ca08e75d83547b29b5f2cf20be3b40df6
refs/heads/master
2020-11-28T17:22:28.388264
2016-08-31T03:30:38
2016-08-31T03:30:38
66,048,577
0
1
null
null
null
null
GB18030
Java
false
false
2,556
java
package com.action; import java.util.Date; import java.util.List; import java.util.Map; import org.apache.struts2.ServletActionContext; import com.dao.TGonggaoDAO; import com.dao.TNewsDAO; import com.model.TNews; import com.opensymphony.xwork2.ActionSupport; public class newsAction extends ActionSupport { private int newsId; private String newsTitle; private String newsContent; private String message; private String path; private TNewsDAO newsDAO; public String newsAdd() { TNews news=new TNews(); news.setNewsTitle(newsTitle); news.setNewsContent(newsContent); news.setNewsDate(new Date().toLocaleString()); newsDAO.save(news); this.setMessage("操作成功"); this.setPath("newsMana.action"); return "succeed"; } public String newsMana() { List newsList=newsDAO.findAll(); Map request=(Map)ServletActionContext.getContext().get("request"); request.put("newsList", newsList); return ActionSupport.SUCCESS; } public String newsDel() { TNews news=newsDAO.findById(newsId); newsDAO.delete(news); this.setMessage("操作成功"); this.setPath("newsMana.action"); return "succeed"; } public String newsDetailHou() { TNews news=newsDAO.findById(newsId); Map request=(Map)ServletActionContext.getContext().get("request"); request.put("news", news); return ActionSupport.SUCCESS; } public String newsAll() { List newsList=newsDAO.findAll(); Map request=(Map)ServletActionContext.getContext().get("request"); request.put("newsList", newsList); return ActionSupport.SUCCESS; } public String newsDetailQian() { TNews news=newsDAO.findById(newsId); Map request=(Map)ServletActionContext.getContext().get("request"); request.put("news", news); return ActionSupport.SUCCESS; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getNewsContent() { return newsContent; } public void setNewsContent(String newsContent) { this.newsContent = newsContent; } public TNewsDAO getNewsDAO() { return newsDAO; } public void setNewsDAO(TNewsDAO newsDAO) { this.newsDAO = newsDAO; } public int getNewsId() { return newsId; } public void setNewsId(int newsId) { this.newsId = newsId; } public String getNewsTitle() { return newsTitle; } public void setNewsTitle(String newsTitle) { this.newsTitle = newsTitle; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } }
[ "1348066599@qq.com" ]
1348066599@qq.com
542cfaef5220538ee1cac8db7ce84052212a2d5b
59c4077b97d90098eb0d19948982276ac8f87658
/day14/IO流2/src/cn/imcore/test/TestBufferedReader2.java
47e5bf2fdb8d93243c19cfa80500238503f6aeba
[]
no_license
sonyi/java
4b267e9cb554bb51f3770149f070ec812388cb8b
fbe2c2f7ae36bbbb4333bd567fb063daf507c8fc
refs/heads/master
2021-01-01T16:30:36.907998
2014-05-25T15:13:11
2014-05-25T15:13:11
19,110,091
2
0
null
null
null
null
UTF-8
Java
false
false
780
java
package cn.imcore.test; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class TestBufferedReader2 { public static void main(String[] args) { BufferedReader br = null; try { br = new BufferedReader(new FileReader("data/temp1.txt")); int temp; while((temp=br.read()) != -1) { System.out.println(temp); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { if(br != null) { try { br.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } }
[ "wxy15105957760" ]
wxy15105957760
647b17d2bab7e9392a3d757195693676522468c0
b79954f682b8e158833e63567e3a903364ec3a9b
/lib/src/br/com/openpdv/conscad/TUfEmi.java
9653ed8a48fa972dbd515f4cf8fb572a4ed6cb0e
[]
no_license
danimaribeiro/OpenPDV
64e5a318939b413e5b06ca5f3173635f38ed461c
0247c55e2d78dcb584f8aec8e5a8a6a73e92fb21
refs/heads/master
2021-01-17T16:26:43.132806
2012-11-28T03:38:44
2012-11-28T03:38:44
6,895,607
6
7
null
null
null
null
UTF-8
Java
false
false
2,195
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // 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: 2012.07.26 at 11:00:50 PM BRT // package br.com.openpdv.conscad; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for TUfEmi. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="TUfEmi"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;whiteSpace value="preserve"/> * &lt;enumeration value="AC"/> * &lt;enumeration value="AL"/> * &lt;enumeration value="AM"/> * &lt;enumeration value="AP"/> * &lt;enumeration value="BA"/> * &lt;enumeration value="CE"/> * &lt;enumeration value="DF"/> * &lt;enumeration value="ES"/> * &lt;enumeration value="GO"/> * &lt;enumeration value="MA"/> * &lt;enumeration value="MG"/> * &lt;enumeration value="MS"/> * &lt;enumeration value="MT"/> * &lt;enumeration value="PA"/> * &lt;enumeration value="PB"/> * &lt;enumeration value="PE"/> * &lt;enumeration value="PI"/> * &lt;enumeration value="PR"/> * &lt;enumeration value="RJ"/> * &lt;enumeration value="RN"/> * &lt;enumeration value="RO"/> * &lt;enumeration value="RR"/> * &lt;enumeration value="RS"/> * &lt;enumeration value="SC"/> * &lt;enumeration value="SE"/> * &lt;enumeration value="SP"/> * &lt;enumeration value="TO"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "TUfEmi") @XmlEnum public enum TUfEmi { AC, AL, AM, AP, BA, CE, DF, ES, GO, MA, MG, MS, MT, PA, PB, PE, PI, PR, RJ, RN, RO, RR, RS, SC, SE, SP, TO; public String value() { return name(); } public static TUfEmi fromValue(String v) { return valueOf(v); } }
[ "pedroh.lira@gmail.com" ]
pedroh.lira@gmail.com
0cb6f8b0733b418ec81485f5d27446e573177ed1
a3b5646b7630942ab811069b39b2de64e9a71136
/cei/CeiPhone/src/com/hyrt/cei/vo/ColumnEntry.java
cdb5268d30422a82c1e01859d902bfd76caa1249
[]
no_license
zhongshuiyuan/hyrtproject
06f8743faf5f454313a10e8664ca3018e9f23437
9b1ef04de5f61ff186d85b64c52defb6d4ebea7a
refs/heads/master
2020-04-06T06:53:04.480449
2013-12-23T12:15:01
2013-12-23T12:15:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,270
java
package com.hyrt.cei.vo; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import com.hyrt.cei.util.MyTools; import com.hyrt.cei.util.WriteOrRead; import com.hyrt.cei.util.XmlUtil; import com.hyrt.ceiphone.WelcomeActivity; public class ColumnEntry implements Serializable { /** * */ private static final long serialVersionUID = 1L; private String id; private String parentId; private String name; private String operationImage; private String background; private String logo; private String loginid; private String userId; private String loginName; private String wColor; private String issueTime; private String password; private String type; private String path; //非必须业务的定制与否 private boolean isSelected; //描述内容 private String description; public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public boolean isSelected() { return isSelected; } public void setSelected(boolean isSelected) { this.isSelected = isSelected; } public String getLoginid() { return loginid; } public void setLoginid(String loginid) { this.loginid = loginid; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } //版本默认的业务集合 private List<ColumnEntry> columnEntryChilds = new ArrayList<ColumnEntry>(); //用户定义下载的应用 private List<ColumnEntry> selectColumnEntryChilds = new ArrayList<ColumnEntry>(); //智慧海内的应用 private List<ColumnEntry> witSeaColumns = new ArrayList<ColumnEntry>(); /** * 根据父级Id获取子元素,传入空值获取一级 * @param parentId * @return */ public List<ColumnEntry> getEntryChildsForParent(String parentId){ if(parentId==null&&columnEntryChilds.size()>0){ parentId = columnEntryChilds.get(0).getId(); } List<ColumnEntry> columnEntrys = new ArrayList<ColumnEntry>(); for(int i=1;i<columnEntryChilds.size();i++){ ColumnEntry columnEntry = columnEntryChilds.get(i); if(columnEntry.getParentId() != null && columnEntry.getParentId().equals(parentId)){ columnEntrys.add(columnEntry); } } return columnEntrys; } /** * 根据Id获取父级名字 * @return */ public String getFunNameByID(String Id){ for(int i=1;i<columnEntryChilds.size();i++){ ColumnEntry columnEntry = columnEntryChilds.get(i); if(columnEntry.getId() != null && columnEntry.getId().equals(Id)){ return columnEntry.getName(); } } return null; } /** * 根据模块名去找模块实体 * @return */ public ColumnEntry getColByName(String name){ for(int i=1;i<columnEntryChilds.size();i++){ ColumnEntry columnEntry = columnEntryChilds.get(i); if(columnEntry.getName().equals(name)){ return columnEntry; } } columnEntryChilds.clear(); selectColumnEntryChilds.clear(); String result = WriteOrRead.read(MyTools.nativeData, WelcomeActivity.INITRESOURCES_FILENAME); XmlUtil.parseInitResources(result, this); // 请求个人资源100% result = WriteOrRead.read(MyTools.nativeData, WelcomeActivity.INITSELFRESOURCES_FILENAME); for(int i=1;i<columnEntryChilds.size();i++){ ColumnEntry columnEntry = columnEntryChilds.get(i); if(columnEntry.getName().equals(name)){ return columnEntry; } } return null; } /** * * @param name 模块名 * @param parentId 父级id * @return */ public ColumnEntry getColByName(String name,String parentId){ for(int i=1;i<columnEntryChilds.size();i++){ ColumnEntry columnEntry = columnEntryChilds.get(i); if(columnEntry.getName().equals(name) && columnEntry.getPath().contains(parentId)){ return columnEntry; } } return null; } public String getLogo() { return logo; } public void setLogo(String logo) { this.logo = logo; } public String getType() { return type; } public void setType(String type) { this.type = type; } /** * 获取用户定制的业务 * @return */ public List<ColumnEntry> getSelectColumnEntryChilds() { return selectColumnEntryChilds; } public void setSelectColumnEntryChilds(List<ColumnEntry> selectColumnEntryChilds) { this.selectColumnEntryChilds = selectColumnEntryChilds; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOperationImage() { return operationImage; } public void setOperationImage(String operationImage) { this.operationImage = operationImage; } public String getBackground() { return background; } public void setBackground(String background) { this.background = background; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getLoginName() { return loginName; } public void setLoginName(String loginName) { this.loginName = loginName; } public String getwColor() { return wColor; } public void setwColor(String wColor) { this.wColor = wColor; } public String getIssueTime() { return issueTime; } public void setIssueTime(String issueTime) { this.issueTime = issueTime; } public List<ColumnEntry> getColumnEntryChilds() { return columnEntryChilds; } public void setColumnEntryChilds(List<ColumnEntry> columnEntryChilds) { this.columnEntryChilds = columnEntryChilds; } public List<ColumnEntry> getWitSeaColumns() { return witSeaColumns; } public void setWitSeaColumns(List<ColumnEntry> witSeaColumns) { this.witSeaColumns = witSeaColumns; } }
[ "13718868826@163.com" ]
13718868826@163.com
317d99bf5715e1ffcbb45d04e11447f43534ca19
ae2e9c79a797263f1e9d0e0a71e24da2b2c64ee0
/org.eclipse.jt.core/src/org/eclipse/jt/core/impl/ISqlRelationRefBuffer.java
6119a9549d76674d0bc93e58ce2aa072e8b50a3c
[]
no_license
JeffTang139/jtcore
6330762d6716a31a0c0f5e11b7a890949774470b
827c2267b7e39c5a6321f342e5916dfd00d51989
refs/heads/master
2021-01-18T14:36:41.142947
2012-03-27T03:16:34
2012-03-27T03:16:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
package org.eclipse.jt.core.impl; import org.eclipse.jt.core.def.table.TableJoinType; public interface ISqlRelationRefBuffer extends ISqlBuffer { public ISqlJoinedTableRefBuffer joinTable(String table, String alias, TableJoinType type); public ISqlJoinedQueryRefBuffer joinQuery(String alias, TableJoinType type); public ISqlJoinedWithRefBuffer joinWith(String target, String alias, TableJoinType type); }
[ "jefftang139@hotmail.com" ]
jefftang139@hotmail.com
e88c697e16a929a415532ef7bfaf235a2e3c5c33
4f39ceb88251290467c1de60ed528ff9923e1db9
/java/02-Héritage NOK/src/Cercle.java
86db689a56a0fa1708bdabb73f10148935106529
[]
no_license
anaelChardan/IMT-Optimisation
8d75924857d69e94c2b86489fa39ccc334f31389
15d3b7ec9ed6369b0fb96fcd93e2a714bbd2439f
refs/heads/master
2021-08-22T21:01:01.731810
2017-12-01T08:45:27
2017-12-01T08:45:27
109,566,319
1
1
null
null
null
null
UTF-8
Java
false
false
203
java
public class Cercle implements Forme { private final double rayon; public Cercle(double rayon) { this.rayon = rayon; } @Override public double getSurface() { return 2 * Math.PI * rayon; } }
[ "anael.chardan@gmail.com" ]
anael.chardan@gmail.com
2a706a11810998f594707a7270ca7e583a3594a3
85c7d74a116fd9128657035b77a11472f7795518
/x-ai/src/main/java/com/xai/common/service/FileService.java
ac6935e85f79295625c51303b61abf89672e2e4b
[ "Apache-2.0" ]
permissive
oniubi/github-repositories
3773b96a38720b33f085a759dcad81a2236f6168
5c8e58ce2da7e2d8c38683f06cdbcb150422d896
refs/heads/master
2023-03-16T07:59:59.466661
2019-03-02T09:55:04
2019-03-02T09:55:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package com.xai.common.service; import com.xai.common.domain.FileDO; import java.util.List; import java.util.Map; /** * 文件上传 * * @author chglee * @email 1992lcg@163.com * @date 2017-09-19 16:02:20 */ public interface FileService { FileDO get(Long id); List<FileDO> list(Map<String, Object> map); int count(Map<String, Object> map); int save(FileDO sysFile); int update(FileDO sysFile); int remove(Long id); int batchRemove(Long[] ids); }
[ "evangel_a@sina.com" ]
evangel_a@sina.com
75410d8f2f545cbce539057f88cd358f59a97d64
5142a8986e7a80420357a7f1b1bbfdf94ad02767
/hybris-commerce-suite-5.5.1.2/Mobile-Commerce-SDK/Mobile-Commerce-SDK-Android/hybrisMobileB2BLibrary/src/com/hybris/mobile/lib/b2b/query/QueryCart.java
c20da4d6edc23257608fe50aa6b07e3508db7ddd
[]
no_license
gerardoram/research1
613ef2143ba60a440bb577362bcf1ce2a646664b
2a4515e3f8901f0b3b510653d61dac059c6521a8
refs/heads/master
2020-05-20T17:04:39.574621
2015-06-23T17:53:26
2015-06-23T17:53:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
899
java
/******************************************************************************* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. ******************************************************************************/ package com.hybris.mobile.lib.b2b.query; public class QueryCart { private String product; private int quantity; public String getProduct() { return product; } public void setProduct(String product) { this.product = product; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } }
[ "thaisonnguyenbt@gmail.com" ]
thaisonnguyenbt@gmail.com
60042c6c047036316a427116db80066d83c53c3e
f92fc2fbbfde756ecdfda07b361285d2b0f4b4d8
/src/main/java/ninechapter_algorithm/chapter2_binarysearch/optional/kclosestnumber/second/Solution.java
8c57cd0ec883e6486a745daf322fdb8ba3536c5c
[]
no_license
blueaken/JianTestPlayGround
9dbfde62273f9d8593e111bdc201b61ccfcfbfd9
02a962d17a6e7172b96807a785b16e7987fe3f1f
refs/heads/master
2023-08-04T09:13:19.512764
2023-07-15T11:17:25
2023-07-15T11:17:25
19,551,504
1
2
null
null
null
null
UTF-8
Java
false
false
2,092
java
package ninechapter_algorithm.chapter2_binarysearch.optional.kclosestnumber.second; import java.util.Arrays; /** * Author: blueaken * Date: 6/23/16 16:06 */ public class Solution { /** * @param A an integer array * @param target an integer * @param k a non-negative integer * @return an integer array */ public int[] kClosestNumbers(int[] A, int target, int k) { // Write your code here int[] result = new int[k]; if (A == null || A.length < k) { return result; } int start = 0; int end = A.length - 1; while (start < end) { int mid = (start + end) / 2; if (A[mid] < target) { start = mid + 1; } else { end = mid; } } //find first index int left, right; if (A[start] <= target || start == 0) { left = start; right = start + 1; } else { int cur = A[start] - target < target - A[start - 1] ? start : start - 1; left = cur; right = cur + 1; } int count = 0; for (int i = 0; i < k && left >= 0 && right < A.length; i++) { //decide which side is closer if (Math.abs(target - A[left]) <= Math.abs(target - A[right])) { result[i] = A[left--]; } else { result[i] = A[right++]; } count++; } while (count < k) { if (left == -1) { //use all right side result[count++] = A[right++]; } else if (right == A.length) { //use all left side result[count++] = A[left--]; } } return result; } public static void main(String[] args) { Solution solution = new Solution(); int[] test = {1,10,15,25,35,45,50,59}; int target = 30; int k = 7; System.out.println(Arrays.toString(solution.kClosestNumbers(test, target, k))); } }
[ "blueaken@gmail.com" ]
blueaken@gmail.com
4e47a0a3679986c6fb64f0f6d231ed429968dbb4
d531fc55b08a0cd0f71ff9b831cfcc50d26d4e15
/gen/main/java/org/hl7/fhir/ReferenceHandlingPolicy.java
de7ac5a2ba3e179f7ec0491dd0098aba4f086263
[]
no_license
threadedblue/fhir.emf
f2abc3d0ccce6dcd5372874bf1664113d77d3fad
82231e9ce9ec559013b9dc242766b0f5b4efde13
refs/heads/master
2021-12-04T08:42:31.542708
2021-08-31T14:55:13
2021-08-31T14:55:13
104,352,691
0
0
null
null
null
null
UTF-8
Java
false
false
2,535
java
/** */ package org.hl7.fhir; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Reference Handling Policy</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * A set of flags that defines how references are supported. * If the element is present, it must have either a @value, an @id, or extensions * <!-- end-model-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.hl7.fhir.ReferenceHandlingPolicy#getValue <em>Value</em>}</li> * </ul> * * @see org.hl7.fhir.FhirPackage#getReferenceHandlingPolicy() * @model extendedMetaData="name='ReferenceHandlingPolicy' kind='elementOnly'" * @generated */ public interface ReferenceHandlingPolicy extends Element { /** * Returns the value of the '<em><b>Value</b></em>' attribute. * The literals are from the enumeration {@link org.hl7.fhir.ReferenceHandlingPolicyList}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Value</em>' attribute. * @see org.hl7.fhir.ReferenceHandlingPolicyList * @see #isSetValue() * @see #unsetValue() * @see #setValue(ReferenceHandlingPolicyList) * @see org.hl7.fhir.FhirPackage#getReferenceHandlingPolicy_Value() * @model unsettable="true" * extendedMetaData="kind='attribute' name='value'" * @generated */ ReferenceHandlingPolicyList getValue(); /** * Sets the value of the '{@link org.hl7.fhir.ReferenceHandlingPolicy#getValue <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Value</em>' attribute. * @see org.hl7.fhir.ReferenceHandlingPolicyList * @see #isSetValue() * @see #unsetValue() * @see #getValue() * @generated */ void setValue(ReferenceHandlingPolicyList value); /** * Unsets the value of the '{@link org.hl7.fhir.ReferenceHandlingPolicy#getValue <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetValue() * @see #getValue() * @see #setValue(ReferenceHandlingPolicyList) * @generated */ void unsetValue(); /** * Returns whether the value of the '{@link org.hl7.fhir.ReferenceHandlingPolicy#getValue <em>Value</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Value</em>' attribute is set. * @see #unsetValue() * @see #getValue() * @see #setValue(ReferenceHandlingPolicyList) * @generated */ boolean isSetValue(); } // ReferenceHandlingPolicy
[ "roberts_geoffry@bah.com" ]
roberts_geoffry@bah.com
a868dbd929ee276bacedde137fdfcf0f0cd6d877
63e24adc15dd2155767a477c5026608273d89323
/scm-managers/scm-managers-service/src/main/java/org/xfs/scm/system/organization/service/impl/OrganizationServiceImpl.java
d7c983419c82827e56ac3f913ab1843c9fcb8d89
[]
no_license
shenfengzhusheng/scm
17978a395182a3f164357372c5c44242659bc970
9b04e91d7c2d4dcac55d326b08606482aba2fea9
refs/heads/master
2022-12-21T14:31:37.214723
2018-11-17T03:24:01
2018-11-17T03:24:01
82,155,192
0
0
null
null
null
null
UTF-8
Java
false
false
2,550
java
package org.xfs.scm.system.organization.service.impl; import java.util.List; import javax.annotation.Resource; import com.alibaba.fastjson.JSON; import org.springframework.stereotype.Service; import org.xfs.scm.base.service.impl.BaseServiceImpl; import org.xfs.scm.common.base.model.Grid; import org.xfs.scm.system.organization.dao.OrganizationMapper; import org.xfs.scm.system.organization.entity.Organization; import org.xfs.scm.system.organization.po.OrganizationPo; import org.xfs.scm.system.organization.service.OrganizationServiceI; import org.xfs.scm.system.organization.vo.OrganizationVo; import org.xfs.scm.util.BeanUtils; import com.github.pagehelper.PageHelper; @Service public class OrganizationServiceImpl extends BaseServiceImpl<Organization> implements OrganizationServiceI { @Resource OrganizationMapper organizationMapper; @Override public Boolean removeOrganization(OrganizationVo vo) { return null; } @Override public List<OrganizationPo> listOrganization(OrganizationVo vo) throws Exception { return this.organizationMapper.getOrganization(vo); } @Override public OrganizationPo getOrganization(OrganizationVo vo) throws Exception { List<OrganizationPo> list=this.listOrganization(vo); if(!list.isEmpty()) return list.get(0); return null; } @Override public boolean addOrganization(OrganizationVo vo) throws Exception { if(vo!=null){ Organization o=new Organization(); BeanUtils.copyNotNullProperties(vo, o); if(super.saveSelective(o)==1){ return true; } return false; } return false; } @SuppressWarnings({ "static-access", "unchecked" }) @Override public Grid grid(OrganizationVo vo, int page, int rows) throws Exception { Grid grid=new Grid(); PageHelper pageHelper=new PageHelper(); pageHelper.startPage(page, rows); grid.setRows(this.organizationMapper.getOrganization(vo)); grid.setTotal(this.organizationMapper.countAll(vo)); List<OrganizationPo>list=grid.getRows(); //grid.setList(null); System.out.println(JSON.toJSONString(list)); /** * PageInfo<OrganizationPo>pages=(PageInfo<OrganizationPo>)this.organizationMapper.getOrganization(vo); grid.setList(pages.getList()); System.out.println(pages.getTotal()); grid.setTotal(this.organizationMapper.countAll(vo)); */ //PageInfo<OrganizationPo>pages=this. //pageHelper.offsetPage(offset, limit, count) // grid.getList() return grid; } @Override public OrganizationPo getById(Long oid) throws Exception { return this.getOrganization(new OrganizationVo(oid)); } }
[ "xixingyingzhongdui@gmail.com" ]
xixingyingzhongdui@gmail.com
329942a241e4d3e243b5d5d71c401e3c45cd8296
11e509040fd58695f3809dbdd4a7c9bd7b461c0a
/tutorialspoint/src/com/java/threads/Demo2.java
dbc6906679dd441de8be207d5b9e5f0187af94df
[]
no_license
crbiitr/code
02942c4974b7baa09586ee8e2afd67da146b81d8
ced1e9c5304d0d871330a9edcba422f8b648fd9f
refs/heads/master
2022-02-18T16:18:26.350490
2022-02-09T02:46:33
2022-02-09T02:46:33
65,022,294
0
0
null
null
null
null
UTF-8
Java
false
false
1,583
java
package com.java.threads; class RunnableClass2 implements Runnable { // public int x; public static int x; Thread thrd; public RunnableClass2(String name) { thrd = new Thread(this,name); x = 1; thrd.start(); } public void run() { System.out.println(thrd.getName() + " is Started."); try { do { System.out.println("In " + thrd.getName() + " and x is :: " + x); Thread.sleep(1000); x++; System.out.println("X is :: " + x); } while (x<=10); } catch (InterruptedException e) { System.out.println(thrd.getName() + " interrupted"); } System.out.println("Thread " + thrd.getName() + " END "); } } public class Demo2 { public static void main(String [] args) { RunnableClass2 obj1 = new RunnableClass2("CHETAN"); RunnableClass2 obj2 = new RunnableClass2("RATAN"); RunnableClass2 obj3 = new RunnableClass2("KARAN"); RunnableClass2 obj4 = new RunnableClass2("HEMANT"); do { System.out.println(Thread.currentThread().getName() + " is running."); try { // System.out.println("In " + Thread.currentThread().getName() + " Thread."); Thread.sleep(100); } catch (InterruptedException e) { System.out.println(Thread.currentThread().getName() + " interrupted"); } } while (obj4.x < 11); // } while (obj1.thrd.isAlive() || obj2.thrd.isAlive() || obj3.thrd.isAlive() || obj4.thrd.isAlive()); // NOTE: Both conditions produces the same output as before. The only difference is that it uses isAlive() to wait for the child threads to terminate. System.out.println("Main thread terminated"); } }
[ "user@localhost.localdomain" ]
user@localhost.localdomain
7caa4e643c63c69a9f4038af321ace774d8f94a4
cb4a7d111ca44fa127c994781fbaab83526ec4e9
/gainde-demo/gainde-integral-ejb/gainde-integral-data-layer/src/main/java/sn/com/douane/ejb/demat/model/entities/Agenda.java
e1ca3b4d0092d9b607e320baf186ae66321cd127
[]
no_license
jasmineconseil/applicationBlanche
56d6493cdf68ae870ddd3584dbc1d4e95df6f402
a23247ec783d9cb856c538aacb20f76c6eed5307
refs/heads/master
2020-12-26T00:06:23.151181
2014-03-11T11:07:03
2014-03-11T11:07:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,549
java
package sn.com.douane.ejb.demat.model.entities; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import sn.com.douane.ejb.rc.model.entities.BureauDouane; @Entity @Table(name = "AGENDA") public class Agenda implements Serializable { private static final long serialVersionUID = -8991261413808677953L; @Id @Column(name = "IDAGENDA",nullable=false) private Long idAgenda; @Column(name = "VERSION", nullable=false) private Integer version; @Column(name = "LIBELLEAGENDA", length = 100) private String libelleAgenda; @OneToMany(mappedBy = "agendas") private List<BureauDouane> listBureauDouane = new ArrayList<BureauDouane>(); public String getLibelleAgenda() { return libelleAgenda; } public void setLibelleAgenda(String libelleAgenda) { this.libelleAgenda = libelleAgenda; } public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public Long getIdAgenda() { return idAgenda; } public void setIdAgenda(Long idAgenda) { this.idAgenda = idAgenda; } public List<BureauDouane> getListBureauDouane() { return listBureauDouane; } public void setListBureauDouane(List<BureauDouane> listBureauDouane) { this.listBureauDouane = listBureauDouane; } }
[ "contact@jasforge.com" ]
contact@jasforge.com