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
d0baa22c8a89cf57d0ffa89712ec55f8fcf3ae08
c0d54edd4c86fe8b8d65088c92c2d21cbb30484d
/android/src/main/java/mediabrowser/apiinteraction/android/sync/data/AndroidAssetManager.java
6b377ed68b5b50797ab77b05fc68933b8829ed2c
[ "MIT" ]
permissive
MithrilTuxedo/Emby.ApiClient.Java
5ab517e2d078c55a1871f7893249e246646121db
8813d4ec87984f354ef731cde4ba559e57239a8e
refs/heads/master
2021-01-15T11:57:15.529797
2016-06-17T14:27:05
2016-06-17T14:27:05
39,980,502
0
0
null
2015-07-31T01:36:03
2015-07-31T01:36:03
null
UTF-8
Java
false
false
788
java
package mediabrowser.apiinteraction.android.sync.data; import android.content.Context; import mediabrowser.apiinteraction.sync.data.*; import mediabrowser.model.logging.ILogger; import mediabrowser.model.serialization.IJsonSerializer; /** * Created by Luke on 3/24/2015. */ public class AndroidAssetManager extends LocalAssetManager { public AndroidAssetManager(Context context, ILogger logger, IJsonSerializer jsonSerializer) { super(new UserActionRepository(context, jsonSerializer), new ItemRepository(context, jsonSerializer), new AndroidSyncFileRepository(context, logger), new UserRepository(context, jsonSerializer), new AndroidImageFileRepository(context, logger), logger); } }
[ "luke.pulverenti@gmail.com" ]
luke.pulverenti@gmail.com
e659c7b9876979e63f3da62a8948cc1755010a1c
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_1480487_1/java/gauravkm/Probability.java
395092e368cae3c93b4a75e6699417b806cb1035
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
3,897
java
import java.io.*; import java.util.*; public class Probability { public static void main(String[] args) { int T, counter = 1; try { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File("output.txt")))); String input = reader.readLine(); T = Integer.parseInt(input); while (T-- > 0) { Map<Integer,Integer> inputMap = new HashMap<Integer, Integer>(); Map<Integer,Double> sol = new HashMap<Integer, Double>(); System.out.println("case #:" + (counter)); int zeroCount = 0; input = reader.readLine(); String[] in = input.split(" "); int N; List<Integer> points = new ArrayList<Integer>(); N = Integer.parseInt(in[0]); int count = 1; for (int i = 0; i < N; i++) { int i1 = Integer.parseInt(in[count]); points.add(i1); inputMap.put(i,i1); count = count + 1; if (i1 == 0) { zeroCount++; } } List<Double> minPer = new ArrayList<Double>(); int X = 0; for (int i : points) { X += i; } System.out.println("zeroCount:" + zeroCount); Collections.sort(points); if (zeroCount == N - 1) { for (int i = 0; i < N; i++) { if (points.get(i) == 0) { sol.put(points.get(i),1.0 / (N - 1)); } else { sol.put(points.get(i),0.0); } } } else { System.out.println("X:" + X); int negCount = 0; int total = N; int Y=X; int sub=0; for (int i = N-1; i >=0; i--) { int interestedSum = Y-points.get(i); double per = (X+ interestedSum - ((total-1) * points.get(i)))/(double) (total * X); if (per >= 0) { if(negCount>0) { i++; total= total-negCount; negCount=0; Y-=sub; continue; } sol.put(points.get(i),per); minPer.add(per); } else { minPer.add(0.0); sol.put(points.get(i),0.0); negCount++; sub+=points.get(i); } } } for (double d : minPer) { System.out.println(d * 100); } writer.write("Case #" + counter + ":"); List<Double> mm= new ArrayList<Double>(); for(int i=0;i<N;i++) { mm.add(sol.get(inputMap.get(i))); } for (double d : mm) { { double dd= d*1000000000; writer.write(" " + ((double) Math.round(dd) / 10000000)); } } writer.write("\n"); counter++; } writer.flush(); } catch (IOException e) { e.printStackTrace(); } } }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
af5869b6645093283ccbd70f043b1b44ed3d7261
ad80a7a599c99ee8d120c78dbee9a7a6e70fc4cd
/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java
51ad42d6a89a5d9aabb52b405d5ce37de558a3a0
[ "BSD-3-Clause" ]
permissive
zonque/chromium
bfdf2bcca87aafbd18b1e9b0d023c69d9b3ea8d4
0855859e670c8888c2b2e14f7f148a5621391ecb
refs/heads/master
2022-11-12T20:22:12.849281
2018-06-15T18:43:00
2018-06-15T18:43:00
137,521,951
0
0
null
2018-06-15T18:53:21
2018-06-15T18:53:21
null
UTF-8
Java
false
false
1,210
java
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.vr; import android.content.Context; import android.os.Build; import org.chromium.base.ContextUtils; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.JNINamespace; /** * Provides ARCore classes access to java-related app functionality. */ @JNINamespace("vr") public class ArCoreJavaUtils { private static final int MIN_SDK_VERSION = Build.VERSION_CODES.O; /** * Gets the current application context. * * @return Context The application context. */ @CalledByNative private static Context getApplicationContext() { return ContextUtils.getApplicationContext(); } /** * Determines whether ARCore's SDK should be loaded. Currently, this only * depends on the OS version, but could be more sophisticated. * * @return true if the SDK should be loaded. */ @CalledByNative private static boolean shouldLoadArCoreSdk() { return Build.VERSION.SDK_INT >= MIN_SDK_VERSION; } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
3deeed08a8f9413a6cccf0ec0aee28b8acc048aa
65be3b6459eea1c1b880889d5d91b6c84d4a64e7
/spring-mybatis/src/main/java/com/spring/tutorial/app/Application.java
b1cfbf823471965b82f7fedce5b9479627deb4d1
[]
no_license
GitHubsteven/spring-in-action
70c1f0682cf8e3d09c61e24214ec99599a5bad29
9ea7bee096ba9aab601979685fe14b966bc14c56
refs/heads/master
2022-12-23T10:16:58.146050
2020-08-19T06:11:32
2020-08-19T06:11:32
114,879,964
0
0
null
2022-12-16T04:27:03
2017-12-20T11:33:42
Java
UTF-8
Java
false
false
799
java
package com.spring.tutorial.app; import com.spring.tutorial.service.student.StudentServiceImpl; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * @version 1.0.0 COPYRIGHT © 2001 - 2018 VOYAGE ONE GROUP INC. ALL RIGHTS RESERVED. * @Author rongbin.xie * @Description: * @Date: Created at 15:45 2018/4/18. */ public class Application { public static void main(String[] args) { // ApplicationContext context = new AnnotationConfigApplicationContext(SpringMybatisConfig.class); ApplicationContext context = new ClassPathXmlApplicationContext("conf/spring-mybatis.xml"); StudentServiceImpl service = context.getBean(StudentServiceImpl.class); service.createStudent(); } }
[ "rongbin.xie@voyageone.cn" ]
rongbin.xie@voyageone.cn
db64a862b78385ea1d65573633b3138c1781021b
c6b802a4f691d20bf0c50900ea31618818aff9b5
/src/main/java/com/jianzixing/webapp/service/statistics/RankingArithmetic.java
f565da0017a57f04aa48d876151a7b044ce81056
[]
no_license
zzk2020/jianzixing-wechat
9d8152f457e6999cc4c2700b0ffd5be7c93c34e4
1471069919d2c6c0505a1a8abeb3607b0d81c644
refs/heads/master
2022-03-21T14:28:51.670020
2019-09-09T03:45:49
2019-09-09T03:45:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
252
java
package com.jianzixing.webapp.service.statistics; public interface RankingArithmetic { void run(); String getName(); /** * 小于0表示算法全部都适用 * * @return */ int getType(); boolean canRun(); }
[ "yak1992@foxmail.com" ]
yak1992@foxmail.com
ab4f6ad98bfdf3631dcae9d44719b38b688bb8b6
a669c0722220c73291a358fdbc2811ac034d4857
/wraith-engine/src/main/java/com/srotya/tau/wraith/actions/alerts/templated/TemplatedAlertAction.java
e4c61ae9ae8f128fc7ee4570ea74ec6f63e81c0a
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
anandkrv/tau
aef4dc56304366b7fc5f5547d88477ac7c0c63d2
a314e6e03efd454c8e26e3feb304616b1767a8d9
refs/heads/master
2020-04-10T09:08:09.885400
2017-01-30T07:38:56
2017-01-30T07:38:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,041
java
/** * Copyright 2016 Symantec Corporation. * * 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.srotya.tau.wraith.actions.alerts.templated; import com.srotya.tau.wraith.Constants; import com.srotya.tau.wraith.Event; import com.srotya.tau.wraith.Required; import com.srotya.tau.wraith.actions.Action; /** * Template based alert action * * @author ambud_sharma */ public class TemplatedAlertAction implements Action { private static final long serialVersionUID = 1L; @Required private short actionId; @Required private short templateId = -1; public TemplatedAlertAction(short actionId, short templateId) { this.actionId = actionId; this.templateId = templateId; } @Override public Event actOnEvent(Event inputEvent) { inputEvent.getHeaders().put(Constants.FIELD_ALERT_TEMPLATE_ID, templateId); return inputEvent; } @Override public ACTION_TYPE getActionType() { return ACTION_TYPE.TEMPLATED_ALERT; } @Override public short getActionId() { return actionId; } @Override public void setActionId(short actionId) { this.actionId = actionId; } /** * @return the templateId */ public short getTemplateId() { return templateId; } /** * @param templateId the templateId to set */ public void setTemplateId(short templateId) { this.templateId = templateId; } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return "TemplatedAlertAction [actionId=" + actionId + ", templateId=" + templateId + "]"; } }
[ "asharma525xi@gmail.com" ]
asharma525xi@gmail.com
eaf5bb7c44efc028295b1cc34021319c50aa8ed8
ef077489c1164f8496d77b90dcfcb2f2e5798215
/MessUpTest/src/main/java/org/clay/visitorMode/ComputerPart.java
2d35338a84205173d3f2cd764b66f1f7656a2f1d
[]
no_license
clay4444/newCoder
5645b016c818a83aff944f2de8d1edb75e6e2638
e7718ca7258326b6885b143def1385f4479fe83c
refs/heads/master
2023-01-04T02:55:36.115860
2020-10-30T09:26:58
2020-10-30T09:26:58
106,078,247
1
2
null
2020-11-06T08:06:15
2017-10-07T07:05:11
Java
UTF-8
Java
false
false
163
java
package org.clay.visitorMode; /** * 接受操作的接口 */ public interface ComputerPart { public void accept(ComputerPartVisitor computerPartVisitor); }
[ "loushang@vipkid.com.cn" ]
loushang@vipkid.com.cn
b0e4c42bc0ece66c4ff8507df86377b69b7e8755
3f0015de89c8b0cd48ae203f35f395b2316dee28
/gen/com/icomp/Iswtmv10/BuildConfig.java
da55da9b5fb9333503e03a1b5e38cd42e36f27d4
[]
no_license
looooogan/icomp-4gb-pda
f8bf25c2ff20594ef802993ec708b66a8068d3dc
87f773b746485883f4839d646700a21d05c54d4f
refs/heads/master
2020-03-21T03:12:04.271544
2018-06-20T14:21:13
2018-06-20T14:21:13
133,898,130
0
0
null
null
null
null
UTF-8
Java
false
false
260
java
/*___Generated_by_IDEA___*/ package com.icomp.Iswtmv10; /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ public final class BuildConfig { public final static boolean DEBUG = Boolean.parseBoolean(null); }
[ "logan.box2016@gmail.com" ]
logan.box2016@gmail.com
5a95a0a0a6f9cf474240369520a9db7225953756
8422d2113a7819473cc940d0e91333c440d75fa7
/Collection/src/main/java/com/yannyao/demo/concurrent/multithread/Lock/ReentrantLock/Lock.java
e4836547a74b3e1f4ef637d75605c4cbc8dcfcbb
[]
no_license
YannPro/Kinds-Of-Java
309f47167fb4078ce5af4113fab227234bb6f679
caeb586cbd90d3a305442fd8b406cf78a03a96e6
refs/heads/master
2020-03-22T09:26:29.701037
2018-12-02T16:18:52
2018-12-02T16:18:52
139,837,495
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package com.yannyao.demo.concurrent.multithread.Lock.ReentrantLock; /** * @Auther: YJY * @Date: 2018/12/3 00:04 * @Description: */ public class Lock{ private boolean isLocked = false; public synchronized void lock() throws InterruptedException{ while(isLocked){ wait(); } isLocked = true; } public synchronized void unlock(){ isLocked = false; notify(); } }
[ "849723885@qq.com" ]
849723885@qq.com
311932d27615f69f9863b1899419d3b565d82441
a3e9de23131f569c1632c40e215c78e55a78289a
/alipay/alipay_sdk/src/main/java/com/alipay/api/response/AlipayEcardEduCardGetResponse.java
aab5a5a5010e3c1cbfa4764e6a733334d21fd9c6
[]
no_license
P79N6A/java_practice
80886700ffd7c33c2e9f4b202af7bb29931bf03d
4c7abb4cde75262a60e7b6d270206ee42bb57888
refs/heads/master
2020-04-14T19:55:52.365544
2019-01-04T07:39:40
2019-01-04T07:39:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.EduOneCardDepositCardQueryResult; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ecard.edu.card.get response. * * @author auto create * @since 1.0, 2014-06-12 17:16:45 */ public class AlipayEcardEduCardGetResponse extends AlipayResponse { private static final long serialVersionUID = 7413394878847342523L; /** * 用户是否首次充值标记 */ @ApiField("first_deposit_flag") private Boolean firstDepositFlag; /** * 校园一卡通历史充值卡信息查询结果对象 */ @ApiListField("onecard") @ApiField("edu_one_card_deposit_card_query_result") private List<EduOneCardDepositCardQueryResult> onecard; public void setFirstDepositFlag(Boolean firstDepositFlag) { this.firstDepositFlag = firstDepositFlag; } public Boolean getFirstDepositFlag( ) { return this.firstDepositFlag; } public void setOnecard(List<EduOneCardDepositCardQueryResult> onecard) { this.onecard = onecard; } public List<EduOneCardDepositCardQueryResult> getOnecard( ) { return this.onecard; } }
[ "jiaojianjun1991@gmail.com" ]
jiaojianjun1991@gmail.com
3e93e831ea86ecfdd46f9105a0a996b58b23deee
956e2b3a5af9edf2141fdd2dd480d5986cac1662
/ProducerConsumer/src/com/company/Starvation/Main.java
12d369d2b0ab177a7e83dee930ebd6cdf030998e
[]
no_license
KevinW831205/introJava
d29a68518f1f574ff8cd5b53a03473cd535e16f4
529aa5eea52ca36fbdc3cb7d0035e863304be9a7
refs/heads/master
2020-08-02T00:04:52.371778
2020-04-14T02:25:35
2020-04-14T02:25:35
211,166,519
0
0
null
null
null
null
UTF-8
Java
false
false
1,485
java
package com.company.Starvation; import com.company.ThreadColor; import java.util.concurrent.locks.ReentrantLock; public class Main { private static ReentrantLock lock = new ReentrantLock(true); public static void main(String[] args) { Thread t1 = new Thread(new Worker(ThreadColor.ANSI_PURPLE),"Priority 10"); Thread t2 = new Thread(new Worker(ThreadColor.ANSI_RED),"Priority 8"); Thread t3 = new Thread(new Worker(ThreadColor.ANSI_BLUE),"Priority 6"); Thread t4 = new Thread(new Worker(ThreadColor.ANSI_CYAN),"Priority 4"); Thread t5 = new Thread(new Worker(ThreadColor.ANSI_GREEN),"Priority 2"); t1.setPriority(10); t2.setPriority(8); t3.setPriority(6); t4.setPriority(4); t5.setPriority(2); t1.start(); t2.start(); t3.start(); t4.start(); t5.start(); } private static class Worker implements Runnable{ private int runCount = 1; private String threadColor; public Worker(String threadColor) { this.threadColor = threadColor; } @Override public void run() { for(int i =0;i<100;i++){ lock.lock(); try{ System.out.format(threadColor+"%s runcount = %d\n",Thread.currentThread().getName(), runCount++); } finally { lock.unlock(); } } } } }
[ "bird831205@hotmail.com" ]
bird831205@hotmail.com
9efe923cfd9f3b3efc9ba114667a88dba37cdb83
655ee072037b640ffbdf7996b42eb40b50889b0a
/src/com/cisco/eManager/eManager/inventory/host/HostNotification.java
d1b89f369794ae529dcc514f6fdc829ab427a6fb
[]
no_license
mamiles/eManager
23b4d97aeceeb6a34e1bee574a1fc2a48cfc9f68
74ec6897e36608001ef11b2946d3f48f2fcf9928
refs/heads/master
2016-08-05T00:34:24.885860
2012-02-11T21:43:13
2012-02-11T21:43:13
3,418,100
1
3
null
null
null
null
UTF-8
Java
false
false
571
java
//Source file: D:\\vws\\root\\wstubb-emanager-main2-snap\\emanager\\src\\com\\cisco\\eManager\\eManager\\inventory\\host\\HostNotification.java package com.cisco.eManager.eManager.inventory.host; public class HostNotification { private HostNotificationType m_ntfcnType; private Host m_host; HostNotification(HostNotificationType type, Host host) { m_ntfcnType = type; m_host = host; } public HostNotificationType ntfcnType() { return m_ntfcnType; } public Host host() { return m_host; } }
[ "mamiles@cisco.com" ]
mamiles@cisco.com
636874b8c7708bac9d2f7fa9411531e5dccf56cf
489cdd80ed8dc667ddc9c979b142b0c05235c2a2
/yaoming-mall-common/src/main/java/com/club/web/store/service/GoodLabelsService.java
ab0af0c2089af9c8961c072c40d3be602d3322b9
[]
no_license
569934390/darenbao
4103cd748498ec6f5f2bb9069c97fa29c48535b2
a4d1bee852d1e1f3768d3f4d264a9dff2b4cfc61
refs/heads/master
2020-04-17T07:29:22.914538
2016-09-13T07:32:56
2016-09-13T07:32:56
67,473,893
0
0
null
null
null
null
UTF-8
Java
false
false
457
java
/** *@Copyright:Copyright (c) 2008 - 2100 *@Company:SJS */ package com.club.web.store.service; import java.util.List; import com.club.web.store.vo.GoodLabelsVo; import com.club.web.store.vo.GoodsBaseLabelVo; /** *@Title: *@Description: *@Author:Administrator *@Since:2016年4月8日 *@Version:1.1.0 */ public interface GoodLabelsService { void addGoodLabels(GoodLabelsVo vo); public List<GoodsBaseLabelVo> selectGoodLabels(Long goodId); }
[ "569934930@163.com" ]
569934930@163.com
1b996a210e5a107ea160efb762cac92ce79d09a4
32ad3940730796c715e26ced0e841d884c63cdb1
/algorithms/java/src/test/java/org/jessenpan/leetcode/dp/S646MaximumLengthOfPairChainTest.java
08133e29562a67d46fa23182a40a0c200035c13f
[ "Apache-2.0" ]
permissive
JessenPan/leetcode
34ea3f40e52bbe0e22112b67cecdb4be2b1f9691
4d00f175f1886cb68543fb160d29015039494a29
refs/heads/master
2022-09-13T01:34:53.815096
2022-09-03T03:28:53
2022-09-03T03:28:53
172,355,216
7
2
Apache-2.0
2020-10-13T12:12:07
2019-02-24T15:34:45
Java
UTF-8
Java
false
false
877
java
package org.jessenpan.leetcode.dp; import org.junit.Assert; import org.junit.Test; /** * @author jessenpan */ public class S646MaximumLengthOfPairChainTest { private S646MaximumLengthOfPairChain maximumLengthOfPairChain = new S646MaximumLengthOfPairChain(); @Test public void test1() { int n = maximumLengthOfPairChain.findLongestChain(new int[][] { { 1, 2 }, { 2, 3 }, { 3, 4 } }); Assert.assertEquals(2, n); } @Test public void test2() { int n = maximumLengthOfPairChain.findLongestChain(new int[][] { { 9, 10 }, { 6, 7 }, { 9, 11 }, { 5, 9 } }); Assert.assertEquals(2, n); } @Test public void test3() { int n = maximumLengthOfPairChain.findLongestChain(new int[][] { { -1, 1 }, { -2, 7 }, { -5, 8 }, { -3, 8 }, { 1, 3 }, { -2, 9 }, { -5, 2 } }); Assert.assertEquals(1, n); } }
[ "jessenpan@qq.com" ]
jessenpan@qq.com
cd13c09d07fea372d1b27150d11310eb97ab2b0b
9b462ece03bc0b9fa6b5d8628201691b7632100e
/src/l1j/william/MobTalk.java
5cd8b3dad72ac16f72d3a7a4de08bf3ea85d6d03
[]
no_license
changerui/Rev2032
cfecdcaac48a6d8bf5fb38059fc7faad680d9482
f00548f5559d67d7c8d07180081422b5168cf06b
refs/heads/master
2020-04-13T14:15:47.721378
2018-12-27T06:38:06
2018-12-27T06:38:06
163,256,614
0
1
null
null
null
null
UTF-8
Java
false
false
3,679
java
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package l1j.william; import java.util.ArrayList; import java.util.Random; import java.sql.*; import l1j.server.Server; import l1j.server.L1DatabaseFactory; import l1j.server.server.model.Instance.L1NpcInstance; import l1j.server.server.serverpackets.S_NpcChatPacket; public class MobTalk { private static ArrayList array = new ArrayList(); private static ArrayList aData6 = new ArrayList(); private static boolean NO_MORE_GET_DATA6 = false; public static void main(String a[]) { while(true) { try { Server.main(null); } catch(Exception ex) { } } } private MobTalk() { } public static void forL1MonsterTalking(L1NpcInstance monster, int type) { ArrayList aTempData = null; int[] iTemp = null; if(!NO_MORE_GET_DATA6){ NO_MORE_GET_DATA6 = true; getData6(); } int order = 0; for(int i=0; i < aData6.size(); i++) { aTempData = (ArrayList) aData6.get(i); if(((Integer) aTempData.get(0)).intValue() == monster.getNpcTemplate().get_npcId() && ((Integer) aTempData.get(1)).intValue() == type) { // Mob_id && Type if (monster.hasSkillEffect(6019)) { return; } Random random = new Random(); int chance = random.nextInt(100) + 1; if (((Integer) aTempData.get(2)).intValue() != 0) { if (((Integer) aTempData.get(2)).intValue() >= chance) { // 機率判斷 if (((Integer)aTempData.get(3)).intValue() != 0) { // 大喊 monster.broadcastPacket(new S_NpcChatPacket(monster, (String)aTempData.get(4), 2)); } else { monster.broadcastPacket(new S_NpcChatPacket(monster, (String)aTempData.get(4), 0)); } if (((Integer)aTempData.get(5)).intValue() != 0) { // 說話延遲 monster.setSkillEffect(6019, ((Integer)aTempData.get(5)).intValue() * 1000); } } } return; } } } private static void getData6(){ java.sql.Connection con = null; try { con = L1DatabaseFactory.getInstance().getConnection(); Statement stat = con.createStatement(); ResultSet rset = stat.executeQuery("SELECT * FROM william_mob_talk"); ArrayList aReturn = null; String sTemp = null; if( rset!= null) { while (rset.next()){ aReturn = new ArrayList(); aReturn.add(0, new Integer(rset.getInt("mob_id"))); aReturn.add(1, new Integer(rset.getInt("type"))); aReturn.add(2, new Integer(rset.getInt("random"))); aReturn.add(3, new Integer(rset.getInt("shout"))); aReturn.add(4, rset.getString("talk")); aReturn.add(5, new Integer(rset.getInt("delay"))); aData6.add(aReturn); } } if(con!=null && !con.isClosed()) { con.close(); } } catch(Exception ex){} } //NPC說話順序判斷 private int _order = 0; public int getOrder() { return _order; } public void setOrder(int i) { _order = i; } // NPC說話順序判斷 }
[ "changerui@gmail.com" ]
changerui@gmail.com
cc2868c1de714467a4a5a75f93815b36d7f2fce0
4a7cb14aa934df8f362cf96770e3e724657938d8
/MFES/ATS/Project/structuring/projectsPOO_1920/11/src/Voluntario.java
4d6180ad170f0a6365ea61d9b861dc05d47a6394
[]
no_license
pCosta99/Masters
7091a5186f581a7d73fd91a3eb31880fa82bff19
f835220de45a3330ac7a8b627e5e4bf0d01d9f1f
refs/heads/master
2023-08-11T01:01:53.554782
2021-09-22T07:51:51
2021-09-22T07:51:51
334,012,667
1
1
null
null
null
null
UTF-8
Java
false
false
2,416
java
import java.util.List; import java.util.Map; import java.util.HashMap; import java.util.Random; /** * Classe que trata dos voluntarios que entregam as encomendas * * @author Rui Cunha * @version 06/04/2020 */ public class Voluntario extends Transportador { private int idade; private String sexo; //Construtor vazio public Voluntario() { super(); this.idade = 0; this.sexo = "N/A"; } //Construtor por parametros public Voluntario(String username, String nome, String password,Localizacao posicao,double raio, boolean transport, boolean transporte_medico, Map<String,Integer> classificacao, HashMap<String,Encomenda> encomendas, int idade, String sexo) { super(username,nome,password,posicao,raio, transport,transporte_medico,classificacao,encomendas); this.idade = idade; this.sexo = sexo; } //Construtor por copia public Voluntario(Voluntario vol) { super(vol); this.idade = vol.getIdade(); this.sexo = vol.getSexo(); } //Getters public int getIdade() { return this.idade; } public String getSexo() { return this.sexo; } //Clone public Voluntario clone() { return new Voluntario(this); } //Setters public void setIdade(int idade) { this.idade = idade; } public void setSexo(String sexo) { this.sexo = sexo; } public String getRandomSexo(){ Random r = new Random(); boolean s = r.nextBoolean(); if(s) { return "Feminino"; } else{ return "Masculino"; } } //Metodo toString public String toString() { StringBuilder sb = new StringBuilder(); sb.append(super.toString()) .append("Idade : ").append(this.idade + "\n") .append("Sexo : ").append(this.sexo).append("\n"); return sb.toString(); } //Metodo Equals public boolean equals(Object o) { if(this == o) return true; if((o==null) || (this.getClass()!=o.getClass())) return false; Voluntario p = (Voluntario) o; return(super.equals(p) && this.idade == p.getIdade() && this.sexo.equals(p.getSexo())); } }
[ "costapedro.a1999@gmail.com" ]
costapedro.a1999@gmail.com
58c0da696b2a0985c565b2738825576841753c45
b0332e0387f268ef899b17c84cbd6bcd244ac3bd
/app/src/main/java/com/example/lijunjie/hbrdnetworkofvehicles/bean/Place.java
f05a31f3cfe079ab9c5e348cf8b96648cb51b01c
[]
no_license
tony-greel/HbrdNetworkOfVehicles
44b2f8f009d3013ddb459132da6c955a20e1c774
21d1a2a2e24c6e6d8a74f48fbaf6745410541627
refs/heads/master
2020-03-19T19:40:15.323461
2018-06-22T12:13:37
2018-06-22T12:13:37
136,865,091
0
0
null
null
null
null
UTF-8
Java
false
false
3,484
java
package com.example.lijunjie.hbrdnetworkofvehicles.bean; /** * 车辆实时信息表,位置信息 */ public class Place { private String carInformationSerial; private String date; private String dateTime; private String positionX; private String positionY; private double speed; private String acc; //acc状态 private String airconFrom; //空调状态 private int airconHeat;//空调温度 private String airconModel; //空调模式 private String mileage; //里程 private int oil; //剩余油量 private int waters; //水温 private int rev; //转速 private int tax; //机油压力 private String carGateway; //车门 private String carlight; //车灯 private int isOnline; //是否上下线 public String getCarInformationSerial() { return carInformationSerial; } public void setCarInformationSerial(String carInformationSerial) { this.carInformationSerial = carInformationSerial; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getDateTime() { return dateTime; } public void setDateTime(String dateTime) { this.dateTime = dateTime; } public String getPositionX() { return positionX; } public void setPositionX(String positionX) { this.positionX = positionX; } public String getPositionY() { return positionY; } public void setPositionY(String positionY) { this.positionY = positionY; } public double getSpeed() { return speed; } public void setSpeed(double speed) { this.speed = speed; } public String getAcc() { return acc; } public void setAcc(String acc) { this.acc = acc; } public String getAirconFrom() { return airconFrom; } public void setAirconFrom(String airconFrom) { this.airconFrom = airconFrom; } public int getAirconHeat() { return airconHeat; } public void setAirconHeat(int airconHeat) { this.airconHeat = airconHeat; } public String getAirconModel() { return airconModel; } public void setAirconModel(String airconModel) { this.airconModel = airconModel; } public String getMileage() { return mileage; } public void setMileage(String mileage) { this.mileage = mileage; } public int getOil() { return oil; } public void setOil(int oil) { this.oil = oil; } public int getWaters() { return waters; } public void setWaters(int waters) { this.waters = waters; } public int getRev() { return rev; } public void setRev(int rev) { this.rev = rev; } public int getTax() { return tax; } public void setTax(int tax) { this.tax = tax; } public String getCarGateway() { return carGateway; } public void setCarGateway(String carGateway) { this.carGateway = carGateway; } public String getCarlight() { return carlight; } public void setCarlight(String carlight) { this.carlight = carlight; } public int getIsOnline() { return isOnline; } public void setIsOnline(int isOnline) { this.isOnline = isOnline; } }
[ "13085486819@163.com" ]
13085486819@163.com
024b830dcdbc62ebf23ae6f43eb25d981b3f4467
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XCOMMONS-928-2-29-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository_ESTest_scaffolding.java
bca8b89cc3d338a732830d4ceb2711bc0d655dc7
[]
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
489
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 02 14:34:44 UTC 2020 */ package org.xwiki.extension.repository.internal.installed; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultInstalledExtensionRepository_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
f8171dabcd4ce1bf0d28ccc4006d2809cb8adbf0
de73a738238882bf39acf83daab4a670413db794
/Ancient/workspace/MCubeA/fr/Maxime3399/MCube/start/EternalDayStart.java
ad4175e88f4db88376ea0a49d780e97a24f0f960
[]
no_license
peytondodd/Desktop
d64fb43e838dc03c9c68ef67807fa65a55d8bdc7
cb3e969ae1b54b181d731610eb3febe5165252ec
refs/heads/master
2020-04-10T06:48:56.442567
2018-09-16T17:08:38
2018-09-16T17:08:38
160,865,026
1
0
null
2018-12-07T19:09:06
2018-12-07T19:09:05
null
UTF-8
Java
false
false
531
java
package fr.Maxime3399.MCube.start; import fr.Maxime3399.MCube.GameState; public class EternalDayStart { public EternalDayStart() {} public static void start() { GameState.setState(GameState.ETERNALDAY); org.bukkit.Bukkit.getWorld("world").setGameRuleValue("doDaylightCycle", "false"); org.bukkit.Bukkit.getWorld("world").setTime(1000L); } public static void stop() { GameState.setState(GameState.NONE); org.bukkit.Bukkit.getWorld("world").setGameRuleValue("doDaylightCycle", "true"); } }
[ "maxime3399.minecraft@gmail.com" ]
maxime3399.minecraft@gmail.com
7e2faec9b753b98e0ee4a32efb80ab1b440761ac
ed3a98d7776e8b0addb1ca63ab2702ecd977e218
/CWYTH/src/com/googosoft/pojo/zcbd/ZCDBMXB_PLFZ.java
ebd50a1962635124bb6ab543d3447b6a256e1439
[]
no_license
Eant99/effective-octo-eureka
a280dc17b809445a29565fb292122ed96f83d46c
09d7c6bf841a723e86c1f9242f530279de246321
refs/heads/master
2020-04-02T05:40:55.771706
2018-10-22T11:21:00
2018-10-22T11:21:00
154,097,158
0
0
null
null
null
null
UTF-8
Java
false
false
1,809
java
package com.googosoft.pojo.zcbd; import com.googosoft.util.Validate; /** * 批量赋值实体类 * @author Administrator * */ public class ZCDBMXB_PLFZ { private String bdbgbh; private String ksh; private String jsh; private String mxb_syr; private String mxb_sydw; private String mxb_cfdd; private String mxb_sl; private Float mxb_je; private String errmsg; /** * 调拨编号 * @return */ public String getBdbgbh() { return bdbgbh; } /** * 调拨编号 */ public void setBdbgbh(String bdbgbh) { this.bdbgbh = bdbgbh; } /** * 开始行 * @return */ public String getKsh() { return ksh; } public void setKsh(String ksh) { this.ksh = ksh; } /** * 结束行 * @return */ public String getJsh() { return jsh; } public void setJsh(String jsh) { this.jsh = jsh; } /** * 使用人 * @return */ public String getMxb_syr() { return mxb_syr; } public void setMxb_syr(String mxb_syr) { this.mxb_syr = mxb_syr; } /** * 使用单位 * @return */ public String getMxb_sydw() { return mxb_sydw; } public void setMxb_sydw(String mxb_sydw) { this.mxb_sydw = mxb_sydw; } /** * 存放地点 * @return */ public String getMxb_cfdd() { return mxb_cfdd; } public void setMxb_cfdd(String mxb_cfdd) { this.mxb_cfdd = mxb_cfdd; } /** * 数量 * @return */ public String getMxb_sl() { return mxb_sl; } public void setMxb_sl(String mxb_sl) { this.mxb_sl = mxb_sl; } /** * 金额 * @return */ public Float getMxb_je() { return mxb_je; } public void setMxb_je(Float mxb_je) { this.mxb_je = mxb_je; } /** * 错误信息 * @return */ public String getErrmsg() { return errmsg; } /** * 错误信息 * @return */ public void setErrmsg(String errmsg) { this.errmsg = errmsg; } }
[ "530625852@qq.com" ]
530625852@qq.com
13bef22de363efc1859f0d3f8a08a7ff1d8cadd4
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/linkvisual-20180120/src/main/java/com/aliyun/linkvisual20180120/models/DeleteLocalFileUploadJobResponseBody.java
abf314727f45aa78a6d834983ea272431062d13c
[ "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
1,814
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.linkvisual20180120.models; import com.aliyun.tea.*; public class DeleteLocalFileUploadJobResponseBody extends TeaModel { @NameInMap("Code") public String code; @NameInMap("Data") public java.util.Map<String, ?> data; @NameInMap("ErrorMessage") public String errorMessage; @NameInMap("RequestId") public String requestId; @NameInMap("Success") public Boolean success; public static DeleteLocalFileUploadJobResponseBody build(java.util.Map<String, ?> map) throws Exception { DeleteLocalFileUploadJobResponseBody self = new DeleteLocalFileUploadJobResponseBody(); return TeaModel.build(map, self); } public DeleteLocalFileUploadJobResponseBody setCode(String code) { this.code = code; return this; } public String getCode() { return this.code; } public DeleteLocalFileUploadJobResponseBody setData(java.util.Map<String, ?> data) { this.data = data; return this; } public java.util.Map<String, ?> getData() { return this.data; } public DeleteLocalFileUploadJobResponseBody setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; return this; } public String getErrorMessage() { return this.errorMessage; } public DeleteLocalFileUploadJobResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public DeleteLocalFileUploadJobResponseBody setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
da7c5988cca249ec9bb0fce17686cbd9390abdf3
87f2f27a77172b7d56ccf9bca4403ff652e38823
/src/DoubtsWebinar/DoubtsWebinar1.java
54b6983c400a3a2a0af7789ac09788a8e6e2f3a8
[]
no_license
coding-blocks-archives/CruxOnline4June2018
698c5e1c93092f6101fdfca4e5d4060119c2c870
13edc9a0729e3d84e9fc84c781ad51da0fedee82
refs/heads/master
2020-03-19T05:12:44.559185
2018-09-13T09:14:25
2018-09-13T09:14:25
135,909,855
1
1
null
null
null
null
UTF-8
Java
false
false
1,019
java
package DoubtsWebinar; import java.util.Arrays; import java.util.Scanner; public class DoubtsWebinar1 { public static void main(String[] args) { // char ch = 'b'; // // int num = ch; // System.out.println((int) ch); Scanner scn = new Scanner(System.in); // char ch = scn.nextLine().charAt(0); // System.out.println(ch); // int n = scn.nextInt(); // // scn.nextLine(); // // String s1 = scn.nextLine(); // String s2 = scn.nextLine(); // // System.out.println(n); // System.out.println(s1); // System.out.println(s2); int[] a = { 3, 2, 18, 9 }; Arrays.sort(a); for (int val : a) { System.out.print(val + " "); } System.out.println(); pascal(5); int val = (int) Math.pow(2, 5); System.out.println(val); } public static void pascal(int n) { for (int row = 0; row < n; row++) { int val = 1; for (int col = 0; col <= row; col++) { System.out.print(val + " "); val = (val * (row - col)) / (col + 1); } System.out.println(); } } }
[ "garimachhikara128@gmail.com" ]
garimachhikara128@gmail.com
f89072bb90e6bfd35c57892e432cc1f5d385f2b4
3accfd89abf359f268791f6eb5026a8de22187b2
/MyServiceTest/app/src/main/java/com/example/administrator/myservicetest/MyIntentService.java
dbcf311da494c25c621432ec18c185d00db07bb6
[ "Apache-2.0" ]
permissive
haibowen/Android
6de123edffea3ceca0ee6fafd5f87a4ab9e137a5
247da3885e9e68bccc42c317d0c0a55821b24e4b
refs/heads/master
2020-03-17T17:47:35.111539
2019-03-26T09:31:29
2019-03-26T09:31:29
133,802,229
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package com.example.administrator.myservicetest; import android.app.IntentService; import android.content.Intent; import android.support.annotation.Nullable; import android.util.Log; public class MyIntentService extends IntentService { public MyIntentService(){ super("MyIntentService"); } @Override protected void onHandleIntent(@Nullable Intent intent) { Log.d("666", "onHandleIntent: "+Thread.currentThread().getId()); } @Override public void onDestroy() { super.onDestroy(); Log.d("666", "onDestroy: "); } }
[ "1461154748@qq.com" ]
1461154748@qq.com
a091b8a3814e0ceb95b5c8ad3b8b6423369688f7
b766c0b6753f5443fd84c14e870ec316edc116bb
/java-basic/examples/ch04(18~20)/test18/Test18_6.java
0396702ad8629477cf48c3e7d61b43e0b98229ab
[]
no_license
angelpjn/bitcamp
5a83b7493812ae5dd4a61b393743a673085b59b5
3c1fb28cda2ab15228bcaed53160aabd936df248
refs/heads/master
2021-09-06T20:31:18.846623
2018-02-11T05:23:07
2018-02-11T05:23:07
104,423,428
0
0
null
null
null
null
UTF-8
Java
false
false
2,303
java
/* 회원 가입 시 id, email 형식의 정합성을 어떻게 검증할 것인가? web 크롤링 시 필요한 값을 어떻게 추출해낼 것인가? 기존 학습 내용을 활용할 시 수백라인 이상이 필요하며 그 코딩의 정합성 또한 불안정 이 때, 사용되는 검증 식이 "정규식" 특정 언어에 종속되지 않는다. 정규식 = Regular Expression = re = RegEx - 어떻게 PK를 찾아낼 것인가? - 어떤 기준으로 출력 해낼 것인가? - 자바에서 "\"는 escape key를 사용하기 위한 예약어이므로 정규식의 \를 사용하기 위해서는 \\와 같이 두번 사용해야 함 참조 API : java.util.regex.Pattern 클래스 */ package bitcamp.java100.test18; public class Test18_6 { public static void main(String[] args) throws Exception { String email = "hong@test.com"; // match(정규표현식) : 정규표현식(Regular Expression)의 규칙과 맞는지 검사. true, false로 return System.out.println(email.matches("1hong@test.com")); // . : 임의의 문자 한 개 // + : 한 개 이상 / * : 0개 이상 / ? : 0 또는 한 개 // \. : 그냥 dot 문자 System.out.println(email.matches(".+@.+\\..+")); // \D : 숫자를 제외한 문자 System.out.println(email.matches("^\\D.+@.+\\..+")); System.out.println("--------------------------"); String str = "홍길동(hong@test.com),임꺽정(leem@test.com)," + "유관순(yoo@test.com),안중근(ahn@test.com),윤봉길(yoon@test.com)"; // \w : a-zA-Z_0-9 // 해당 문자열에서 주어진 규칙을 갖는 문자열을 찾아 출력 : 정규표현식 규칙 생성 java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("\\w+@\\w+\\.\\w+"); // 정규식 규칙 따라 검사 수행 대상 객체 준비 java.util.regex.Matcher matcher = pattern.matcher(str); // matcher를 이용하여 규칙에 해당하는 문자열 검색 int startIndex = 0; while (matcher.find(startIndex)) { System.out.println(startIndex); String matchString = matcher.group(); startIndex = matcher.end(); System.out.println(matchString); } } }
[ "angelpjn@naver.com" ]
angelpjn@naver.com
64cdb3aa13b96851742233002f475a76020b4395
056ff5f928aec62606f95a6f90c2865dc126bddc
/javashop/shop-core/src/main/java/com/enation/app/shop/component/payment/plugin/alipay/sdk34/api/response/AlipayEcoMycarParkingOrderstatusQueryResponse.java
eca5e2d14c5e4b84cd102b5a92d73d7fe881783a
[]
no_license
luobintianya/javashop
7846c7f1037652dbfdd57e24ae2c38237feb1104
ac15b14e8f6511afba93af60e8878ff44e380621
refs/heads/master
2022-11-17T11:12:39.060690
2019-09-04T08:57:58
2019-09-04T08:57:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,601
java
package com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.response; import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.AlipayResponse; import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.internal.mapping.ApiField; /** * ALIPAY API: alipay.eco.mycar.parking.orderstatus.query response. * * @author auto create * @since 1.0, 2016-06-14 15:09:04 */ public class AlipayEcoMycarParkingOrderstatusQueryResponse extends AlipayResponse { private static final long serialVersionUID = 3249911882921211783L; /** * 支付宝交易流水号订单 */ @ApiField("alipay_order_id") private String alipayOrderId; /** * 车平台订单 */ @ApiField("car_order_id") private String carOrderId; /** * 设备商订单id */ @ApiField("equipment_order_id") private String equipmentOrderId; /** * 支付金额 */ @ApiField("pay_money") private String payMoney; /** * 支付状态 */ @ApiField("pay_status") private String payStatus; /** * 支付的时间 */ @ApiField("pay_time") private String payTime; /** * 支付方式(1为支付宝在线缴费,2为支付宝代扣缴费) */ @ApiField("pay_type") private String payType; /** * 返回状态(1为成功,0为失败) */ @ApiField("status") private String status; public void setAlipayOrderId(String alipayOrderId) { this.alipayOrderId = alipayOrderId; } public String getAlipayOrderId( ) { return this.alipayOrderId; } public void setCarOrderId(String carOrderId) { this.carOrderId = carOrderId; } public String getCarOrderId( ) { return this.carOrderId; } public void setEquipmentOrderId(String equipmentOrderId) { this.equipmentOrderId = equipmentOrderId; } public String getEquipmentOrderId( ) { return this.equipmentOrderId; } public void setPayMoney(String payMoney) { this.payMoney = payMoney; } public String getPayMoney( ) { return this.payMoney; } public void setPayStatus(String payStatus) { this.payStatus = payStatus; } public String getPayStatus( ) { return this.payStatus; } public void setPayTime(String payTime) { this.payTime = payTime; } public String getPayTime( ) { return this.payTime; } public void setPayType(String payType) { this.payType = payType; } public String getPayType( ) { return this.payType; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } }
[ "sylow@javashop.cn" ]
sylow@javashop.cn
39bff04c2b249dc7518e23c931aad2b02d958ee5
5d29b779dd998f4ae65643a550d685aedbec3a2e
/src/main/java/com/chrisnewland/jitwatch/util/ClassUtil.java
b0c3b90e97e593f0b19d491bfc789644554bc85a
[ "BSD-2-Clause-Views" ]
permissive
bruce2008github/jitwatch
9a142d0eb7d3d9e6146a48dee9b97467570d5ece
98fabf530a6563778fd9a8808add7fdcf6baa6c2
refs/heads/master
2020-12-01T09:32:09.896864
2013-11-06T09:23:09
2013-11-06T09:23:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,540
java
/* * Copyright (c) 2013 Chris Newland. All rights reserved. * Licensed under https://github.com/chriswhocodes/jitwatch/blob/master/LICENSE-BSD * http://www.chrisnewland.com/jitwatch */ package com.chrisnewland.jitwatch.util; import java.lang.reflect.Method; import java.net.URI; import java.net.URL; import java.net.URLClassLoader; public class ClassUtil { public static Class<?> loadClassWithoutInitialising(String fqClassName) throws ClassNotFoundException { try { return Class.forName(fqClassName, false, ClassLoader.getSystemClassLoader()); } catch (Throwable t) { throw t; } } public static void addURIToClasspath(URI uri) { try { URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); URL url = uri.toURL(); Class<?> urlClass = URLClassLoader.class; Method method = urlClass.getDeclaredMethod("addURL", new Class<?>[] { URL.class }); method.setAccessible(true); method.invoke(urlClassLoader, new Object[] { url }); } catch (Throwable t) { t.printStackTrace(); } } public static URL[] getClassLoaderURLs() { try { URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class<?> urlClass = URLClassLoader.class; Method method = urlClass.getDeclaredMethod("getURLs", new Class<?>[] {}); method.setAccessible(true); Object result = method.invoke(urlClassLoader, new Object[] {}); return (URL[])result; } catch (Throwable t) { t.printStackTrace(); } return null; } }
[ "chris@chrisnewland.com" ]
chris@chrisnewland.com
59b856f17d11b89e61c77121394e68d7bc3dddbf
dc599e9ff38515bc4505450fa6b2a07f2bc83a3c
/algorithms/java/src/Greedy/CreateMaximumNumber.java
6104f253a9ae1c8ef2100cf91d05f681f52fce60
[]
no_license
Jack47/leetcode
dd53da8b884074f23bc04eb14429fe7a6bdf3aca
aed4f6a90b6a69ffcd737b919eb5ba0113a47d40
refs/heads/master
2021-01-10T16:27:41.855762
2018-07-20T08:53:36
2018-07-20T08:53:36
44,210,364
0
0
null
null
null
null
UTF-8
Java
false
false
2,142
java
package Greedy; public class CreateMaximumNumber { int[] getMaxKelements(int[] nums, int k) { if (k == 0) return new int[0]; if (k > nums.length) return null; if (k == nums.length) return nums; int[] result = new int[k]; int top = -1; for (int i = 0; i < nums.length; i++) { // use larger number if we have enough nums while (top >= 0 && nums.length - i >= (k - top) && result[top] < nums[i]) { top--; } // store current nums if has capacity; if (top < k - 1) { result[++top] = nums[i]; } } return result; } int[] merge(int[] nums1, int[] nums2) { int[] result = new int[nums1.length + nums2.length]; int k = 0; int i = 0, j = 0; while (i < nums1.length || j < nums2.length) { if (j >= nums2.length || i < nums1.length && isGreater(nums1, i, nums2, j)) { result[k++] = nums1[i++]; } else { result[k++] = nums2[j++]; } } return result; } boolean isGreater(int[] nums1, int s1, int[] nums2, int s2) { if (nums1 == null) return false; if(nums2 == null) return true; while (s1 < nums1.length && s2 < nums2.length) { if (nums1[s1] == nums2[s2]) { s1++; s2++; } else if (nums1[s1] > nums2[s2]) { return true; } else { return false; } } return s1 < nums1.length ? true : false; // equal or end } public int[] maxNumber(int[] nums1, int[] nums2, int k) { int[] max = null; for (int i = 0; i <= k; i++) { int[] n1 = getMaxKelements(nums1, i); int[] n2 = getMaxKelements(nums2, k - i); if (n1 == null || n2 == null) { continue; } int[] result = merge(n1, n2); if (isGreater(result, 0, max, 0)) { max = result; } } return max; } }
[ "scsvip@gmail.com" ]
scsvip@gmail.com
276639b292b17a287e97e0656ab6584e61106f01
e0ffaa78078bba94b5ad7897ce4baf9636d5e50d
/plugins/edu.kit.ipd.sdq.modsim.hla.edit/src/edu/kit/ipd/sdq/modsim/hla/ieee1516/omt/provider/FixedRecordDataType1ItemProvider.java
58a61164ddcc7711a9b830d6b5413cecfabb67cf
[]
no_license
kit-sdq/RTI_Plugin
828fbf76771c1fb898d12833ec65b40bbb213b3f
bc57398be3d36e54d8a2c8aaac44c16506e6310c
refs/heads/master
2021-05-05T07:46:18.402561
2019-01-30T13:26:01
2019-01-30T13:26:01
118,887,589
0
0
null
null
null
null
UTF-8
Java
false
false
2,735
java
/** */ package edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.provider; import edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.FixedRecordDataType1; import java.util.Collection; import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; /** * This is the item provider adapter for a {@link edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.FixedRecordDataType1} object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class FixedRecordDataType1ItemProvider extends FixedRecordDataTypeItemProvider { /** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public FixedRecordDataType1ItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); } return itemPropertyDescriptors; } /** * This returns FixedRecordDataType1.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/FixedRecordDataType1")); } /** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getText(Object object) { String label = ((FixedRecordDataType1)object).getIdtag(); return label == null || label.length() == 0 ? getString("_UI_FixedRecordDataType1_type") : getString("_UI_FixedRecordDataType1_type") + " " + label; } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } }
[ "gruen.jojo.develop@gmail.com" ]
gruen.jojo.develop@gmail.com
512f7a3989d9b5e46c90226a1f74e3211f5b642a
30e4463fb48c65ed53b696e813cd9d4f78d12bfb
/cdi-extension-spi/src/main/java/org/apache/aries/cdi/extension/spi/adapt/ProcessPotentialService.java
998e1bc22e09a7540dd252f6bccc53e41f0ccb93
[ "Apache-2.0" ]
permissive
rotty3000/aries-cdi
b9f0c8359990507a1721fdfa97a3c2c7f23d30ae
fcc0fead31874c488e6ab9397259482bd7d0d9f1
refs/heads/master
2023-06-22T08:44:08.057295
2022-05-05T21:41:34
2022-05-06T03:04:20
178,233,603
2
0
Apache-2.0
2023-09-04T20:55:19
2019-03-28T15:39:28
Java
UTF-8
Java
false
false
1,732
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 org.apache.aries.cdi.extension.spi.adapt; import static java.util.Objects.requireNonNull; import javax.enterprise.inject.spi.AnnotatedType; import javax.enterprise.inject.spi.ProcessAnnotatedType; import javax.enterprise.inject.spi.configurator.AnnotatedTypeConfigurator; /** * Can be observed in an extension to customize an annotated type without * {@link org.osgi.service.cdi.annotations.Service} marker. */ public class ProcessPotentialService { private final ProcessAnnotatedType<?> processAnnotatedType; public ProcessPotentialService(final ProcessAnnotatedType<?> processAnnotatedType) { this.processAnnotatedType = requireNonNull(processAnnotatedType, "processAnnotatedType can't be null"); } public ProcessAnnotatedType<?> getProcessAnnotatedType() { return processAnnotatedType; } public AnnotatedType<?> getAnnotatedType() { return processAnnotatedType.getAnnotatedType(); } public AnnotatedTypeConfigurator<?> configureAnnotatedType() { return processAnnotatedType.configureAnnotatedType(); } @Override public String toString() { return "ProcessPotentialService{processAnnotatedType=" + processAnnotatedType + '}'; } }
[ "rmannibucau@gmail.com" ]
rmannibucau@gmail.com
b58572d2acc407931e0ab44a828cc19280266759
c9c2cebd53884216b3d896cffeb770a2ae4c8db7
/src/RemoveComments.java
a42a2e7b4965aa742c0cce54fdc2c85901536cc2
[]
no_license
zhejianusc/leetcode
190d834d127227060016f1693726c0d1af467d32
7ef788b18bc59fabacad3742ca5430e119a32e2e
refs/heads/master
2020-04-23T08:29:39.478803
2019-02-26T01:06:10
2019-02-26T01:06:10
171,038,858
0
0
null
null
null
null
UTF-8
Java
false
false
2,339
java
import java.util.ArrayList; import java.util.List; /** * Created by jianzhe on 9/14/18. */ public class RemoveComments { private boolean incomment; private String unfinish; private List<String> res; // public void addLine(String s) { // unfinish = ""; // res.add(s); // } // // public void processComment(String line) { // int idx = line.indexOf("*/"); // if (idx == -1) return; // incomment = false; // processNotComment(line.substring(idx + 2)); // // } // // public void processNotComment(String line) { // int idx1 = line.indexOf("/*"); // int idx2 = line.indexOf("//"); // if (idx1 == -1 && idx2 == -1) { // addLine(unfinish + line); // return; // } // if (idx2 != -1 && (idx1 == -1 || idx2 < idx1)) { // addLine(unfinish + line.substring(0, idx1)); // return; // } // incomment = true; // unfinish += line.substring(0, idx1); // processComment(line.substring(idx1 + 2)); // // } // // public List<String> removeComments(String[] source) { // incomment = false; // unfinish = ""; // res = new ArrayList<>(); // for (String line: source) { // if (incomment) { // processComment(line); // } else { // processNotComment(line); // } // } // return res; // } private void addLine(String s) { unfinish = ""; res.add(s); } private void processIncomment(String line) { int idx1 = line.indexOf("/*"); int idx2 = line.indexOf("//"); if (idx1 == -1 && idx2 == -1) { addLine(unfinish + line); return; } if (idx2 != -1 && (idx1 == -1 || (idx1 < idx2)) ) { addLine(unfinish + line.substring(0, idx2 + 1)); } } private void pricessNotComment(String line) { } public List<String> removeComment(List<String> comments) { incomment = false; unfinish = ""; res = new ArrayList<>(); for(String line : comments) { if (incomment) { processIncomment(line); } else { pricessNotComment(line); } } return res; } }
[ "jianzher@sina.com" ]
jianzher@sina.com
22f2a6f961afa5f1588848b56d8d55f795c3b9fd
f009dc33f9624aac592cb66c71a461270f932ffa
/src/main/java/com/alipay/api/response/AlipayPcreditLoanCollateralCarQueryResponse.java
f21aa30350743446f7f6ff1a7835bb35f2fd01f3
[ "Apache-2.0" ]
permissive
1093445609/alipay-sdk-java-all
d685f635af9ac587bb8288def54d94e399412542
6bb77665389ba27f47d71cb7fa747109fe713f04
refs/heads/master
2021-04-02T16:49:18.593902
2020-03-06T03:04:53
2020-03-06T03:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,347
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.pcredit.loan.collateral.car.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayPcreditLoanCollateralCarQueryResponse extends AlipayResponse { private static final long serialVersionUID = 5113459858618323833L; /** * 用户常住地,参考标准的行政区域编号(http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/),如: 330100表示杭州市 */ @ApiField("address") private String address; /** * 业务流水号,即用户授信申请的单号,每次授信申请由借呗平台生成的唯一编号,通知估值时给到机构 */ @ApiField("apply_no") private String applyNo; /** * 车辆品牌标识,合作机构提供的车型库,如: 1表示奥迪 */ @ApiField("car_brand_id") private String carBrandId; /** * 车辆颜色(中文),合作机构提供的颜色范围,如: 米色,棕色,金色,紫色,巧克力色,黑色,蓝色,灰色,绿色,红色,橙色,白色,香槟色,银色,黄色 */ @ApiField("car_color") private String carColor; /** * 发动机号 */ @ApiField("car_engine_no") private String carEngineNo; /** * 行驶里程数,单位:公里 */ @ApiField("car_mileage") private Long carMileage; /** * 车型标识,合作机构提供的车型库,如: 1127895表示2017款 奥迪A8L A8L 45 TFSI quattro舒适型 */ @ApiField("car_model_id") private String carModelId; /** * 车辆注册日期(行驶证上注册时间),格式:yyyy-MM-dd */ @ApiField("car_reg_date") private String carRegDate; /** * 车系标识,合作机构提供的车型库,如: 10表示奥迪A8L */ @ApiField("car_series_id") private String carSeriesId; /** * 车架号(Vehicle Identification Number,车辆识别代码) */ @ApiField("car_vin") private String carVin; /** * 证件号,查询接口仅提供加密串,算法双方约定 */ @ApiField("cert_no") private String certNo; /** * 证件类型,和证件号cert_no配合使用,由平台定义,目前支持的证件类型有: IDENTITY_CARD-身份证 */ @ApiField("cert_type") private String certType; /** * 押品录入时间,格式:yyyy-MM-dd HH:mm:ss */ @ApiField("created_time") private String createdTime; /** * 上牌地,合作机构提供支持办理贷款的省市,参考标准的行政区域编号(http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/),如: 330100表示杭州市 */ @ApiField("lic_plate_address") private String licPlateAddress; /** * 车牌号 */ @ApiField("lic_plate_no") private String licPlateNo; /** * 客户姓名 */ @ApiField("name") private String name; public void setAddress(String address) { this.address = address; } public String getAddress( ) { return this.address; } public void setApplyNo(String applyNo) { this.applyNo = applyNo; } public String getApplyNo( ) { return this.applyNo; } public void setCarBrandId(String carBrandId) { this.carBrandId = carBrandId; } public String getCarBrandId( ) { return this.carBrandId; } public void setCarColor(String carColor) { this.carColor = carColor; } public String getCarColor( ) { return this.carColor; } public void setCarEngineNo(String carEngineNo) { this.carEngineNo = carEngineNo; } public String getCarEngineNo( ) { return this.carEngineNo; } public void setCarMileage(Long carMileage) { this.carMileage = carMileage; } public Long getCarMileage( ) { return this.carMileage; } public void setCarModelId(String carModelId) { this.carModelId = carModelId; } public String getCarModelId( ) { return this.carModelId; } public void setCarRegDate(String carRegDate) { this.carRegDate = carRegDate; } public String getCarRegDate( ) { return this.carRegDate; } public void setCarSeriesId(String carSeriesId) { this.carSeriesId = carSeriesId; } public String getCarSeriesId( ) { return this.carSeriesId; } public void setCarVin(String carVin) { this.carVin = carVin; } public String getCarVin( ) { return this.carVin; } public void setCertNo(String certNo) { this.certNo = certNo; } public String getCertNo( ) { return this.certNo; } public void setCertType(String certType) { this.certType = certType; } public String getCertType( ) { return this.certType; } public void setCreatedTime(String createdTime) { this.createdTime = createdTime; } public String getCreatedTime( ) { return this.createdTime; } public void setLicPlateAddress(String licPlateAddress) { this.licPlateAddress = licPlateAddress; } public String getLicPlateAddress( ) { return this.licPlateAddress; } public void setLicPlateNo(String licPlateNo) { this.licPlateNo = licPlateNo; } public String getLicPlateNo( ) { return this.licPlateNo; } public void setName(String name) { this.name = name; } public String getName( ) { return this.name; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
5ca68b2b4ae4b097d5bc62140c95518401c5d0a3
f77d04f1e0f64a6a5e720ce24b65b1ccb3c546d2
/zyj-hec-master/zyj-hec/src/main/java/com/hand/hec/bpm/controllers/PageGroupFieldController.java
b6cc479b81c431fbdb47b29618f23d55dbff5075
[]
no_license
floodboad/zyj-hssp
3139a4e73ec599730a67360cd04aa34bc9eaf611
dc0ef445935fa48b7a6e86522ec64da0042dc0f3
refs/heads/master
2023-05-27T21:28:01.290266
2020-01-03T06:21:59
2020-01-03T06:29:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,514
java
package com.hand.hec.bpm.controllers; import com.hand.hap.core.IRequest; import com.hand.hap.mybatis.common.Criteria; import com.hand.hap.mybatis.common.query.Comparison; import com.hand.hap.mybatis.common.query.WhereField; import com.hand.hap.system.controllers.BaseController; import com.hand.hap.system.dto.CodeValue; import com.hand.hap.system.dto.ResponseData; import com.hand.hap.system.service.ICodeService; import com.hand.hec.bpm.dto.PageGroupField; import com.hand.hec.bpm.service.IPageGroupFieldService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import java.util.Collections; import java.util.List; @Controller public class PageGroupFieldController extends BaseController { @Autowired private IPageGroupFieldService service; @Autowired private ICodeService codeService; @RequestMapping(value = "/bpm/BPM102/pageGroupField") public ModelAndView jumpTpltLayoutBasic(HttpServletRequest request) { ModelAndView view = new ModelAndView("bpm/BPM102/pageGroupField"); IRequest requestCtx = createRequestContext(request); List<CodeValue> dataTypeList = codeService.getCodeValuesByCode(requestCtx, "BPM.DATABASE_DATATYPE"); view.addObject("dataType", dataTypeList); List<CodeValue> logicTypeList = codeService.getCodeValuesByCode(requestCtx, "BPM.DATABASE_LOGICTYPE"); view.addObject("logicType", logicTypeList); return view; } @RequestMapping(value = "/bpm/pageGroupField/query") @ResponseBody public ResponseData query(HttpServletRequest request, PageGroupField field, @RequestParam(defaultValue = DEFAULT_PAGE) int page, @RequestParam(defaultValue = DEFAULT_PAGE_SIZE) int pageSize) { IRequest requestCtx = createRequestContext(request); if (field.getEntityId() == null) { return new ResponseData(Collections.emptyList()); } Criteria criteria = new Criteria(field); criteria.where(new WhereField(PageGroupField.FIELD_FIELD_ID, Comparison.EQUAL), new WhereField(PageGroupField.FIELD_FIELD_DESC, Comparison.LIKE), new WhereField(PageGroupField.FIELD_ENTITY_ID, Comparison.EQUAL), new WhereField(PageGroupField.FIELD_QUERY_FLAG, Comparison.EQUAL)); return new ResponseData(service.selectOptions(requestCtx, field, criteria, page, pageSize)); } @RequestMapping(value = "/bpm/pageGroupField/submit") @ResponseBody public ResponseData submit(@RequestBody List<PageGroupField> dto, HttpServletRequest request, BindingResult result) { getValidator().validate(dto, result); if (result.hasErrors()) { ResponseData responseData = new ResponseData(false); responseData.setMessage(getErrorMessage(result, request)); return responseData; } IRequest requestCtx = createRequestContext(request); return new ResponseData(service.batchUpdate(requestCtx, dto)); } }
[ "1961187382@qq.com" ]
1961187382@qq.com
fe1adba92b746b3e8f9958a893d056cca1eac3e6
eee0ddc138c25e413df21d389323531f27052121
/Lecture/Spring/Work/spring51.jstl/src/main/java/com/spring51/jstl/jstlController.java
a5a1b4df3de0f85f8b05b683a39e4612304dc344
[]
no_license
seongyoung9/javapro01
d06fea45b0b8ef6cb1f7f7d7e3f277bf0bcfc9c6
92f31349efd4a3c7a103240700ca29e0191f5bb3
refs/heads/master
2021-09-05T18:23:41.052618
2018-01-30T07:24:54
2018-01-30T07:24:54
103,618,015
0
0
null
null
null
null
UTF-8
Java
false
false
3,532
java
package com.spring51.jstl; import java.text.DateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class jstlController { private static final Logger logger = LoggerFactory.getLogger(HomeController.class); @RequestMapping(value = "/jstl/jstl01", method = RequestMethod.GET) public String jstl01(Model model) { logger.info("jstl01"); return "jstl/jstl01"; //--> views / jslt / jslt01.jsp } @RequestMapping(value = "/jstl/jstl02", method = RequestMethod.GET) public String jstl02(Model model) { logger.info("jstl02"); int num1 = 7; int num2 = 9; //model.addAttribute를 사용하여 자바코드 변수를 jsp파일로 넘긴다. model.addAttribute("num1", num1); model.addAttribute("num2", num2); return "jstl/jstl02"; } @RequestMapping(value = "/jstl/jstl03", method = RequestMethod.GET) public String jstl03(Model model) { logger.info("jstl03"); return "jstl/jstl03"; //--> views / jslt / jslt03.jsp } @RequestMapping(value = "/jstl/jstl11", method = RequestMethod.GET) public String jstl11(Model model) { logger.info("jstl11"); return "jstl/jstl11"; //--> views / jslt / jslt11.jsp } @RequestMapping(value = "/jstl/jstl12", method = RequestMethod.GET) public String jstl12(Model model) { logger.info("jstl12"); return "jstl/jstl12"; //--> views / jslt / jslt12.jsp } @RequestMapping(value = "/jstl/jstl21for", method = RequestMethod.GET) public String jstl21for(Model model) { logger.info("jstl21for"); return "jstl/jstl21for"; } @RequestMapping(value = "/jstl/jstl22foreach", method = RequestMethod.GET) public String jstl22foreach(Model model) { logger.info("jstl22foreach"); /* ====String 배열===== */ String[] arr = {"순두부","된장찌개","제육덮밥"}; model.addAttribute("array", arr); /* ====ArrayList 배열===== */ List<String> arr1 = new ArrayList<String>(); arr1.add("두부"); arr1.add("찌개"); arr1.add("덮밥"); model.addAttribute("list", arr1); return "jstl/jstl22foreach"; } @RequestMapping(value = "/jstl/jstl31includefile", method = RequestMethod.GET) public String jstl31includefile(Model model) { return "jstl/jstl31includefile"; } @RequestMapping(value = "/jstl/jstl32includepage", method = RequestMethod.GET) public String jstl32includepage(Model model) { logger.info("jstl32includepage"); return "jstl/jstl32includepage"; } @RequestMapping(value = "/jstl/jstl32sub", method = RequestMethod.GET) public String jstl32sub(Model model) { logger.info("jstl32sub"); return "jstl/jstl32sub"; } @RequestMapping(value = "/jstl/jstl33import", method = RequestMethod.GET) public String jstl33import(Model model) { logger.info("jstl33import"); return "jstl/jstl33import"; } @RequestMapping(value = "/jstl/jstl41redirect", method = RequestMethod.GET) public String jstl41redirect(Model model) { logger.info("jstl41redirect"); return "jstl/jstl41redirect"; } @RequestMapping(value = "/jstl/jstl42forward", method = RequestMethod.GET) public String jstl42forward(Model model) { logger.info("jstl42forward"); return "jstl/jstl42forward"; } }
[ "suv1214@naver.com" ]
suv1214@naver.com
92915e47b46e8be4a7bd09f6e3731df4665feb97
fa9c7cc793458184aab612536fb30d1df62010e0
/MyCustomViewLib/src/com/xuexiang/view/pickers/listeners/CustomListener.java
bde4f790a89c409a035203e132cd33561a40c2b5
[]
no_license
xdcs100/UtilXX
1056e62b7b25af023b6a42b0f5b2826f1fd56f4d
62ba9e5a5fef09ec5328bf624ab6c5c2c7522e39
refs/heads/master
2021-07-11T14:28:44.729444
2017-10-10T15:57:07
2017-10-10T15:57:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
184
java
package com.xuexiang.view.pickers.listeners; import android.view.View; /** * @author matt * blog: addapp.cn */ public interface CustomListener { void customLayout(View v); }
[ "xuexiangjys@163.com" ]
xuexiangjys@163.com
b3581551d21779d896fdbe52461d41c39d594d6c
23d21d575da06d8a0f0c3a266915df321b5154eb
/java/designpattern/src/main/java/designpattern/gof_abstractFactory/sample004/OSXFactory.java
9f92044b5f7d6f1fbd24dd91a34b0ac6bcbbfffb
[]
no_license
keepinmindsh/sample
180431ce7fce20808e65d885eab1ca3dca4a76a9
4169918f432e9008b4715f59967f3c0bd619d3e6
refs/heads/master
2023-04-30T19:26:44.510319
2023-04-23T12:43:43
2023-04-23T12:43:43
248,352,910
4
0
null
2023-03-05T23:20:43
2020-03-18T22:03:16
Java
UTF-8
Java
false
false
191
java
package designpattern.gof_abstractFactory.sample004; public class OSXFactory implements GUIFactory { @Override public Button createButton() { return new OSXButton(); } }
[ "keepinmindsh@gmail.com" ]
keepinmindsh@gmail.com
13a05eeaf70a775b1c768fc756059b41c776e6d8
6253283b67c01a0d7395e38aeeea65e06f62504b
/decompile/framework/hwpush/defpackage/ar.java
8a6c120f9530983614f8794502aed725b9c72df0
[]
no_license
sufadi/decompile-hw
2e0457a0a7ade103908a6a41757923a791248215
4c3efd95f3e997b44dd4ceec506de6164192eca3
refs/heads/master
2023-03-15T15:56:03.968086
2017-11-08T03:29:10
2017-11-08T03:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package defpackage; /* renamed from: ar */ class ar { String bx; int by; Object bz; String mName; private ar() { this.bx = ""; this.by = -1; this.mName = ""; this.bz = null; } }
[ "liming@droi.com" ]
liming@droi.com
ab14e39f1540cbbaddd424d38188cc3593ca92dc
cc87d8282ea9bf8f986fe9ae18a4240dce29a438
/src/main/java/com/fossgalaxy/games/fireworks/ai/hopshackle/stats/StateGathererActionClassifierFullTree.java
49adf86e33174db4e76ff4e3f714f47d5b23dfc7
[]
no_license
hopshackle/fireworks
d2b23e3ec3571c63c6a7d61ba6bcaff39da9236a
d04b925374d7f033c12dd77012a30c71de9e780a
refs/heads/master
2022-06-28T17:40:08.718542
2019-07-27T09:08:22
2019-07-27T09:08:22
135,741,738
3
2
null
2022-05-20T20:48:50
2018-06-01T16:43:35
Java
UTF-8
Java
false
false
2,249
java
package com.fossgalaxy.games.fireworks.ai.hopshackle.stats; import com.fossgalaxy.games.fireworks.ai.hopshackle.mcts.MCTSNode; import com.fossgalaxy.games.fireworks.state.GameState; import org.apache.commons.math3.distribution.NormalDistribution; import java.util.Map; public class StateGathererActionClassifierFullTree extends StateGathererFullTree { private NormalDistribution Z = new NormalDistribution(); public StateGathererActionClassifierFullTree(String rules, String conventions, int visitThreshold, int depth) { super(rules, conventions, visitThreshold, depth); filename = "/TreeActionData.csv"; } @Override public void storeData(MCTSNode node, GameState gameState, int playerID) { double bestScore = node.getBestNode().rolloutScores.getMean(); double bestN = node.getBestNode().rolloutScores.getN(); double bestVar = Math.pow(node.getBestNode().rolloutScores.getStdDev(), 2); if (bestN < 50) return; try { for (MCTSNode child : node.getChildren()) { double childScore = child.getMeanScore(); double childN = child.getVisits(); if (childN < 20) continue; double childVar = Math.pow(child.rolloutScores.getStdDev(), 2); if (bestVar == 0.0 || childVar == 0.0) continue; double statistic = (bestScore - childScore) / Math.sqrt(bestVar / bestN + childVar / childN); double score = 2.0 * Z.cumulativeProbability(-statistic); if (Double.isNaN(score)) { throw new AssertionError("Not a Number in calculation"); } Map<String, Double> features = extractFeaturesWithRollForward(gameState, child.getAction(), playerID); if (logger.isDebugEnabled()) { logger.debug(String.format("Action %s has value %.3f\n", child.getAction(), score)); logger.debug(asCSVLine(features)); } String csvLine = asCSVLine(features); writerCSV.write(String.format("%.3f\t%s\n", score, csvLine)); } } catch (Exception e) { e.printStackTrace(); } } }
[ "james@janigo.co.uk" ]
james@janigo.co.uk
da50d6dc762ca8bcebe70842d2f9ec63a2544b74
8a146700b119415db60664d12b367cc447cbb619
/src/test/java/io/goodforgod/dummymaker/export/validators/ValidatorChecker.java
5cc5360ce04c12241ce67a01ae29f8459513b8d5
[ "MIT" ]
permissive
GoodforGod/dummymaker
571495724283eb9760fbcd7a5d3a45f9a29a8ba5
94d235faca9c46028e7c5f94d311a17d642fb249
refs/heads/master
2023-04-27T03:19:39.598530
2023-04-18T20:09:12
2023-04-18T20:09:12
92,751,534
16
5
MIT
2023-04-18T20:09:14
2017-05-29T15:18:39
Java
UTF-8
Java
false
false
676
java
package io.goodforgod.dummymaker.export.validators; import io.goodforgod.dummymaker.cases.NamingCase; /** * @author GoodforGod * @since 03.03.2018 */ public interface ValidatorChecker { void isSingleDummyListValid(String[] dummy); void isSingleDummyValid(String[] dummy); void isSingleAutoDummyValid(String[] dummy); void isTwoDummiesValid(String[] dummies); void isTwoDummiesWithNumFieldValid(String[] dummies); void isTwoDummiesValidWithNamingStrategy(String[] dummies, NamingCase strategy); void isDummyTimeValid(String[] dummy); void isDummyUnixTimeValid(String[] dummy); void isDummyTimeFormatterValid(String[] dummy); }
[ "goodforgod.dev@gmail.com" ]
goodforgod.dev@gmail.com
7a3e35181c79c0428d41a17ab221dac4c8ced26c
f43ef1add051d76fe84b0f69092ad305929116a5
/autotest/Tests/src/main/java/com/tle/webtests/pageobject/wizard/controls/EmailSelectorControl.java
79082cfd7139a9339478cf43f6613569b2456fba
[ "Apache-2.0", "LGPL-3.0-only", "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause", "EPL-1.0", "LGPL-2.0-or-later", "Classpath-exception-2.0", "LicenseRef-scancode-jdom", "ICU", "Apache-1.1", "LGPL-2.1-only", "LicenseRef-scancode-other-permissive", "GPL-1.0-or-later", "CPL-1.0", "CDDL-1.0", "MIT", "LicenseRef-scancode-freemarker", "GPL-2.0-only", "NetCDF", "CDDL-1.1" ]
permissive
PenghaiZhang/openEQUELLA
93d29f9dab013e2fa19a9a7ae4d71cac2c7269bb
c2da9954bd4768e785b3b2f281305c16936f4511
refs/heads/develop
2023-07-20T02:20:23.684651
2023-07-19T00:12:20
2023-07-19T00:12:20
207,188,550
0
0
Apache-2.0
2020-06-17T13:08:07
2019-09-08T23:51:30
Java
UTF-8
Java
false
false
3,556
java
package com.tle.webtests.pageobject.wizard.controls; import com.tle.webtests.framework.PageContext; import com.tle.webtests.pageobject.ExpectWaiter; import com.tle.webtests.pageobject.WaitingPageObject; import com.tle.webtests.pageobject.generic.component.SelectUserDialog; import com.tle.webtests.pageobject.wizard.AbstractWizardControlPage; import org.openqa.selenium.By; import org.openqa.selenium.NotFoundException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.pagefactory.ByChained; import org.openqa.selenium.support.ui.ExpectedConditions; public class EmailSelectorControl extends AbstractWizardControl<EmailSelectorControl> { private By getRootBy() { return wizIdBy("emailControl"); } private WebElement getEmailField() { return byWizId("_e"); } private WebElement getDialogOpener() { return byWizId("_s_opener"); } private WebElement getAddButton() { return byWizId("_a"); } private By getEmailError() { return wizIdIdXPath( "emailControl", "/div[@class='noemailwarning' and text() = 'Invalid email address']"); } public EmailSelectorControl(PageContext context, int ctrlnum, AbstractWizardControlPage<?> page) { super(context, ctrlnum, page); } @Override protected WebElement findLoadedElement() { return driver.findElement(getRootBy()); } public void addEmail(String email) { addEmail(email, false); } public void addEmail(String email, boolean invalid) { WaitingPageObject<EmailSelectorControl> waiter; if (!invalid) { waiter = selectedWaiter(email); } else { waiter = ExpectWaiter.waiter(ExpectedConditions.presenceOfElementLocated(getEmailError()), this); } getEmailField().clear(); getEmailField().sendKeys(email); getAddButton().click(); waiter.get(); } private String xpathForEmail(String email) { return "//tr[td[contains(@class,'name') and normalize-space(text()) = " + quoteXPath(email) + "]]"; } public SelectUserDialog openDialog() { getDialogOpener().click(); return new SelectUserDialog(context, page.subComponentId(ctrlnum, "s")).get(); } public AbstractWizardControlPage<?> queryAndSelect(String query, String username) { openDialog().search(query).selectAndFinish(username, selectedWaiter(username)); return page; } public boolean isAddAvailable() { try { return getAddButton().isDisplayed(); } catch (NotFoundException nfe) { return false; } } public EmailSelectorControl removeEmail(String email) { WaitingPageObject<EmailSelectorControl> waiter = removedWaiter(email); String xpathExpression = xpathForEmail(email) + "/td/a"; driver.findElement(new ByChained(getRootBy(), By.xpath(xpathExpression))).click(); acceptConfirmation(); return waiter.get(); } public boolean isInvalidEmail() { return isPresent(getEmailError()); } public WaitingPageObject<EmailSelectorControl> selectedWaiter(String newlySelected) { return ExpectWaiter.waiter( ExpectedConditions.and( updatedCondition(), ExpectedConditions.visibilityOfElementLocated( new ByChained(getRootBy(), By.xpath(xpathForEmail(newlySelected))))), this); } public WaitingPageObject<EmailSelectorControl> removedWaiter(String removed) { return ExpectWaiter.waiter( ExpectedConditions.invisibilityOfElementLocated( new ByChained(getRootBy(), By.xpath(xpathForEmail(removed)))), this); } }
[ "doolse@gmail.com" ]
doolse@gmail.com
2b44843ce826125c958eab0f1274c6387ef01914
74450d2e5c5d737ab8eb3f3f2e8b7d2e8b40bb5e
/live_test/github_java/sort/3/40.java
955041ac23e4a02d1499a892ba19cf3f149313b6
[]
no_license
ulinka/tbcnn-attention
10466b0925987263f722fbc53de4868812c50da7
55990524ce3724d5bfbcbc7fd2757abd3a3fd2de
refs/heads/master
2020-08-28T13:59:25.013068
2019-05-10T08:05:37
2019-05-10T08:05:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
package algs4; public class Topological { private Iterable<Integer> order; public Topological(Digraph G) { DirectedCycle finder = new DirectedCycle(G); if (!finder.hasCycle()) { DepthFirstOrder dfs = new DepthFirstOrder(G); order = dfs.reversePost(); } } public Topological(EdgeWeightedDigraph G) { EdgeWeightedDirectedCycle finder = new EdgeWeightedDirectedCycle(G); if (!finder.hasCycle()) { DepthFirstOrder dfs = new DepthFirstOrder(G); order = dfs.reversePost(); } } public Iterable<Integer> order() { return order; } public boolean hasOrder() { return order != null; } public static void main(String[] args) { String filename = args[0]; String delimiter = args[1]; SymbolDigraph sg = new SymbolDigraph(filename, delimiter); Topological topological = new Topological(sg.G()); for (int v : topological.order()) { StdOut.println(sg.name(v)); } } }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
8fd95127c4f0423fa6faee09e67633673c1b2f4f
1264ce4f7240a56b39b99bbfcdf7c59131cac5db
/AndExam안드로이드프로그램정복/AndExam/src/exam/andexam/C14_ActEdit.java
c1cb8875367d21cee3cefa44eee4b112025caec7
[]
no_license
danielkulcsar/webhon
7ea0caef64fc7ddec691f809790c5aa1d960635a
c6a25cc2fd39dda5907ee1b5cb875a284aa6ce3d
refs/heads/master
2021-06-23T08:06:48.890022
2017-08-27T05:28:19
2017-08-27T05:28:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package exam.andexam; import android.app.*; import android.content.*; import android.os.*; import android.view.*; import android.widget.*; public class C14_ActEdit extends Activity { EditText mEdit; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.c14_actedit); mEdit = (EditText)findViewById(R.id.stredit); Intent intent = getIntent(); String text = intent.getStringExtra("TextIn"); if (text != null) { mEdit.setText(text); } } public void mOnClick(View v) { switch (v.getId()) { case R.id.btnok: Intent intent = new Intent(); intent.putExtra("TextOut", mEdit.getText().toString()); setResult(RESULT_OK,intent); finish(); break; case R.id.btncancel: setResult(RESULT_CANCELED); finish(); break; } } }
[ "webhon747@gmail.com" ]
webhon747@gmail.com
37459f867df14749dfcfbc1e1f978f5c0919cc76
e8305bd5a38bf2e7c6a80585be59a51de978d585
/configurator/src/main/java/org/apache/felix/configurator/impl/WorkerQueue.java
fb1117bdb5f2115e279be53e0dd3915e0dad6db1
[ "Apache-2.0" ]
permissive
apache/felix-dev
f266ea8f7d34aa18e0bc168a13106c52358d9670
d3b8b7984d04129d44018676cce615578275c84c
refs/heads/master
2023-09-04T08:09:33.449135
2023-09-02T10:14:18
2023-09-02T10:14:18
242,854,622
112
134
Apache-2.0
2023-09-06T05:06:54
2020-02-24T22:09:29
Java
UTF-8
Java
false
false
2,748
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.felix.configurator.impl; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import org.apache.felix.configurator.impl.logger.SystemLogger; public class WorkerQueue implements Runnable { private final ThreadFactory threadFactory; private final List<Runnable> tasks = new ArrayList<>(); private volatile Thread backgroundThread; private volatile boolean stopped = false; public WorkerQueue() { this.threadFactory = Executors.defaultThreadFactory(); } public void stop() { synchronized ( this.tasks ) { this.stopped = true; } } public void enqueue(final Runnable r) { synchronized ( this.tasks ) { if ( !this.stopped ) { this.tasks.add(r); if ( this.backgroundThread == null ) { this.backgroundThread = this.threadFactory.newThread(this); this.backgroundThread.setDaemon(true); this.backgroundThread.setName("Apache Felix Configurator Worker Thread"); this.backgroundThread.start(); } } } } @Override public void run() { Runnable r; do { r = null; synchronized ( this.tasks ) { if ( !this.stopped && !this.tasks.isEmpty() ) { r = this.tasks.remove(0); } else { this.backgroundThread = null; } } if ( r != null ) { try { r.run(); } catch ( final Throwable t) { // just to be sure our loop never dies SystemLogger.error("Error processing task" + t.getMessage(), t); } } } while ( r != null ); } }
[ "cziegeler@apache.org" ]
cziegeler@apache.org
b4dabe350c9495b36947c10ed8579a6379732061
5b5f90c99f66587cea981a640063a54b6ea75185
/src/main/java/com/coxandkings/travel/operations/service/holidayinvoice/HolidayFinanceService.java
8063e549f62157ea28482cbddc4c5a58af2463f9
[]
no_license
suyash-capiot/operations
02558d5f4c72a895d4a7e7e743495a118b953e97
b6ad01cbdd60190e3be1f2a12d94258091fec934
refs/heads/master
2020-04-02T06:22:30.589898
2018-10-26T12:11:11
2018-10-26T12:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package com.coxandkings.travel.operations.service.holidayinvoice; import com.coxandkings.travel.operations.exceptions.OperationException; import com.coxandkings.travel.operations.resource.holidayinvoice.HolidayResource; public interface HolidayFinanceService { String generateHolidayInvoice(HolidayResource holidayResource) throws OperationException; Boolean checkHolidayInvoiceStatus(String invoiceNumber) throws OperationException; }
[ "sahil@capiot.com" ]
sahil@capiot.com
54656c107529e308adfb1ba9123c7e6947faff4a
b765ff986f0cd8ae206fde13105321838e246a0a
/Inspect/app/src/main/java/com/growingio_rewriter/b/z.java
a8c4a3b4c1cccf9228221693be675aaca89dbdc0
[]
no_license
piece-the-world/inspect
fe3036409b20ba66343815c3c5c9f4b0b768c355
a660dd65d7f40501d95429f8d2b126bd8f59b8db
refs/heads/master
2020-11-29T15:28:39.406874
2016-10-09T06:24:32
2016-10-09T06:24:32
66,539,462
0
0
null
null
null
null
UTF-8
Java
false
false
3,262
java
/* * Decompiled with CFR 0_115. */ package com.growingio.b; import com.growingio.b.A; import com.growingio.b.B; import com.growingio.b.C; import com.growingio.b.D; import com.growingio.b.E; import com.growingio.b.F; import com.growingio.b.G; import com.growingio.b.H; import com.growingio.b.a.Q; import com.growingio.b.a.o; import com.growingio.b.ae; import com.growingio.b.b.a.b; import com.growingio.b.b.f; import com.growingio.b.u; import com.growingio.b.v; import com.growingio.b.x; import com.growingio.b.y; public abstract class z { public static z a(int n2) { return new A(n2); } public static z a(boolean bl2) { return new A(bl2 ? 1 : 0); } public static z a(long l2) { return new B(l2); } public static z a(float f2) { return new y(f2); } public static z a(double d2) { return new x(d2); } public static z b(String string) { return new H(string); } public static z b(int n2) { F f2 = new F(); f2.a = n2; return f2; } public static z a(com.growingio.b.o o2) { E e2 = new E(); e2.b = o2; e2.c = null; e2.d = false; return e2; } public static z a(com.growingio.b.o o2, String[] arrstring) { E e2 = new E(); e2.b = o2; e2.c = arrstring; e2.d = false; return e2; } public static z b(com.growingio.b.o o2) { E e2 = new E(); e2.b = o2; e2.c = null; e2.d = true; return e2; } public static z b(com.growingio.b.o o2, String[] arrstring) { E e2 = new E(); e2.b = o2; e2.c = arrstring; e2.d = true; return e2; } public static z a(com.growingio.b.o o2, String string) { C c2 = new C(); c2.b = o2; c2.a = string; c2.c = null; c2.d = false; return c2; } public static z a(com.growingio.b.o o2, String string, String[] arrstring) { C c2 = new C(); c2.b = o2; c2.a = string; c2.c = arrstring; c2.d = false; return c2; } public static z b(com.growingio.b.o o2, String string) { C c2 = new C(); c2.b = o2; c2.a = string; c2.c = null; c2.d = true; return c2; } public static z b(com.growingio.b.o o2, String string, String[] arrstring) { C c2 = new C(); c2.b = o2; c2.a = string; c2.c = arrstring; c2.d = true; return c2; } public static z a(com.growingio.b.o o2, int n2) throws ae { return new u(o2.e(), n2); } public static z a(com.growingio.b.o o2, int[] arrn) { return new D(o2, arrn); } public static z c(String string) { return new v(string); } static z a(b b2) { return new G(b2); } void a(String string) throws com.growingio.b.b { } abstract int a(com.growingio.b.o var1, String var2, o var3, com.growingio.b.o[] var4, f var5) throws com.growingio.b.b; abstract int a(com.growingio.b.o var1, String var2, o var3, f var4) throws com.growingio.b.b; int a(Q q2, com.growingio.b.o o2) { return 0; } }
[ "taochao@corp.netease.com" ]
taochao@corp.netease.com
31b2a417365e983da4e2c42e63070e7e7a200118
84125a032c2b2e150f62616c15f0089016aca05d
/src/com/prep2020/medium/Problem220.java
520d283037895bb353ea0468ee28d74293a6a805
[]
no_license
achowdhury80/leetcode
c577acc1bc8bce3da0c99e12d6d447c74fbed5c3
5ec97794cc5617cd7f35bafb058ada502ee7d802
refs/heads/master
2023-02-06T01:08:49.888440
2023-01-22T03:23:37
2023-01-22T03:23:37
115,574,715
1
0
null
null
null
null
UTF-8
Java
false
false
882
java
package com.prep2020.medium; import java.util.*; public class Problem220 { /** * O(nlogk) * @param nums * @param k * @param t * @return */ public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) { TreeMap<Integer, Integer> treeMap = new TreeMap<>(); for (int i = 0; i < nums.length; i++) { if (i - k > 0) { treeMap.put(nums[i - k - 1], treeMap.get(nums[i - k - 1]) - 1); if (treeMap.get(nums[i - k - 1]) == 0) treeMap.remove(nums[i - k - 1]); } Integer floor = treeMap.floorKey(nums[i]); if (floor != null && (long)nums[i] - floor <= t) return true; Integer ceil = treeMap.ceilingKey(nums[i]); if (ceil != null && (long)ceil - nums[i] <= t) return true; treeMap.put(nums[i], treeMap.getOrDefault(nums[i], 0) + 1); } return false; } }
[ "aychowdh@microsoft.com" ]
aychowdh@microsoft.com
6c5f06c1080f3ddce4af58f0f21464be4a44e726
29980b09a34bba2f53cfbe2101cfd1c67bca9a89
/src/main/java/com/yt/app/api/v1/resource/TeachstaffcrmmonthsumResourceAssembler.java
7b1df120d5483735710ecd4a2f5e4e53ea0380ea
[]
no_license
mzjzhaojun/dfgj
0abd60d026467a02d942de46f0bbf257d8af7991
74fa9632cfddcd2ed6af43a5f16cb1e2b5d59be9
refs/heads/master
2021-01-19T23:22:14.397805
2017-05-27T07:33:21
2017-05-27T07:33:21
88,966,753
0
1
null
null
null
null
UTF-8
Java
false
false
908
java
package com.yt.app.api.v1.resource; import org.springframework.hateoas.mvc.ResourceAssemblerSupport; import com.yt.app.api.v1.controller.TeachstaffcrmmonthsumController; import com.yt.app.api.v1.entity.Teachstaffcrmmonthsum; /** * @author zj default * * @version v1 * @createdate 2017-04-27 19:22:22 */ public class TeachstaffcrmmonthsumResourceAssembler extends ResourceAssemblerSupport<Teachstaffcrmmonthsum, TeachstaffcrmmonthsumResource> { public TeachstaffcrmmonthsumResourceAssembler() { super(TeachstaffcrmmonthsumController.class, TeachstaffcrmmonthsumResource.class); } @Override public TeachstaffcrmmonthsumResource toResource(Teachstaffcrmmonthsum t) { return createResourceWithId(t.getId(), t); } @Override protected TeachstaffcrmmonthsumResource instantiateResource(Teachstaffcrmmonthsum t) { return new TeachstaffcrmmonthsumResource(t); } }
[ "mzjzhaojun@163.com" ]
mzjzhaojun@163.com
8af1cbff6395393c2f12d0c5be67b59a2bf793d0
7811e51a71efc9a6ef7ced212f59165b53b36e80
/spring-boot-shiro-dynamic-permission-sample/src/main/java/com/example/springboot/shiro/vo/BaseResponse.java
a8069d2d49bd8535b2f06038cc9f5aef09bd94e5
[ "Apache-2.0" ]
permissive
zb872676223/shiro-sample
673a22ad12543775859474bfdf090d085389d6da
e3b09cf13082d0b2da7066040293a22597526dd6
refs/heads/master
2020-04-27T20:47:37.635824
2019-02-15T02:35:55
2019-02-15T02:36:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
package com.example.springboot.shiro.vo; /** * @author litz-a */ public class BaseResponse<T> { private int code = 200; private String message = "SUCCESS"; private T result; public BaseResponse() { } public BaseResponse(int code, String message) { this.code = code; this.message = message; } public BaseResponse(int code, String message, T result) { this(code, message); this.result = result; } public BaseResponse(T result) { this.result = result; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public T getResult() { return result; } public void setResult(T result) { this.result = result; } }
[ "litz-a@glodon.com" ]
litz-a@glodon.com
1e115da89b68ff6c6f4f9bd7c870332bf95978a0
93047c7f1dbb2f67214c33e93766fe8e88b69e37
/src/com/base/service/ServiceManageService.java
61defc718854c633e1934b8420a82aa7bd65c5df
[]
no_license
sunny-guo/MyProject
70cc7ec2695120578b87ddb22e8607a6fabb8e37
85c28fbe97655e6236eaa3d1ffda8943bc8a7434
refs/heads/master
2021-03-12T22:46:16.665607
2015-05-24T14:20:03
2015-05-24T14:20:03
34,899,212
0
0
null
null
null
null
UTF-8
Java
false
false
3,756
java
package com.base.service; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Hibernate; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.criterion.Projections; import org.hibernate.criterion.Restrictions; import com.base.model.ServiceManage; import com.base.util.HibernateUtil; /* ** Copyright (c) 2008, 2009, 2010 ** The Regents of the Tsinghua University, PRC. All rights reserved. ** ** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ** 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ** 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. ** 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: ** This product includes software (iNetBoss) developed by Tsinghua University, PRC and its contributors. ** THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ** ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ** SUCH DAMAGE. * */ public class ServiceManageService extends BaseService{ private Session session=null; public ServiceManage findById(long id) throws Exception{ ServiceManage service =null; session =HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx=null; try{ tx=session.beginTransaction(); service=(ServiceManage)session.load(ServiceManage.class,id); if(!Hibernate.isInitialized(service)){ Hibernate.initialize(service); } tx.commit(); }catch(HibernateException e){ if(tx!=null){ tx.rollback(); } throw e; } return service; } public List<ServiceManage> getListByDeviceId(long deviceId) throws Exception{ List<ServiceManage> list =null; session =HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx=null; try{ tx = session.beginTransaction(); Criteria cri=session.createCriteria(ServiceManage.class); if(deviceId!=0){ cri.add(Restrictions.eq("deviceId",deviceId)); } list=cri.list(); tx.commit(); }catch(Exception e){ if(tx!=null){ tx.rollback(); } e.printStackTrace(); throw e; } return list; } public static boolean isExistByIP(long deviceId,String type) throws Exception{ Integer num; Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx = null; try { tx = session.beginTransaction(); num = (Integer)session.createCriteria(ServiceManage.class).add(Restrictions.eq("deviceId",deviceId)). add(Restrictions.eq("serviceType",type)).setProjection(Projections.rowCount()).list().get(0); tx.commit(); }catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); throw e; } if(num.intValue()==0) return false; else return true; } }
[ "sunny.guo@yunzhihui.com" ]
sunny.guo@yunzhihui.com
57d9c2e7fb59892628fa8917d06ac594c15d90cb
abd532870d0df01b2ac42dabcf7de4e855de27b5
/fpinjava-parent/fpinjava-usingfunctions-exercises/src/main/java/com/fpinjava/functions/exercise02_09/Function.java
4a7652f4949f756ed2abc361062e75ad437f90e6
[]
no_license
Krasnyanskiy/fpinjava
69b7cc135ef70d2b6816973c83458a6b3eb91762
0c1ad0bb66f1c737f32214543b984dc87c8f67ce
refs/heads/master
2021-01-18T04:17:16.916162
2015-04-29T12:47:00
2015-04-29T12:47:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
433
java
package com.fpinjava.functions.exercise02_09; public interface Function<T, U> { U apply(T arg); public static <T, U, V> Function<Function<U, V>, Function<Function<T, U>, Function<T, V>>> higherCompose() { return f -> g -> x -> f.apply(g.apply(x)); } public static <T, U, V> Function<Function<T, U>, Function<Function<U, V>, Function<T, V>>> higherAndThen() { return f -> g -> z -> g.apply(f.apply(z)); } }
[ "pys@volga.fr" ]
pys@volga.fr
9947d9b011830d51eff32aa9c6d983c59af482b5
4ef93d63d37aa825bc6572d4551f3e39cbedfa64
/Main2.java
c91a044dbb82b458dc2030732d3d6dace4d4423a
[]
no_license
ac189223/Prework_Java_b
6a550b4e58712d9ece32b7ea8463f6d23ea9fd72
76c64c5b7dfc8ec248e4c0683811d224df32ba00
refs/heads/master
2020-06-16T11:00:26.048320
2019-07-06T15:47:38
2019-07-06T15:47:38
195,548,715
0
0
null
null
null
null
UTF-8
Java
false
false
618
java
/* W pliku `Main2.java` stwórz trzy zmienne o nazwach: `nr1, nr2, result`. 1. Dwie niech przechowują dowolne **liczby całkowite**. 2. Trzeciej – o nazwie `result` – przypisz wartość `0`. 3. Zapisz sumę (użyj znaku dodawania `+`) tych liczb w zmiennej `result` i wypisz wynik na konsoli. */ public class Main2 { public static void main(String[] args) { // Trzy zmienne całkowite short nr1, nr2; int result; // Przypisania nr1 = 437; nr2 = 9764; result = 0; // Działanie result = nr1 + nr2; System.out.println("Wynik dodawania " + nr1 + " do " + nr2 + " to " + result + "."); } }
[ "ac189223@o2.pl" ]
ac189223@o2.pl
7c378aba5b28154df8be6aec9fcf5897f0c0fc4e
17b4b22a6c355d524cae50e6307cbc86cfa486f1
/com/javarush/test/level19/lesson10/home02/Solution.java
20fd5c6a5b12da39c892774b93ef534319b4c076
[]
no_license
ipvinner/JavaRushHomeWork
b68fadc97d05b8c5ca8a502c5679b6134889b4d7
a8524a4141a9f39ab5b89096456685061b7bce58
refs/heads/master
2021-01-10T09:48:33.613282
2015-12-21T12:25:46
2015-12-21T12:25:46
48,370,015
0
0
null
null
null
null
UTF-8
Java
false
false
2,007
java
package com.javarush.test.level19.lesson10.home02; /* Самый богатый В метод main первым параметром приходит имя файла. В этом файле каждая строка имеет следующий вид: имя значение где [имя] - String, [значение] - double. [имя] и [значение] разделены пробелом Для каждого имени посчитать сумму всех его значений Вывести в консоль имена, у которых максимальная сумма Имена разделять пробелом либо выводить с новой строки Закрыть потоки Пример входного файла: Петров 0.501 Иванов 1.35 Петров 0.85 Пример вывода: Петров */ import java.io.*; import java.util.Map; import java.util.TreeMap; public class Solution { public static void main(String[] args) throws IOException { String fileName = args[0]; BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fileName))); String s; Map<String, Double> personsMap = new TreeMap<>(); while((s = in.readLine()) != null){ String[] splitStr = s.split(" "); String name = splitStr[0]; Double value = Double.parseDouble(splitStr[1]); if(!personsMap.containsKey(name)){ personsMap.put(name, value); }else{ personsMap.put(name, (personsMap.get(name) + value)); } } String theRich = ""; Double max = 0.0; for (Map.Entry<String, Double> pair: personsMap.entrySet()) { Double value = pair.getValue(); String name = pair.getKey(); if(value > max) { max = value; theRich = name; } } System.out.println(theRich); } }
[ "vaniavinogradov@rambler.ru" ]
vaniavinogradov@rambler.ru
264c37ec58aeb63e5dc4a2f70cb177035dee220d
605b6e800c0449736d7dfe86793b1c07bb0617b6
/src/minecraft/net/minecraft/entity/projectile/EntityPotion.java
b5e7257cda43deaf1023e2306381fbbb64069383
[]
no_license
HaxDevsClub/WordStorm
20f07737942cbda2cd8e7002c4c971ade0725461
79323e0848830016429307e76042844204cbed5f
refs/heads/master
2020-12-24T10:14:57.662136
2016-11-07T17:36:41
2016-11-07T17:36:41
73,095,787
0
0
null
null
null
null
UTF-8
Java
false
false
5,845
java
package net.minecraft.entity.projectile; import java.util.Iterator; import java.util.List; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class EntityPotion extends EntityThrowable { /** * The damage value of the thrown potion that this EntityPotion represents. */ private ItemStack potionDamage; private static final String __OBFID = "CL_00001727"; public EntityPotion(World worldIn) { super(worldIn); } public EntityPotion(World worldIn, EntityLivingBase throwerIn, int meta) { this(worldIn, throwerIn, new ItemStack(Items.potionitem, 1, meta)); } public EntityPotion(World worldIn, EntityLivingBase throwerIn, ItemStack potionDamageIn) { super(worldIn, throwerIn); this.potionDamage = potionDamageIn; } public EntityPotion(World worldIn, double x, double y, double z, int p_i1791_8_) { this(worldIn, x, y, z, new ItemStack(Items.potionitem, 1, p_i1791_8_)); } public EntityPotion(World worldIn, double x, double y, double z, ItemStack potionDamageIn) { super(worldIn, x, y, z); this.potionDamage = potionDamageIn; } /** * Gets the amount of gravity to apply to the thrown entity with each tick. */ protected float getGravityVelocity() { return 0.05F; } protected float getVelocity() { return 0.5F; } protected float getInaccuracy() { return -20.0F; } /** * Sets the PotionEffect by the given id of the potion effect. */ public void setPotionDamage(int potionId) { if (this.potionDamage == null) { this.potionDamage = new ItemStack(Items.potionitem, 1, 0); } this.potionDamage.setItemDamage(potionId); } /** * Returns the damage value of the thrown potion that this EntityPotion represents. */ public int getPotionDamage() { if (this.potionDamage == null) { this.potionDamage = new ItemStack(Items.potionitem, 1, 0); } return this.potionDamage.getMetadata(); } /** * Called when this EntityThrowable hits a block or entity. */ protected void onImpact(MovingObjectPosition p_70184_1_) { if (!this.worldObj.isRemote) { List var2 = Items.potionitem.getEffects(this.potionDamage); if (var2 != null && !var2.isEmpty()) { AxisAlignedBB var3 = this.getEntityBoundingBox().expand(4.0D, 2.0D, 4.0D); List var4 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, var3); if (!var4.isEmpty()) { Iterator var5 = var4.iterator(); while (var5.hasNext()) { EntityLivingBase var6 = (EntityLivingBase)var5.next(); double var7 = this.getDistanceSqToEntity(var6); if (var7 < 16.0D) { double var9 = 1.0D - Math.sqrt(var7) / 4.0D; if (var6 == p_70184_1_.entityHit) { var9 = 1.0D; } Iterator var11 = var2.iterator(); while (var11.hasNext()) { PotionEffect var12 = (PotionEffect)var11.next(); int var13 = var12.getPotionID(); if (Potion.potionTypes[var13].isInstant()) { Potion.potionTypes[var13].affectEntity(this, this.getThrower(), var6, var12.getAmplifier(), var9); } else { int var14 = (int)(var9 * (double)var12.getDuration() + 0.5D); if (var14 > 20) { var6.addPotionEffect(new PotionEffect(var13, var14, var12.getAmplifier())); } } } } } } } this.worldObj.playAuxSFX(2002, new BlockPos(this), this.getPotionDamage()); this.setDead(); } } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound tagCompund) { super.readEntityFromNBT(tagCompund); if (tagCompund.hasKey("Potion", 10)) { this.potionDamage = ItemStack.loadItemStackFromNBT(tagCompund.getCompoundTag("Potion")); } else { this.setPotionDamage(tagCompund.getInteger("potionValue")); } if (this.potionDamage == null) { this.setDead(); } } /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound tagCompound) { super.writeEntityToNBT(tagCompound); if (this.potionDamage != null) { tagCompound.setTag("Potion", this.potionDamage.writeToNBT(new NBTTagCompound())); } } }
[ "jaspersmit2801@gmail.com" ]
jaspersmit2801@gmail.com
7ab5550a0502b4ca93786f2dadc71aebc2714cbb
42c47380a0849b16f084fe511baebb5f96c1c064
/app/src/main/java/com/example/lxx/myalipay/MyApplication.java
d2b557158ac124530e6be43eceadd9eecb3f89a8
[]
no_license
lixixiang/Honpe2
813a06e5ee9dfe5ea31561370a12ee752ea3b42b
0049e7d31b8f7988c82890527001cf27b07dd94b
refs/heads/master
2022-03-31T11:31:20.931256
2019-12-10T08:39:37
2019-12-10T08:39:37
227,068,393
0
1
null
null
null
null
UTF-8
Java
false
false
5,882
java
package com.example.lxx.myalipay; import android.app.Application; import android.content.Context; import android.content.SharedPreferences; import android.support.multidex.MultiDex; import com.orhanobut.logger.AndroidLogAdapter; import com.orhanobut.logger.Logger; import com.zhouyou.http.EasyHttp; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Map; import me.jessyan.autosize.AutoSize; /** * created by lxx at 2019/11/9 17:05 * 描述: */ public class MyApplication extends Application { public static final String FILE_NAME = "share_data"; private static Context context; @Override public void onCreate() { super.onCreate(); AutoSize.initCompatMultiProcess(this); context = getApplicationContext(); Logger.addLogAdapter(new AndroidLogAdapter()); EasyHttp.init(this); } protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } /** * 全局上下文 * * @return */ public static Context getContext() { return context; } /** * 保存数据的方法,我们需要拿到保存数据的具体类型,然后根据类型调用不同的保存方法 * * @param context * @param key * @param object */ public static void put(Context context, String key, Object object) { SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = sp.edit(); if (object instanceof String) { editor.putString(key, (String) object); } else if (object instanceof Integer) { editor.putInt(key, (Integer) object); } else if (object instanceof Boolean) { editor.putBoolean(key, (Boolean) object); } else if (object instanceof Float) { editor.putFloat(key, (Float) object); } else if (object instanceof Long) { editor.putLong(key, (Long) object); } else { editor.putString(key, object.toString()); } SharedPreferencesCompat.apply(editor); } /** * 得到保存数据的方法,我们根据默认值得到保存的数据的具体类型,然后调用相对于的方法获取值 * * @param context * @param key * @param defaultObject * @return */ public static Object get(Context context, String key, Object defaultObject) { SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); if (defaultObject instanceof String) { return sp.getString(key, (String) defaultObject); } else if (defaultObject instanceof Integer) { return sp.getInt(key, (Integer) defaultObject); } else if (defaultObject instanceof Boolean) { return sp.getBoolean(key, (Boolean) defaultObject); } else if (defaultObject instanceof Float) { return sp.getFloat(key, (Float) defaultObject); } else if (defaultObject instanceof Long) { return sp.getLong(key, (Long) defaultObject); } return null; } /** * 移除某个key值已经对应的值 * * @param context * @param key */ public static void remove(Context context, String key) { SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = sp.edit(); editor.remove(key); SharedPreferencesCompat.apply(editor); } /** * 清除所有数据 * * @param context */ public static void clear(Context context) { SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = sp.edit(); editor.clear(); SharedPreferencesCompat.apply(editor); } /** * 查询某个key是否已经存在 * * @param context * @param key * @return */ public static boolean contains(Context context, String key) { SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); return sp.contains(key); } /** * 返回所有的键值对 * * @param context * @return */ public static Map<String, ?> getAll(Context context) { SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); return sp.getAll(); } /** * 创建一个解决SharedPreferencesCompat.apply方法的一个兼容类 * * @author zhy */ private static class SharedPreferencesCompat { private static final Method sApplyMethod = findApplyMethod(); /** * 反射查找apply的方法 * * @return */ @SuppressWarnings({"unchecked", "rawtypes"}) private static Method findApplyMethod() { try { Class clz = SharedPreferences.Editor.class; return clz.getMethod("apply"); } catch (NoSuchMethodException e) { } return null; } /** * 如果找到则使用apply执行,否则使用commit * * @param editor */ public static void apply(SharedPreferences.Editor editor) { try { if (sApplyMethod != null) { sApplyMethod.invoke(editor); return; } } catch (IllegalArgumentException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } editor.commit(); } } }
[ "2914424169@qq.com" ]
2914424169@qq.com
59aaf0a459b4806369d3e19f0035fcf6af76e25d
856899b5cf4a848eb9b5f2e95898f0e65be0f5b5
/TunnelVision/app/src/main/java/com/way/tunnelvision/entity/model/NewsModel.java
e93d8c8717539ffa32d1d9b797d37a885b8d7ee1
[ "Apache-2.0" ]
permissive
WaylanPunch/Tunnel-Vision
3d45e91c10d028cdb7e9345aed067f3e954699b8
2d60bac185f69ec45ae758e8bdae3b9eb2b31600
refs/heads/master
2020-04-06T15:33:02.664967
2016-11-21T14:31:08
2016-11-21T14:31:08
40,491,417
3
0
null
null
null
null
UTF-8
Java
false
false
3,615
java
package com.way.tunnelvision.entity.model; import android.os.Parcel; import android.os.Parcelable; /** * Created by pc on 2016/1/10. */ public class NewsModel implements Parcelable { private Long id; /** * docid */ private String docid; /** * 标题 */ private String title; /** * 小内容 */ private String digest; /** * 图片地址 */ private String imgsrc; /** * 来源 */ private String source; /** * 时间 */ private String ptime; /** * TAG */ private String tag; private int isCollection; public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getDocid() { return docid; } public void setDocid(String docid) { this.docid = docid; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDigest() { return digest; } public void setDigest(String digest) { this.digest = digest; } public String getImgsrc() { return imgsrc; } public void setImgsrc(String imgsrc) { this.imgsrc = imgsrc; } public String getSource() { return source; } public void setSource(String source) { this.source = source; } public String getPtime() { return ptime; } public void setPtime(String ptime) { this.ptime = ptime; } public String getTag() { return tag; } public void setTag(String tag) { this.tag = tag; } public int getIsCollection() { return this.isCollection; } public void setIsCollection(int collection) { this.isCollection = collection; } public NewsModel() { } public NewsModel(Long id) { this.id = id; } public NewsModel(Long id, String docid, String title, String digest, String imgsrc, String source, String ptime, String tag, int isCollection) { this.id = id; this.docid = docid; this.title = title; this.digest = digest; this.imgsrc = imgsrc; this.source = source; this.ptime = ptime; this.tag = tag; this.isCollection = isCollection; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(this.id); dest.writeString(this.docid); dest.writeString(this.title); dest.writeString(this.digest); dest.writeString(this.imgsrc); dest.writeString(this.source); dest.writeString(this.ptime); dest.writeString(this.tag); dest.writeInt(this.isCollection); } protected NewsModel(Parcel in) { this.id = (Long) in.readValue(Long.class.getClassLoader()); this.docid = in.readString(); this.title = in.readString(); this.digest = in.readString(); this.imgsrc = in.readString(); this.source = in.readString(); this.ptime = in.readString(); this.tag = in.readString(); this.isCollection = in.readInt(); } public static final Creator<NewsModel> CREATOR = new Creator<NewsModel>() { public NewsModel createFromParcel(Parcel source) { return new NewsModel(source); } public NewsModel[] newArray(int size) { return new NewsModel[size]; } }; }
[ "waylanpunch@gmail.com" ]
waylanpunch@gmail.com
6eec007f337d8ab85b69cf959f47409cc447fc3c
c9cf888b3636663398ad0326620fde71b4b896fc
/trunk/webapi/src/main/java/com/ry/project/system/controller/SysPostController.java
a99fd28f3994bfab83326fe2f971002cc594b964
[]
no_license
zhangjihai520/xxkwlkc
6479b226000355530a3b44ed53bcfe70153ae975
9af7862162c570d1fddb164d97f91bd62eff196c
refs/heads/master
2023-03-06T19:53:39.816436
2021-02-18T09:10:59
2021-02-18T09:10:59
339,993,245
0
0
null
null
null
null
UTF-8
Java
false
false
4,591
java
package com.ry.project.system.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ry.common.constant.UserConstants; import com.ry.common.utils.SecurityUtils; import com.ry.common.utils.poi.ExcelUtil; import com.ry.framework.aspectj.lang.annotation.Log; import com.ry.framework.aspectj.lang.enums.BusinessType; import com.ry.framework.web.controller.BaseController; import com.ry.framework.web.domain.AjaxResult; import com.ry.framework.web.page.TableDataInfo; import com.ry.project.system.domain.SysPost; import com.ry.project.system.service.ISysPostService; /** * 岗位信息操作处理 * * @author */ @RestController @RequestMapping("/system/post") public class SysPostController extends BaseController { @Autowired private ISysPostService postService; /** * 获取岗位列表 */ @PreAuthorize("@ss.hasPermi('system:post:list')") @GetMapping("/list") public TableDataInfo list(SysPost post) { startPage(); List<SysPost> list = postService.selectPostList(post); return getDataTable(list); } @Log(title = "岗位管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:config:export')") @GetMapping("/export") public AjaxResult export(SysPost post) { List<SysPost> list = postService.selectPostList(post); ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class); return util.exportExcel(list, "岗位数据"); } /** * 根据岗位编号获取详细信息 */ @PreAuthorize("@ss.hasPermi('system:post:query')") @GetMapping(value = "/{postId}") public AjaxResult getInfo(@PathVariable Long postId) { return AjaxResult.success(postService.selectPostById(postId)); } /** * 新增岗位 */ @PreAuthorize("@ss.hasPermi('system:post:add')") @Log(title = "岗位管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysPost post) { if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) { return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在"); } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) { return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在"); } post.setCreateBy(SecurityUtils.getUsername()); return toAjax(postService.insertPost(post)); } /** * 修改岗位 */ @PreAuthorize("@ss.hasPermi('system:post:edit')") @Log(title = "岗位管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysPost post) { if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) { return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在"); } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) { return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在"); } post.setUpdateBy(SecurityUtils.getUsername()); return toAjax(postService.updatePost(post)); } /** * 删除岗位 */ @PreAuthorize("@ss.hasPermi('system:post:remove')") @Log(title = "岗位管理", businessType = BusinessType.DELETE) @DeleteMapping("/{postIds}") public AjaxResult remove(@PathVariable Long[] postIds) { return toAjax(postService.deletePostByIds(postIds)); } /** * 获取岗位选择框列表 */ @GetMapping("/optionselect") public AjaxResult optionselect() { List<SysPost> posts = postService.selectPostAll(); return AjaxResult.success(posts); } }
[ "www.920175308@qq.com" ]
www.920175308@qq.com
04e2b21246692e41734c3a56b9b424434c64ce2e
0197e9c4d93cf32f961abcdfedd8ad1239a2ce66
/app/src/main/java/com/lefuorgn/lefu/multiMedia/widget/PhotographView.java
65d94c10ae97a5550f8c983ceb7eb26c9658833b
[]
no_license
afailer/lefuOrg
fbcd37cfa42ac02875907458c6ac032be52fe12d
8facb4d4f87164356da26c61babe118f36b0e836
refs/heads/master
2020-05-15T11:08:09.445145
2019-04-19T06:17:10
2019-04-19T06:17:10
182,212,171
0
1
null
null
null
null
UTF-8
Java
false
false
6,138
java
package com.lefuorgn.lefu.multiMedia.widget; import android.content.Context; import android.hardware.Camera; import android.hardware.Camera.Size; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import com.lefuorgn.util.TLog; import java.io.IOException; import java.util.List; /** * 拍照页面 */ public class PhotographView extends SurfaceView implements SurfaceHolder.Callback { private Camera mCamera; private Callback mCallback; private float mDownX, mDownY; /** * 聚焦接口回调 */ private Camera.AutoFocusCallback mAutoFocusCallback = new Camera.AutoFocusCallback() { @Override public void onAutoFocus(boolean success, Camera camera) { if(mCallback != null) { mCallback.endFocus(success); } } }; public PhotographView(Context context) { super(context); init(); } public PhotographView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public PhotographView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(); } private void init() { getHolder().addCallback(this); setFocusable(true); setClickable(true); } @Override public void surfaceCreated(SurfaceHolder holder) { // 当Surface被创建之后,开始Camera的预览 try { // 打开拍照功能 mCamera = Camera.open(); // 摄像头画面显示在Surface上 mCamera.setPreviewDisplay(holder); mCamera.setDisplayOrientation(90); } catch (IOException e) { TLog.log("预览失败"); } } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // 在预览前可以指定Camera的各项参数 try { Camera.Parameters parameters = mCamera.getParameters(); parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); // 获取摄像头支持的PictureSize列表 List<Size> pictureSizeList = parameters.getSupportedPictureSizes(); // 从列表中选取合适的分辨率 Size picSize = getProperSize(pictureSizeList, width, height); if(picSize == null) { picSize = parameters.getPictureSize(); } // 根据选出的PictureSize重新设置大小 parameters.setPictureSize(picSize.width, picSize.height); mCamera.setParameters(parameters); mCamera.startPreview(); focus(mAutoFocusCallback); } catch (Exception e){ TLog.log(e.toString()); } } private Size getProperSize(List<Size> sizes, int w, int h) { final double ASPECT_TOLERANCE = 0.05; double targetRatio = (double) w / h; if (sizes == null) return null; Size optimalSize = null; double minDiff = Double.MAX_VALUE; // Try to find an size match aspect ratio and size for (Size size : sizes) { double ratio = (double) size.width / size.height; if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; if (Math.abs(size.height - h) < minDiff) { optimalSize = size; minDiff = Math.abs(size.height - h); } } // Cannot find the one match the aspect ratio, ignore the requirement if (optimalSize == null) { minDiff = Double.MAX_VALUE; for (Size size : sizes) { if (Math.abs(size.height - h) < minDiff) { optimalSize = size; minDiff = Math.abs(size.height - h); } } } return optimalSize; } @Override public void surfaceDestroyed(SurfaceHolder holder) { if (mCamera != null) { mCamera.stopPreview(); // 停止预览 mCamera.release(); // 释放相机资源 mCamera = null; } } @Override public boolean dispatchTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: mDownX = event.getX(); mDownY = event.getY(); break; case MotionEvent.ACTION_UP: float upX = event.getX(); float upY = event.getY(); if(Math.abs(upX - mDownX) < 50 && Math.abs(upY - mDownY) < 50) { if(mCallback != null) { mCallback.startFocus(); } focus(mAutoFocusCallback); } break; } return true; } /** * 聚焦回调 * @param callback 接口回调 * @return true: 聚焦函数执行; false: 聚焦函数执行失败 */ private boolean focus(Camera.AutoFocusCallback callback) { try { mCamera.autoFocus(callback); } catch (Exception e) { return false; } return true; } /** * 添加聚焦监听 * @param callback 接口回调 */ public void addCallback(Callback callback) { this.mCallback = callback; } /** * 获取拍照照片 */ public void takePicture(Camera.PictureCallback callback) { mCamera.takePicture(null, null, callback); } /** * 监听拍照聚焦的状态 */ public interface Callback { /** * 开始聚焦 */ void startFocus(); /** * 聚焦结束 * @param success true: 聚焦成功; false: 聚焦失败 */ void endFocus(boolean success); } }
[ "liuting@chuangxin.com" ]
liuting@chuangxin.com
ca748232e36d284971ed9128a37f20088421a86b
4a8c69bb63e19d525abe3e9253c1560d6043fb74
/sample/src/main/java/com/anychart/sample/charts/VerticalChartActivity.java
8f5286422685f85b54dc5069821fdf7194d96c30
[]
no_license
SeppPenner/AnyChart-Android
180e120edbc5e0120f73b71fc6d6bd99ed0b4498
e657ae1b30ff8f9d982e18bf9a5a7aa71e3488a5
refs/heads/master
2020-03-13T21:37:02.890929
2018-04-23T03:18:42
2018-04-23T03:18:42
131,300,064
2
0
null
2018-04-27T13:28:22
2018-04-27T13:28:22
null
UTF-8
Java
false
false
3,379
java
package com.anychart.sample.charts; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import com.anychart.anychart.AnyChart; import com.anychart.anychart.AnyChartView; import com.anychart.anychart.Cartesian; import com.anychart.anychart.CartesianSeriesJumpLine; import com.anychart.anychart.DataEntry; import com.anychart.anychart.HoverMode; import com.anychart.anychart.Mapping; import com.anychart.anychart.SeriesBar; import com.anychart.anychart.Set; import com.anychart.anychart.TooltipDisplayMode; import com.anychart.anychart.TooltipPositionMode; import com.anychart.anychart.ValueDataEntry; import com.anychart.sample.R; import java.util.ArrayList; import java.util.List; public class VerticalChartActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chart_common); AnyChartView anyChartView = findViewById(R.id.any_chart_view); Cartesian vertical = AnyChart.vertical(); vertical.setAnimation(true) .setTitle("Vertical Combination of Bar and Jump Line Chart"); List<DataEntry> data = new ArrayList<>(); data.add(new CustomDataEntry("Jan", 11.5, 9.3)); data.add(new CustomDataEntry("Feb", 12, 10.5)); data.add(new CustomDataEntry("Mar", 11.7, 11.2)); data.add(new CustomDataEntry("Apr", 12.4, 11.2)); data.add(new CustomDataEntry("May", 13.5, 12.7)); data.add(new CustomDataEntry("Jun", 11.9, 13.1)); data.add(new CustomDataEntry("Jul", 14.6, 12.2)); data.add(new CustomDataEntry("Aug", 17.2, 12.2)); data.add(new CustomDataEntry("Sep", 16.9, 10.1)); data.add(new CustomDataEntry("Oct", 15.4, 14.5)); data.add(new CustomDataEntry("Nov", 16.9, 14.5)); data.add(new CustomDataEntry("Dec", 17.2, 15.5)); Set set = new Set(data); Mapping barData = set.mapAs("{ x: 'x', value: 'value' }"); Mapping jumpLineData = set.mapAs("{ x: 'x', value: 'jumpLine' }"); SeriesBar bar = vertical.bar(barData); bar.getLabels().setFormat("${%Value} mln"); CartesianSeriesJumpLine jumpLine = vertical.jumpLine(jumpLineData); jumpLine.setStroke("#60727B", 2d, null, null, null); jumpLine.getLabels().setEnabled(false); vertical.getYScale().setMinimum(0d); vertical.setLabels(true); vertical.getTooltip() .setDisplayMode(TooltipDisplayMode.UNION) .setPositionMode(TooltipPositionMode.POINT) .setUnionFormat( "function() {\n" + " return 'Plain: $' + this.points[1].value + ' mln' +\n" + " '\\n' + 'Fact: $' + this.points[0].value + ' mln';\n" + " }"); vertical.getInteractivity().setHoverMode(HoverMode.BY_X); vertical.setXAxis(true); vertical.setYAxis(true); vertical.getYAxis().getLabels().setFormat("${%Value} mln"); anyChartView.setChart(vertical); } private class CustomDataEntry extends ValueDataEntry { public CustomDataEntry(String x, Number value, Number jumpLine) { super(x, value); setValue("jumpLine", jumpLine); } } }
[ "arsenymalkov@gmail.com" ]
arsenymalkov@gmail.com
3ffc2e17728f907e572f44659ecb4be2355d9b81
fc353308834071392da7bfdb39b50073bf35b899
/src/main/java/carpet/script/argument/Vector3Argument.java
1dc440f13a50ff85fbe592f4ce27077e46aad224
[ "MIT" ]
permissive
Xendergo/fabric-carpet
4e71542ee1e488ade2e88dfa5e560efad920f37a
c72f81282957c1152dd30fbc53ba9bcaf93e7cfc
refs/heads/master
2023-04-28T02:25:57.257530
2021-05-08T18:58:25
2021-05-08T18:58:25
364,655,927
0
0
MIT
2021-05-05T17:28:45
2021-05-05T17:28:44
null
UTF-8
Java
false
false
3,663
java
package carpet.script.argument; import carpet.script.CarpetContext; import carpet.script.LazyValue; import carpet.script.exception.InternalExpressionException; import carpet.script.value.BlockValue; import carpet.script.value.EntityValue; import carpet.script.value.ListValue; import carpet.script.value.NumericValue; import carpet.script.value.Value; import net.minecraft.entity.Entity; import net.minecraft.util.math.Vec3d; import java.util.List; public class Vector3Argument extends Argument { public Vec3d vec; public final double yaw; public final double pitch; public boolean fromBlock = false; public Entity entity = null; private Vector3Argument(Vec3d v, int o) { super(o); this.vec = v; this.yaw = 0.0D; this.pitch = 0.0D; } private Vector3Argument(Vec3d v, int o, double y, double p) { super(o); this.vec = v; this.yaw = y; this.pitch = p; } private Vector3Argument fromBlock() { fromBlock = true; return this; } private Vector3Argument withEntity(Entity e) { entity = e; return this; } public static Vector3Argument findIn(List<Value> params, int offset) { return findIn(params, offset, false, false); } public static Vector3Argument findIn(List<Value> params, int offset, boolean optionalDirection, boolean optionalEntity) { try { Value v1 = params.get(0 + offset); if (v1 instanceof BlockValue) { return (new Vector3Argument(Vec3d.ofCenter(((BlockValue) v1).getPos()), 1+offset)).fromBlock(); } if (optionalEntity && v1 instanceof EntityValue) { Entity e = ((EntityValue) v1).getEntity(); return new Vector3Argument(e.getPos(), 1+offset).withEntity(e); } if (v1 instanceof ListValue) { List<Value> args = ((ListValue) v1).getItems(); Vec3d pos = new Vec3d( NumericValue.asNumber(args.get(0)).getDouble(), NumericValue.asNumber(args.get(1)).getDouble(), NumericValue.asNumber(args.get(2)).getDouble()); double yaw = 0.0D; double pitch = 0.0D; if (args.size()>3 && optionalDirection) { yaw = NumericValue.asNumber(args.get(3)).getDouble(); pitch = NumericValue.asNumber(args.get(4)).getDouble(); } return new Vector3Argument(pos,offset+1, yaw, pitch); } Vec3d pos = new Vec3d( NumericValue.asNumber(v1).getDouble(), NumericValue.asNumber(params.get(1 + offset)).getDouble(), NumericValue.asNumber(params.get(2 + offset)).getDouble()); double yaw = 0.0D; double pitch = 0.0D; int eatenLength = 3; if (params.size()>3+offset && optionalDirection) { yaw = NumericValue.asNumber(params.get(3 + offset)).getDouble(); pitch = NumericValue.asNumber(params.get(4 + offset)).getDouble(); eatenLength = 5; } return new Vector3Argument(pos,offset+eatenLength, yaw, pitch); } catch (IndexOutOfBoundsException e) { throw new InternalExpressionException("Position argument should be defined either by three coordinates (a triple or by three arguments), or a positioned block value"); } } }
[ "gnembonmc@gmail.com" ]
gnembonmc@gmail.com
97186ea5d0b821e385c956aba50fa71164397800
088d37e531cd4516480e8ceb143ca46800cc19af
/app/src/main/java/davidandroidprojecttools/qq986945193/com/davidandroidprojecttools/activity/UmengStatisticsActivity.java
1d2fbeffd5c59670c480835f2186012988389389
[]
no_license
IaHehe/DavidAndroidProjectTools
f562bc1bd5499c063d8d73f3977fa9ab1399f928
ed4db1728715c61eb27abf772fa88454d2896b83
refs/heads/master
2021-01-20T07:13:43.908834
2017-04-28T03:10:45
2017-04-28T03:10:45
89,981,337
3
1
null
2017-05-02T02:05:55
2017-05-02T02:05:55
null
UTF-8
Java
false
false
1,795
java
package davidandroidprojecttools.qq986945193.com.davidandroidprojecttools.activity; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ListAdapter; import android.widget.ListView; import com.umeng.analytics.MobclickAgent; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.Locale; import davidandroidprojecttools.qq986945193.com.davidandroidprojecttools.R; import davidandroidprojecttools.qq986945193.com.davidandroidprojecttools.view.XListView; import davidandroidprojecttools.qq986945193.com.davidandroidprojecttools.view.XScrollView; /** * @author :程序员小冰 * @新浪微博 :http://weibo.com/mcxiaobing * @GitHub: https://github.com/QQ986945193 * @CSDN博客: http://blog.csdn.net/qq_21376985 * @交流Qq :986945193 * 类名:umeng统计的用法 * <p/> * 1,从友盟官方后台注册应用,2,创建一个基类。在activity onResume()和onPause()方法 * <p/> * 注册。 3,引入友盟统计jar文件或者build添加 */ public class UmengStatisticsActivity extends Activity { // 这只是一个简单的使用统计,具体更多功能请看umeng官方sdk文档介绍: // // 地址:http://dev.umeng.com/analytics/android-doc/integration# // // 我写的这个demo只是简单的统计app下载量,启动次数,以及渠道安装量。 public void onResume() { super.onResume(); MobclickAgent.onResume(this); } public void onPause() { super.onPause(); MobclickAgent.onPause(this); } }
[ "admin" ]
admin
3365850bd7bf64a106a8cb95fd33aaac409a8db8
ac0050b8b923a0de6b6ff43494b76296ffbdaf1d
/main/src/main/java/org/objenesis/ObjenesisHelper.java
5a73c8578b694c891b4b368443b433a9d0271a17
[ "Apache-2.0" ]
permissive
xwkh/objenesis
802c10626fb12567dbb0b654ab6058cd112b0099
8b2c259ef9ace7c487ae9c6657e57d400453e832
refs/heads/master
2020-09-09T12:18:51.771196
2019-10-05T03:58:20
2019-10-05T03:58:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,889
java
/* * Copyright 2006-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.objenesis; import java.io.Serializable; import org.objenesis.instantiator.ObjectInstantiator; /** * Use Objenesis in a static way. <strong>It is strongly not recommended to use this class.</strong> * * @author Henri Tremblay */ public final class ObjenesisHelper { private static final Objenesis OBJENESIS_STD = new ObjenesisStd(); private static final Objenesis OBJENESIS_SERIALIZER = new ObjenesisSerializer(); private ObjenesisHelper() { } /** * Will create a new object without any constructor being called * * @param <T> Type instantiated * @param clazz Class to instantiate * @return New instance of clazz */ public static <T> T newInstance(Class<T> clazz) { return OBJENESIS_STD.newInstance(clazz); } /** * Will create an object just like it's done by ObjectInputStream.readObject (the default * constructor of the first non serializable class will be called) * * @param <T> Type instantiated * @param clazz Class to instantiate * @return New instance of clazz */ public static <T extends Serializable> T newSerializableInstance(Class<T> clazz) { return OBJENESIS_SERIALIZER.newInstance(clazz); } /** * Will pick the best instantiator for the provided class. If you need to create a lot of * instances from the same class, it is way more efficient to create them from the same * ObjectInstantiator than calling {@link #newInstance(Class)}. * * @param <T> Type to instantiate * @param clazz Class to instantiate * @return Instantiator dedicated to the class */ public static <T> ObjectInstantiator<T> getInstantiatorOf(Class<T> clazz) { return OBJENESIS_STD.getInstantiatorOf(clazz); } /** * Same as {@link #getInstantiatorOf(Class)} but providing an instantiator emulating * ObjectInputStream.readObject behavior. * * @see #newSerializableInstance(Class) * @param <T> Type to instantiate * @param clazz Class to instantiate * @return Instantiator dedicated to the class */ public static <T extends Serializable> ObjectInstantiator<T> getSerializableObjectInstantiatorOf(Class<T> clazz) { return OBJENESIS_SERIALIZER.getInstantiatorOf(clazz); } }
[ "henri.tremblay@gmail.com" ]
henri.tremblay@gmail.com
a93538d87acf377093e91904971f58459aa2d26d
35f7ba535264e9d5fd5e8db9f08130ab67242032
/src/test/java/com/test/madhan/pages/PersonalInformationPage.java
35072eca3031f5bf83865c04c1d9f64c4eed8f6a
[]
no_license
phystem/bdd-test-framework
33d19cad4fc30c079732c2be43966fbb6ed82915
f3768b0c60ccfd0dab595beff4fb4eb2a42f9654
refs/heads/master
2023-03-25T11:39:12.449874
2021-03-13T15:15:18
2021-03-13T15:15:18
347,403,099
0
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
package com.test.madhan.pages; import com.codeborne.selenide.Condition; import com.codeborne.selenide.SelenideElement; import static com.codeborne.selenide.Condition.text; import static com.codeborne.selenide.Condition.visible; import static com.codeborne.selenide.Selectors.byName; import static com.codeborne.selenide.Selenide.$; public class PersonalInformationPage { private final SelenideElement firstNameTextBox = $("#firstname"); private final SelenideElement currentPassword = $("#old_passwd"); private final SelenideElement saveDetails = $(byName("submitIdentity")); private final SelenideElement successMessage = $("p.alert-success"); public PersonalInformationPage setFirstName(String firstName) { firstNameTextBox.val(firstName); return this; } public void saveDetails(String currentPassword) { this.currentPassword.val(currentPassword); saveDetails.click(); successMessage.shouldBe(visible) .shouldHave(text("Your personal information has been successfully updated")); } }
[ "phystem2@gmail.com" ]
phystem2@gmail.com
64814ba29cc2c4137e9526ad9ba29e711816485a
b765ff986f0cd8ae206fde13105321838e246a0a
/Inspect/app/src/main/java/com/growingio_rewriter/a/a/d/eW.java
c77cc0be746448a5533ecd5be1a1d40193cddf14
[]
no_license
piece-the-world/inspect
fe3036409b20ba66343815c3c5c9f4b0b768c355
a660dd65d7f40501d95429f8d2b126bd8f59b8db
refs/heads/master
2020-11-29T15:28:39.406874
2016-10-09T06:24:32
2016-10-09T06:24:32
66,539,462
0
0
null
null
null
null
UTF-8
Java
false
false
893
java
/* * Decompiled with CFR 0_115. */ package com.growingio.a.a.d; import com.growingio.a.a.d.eS; import com.growingio.a.a.d.eV; import com.growingio.a.a.d.ei; import com.growingio.a.a.d.fg; import com.growingio.a.a.d.kW; import com.growingio.a.a.d.oP; import java.io.Serializable; import java.util.Map; class eW<K extends Comparable<?>, V> implements Serializable { private final ei<kW<K>, V> a; private static final long b = 0; eW(ei<kW<K>, V> ei2) { this.a = ei2; } Object a() { if (this.a.isEmpty()) { return eS.a(); } return this.b(); } Object b() { eV eV2 = new eV(); oP<Map.Entry<kW<K>, V>> oP2 = this.a.k().k_(); while (oP2.hasNext()) { Map.Entry<kW<K>, V> entry = oP2.next(); eV2.a(entry.getKey(), entry.getValue()); } return eV2.a(); } }
[ "taochao@corp.netease.com" ]
taochao@corp.netease.com
9433a1e6273edd1afe63529287a3ab537c71e993
b02328e2816a419cafcaf5c1f876577fb0e17a57
/legaldocml-xliff/src/main/java/io/legaldocml/xliff/element/XliffObject.java
f029864fbb3b4cff02990781ffaa910ca3a49038
[]
no_license
jacquesmilitello/legaldocml
88bcec4fa940e52fc68c6d91f5f677e97f4da264
85d42824b2d4cd7cf32f3028310247d64541b6ad
refs/heads/master
2023-06-23T10:42:01.072633
2022-02-09T21:08:05
2022-02-09T21:08:05
92,104,373
11
4
null
2023-06-14T22:43:42
2017-05-22T22:18:56
Java
UTF-8
Java
false
false
484
java
package io.legaldocml.xliff.element; import com.google.common.collect.ImmutableMap; import io.legaldocml.io.AttributeGetterSetter; import io.legaldocml.io.Externalizable; /** * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a> */ public interface XliffObject extends Externalizable { /** * To read attributes. */ default ImmutableMap<String, AttributeGetterSetter<XliffObject>> attributes() { return ImmutableMap.of(); } }
[ "jacques.militello@gmail.com" ]
jacques.militello@gmail.com
64885b478607cd6e9530a2c60341a192e331313a
82cdc684f2585e27975b2e3dec19f32830f146e1
/build-types/src/main/java/com/neaterbits/build/types/compile/CompilerStatus.java
712afb27c214d35ad8e1ff984795a973ebd1ad15
[]
no_license
neaterbits/build
e70fe0283d6af445a5b555c4620d70ca52851ee3
ad36525fa9b0ee9aae671792c1ed7d92ac9a7851
refs/heads/main
2023-02-25T08:28:01.428690
2021-02-03T17:34:27
2021-02-03T17:34:27
301,515,052
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package com.neaterbits.build.types.compile; import java.util.List; public final class CompilerStatus { private final String commandLine; private final int exitCode; private final boolean executedOk; private final List<BuildIssue> issues; public CompilerStatus(String commandLine, int exitCode, boolean executedOk, List<BuildIssue> issues) { this.commandLine = commandLine; this.exitCode = exitCode; this.executedOk = executedOk; this.issues = issues; } public String getCommandLine() { return commandLine; } public int getExitCode() { return exitCode; } public boolean executedOk() { return executedOk; } public List<BuildIssue> getIssues() { return issues; } }
[ "nils.lorentzen@gmail.com" ]
nils.lorentzen@gmail.com
1ecf4f751488eb20ace1d8035b6c8fe0e1944a57
eace11a5735cfec1f9560e41a9ee30a1a133c5a9
/CMT/cptiscas/程序变异体的backup/V1和V2合并之前v2的变异体/SequentialHeap/STD_22/SequentialHeap.java
9c9b11bb208788be64ecdb44dae5a828d1016ca8
[]
no_license
phantomDai/mypapers
eb2fc0fac5945c5efd303e0206aa93d6ac0624d0
e1aa1236bbad5d6d3b634a846cb8076a1951485a
refs/heads/master
2021-07-06T18:27:48.620826
2020-08-19T12:17:03
2020-08-19T12:17:03
162,563,422
0
1
null
null
null
null
UTF-8
Java
false
false
3,364
java
/* * SequentialHeap.java * * Created on March 10, 2007, 10:45 AM * * From "Multiprocessor Synchronization and Concurrent Data Structures", * by Maurice Herlihy and Nir Shavit. * Copyright 2007 Elsevier Inc. All rights reserved. */ package mutants.SequentialHeap.STD_22; /** * Sequential heap. * @param T type manged by heap * @author mph */ public class SequentialHeap<T> implements PQueue<T> { private static final int ROOT = 1; int next; HeapNode<T>[] heap; /** * Constructor * @param capacity maximum number of items heap can hold */ public SequentialHeap(int capacity) { next = 1; heap = (HeapNode<T>[]) new HeapNode[capacity + 1]; for (int i = 0; i < capacity + 1; i++) { } } /** * Add item to heap. * @param item Uninterpreted item. * @param priority item priority */ public synchronized void add(T item, int priority) { int child = next++; heap[child].init(item, priority); while (child > ROOT) { int parent = child / 2; int oldChild = child; if (heap[child].priority < heap[parent].priority) { swap(child, parent); child = parent; } else { return; } } } /** * Returns (does not remove) least item in heap. * @return least item. */ public T getMin() { return heap[ROOT].item; } /** * Returns and removes least item in heap. * @return least item. */ public synchronized T removeMin() { int bottom = --next; T item = heap[ROOT].item; swap(ROOT, bottom); if (bottom == ROOT) { return item; } int child = 0; int parent = ROOT; while (parent < heap.length / 2) { int left = parent * 2; int right = (parent * 2) + 1; if (left >= next) { break; } else if (right >= next || heap[left].priority < heap[right].priority) { child = left; } else { child = right; } // If child higher priority than parent swap then else stop if (heap[child].priority < heap[parent].priority) { swap(parent, child); // Swap item, key, and tag of heap[i] and heap[child] parent = child; } else { break; } } return item; } private synchronized void swap(int i, int j) { HeapNode<T> node = heap[i]; heap[i] = heap[j]; heap[j] = node; } public boolean isEmpty() { return next == 0; } public void sanityCheck() { int stop = next; for (int i = ROOT; i < stop; i++) { int left = i * 2; int right = (i * 2) + 1; if (left < stop && heap[left].priority < heap[i].priority) { System.out.println("Heap property violated:"); System.out.printf("\theap[%d] = %d, left child heap[%d] = %d\n", i, heap[i].priority, left, heap[left].priority); } if (right < stop && heap[right].priority < heap[i].priority) { System.out.println("Heap property violated:"); System.out.printf("\theap[%d] = %d, right child heap[%d] = %d\n", i, heap[i].priority, right, heap[right].priority); } } } private static class HeapNode<S> { int priority; S item; /** * initialize node * @param myItem * @param myPriority */ public void init(S myItem, int myPriority) { item = myItem; priority = myPriority; } } }
[ "daihepeng@sina.cn" ]
daihepeng@sina.cn
32c3f40b2a8dda5b057297cc70e6eee782f7988c
0d4a2464c0fec2288f868cc19f76bc377c9ad24f
/shopping_protal/shopping_bean/src/main/java/com/alibaba/shopping/shopping_bean/bean/shopentity/domain/Report.java
f4e14a1a9f0f122a5e48bb73daf202a5d62e7304
[]
no_license
albertmaxwell/NewShopping
b940b07b9457d690a610f3dca07e78f97eb26637
c5ded1845404c7de1c53e57b8cb9be302c3911e1
refs/heads/master
2022-07-16T09:03:37.686020
2019-12-20T10:37:34
2019-12-20T10:37:34
202,852,094
0
0
null
2022-06-29T17:37:08
2019-08-17T07:51:39
HTML
UTF-8
Java
false
false
2,772
java
package com.alibaba.shopping.shopping_bean.bean.shopentity.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import java.util.Date; @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) @Entity @Table(name = "wemall_report") public class Report extends IdEntity { //用户 @ManyToOne(fetch = FetchType.LAZY) private User user; //商品 @ManyToOne(fetch = FetchType.LAZY) private Goods goods; //状态 private int status; @ManyToOne(fetch = FetchType.LAZY) private ReportSubject subject; //附件1 @OneToOne(fetch = FetchType.LAZY) private Accessory acc1; //附件2 @OneToOne(fetch = FetchType.LAZY) private Accessory acc2; //附件3 @OneToOne(fetch = FetchType.LAZY) private Accessory acc3; //内容 @Lob @Column(columnDefinition = "LongText") private String content; //结果 private int result; //操作信息 @Lob @Column(columnDefinition = "LongText") private String handle_info; //操作时间 private Date handle_Time; public int getResult(){ return this.result; } public void setResult(int result){ this.result = result; } public Date getHandle_Time(){ return this.handle_Time; } public void setHandle_Time(Date handle_Time){ this.handle_Time = handle_Time; } public User getUser(){ return this.user; } public void setUser(User user){ this.user = user; } public Goods getGoods(){ return this.goods; } public void setGoods(Goods goods){ this.goods = goods; } public int getStatus(){ return this.status; } public void setStatus(int status){ this.status = status; } public ReportSubject getSubject(){ return this.subject; } public void setSubject(ReportSubject subject){ this.subject = subject; } public Accessory getAcc1(){ return this.acc1; } public void setAcc1(Accessory acc1){ this.acc1 = acc1; } public Accessory getAcc2(){ return this.acc2; } public void setAcc2(Accessory acc2){ this.acc2 = acc2; } public Accessory getAcc3(){ return this.acc3; } public void setAcc3(Accessory acc3){ this.acc3 = acc3; } public String getContent(){ return this.content; } public void setContent(String content){ this.content = content; } public String getHandle_info(){ return this.handle_info; } public void setHandle_info(String handle_info){ this.handle_info = handle_info; } }
[ "jhy..1008611" ]
jhy..1008611
f75d3f2637da678f3659a95b9eb2762d6181bb25
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/a01fab0d26c989669f5432a94c7ab13c61434898/after/AbstractInplaceVariableIntroducer.java
2953af91c81fd220020c78a7e99173ee2045a2c3
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
7,409
java
/* * Copyright 2000-2011 JetBrains s.r.o. * * 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.intellij.refactoring.introduce.inplace; import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.codeInsight.lookup.LookupElementBuilder; import com.intellij.codeInsight.template.TextResult; import com.intellij.codeInsight.template.impl.TemplateManagerImpl; import com.intellij.codeInsight.template.impl.TemplateState; import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.RangeMarker; import com.intellij.openapi.editor.SelectionModel; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.popup.Balloon; import com.intellij.openapi.ui.popup.BalloonBuilder; import com.intellij.openapi.ui.popup.JBPopupFactory; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiNamedElement; import com.intellij.refactoring.rename.NameSuggestionProvider; import com.intellij.refactoring.rename.inplace.VariableInplaceRenamer; import com.intellij.ui.awt.RelativePoint; import com.intellij.util.ui.PositionTracker; import javax.swing.*; import java.awt.*; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; /** * User: anna * Date: 3/15/11 */ public abstract class AbstractInplaceVariableIntroducer<E extends PsiElement> extends VariableInplaceRenamer { public static final Key<Boolean> INTRODUCE_RESTART = Key.create("INTRODUCE_RESTART"); protected E myExpr; protected RangeMarker myExprMarker; protected E[] myOccurrences; protected List<RangeMarker> myOccurrenceMarkers; protected Balloon myBalloon; protected String myTitle; protected RelativePoint myTarget; public AbstractInplaceVariableIntroducer(PsiNamedElement elementToRename, Editor editor, Project project, String title, E[] occurrences, E expr) { super(elementToRename, editor, project); myTitle = title; myOccurrences = occurrences; myExpr = expr; myExprMarker = myExpr != null && myExpr.isPhysical() ? myEditor.getDocument().createRangeMarker(myExpr.getTextRange()) : null; initOccurrencesMarkers(); } protected abstract JComponent getComponent(); public void setOccurrenceMarkers(List<RangeMarker> occurrenceMarkers) { myOccurrenceMarkers = occurrenceMarkers; } public void setExprMarker(RangeMarker exprMarker) { myExprMarker = exprMarker; } public E getExpr() { return myExpr != null && myExpr.isValid() && myExpr.isPhysical() ? myExpr : null; } public E[] getOccurrences() { return myOccurrences; } public List<RangeMarker> getOccurrenceMarkers() { if (myOccurrenceMarkers == null) { initOccurrencesMarkers(); } return myOccurrenceMarkers; } protected void initOccurrencesMarkers() { if (myOccurrenceMarkers != null) return; myOccurrenceMarkers = new ArrayList<RangeMarker>(); for (E occurrence : myOccurrences) { myOccurrenceMarkers.add(myEditor.getDocument().createRangeMarker(occurrence.getTextRange())); } } public RangeMarker getExprMarker() { return myExprMarker; } @Override public boolean performInplaceRename(boolean processTextOccurrences, LinkedHashSet<String> nameSuggestions) { final boolean result = super.performInplaceRename(processTextOccurrences, nameSuggestions); if (result) { if (myBalloon == null) { showBalloon(); } } return result; } protected void releaseResources() { } private void showBalloon() { final JComponent component = getComponent(); if (component == null) return; if (ApplicationManager.getApplication().isHeadlessEnvironment()) return; final BalloonBuilder balloonBuilder = JBPopupFactory.getInstance().createDialogBalloonBuilder(component, null); myBalloon = balloonBuilder.createBalloon(); Disposer.register(myBalloon, new Disposable() { @Override public void dispose() { releaseIfNotRestart(); } }); myBalloon.show(new PositionTracker<Balloon>(myEditor.getContentComponent()) { @Override public RelativePoint recalculateLocation(Balloon object) { final RelativePoint target = JBPopupFactory.getInstance().guessBestPopupLocation(myEditor); final Point screenPoint = target.getScreenPoint(); int y = screenPoint.y; if (target.getPoint().getY() > myEditor.getLineHeight() + myBalloon.getPreferredSize().getHeight()) { y -= myEditor.getLineHeight(); } myTarget = new RelativePoint(new Point(screenPoint.x, y)); return myTarget; } }, Balloon.Position.above); } protected void releaseIfNotRestart() { final Boolean isRestart = myEditor.getUserData(INTRODUCE_RESTART); if (isRestart == null || !isRestart.booleanValue()) { releaseResources(); } } @Override public void finish() { super.finish(); if (myBalloon != null) { final Boolean isRestart = myEditor.getUserData(INTRODUCE_RESTART); if (isRestart == null || !isRestart.booleanValue()) { myBalloon.hide(); } } } @Override protected LookupElement[] createLookupItems(LookupElement[] lookupItems, String name) { TemplateState templateState = TemplateManagerImpl.getTemplateState(myEditor); final PsiNamedElement psiVariable = getVariable(); if (psiVariable != null) { final TextResult insertedValue = templateState != null ? templateState.getVariableValue(PRIMARY_VARIABLE_NAME) : null; if (insertedValue != null) { final String text = insertedValue.getText(); if (!text.isEmpty() && !Comparing.strEqual(text, name)) { final LinkedHashSet<String> names = new LinkedHashSet<String>(); names.add(text); for (NameSuggestionProvider provider : Extensions.getExtensions(NameSuggestionProvider.EP_NAME)) { provider.getSuggestedNames(psiVariable, psiVariable, names); } final LookupElement[] items = new LookupElement[names.size()]; final Iterator<String> iterator = names.iterator(); for (int i = 0; i < items.length; i++) { items[i] = LookupElementBuilder.create(iterator.next()); } return items; } } } return super.createLookupItems(lookupItems, name); } @Override protected TextRange preserveSelectedRange(SelectionModel selectionModel) { return null; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
a581ddac05ddf4b0de0e9aee497833f3475f2ec6
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.3/mule/transports/xmpp/src/main/java/org/mule/providers/xmpp/filters/AbstractXmppFilter.java
a6589fb950c591cb5dcee818ec3471ab0d0d8450
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
1,298
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.providers.xmpp.filters; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Packet; import org.mule.umo.UMOFilter; import org.mule.umo.UMOMessage; /** * <code>AbstractXmppFilter</code> is a filter adapter so that Smack Filters * can be configured as Mule filters * * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> * @version $Revision$ */ public abstract class AbstractXmppFilter implements UMOFilter, PacketFilter { protected PacketFilter delegate; public boolean accept(Packet packet) { if (delegate == null) { delegate = createFilter(); } return delegate.accept(packet); } public boolean accept(UMOMessage message) { // If we have received a UMOMessage the filter has already been applied return true; } protected abstract PacketFilter createFilter(); }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
a48f4b3925831c26006bf520b6d7d1fc4c8f96f0
b07e61f16cdf293b90565fda238181c846d2fa3b
/nb-mall-develop/nb-user-api/src/main/java/com/nowbook/user/model/UserQuota.java
f5e6517dae67fd8e933087249656b0fcf38a76c8
[]
no_license
gspandy/QTH-Server
4d9bbb385c43a6ecb6afbecfe2aacce69f1a37b7
9a47cef25542feb840f6ffdebdcb79fc4c7fc57b
refs/heads/master
2023-09-03T12:36:39.468049
2018-02-06T06:09:49
2018-02-06T06:09:49
123,294,108
0
1
null
2018-02-28T14:11:08
2018-02-28T14:11:07
null
UTF-8
Java
false
false
1,997
java
package com.nowbook.user.model; import com.google.common.base.Objects; import lombok.Getter; import lombok.Setter; import java.io.Serializable; import java.util.Date; /* * Author: jl * Date: 2012-12-04 */ public class UserQuota implements Serializable { private static final long serialVersionUID = 7994853609200081045L; @Getter @Setter private Long id; @Getter @Setter private Long userId; @Getter @Setter private Integer maxImageCount; @Getter @Setter private Long maxImageSize; @Getter @Setter private Integer maxWidgetCount; @Getter @Setter private Integer usedImageCount; @Getter @Setter private Long usedImageSize; @Getter @Setter private Integer usedWidgetCount; @Getter @Setter private Date createdAt; @Getter @Setter private Date updatedAt; @Override public int hashCode() { return Objects.hashCode(userId); } @Override public boolean equals(Object o) { if (o == null || !(o instanceof UserQuota)) { return false; } UserQuota that = (UserQuota) o; return Objects.equal(userId, that.userId) && Objects.equal(maxImageCount, that.maxImageCount) && Objects.equal(maxImageSize, that.maxImageSize) && Objects.equal(maxWidgetCount, maxWidgetCount) && Objects.equal(usedImageCount, that.usedImageCount) && Objects.equal(usedImageSize, that.usedImageSize) && Objects.equal(usedWidgetCount, that.usedWidgetCount); } @Override public String toString() { return Objects.toStringHelper(this).add("id", id).add("userId", userId).add("maxImageCount", maxImageCount) .add("maxImageSize", maxImageSize).add("maxWidgetCount", maxWidgetCount).add("usedImageCount", usedImageCount) .add("usedImageSize", usedImageSize).add("usedWidgetCount", usedWidgetCount).omitNullValues().toString(); } }
[ "jameshsu4879@163.com" ]
jameshsu4879@163.com
db78cf2904c1dd61175aa1e0fa9dc5edd74cf1b6
5d23e7f68eb05a50e6d799189b5b5f7dc3a9624e
/CommonsEntity/test/com/bid4win/commons/persistence/usertype/connection/AllTestsPackage.java
de44d3a1ab2a88915ddd9c00fba8b8e8ea1eb0cf
[]
no_license
lanaflon-cda2/B4W
37d9f718bb60c1bf20c62e7d0c3e53fbf4a50c95
7ddad31425798cf817c5881dd13de5482431fc7b
refs/heads/master
2021-05-27T05:47:23.132341
2013-10-11T11:51:03
2013-10-11T11:51:03
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
470
java
package com.bid4win.commons.persistence.usertype.connection; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** * Classe de test du package com.bid4win.commons.persistence.usertype.connection seulement<BR> * <BR> * @author Emeric Fillâtre */ @RunWith(Suite.class) @Suite.SuiteClasses({com.bid4win.commons.persistence.usertype.connection.DisconnectionReasonUserTypeTest.class}) public class AllTestsPackage { // Pas de définition spécifique }
[ "emeric.fillatre@gmail.com" ]
emeric.fillatre@gmail.com
f992f35891d0674ffa267c9ab41769d2675134b6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_716c27b248a33ad3269459111c9275d38f8c22b2/UpdateProblemsViewJob/11_716c27b248a33ad3269459111c9275d38f8c22b2_UpdateProblemsViewJob_s.java
453842b0fa041afd88af3746f6bcd5efa7b0e798
[]
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,386
java
/******************************************************************************* * Copyright (c) 2010, 2011 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Obeo - initial API and implementation *******************************************************************************/ package org.eclipse.mylyn.docs.intent.client.ui.ide.navigator; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.mylyn.docs.intent.collab.common.location.IntentLocations; import org.eclipse.mylyn.docs.intent.collab.common.logger.IIntentLogger.LogType; import org.eclipse.mylyn.docs.intent.collab.common.logger.IntentLogger; import org.eclipse.mylyn.docs.intent.collab.handlers.adapters.RepositoryAdapter; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatusManager; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatusSeverity; import org.eclipse.mylyn.docs.intent.core.compiler.SynchronizerCompilationStatus; /** * A job in charge of updating the "Problems" View my creating IMarkers for each Compilation or * Synchronization status associed to the Intent Document. * * @author <a href="mailto:alex.lagarde@obeo.fr">Alex Lagarde</a> */ public class UpdateProblemsViewJob extends Job { private static final String UPDATE_PROBLEMS_VIEW_JOB_NAME = "Updating problem view"; private RepositoryAdapter adapter; private IProject project; /** * Default constructor. * * @param project * the Intent project to update */ public UpdateProblemsViewJob(IProject project, RepositoryAdapter adapter) { super(UPDATE_PROBLEMS_VIEW_JOB_NAME); this.project = project; this.adapter = adapter; } /** * {@inheritDoc} */ @Override protected IStatus run(IProgressMonitor monitor) { Resource statusResource = adapter.getResource(IntentLocations.COMPILATION_STATUS_INDEX_PATH); Resource intentDocumentResource = adapter.getResource(IntentLocations.INTENT_INDEX); String platformString = intentDocumentResource.getURI().toPlatformString(true); IFile intentDocumentFile = (IFile)ResourcesPlugin.getWorkspace().getRoot().findMember(platformString); if (intentDocumentFile != null && !(statusResource.getContents().isEmpty())) { // Step 1: delete currently defined markers try { if (project.isAccessible()) { project.deleteMarkers("org.eclipse.core.resources.problemmarker", false, IResource.DEPTH_INFINITE); } } catch (CoreException e) { // Nothing to do, problem view will still reference old markers IntentLogger.getInstance().log(LogType.WARNING, "Intent - failed to delete markers of project " + project.getName(), e); } // Step 2: create marker for each status CompilationStatusManager statusManager = (CompilationStatusManager)statusResource.getContents() .iterator().next(); for (CompilationStatus status : statusManager.getCompilationStatusList()) { createMarkerFromStatus(status); } } return Status.OK_STATUS; } /** * Creates a marker on the intent project that represents the given status. * * @param status * the compilation status to create the marker from */ private void createMarkerFromStatus(CompilationStatus status) { IMarker marker = null; try { if (project.isAccessible() && !status.eIsProxy() && !status.getTarget().eIsProxy() && status.eResource() != null && status.getTarget().eResource() != null) { marker = project.createMarker("org.eclipse.core.resources.problemmarker"); if (status.getSeverity() == CompilationStatusSeverity.WARNING) { marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING); } else if (status.getSeverity() == CompilationStatusSeverity.INFO) { marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO); } else { marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); } String markerMessage = status.getMessage(); if (status instanceof SynchronizerCompilationStatus) { markerMessage = "[Sync] " + markerMessage; } marker.setAttribute(IMarker.MESSAGE, markerMessage); marker.setAttribute(IMarker.LOCATION, status.eResource().getURI() + "#" + status.getTarget().eResource().getURIFragment(status)); marker.setAttribute(IMarker.SOURCE_ID, "Intent"); } } catch (CoreException e) { // Nothing to do, problem view will not be updated IntentLogger.getInstance().log(LogType.WARNING, "Intent - error occured while creating problem markers on project " + project.getName(), e); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c22684dd13e3d90bc3337701601b795b14d175cd
8ef5dba87266ec527514fe14a79e23f10bd02a6e
/didn't work/Tawseel APK/Client/app/app/app/src/main/java/com/fasterxml/jackson/databind/ser/PropertyWriter.java
7b6c1a73f6fcd89e4f32ff9e7a7527a8f7b2eb12
[]
no_license
ahmedmgh67/What-s-Fatora
4cfff6ae6c5b41f4b8fc23068d219f63251854ff
53c90a17542ecca1fe267816219d9f0c78471c92
refs/heads/master
2020-04-28T06:14:33.730056
2019-02-15T21:41:28
2019-02-15T21:41:28
175,049,535
0
0
null
null
null
null
UTF-8
Java
false
false
3,051
java
package com.fasterxml.jackson.databind.ser; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.PropertyMetadata; import com.fasterxml.jackson.databind.PropertyName; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition; import com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase; import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor; import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.Serializable; import java.lang.annotation.Annotation; public abstract class PropertyWriter extends ConcreteBeanPropertyBase implements Serializable { private static final long serialVersionUID = 1L; protected PropertyWriter(PropertyMetadata paramPropertyMetadata) { super(paramPropertyMetadata); } protected PropertyWriter(BeanPropertyDefinition paramBeanPropertyDefinition) { super(paramBeanPropertyDefinition.getMetadata()); } protected PropertyWriter(PropertyWriter paramPropertyWriter) { super(paramPropertyWriter); } public abstract void depositSchemaProperty(JsonObjectFormatVisitor paramJsonObjectFormatVisitor, SerializerProvider paramSerializerProvider) throws JsonMappingException; @Deprecated public abstract void depositSchemaProperty(ObjectNode paramObjectNode, SerializerProvider paramSerializerProvider) throws JsonMappingException; public <A extends Annotation> A findAnnotation(Class<A> paramClass) { Annotation localAnnotation2 = getAnnotation(paramClass); Annotation localAnnotation1 = localAnnotation2; if (localAnnotation2 == null) { localAnnotation1 = getContextAnnotation(paramClass); } return localAnnotation1; } public abstract <A extends Annotation> A getAnnotation(Class<A> paramClass); public abstract <A extends Annotation> A getContextAnnotation(Class<A> paramClass); public abstract PropertyName getFullName(); public abstract String getName(); public abstract void serializeAsElement(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider) throws Exception; public abstract void serializeAsField(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider) throws Exception; public abstract void serializeAsOmittedField(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider) throws Exception; public abstract void serializeAsPlaceholder(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider) throws Exception; } /* Location: H:\As A Bussines Man\confedince\App Dev Department\What's Fatora\Tawseel APK\Client\dex2jar-2.0\t-dex2jar.jar!\com\fasterxml\jackson\databind\ser\PropertyWriter.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ahmedmgh67@gmail.com" ]
ahmedmgh67@gmail.com
dcc41069be9484906872aaff0082f3a2c3e817ae
75fe6e960e3b8428a6524f9a0560152072171b66
/src/test-21/java/org/thymeleaf/engine21/stsm/conversion/StringToVarietyConverter.java
551b5edaded324bb3b864d1834c9fa3604b9d174
[ "Apache-2.0" ]
permissive
zaza10/thymeleaf-tests
81d10b35ebc48233a299a8001b6ba891132270b5
f5369b47a5766cd00a5b9ed7fe9d3cd1150b1fb6
refs/heads/master
2021-01-15T14:01:54.588478
2013-11-04T00:53:13
2013-11-04T00:53:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,517
java
/* * ============================================================================= * * Copyright (c) 2011-2012, The THYMELEAF team (http://www.thymeleaf.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 org.thymeleaf.engine21.stsm.conversion; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.convert.converter.Converter; import org.thymeleaf.engine21.stsm.model.Variety; import org.thymeleaf.engine21.stsm.model.repository.VarietyRepository; public class StringToVarietyConverter implements Converter<String,Variety> { @Autowired private VarietyRepository varietyRepository; public StringToVarietyConverter() { super(); } public Variety convert(final String source) { final Integer varietyId = Integer.valueOf(source); return this.varietyRepository.findById(varietyId); } }
[ "daniel.fernandez@11thlabs.org" ]
daniel.fernandez@11thlabs.org
6bffd7d18f42551916e650f2c5560418b1775f40
ef0c039e27f173a3aa4e82ab4e26edc93f9e28e0
/flags/src/test/java/com/android/flags/junit/RestoreFlagRule.java
bbfed391033b26db76ab72f8fdaae5505e9d8379
[]
no_license
ggaier/android_platform_tools_base
1091a25aa220665d7eb02481426f4941d0fedd18
85c6b73c22cd23c069d94eb19c824d4fb74a5ec9
refs/heads/master
2020-09-17T11:33:48.674204
2019-11-26T02:43:12
2019-11-26T02:43:12
224,085,780
1
3
null
null
null
null
UTF-8
Java
false
false
1,845
java
/* * Copyright (C) 2017 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.flags.junit; import com.android.flags.Flag; import org.junit.Rule; import org.junit.rules.ExternalResource; /** * {@link Rule} which will ensure that a target {@link Flag} is reset back to its default value * after every test. * * <p>If you have code behind a flag, then that means your code can exhibit different behavior * depending on the flag's value. The easiest way to test all paths is to have multiple tests, with * each test changing the flag's value explicitly at the beginning of it. * * <pre> * public class MyTest { * @Rule * public RestoreFlagRule{Boolean} myRestoreFlag = new RestoreFlagRule{}(StudioFlags.MY_FLAG); * * @Test * public void testFirstBranch() throws Exception { * StudioFlags.MY_FLAG.override(false); * ... * } * * @Test * public void testSecondBranch() throws Exception { * StudioFlags.MY_FLAG.override(true); * ... * } * } * </pre> */ public class RestoreFlagRule<T> extends ExternalResource { private final Flag<T> myFlag; public RestoreFlagRule(Flag<T> flag) { myFlag = flag; } @Override protected void after() { myFlag.clearOverride(); } }
[ "jwenbo52@gmail.com" ]
jwenbo52@gmail.com
1d214621cacb1a2f257c9be6a3552ae270fecbc3
5fa1df99e668fe06cb1c93cc3d77db120661d791
/src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java
ef088993a8636f2a7cc9e47e961e8219d98d94e8
[ "Apache-2.0" ]
permissive
dental-tech/bazel
c81801132761f076437fe562b66d76328b806d2a
adf464fb1bf83179f00834beb34bfb56983e14ee
refs/heads/master
2021-09-13T22:22:20.002039
2018-05-03T15:52:18
2018-05-03T15:53:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,015
java
// Copyright 2018 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // 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.devtools.build.lib.rules.android; import com.google.common.annotations.VisibleForTesting; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget.Mode; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order; /** * Contains transitive asset dependencies for a target. * * <p>In addition to NestedSets of transitive artifacts, we also keep transitive NestedSets of * direct and transitive parsed assets. These NestedSets contain the same information (and it may * appear in both the direct and transitive parsed asset NestedSets); we need to keep them both * separately to record relationships between assets, asset directories, and symbol artifacts and to * distinguish between direct and transitive assets. */ public class AssetDependencies { private final boolean neverlink; private final NestedSet<ParsedAndroidAssets> directParsedAssets; private final NestedSet<ParsedAndroidAssets> transitiveParsedAssets; private final NestedSet<Artifact> transitiveAssets; private final NestedSet<Artifact> transitiveSymbols; static AssetDependencies fromRuleDeps(RuleContext ruleContext, boolean neverlink) { NestedSetBuilder<ParsedAndroidAssets> direct = NestedSetBuilder.naiveLinkOrder(); NestedSetBuilder<ParsedAndroidAssets> transitive = NestedSetBuilder.naiveLinkOrder(); NestedSetBuilder<Artifact> assets = NestedSetBuilder.naiveLinkOrder(); NestedSetBuilder<Artifact> symbols = NestedSetBuilder.naiveLinkOrder(); for (AndroidAssetsInfo info : AndroidCommon.getTransitivePrerequisites( ruleContext, Mode.TARGET, AndroidAssetsInfo.PROVIDER)) { direct.addTransitive(info.getDirectParsedAssets()); transitive.addTransitive(info.getTransitiveParsedAssets()); assets.addTransitive(info.getAssets()); symbols.addTransitive(info.getSymbols()); } return of(neverlink, direct.build(), transitive.build(), assets.build(), symbols.build()); } public static AssetDependencies empty() { return of( false, NestedSetBuilder.emptySet(Order.NAIVE_LINK_ORDER), NestedSetBuilder.emptySet(Order.NAIVE_LINK_ORDER), NestedSetBuilder.emptySet(Order.NAIVE_LINK_ORDER), NestedSetBuilder.emptySet(Order.NAIVE_LINK_ORDER)); } @VisibleForTesting static AssetDependencies of( boolean neverlink, NestedSet<ParsedAndroidAssets> directParsedAssets, NestedSet<ParsedAndroidAssets> transitiveParsedAssets, NestedSet<Artifact> transitiveAssets, NestedSet<Artifact> transitiveSymbols) { return new AssetDependencies( neverlink, directParsedAssets, transitiveParsedAssets, transitiveAssets, transitiveSymbols); } private AssetDependencies( boolean neverlink, NestedSet<ParsedAndroidAssets> directParsedAssets, NestedSet<ParsedAndroidAssets> transitiveParsedAssets, NestedSet<Artifact> transitiveAssets, NestedSet<Artifact> transitiveSymbols) { this.neverlink = neverlink; this.directParsedAssets = directParsedAssets; this.transitiveParsedAssets = transitiveParsedAssets; this.transitiveAssets = transitiveAssets; this.transitiveSymbols = transitiveSymbols; } /** Creates a new AndroidAssetInfo using the passed assets as the direct dependency. */ public AndroidAssetsInfo toInfo(MergedAndroidAssets assets) { if (neverlink) { return AndroidAssetsInfo.empty(assets.getLabel()); } // Create a new object to avoid passing around unwanted merge information to the provider ParsedAndroidAssets parsedAssets = new ParsedAndroidAssets(assets); return AndroidAssetsInfo.of( assets.getLabel(), assets.getMergedAssets(), NestedSetBuilder.create(Order.NAIVE_LINK_ORDER, parsedAssets), NestedSetBuilder.<ParsedAndroidAssets>naiveLinkOrder() .addTransitive(transitiveParsedAssets) .addTransitive(directParsedAssets) .build(), NestedSetBuilder.<Artifact>naiveLinkOrder() .addTransitive(transitiveAssets) .addAll(assets.getAssets()) .build(), NestedSetBuilder.<Artifact>naiveLinkOrder() .addTransitive(transitiveSymbols) .add(assets.getSymbols()) .build()); } /** Creates a new AndroidAssetsInfo from this target's dependencies, without any local assets. */ public AndroidAssetsInfo toInfo(Label label) { if (neverlink) { return AndroidAssetsInfo.empty(label); } return AndroidAssetsInfo.of( label, null, directParsedAssets, transitiveParsedAssets, transitiveAssets, transitiveSymbols); } public NestedSet<ParsedAndroidAssets> getDirectParsedAssets() { return directParsedAssets; } public NestedSet<ParsedAndroidAssets> getTransitiveParsedAssets() { return transitiveParsedAssets; } public NestedSet<Artifact> getTransitiveAssets() { return transitiveAssets; } public NestedSet<Artifact> getTransitiveSymbols() { return transitiveSymbols; } }
[ "copybara-piper@google.com" ]
copybara-piper@google.com
912706fee5bc0b89c7095c9dccbf0d24833babf4
dbfb573e81efd9f2e864b5a87ee918bab79b783d
/src/test/java/com/jukusoft/browsergame/BrowsergameRtsBackendApplicationTests.java
021997306203c52fac8374409931931fdca9e78c
[ "Apache-2.0" ]
permissive
JuKu/java-rts-browsergame-backend
a442f04ec041f431437380301042ec432f2acffd
7a1e034bfa9f36304bbd48cf2bda285143793a95
refs/heads/master
2023-07-13T11:04:21.879749
2021-08-13T19:25:00
2021-08-13T19:25:00
359,523,663
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
package com.jukusoft.browsergame; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class BrowsergameRtsBackendApplicationTests { @Test void contextLoads() { } }
[ "kuenzel.justin@t-online.de" ]
kuenzel.justin@t-online.de
67a1b9143cb3b7759dbbd1c2d76c7350a4d143b2
e8e2f3730006f1d0146bf37d2bbc701b25ae03b4
/learning/src/main/java/newpackage/ConnectionPro.java
c27b836a2702edf3029d50c017c6182ef68a544c
[]
no_license
vishalgupta123/my-training-project
eef30bf1b35b9d2f9fead105ec41663d35efba6d
df17246cece4ab13b756ee5dbc1fa66e143defce
refs/heads/master
2023-07-27T13:41:57.452796
2021-09-09T10:05:27
2021-09-09T10:05:27
404,422,839
0
0
null
null
null
null
UTF-8
Java
false
false
457
java
package newpackage; import java.sql.*; public class ConnectionPro { private static Connection con; public static Connection getConnection(){ try{ Class.forName("oracle.jdbc.driver.OracleDriver"); con=DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/orcl","sys as sysdba","system"); }catch(Exception e){ e.printStackTrace(); } return con; } }
[ "abc@gmail.com" ]
abc@gmail.com
eaa8ac24fc434782dbff50f97e1cfadb3697aa5a
fa51687f6aa32d57a9f5f4efc6dcfda2806f244d
/jdk8-src/src/main/java/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeUseImpl.java
34cafc0d090b01d54fea8a108f66b3dd9991cd8e
[]
no_license
yida-lxw/jdk8
44bad6ccd2d81099bea11433c8f2a0fc2e589eaa
9f69e5f33eb5ab32e385301b210db1e49e919aac
refs/heads/master
2022-12-29T23:56:32.001512
2020-04-27T04:14:10
2020-04-27T04:14:10
258,988,898
0
1
null
2020-10-13T21:32:05
2020-04-26T09:21:22
Java
UTF-8
Java
false
false
4,799
java
/* * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 1999-2002,2004 The Apache Software Foundation. * * 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.sun.org.apache.xerces.internal.impl.xs; import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; import com.sun.org.apache.xerces.internal.impl.xs.util.XSObjectListImpl; import com.sun.org.apache.xerces.internal.xs.ShortList; import com.sun.org.apache.xerces.internal.xs.XSAttributeDeclaration; import com.sun.org.apache.xerces.internal.xs.XSAttributeUse; import com.sun.org.apache.xerces.internal.xs.XSConstants; import com.sun.org.apache.xerces.internal.xs.XSNamespaceItem; import com.sun.org.apache.xerces.internal.xs.XSObjectList; /** * The XML representation for an attribute use * schema component is a local <attribute> element information item * * @author Sandy Gao, IBM * @version $Id: XSAttributeUseImpl.java,v 1.7 2010-11-01 04:39:55 joehw Exp $ * @xerces.internal */ public class XSAttributeUseImpl implements XSAttributeUse { // the referred attribute decl public XSAttributeDecl fAttrDecl = null; // use information: SchemaSymbols.USE_OPTIONAL, REQUIRED, PROHIBITED public short fUse = SchemaSymbols.USE_OPTIONAL; // value constraint type: default, fixed or !specified public short fConstraintType = XSConstants.VC_NONE; // value constraint value public ValidatedInfo fDefault = null; // optional annotation public XSObjectList fAnnotations = null; public void reset() { fDefault = null; fAttrDecl = null; fUse = SchemaSymbols.USE_OPTIONAL; fConstraintType = XSConstants.VC_NONE; fAnnotations = null; } /** * Get the type of the object, i.e ELEMENT_DECLARATION. */ public short getType() { return XSConstants.ATTRIBUTE_USE; } /** * The <code>name</code> of this <code>XSObject</code> depending on the * <code>XSObject</code> type. */ public String getName() { return null; } /** * The namespace URI of this node, or <code>null</code> if it is * unspecified. defines how a namespace URI is attached to schema * components. */ public String getNamespace() { return null; } /** * {required} determines whether this use of an attribute declaration * requires an appropriate attribute information item to be present, or * merely allows it. */ public boolean getRequired() { return fUse == SchemaSymbols.USE_REQUIRED; } /** * {attribute declaration} provides the attribute declaration itself, * which will in turn determine the simple type definition used. */ public XSAttributeDeclaration getAttrDeclaration() { return fAttrDecl; } /** * Value Constraint: one of default, fixed. */ public short getConstraintType() { return fConstraintType; } /** * Value Constraint: The actual value (with respect to the {type * definition}). */ public String getConstraintValue() { // REVISIT: SCAPI: what's the proper representation return getConstraintType() == XSConstants.VC_NONE ? null : fDefault.stringValue(); } /** * @see org.apache.xerces.xs.XSObject#getNamespaceItem() */ public XSNamespaceItem getNamespaceItem() { return null; } public Object getActualVC() { return getConstraintType() == XSConstants.VC_NONE ? null : fDefault.actualValue; } public short getActualVCType() { return getConstraintType() == XSConstants.VC_NONE ? XSConstants.UNAVAILABLE_DT : fDefault.actualValueType; } public ShortList getItemValueTypes() { return getConstraintType() == XSConstants.VC_NONE ? null : fDefault.itemValueTypes; } /** * Optional. Annotations. */ public XSObjectList getAnnotations() { return (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST; } } // class XSAttributeUseImpl
[ "yida@caibeike.com" ]
yida@caibeike.com
4ced32e1db2f04cc4124698ec16420c788f9b0f8
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
/src/com/inponsel/android/v2/KomentarBaruLainNews$KomentarAsycTask$7.java
4b7061caceccd81a9ff59bcc27d4d5ccb2c3ddc1
[]
no_license
alexivaner/GadgetX-Android-App
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
26c5866be12da7b89447814c05708636483bf366
refs/heads/master
2022-06-01T09:04:32.347786
2020-04-30T17:43:17
2020-04-30T17:43:17
260,275,241
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.inponsel.android.v2; import android.os.AsyncTask; import android.view.View; import com.inponsel.android.utils.Log; import com.inponsel.android.utils.Util; import com.inponsel.android.utils.Utility; // Referenced classes of package com.inponsel.android.v2: // KomentarBaruLainNews class this._cls1 implements android.view.AsycTask._cls7 { final .execute this$1; public void onClick(View view) { try { cess._mth2(this._cls1.this).limit = 0; cess._mth2(this._cls1.this).urlKomenOld = (new StringBuilder(String.valueOf(Util.BASE_PATH2))).append("komen_news_lain").append(Utility.BASE_FORMAT).append("?lmt=").append(cess._mth2(this._cls1.this).limit).append("&t=").append(cess._mth2(this._cls1.this).t).append("&idusr=").append(cess._mth2(this._cls1.this).str_id_user).append("&bottom_id=").append(cess._mth2(this._cls1.this).bottom_id).toString(); Log.e("urlKomenOld", cess._mth2(this._cls1.this).urlKomenOld); if (android.os.enOld >= 11) { (new (cess._mth2(this._cls1.this))).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new String[0]); return; } } // Misplaced declaration of an exception variable catch (View view) { return; } (new (cess._mth2(this._cls1.this))).execute(new String[0]); return; } () { this$1 = this._cls1.this; super(); } }
[ "hutomoivan@gmail.com" ]
hutomoivan@gmail.com
936278eecfd3049c2342ec9c7ee02bfeeb862c7e
9ed51c91154e25c5533a9e1ca09323aa0e286cd1
/src/main/java/com/teamium/enums/CustomerDomainType.java
a8082362fe7a186762a72c9a58e850a961e585d8
[]
no_license
Arpitvarshney29/Teamium
89274df6dce311557eaa8031914321bba0747f90
1f9e12d47e23f638f5d55a67c8f21093392bc630
refs/heads/master
2022-07-07T12:09:26.478632
2020-03-02T07:13:08
2020-03-02T07:13:08
244,298,607
0
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
package com.teamium.enums; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import com.teamium.exception.UnprocessableEntityException; public enum CustomerDomainType { AGENCY("AGENCY"), FEDERAL("FEDERAL"), MOBILE_UNIT("MOBILE UNIT"), RADIO("RADIO"),SECURITY("SECURITY"),STUDIO("STUDIO"),TELEVISION("TELEVISION"); private String domainType; /** * @param documentType */ private CustomerDomainType(String domainType) { this.domainType = domainType; } /** * @return the domainType */ public String getDomainType() { return domainType; } /** * Method to get the enum * * @param value * the String enum value * * @return the DocumentType */ public static CustomerDomainType getEnum(String value) { for (CustomerDomainType v : values()) { if (v.getDomainType().equalsIgnoreCase(value)) { return v; } } throw new UnprocessableEntityException("Invalid category " + value); } /** * Method check if enum has value or not * * @param value * the String enum value * * @return the DocumentType */ public static boolean hasEnum(String value) { for (CustomerDomainType v : values()) { if (v.getDomainType().equalsIgnoreCase(value)) { return true; } } return false; } /** * To get document type list * * @return document type list */ public static List<String> getDomainTypes() { return Stream.of(values()).map(v -> v.getDomainType()) .sorted((doc1, doc2) -> doc1.toLowerCase().compareTo(doc2.toLowerCase())).collect(Collectors.toList()); } }
[ "nishant.kumar@wittybrains.com" ]
nishant.kumar@wittybrains.com
c0be0ccab155a37259deb4e72fed2c03ee4d123e
b88ef9dcbd9468de66111ca3cfed990ca7da371d
/uk.ac.gda.epics/src/gda/device/detector/analyser/EpicsMCAAdc.java
9ae4d065f9161ff8cd6c7883120d70c730f6eef7
[]
no_license
jjkraken/gda-epics
8855d4ad370f3ffd4ee553e271e87dcfa810687e
d8a74385d684c1aecc671f29f098084ac721b175
refs/heads/master
2021-01-01T17:43:21.807812
2013-04-08T07:51:49
2013-04-08T07:51:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,534
java
/*- * Copyright © 2009 Diamond Light Source Ltd. * * This file is part of GDA. * * GDA is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License version 3 as published by the Free * Software Foundation. * * GDA 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 GDA. If not, see <http://www.gnu.org/licenses/>. */ package gda.device.detector.analyser; import java.io.Serializable; /** * EpicsMCAAdc Class */ public class EpicsMCAAdc implements Serializable { private long gain; private long offset; private long lld; /** * Constructor. * * @param gain * @param offset * @param lld */ public EpicsMCAAdc(long gain, long offset, long lld) { this.gain = gain; this.offset = offset; this.lld = lld; } /** * @return gain */ public long getGain() { return gain; } /** * @param gain */ public void setGain(long gain) { this.gain = gain; } /** * @return lld */ public long getLld() { return lld; } /** * @param lld */ public void setLld(long lld) { this.lld = lld; } /** * @return offset */ public long getOffset() { return offset; } /** * @param offset */ public void setOffset(long offset) { this.offset = offset; } }
[ "dag-group@diamond.ac.uk" ]
dag-group@diamond.ac.uk
b1f18af39a7d9ca48beb9a48aa8e75485a7f9c8c
94f6ddb959fe1b1929f82f5a9a38dc0bc2dc7651
/src/main/java/com/scalable/c3split/excep/NotSupportedException.java
c4e02c7365265d617d4d99ee9acf96592547bb5d
[]
no_license
IThawk/scalable-service-demo
d9c4fa50370acb31ecc86ee91bc780140401187e
c39beeb4a5c46e3017af1e906647ed4ad349188a
refs/heads/master
2020-05-25T09:29:43.775115
2018-11-28T12:14:06
2018-11-28T12:14:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
689
java
package com.scalable.c3split.excep; public class NotSupportedException extends RuntimeException { private static final long serialVersionUID = 1L; public NotSupportedException() { super("Api not supported by dbsplit framework."); } public NotSupportedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } public NotSupportedException(String message, Throwable cause) { super(message, cause); } public NotSupportedException(String message) { super(message); } public NotSupportedException(Throwable cause) { super(cause); } }
[ "youtong82@163.com" ]
youtong82@163.com
489d7153a5c92b1c9116250994b07b48bf594358
06b6bd13779bf66ec1fc2f7fe1c0fc6f937082f4
/src/test/java/com/fjd/spring/ioc/HelloWorld.java
695f4b7d85e387ad37f766b6a42192784e0e16ea
[]
no_license
fanjingdan012/simple-spring-mvc
5842e8be999ccb00e99b90911d643d3a990f425a
f0d159cf663cbe67997f9888b492ce1d733d7abe
refs/heads/master
2020-05-14T15:11:41.451086
2019-04-18T04:12:50
2019-04-18T04:12:50
181,847,681
0
0
null
null
null
null
UTF-8
Java
false
false
156
java
package com.fjd.spring.ioc; public class HelloWorld { private String msg = "Hello World!"; public String sayHello() { return msg; } }
[ "judy.fan@sap.com" ]
judy.fan@sap.com
0bb506b198cccd817fbe85e627104ab39a04e8d6
7c88e6cd7c2604a9bfebd197a9f192bdddfbcb7c
/Java/src/main/java/Advanced/Concurrent/Thread/ScheduleThreadExecutorDemo.java
ccb8b1107a9416879b1def703219780d33083b2c
[]
no_license
fcy-nienan/Image
1bca0a42085d681f73f41420a242e2c4b542f0e7
168bc4b5a50d5887693ac4ac44bbee3447e84105
refs/heads/develop
2022-12-24T04:33:53.026049
2022-07-27T16:31:10
2022-07-27T16:31:10
154,528,986
0
0
null
2022-12-16T01:43:43
2018-10-24T15:56:29
Java
UTF-8
Java
false
false
1,152
java
package Advanced.Concurrent.Thread; import java.util.Date; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; /** * @descripiton: * @author: fcy * @date: 2018-08-27 12:31 * * java原生定时器 * delay 刚启动的时候等待多久才开始执行 * period 多久执行一次 * * */ public class ScheduleThreadExecutorDemo { public static void main(String args[]) { // testScheduleThread(); testTimer(); } public static void testScheduleThread(){ ScheduledThreadPoolExecutor executor=new ScheduledThreadPoolExecutor(3); executor.scheduleAtFixedRate(new Runnable() { @Override public void run() { System.out.println("log"+new Date()); } },0,3000,TimeUnit.MILLISECONDS); } public static void testTimer(){ Timer timer=new Timer(); timer.schedule(new TimerTask() { @Override public void run() { System.out.println("kk"+new Date()); } },3000,3000); } }
[ "807715333@qq.com" ]
807715333@qq.com
52b777432a1c4f16412dbb618243ddd4bc1766e5
5858d0e30915568ebddfcac41f6a308a1fd38233
/smarthome-web_lqh/src/main/java/com/biencloud/smarthome/web/wsclient/stub/DeleteComponent.java
b56eb66ac562eef54a43f140cef4b9c5175ba216
[]
no_license
CocoaK/java-project-source
303ad9a75ebf499d4ee95048160cd0a573d9f5ec
609f43b9009fedf124c2feef09e10e0d47c2b4b4
refs/heads/master
2020-03-19T07:34:11.395784
2018-06-05T05:52:30
2018-06-05T05:52:30
136,125,854
0
1
null
null
null
null
UTF-8
Java
false
false
1,347
java
package com.biencloud.smarthome.web.wsclient.stub; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for deleteComponent complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="deleteComponent"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "deleteComponent", propOrder = { "arg0" }) public class DeleteComponent { protected String arg0; /** * Gets the value of the arg0 property. * * @return * possible object is * {@link String } * */ public String getArg0() { return arg0; } /** * Sets the value of the arg0 property. * * @param value * allowed object is * {@link String } * */ public void setArg0(String value) { this.arg0 = value; } }
[ "kyq001@gmail.com" ]
kyq001@gmail.com
3e3ec1635b86f942cd5431c9a8379e201c4aabf3
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/android/bluetooth/BluetoothHeadsetClientCall.java
6b0ab76709af391a9601386d9d2f4f3d3c2a0353
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,545
java
package android.bluetooth; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; import java.util.UUID; public final class BluetoothHeadsetClientCall implements Parcelable { public static final int CALL_STATE_ACTIVE = 0; public static final int CALL_STATE_ALERTING = 3; public static final int CALL_STATE_DIALING = 2; public static final int CALL_STATE_HELD = 1; public static final int CALL_STATE_HELD_BY_RESPONSE_AND_HOLD = 6; public static final int CALL_STATE_INCOMING = 4; public static final int CALL_STATE_TERMINATED = 7; public static final int CALL_STATE_WAITING = 5; public static final Parcelable.Creator<BluetoothHeadsetClientCall> CREATOR = new Parcelable.Creator<BluetoothHeadsetClientCall>() { public BluetoothHeadsetClientCall createFromParcel(Parcel in) { BluetoothHeadsetClientCall bluetoothHeadsetClientCall = new BluetoothHeadsetClientCall((BluetoothDevice) in.readParcelable(null), in.readInt(), UUID.fromString(in.readString()), in.readInt(), in.readString(), in.readInt() == 1, in.readInt() == 1, in.readInt() == 1); return bluetoothHeadsetClientCall; } public BluetoothHeadsetClientCall[] newArray(int size) { return new BluetoothHeadsetClientCall[size]; } }; private final long mCreationElapsedMilli; private final BluetoothDevice mDevice; private final int mId; private final boolean mInBandRing; private boolean mMultiParty; private String mNumber; private final boolean mOutgoing; private int mState; private final UUID mUUID; public BluetoothHeadsetClientCall(BluetoothDevice device, int id, int state, String number, boolean multiParty, boolean outgoing, boolean inBandRing) { this(device, id, UUID.randomUUID(), state, number, multiParty, outgoing, inBandRing); } public BluetoothHeadsetClientCall(BluetoothDevice device, int id, UUID uuid, int state, String number, boolean multiParty, boolean outgoing, boolean inBandRing) { this.mDevice = device; this.mId = id; this.mUUID = uuid; this.mState = state; this.mNumber = number != null ? number : ""; this.mMultiParty = multiParty; this.mOutgoing = outgoing; this.mInBandRing = inBandRing; this.mCreationElapsedMilli = SystemClock.elapsedRealtime(); } public void setState(int state) { this.mState = state; } public void setNumber(String number) { this.mNumber = number; } public void setMultiParty(boolean multiParty) { this.mMultiParty = multiParty; } public BluetoothDevice getDevice() { return this.mDevice; } public int getId() { return this.mId; } public UUID getUUID() { return this.mUUID; } public int getState() { return this.mState; } public String getNumber() { return this.mNumber; } public long getCreationElapsedMilli() { return this.mCreationElapsedMilli; } public boolean isMultiParty() { return this.mMultiParty; } public boolean isOutgoing() { return this.mOutgoing; } public boolean isInBandRing() { return this.mInBandRing; } public String toString() { return toString(false); } public String toString(boolean loggable) { StringBuilder builder = new StringBuilder("BluetoothHeadsetClientCall{mDevice: "); builder.append(loggable ? this.mDevice : Integer.valueOf(this.mDevice.hashCode())); builder.append(", mId: "); builder.append(this.mId); builder.append(", mUUID: "); builder.append(this.mUUID); builder.append(", mState: "); switch (this.mState) { case 0: builder.append("ACTIVE"); break; case 1: builder.append("HELD"); break; case 2: builder.append("DIALING"); break; case 3: builder.append("ALERTING"); break; case 4: builder.append("INCOMING"); break; case 5: builder.append("WAITING"); break; case 6: builder.append("HELD_BY_RESPONSE_AND_HOLD"); break; case 7: builder.append("TERMINATED"); break; default: builder.append(this.mState); break; } builder.append(", mNumber: "); builder.append(loggable ? this.mNumber : Integer.valueOf(this.mNumber.hashCode())); builder.append(", mMultiParty: "); builder.append(this.mMultiParty); builder.append(", mOutgoing: "); builder.append(this.mOutgoing); builder.append(", mInBandRing: "); builder.append(this.mInBandRing); builder.append("}"); return builder.toString(); } public void writeToParcel(Parcel out, int flags) { out.writeParcelable(this.mDevice, 0); out.writeInt(this.mId); out.writeString(this.mUUID.toString()); out.writeInt(this.mState); out.writeString(this.mNumber); out.writeInt(this.mMultiParty ? 1 : 0); out.writeInt(this.mOutgoing ? 1 : 0); out.writeInt(this.mInBandRing ? 1 : 0); } public int describeContents() { return 0; } }
[ "dstmath@163.com" ]
dstmath@163.com
189e9fcee13c07b394f60be6e4ad9172be090b69
47761f5843a42ec5ce4b0e4a5ab23579e8c44959
/src/main/java/com/geniisys/claims/reports/controller/PrintPremWarrLetterController.java
cef87ea3e7aec3c8ae6e9e1680c3dc10e0efa503
[]
no_license
jabautista/GeniisysSCA
df6171c27594638193949df1a65c679444d51b9f
6dc1b21386453240f0632f37f00344df07f6bedd
refs/heads/development
2021-01-19T20:54:11.936774
2017-04-20T02:05:41
2017-04-20T02:05:41
88,571,440
2
0
null
2017-08-02T01:48:59
2017-04-18T02:18:03
PLSQL
UTF-8
Java
false
false
4,094
java
package com.geniisys.claims.reports.controller; import java.io.IOException; import java.math.BigDecimal; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import net.sf.jasperreports.engine.JRException; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.springframework.context.ApplicationContext; import com.geniisys.common.entity.GIISUser; import com.geniisys.common.service.GIISParameterService; import com.geniisys.common.service.GIISReportsService; import com.geniisys.framework.util.ApplicationWideParameters; import com.geniisys.framework.util.BaseController; import com.seer.framework.util.ApplicationContextReader; @WebServlet (name="PrintPremWarrLetterController", urlPatterns="/PrintPremWarrLetterController") public class PrintPremWarrLetterController extends BaseController{ private Logger log = Logger.getLogger(PrintPreliminaryLossAdviceController.class); private static final long serialVersionUID = 1L; @Override public void doProcessing(HttpServletRequest request, HttpServletResponse response, GIISUser USER, String ACTION, HttpSession SESSION) throws ServletException, IOException { ApplicationContext APPLICATION_CONTEXT = ApplicationContextReader.getServletContext(getServletContext()); ApplicationWideParameters reportParam = (ApplicationWideParameters) APPLICATION_CONTEXT.getBean("appWideParams"); GIISReportsService reportsService = (GIISReportsService) APPLICATION_CONTEXT.getBean("giisReportsService"); message = "SUCCESS"; try{ Map<String, Object> params = new HashMap<String, Object> (); String reportDir = null; if("populateGiclr010".equals(ACTION)){ String reportId = "GICLR010"; String reportFont = reportParam.getDefaultReportFont(); String reportVersion = reportsService.getReportVersion("GICLR010"); String reportName = StringUtils.isEmpty(reportVersion) ? reportId : reportId+"_"+reportVersion; GIISParameterService giisParameterService = (GIISParameterService) APPLICATION_CONTEXT.getBean("giisParameterService"); reportDir = giisParameterService.getParamValueV2("CONFIG_DOC_PATH_CL"); String filename = "GICLR010-" + request.getParameter("claimNo"); log.info("CREATING REPORT : "+reportName); params.put("P_POLICY_ID", "".equals(request.getParameter("policyId")) ? null :Integer.parseInt(request.getParameter("policyId"))); params.put("P_CLAIM_ID", "".equals(request.getParameter("claimId")) ? null :Integer.parseInt(request.getParameter("claimId"))); params.put("P_ADDRESS1", request.getParameter("address1")); params.put("P_ADDRESS2", request.getParameter("address2")); params.put("P_ADDRESS3", request.getParameter("address3")); params.put("P_ATTENTION", request.getParameter("attention")); params.put("P_FILE_DATE", request.getParameter("clmFileDate")); params.put("P_BAL_AMT_DUE", "".equals(request.getParameter("balanceAmtDue")) ? null :new BigDecimal(request.getParameter("balanceAmtDue"))); params.put("P_FONT_SW", reportFont); params.put("P_USER_NAME", USER.getUsername()); params.put("MAIN_REPORT", reportName+".jasper"); params.put("OUTPUT_REPORT_FILENAME", filename); params.put("reportName", reportName); log.info("GICLR010 parmeters : "+params); } this.doPrintReport(request, response, params, reportDir); } catch (JRException e){ this.setPrintErrorMessage(request, USER, e); this.doDispatch(request, response, PAGE); } catch (SQLException e){ this.setPrintErrorMessage(request, USER, e); this.doDispatch(request, response, PAGE); } catch (IOException e) { this.setPrintErrorMessage(request, USER, e); this.doDispatch(request, response, PAGE); } catch (Exception e) { this.setPrintErrorMessage(request, USER, e); this.doDispatch(request, response, PAGE); } } }
[ "jeromecris.bautista@gmail.com" ]
jeromecris.bautista@gmail.com
5c5c2f682ed0fc7d627600396e35d9482c76fde9
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/131/029/CWE191_Integer_Underflow__byte_console_readLine_multiply_53a.java
7a4ead5f2cc4f14177c8633b397dbe79aef35eb8
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
5,763
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__byte_console_readLine_multiply_53a.java Label Definition File: CWE191_Integer_Underflow.label.xml Template File: sources-sinks-53a.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: console_readLine Read data from the console using readLine * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: multiply * GoodSink: Ensure there will not be an underflow before multiplying data by 2 * BadSink : If data is negative, multiply by 2, which can cause an underflow * Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package * * */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.logging.Level; public class CWE191_Integer_Underflow__byte_console_readLine_multiply_53a extends AbstractTestCase { public void bad() throws Throwable { byte data; /* init data */ data = -1; /* POTENTIAL FLAW: Read data from console with readLine*/ BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(System.in, "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); String stringNumber = readerBuffered.readLine(); if (stringNumber != null) { data = Byte.parseByte(stringNumber.trim()); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } catch (NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Error with number parsing", exceptNumberFormat); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } finally { try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } } } (new CWE191_Integer_Underflow__byte_console_readLine_multiply_53b()).badSink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { byte data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE191_Integer_Underflow__byte_console_readLine_multiply_53b()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { byte data; /* init data */ data = -1; /* POTENTIAL FLAW: Read data from console with readLine*/ BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(System.in, "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); String stringNumber = readerBuffered.readLine(); if (stringNumber != null) { data = Byte.parseByte(stringNumber.trim()); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } catch (NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Error with number parsing", exceptNumberFormat); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } finally { try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } } } (new CWE191_Integer_Underflow__byte_console_readLine_multiply_53b()).goodB2GSink(data ); } /* 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); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
174c7073eb7ea4e4773c629349283319296b48a6
de5f79c4bea4073aa0e0afd40c881b3f4df8ece8
/mysite/src/com/sxjun/site/controller/service/CommonService.java
7f92b4bc7e7dc35ee008d7f2d6eaf1c13b658af4
[]
no_license
sxjun1904/mysite
5773aef003c896d40c9666fe6454678998952656
601797ac2a0ae24c8dca290dde2be77f595090e3
refs/heads/master
2021-01-22T01:33:22.469754
2014-05-25T00:50:02
2014-05-25T00:50:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package com.sxjun.site.controller.service; import java.util.List; import com.sxjun.core.plugin.redis.RedisKit; public class CommonService<T> { public void put(String tablename,String id,T t ){ RedisKit.put(tablename, id, t); } public void remove(String tablename, String id) { RedisKit.remove(tablename, id); } public <T> T get(String tablename, String id) { return RedisKit.get(tablename, id); } public List<T> getObjs(String t) { return RedisKit.getObjs(t); } public void lpush(String cacheName, String pinyin,String hanzi){ RedisKit.lpush(cacheName, pinyin, hanzi); } public void ltrim(String cacheName, String pinyin,long start,long end){ RedisKit.ltrim(cacheName, pinyin, start, end); } public List<String> lrange(String cacheName, String pinyin,int start,int end){ return RedisKit.lrange(cacheName, pinyin, start,end); } }
[ "sxjun1904@qq.com" ]
sxjun1904@qq.com
c85ef6dc7461ef4ad2e50bfbe26eb8e554986c19
5f11cd3f0d7c85d2676d8ca4bf97940abd6d9849
/src/sys/com/coco/sys/web/SysController.java
b7519370877628be4502749a445fcb4b50ee6845
[]
no_license
112067416/Sino
e479c945914875243f8b7de10c8826a3f2cff7bf
167b85c81911ea6954b5d2698832f6ad1f412d8d
refs/heads/master
2020-04-22T02:21:40.768749
2015-05-06T06:41:45
2015-05-06T06:41:45
35,143,663
1
0
null
null
null
null
UTF-8
Java
false
false
6,354
java
package com.coco.sys.web; import java.text.SimpleDateFormat; import javax.servlet.http.HttpServletRequest; import org.dom4j.Document; 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 org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.coco.core.bean.Result; import com.coco.core.env.Config; import com.coco.core.env.Context; import com.coco.core.env.Helper; import com.coco.core.env.Init; import com.coco.sys.auth.User; import com.coco.sys.bo.api.IAuth; import com.coco.sys.bo.api.IMenuBO; import com.coco.sys.bo.api.IPostBO; import com.quanta.sino.cmn.bo.api.IBanBO; /** * 系统管理控制器 * * @author 许德建[xudejian@126.com] */ @Controller public class SysController { @Autowired private IAuth auth; @Autowired private IMenuBO menuBo; @Autowired private IPostBO postBo; @Autowired private IBanBO banBO; private SimpleDateFormat sdf = new SimpleDateFormat( "yyyy年MM月dd日 HH:mm:ss EEE"); public void setAuth(IAuth auth) { this.auth = auth; } public void setMenuBo(IMenuBO menuBo) { this.menuBo = menuBo; } public void setPostBo(IPostBO postBo) { this.postBo = postBo; } public void setBanBO(IBanBO banBO) { this.banBO = banBO; } public SysController() { } @RequestMapping(value = "/index", method = RequestMethod.GET) public String index(HttpServletRequest request, Model model) { User user = (User) Context.getUser(request); if (user == null) { return "login"; } model.addAttribute("shift", banBO.getBan()); if (Config.isAdmin(user.getId())) { model.addAttribute("isAdmin", Boolean.TRUE); return "index"; } if (user.getCurrentPost() != null) { model.addAttribute("singlePost", user.getPostIds().size() == 1); return "index"; } if (user.getPostIds() == null || user.getPostIds().isEmpty()) { request.getSession().invalidate(); model.addAttribute("result", new Result(-1, "该用户没有分配岗位")); return "global/error"; } model.addAttribute("posts", postBo.find(user.getPostIds())); model.addAttribute("postId", user.getPostIds().get(0)); return "changePost"; } @RequestMapping(value = "/toChangePost", method = RequestMethod.GET) public String toChangePost(HttpServletRequest request, Model model) { User user = (User) Context.getUser(request); if (user == null) { return "login"; } model.addAttribute("posts", postBo.find(user.getPostIds())); if (user.getCurrentPost() != null) { model.addAttribute("postId", user.getCurrentPost()); } else { model.addAttribute("postId", user.getPostIds().get(0)); } return "changePost"; } @RequestMapping(value = "/changePost", method = RequestMethod.POST) public String changePost(String postId, HttpServletRequest request, Model model) { User user = (User) Context.getUser(request); if (user == null) { return "login"; } if (user.getPostIds() == null || user.getPostIds().isEmpty()) { request.getSession().invalidate(); model.addAttribute("result", new Result(-1, "该用户没有分配岗位")); return "global/error"; } if (!user.getPostIds().contains(postId)) { request.getSession().invalidate(); model.addAttribute("result", new Result(-1, "该用户没有分配该岗位")); return "global/error"; } auth.changePost(request, postId); return "index"; } @RequestMapping(value = "/login", method = RequestMethod.GET) public String login(boolean init) { if (init) { Helper.getBean(Init.class).init(new String[] { "init/COCO_MENU.sql", "init/COCO_SYS.sql" }); } return "login"; } @RequestMapping(value = "/login!ajax", method = RequestMethod.POST) public @ResponseBody String login(String userId, String password, HttpServletRequest request) { try { auth.signIn(userId, password, request); return Result.SUCCESS; } catch (Exception e) { return new Result(-1, e.getMessage()).toString(); } } @RequestMapping(value = "/login!form", method = RequestMethod.POST) public String login(String userId, String password, HttpServletRequest request, Model model) { try { auth.signIn(userId, password, request); return index(request, model); } catch (Exception e) { model.addAttribute("message", e.getMessage()); return "login"; } } @RequestMapping(value = "/logout", method = RequestMethod.GET) public String logout(HttpServletRequest request) { auth.signOut(request); return "login"; } @RequestMapping(value = "/sys/data/init", method = { RequestMethod.GET, RequestMethod.POST }) public String init(String[] tables, Model model, boolean loaded) { Init init = Helper.getBean(Init.class); if (tables != null && tables.length > 0) { init.init(tables); model.addAttribute("msg", "初始化完毕"); } else if (loaded) { model.addAttribute("msg", "至少要选择一条记录"); } model.addAttribute("modules", init.getModules()); return "init"; } @RequestMapping(value = "/desktop", method = RequestMethod.GET) public String desktop() { return "desktop"; } @RequestMapping("/tree") public @ResponseBody Document tree(HttpServletRequest request) { User user = (User) Context.getUser(request); if (Config.isAdmin(user.getId())) { return menuBo.tree(true); } return menuBo.treeByRoles(user.getRoleIds()); } /** * <p> * 设定班别和组别 * </p> * * @param group * @param shift * @return String */ @RequestMapping(value = "/config", method = RequestMethod.POST) public @ResponseBody String config(String group, String shift, HttpServletRequest request) { User user = (User) Context.getUser(request); user.setGroup(group); user.setShift(shift); return Result.SUCCESS; } /** * <p> * 当前时间 * </p> * * @return String */ @RequestMapping(value = "/currTime", method = RequestMethod.GET) public @ResponseBody String currTime() { return sdf.format(new java.util.Date()); } }
[ "112067416@qq.com" ]
112067416@qq.com
b62c3b210d68aa6d93608ae414eacc82a527a82a
22cd38be8bf986427361079a2f995f7f0c1edeab
/src/main/java/core/erp/pdm/web/PDMA0010Controller.java
feb887e8a33b549cf9a62ab786c22b3675cdbabf
[]
no_license
shaorin62/MIS
97f51df344ab303c85acb2e7f90bb69944f85e0f
a188b02a73f668948246c133cd202fe091aa29c7
refs/heads/master
2021-04-05T23:46:52.422434
2018-03-09T06:41:04
2018-03-09T06:41:04
124,497,033
0
0
null
null
null
null
UTF-8
Java
false
false
3,211
java
/** * core.erp.tmm.web.PDMA0010Controller.java - <Created by Code Template generator> */ package core.erp.pdm.web; import java.util.Map; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import core.erp.pdm.service.PDMA0010Service; import core.ifw.cmm.request.CoreRequest; import core.ifw.cmm.result.CoreResultData; /** * <pre> * PDMA0010Controller - 계약서 파일관리 * </pre> * * @author 오세훈 * @since 2016.09.20 * @version 1.0 * * <pre> * == Modification Information == * Date Modifier Comment * ==================================================== * 2016.09.20 오세훈 Initial Created. * ==================================================== * </pre> * * Copyright JNF Communication.(C) All right reserved. */ @Controller public class PDMA0010Controller { /** * Logger init. */ private static final Logger logger = LoggerFactory.getLogger(PDMA0010Controller.class); /** * 제작업종분류관리 메뉴 서비스 클래스 */ @Resource(name="PDMA0010Service") private PDMA0010Service service; /** * 제작 계약서 화면 상단 계약서를 조회한다. * @param param - 조회할 정보가 담긴 Map 객체 * @return "/PDMA0010/SEARCH00" * @exception Exception - 조회시 발생한 예외 */ @RequestMapping(value = "/core/erp/pdm/PDMA0010_SEARCH00.do") @SuppressWarnings("rawtypes") public ModelAndView processSEARCH00(CoreRequest coreRequest, ModelMap model) throws Exception { ModelAndView mav = new ModelAndView("coreReturnView"); CoreResultData coreResultData = new CoreResultData(coreRequest.getCALL_TYPE()); try { Map searchVo = coreRequest.getMapVariableList(); logger.info("searchVo : " + searchVo.toString()); coreResultData.setReturnDataMap((Map<String, Object>) service.processSEARCH00(searchVo)); coreResultData.setResultMessageSuccessSelect(); } catch(Exception e) { logger.error("processSEARCH00 : " + e.getMessage()); coreResultData.setResultMessageFailSelect(e); } mav.addObject("FORM_DATA", coreResultData); return mav; } /** * <pre> * 제작 계약서파일관리 데이터를 저장및 수정한다. * </pre> * * @param param - 저장, 수정 또는 삭제할 자료 * @return 처리 건수 * @exception Exception - 처리 시 발생한 예외 */ @RequestMapping(value = "core/erp/pdm/PDMA0010_SAVE00.do") @SuppressWarnings("rawtypes") public ModelAndView processSAVE00(CoreRequest coreRequest, ModelMap model) throws Exception { ModelAndView mav = new ModelAndView("coreReturnView"); CoreResultData coreResultData = new CoreResultData(coreRequest.getCALL_TYPE()); try { service.processSAVE00(coreRequest.getSaveDataSetAll()); coreResultData.setResultMessageSuccessSave(); } catch(Exception e) { logger.error("processSAVE00 : " + e.getMessage()); coreResultData.setResultMessageFailSave(e); } mav.addObject("FORM_DATA", coreResultData); return mav; } }
[ "imosh@nate.com" ]
imosh@nate.com
f4c49ed643e261f87c0293ce82ea2041b2935ae9
62b27ffb9d320335d5149ecfb97642ce9cf60a53
/library/src/main/java/edu/nf/library/entity/BookType.java
d06b855fed5c76bb387d73bfac9e07f71349bc98
[]
no_license
twx31420/s3s160-2
51035103f7c17ac6d46d1b35bf2961db4f90498d
d2ed1ffbbd983b611d643c220711c4027a6705c0
refs/heads/master
2023-02-26T09:27:19.904797
2021-02-03T05:47:51
2021-02-03T05:47:51
335,522,718
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package edu.nf.library.entity; import lombok.AllArgsConstructor; import lombok.Data; /** * @author 天文学 * @date 2020/12/27 */ @Data @AllArgsConstructor public class BookType { private Integer typeId; private String typeName; }
[ "3073239759@qq.com" ]
3073239759@qq.com
e0a4d61478f95ac140da66089c43c7a14bbe32ad
56e6e9ca3a99c02eef87c76d85811a99c4f85f39
/local/in/dhis-web-maintenance-pbf/src/main/java/org/hisp/dhis/pbf/api/LookupService.java
e2fd7281b0c68e1e4b73f8648eedfad7c67305bf
[ "BSD-3-Clause" ]
permissive
hispindia/HARYANA-2.20
12250fe8ca3263f08170b06ef91e88e21ab24bf9
be1daf743d339c221890b1ba9100b380f5ce7bc4
refs/heads/master
2021-01-22T20:18:46.650489
2017-03-21T11:11:29
2017-03-21T11:11:29
85,308,624
0
0
null
null
null
null
UTF-8
Java
false
false
779
java
package org.hisp.dhis.pbf.api; import java.util.Collection; import java.util.List; public interface LookupService { String ID = LookupService.class.getName(); // ------------------------------------------------------------------------- // Lookup // ------------------------------------------------------------------------- void addLookup( Lookup lookup ); void updateLookup( Lookup lookup ); void deleteLookup( Lookup lookup ); Lookup getLookup( int id ); Lookup getLookupByName( String name ); Collection<Lookup> getAllLookupsByType( String type ); Collection<Lookup> getAllLookups(); Collection<Lookup> getAllLookupsSortByType(); void searchLookupByName( List<Lookup> lookups, String key ); }
[ "mithilesh.hisp@gmail.com" ]
mithilesh.hisp@gmail.com
994eb96004d08848001a2d58ac969391e37b8f6d
fbd43bd37149a8ea548af6c2948bcde11c450669
/src/main/java/com/vaadin/addon/charts/model/Bottom.java
9b7485a6eb41fb1fe1926a3ebc757f92f978ec50
[ "Apache-2.0" ]
permissive
EqualInformation/dashboard-demo-1
58845d29daea6ff8a6e0cf520f6ea0732a3ff7d0
ef5fd5c6d3bf46a7e77988ef97540e98a7db7c3d
refs/heads/master
2021-01-10T17:15:46.710328
2015-12-26T06:29:56
2015-12-26T06:29:56
48,572,780
0
1
null
null
null
null
UTF-8
Java
false
false
1,165
java
package com.vaadin.addon.charts.model; /* * #%L * Vaadin Charts * %% * Copyright (C) 2012 - 2015 Vaadin Ltd * %% * This program is available under Commercial Vaadin Add-On License 3.0 * (CVALv3). * * See the file licensing.txt distributed with this software for more * information about licensing. * * You should have received a copy of the CVALv3 along with this program. * If not, see <https://vaadin.com/license/cval-3>. * #L% */ import com.vaadin.addon.charts.model.style.Color; /** * The bottom of the frame around a 3D chart. */ public class Bottom extends AbstractConfigurationObject { private static final long serialVersionUID = 1L; private Color color; private Number size; public Bottom() { } /** * @see #setColor(Color) */ public Color getColor() { return color; } /** * The color of the panel. * <p> * Defaults to: transparent */ public void setColor(Color color) { this.color = color; } /** * @see #setSize(Number) */ public Number getSize() { return size; } /** * The thickness of the panel. * <p> * Defaults to: 1 */ public void setSize(Number size) { this.size = size; } }
[ "bpupadhyaya@gmail.com" ]
bpupadhyaya@gmail.com
e4aa5add8b67344aa3a455bfeb972a2849cca8b0
d31fbb5111970b10f6f8b3128cb800d9f45e9e53
/api/src/main/java/org/commonjava/emb/PluginGoal.java
14354597c8e87ba59314683ac48f1a3d352fd874
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
jdcasey/EMB
7ec2e735930e9de201fff9547e5f278676894b40
66b3496aec9a06ab9eb0ad1044ed2c5ddb7f96c0
refs/heads/master
2023-03-19T02:48:21.306187
2011-05-17T00:08:31
2011-05-17T00:08:31
640,512
1
1
null
null
null
null
UTF-8
Java
false
false
2,538
java
/* * Copyright 2010 Red Hat, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.commonjava.emb; public class PluginGoal { private final String groupId; private final String artifactId; private final String version; private final String pluginPrefix; private final String goal; public PluginGoal( final String groupId, final String artifactId, final String version, final String goal ) { pluginPrefix = null; this.groupId = groupId; this.artifactId = artifactId; this.version = version; this.goal = goal; } public PluginGoal( final String groupId, final String artifactId, final String goal ) { pluginPrefix = null; this.groupId = groupId; this.artifactId = artifactId; version = null; this.goal = goal; } public PluginGoal( final String pluginPrefix, final String goal ) { this.pluginPrefix = pluginPrefix; groupId = null; artifactId = null; version = null; this.goal = goal; } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getVersion() { return version; } public String getPluginPrefix() { return pluginPrefix; } public String getGoal() { return goal; } public String formatCliGoal() { final StringBuilder sb = new StringBuilder(); if ( pluginPrefix != null ) { sb.append( pluginPrefix ); } else { sb.append( groupId ).append( ':' ).append( artifactId ); if ( version != null ) { sb.append( ':' ).append( version ); } } sb.append( ':' ).append( goal ); return sb.toString(); } @Override public String toString() { return "Plugin+Goal: " + formatCliGoal(); } }
[ "jdcasey@commonjava.org" ]
jdcasey@commonjava.org
0794fcc959fe892fcf540a272f2fe61c9ae75b77
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a080/A080629Test.java
c6b059c357dfb2db78756f5ac3bd85f4dea2fc7b
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a080; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A080629Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
42d80a2ed1204cf112a520238ac805309deb1182
f3d1fa8c5fc232d45853a561bdeb267c146f7f8d
/RedHeart-System/src/main/java/com/sinothk/redheart/service/impl/NoticeServiceImpl.java
6a4e9cd57276b37d774f5a851781d50a66e36e2d
[]
no_license
sinothk/RedHeart
cf623ac12516249f4ffefbd859e8dd848060b067
0dc616c1939e10e89b041e10746e0d6b815036dd
refs/heads/master
2022-02-22T18:28:06.156043
2020-07-24T07:14:39
2020-07-24T07:14:39
204,893,106
0
0
null
2022-02-09T22:18:17
2019-08-28T09:14:54
Java
UTF-8
Java
false
false
3,820
java
package com.sinothk.redheart.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.sinothk.base.entity.PageData; import com.sinothk.base.entity.ResultData; import com.sinothk.redheart.domain.*; import com.sinothk.redheart.repository.NoticeMapper; import com.sinothk.redheart.repository.NoticeReaderMapper; import com.sinothk.redheart.service.NoticeService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.Date; import java.util.List; @Service("noticeService") public class NoticeServiceImpl implements NoticeService { @Resource(name = "noticeMapper") private NoticeMapper noticeMapper; @Resource(name = "noticeReaderMapper") private NoticeReaderMapper noticeReaderMapper; @Override public ResultData<Boolean> add(NoticeEntity noticeEntity) { try { noticeMapper.insert(noticeEntity); return ResultData.success(true); } catch (Exception e) { return ResultData.error(e.getCause().getMessage()); } } @Override public ResultData<PageData<NoticeAo>> getAllNoticeList(Long account, int pageNum, int pageSize) { try { Page<NoticeAo> pageVo = new Page<>(pageNum, pageSize); IPage<NoticeAo> pageInfo = noticeMapper.getAllNoticeList(pageVo, account); PageData<NoticeAo> pageEntity = new PageData<>(); pageEntity.setPageSize(pageSize); pageEntity.setPageNum(pageNum); pageEntity.setData(pageInfo.getRecords()); pageEntity.setTotal((int) pageInfo.getTotal()); int currSize = pageNum * pageSize; pageEntity.setHasNext(currSize < pageInfo.getTotal()); return ResultData.success(pageEntity); } catch (Exception e) { return ResultData.error(e.getCause().getMessage()); } } @Override public ResultData<PageData<NoticeReaderVo>> getNoticeReaderList(Long noticeId, int pageNum, int pageSize) { try { Page<NoticeReaderVo> pageVo = new Page<>(pageNum, pageSize); IPage<NoticeReaderVo> pageInfo = noticeMapper.getNoticeReaderList(pageVo, noticeId); PageData<NoticeReaderVo> pageEntity = new PageData<>(); pageEntity.setPageSize(pageSize); pageEntity.setPageNum(pageNum); pageEntity.setData(pageInfo.getRecords()); pageEntity.setTotal((int) pageInfo.getTotal()); int currSize = pageNum * pageSize; pageEntity.setHasNext(currSize < pageInfo.getTotal()); return ResultData.success(pageEntity); } catch (Exception e) { return ResultData.error(e.getCause().getMessage()); } } @Override public ResultData<Boolean> addRead(Long noticeId, Long account) { try { QueryWrapper<NoticeReaderEntity> wrapper = new QueryWrapper<>(); wrapper.lambda().eq(NoticeReaderEntity::getNoticeId, noticeId).eq(NoticeReaderEntity::getReaderAccount, account); NoticeReaderEntity noticeReaderDbEntity = noticeReaderMapper.selectOne(wrapper); if (noticeReaderDbEntity == null) { NoticeReaderEntity noticeReaderVo = new NoticeReaderEntity(); noticeReaderVo.setReaderAccount(account); noticeReaderVo.setNoticeId(noticeId); noticeReaderVo.setReadTime(new Date()); noticeReaderMapper.insert(noticeReaderVo); } return ResultData.success(true); } catch (Exception e) { return ResultData.error(e.getCause().getMessage()); } } }
[ "381518188@qq.com" ]
381518188@qq.com
46a0cd40bb73ff81fe7dc01b430903717317fab7
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/p118pd/sdk/C9038ooOoO0oO.java
0ed44171b3202ad994700ea06720d0cc23f9a8fe
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,745
java
package com.p118pd.sdk; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.PrintStream; import java.io.Serializable; import java.security.Key; import javax.crypto.Cipher; import javax.crypto.CipherInputStream; import javax.crypto.spec.SecretKeySpec; /* renamed from: com.pd.sdk.ooOoO0oO reason: case insensitive filesystem */ public class C9038ooOoO0oO { public static final String OooO00o = "DESFileCoder"; /* renamed from: OooO00o reason: collision with other field name */ public Key f22350OooO00o; /* renamed from: OooO00o reason: collision with other field name */ public Cipher f22351OooO00o; public Cipher OooO0O0; public C9038ooOoO0oO(String str) throws Exception { m20690OooO00o(str); OooO00o(); } /* renamed from: OooO00o reason: collision with other method in class */ public void m20690OooO00o(String str) { byte[] bytes = str.getBytes(); byte[] bArr = new byte[8]; int i = 0; while (i < 8 && i < bytes.length) { bArr[i] = bytes[i]; i++; } this.f22350OooO00o = new SecretKeySpec(bArr, "DES"); } private void OooO00o() throws Exception { Cipher instance = Cipher.getInstance("DES"); this.OooO0O0 = instance; instance.init(1, this.f22350OooO00o); Cipher instance2 = Cipher.getInstance("DES"); this.f22351OooO00o = instance2; instance2.init(2, this.f22350OooO00o); } public void OooO00o(Serializable serializable, String str) { OooO00o(new ByteArrayInputStream(OooO00o(serializable)), str); } private byte[] OooO00o(Serializable serializable) { byte[] bArr = new byte[1024]; try { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream); objectOutputStream.writeObject(serializable); bArr = byteArrayOutputStream.toByteArray(); byteArrayOutputStream.close(); objectOutputStream.close(); return bArr; } catch (Exception e) { PrintStream printStream = System.out; printStream.println("translation" + e.getMessage()); e.getMessage(); return bArr; } } public void OooO00o(InputStream inputStream, String str) { if (inputStream == null) { System.out.println("inputstream is null"); return; } try { CipherInputStream cipherInputStream = new CipherInputStream(inputStream, this.OooO0O0); FileOutputStream fileOutputStream = new FileOutputStream(str); byte[] bArr = new byte[1024]; while (true) { int read = cipherInputStream.read(bArr); if (read > 0) { fileOutputStream.write(bArr, 0, read); fileOutputStream.flush(); } else { fileOutputStream.close(); cipherInputStream.close(); inputStream.close(); System.out.println("加密成功"); return; } } } catch (Exception e) { System.out.println("加密失败"); e.getMessage(); } } public void OooO00o(String str, String str2) throws FileNotFoundException { OooO00o(new FileInputStream(str), str2); } public Object OooO00o(InputStream inputStream) { Object obj = null; if (inputStream == null) { System.out.println("inputstream is null"); return null; } try { CipherInputStream cipherInputStream = new CipherInputStream(inputStream, this.f22351OooO00o); BufferedInputStream bufferedInputStream = new BufferedInputStream(cipherInputStream); obj = new ObjectInputStream(bufferedInputStream).readObject(); cipherInputStream.close(); inputStream.close(); bufferedInputStream.close(); System.out.println("解密成功"); return obj; } catch (Exception e) { System.out.println("解密失败"); e.getMessage(); return obj; } } public Object OooO00o(String str) throws Exception { return OooO00o(new FileInputStream(str)); } }
[ "593746220@qq.com" ]
593746220@qq.com
f74dae3c306d7e61b5f2d3e339d6d8d37473c944
8ea714b022437f70739cf1150f2dd6e8425b2b11
/src/main/java/my_own_test_framework/TestClass.java
4577888574be2401218e9fb8d52ef8b13c68cdca
[]
no_license
Jeka1978/tddwebinar
4c87d32f28f7247a059c3771987e78fca514503e
075c65e620ed39bc95b1b00430669c7a0d15d097
refs/heads/master
2021-08-30T20:56:57.942083
2017-12-19T12:15:20
2017-12-19T12:15:20
114,761,449
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
package my_own_test_framework; /** * @author Evgeny Borisov */ public class TestClass { public void test1(){ Assert.assertEquals(2.0, Math.sqrt(4)); System.out.println(1111111); } public void test2() { System.out.println(22222); } public void setUp() { System.out.println(); } }
[ "papakita2009" ]
papakita2009
d40c69d3fe48b3c8159d7b071f0659d80bcc10ce
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_995f5ac12cad1da3df0ef8a029a4d3cdfd20d9bd/CDORepository/23_995f5ac12cad1da3df0ef8a029a4d3cdfd20d9bd_CDORepository_t.java
07b2c24207c369662837a5e6f5c44b1a1de2b0a0
[]
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
7,115
java
/******************************************************************************* * Copyright (c) 2010, 2011 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Obeo - initial API and implementation *******************************************************************************/ package org.eclipse.mylyn.docs.intent.collab.cdo.repository; import java.util.LinkedHashSet; import java.util.Set; import org.eclipse.emf.cdo.net4j.CDONet4jUtil; import org.eclipse.emf.cdo.net4j.CDOSession; import org.eclipse.emf.cdo.net4j.CDOSessionConfiguration; import org.eclipse.emf.ecore.EPackage.Registry; import org.eclipse.mylyn.docs.intent.collab.cdo.adapters.CDOAdapter; import org.eclipse.mylyn.docs.intent.collab.handlers.RepositoryClient; import org.eclipse.mylyn.docs.intent.collab.handlers.adapters.RepositoryAdapter; import org.eclipse.mylyn.docs.intent.collab.handlers.adapters.RepositoryStructurer; import org.eclipse.mylyn.docs.intent.collab.repository.Repository; import org.eclipse.mylyn.docs.intent.collab.repository.RepositoryConnectionException; import org.eclipse.net4j.Net4jUtil; import org.eclipse.net4j.channel.ChannelException; import org.eclipse.net4j.connector.IConnector; import org.eclipse.net4j.tcp.TCPUtil; import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException; import org.eclipse.net4j.util.container.ContainerUtil; import org.eclipse.net4j.util.container.IManagedContainer; /** * Representation of a CDO Repository. * * @author <a href="mailto:alex.lagarde@obeo.fr">Alex Lagarde</a> */ public class CDORepository implements Repository { /** * Connector to the repository. */ private static IConnector connector; /** * Container containing the connection. */ private static IManagedContainer container; /** * SessionConfiguration for the CDO repository (concrete notion). */ private static CDOSessionConfiguration cdoSessionConfiguration; /** * Current session connected to the repository. */ private static CDOSession session; /** * List of the active repositories (while not empty, we can't close the session). */ private static Set<CDORepository> activeRepositories = new LinkedHashSet<CDORepository>(); /** * Configuration of this CDORepository (abstract notion). */ private CDOConfig repositoryConfiguration; /** * Registry containing all the clients currently subscribed to this repository. */ private Set<RepositoryClient> clientRegistry; /** * CDORepository constructor. * * @param configuration * configuration of this CDORepository. */ public CDORepository(CDOConfig configuration) { this.repositoryConfiguration = configuration; this.clientRegistry = new LinkedHashSet<RepositoryClient>(); } /** * {@inheritDoc} * * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#register(org.eclipse.mylyn.docs.intent.collab.handlers.RepositoryClient) */ public void register(RepositoryClient client) { this.clientRegistry.add(client); } /** * {@inheritDoc} * * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#unregister(org.eclipse.mylyn.docs.intent.collab.handlers.RepositoryClient) */ public void unregister(RepositoryClient client) { this.clientRegistry.remove(client); if (this.clientRegistry.isEmpty()) { closeSession(); } } /** * {@inheritDoc} * * @throws RepositoryConnectionException * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#getOrCreateSession() */ public Object getOrCreateSession() throws RepositoryConnectionException { // If no configuration has been created yet if (cdoSessionConfiguration == null) { // We create this configuration container = ContainerUtil.createContainer(); Net4jUtil.prepareContainer(container); // Register Net4j factories TCPUtil.prepareContainer(container); // Register TCP factories CDONet4jUtil.prepareContainer(container); // Register CDO factories container.activate(); // Create connector connector = TCPUtil.getConnector(container, repositoryConfiguration.getServerAdress()); // Create configuration cdoSessionConfiguration = CDONet4jUtil.createSessionConfiguration(); cdoSessionConfiguration.setConnector(connector); cdoSessionConfiguration.setRepositoryName(repositoryConfiguration.getRepositoryName()); } // If no session is currently open if ((session == null) || session.isClosed()) { // Open session try { session = cdoSessionConfiguration.openSession(); } catch (TimeoutRuntimeException tre) { throw new RepositoryConnectionException(tre.getMessage()); } catch (ChannelException ce) { throw new RepositoryConnectionException(ce.getMessage()); } } // We register the current instance as an active repository, as it has openned a section if (!activeRepositories.contains(this)) { activeRepositories.add(this); } return session; } /** * {@inheritDoc} * * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#closeSession() */ public void closeSession() { // We unregister the current instance of the active repositories list activeRepositories.remove(this); // If there is no active repository if (activeRepositories.isEmpty()) { // If the session needs to be closed if (session != null) { session.close(); session = null; connector.close(); connector = null; container.deactivate(); container = null; cdoSessionConfiguration = null; } } } /** * Returns the CDOConfiguration associated to this repository. * * @return the CDOConfiguration associated to this repository */ public CDOConfig getConfiguration() { return this.repositoryConfiguration; } /** * {@inheritDoc} * * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#getPackageRegistry() */ public Registry getPackageRegistry() throws RepositoryConnectionException { return ((CDOSession)getOrCreateSession()).getPackageRegistry(); } /** * {@inheritDoc} * * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#createRepositoryAdapter() */ public RepositoryAdapter createRepositoryAdapter() { try { return new CDOAdapter((CDOSession)getOrCreateSession()); } catch (RepositoryConnectionException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } } /** * {@inheritDoc} * * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#setRepositoryStructurer(org.eclipse.mylyn.docs.intent.collab.handlers.adapters.RepositoryStructurer) */ public void setRepositoryStructurer(RepositoryStructurer structurer) { // TODO Auto-generated method stub } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com