blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
sequencelengths
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
sequencelengths
1
1
author_id
stringlengths
1
79
9755784a4702c1701699925aa637a38417b2885b
e21f10facb5db78e142da6be0e2e3299ef829431
/javaweb-05-cookie/src/main/java/com/csu/servlet/CookieDemo2.java
bc323d7552d995467dfcdf33efc2e6bd29f96f89
[]
no_license
so1esou1/Learn
5b98cd5285e9bc93fdc70b0542e4aa027e1bd0bf
02405826a973f9a56f0c234cfbf8c59be007be35
refs/heads/master
2023-05-04T02:38:58.810083
2021-05-17T14:29:24
2021-05-17T14:29:24
326,638,883
1
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
package com.csu.servlet; /* 创建一个cookie顶替掉demo1中的cookie,设置有效时间为0,这样的话就相当于删除了一个cookie!!! */ import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public class CookieDemo2 extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { //创建的cookie必须跟上一个cookie的名字一致 Cookie cookie = new Cookie("lastLoginTime", System.currentTimeMillis()+""); //设置有效期: cookie.setMaxAge(0); //添加cookie resp.addCookie(cookie); //之后访问cookie2就会清掉cookie } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doPost(req, resp); } }
[ "1402916604@qq.com" ]
1402916604@qq.com
660e2ef062bedd2bc669bf04087d018e6f0e10c2
7372cac00a934e9d833befcabf7b6342bbb91616
/haikudepotserver-core/src/main/java/org/haiku/haikudepotserver/dataobjects/Publisher.java
cfd43f71caaa51e56e620d9327189d581dc32317
[ "MIT" ]
permissive
KapiX/haikudepotserver
5903a60bc5f0732aa1371a198a3329ffcf653589
c338e59e37a5cccfbb6fc05046a9ff6f6f97791b
refs/heads/master
2022-11-05T17:41:36.032129
2020-06-21T11:07:01
2020-06-21T11:07:01
273,948,013
0
0
NOASSERTION
2020-06-21T17:00:33
2020-06-21T17:00:32
null
UTF-8
Java
false
false
461
java
/* * Copyright 2013-2018, Andrew Lindesay * Distributed under the terms of the MIT License. */ package org.haiku.haikudepotserver.dataobjects; import org.haiku.haikudepotserver.dataobjects.support.Coded; import org.haiku.haikudepotserver.dataobjects.support.MutableCreateAndModifyTimestamped; import org.haiku.haikudepotserver.dataobjects.auto._Publisher; public class Publisher extends _Publisher implements MutableCreateAndModifyTimestamped, Coded { }
[ "apl@lindesay.co.nz" ]
apl@lindesay.co.nz
738999ddac218a9955acab3c9f1f5c503e0fc1aa
4b0ca748c43c8d099b41551a330191d7c9793fed
/secondUber/src/main/java/com/app/comic/ui/Model/Request/PassengerInfoRequest.java
7eaee536b5b1d646c5d8b457261343c6b5e0ad94
[ "MIT" ]
permissive
imalpasha/secondUB
ce2d2757b98b65af07830d2bb73c98f3cbc87c6f
d900f1083fa5ed6d20d42dff0c54d4a901a54e88
refs/heads/master
2021-01-11T18:15:33.356116
2017-01-22T14:18:34
2017-01-22T14:18:34
79,524,098
0
1
null
null
null
null
UTF-8
Java
false
false
505
java
package com.app.comic.ui.Model.Request; /** * Created by Dell on 11/4/2015. */ public class PassengerInfoRequest { /*Local Data Send To Server*/ String username; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } /*Initiate Class*/ public PassengerInfoRequest() { } public PassengerInfoRequest(PassengerInfoRequest data) { username = data.getUsername(); } }
[ "imalpasha@gmail.com" ]
imalpasha@gmail.com
d2b14c2203e931f65c9ef12c5f94f93e449e94ba
018de4cf7f899dcca6fa2f0d99a86721bde38e62
/app/src/main/java/com/gdcp/newsclient/skin/config/SkinConfig.java
c890c88c6b8a63b6cf6079ce0f3ca68aa68562ce
[]
no_license
zhangjiangli/NewsClient
97e700cd2f8d413ab5aaa8c04f9e3d2ad68969aa
619e73ed349529d8c35cc205da229f695567dd00
refs/heads/master
2020-12-03T03:45:26.206196
2017-06-29T11:00:37
2017-06-29T11:00:37
95,769,321
0
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
package com.gdcp.newsclient.skin.config; import android.content.Context; import android.content.SharedPreferences; /** * Created by asus- on 2017/6/28. */ public class SkinConfig { private static SkinConfig mInstance; private Context mContext; private SkinConfig(Context mContext) { this.mContext = mContext; } public static SkinConfig getInstance(Context mContext) { if (mInstance == null) { synchronized (SkinConfig.class){ if (mInstance==null){ mInstance = new SkinConfig(mContext); } } } return mInstance; } //保存皮肤路径 public void setSkinResourcePath(String skinPath){ SharedPreferences sp=mContext.getSharedPreferences("skin_sharePref", mContext.MODE_PRIVATE); SharedPreferences.Editor editor = sp.edit(); editor.putString("skinPath",skinPath); editor.commit(); } //取出皮肤路径 public String getSkinResourcePath() { SharedPreferences sp = mContext.getSharedPreferences("skin_sharePref", mContext.MODE_PRIVATE); return sp.getString("skinPath", ""); } public void setSkinColor(String colorName){ SharedPreferences sp=mContext.getSharedPreferences("skin_sharePref", mContext.MODE_PRIVATE); SharedPreferences.Editor editor = sp.edit(); editor.putString("colorName",colorName); editor.commit(); } //取出皮肤路径 public String getSkinColor() { SharedPreferences sp = mContext.getSharedPreferences("skin_sharePref", mContext.MODE_PRIVATE); return sp.getString("colorName", ""); } }
[ "1776494277@qq.com" ]
1776494277@qq.com
a228ec68581971c8e936517a253074ab918b6376
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/4/org/jfree/chart/renderer/xy/StackedXYAreaRenderer_clone_640.java
0f9354ace1f2b77d444a88d9cd3b3ec23abad160
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,308
java
org jfree chart render stack area render link plot xyplot shown gener code stack area render demo1 stackedxyarearendererdemo1 java code program includ free chart jfreechart demo collect img src imag stack area render sampl stackedxyarearenderersampl png alt stack area render sampl stackedxyarearenderersampl png special note render handl neg data valu correctli fix point current workaround link stack area renderer2 stackedxyarearenderer2 stack area render stackedxyarearender area render xyarearender return clone render clone clone support except clonenotsupportedexcept render clone object clone clone support except clonenotsupportedexcept clone
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
1c10fb4a6205684dbeb0e3b3a26bb4f4c6ef76e9
39390e1c0bf53d7f2e44b5242f1fb2b47300aaf7
/trunk/EZMIS/jteap-gcht/com/jteap/gcht/gcxmgl/manager/GclxcxManager.java
114380fd2c7f274ec661100d0e7b78aff67b2199
[]
no_license
BGCX067/ezmis-svn-to-git
3e061173c86055de6a1c0204271b3d3276cea7cf
24b15ab52a8d750a0ce782a6b64226583c859e03
refs/heads/master
2021-01-11T11:08:51.702990
2015-12-28T14:08:08
2015-12-28T14:08:08
48,874,376
0
1
null
null
null
null
UTF-8
Java
false
false
295
java
package com.jteap.gcht.gcxmgl.manager; import com.jteap.core.dao.HibernateEntityDao; import com.jteap.gcht.gcxmgl.model.Wtd; /** * @author 王艺 * @version 创建时间:Jun 14, 2012 2:06:38 AM * 类说明 */ public class GclxcxManager extends HibernateEntityDao<Wtd>{ }
[ "you@example.com" ]
you@example.com
9e2c263c3da067f3b327d614a798def752c1cbcc
7200bf3418dc1ea12d27b12589a39c4844d6474a
/oauth2-jwt-server/src/main/java/com/springcloud/oauth2jwtserver/Oauth2JwtServerApplication.java
fcec316a848a9e19a0f1fd7c83eecbc31e270594
[]
no_license
sx19990201/SpringCloudDemo
b001e03b9b04c1913285b1486189bef799827026
7c3f7b2ea634d2aeef21b5fef8cc9b815c9498d6
refs/heads/master
2022-11-24T04:23:10.144303
2020-08-03T10:03:58
2020-08-03T10:03:58
284,659,663
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package com.springcloud.oauth2jwtserver; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Oauth2JwtServerApplication { public static void main(String[] args) { SpringApplication.run(Oauth2JwtServerApplication.class, args); } }
[ "root" ]
root
6086f7c2252f724d765d5b1b33bc394cc3fcd5e5
a287ce936b222c59646f392ed9e00432608a44bd
/lesson5/mvakarchuk/src/jelementary/Group.java
2ad71c0893e7f22e3a33a7039d037474af8d50c8
[]
no_license
igorkorunets/homework
5d71a775425d52fc3e541706023a4a000751de05
a429f231f1015c67ca269cb10df1f0aef0e779d3
refs/heads/master
2021-01-12T16:14:18.791767
2016-12-01T00:35:03
2016-12-01T00:35:03
70,505,551
0
0
null
2016-10-10T16:10:46
2016-10-10T16:10:45
null
UTF-8
Java
false
false
776
java
package jelementary; import jelementary.people.Student; public class Group { String name; Student[] students; public Group(String name) { this.name = name; students = new Student[0]; } public String getName() { return name; } public Student[] getStudents() { return students; } public void addStudent(Student student) { Student[] tmp = new Student[students.length + 1]; System.arraycopy(students, 0, tmp, 0, students.length); tmp[students.length] = student; students = tmp; } public String toString() { String listOfStudents = " "; for (Student student : students) { listOfStudents += "\n" + student.getName(); } return "Group: " + name + ".\n" + "List of students: " + listOfStudents; } }
[ "dmitry404@gmail.com" ]
dmitry404@gmail.com
adc9eab3180c21b9719f95fbe6b06333581b2894
f67f55af40a480d77298094e8b2f4f337df2d8da
/dialogselect/src/androidTest/java/com/neandroid/dialogui/ExampleInstrumentedTest.java
45aa9b43eae86e5ea06f11f5fd47b03daf46ea52
[ "Apache-2.0" ]
permissive
Youngfellows/DialogSelect
aa766442f83bd29e16063ea443b04791869955a1
b990142fce1f19c8b0749cef401c3e7e46818fac
refs/heads/main
2023-03-10T22:22:32.121000
2021-02-25T07:22:41
2021-02-25T07:22:41
324,769,432
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package com.neandroid.dialogui; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.neandroid.dialogui.test", appContext.getPackageName()); } }
[ "hk20130120515@163.com" ]
hk20130120515@163.com
b77d21490774c576f36bc4643615f10e5ac95f9f
8ce57f3d8730091c3703ad95f030841a275d8c65
/test/testsuite/ouroboros/parent_test/RT0103-rt-parent-ProxyExObjectwaitInterruptedException/ProxyExObjectwaitInterruptedException.java
74b2a44476bb9f9742b100cdcbf14bfbea2a3b28
[]
no_license
TanveerTanjeem/OpenArkCompiler
6c913ebba33eb0509f91a8f884a87ef8431395f6
6acb8e0bac4ed3c7c24f5cb0196af81b9bedf205
refs/heads/master
2022-11-17T21:08:25.789107
2020-07-15T09:00:48
2020-07-15T09:00:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,057
java
/* * Copyright (c) [2020] Huawei Technologies Co.,Ltd.All rights reserved. * * OpenArkCompiler is licensed under the Mulan PSL v1. * You can use this software according to the terms and conditions of the Mulan PSL v1. * You may obtain a copy of Mulan PSL v1 at: * * http://license.coscl.org.cn/MulanPSL * * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR * FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v1 for more details. * -@TestCaseID: ProxyExObjectwaitInterruptedException.java * -@TestCaseName: Exception in reflect Proxy: final void wait(*) * -@TestCaseType: Function Test * -@RequirementName: 补充重写类的父类方法 * -@Brief: * -#step1: Create three private classes to implement Runnable, run sampleField1 as a synchronization lock, Call wait(), * wait (millis), wait (millis, nanos) respectively * -#step2: Call the run of the use case, execute the start () method of the private class 1, and wait for 100 * milliseconds to interrupt * -#step3: Execute the start () method of private class 2 and wait for 100 milliseconds to interrupt * -#step4: Execute the start () method of private class 3 and wait for 100 milliseconds to interrupt * -#step5: Confirm whether all classes are successfully interrupted and InterruptedException is successfully caught * -@Expect:0\n * -@Priority: High * -@Source: ProxyExObjectwaitInterruptedException.java * -@ExecuteClass: ProxyExObjectwaitInterruptedException * -@ExecuteArgs: */ import java.lang.reflect.Proxy; import java.lang.reflect.Method; import java.lang.reflect.InvocationHandler; public class ProxyExObjectwaitInterruptedException { static int res = 99; private MyProxy8 proxy = new MyProxy8(new MyInvocationHandler7()); public static void main(String argv[]) { System.out.println(new ProxyExObjectwaitInterruptedException().run()); } private class ProxyExObjectwaitInterruptedException11 implements Runnable { // final void wait() private int remainder; private ProxyExObjectwaitInterruptedException11(int remainder) { this.remainder = remainder; } /** * Thread run fun */ public void run() { synchronized (proxy) { proxy.notifyAll(); try { proxy.wait(); ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 15; } catch (InterruptedException e1) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 1; } catch (IllegalMonitorStateException e2) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 10; } } } } private class ProxyExObjectwaitInterruptedException21 implements Runnable { // final void wait(long millis) private int remainder; long millis = 10000; private ProxyExObjectwaitInterruptedException21(int remainder) { this.remainder = remainder; } /** * Thread run fun */ public void run() { synchronized (proxy) { proxy.notifyAll(); try { proxy.wait(millis); ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 15; } catch (InterruptedException e1) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 1; } catch (IllegalMonitorStateException e2) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 10; } catch (IllegalArgumentException e3) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 5; } } } } private class ProxyExObjectwaitInterruptedException31 implements Runnable { // final void wait(long millis, int nanos) private int remainder; long millis = 10000; int nanos = 100; private ProxyExObjectwaitInterruptedException31(int remainder) { this.remainder = remainder; } /** * Thread run fun */ public void run() { synchronized (proxy) { proxy.notifyAll(); try { proxy.wait(millis, nanos); ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 15; } catch (InterruptedException e1) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 1; } catch (IllegalMonitorStateException e2) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 10; } catch (IllegalArgumentException e3) { ProxyExObjectwaitInterruptedException.res = ProxyExObjectwaitInterruptedException.res - 5; } } } } /** * sleep fun * * @param slpnum wait time */ public void sleep(int slpnum) { try { Thread.sleep(slpnum); } catch (InterruptedException e) { e.printStackTrace(); } } /** * main test fun * * @return status code */ public int run() { int result = 2; /*STATUS_FAILED*/ // check api normal // final void wait() Thread t1 = new Thread(new ProxyExObjectwaitInterruptedException11(1)); // final void wait(long millis) Thread t3 = new Thread(new ProxyExObjectwaitInterruptedException21(3)); // final void wait(long millis, int nanos) Thread t5 = new Thread(new ProxyExObjectwaitInterruptedException31(5)); t1.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { @Override public void uncaughtException(Thread t, Throwable e) { System.out.println(t.getName() + " : " + e.getMessage()); } }); t3.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { @Override public void uncaughtException(Thread t, Throwable e) { System.out.println(t.getName() + " : " + e.getMessage()); } }); t5.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { @Override public void uncaughtException(Thread t, Throwable e) { System.out.println(t.getName() + " : " + e.getMessage()); } }); t1.start(); sleep(1000); t1.interrupt(); sleep(1000); t3.start(); sleep(1000); t3.interrupt(); sleep(1000); t5.start(); sleep(1000); t5.interrupt(); sleep(1000); if (result == 2 && ProxyExObjectwaitInterruptedException.res == 96) { result = 0; } return result; } } class MyProxy8 extends Proxy { MyProxy8(InvocationHandler h) { super(h); } InvocationHandler getInvocationHandlerField() { return h; } } class MyInvocationHandler7 implements InvocationHandler { /** * invoke test * * @param proxy proxy test * @param method method for test * @param args object[] for test * @return any implementation * @throws Throwable exception */ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return new Object(); // any implementation } } // EXEC:%maple %f %build_option -o %n.so // EXEC:%run %n.so %n %run_option | compare %f // ASSERT: scan 0\n
[ "fuzhou@huawei.com" ]
fuzhou@huawei.com
0958be1b1aca302c605edae294e1f60ff03cf99b
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_procyon/com/google/protos/BinExport/BinExport$Flowgraph$VertexOrBuilder.java
6710c7aa5659b17b3d8d34ae7d20387f9705e398
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package com.google.protos.BinExport; import com.google.protobuf.*; import java.util.*; public interface BinExport$Flowgraph$VertexOrBuilder extends MessageOrBuilder { boolean hasPrime(); long getPrime(); List getInstructionsList(); BinExport$Flowgraph$Vertex$Instruction getInstructions(final int p0); int getInstructionsCount(); List getInstructionsOrBuilderList(); BinExport$Flowgraph$Vertex$InstructionOrBuilder getInstructionsOrBuilder(final int p0); }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
8898c2d9a97a494e1e70c77d88d35229a72cd251
d74a7ac4b88aa2cc3bb06cec898a462312ae2759
/src/main/java/com/cczu/model/controller/PageWghglXjszController.java
327d2a305b8b73fbdd150e1d8fd481c1274ea448
[]
no_license
wuyufei2019/test110
74dbfd15af2dfd72640032a8207f7ad5aa5da604
8a8621370eb92e6071f517dbcae9d483ccc4db36
refs/heads/master
2022-12-21T12:28:37.800274
2019-11-18T08:33:53
2019-11-18T08:33:53
222,402,348
0
0
null
2022-12-16T05:03:11
2019-11-18T08:45:49
Java
UTF-8
Java
false
false
8,288
java
package com.cczu.model.controller; import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.cczu.model.entity.YHPC_CheckPlanEntity; import com.cczu.model.entity.YHPC_CheckPlan_Time; import com.cczu.model.service.WghglXjszService; import com.cczu.model.service.YhpcCheckPlanService; import com.cczu.sys.comm.controller.BaseController; import com.cczu.sys.comm.mapper.JsonMapper; import com.cczu.sys.system.service.ShiroRealm.ShiroUser; import com.cczu.sys.system.utils.UserUtil; /** * 网格员巡检设置 * @author zpc * @date 2017/09/6 */ @Controller @RequestMapping("wghgl/xjsz") public class PageWghglXjszController extends BaseController{ @Autowired private WghglXjszService wghglXjszService; @Autowired private YhpcCheckPlanService yhpcCheckPlanService; /** * 默认页面 */ @RequestMapping(value="index") public String index(Model model) { if("0".equals(UserUtil.getCurrentShiroUser().getUsertype())){ return "wghgl/xjsz/index"; }else{ return "../error/403"; } } /** * list页面 */ @RequestMapping(value="list") @ResponseBody public Map<String, Object> getData(HttpServletRequest request) { Map<String, Object> map = getPageMap(request); map.put("bcname", request.getParameter("wghgl_xjsz_bcname")); map.put("xzqy", UserUtil.getCurrentShiroUser().getXzqy()); map.put("wgid", request.getParameter("wghgl_xjsz_wgid")); return wghglXjszService.dataGrid(map); } /** * 添加巡检班次任务设置跳转 * * @param model */ @RequestMapping(value = "create" , method = RequestMethod.GET) public String create(Model model) { model.addAttribute("action", "create"); return "wghgl/xjsz/form"; } /** * 添加信息 * @param request,model */ @RequestMapping(value = "create" ) @ResponseBody public String create(YHPC_CheckPlanEntity bcrw, HttpServletRequest request) { String datasuccess="success"; ShiroUser user = UserUtil.getCurrentShiroUser(); bcrw.setID1(Long.parseLong("0"));//安监为0 bcrw.setCreatetime(new Timestamp(System.currentTimeMillis()));//创建时间 bcrw.setUserid(user.getId().longValue());//建立人id long id = wghglXjszService.addInfo(bcrw); //添加任务时间 String[] start=request.getParameterValues("start"); String[] end=request.getParameterValues("end"); if(start!=null){ for(int i=0;i<start.length;i++){ YHPC_CheckPlan_Time sj = new YHPC_CheckPlan_Time(); sj.setID1(id); sj.setStarttime(start[i]); sj.setEndtime(end[i]); yhpcCheckPlanService.addxjbcsjInfo(sj); } } //添加检查点 // List<Map<String,Object>> list = wghglXjszService.getWgdByWgid(bcrw.getWgid()); // for (Map<String, Object> map : list) { // YHPC_CheckPlan_Point y2 = new YHPC_CheckPlan_Point(); // y2.setID1(id); // y2.setID2(Long.parseLong(map.get("id").toString())); // y2.setCheckpointtype("2"); // wghglXjszService.addxjbcjcdInfo(y2); // } return datasuccess; } /** * 删除巡检班次任务 * @param user * @param model * */ @RequestMapping(value = "delete/{ids}") @ResponseBody public String delete(@PathVariable("ids") String ids) { String datasuccess="删除成功"; //可以批量删除 String[] aids = ids.split(","); for(int i=0;i<aids.length;i++){ wghglXjszService.deleteInfo(Long.parseLong(aids[i])); //wghglXjszService.deletexjbcjcdInfo(Long.parseLong(aids[i])); yhpcCheckPlanService.deletexjbcsjInfo(Long.parseLong(aids[i]));//删除时间表信息 } return datasuccess; } /** * 修改页面跳转 * @param id,model */ @RequestMapping(value = "update/{id}", method = RequestMethod.GET) public String update(@PathVariable("id") Long id, Model model) { YHPC_CheckPlanEntity bcrw = wghglXjszService.findById(id); List<YHPC_CheckPlan_Time> rwsjlist = yhpcCheckPlanService.rwsjList(id); model.addAttribute("rwsjlist", JsonMapper.getInstance().toJson(rwsjlist)); model.addAttribute("bcrw", bcrw); model.addAttribute("action", "update"); return "wghgl/xjsz/form"; } /** * 修改 * @param request,model */ @RequestMapping(value = "update") @ResponseBody public String update(YHPC_CheckPlanEntity bcrw, HttpServletRequest request, Model model){ String datasuccess="success"; yhpcCheckPlanService.deletexjbcsjInfo(bcrw.getID());//删除时间表信息 //wghglXjszService.deletexjbcjcdInfo(bcrw.getID()); wghglXjszService.updateInfo(bcrw); //添加任务时间 String[] start=request.getParameterValues("start"); String[] end=request.getParameterValues("end"); if(start!=null){ for(int i=0;i<start.length;i++){ YHPC_CheckPlan_Time sj = new YHPC_CheckPlan_Time(); sj.setID1(bcrw.getID()); sj.setStarttime(start[i]); sj.setEndtime(end[i]); yhpcCheckPlanService.addxjbcsjInfo(sj); } } //添加检查点 // List<Map<String,Object>> list = wghglXjszService.getWgdByWgid(bcrw.getWgid()); // for (Map<String, Object> map : list) { // YHPC_CheckPlan_Point y2 = new YHPC_CheckPlan_Point(); // y2.setID1(bcrw.getID()); // y2.setID2(Long.parseLong(map.get("id").toString())); // y2.setCheckpointtype("2"); // wghglXjszService.addxjbcjcdInfo(y2); // } return datasuccess; } /** * 查看页面跳转 * @param id,model */ @RequestMapping(value = "view/{id}", method = RequestMethod.GET) public String view(@PathVariable("id") Long id, Model model) { YHPC_CheckPlanEntity bcrw = wghglXjszService.findById(id); String jcdnames = ""; List<YHPC_CheckPlan_Time> rwsjlist1 = yhpcCheckPlanService.rwsjList(id); List<YHPC_CheckPlan_Time> rwsjlist2 = new ArrayList<>(); if(bcrw.getType().equals("4")){ for (YHPC_CheckPlan_Time yct : rwsjlist1) { switch (yct.getStarttime()) { case "1": yct.setStarttime("一月初"); break; case "2": yct.setStarttime("二月初"); break; case "3": yct.setStarttime("三月初"); break; case "4": yct.setStarttime("四月初"); break; case "5": yct.setStarttime("五月初"); break; case "6": yct.setStarttime("六月初"); break; case "7": yct.setStarttime("七月初"); break; case "8": yct.setStarttime("八月初"); break; case "9": yct.setStarttime("九月初"); break; case "10": yct.setStarttime("十月初"); break; case "11": yct.setStarttime("十一月初"); break; case "12": yct.setStarttime("十二月初"); break; default: break; }; switch (yct.getEndtime()) { case "1": yct.setEndtime("一月末"); break; case "2": yct.setEndtime("二月末"); break; case "3": yct.setEndtime("三月末"); break; case "4": yct.setEndtime("四月末"); break; case "5": yct.setEndtime("五月末"); break; case "6": yct.setEndtime("六月末"); break; case "7": yct.setEndtime("七月末"); break; case "8": yct.setEndtime("八月末"); break; case "9": yct.setEndtime("九月末"); break; case "10": yct.setEndtime("十月末"); break; case "11": yct.setEndtime("十一月末"); break; case "12": yct.setEndtime("十二月末"); break; default: break; }; rwsjlist2.add(yct); } }else{ rwsjlist2 = rwsjlist1; } model.addAttribute("rwsjlist", rwsjlist2); //巡检点数据拼接 // List<Map<String,Object>> list2 = wghglXjszService.getidname2(bcrw.getID()); // if(list2.size()>0){ // for (Map<String, Object> map : list2) { // jcdnames = jcdnames + map.get("name") +" , "; // } // jcdnames = jcdnames.substring(0, jcdnames.length()-2); // } model.addAttribute("jcdnames", jcdnames); model.addAttribute("bcrw", bcrw); return "wghgl/xjsz/view"; } }
[ "wuyufei2019@sina.com" ]
wuyufei2019@sina.com
4bb915ae5312edf6ae93643a101fc4e784c6335a
01faa1318b24e2b0f0dd63abe1daa6df11f1e220
/android/app/src/main/java/com/smiles_21366/MainApplication.java
55ab3d30e01be4a86e26ba4403747463d9502f75
[]
no_license
crowdbotics-apps/smiles-21366
8c86f08b7fb10ec77dc4ba9bc09192b63443cba2
6d57fe1e1f9c5fd7a2a806734556638b1f536015
refs/heads/master
2022-12-28T17:24:06.222261
2020-10-11T18:00:08
2020-10-11T18:00:08
303,180,950
0
0
null
null
null
null
UTF-8
Java
false
false
2,689
java
package com.smiles_21366; import android.app.Application; import android.content.Context; import com.facebook.react.PackageList; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } /** * Loads Flipper in React Native templates. Call this in the onCreate method with something like * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); * * @param context * @param reactInstanceManager */ private static void initializeFlipper( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class<?> aClass = Class.forName("com.rndiffapp.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
d1814463301a718277d2a5352da7f13b9b694063
daab099e44da619b97a7a6009e9dee0d507930f3
/rt/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java
d65213bf4172f3cacac14727d8bfd5e342539db0
[]
no_license
xknower/source-code-jdk-8u211
01c233d4f498d6a61af9b4c34dc26bb0963d6ce1
208b3b26625f62ff0d1ff6ee7c2b7ee91f6c9063
refs/heads/master
2022-12-28T17:08:25.751594
2020-10-09T03:24:14
2020-10-09T03:24:14
278,289,426
0
0
null
null
null
null
UTF-8
Java
false
false
3,082
java
/* */ package com.oracle.xmlns.internal.webservices.jaxws_databinding; /* */ /* */ import java.lang.annotation.Annotation; /* */ import javax.xml.bind.annotation.XmlAccessType; /* */ import javax.xml.bind.annotation.XmlAccessorType; /* */ import javax.xml.bind.annotation.XmlAttribute; /* */ import javax.xml.bind.annotation.XmlRootElement; /* */ import javax.xml.bind.annotation.XmlType; /* */ import javax.xml.ws.soap.MTOM; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @XmlAccessorType(XmlAccessType.FIELD) /* */ @XmlType(name = "") /* */ @XmlRootElement(name = "mtom") /* */ public class XmlMTOM /* */ implements MTOM /* */ { /* */ @XmlAttribute(name = "enabled") /* */ protected Boolean enabled; /* */ @XmlAttribute(name = "threshold") /* */ protected Integer threshold; /* */ /* */ public boolean isEnabled() { /* 78 */ if (this.enabled == null) { /* 79 */ return true; /* */ } /* 81 */ return this.enabled.booleanValue(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void setEnabled(Boolean value) { /* 94 */ this.enabled = value; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public int getThreshold() { /* 106 */ if (this.threshold == null) { /* 107 */ return 0; /* */ } /* 109 */ return this.threshold.intValue(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void setThreshold(Integer value) { /* 122 */ this.threshold = value; /* */ } /* */ /* */ /* */ public boolean enabled() { /* 127 */ return ((Boolean)Util.<Boolean>nullSafe(this.enabled, Boolean.TRUE)).booleanValue(); /* */ } /* */ /* */ /* */ public int threshold() { /* 132 */ return ((Integer)Util.<Integer>nullSafe(this.threshold, Integer.valueOf(0))).intValue(); /* */ } /* */ /* */ /* */ public Class<? extends Annotation> annotationType() { /* 137 */ return (Class)MTOM.class; /* */ } /* */ } /* Location: D:\tools\env\Java\jdk1.8.0_211\rt.jar!\com\oracle\xmlns\internal\webservices\jaxws_databinding\XmlMTOM.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "xknower@126.com" ]
xknower@126.com
eb5d95095c8d21d2684e253f1d01aad2d42fb909
9cd23e3198ae067a711bbc514d96afc4a15c8cde
/turin-compiler/src/main/java/me/tomassetti/turin/compiler/bytecode/returnop/ReturnTrueBS.java
cc5bfb5d4af524833718a2f9cdc83d4f428080e0
[ "Apache-2.0" ]
permissive
ledkk/turin-programming-language
fcebc4c5a50f59a7619b65d695d59c9ec197e565
8e983a4e00977aaf95480d32a7fa91828a805b40
refs/heads/master
2021-01-19T05:19:15.388987
2015-09-09T21:37:31
2015-09-09T21:37:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package me.tomassetti.turin.compiler.bytecode.returnop; import me.tomassetti.turin.compiler.bytecode.BytecodeSequence; import org.objectweb.asm.MethodVisitor; import static org.objectweb.asm.Opcodes.ICONST_1; import static org.objectweb.asm.Opcodes.IRETURN; public class ReturnTrueBS extends BytecodeSequence { @Override public void operate(MethodVisitor mv) { mv.visitInsn(ICONST_1); mv.visitInsn(IRETURN); } }
[ "federico@tomassetti.me" ]
federico@tomassetti.me
b1bb53e8e7eeae09f03845ffca804def93ab0918
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/15734479.java
9986aee27473ec41bae8042e21b2c573ebaffa63
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,097
java
import java.io.UncheckedIOException; class c15734479 { private List retrieveData(String query) { List data =(List)(Object) new Vector(); query = query.replaceAll("\\s", "+"); String q = "http://www.uniprot.org/uniprot/?query=" + query + "&format=tab&columns=id,protein%20names,organism"; try { URL url = new URL(q); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); String line = ""; reader.readLine(); while ((line =(String)(Object) reader.readLine()) != null) { String[] st = line.split("\t"); String[] d = new String[] { st[0], st[1], st[2] }; data.add(d); } reader.close(); if ((int)(Object)data.size() == 0) { MyHelperClass JOptionPane = new MyHelperClass(); JOptionPane.showMessageDialog(this, "No data found for query"); } } catch (UncheckedIOException e) { System.err.println("Query " + q + " caused exception: "); e.printStackTrace(); } catch (Exception e) { System.err.println("Query " + q + " caused exception: "); e.printStackTrace(); } return data; } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass showMessageDialog(c15734479 o0, String o1){ return null; }} class List { public MyHelperClass add(String[] o0){ return null; } public MyHelperClass size(){ return null; }} class Vector { } class URL { URL(String o0){} URL(){} public MyHelperClass openStream(){ return null; }} class BufferedReader { BufferedReader(){} BufferedReader(InputStreamReader o0){} public MyHelperClass readLine(){ return null; } public MyHelperClass close(){ return null; }} class InputStreamReader { InputStreamReader(MyHelperClass o0){} InputStreamReader(){}} class MalformedURLException extends Exception{ public MalformedURLException(String errorMessage) { super(errorMessage); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
610e202e59a8811d23c41b18147e1db45665b493
8c517c2db3019bec94175a12677adf3c7c2c2a60
/ad-service/ad-sponsor/src/main/java/com/sunny/search/ad/utils/CommonUtils.java
c53c945d87674cb2b8916ff9a6c3d5b267fc3e02
[]
no_license
zlkjzxj/ad-spring-cloud
8198eab991aa87e24ae96f371284a774033bb280
63d70b5396f81c1bdee03ef5e89d7e7e91070492
refs/heads/master
2020-04-23T20:29:00.971324
2019-03-01T10:05:27
2019-03-01T10:05:27
171,441,484
0
0
null
null
null
null
UTF-8
Java
false
false
836
java
package com.sunny.search.ad.utils; import com.sunny.ad.exception.AdException; import com.sunny.search.ad.exception.AdException; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang.time.DateUtils; import java.util.Date; /** * Created by Qinyi. */ public class CommonUtils { private static String[] parsePatterns = { "yyyy-MM-dd", "yyyy/MM/dd", "yyyy.MM.dd" }; public static String md5(String value) { return DigestUtils.md5Hex(value).toUpperCase(); } public static Date parseStringDate(String dateString) throws AdException { try { return DateUtils.parseDate( dateString, parsePatterns ); } catch (Exception ex) { throw new AdException(ex.getMessage()); } } }
[ "zlkjzxj@163.com" ]
zlkjzxj@163.com
574b4902dac74f0d10286d77fe6296e0d8b49ed5
254fdb8729b639fd0fb9896364d0e89186521b6a
/src/main/java/com/fishercoder/solutions/_655.java
7e51aff5d62691cc30ad06731a81d4648ff79da1
[ "Apache-2.0" ]
permissive
jiangxf/java_interview
99e9601aefa058a2465946803ad348ffb91f804e
1a1794689d7a977464e7e47a994140de67cf56be
refs/heads/master
2020-04-08T14:54:06.386481
2018-12-04T06:03:31
2018-12-04T06:03:31
159,456,451
0
0
null
null
null
null
UTF-8
Java
false
false
3,339
java
package com.fishercoder.solutions; import com.fishercoder.common.TreeNode; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; /** * 655. Print Binary Tree * <p> * Print a binary tree in an m*n 2D string array following these rules: * 1. The row number m should be equal to the height of the given binary tree. * 2. The column number n should always be an odd number. * 3. The root node's value (in string format) should be put in the exactly middle of the first row it can be put. * The column and the row where the root node belongs MySolution separate the rest space into two parts (left-bottom part and right-bottom part). * You should print the left subtree in the left-bottom part and print the right subtree in the right-bottom part. * The left-bottom part and the right-bottom part should have the same size. * Even if one subtree is none while the other is not, * you don't need to print anything for the none subtree but * still need to leave the space as large as that for the other subtree. * However, if two subtrees are none, then you don't need to leave space for both of them. * 4. Each unused space should contain an empty string "". * 5. Print the subtrees following the same rules. * <p> * Example 1: * Input: * 1 * / * 2 * Output: * [["", "1", ""], * ["2", "", ""]] * <p> * Example 2: * Input: * 1 * / \ * 2 3 * \ * 4 * Output: * [["", "", "", "1", "", "", ""], * ["", "2", "", "", "", "3", ""], * ["", "", "4", "", "", "", ""]] * <p> * Example 3: * Input: * 1 * / \ * 2 5 * / * 3 * / * 4 * Output: * <p> * [["", "", "", "", "", "", "", "1", "", "", "", "", "", "", ""] * ["", "", "", "2", "", "", "", "", "", "", "", "5", "", "", ""] * ["", "3", "", "", "", "", "", "", "", "", "", "", "", "", ""] * ["4", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]] * <p> * Note: The height of binary tree is in the range of [1, 10] */ public class _655 { /** * Reference: https://discuss.leetcode.com/topic/98381/java-recursive-solution * and https://leetcode.com/articles/print-binary-tree/ */ public List<List<String>> printTree(TreeNode root) { List<List<String>> result = new LinkedList<>(); int height = root == null ? 1 : getHeight(root); int rows = height; int columns = (int) (Math.pow(2, height) - 1); List<String> row = new ArrayList<>(); for (int i = 0; i < columns; i++) { row.add(""); } for (int i = 0; i < rows; i++) { result.add(new ArrayList<>(row)); } populateResult(root, result, 0, rows, 0, columns - 1); return result; } private void populateResult(TreeNode root, List<List<String>> result, int row, int totalRows, int i, int j) { if (row == totalRows || root == null) { return; } result.get(row).set((i + j) / 2, Integer.toString(root.val)); populateResult(root.left, result, row + 1, totalRows, i, (i + j) / 2 - 1); populateResult(root.right, result, row + 1, totalRows, (i + j) / 2 + 1, j); } private int getHeight(TreeNode root) { if (root == null) { return 0; } return 1 + Math.max(getHeight(root.left), getHeight(root.right)); } }
[ "jiangxiaofeng@simuyun.com" ]
jiangxiaofeng@simuyun.com
e073946833ec99a1f7ba9d30877e1270c869d8c7
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-11-04-tempmail/sources/androidx/customview/view/AbsSavedState.java
6795dfa5ea049290b8f696f3a1d5ec3356f835d2
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
2,004
java
package androidx.customview.view; import android.os.Parcel; import android.os.Parcelable; public abstract class AbsSavedState implements Parcelable { public static final Parcelable.Creator<AbsSavedState> CREATOR = new a(); /* renamed from: c reason: collision with root package name */ public static final AbsSavedState f1421c = new AbsSavedState() { }; /* renamed from: b reason: collision with root package name */ private final Parcelable f1422b; static class a implements Parcelable.ClassLoaderCreator<AbsSavedState> { a() { } /* renamed from: a */ public AbsSavedState createFromParcel(Parcel parcel) { return createFromParcel(parcel, (ClassLoader) null); } /* renamed from: b */ public AbsSavedState createFromParcel(Parcel parcel, ClassLoader classLoader) { if (parcel.readParcelable(classLoader) == null) { return AbsSavedState.f1421c; } throw new IllegalStateException("superState must be null"); } /* renamed from: c */ public AbsSavedState[] newArray(int i) { return new AbsSavedState[i]; } } public final Parcelable a() { return this.f1422b; } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { parcel.writeParcelable(this.f1422b, i); } private AbsSavedState() { this.f1422b = null; } protected AbsSavedState(Parcelable parcelable) { if (parcelable != null) { this.f1422b = parcelable == f1421c ? null : parcelable; return; } throw new IllegalArgumentException("superState must not be null"); } protected AbsSavedState(Parcel parcel, ClassLoader classLoader) { Parcelable readParcelable = parcel.readParcelable(classLoader); this.f1422b = readParcelable == null ? f1421c : readParcelable; } }
[ "zteeed@minet.net" ]
zteeed@minet.net
628d17240331634afdb2ded64ba7263e91140bfd
6504352f86c2e4f7ef16cea3f5b7cc00bba96a33
/XFAWealth/WebService/XFAWealthWebService/src/com/fsll/common/web/DataSourceHolder.java
a179d4a72caf945e7d77d0327311f882339d1277
[]
no_license
jedyang/XFAWealth
1a20c7b4d16c72883b27c4d8aa72d67df4291b9a
029d45620b3375a86fec8bb1161492325f9f2c6c
refs/heads/master
2021-05-07T04:53:24.628018
2017-08-03T15:25:59
2017-08-03T15:25:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
896
java
/* * Copyright (c) 2016-2019 by fsll * All rights reserved. */ package com.fsll.common.web; /** * 数据源操作 * * @author 黄模建 E-mail:mjhuang@fsll.cn * @version 1.0.0 Created On: 2016-8-26 */ public class DataSourceHolder { //线程本地环境 private static ThreadLocal<String> contextHolder = new ThreadLocal<String>(); public static final String DB_TYPE_W = "wDataSource"; public static final String DB_TYPE_R = "rDataSource"; // 设置数据源 public static void setDataSource(String dbKey) { clearDataSource(); contextHolder.set(dbKey); } // 获取数据源 public static String getDataSource() { String db = contextHolder.get(); if (db == null) { db = DB_TYPE_W;//默认是写库 } return db; } // 清除数据源 public static void clearDataSource() { contextHolder.remove(); } }
[ "549592047@qq.com" ]
549592047@qq.com
eb78d94927abb080ae04f6a0c2728d9bd3c0902f
8ec78e6ae1b611fd6e7d795fb0234f8c282d593e
/Toolkit/src/main/java/ru/simplgroupp/toolkit/common/Range.java
5f9915c852e57b175e08a9298201ed9b5d5783c3
[]
no_license
vo0doO/microcredit
96678f7afddd2899ea127281168202e36ee739c0
5d16e73674685d32196af33982d922ba0c9a8a59
refs/heads/master
2021-01-18T22:23:25.182233
2016-11-25T09:04:36
2016-11-25T09:04:36
87,050,783
0
2
null
2017-04-03T07:55:10
2017-04-03T07:55:10
null
UTF-8
Java
false
false
156
java
package ru.simplgroupp.toolkit.common; public interface Range { public boolean between(Object value); public Object getFrom(); public Object getTo(); }
[ "juhnowski@gmail.com" ]
juhnowski@gmail.com
dea4a08186eff5fc58a6f600cdfe1d16496dd33c
f959f0ddea0579455fd63efd73f68796ca3c89a3
/thinkis-core/src/main/java/com/thinkis/common/utils/Exceptions.java
6a9cf9cc80f2dd45f793b833e2f56515f8f5d92e
[ "MIT" ]
permissive
chocoai/firsthinkis
951e48acd86c4e8eb69d3a4b7bdcf2489828f813
63920660440c8b08ab6f81bccdd948f3464ac6f2
refs/heads/master
2022-04-06T12:37:57.431079
2019-12-22T03:37:52
2019-12-22T03:37:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,692
java
/** * Copyright (c) 2005-2012 springside.org.cn */ package com.thinkis.common.utils; import java.io.PrintWriter; import java.io.StringWriter; import javax.servlet.http.HttpServletRequest; /** * 关于异常的工具类. * @author calvin * @version 2013-01-15 */ public class Exceptions { /** * 将CheckedException转换为UncheckedException. */ public static RuntimeException unchecked(Exception e) { if (e instanceof RuntimeException) { return (RuntimeException) e; } else { return new RuntimeException(e); } } /** * 将ErrorStack转化为String. */ public static String getStackTraceAsString(Throwable e) { if (e == null){ return ""; } StringWriter stringWriter = new StringWriter(); e.printStackTrace(new PrintWriter(stringWriter)); return stringWriter.toString(); } /** * 判断异常是否由某些底层的异常引起. */ public static boolean isCausedBy(Exception ex, Class<? extends Exception>... causeExceptionClasses) { Throwable cause = ex.getCause(); while (cause != null) { for (Class<? extends Exception> causeClass : causeExceptionClasses) { if (causeClass.isInstance(cause)) { return true; } } cause = cause.getCause(); } return false; } /** * 在request中获取异常类 * @param request * @return */ public static Throwable getThrowable(HttpServletRequest request){ Throwable ex = null; if (request.getAttribute("exception") != null) { ex = (Throwable) request.getAttribute("exception"); } else if (request.getAttribute("javax.servlet.error.exception") != null) { ex = (Throwable) request.getAttribute("javax.servlet.error.exception"); } return ex; } }
[ "18229712137@189.cn" ]
18229712137@189.cn
d664b7a16b4bd1b1abd2784e392d4653ec444801
1f3beaa052725c1ba296d4ca64ada2c0cb68c4fa
/app/src/main/java/com/xyd/susong/store/StorePresenter.java
759d81dd64299292fe2e4c6e0940a617eb0f99b8
[]
no_license
zhengyiheng123/susong_special
adad056047f1b6d3a13d14c4c246aa4480648cb4
fc9095d984f6903a6d574d0ce52ba039dc65d924
refs/heads/master
2021-05-05T20:37:21.070922
2018-01-05T03:53:43
2018-01-05T03:53:43
114,829,843
0
0
null
null
null
null
UTF-8
Java
false
false
1,540
java
package com.xyd.susong.store; import com.xyd.susong.api.StoreApi; import com.xyd.susong.base.BaseApi; import com.xyd.susong.base.BaseModel; import com.xyd.susong.base.BaseObserver; import com.xyd.susong.base.RxSchedulers; /** * @author: zhaoxiaolei * @date: 2017/7/20 * @time: 15:45 * @description: */ public class StorePresenter implements StoreContract.Presenter { private StoreContract.View view; public StorePresenter(StoreContract.View view) { this.view = view; } @Override public void subscribe() { } @Override public void unSubscribe() { } @Override public void getData(final int page, int type) { BaseApi.getRetrofit() .create(StoreApi.class) .goodsList(page, type) .compose(RxSchedulers.<BaseModel<StoreModel>>compose()) .subscribe(new BaseObserver<StoreModel>() { @Override protected void onHandleSuccess(StoreModel model, String msg, int code) { if (page == 1) view.refreshData(model); else if (model.getData().size()>0) view.loadMoreData(model,1); else view.loadMoreData(model,2); } @Override protected void onHandleError(String msg) { view.error(msg); } }); } }
[ "15621599930@163.com" ]
15621599930@163.com
5e8990846cdf67199dd53d60f184e61b9de85230
04db3b27f799634a7a32ceb689cd836612d296de
/src/main/java/com/aws/samples/cdk/stacktypes/gradle/GradleSupport.java
82eea93718d5bc6bb2c6b98ffdba4626330506dd
[ "Apache-2.0" ]
permissive
PartTimeHackerman/aws-cdk-constructs-for-java
3d52a985c64d154c49d724cd0f24968ac32de82e
4cb771d2425353cc082d40f9213098d46be07f70
refs/heads/main
2023-07-27T22:44:42.739082
2021-09-09T20:23:14
2021-09-09T20:39:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
929
java
package com.aws.samples.cdk.stacktypes.gradle; import io.vavr.control.Try; import org.gradle.tooling.BuildLauncher; import org.gradle.tooling.GradleConnector; import org.gradle.tooling.ProjectConnection; import java.io.File; public class GradleSupport { public static void buildJar(File projectDirectoryFile) { ProjectConnection projectConnection = GradleConnector.newConnector() .forProjectDirectory(projectDirectoryFile) .connect(); Try.withResources(() -> projectConnection) .of(GradleSupport::runBuild) .get(); } public static Void runBuild(ProjectConnection projectConnection) { // Build with gradle and send the output to stderr BuildLauncher build = projectConnection.newBuild(); build.forTasks("build"); build.setStandardOutput(System.err); build.run(); return null; } }
[ "tim@mattison.org" ]
tim@mattison.org
38dbc613e8b0613df29a09756ca032ae9ab179da
db9457d801fa144fd75bfc6f026a1bcfb2e1472a
/src/main/java/com/rationaleemotions/annotations/internal/XmlRun.java
033c7c58126e99db86677a8bd284d087aa5d4037
[ "Apache-2.0" ]
permissive
gyyfifafans/sangrahah
b35dfb1986c5a43d704c79699c196dd32643bdb1
a461cb02b65cd63d77426193318760d4f64928ae
refs/heads/master
2022-11-21T07:01:51.762353
2020-07-26T17:09:34
2020-07-26T17:09:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package com.rationaleemotions.annotations.internal; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.ANNOTATION_TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface XmlRun { String[] include() default {}; String[] exclude() default {}; }
[ "krishnan.mahadevan1978@gmail.com" ]
krishnan.mahadevan1978@gmail.com
c9b380d27f3c25fe3601b703d65d541e74eaf5b9
37183c5b978cc28004514542b622e3e90be58a95
/Blocks/BlockDeadMachine.java
3bdac9c7176ad65bf0245d7287fc291f6e6d02d4
[]
no_license
ruki260/RotaryCraft
4ae81ce65396965fbab641f054d2f275fb1f0e68
9fa1cbd03bbe2a0793d8a28d8d41de77b1b16fb4
refs/heads/master
2021-01-22T01:50:55.229160
2013-11-16T07:07:01
2013-11-16T07:07:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,189
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2013 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.RotaryCraft.Blocks; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import Reika.DragonAPI.Libraries.ReikaEnchantmentHelper; import Reika.DragonAPI.Libraries.Registry.ReikaItemHelper; import Reika.RotaryCraft.TileEntities.TileEntityDeadMachine; public class BlockDeadMachine extends BlockContainer { public BlockDeadMachine(int ID, Material mat) { super(ID, mat); } @Override public TileEntity createNewTileEntity(World world) { return new TileEntityDeadMachine(); } /* @Override public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int meta, int fortune) { TileEntityDeadMachine te = ((TileEntityDeadMachine)world.getBlockTileEntity(x, y, z)); if (te != null) return te.getDrops(fortune); else { ReikaJavaLibrary.pConsole("NULL on "+FMLCommonHandler.instance().getEffectiveSide()); return null; } }*/ @Override public boolean removeBlockByPlayer(World world, EntityPlayer player, int x, int y, int z) { if (!player.capabilities.isCreativeMode) this.harvestBlock(world, player, x, y, z, 0); return world.setBlock(x, y, z, 0); } @Override public void harvestBlock(World world, EntityPlayer ep, int x, int y, int z, int meta) { TileEntityDeadMachine dead = (TileEntityDeadMachine)world.getBlockTileEntity(x, y, z); ItemStack is = ep.getHeldItem(); int fortune; if (is == null) fortune = 0; else fortune = ReikaEnchantmentHelper.getEnchantmentLevel(Enchantment.fortune, is); if (dead != null) { ReikaItemHelper.dropItems(world, x+0.5, y+0.5, z+0.5, dead.getDrops(fortune)); } } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
a2ee62ef9814df9e11268b3682af921aa7f9233e
35c8eec665c0b34871024b58c5dba0f00b4e2830
/program/src/test/java/dk/au/cs/dash/test/dash/examples/DartPage214Simplified.java
22cddfbe4e500747895eece823c77a0b82af272d
[ "CC-BY-4.0" ]
permissive
foens/dash
24ee374df51ee22e2bcc8deaa9714d7b7f95991d
d45a044c2854ee6636c1f0a1fab556e56cf185a7
refs/heads/master
2021-01-25T04:52:53.692761
2015-05-02T13:16:50
2015-05-02T13:16:50
12,943,347
2
0
null
null
null
null
UTF-8
Java
false
false
260
java
package dk.au.cs.dash.test.dash.examples; import dk.au.cs.dash.Dash; public class DartPage214Simplified { public static int test(int x, int y) { if (x != y) if (2 * x == x + 10) Dash.error(); return 0; } }
[ "kfoens@gmail.com" ]
kfoens@gmail.com
0c6b667297c8a2c61bf1bf7635046578eefd45c9
17e8438486cb3e3073966ca2c14956d3ba9209ea
/cargo-core-0.9/api/util/src/main/java/org/codehaus/cargo/util/log/FileLogger.java
d3234b8eed89738927431f92747c77ec795c5c6c
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
2,858
java
/* * ======================================================================== * * Copyright 2004-2006 Vincent Massol. * * 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.codehaus.cargo.util.log; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.codehaus.cargo.util.CargoException; import org.codehaus.cargo.util.internal.log.AbstractLogger; /** * File implementation which sends logged messages to a file. * * @version $Id$ */ public class FileLogger extends AbstractLogger { /** * The file to log to. */ private FileOutputStream output; /** * Date format used when logging to the file. */ private final DateFormat format = new SimpleDateFormat("HH:mm:ss.SSS"); /** * @param file the file to log to * @param append if true the file is appended to insted of being erased */ public FileLogger(File file, boolean append) { try { this.output = new FileOutputStream(file, append); } catch (FileNotFoundException e) { throw new CargoException("Failed to create file [" + file + "]", e); } } /** * @param file the file to log to * @param append if true the file is appended to insted of being erased */ public FileLogger(String file, boolean append) { this(new File(file), append); } /** * {@inheritDoc} * @see AbstractLogger#doLog(LogLevel, String, String) */ protected void doLog(LogLevel level, String message, String category) { final String formattedCategory = category.length() > 20 ? category.substring(category.length() - 20) : category; final String msg = "[" + this.format.format(new Date()) + "]" + "[" + level.getLevel() + "][" + formattedCategory + "] " + message + "\n"; try { this.output.write(msg.getBytes()); } catch (IOException e) { throw new CargoException("Failed to write log message [" + msg + "]", e); } } }
[ "hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864
ddbb482c6331bb555ed50eba6217f3e443d81d35
64557b31271afdc9511bff7799d178e9ae40410d
/emperor/src/main/java/com/wktx/www/emperor/apiresult/mine/store/StoreData.java
597998b29171fcfa073e923c2f7550f08c789988
[]
no_license
yyj1204/junchenlun
d62e79f7e7773301b2798fc28eada3660ef0ee03
d4670b1c0702f25817bfe86649f199de3e0e8845
refs/heads/master
2020-04-08T01:24:13.675127
2018-11-24T01:34:56
2018-11-24T01:36:49
158,893,389
0
0
null
null
null
null
UTF-8
Java
false
false
1,074
java
package com.wktx.www.emperor.apiresult.mine.store; /** * Created by yyj on 2018/2/8. * 店铺信息 * { * "ret": 200,"msg": "", * "data": { * "code":0,"msg":"", * "info":{"id": "4","bgap": "1","bgat": "1","shop_logo":"","shop_name": "编辑2", * "shop_url": "1","tow_name": "美工","bgat_name": "服装内衣"} * } * } */ public class StoreData { private int code; private String msg; private StoreInfoData info; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public StoreInfoData getInfo() { return info; } public void setInfo(StoreInfoData info) { this.info = info; } @Override public String toString() { return "StoreData{" + "code=" + code + ", msg='" + msg + '\'' + ", info=" + info + '}'; } }
[ "1036303629@qq.com" ]
1036303629@qq.com
48e143ad6acd5d0030119a55ac75c9a221022f03
6659df4dc8a47571b450547ffaaa14f2cf45d418
/src/com/example/onemap/TaskDataBaseToMap.java
44abe4f4ab139f47b01e6291cc662fd73e77379e
[]
no_license
yanlang13/oneMap
5074e6ecb0aa05dfbef95d7e4750e2eb9c2924ed
3c030eaa952a79bf668bebcdff98f6dcbb20bec8
refs/heads/master
2021-01-12T15:08:10.737528
2014-08-12T08:52:44
2014-08-12T08:52:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,538
java
package com.example.onemap; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import org.apache.commons.io.FileUtils; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.PolygonOptions; import android.R.plurals; import android.content.Context; import android.os.AsyncTask; import android.util.Log; public class TaskDataBaseToMap extends AsyncTask<Context, Void, HashMap<String, PolygonOptions>> { private final static String LINE_WIDTH = "lineWidth"; private final static String COLOR_MODE = "colorMode"; private final static String POLY_COLOR = "polyColor"; private final static String LINE_COLOR = "lineColor"; private final static String COORDINATES = "coordinates"; private DBHelper dbHelper; private HashMap<String, PolygonOptions> pos; @Override protected HashMap<String, PolygonOptions> doInBackground(Context... params) { Context context = params[0]; dbHelper = new DBHelper(context); pos = new HashMap<String, PolygonOptions>(); // 抓database裡面的layers // List<Layer> layers = dbHelper.getAllLayer(); List<PlaceMark> placeMarks = dbHelper.getDisplayPlaceMark(); for (PlaceMark pm : placeMarks) { String styleLink = pm.getStyleLink(); try { URL url = new URL(styleLink); File file = new File(url.toURI()); String jsonString = FileUtils.readFileToString(file); JSONObject json = new JSONObject(jsonString); json.getString(COLOR_MODE); String coordinates = json.getString(COORDINATES); ArrayList<LatLng> latLngs = OtherTools .transCoorStringToLatLngs(coordinates); PolygonOptions po = new PolygonOptions(); po.addAll(latLngs); po.fillColor(json.getInt(POLY_COLOR)); po.strokeColor(json.getInt(LINE_COLOR)); po.strokeWidth(json.getInt(LINE_WIDTH)); String key = pm.getPlaceMarkName(); pos.put(key, po); } catch (MalformedURLException e) { Log.d("mdb", "DataBaseToMap.class: " + e.toString()); } catch (IOException e) { Log.d("mdb", "DataBaseToMap.class: " + e.toString()); } catch (URISyntaxException e) { Log.d("mdb", "DataBaseToMap.class: " + e.toString()); }// end of try }// end of for if (dbHelper != null) { dbHelper.close(); } Log.d("mdb", "=====end of databaseToMap"); return pos; }// end of doInBackground }// end of DataBaseToMap
[ "@" ]
@
8f639784cd8c826e915510fe312ef8370dac3bd2
4659c2c3e7d8f5e85d1b1248134fc9cf802a2a14
/flink-1.12.0-Demo/src/main/java/com/shangbaishuyao/demo/FlinkDemo06/Flink08_State_Backend.java
b48a4619f960dcac522e0712bc9707426c630db6
[ "Apache-2.0" ]
permissive
corersky/flink-learning-from-zhisheng
e68dfad1f91196d8cfeaaa0014fce7c55cb66847
9765eaee0e2cf49d2a925d8d55ebc069f9bdcda1
refs/heads/main
2023-05-14T07:12:49.610363
2021-06-06T15:21:17
2021-06-06T15:21:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,025
java
package com.shangbaishuyao.demo.FlinkDemo06; import org.apache.flink.contrib.streaming.state.RocksDBStateBackend; import org.apache.flink.runtime.state.filesystem.FsStateBackend; import org.apache.flink.runtime.state.memory.MemoryStateBackend; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import java.io.IOException; /** * Author: shangbaishuyao * Date: 0:23 2021/4/23 * Desc: 状态后端保存的位置 */ public class Flink08_State_Backend { public static void main(String[] args) throws IOException { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); //定义状态后端,保存状态的位置 env.setStateBackend(new MemoryStateBackend()); env.setStateBackend(new FsStateBackend("hdfs:hadoop102:8020/shangbaishuyao/ck")); env.setStateBackend(new RocksDBStateBackend("hdfs:hadoop102:8020/shangbaishuyao/ck")); //开启CK env.getCheckpointConfig().enableUnalignedCheckpoints(); } }
[ "shangbaishuyao@163.com" ]
shangbaishuyao@163.com
80f0edfcb5db1a9b5b0f19544eb98c1b34a311f9
e947cf88ce73c8d0db01d170539e989f631728f3
/framework.uwt.swing/src/org/plazmaforge/framework/uwt/swing/adapter/SwingTableItemAdapter.java
f08d6a87c30249e712da85e27608335631bc6ec7
[]
no_license
codeclimate-testing/java-plazma
8537f572229253c6a28f0bc58b32d8ad619b9929
d2f343564cd59882e43b1a1efede7a3b403e2bdb
refs/heads/master
2021-01-21T05:36:14.105653
2017-09-05T21:38:32
2017-09-05T21:38:32
101,927,837
0
1
null
2017-10-19T13:15:00
2017-08-30T20:53:58
Java
UTF-8
Java
false
false
1,690
java
/* * Copyright (C) 2012-2013 Oleh Hapon ohapon@users.sourceforge.net * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * Oleh Hapon * Kyiv, UKRAINE * ohapon@users.sourceforge.net */ package org.plazmaforge.framework.uwt.swing.adapter; import org.plazmaforge.framework.uwt.UIObject; import org.plazmaforge.framework.uwt.swing.adapter.viewer.SwingTableModel; import org.plazmaforge.framework.uwt.widget.table.TableItem; @Deprecated public class SwingTableItemAdapter extends SwingWidgetAdapter { @Override public Object createDelegate(UIObject parent, UIObject element) { /* javax.swing.JTable xParent = getJTable(parent.getDelegate()); TableItem tableItem = (TableItem) element; // We use DefaultTableModel only SwingTableModel tableModel = (SwingTableModel) xParent.getModel(); tableModel.addRow(tableItem.getItemText()); // Return null because JTable has not implementation of row/item */ return null; } }
[ "abaldwinhunter@codeclimate.com" ]
abaldwinhunter@codeclimate.com
e366395412c0b20411899a48971c75f9eb479399
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
/src/main/java/com/alipay/api/domain/AlipayOpenAppLingbalingliuQueryModel.java
87cc97ccd14b05aecefa6328204cee44bc97c395
[ "Apache-2.0" ]
permissive
cc-shifo/alipay-sdk-java-all
38b23cf946b73768981fdeee792e3dae568da48c
938d6850e63160e867d35317a4a00ed7ba078257
refs/heads/master
2022-12-22T14:06:26.961978
2020-09-23T04:00:10
2020-09-23T04:00:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * yufayanzheng * * @author auto create * @since 1.0, 2018-08-16 12:02:08 */ public class AlipayOpenAppLingbalingliuQueryModel extends AlipayObject { private static final long serialVersionUID = 1311134529664893534L; /** * 12 */ @ApiField("canshu") private String canshu; public String getCanshu() { return this.canshu; } public void setCanshu(String canshu) { this.canshu = canshu; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
7fb18e145fe61612d1896c92c97135e47a355b9a
9633324216599db0cf1146770c62da8123dc1702
/src/fractalzoomer/functions/root_finding_methods/bairstow/Bairstow4.java
e265bcc1763405849fce9a5a9a31fd4101a8d90e
[]
no_license
avachon100501/Fractal-Zoomer
fe3287371fd8716aa3239dd6955239f2c5d161cd
d21c173b8b12f11108bf844b53e09bc0d55ebeb5
refs/heads/master
2022-10-05T21:42:07.433545
2020-06-05T11:19:17
2020-06-05T11:19:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,053
java
/* * Copyright (C) 2020 hrkalona2 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package fractalzoomer.functions.root_finding_methods.bairstow; import fractalzoomer.core.Complex; import fractalzoomer.main.MainWindow; import fractalzoomer.main.app_settings.OrbitTrapSettings; import fractalzoomer.main.app_settings.StatisticsSettings; import java.util.ArrayList; /** * * @author hrkalona2 */ public class Bairstow4 extends BairstowRootFindingMethod { public Bairstow4(double xCenter, double yCenter, double size, int max_iterations, int out_coloring_algorithm, int user_out_coloring_algorithm, String outcoloring_formula, String[] user_outcoloring_conditions, String[] user_outcoloring_condition_formula, int in_coloring_algorithm, int user_in_coloring_algorithm, String incoloring_formula, String[] user_incoloring_conditions, String[] user_incoloring_condition_formula, boolean smoothing, int plane_type, double[] rotation_vals, double[] rotation_center, String user_plane, int user_plane_algorithm, String[] user_plane_conditions, String[] user_plane_condition_formula, double[] plane_transform_center, double plane_transform_angle, double plane_transform_radius, double[] plane_transform_scales, double[] plane_transform_wavelength, int waveType, double plane_transform_angle2, int plane_transform_sides, double plane_transform_amount, int converging_smooth_algorithm, OrbitTrapSettings ots, StatisticsSettings sts) { super(xCenter, yCenter, size, max_iterations, plane_type, rotation_vals, rotation_center, user_plane, user_plane_algorithm, user_plane_conditions, user_plane_condition_formula, plane_transform_center, plane_transform_angle, plane_transform_radius, plane_transform_scales, plane_transform_wavelength, waveType, plane_transform_angle2, plane_transform_sides, plane_transform_amount, ots); switch (out_coloring_algorithm) { case MainWindow.BINARY_DECOMPOSITION: convergent_bailout = 1E-9; break; case MainWindow.BINARY_DECOMPOSITION2: convergent_bailout = 1E-9; break; case MainWindow.USER_OUTCOLORING_ALGORITHM: convergent_bailout = 1E-7; break; } OutColoringAlgorithmFactory(out_coloring_algorithm, smoothing, converging_smooth_algorithm, user_out_coloring_algorithm, outcoloring_formula, user_outcoloring_conditions, user_outcoloring_condition_formula, plane_transform_center); InColoringAlgorithmFactory(in_coloring_algorithm, user_in_coloring_algorithm, incoloring_formula, user_incoloring_conditions, user_incoloring_condition_formula, plane_transform_center); if (sts.statistic) { StatisticFactory(sts, plane_transform_center); } n = 4; a = new double[n + 1]; //z^4 - 1 a[0] = -1; a[1] = 0; a[2] = 0; a[3] = 0; a[4] = 1; b = new double[n + 1]; b[n] = b[n - 1] = 0; f = new double[n + 1]; f[n] = f[n - 1] = 0; } //orbit public Bairstow4(double xCenter, double yCenter, double size, int max_iterations, ArrayList<Complex> complex_orbit, int plane_type, double[] rotation_vals, double[] rotation_center, String user_plane, int user_plane_algorithm, String[] user_plane_conditions, String[] user_plane_condition_formula, double[] plane_transform_center, double plane_transform_angle, double plane_transform_radius, double[] plane_transform_scales, double[] plane_transform_wavelength, int waveType, double plane_transform_angle2, int plane_transform_sides, double plane_transform_amount) { super(xCenter, yCenter, size, max_iterations, complex_orbit, plane_type, rotation_vals, rotation_center, user_plane, user_plane_algorithm, user_plane_conditions, user_plane_condition_formula, plane_transform_center, plane_transform_angle, plane_transform_radius, plane_transform_scales, plane_transform_wavelength, waveType, plane_transform_angle2, plane_transform_sides, plane_transform_amount); n = 4; a = new double[n + 1]; //z^4 - 1 a[0] = -1; a[1] = 0; a[2] = 0; a[3] = 0; a[4] = 1; b = new double[n + 1]; b[n] = b[n - 1] = 0; f = new double[n + 1]; f[n] = f[n - 1] = 0; } @Override protected void function(Complex[] complex) { bairstowMethod(complex[0]); } }
[ "hrkalona@gmail.com" ]
hrkalona@gmail.com
e640b31f582ee4b6c4c8741e729e68ff7214fd44
9404ab1090ec3fafab5711c1fd8bb93826415418
/Flynas/src/test/java/flynas/web/workflows/ConfirmationPage.java
03bb22efb4686296d9f70d4214c0755b73455413
[]
no_license
CignitiFlynas/IBE
1dda56769676dba54d174145e6d640762452c767
bc9c815a7767e6281a17847eb6babc3e110aaa73
refs/heads/master
2020-03-23T10:24:15.906149
2018-10-21T10:53:26
2018-10-21T10:53:26
141,441,302
0
0
null
2018-10-21T10:53:27
2018-07-18T13:50:08
Java
UTF-8
Java
false
false
2,485
java
package flynas.web.workflows; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import com.ctaf.utilities.Reporter; import flynas.web.testObjects.BookingPageLocators; public class ConfirmationPage<RenderedWebElement> extends BookingPageLocators { public String getReferenceNumber() throws Throwable{ waitforElement(BookingPageLocators.summaryRefNumber); waitUtilElementhasAttribute(BookingPageLocators.body); return getText(BookingPageLocators.summaryRefNumber, "Reference Number"); } public void closetoast() throws Throwable{ try{ //driver.switchTo().activeElement(); //String handle = driver.getWindowHandle(); List<WebElement> elements = driver.findElements(By.tagName("iframe")); System.out.println("No of iframes : "+ elements.size()); if(isElementPresent(BookingPageLocators.naSmileTaost)==true){ driver.switchTo().frame("yief130002"); System.out.println("nasmile Toast appeared"); click(BookingPageLocators.closetoast, "nasmile Toast close button"); } else{ System.out.println("No nasmile Toast"); } //driver.switchTo().window(handle); }catch (Exception e){ System.out.println("No nasmile Toast"); } } public void validate_ticketStatus(String pnr) throws Throwable { waitforElement(BookingPageLocators.summaryStatus); //waitUtilElementhasAttribute(BookingPageLocators.body); if(getText(BookingPageLocators.summaryStatus,"Status").trim().equals("Confirmed") ||getText(BookingPageLocators.summaryStatus,"Status").trim().equals("Pending") ||getText(BookingPageLocators.summaryStatus,"Status").trim().equals("Hold")) { String env = driver.getCurrentUrl(); if(env.contains("develop_r41")){projectUtilities.writingPNR("IBE_NAV_PNR",pnr);} else if(env.contains("uat")){projectUtilities.writingPNR("IBE_UAT_PNR",pnr);} else{projectUtilities.writingPNR("IBE_PROD_PNR",pnr);} Reporter.SuccessReport("Ticket Confirmation", "Ticket has booked with PNR "+pnr); } else { Reporter.failureReport("Ticket Confirmation", "Ticket has not booked"); } closetoast(); } public void navigatetommb(){ //Need to modify to click on modify button once the the redirection is fixed driver.get(mmburl); } public void navigatetowci(){ //Need to modify to click on modify button once the the redirection is fixed driver.get(chekinurl); } }
[ "RahuRam.k_33723617+E003901cigniti@users.noreply.github.com" ]
RahuRam.k_33723617+E003901cigniti@users.noreply.github.com
6f87c917a55061f9b92b7ccbd3d5e1ee21f8b8f7
4c1d6f74635109519657921d98907bbdda811cb4
/chrome/android/java/src/org/chromium/chrome/browser/contacts_picker/TopView.java
15b3d2ab6426657df2fdffe5ca981efb7e664027
[ "BSD-3-Clause" ]
permissive
imfht/chromium
151e060f8acf3b91899f74eb88367ed545751d9a
468df33f9f87dfc052a026fd736d055fb2614909
refs/heads/master
2023-01-13T08:15:21.509899
2019-01-30T06:35:03
2019-01-30T06:35:03
168,294,038
0
0
BSD-3-Clause
2022-06-15T06:41:16
2019-01-30T06:51:02
null
UTF-8
Java
false
false
3,602
java
// Copyright 2019 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.contacts_picker; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.RelativeLayout; import android.widget.TextView; import org.chromium.chrome.R; import java.text.NumberFormat; /** * A container class for the Disclaimer and Select All functionality (and both associated labels). */ public class TopView extends RelativeLayout implements CompoundButton.OnCheckedChangeListener { /** * An interface for communicating when the Select All checkbox is toggled. */ public interface SelectAllToggleCallback { /** * Called when the Select All checkbox is toggled. * @param allSelected Whether the Select All checkbox is checked. */ void onSelectAllToggled(boolean allSelected); } // The container box for the checkbox and its label and contact count. private View mCheckboxContainer; // The Select All checkbox. private CheckBox mSelectAllBox; // The label showing how many contacts were found. private TextView mContactCount; // The callback to use when notifying that the Select All checkbox was toggled. private SelectAllToggleCallback mSelectAllCallback; // Whether to temporarily ignore clicks on the checkbox. private boolean mIgnoreCheck; // The explanation string (explaining what is shared and with what site). private String mSiteString; public TopView(Context context, AttributeSet attrs) { super(context, attrs); // TODO(finnur): Plumb through the necessary data to show which website will be receiving // the contact data. mSiteString = context.getString(R.string.disclaimer_sharing_contact_details, "foo.com"); } @Override protected void onFinishInflate() { super.onFinishInflate(); mCheckboxContainer = findViewById(R.id.container); mSelectAllBox = findViewById(R.id.checkbox); mContactCount = findViewById(R.id.checkbox_details); TextView title = findViewById(R.id.checkbox_title); title.setText(R.string.contacts_picker_all_contacts); TextView explanation = findViewById(R.id.explanation); explanation.setText(mSiteString); } public void registerSelectAllCallback(SelectAllToggleCallback callback) { mSelectAllCallback = callback; } public void updateCheckboxVisibility(boolean visible) { if (visible) { mSelectAllBox.setOnCheckedChangeListener(this); } else { mCheckboxContainer.setVisibility(GONE); } } public void updateContactCount(int count) { mContactCount.setText(NumberFormat.getInstance().format(count)); } public void toggle() { mSelectAllBox.setChecked(!mSelectAllBox.isChecked()); } /** * Updates the state of the checkbox to reflect whether everything is selected. * @param allSelected */ public void updateSelectAllCheckbox(boolean allSelected) { mIgnoreCheck = true; mSelectAllBox.setChecked(allSelected); mIgnoreCheck = false; } @Override public void onCheckedChanged(CompoundButton compoundButton, boolean b) { if (!mIgnoreCheck) mSelectAllCallback.onSelectAllToggled(mSelectAllBox.isChecked()); } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
4fc82725733a0c1e099a82c6e62ea6edc4f0eb14
c9b8db6ceff0be3420542d0067854dea1a1e7b12
/web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb17/Rule_Hid_InformID_ADR.java
2f510b537bb0420e83e8ca4a51153a7f810993ef
[ "Apache-2.0" ]
permissive
ganzijo/portfolio
12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a
a31834b23308be7b3a992451ab8140bef5a61728
refs/heads/master
2021-04-15T09:25:07.189213
2018-03-22T12:11:00
2018-03-22T12:11:00
126,326,291
0
0
null
null
null
null
UTF-8
Java
false
false
2,170
java
package com.ke.css.cimp.fwb.fwb17; /* ----------------------------------------------------------------------------- * Rule_Hid_InformID_ADR.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:25:52 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_Hid_InformID_ADR extends Rule { public Rule_Hid_InformID_ADR(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_Hid_InformID_ADR parse(ParserContext context) { context.push("Hid_InformID_ADR"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 3 && f1; i1++) { Rule rule = Rule_Typ_Alpha.parse(context); if ((f1 = rule != null)) { a1.add(rule, context.index); c1++; } } parsed = c1 == 3; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_Hid_InformID_ADR(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("Hid_InformID_ADR", parsed); return (Rule_Hid_InformID_ADR)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "whdnfka111@gmail.com" ]
whdnfka111@gmail.com
510ddb5d936908b2502ad3f324bb58d541747983
fc6c869ee0228497e41bf357e2803713cdaed63e
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/appbrand/appcache/e.java
a7680fbdd5cc4c39c075247078fe22751ebc2e18
[]
no_license
hyb1234hi/reverse-wechat
cbd26658a667b0c498d2a26a403f93dbeb270b72
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
refs/heads/master
2020-09-26T10:12:47.484174
2017-11-16T06:54:20
2017-11-16T06:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
941
java
package com.tencent.mm.plugin.appbrand.appcache; import com.tencent.gmtrace.GMTrace; import com.tencent.mm.sdk.platformtools.w; public final class e { static int u(String paramString1, String paramString2, String paramString3) { GMTrace.i(19993609633792L, 148964); try { int i = WABSPatch.bspatch(paramString1, paramString2, paramString3); GMTrace.o(19993609633792L, 148964); return i; } catch (Exception localException) { w.e("MicroMsg.AppBrand.IncrementalPkgLogic[incremental]", "mergeDiffPkg e = %s, old[%s], new[%s], diff[%s]", new Object[] { localException, paramString1, paramString2, paramString3 }); GMTrace.o(19993609633792L, 148964); } return 1; } } /* Location: D:\tools\apktool\weixin6519android1140\jar\classes2-dex2jar.jar!\com\tencent\mm\plugin\appbrand\appcache\e.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "robert0825@gmail.com" ]
robert0825@gmail.com
fba90a4150da0453e505c579daffd7350a6c61db
363c936f4a89b7d3f5f4fb588e8ca20c527f6022
/AL-Game/src/com/aionemu/gameserver/skillengine/effect/SummonHomingEffect.java
7150897bf392935fb1c1f5343480505ab6603658
[]
no_license
G-Robson26/AionServer-4.9F
d628ccb4307aa0589a70b293b311422019088858
3376c78b8d90bd4d859a7cfc25c5edc775e51cbf
refs/heads/master
2023-09-04T00:46:47.954822
2017-08-09T13:23:03
2017-08-09T13:23:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,353
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Aion-Lightning 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 Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.skillengine.effect; import java.util.concurrent.Future; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import com.aionemu.gameserver.ai2.event.AIEventType; import com.aionemu.gameserver.controllers.observer.ActionObserver; import com.aionemu.gameserver.controllers.observer.ObserverType; import com.aionemu.gameserver.model.TaskId; import com.aionemu.gameserver.model.gameobjects.Creature; import com.aionemu.gameserver.model.gameobjects.Homing; import com.aionemu.gameserver.model.templates.spawns.SpawnTemplate; import com.aionemu.gameserver.skillengine.SkillEngine; import com.aionemu.gameserver.skillengine.model.Effect; import com.aionemu.gameserver.spawnengine.SpawnEngine; import com.aionemu.gameserver.spawnengine.VisibleObjectSpawner; import com.aionemu.gameserver.utils.ThreadPoolManager; /** * @author ATracer * @modified Kill3r */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SummonHomingEffect") public class SummonHomingEffect extends SummonEffect { @XmlAttribute(name = "npc_count", required = true) protected int npcCount; @XmlAttribute(name = "attack_count", required = true) protected int attackCount; @XmlAttribute(name = "skill_id", required = false) protected int skillId; @Override public void applyEffect(Effect effect) { final Creature effected = effect.getEffected(); final Creature effector = effect.getEffector(); float x = effector.getX(); float y = effector.getY(); float z = effector.getZ(); byte heading = effector.getHeading(); int worldId = effector.getWorldId(); int instanceId = effector.getInstanceId(); for (int i = 0; i < npcCount; i++) { SpawnTemplate spawn = SpawnEngine.addNewSingleTimeSpawn(worldId, npcId, x, y, z, heading); final Homing homing = VisibleObjectSpawner.spawnHoming(spawn, instanceId, effector, attackCount, effect.getSkillId(), effect.getSkillLevel(), skillId); if (attackCount > 0) { ActionObserver observer = new ActionObserver(ObserverType.ATTACK) { @Override public void attack(Creature creature) { homing.setAttackCount(homing.getAttackCount() - 1); if(skillId != 0){ SkillEngine.getInstance().applyEffectDirectly(skillId, effector, effected, 0); } if (homing.getAttackCount() <= 0) { homing.getController().onDelete(); } } }; homing.getObserveController().addObserver(observer); effect.setActionObserver(observer, position); } // Schedule a despawn just in case Future<?> task = ThreadPoolManager.getInstance().schedule(new Runnable() { @Override public void run() { if ((homing != null) && (homing.isSpawned())) { homing.getController().onDelete(); } } }, 15 * 1000); homing.getController().addTask(TaskId.DESPAWN, task); homing.getAi2().onCreatureEvent(AIEventType.ATTACK, effect.getEffected()); } } }
[ "falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed" ]
falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed
f0267ffbf091b279c11b8e3e8cf4b19ceb23abd2
7204abbbd6f9894b467855bf6684f9bb84fe2f4e
/sc-order/src/main/java/com/architect/feign/impl/DefaultUserServiceImpl.java
20fa8c931e7801d4233503c28cdb181078fc21ed
[]
no_license
WilliamJiaCN/springcloud
4310934b8049cb1512c5021a4a0f378dae102f4c
062ac7c109dcafb88f4d467f40ccf076b9ca66e8
refs/heads/master
2020-03-24T10:32:37.298574
2018-08-19T14:09:33
2018-08-19T14:09:33
142,659,709
0
0
null
null
null
null
UTF-8
Java
false
false
512
java
package com.architect.feign.impl; import com.architect.api.dto.User; import com.architect.feign.UserService; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; /** * @author wenxiong.jia * @since 2018/8/8 */ @Service public class DefaultUserServiceImpl implements UserService { @Override public User getUserById(Long id) { return new User(); } @Override public List<User> getUserList() { return new ArrayList<>(); } }
[ "jiawenxiong@newbeescm.com" ]
jiawenxiong@newbeescm.com
16f5065f5579aff7f0f6e6e04f4da7c6f89fb6a1
c30d4f174a28aac495463f44b496811ee0c21265
/platform/vcs-api/src/com/intellij/util/ProducerConsumer.java
01a89140185361f42535a62456ad1f83aad7812a
[ "Apache-2.0" ]
permissive
sarvex/intellij-community
cbbf08642231783c5b46ef2d55a29441341a03b3
8b8c21f445550bd72662e159ae715e9d944ba140
refs/heads/master
2023-05-14T14:32:51.014859
2023-05-01T06:59:21
2023-05-01T06:59:21
32,571,446
0
0
Apache-2.0
2023-05-01T06:59:22
2015-03-20T08:16:17
Java
UTF-8
Java
false
false
3,381
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.util; import com.intellij.openapi.application.ApplicationManager; import com.intellij.util.concurrency.Semaphore; import java.util.ArrayDeque; /** * @author irengrig * Date: 7/5/11 * Time: 1:48 AM */ public class ProducerConsumer<T> { public static final int ourDefaultMaxSize = 20; private final ArrayDeque<T> myQueue; private final Consumer<T> myConsumer; private final int myMaxSize; private final Object myLock; private final ConsumerRunnable myConsumerThread; private boolean myIsAlive; public ProducerConsumer(final Consumer<T> consumer) { this(consumer, ourDefaultMaxSize); } public void start() { myIsAlive = true; myConsumerThread.start(); } public void stop() { synchronized (myLock) { myIsAlive = false; myLock.notifyAll(); } } public ProducerConsumer(final Consumer<T> consumer, final int maxSize) { this(consumer, maxSize, false); } public ProducerConsumer(final Consumer<T> consumer, final int maxSize, final boolean onPooledThread) { myConsumer = consumer; myQueue = new ArrayDeque<T>(); myMaxSize = maxSize; myLock = new Object(); if (onPooledThread) { myConsumerThread = new PooledConsumerRunnable(); ApplicationManager.getApplication().executeOnPooledThread(myConsumerThread); } else { myConsumerThread = new ConsumerRunnable(); } } private class PooledConsumerRunnable extends ConsumerRunnable { private final Semaphore mySemaphore; private PooledConsumerRunnable() { mySemaphore = new Semaphore(); mySemaphore.down(); } public void start() { mySemaphore.up(); } @Override protected void waitForStart() { mySemaphore.waitFor(); } } private class ConsumerRunnable implements Runnable { private Thread myThread; public void start() { myThread.start(); } public void setThread(Thread thread) { myThread = thread; } @Override public void run() { waitForStart(); synchronized (myLock) { while (myIsAlive) { if (! myQueue.isEmpty()) { myConsumer.consume(myQueue.removeFirst()); } else { try { myLock.wait(10); } catch (InterruptedException e) { // } } } } } protected void waitForStart() { } } public void produce(final T t) { synchronized (myLock) { while (myQueue.size() >= myMaxSize) { try { myLock.notifyAll(); myLock.wait(10); } catch (InterruptedException e) { // } } myQueue.addLast(t); myLock.notifyAll(); } } }
[ "Irina.Chernushina@jetbrains.com" ]
Irina.Chernushina@jetbrains.com
9aff5955ac0ddec9e3d44b58fff7cd1fd2d88427
74ae24d049cfcab4f477dde92367094890aec688
/services/project_service/src/java/main/com/topcoder/service/project/ProjectHasCompetitionsFault.java
65e2300383eeba3a13688b4a0cccc934a4d8244b
[]
no_license
appirio-tech/direct-app
8fa562f769db792eb244948f0d375604ac853ef1
002aa5e67064a85ed9752d651d86403b1268cf38
refs/heads/dev
2023-08-09T20:01:29.514463
2022-12-21T01:19:53
2022-12-21T01:19:53
23,885,120
21
78
null
2022-12-21T01:41:11
2014-09-10T17:49:11
Java
UTF-8
Java
false
false
1,148
java
/* * Copyright (C) 2008 TopCoder Inc., All Rights Reserved. */ package com.topcoder.service.project; /** * <p> * This exception is thrown to indicate the fault that a project to be deleted has competitions. * </p> * <p> * It extends <code>{@link ProjectServiceFault}</code> to get the functionality of error messages. Note that no cause * is stored since the cause will not be serialized/deserialized as part of the WSDL fault contract. * </p> * <p> * <b>Thread Safety</b>: This class is thread safe as it has no state and the super class is thread safe. * </p> * * @author humblefool, FireIce * @version 1.0 */ public class ProjectHasCompetitionsFault extends ProjectServiceFault { /** * <p> * Represents the serial version unique id. * </p> */ private static final long serialVersionUID = 6084373770205177760L; /** * <p> * Constructs this fault with an error message. * </p> * * @param message * The error message describing this fault. Possibly null/empty. */ public ProjectHasCompetitionsFault(String message) { super(message); } }
[ "hohosky@gmail.com" ]
hohosky@gmail.com
8a70af06f559c40d8567be28d5ad6a82582ebfef
3c18b4ab3a20dab175dc48758835fb1a854a92c8
/src-advance/cpp/gdb/GdbMonitorAllConfigCreator.java
5c5d580bfe7d1a82ddf3f3e8e060d8367f363ab9
[ "Apache-2.0" ]
permissive
lta-disco-unimib-it/BCT
2c6bcf52894db8798d8ad14c7ebe066262dd22e4
1c7fcb52f42bae9f5169c94032ded919cb1c42c4
refs/heads/master
2020-08-24T16:32:03.904958
2019-10-22T20:30:10
2019-10-22T20:30:10
216,863,231
0
0
null
null
null
null
UTF-8
Java
false
false
1,821
java
/******************************************************************************* * Copyright 2019 Fabrizio Pastore, Leonardo Mariani * * 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 cpp.gdb; import java.io.File; import java.io.IOException; public class GdbMonitorAllConfigCreator { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { // TODO Auto-generated method stub File parentFile = new File( args[0]); GdbMonitorAllConfigCreator c = new GdbMonitorAllConfigCreator(); File output = new File(args[1]); c.createConfig( output, parentFile ); } private void createConfig(File output, File parentFile) throws IOException { // List<FunctionMonitoringData> childrenDefs = GdbRegressionConfigCreator.extractFunctionsDefinitions( parentFile ); // // BufferedWriter w = new BufferedWriter ( new FileWriter( output ) ); // // // GdbRegressionConfigCreator.writeHeader( w ); // // // for (FunctionMonitoringData def : childrenDefs ){ // GdbRegressionConfigCreator.writeChildDef( w, def ); // } // // // GdbRegressionConfigCreator.writeFooter(w); // // w.close(); } }
[ "fabrizio.pastore@gmail.com" ]
fabrizio.pastore@gmail.com
0cff0a4d46da4ab663c11df7bc3dfdd35c7fd4b6
20542169d10f4bbf1c5379c79948a1daddaedc60
/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java
95a69f00b0028f101ccbe67b9ce6b296b7deaf1c
[ "MIT" ]
permissive
DarkShadow44/bartworks
a2c7d2388d2e08ccbd68625475998cff085d9ffb
4c8957f3b456d981cdcded36aba79002b8487a44
refs/heads/master
2020-05-19T07:30:35.007374
2019-04-28T20:14:43
2019-04-28T20:14:43
184,899,516
0
0
MIT
2019-05-04T13:38:06
2019-05-04T13:38:06
null
UTF-8
Java
false
false
4,864
java
/* * Copyright (c) 2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.github.bartimaeusnek.bartworks.system.oregen; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; import gregtech.api.enums.Materials; import gregtech.api.interfaces.ISubTagContainer; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidRegistry; import static com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy.uo_dimensionList; public class BW_WorldGenRoss128b extends BW_OreLayer { public Block getDefaultBlockToReplace(){ return Blocks.stone; } public BW_WorldGenRoss128b(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, ISubTagContainer top, ISubTagContainer bottom, ISubTagContainer between, ISubTagContainer sprinkled) { super(aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, top, bottom, between, sprinkled); } public static void init_OresRoss128() { new BW_WorldGenRoss128b("ore.mix.ross128.Thorianit", true, 30, 60, 17, 1, 16, WerkstoffLoader.Thorianit, Materials.Uraninite, Materials.Lepidolite, Materials.Spodumene); new BW_WorldGenRoss128b("ore.mix.ross128.carbon", true, 5, 25, 5, 4, 12, Materials.Graphite, Materials.Diamond, Materials.Coal, Materials.Graphite); new BW_WorldGenRoss128b("ore.mix.ross128.bismuth", true, 5, 80, 30, 1, 16, WerkstoffLoader.Bismuthinit, Materials.Stibnite, Materials.Bismuth, WerkstoffLoader.Bismutite); new BW_WorldGenRoss128b("ore.mix.ross128.TurmalinAlkali", true, 5, 200, 15, 4, 48, WerkstoffLoader.Olenit, WerkstoffLoader.FluorBuergerit, WerkstoffLoader.ChromoAluminoPovondrait, WerkstoffLoader.VanadioOxyDravit); new BW_WorldGenRoss128b("ore.mix.ross128.Roquesit", true, 5, 250, 3, 1, 12, WerkstoffLoader.Arsenopyrite, WerkstoffLoader.Ferberite, WerkstoffLoader.Loellingit, WerkstoffLoader.Roquesit); new BW_WorldGenRoss128b("ore.mix.ross128.Tungstate", true, 5, 250, 10, 4, 14, WerkstoffLoader.Ferberite, WerkstoffLoader.Huebnerit, WerkstoffLoader.Loellingit, Materials.Scheelite); new BW_WorldGenRoss128b("ore.mix.ross128.CopperSulfits", true, 40, 70, 80, 3, 24, WerkstoffLoader.Djurleit, WerkstoffLoader.Bornite, WerkstoffLoader.Wittichenit, Materials.Tetrahedrite); new BW_WorldGenRoss128b("ore.mix.ross128.Forsterit", true, 20, 180, 50, 2, 32, WerkstoffLoader.Forsterit, WerkstoffLoader.Fayalit, WerkstoffLoader.DescloiziteCUVO4, WerkstoffLoader.DescloiziteZNVO4); new BW_WorldGenRoss128b("ore.mix.ross128.Hedenbergit", true, 20, 180, 50, 2, 32, WerkstoffLoader.Hedenbergit, WerkstoffLoader.Fayalit, WerkstoffLoader.DescloiziteCUVO4, WerkstoffLoader.DescloiziteZNVO4); new BW_WorldGenRoss128b("ore.mix.ross128.RedZircon", true, 10, 40, 40, 3, 24, WerkstoffLoader.Fayalit,WerkstoffLoader.FuchsitAL , WerkstoffLoader.RedZircon,WerkstoffLoader.FuchsitCR); } public static void init_undergroundFluidsRoss128() { String ross128b = StatCollector.translateToLocal("planet.Ross128b"); uo_dimensionList.SetConfigValues(ross128b, ross128b, "veryheavyoil", "liquid_extra_heavy_oil", 0, 625, 40, 5); uo_dimensionList.SetConfigValues(ross128b, ross128b, "lava", FluidRegistry.getFluidName(FluidRegistry.LAVA), 0, 32767, 5, 5); uo_dimensionList.SetConfigValues(ross128b, ross128b, "gas_natural_gas", "gas_natural_gas", 0, 625, 65, 5); } @Override public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { return aWorld.provider.dimensionId == ConfigHandler.ross128BID; } }
[ "33183715+bartimaeusnek@users.noreply.github.com" ]
33183715+bartimaeusnek@users.noreply.github.com
9a714d5488a1619b3c9d18757a018651246a026a
fc05322703594e40548f8e738449b9418efb7518
/src/main/java/lmdb/db/JdbcDataManager.java
2d7b182c55bef282352e9f258779b10d386cc8c6
[]
no_license
mauricioscastro/basex-lmdb
0028994871be99ec1f5d86738adfad18983d3046
bb8f32b800cb0f894c398c0019bc501196a1a801
refs/heads/master
2021-01-21T00:08:36.905964
2017-09-26T17:39:31
2017-09-26T17:39:31
41,042,448
1
1
null
2017-09-26T14:58:24
2015-08-19T15:24:11
Java
UTF-8
Java
false
false
2,118
java
package lmdb.db; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import lmdb.basex.LmdbQueryContext; import org.apache.log4j.Logger; import java.util.concurrent.ConcurrentHashMap; public class JdbcDataManager { private static final Logger logger = Logger.getLogger(JdbcDataManager.class); public static final ConcurrentHashMap<String,HikariDataSource> datasource = new ConcurrentHashMap<String,HikariDataSource>(); protected JdbcDataManager() {} public static synchronized void config(String config) { try { if (Boolean.parseBoolean(LmdbQueryContext.queryString("empty(//datasources/datasource)", config))) return; for (String id : LmdbQueryContext.queryString("for $d in //datasources/datasource return string($d/@id)", config).split("\\s")) { HikariConfig hcfg = new HikariConfig(); hcfg.setJdbcUrl(LmdbQueryContext.queryString("//datasources/datasource[@id='" + id + "']/jdbcburl/text()", config)); hcfg.setUsername(LmdbQueryContext.queryString("//datasources/datasource[@id='" + id + "']/username/text()", config)); hcfg.setPassword(LmdbQueryContext.queryString("//datasources/datasource[@id='" + id + "']/password/text()", config)); for (String name : LmdbQueryContext.queryString("for $p in //datasources/datasource[@id='" + id + "']/property return string($p/@name)", config).split("\\s")) { if (name.trim().isEmpty()) continue; hcfg.addDataSourceProperty(name, LmdbQueryContext.queryString("//datasources/datasource[@id='" + id + "']/property[@name='" + name + "']/text()", config)); } datasource.put(id, new HikariDataSource(hcfg)); } } catch(Exception e) { logger.warn(e.getMessage()); if (logger.isDebugEnabled()) logger.debug("", e); } } public static synchronized void stop() { for(HikariDataSource ds: datasource.values()) try { ds.close(); } catch(Exception i) {} } }
[ "mauricioscastro@hotmail.com" ]
mauricioscastro@hotmail.com
db04b3c149b4fafc0851c160d806115fc52da18f
6661c3c6a3093157d3c173e63642359b019c20c2
/app/src/main/java/com/mike4christ/travelmantics/DetailActivity.java
112d69b1e5a1f3abb17d6bddc8e3c076ac882945
[]
no_license
alumichael/Travelmantics
b35a7b797b992a9c29bd3b0a637c38ba41ff6d70
2d3ac2fbd68313f9f2658fb9be5dfb40334771e3
refs/heads/master
2020-06-30T00:42:49.589440
2019-08-05T14:22:29
2019-08-05T14:22:29
200,670,081
0
0
null
null
null
null
UTF-8
Java
false
false
2,149
java
package com.mike4christ.travelmantics; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; import com.google.android.material.snackbar.Snackbar; import com.wang.avi.AVLoadingIndicatorView; import butterknife.BindView; public class DetailActivity extends AppCompatActivity { @BindView(R.id.detail_layout) LinearLayout detailLayout; @BindView(R.id.img) ImageView img; @BindView(R.id.place) TextView place; @BindView(R.id.desc) TextView desc; @BindView(R.id.amount) TextView amount; @BindView(R.id.progress) AVLoadingIndicatorView progress; @BindView(R.id.data_layout) LinearLayout data_layout; String placeStrg="",amountStrg="",descStrg="",img_url=""; NetworkConnection networkConnection=new NetworkConnection(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detail); Intent intent=getIntent(); placeStrg=intent.getStringExtra("place_title"); amountStrg=intent.getStringExtra("amount"); descStrg=intent.getStringExtra("description"); img_url=intent.getStringExtra("img_url"); progress.setVisibility(View.VISIBLE); data_layout.setVisibility(View.GONE); if(networkConnection.isNetworkConnected(this)){ ImageView imageView = this.img; if (imageView != null) { Glide.with(imageView.getContext()).load(img_url).apply(new RequestOptions().fitCenter().circleCrop()).into(this.img); progress.setVisibility(View.VISIBLE); data_layout.setVisibility(View.GONE); } }else { showMessage("No Internet Connection"); } } private void showMessage(String s) { Snackbar.make(detailLayout, s, Snackbar.LENGTH_SHORT).show(); } }
[ "alumichael9@gmail.com" ]
alumichael9@gmail.com
90a7965f3fe6fde8a13693f34b19fdd5dc7d9b6b
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/d/a/c/bz.java
f74c3220a89b071088a704101073ec52891b0716
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
4,892
java
package com.d.a.c; import android.text.TextUtils; import android.util.Base64; import com.d.a.a.a; import com.d.a.a.e; import com.d.a.a.h; import com.d.a.af; import com.d.a.ag; import com.d.a.ai; import com.d.a.bo; import com.d.a.q; import java.nio.ByteBuffer; import java.nio.LongBuffer; import java.security.MessageDigest; import java.util.LinkedList; import java.util.UUID; public class bz implements bu { ag a; bc b; a c; private LinkedList<ai> d; private af e; private bx f; private e g; private bv h; private bw i; public bz(af paramaf) { this.e = paramaf; this.a = new ag(this.e); } public static bu a(av paramav, w paramw) { if (paramw == null) {} String str1; String str2; do { do { do { return null; } while ((paramw.m() != 101) || (!"websocket".equalsIgnoreCase(paramw.f_().a("Upgrade")))); str1 = paramw.f_().a("Sec-WebSocket-Accept"); } while (str1 == null); str2 = paramav.a("Sec-WebSocket-Key"); } while ((str2 == null) || (!str1.equalsIgnoreCase(c(str2 + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11").trim()))); paramav = paramav.a("Sec-WebSocket-Extensions"); boolean bool2 = false; boolean bool1 = bool2; if (paramav != null) { bool1 = bool2; if (paramav.equals("x-webkit-deflate-frame")) { bool1 = true; } } paramav = new bz(paramw.c()); paramav.a(true, bool1); return paramav; } public static void a(u paramu, String paramString) { av localav = paramu.e(); String str = Base64.encodeToString(a(UUID.randomUUID()), 2); localav.a("Sec-WebSocket-Version", "13"); localav.a("Sec-WebSocket-Key", str); localav.a("Sec-WebSocket-Extensions", "x-webkit-deflate-frame"); localav.a("Connection", "Upgrade"); localav.a("Upgrade", "websocket"); if (paramString != null) { localav.a("Sec-WebSocket-Protocol", paramString); } localav.a("Pragma", "no-cache"); localav.a("Cache-Control", "no-cache"); if (TextUtils.isEmpty(paramu.e().a("User-Agent"))) { paramu.e().a("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.15 Safari/537.36"); } } private void a(boolean paramBoolean1, boolean paramBoolean2) { this.b = new ca(this, this.e); this.b.a(paramBoolean1); this.b.b(paramBoolean2); if (this.e.k()) { this.e.j(); } } private static byte[] a(UUID paramUUID) { byte[] arrayOfByte = new byte[16]; ByteBuffer.wrap(arrayOfByte).asLongBuffer().put(new long[] { paramUUID.getMostSignificantBits(), paramUUID.getLeastSignificantBits() }); return arrayOfByte; } private void b(ai paramai) { if (this.d == null) { bo.a(this, paramai); if (paramai.d() > 0) { this.d = new LinkedList(); this.d.add(paramai); } } do { return; do { paramai = (ai)this.d.remove(); bo.a(this, paramai); if (paramai.d() > 0) { this.d.add(0, paramai); } } while (!k()); } while (this.d.size() != 0); this.d = null; } private static String c(String paramString) { try { MessageDigest localMessageDigest = MessageDigest.getInstance("SHA-1"); localMessageDigest.update(paramString.getBytes("iso-8859-1"), 0, paramString.length()); paramString = Base64.encodeToString(localMessageDigest.digest(), 2); return paramString; } catch (Exception paramString) {} return null; } public void a() { this.e.a(); } public void a(a parama) { this.e.a(parama); } public void a(e parame) { this.g = parame; } public void a(h paramh) { this.a.a(paramh); } public void a(ai paramai) { a(paramai.a()); } public void a(bw parambw) { this.i = parambw; } public void a(String paramString) { this.a.a(new ai(this.b.a(paramString))); } public void a(byte[] paramArrayOfByte) { this.a.a(new ai(this.b.a(paramArrayOfByte))); } public void b(a parama) { this.c = parama; } public void b(String paramString) { this.a.a(new ai(new ByteBuffer[] { ByteBuffer.wrap(this.b.b(paramString)) })); } public void d() { this.e.d(); } public e f() { return this.g; } public h g() { return this.a.g(); } public a h() { return this.c; } public boolean i() { return this.e.i(); } public void j() { this.e.j(); } public boolean k() { return this.e.k(); } public q l() { return this.e.l(); } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\d\a\c\bz.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
ff8162e1e6e6add4b19798d514b97fa040855568
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/protocal/c/ant.java
f9a36bbdffdbb691c2a607c7dad1690d1ea4a786
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,394
java
package com.tencent.mm.protocal.c; import com.tencent.mm.bk.a; public final class ant extends a { public int rQv; public int rQw; protected final int a(int i, Object... objArr) { if (i == 0) { f.a.a.c.a aVar = (f.a.a.c.a) objArr[0]; aVar.fT(1, this.rQv); aVar.fT(2, this.rQw); return 0; } else if (i == 1) { return (f.a.a.a.fQ(1, this.rQv) + 0) + f.a.a.a.fQ(2, this.rQw); } else { if (i == 2) { f.a.a.a.a aVar2 = new f.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (int a = a.a(aVar2); a > 0; a = a.a(aVar2)) { if (!super.a(aVar2, this, a)) { aVar2.cJS(); } } return 0; } else if (i != 3) { return -1; } else { f.a.a.a.a aVar3 = (f.a.a.a.a) objArr[0]; ant ant = (ant) objArr[1]; switch (((Integer) objArr[2]).intValue()) { case 1: ant.rQv = aVar3.vHC.rY(); return 0; case 2: ant.rQw = aVar3.vHC.rY(); return 0; default: return -1; } } } } }
[ "707194831@qq.com" ]
707194831@qq.com
42836d9d5686f044fcd464f2e6c22d76d7c63e24
2122d24de66635b64ec2b46a7c3f6f664297edc4
/dp/src/main/java/com/lee/dp/state/example3/RepeatVoteState.java
85a01b0560d30b637d43ba109243b899407be35e
[]
no_license
yiminyangguang520/Java-Learning
8cfecc1b226ca905c4ee791300e9b025db40cc6a
87ec6c09228f8ad3d154c96bd2a9e65c80fc4b25
refs/heads/master
2023-01-10T09:56:29.568765
2022-08-29T05:56:27
2022-08-29T05:56:27
92,575,777
5
1
null
2023-01-05T05:21:02
2017-05-27T06:16:40
Java
UTF-8
Java
false
false
264
java
package com.lee.dp.state.example3; public class RepeatVoteState implements VoteState { public void vote(String user, String voteItem, VoteManager voteManager) { //重复投票 //暂时不做处理 System.out.println("请不要重复投票"); } }
[ "litz-a@glodon.com" ]
litz-a@glodon.com
3d2ca1df874e27e3fb5a0296639cec630c9f2809
b513cb72a001f69174c4e979721910b57e03f3b9
/app/src/main/java/com/example/rumens/showtime/inject/component/SeachMusicShowListComponent.java
6623a184ed817def88b0a94ca124bd6f29a5b42e
[]
no_license
HappyGhostz/ShowTime
71e12e70dae66d7ecfe9ddcf68d48f7c5960c2a0
2b65960c0273f0862b92c96791e87bf380620342
refs/heads/master
2021-01-20T09:02:27.464515
2017-07-18T09:32:47
2017-07-18T09:32:47
90,214,365
9
3
null
null
null
null
UTF-8
Java
false
false
544
java
package com.example.rumens.showtime.inject.component; import com.example.rumens.showtime.inject.PerActivity; import com.example.rumens.showtime.inject.modules.SeachMusicShowListModule; import com.example.rumens.showtime.music.searchmusic.SearchMusicShow; import dagger.Component; /** * @author Zhao Chenping * @creat 2017/7/3. * @description */ @PerActivity @Component(dependencies = AppComponent.class,modules = SeachMusicShowListModule.class) public interface SeachMusicShowListComponent { void inject(SearchMusicShow activity); }
[ "zcphappyghost@163.com" ]
zcphappyghost@163.com
28d80dd85ad38170a6f87d9016f5c0561726608a
7dbbe21b902fe362701d53714a6a736d86c451d7
/BzenStudio-5.6/Source/com/zend/ide/f/b/f.java
cd49eab8f5c69a06d833fdd07744dc499ea86e06
[]
no_license
HS-matty/dev
51a53b4fd03ae01981549149433d5091462c65d0
576499588e47e01967f0c69cbac238065062da9b
refs/heads/master
2022-05-05T18:32:24.148716
2022-03-20T16:55:28
2022-03-20T16:55:28
196,147,486
0
0
null
null
null
null
UTF-8
Java
false
false
1,134
java
package com.zend.ide.f.b; import com.zend.ide.b.m; import com.zend.ide.f.s; import com.zend.ide.m.bd; import com.zend.ide.util.ct; import com.zend.ide.util.cv; import javax.swing.Icon; import javax.swing.ImageIcon; public class f extends b { private static final ImageIcon m = cv.b("classbrowser/phpconstantdata.gif"); public f(bd parambd, s params) { super(params, parambd, false); } public String toString() { bd localbd = (bd)this.userObject; String str = localbd.a() + " = " + localbd.c(); return str; } public String g() { bd localbd = (bd)this.userObject; String str = localbd.a() + " = " + localbd.c(); if (localbd.e()) str = str + "\n" + localbd.f().c(); if ((localbd.b() != null) && (!localbd.b().equals("")) && (!localbd.b().equals(ct.a(558)))) str = str + "\n" + localbd.b(); return str; } public Icon e() { return m; } public String f() { return "constantsDataContext"; } } /* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar * Qualified Name: com.zend.ide.f.b.f * JD-Core Version: 0.6.0 */
[ "byqdes@gmail.com" ]
byqdes@gmail.com
14d5b65d03cafb40a89d9d9986b73b587fc2d06b
9d3d9353dbaaad62058f38fe2a2772a7fabb4c6b
/AsyncSpringSecurity/src/main/java/me/arhrina/asynchronous/security/config/AjaxSecurityConfig.java
62a264e4b65584cf2f2ea4812c7a95e6473814cd
[]
no_license
arhrina/toyPrj
0504fdf3d637f5889a296621adc26ec026f42c7c
ff95098e3443a7c3566e5f0342db24351555ee3b
refs/heads/master
2022-12-21T15:58:58.931728
2021-12-06T08:09:10
2021-12-06T08:09:10
246,988,233
0
0
null
2022-12-16T15:23:00
2020-03-13T04:29:47
Java
UTF-8
Java
false
false
4,170
java
package me.arhrina.asynchronous.security.config; import me.arhrina.asynchronous.handler.AjaxFailureHandler; import me.arhrina.asynchronous.handler.AjaxSuccessHandler; import me.arhrina.asynchronous.security.common.AjaxAccessDeniedHandler; import me.arhrina.asynchronous.security.common.AjaxLoginAuthenticationEntryPoint; import me.arhrina.asynchronous.security.filter.AjaxLoginProcessingFilter; import me.arhrina.asynchronous.security.provider.AjaxAuthenticationProvider; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.web.access.AccessDeniedHandler; import org.springframework.security.web.authentication.AuthenticationFailureHandler; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; @Configuration @Order(0) public class AjaxSecurityConfig extends WebSecurityConfigurerAdapter { // 설정클래스가 여러개 있을 경우, 스프링에 동작 순서를 줘야한다 @Bean public AuthenticationSuccessHandler authenticationSuccessHandler() { return new AjaxSuccessHandler(); }; @Bean public AuthenticationFailureHandler authenticationFailureHandler() { return new AjaxFailureHandler(); }; // 생성한 Provider를 인증에서 사용하도록 설정하기 위해 override @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.authenticationProvider(ajaxAuthenticationProvider()); } @Bean public AuthenticationProvider ajaxAuthenticationProvider() { return new AjaxAuthenticationProvider(); } @Override protected void configure(HttpSecurity http) throws Exception { http .antMatcher("/api/**, /api**") .authorizeRequests() .anyRequest().authenticated() .and() /** * add 관련해서 4개의 api가 존재. Filter의 위치를 지정하여 추가 * 1. addFilterBefore * - 추가하는 필터를 기존 특정 필터 전에 동작 * 2. addFilter * - 가장 마지막에 필터 추가 * 3. addFilterAfter * - 추가하는 필터를 기존 특정 필터 바로 뒤에 동작 * 4. addFilterAt * - 특정 필터를 대체하고자 할 때 * */ .addFilterBefore(ajaxLoginProcessingFilter(), UsernamePasswordAuthenticationFilter.class) .exceptionHandling() .authenticationEntryPoint(new AjaxLoginAuthenticationEntryPoint()) // 인증 예외 처리 .accessDeniedHandler(ajaxAccessDeniedHandler()) // 인가 예외 처리 ; } @Bean public AccessDeniedHandler ajaxAccessDeniedHandler() { return new AjaxAccessDeniedHandler(); } @Bean public AjaxLoginProcessingFilter ajaxLoginProcessingFilter() throws Exception { AjaxLoginProcessingFilter ajaxLoginProcessingFilter = new AjaxLoginProcessingFilter(); ajaxLoginProcessingFilter.setAuthenticationManager(authenticationManagerBean()); ajaxLoginProcessingFilter.setAuthenticationSuccessHandler(authenticationSuccessHandler()); ajaxLoginProcessingFilter.setAuthenticationFailureHandler(authenticationFailureHandler()); return ajaxLoginProcessingFilter; } }
[ "hyoukim@naver.com" ]
hyoukim@naver.com
8def24a8563e777e1ab11281b79e02d14a625578
883a0e13d7d5820f8d4d1dfb642c3ea9fe5afc34
/configurationrepository-impl/src/main/java/ai/labs/resources/impl/config/http/rest/RestHttpCallsStore.java
02fa5910d25473da2bf401313761dc2026737b66
[ "Apache-2.0" ]
permissive
EdtechFoundry/EDDI
0aad06d22ce011e612cf509dc59cafe73db5767e
201cf9b0304e0a9046030f42f6014242886309c7
refs/heads/master
2023-04-13T07:54:22.427808
2022-03-31T09:51:05
2022-03-31T09:51:05
96,883,190
0
0
Apache-2.0
2023-04-03T23:52:46
2017-07-11T10:51:54
Java
UTF-8
Java
false
false
3,418
java
package ai.labs.resources.impl.config.http.rest; import ai.labs.models.DocumentDescriptor; import ai.labs.persistence.IResourceStore; import ai.labs.resources.impl.resources.rest.RestVersionInfo; import ai.labs.resources.rest.config.http.IHttpCallsStore; import ai.labs.resources.rest.config.http.IRestHttpCallsStore; import ai.labs.resources.rest.config.http.model.HttpCallsConfiguration; import ai.labs.resources.rest.documentdescriptor.IDocumentDescriptorStore; import ai.labs.rest.restinterfaces.factory.IRestInterfaceFactory; import ai.labs.rest.restinterfaces.factory.RestInterfaceFactory; import ai.labs.schema.IJsonSchemaCreator; import lombok.extern.slf4j.Slf4j; import javax.inject.Inject; import javax.ws.rs.core.Response; import java.util.List; /** * @author ginccc */ @Slf4j public class RestHttpCallsStore extends RestVersionInfo<HttpCallsConfiguration> implements IRestHttpCallsStore { private final IHttpCallsStore httpCallsStore; private final IJsonSchemaCreator jsonSchemaCreator; private IRestHttpCallsStore restHttpCallsStore; @Inject public RestHttpCallsStore(IHttpCallsStore httpCallsStore, IRestInterfaceFactory restInterfaceFactory, IDocumentDescriptorStore documentDescriptorStore, IJsonSchemaCreator jsonSchemaCreator) { super(resourceURI, httpCallsStore, documentDescriptorStore); this.httpCallsStore = httpCallsStore; this.jsonSchemaCreator = jsonSchemaCreator; initRestClient(restInterfaceFactory); } private void initRestClient(IRestInterfaceFactory restInterfaceFactory) { try { restHttpCallsStore = restInterfaceFactory.get(IRestHttpCallsStore.class); } catch (RestInterfaceFactory.RestInterfaceFactoryException e) { restHttpCallsStore = null; log.error(e.getLocalizedMessage(), e); } } @Override public Response readJsonSchema() { return Response.ok(jsonSchemaCreator.generateSchema(HttpCallsConfiguration.class)).build(); } @Override public List<DocumentDescriptor> readHttpCallsDescriptors(String filter, Integer index, Integer limit) { return readDescriptors("ai.labs.httpcalls", filter, index, limit); } @Override public HttpCallsConfiguration readHttpCalls(String id, Integer version) { return read(id, version); } @Override public Response updateHttpCalls(String id, Integer version, HttpCallsConfiguration httpCallsConfiguration) { return update(id, version, httpCallsConfiguration); } @Override public Response createHttpCalls(HttpCallsConfiguration httpCallsConfiguration) { return create(httpCallsConfiguration); } @Override public Response deleteHttpCalls(String id, Integer version) { return delete(id, version); } @Override public Response duplicateHttpCalls(String id, Integer version) { validateParameters(id, version); HttpCallsConfiguration httpCallsConfiguration = restHttpCallsStore.readHttpCalls(id, version); return restHttpCallsStore.createHttpCalls(httpCallsConfiguration); } @Override protected IResourceStore.IResourceId getCurrentResourceId(String id) throws IResourceStore.ResourceNotFoundException { return httpCallsStore.getCurrentResourceId(id); } }
[ "gregor@jarisch.net" ]
gregor@jarisch.net
801e958351f5b2175ca96dde358dd492f26e44ff
9bf6dee1407f112cebf42443e0f492e89d0d3fbc
/gameserver/data/scripts/system/handlers/quest/daevanion_quest/_2993AnotherBeginning.java
6571f5dcddc1b4ac78b7522ba4f0fbbf9ca93801
[]
no_license
vavavr00m/aion-source
6caef6738fee6d4898fcb66079ea63da46f5c9c0
8ce4c356d860cf54e5f3fe4a799197725acffc3b
refs/heads/master
2021-01-10T02:08:43.965463
2011-08-22T10:47:12
2011-08-22T10:47:12
50,949,918
1
0
null
null
null
null
UTF-8
Java
false
false
3,952
java
/* * This file is part of aion-unique <aion-unique.org>. * * aion-unique is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package quest.daevanion_quest; import org.openaion.gameserver.model.gameobjects.player.Player; import org.openaion.gameserver.quest.handlers.QuestHandler; import org.openaion.gameserver.quest.model.QuestCookie; import org.openaion.gameserver.quest.model.QuestState; import org.openaion.gameserver.quest.model.QuestStatus; /** * @author HellBoy * */ public class _2993AnotherBeginning extends QuestHandler { private final static int questId = 2993; private final static int Items[][] = {{1013, 1034, 1055, 1076, 5103, 1098, 1119, 1140, 1161, 5104, 1183, 1204, 1225, 1246, 5105, 1268, 1289, 1310, 1331, 5106}, {110600834, 113600800, 114600794, 112600785, 111600813, 110300881, 113300860, 114300893, 112300784, 111300834, 110100931, 113100843, 114100866, 112100790, 111100831, 110500849, 113500827, 114500837, 112500774, 111500821}}; public _2993AnotherBeginning() { super(questId); } @Override public void register() { qe.setNpcQuestData(204076).addOnTalkEvent(questId); } @Override public boolean onDialogEvent(QuestCookie env) { int removeItem = 0; Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); int var = 0; if(qs != null) var = qs.getQuestVarById(0); if(qs == null || qs.getStatus() == QuestStatus.COMPLETE) { if(env.getTargetId() == 204076) { switch(env.getDialogId()) { case 26: return sendQuestDialog(env, 1011); case 1013: case 1034: case 1055: case 1076: case 5103: case 1098: case 1119: case 1140: case 1161: case 5104: case 1183: case 1204: case 1225: case 1246: case 5105: case 1268: case 1289: case 1310: case 1331: case 5106: int i = 0; for(int id: Items[0]) { if(id == env.getDialogId()) break; i++; } removeItem = Items[1][i]; if(qs == null) { qs = new QuestState(questId, QuestStatus.COMPLETE, 0, 0); player.getQuestStateList().addQuest(questId, qs); } else qs.setStatus(QuestStatus.COMPLETE); qs.setQuestVar(i); if(player.getInventory().getItemCountByItemId(removeItem) > 0) return sendQuestDialog(env, 1013); else return sendQuestDialog(env, 1352); case 10000: case 10001: case 10002: case 10003: if(player.getInventory().getItemCountByItemId(186000041) > 0) { if(qs == null) { qs = new QuestState(questId, QuestStatus.REWARD, 0, 0); player.getQuestStateList().addQuest(questId, qs); } else qs.setStatus(QuestStatus.REWARD); defaultQuestRemoveItem(env, Items[1][var], 1); defaultQuestRemoveItem(env, 186000041, 1); var = env.getDialogId() - 10000; qs.setQuestVar(var); return sendQuestDialog(env, var + 5); } else return sendQuestDialog(env, 1009); } } } if(qs == null) return false; return defaultQuestRewardDialog(env, 204076, 0, var); } }
[ "tomulescu@gmail.com" ]
tomulescu@gmail.com
1101fcde4c9c9c8fa9b31ae0524054f4db5b059a
26d459097a814cf68985748dded27ec0ad17e6e9
/cdst-business/conferenza/src/main/java/conferenza/repository/EventoRepository.java
297f6644f9e9caa0a53f3d71fa47d57886eb92dd
[]
no_license
christiandeangelis/meetpad-public
096af0f7d058a1dd78ce3ca667e8077302f4b20a
d7bac39cc93056859ac34cda2aa1e85cec3f73ea
refs/heads/main
2023-07-13T20:34:52.657949
2021-09-01T12:19:32
2021-09-01T12:19:32
402,055,182
0
0
null
2021-09-01T12:37:26
2021-09-01T12:37:26
null
UTF-8
Java
false
false
1,363
java
package conferenza.repository; import java.util.List; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import conferenza.model.Conferenza; import conferenza.model.Documento; import conferenza.model.Evento; import conferenza.model.Partecipante; import conferenza.model.Protocollo; public interface EventoRepository extends JpaRepository<Evento, Integer>, JpaSpecificationExecutor<Evento>{ List<Evento> findByConferenza(Conferenza conferenza, Pageable pageable); List<Evento> findByMittente(Partecipante partecipante); List<Evento> findByDocumento(Documento documento); Evento findByConferenzaAndDocumento(Conferenza conferenza, Documento documento); List<Evento> findListaByConferenzaAndDocumento(Conferenza conferenza, Documento documento); @Query(nativeQuery = true, value="select coalesce(max(e.id_evento),0) as id_evento from evento e inner join documento d on e.fk_documento = d.id_documento inner join conferenza c on d.fk_conferenza = c.id_conferenza where 1 = 1 and c.id_conferenza = ? and d.id_documento = ? group by fk_modifica_data") public List<Integer> getMaxEventoByConferenzaAndDocumentoAndModificaData(int confernza, int documento); }
[ "antonio.genghi@regione.emilia-romagna.it" ]
antonio.genghi@regione.emilia-romagna.it
27cc40195cd0ffc153a11ae74b5579c4021042dc
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/bpellin_keepassdroid/app/src/main/java/org/apache/commons/collections/keyvalue/AbstractMapEntry.java
4af653867f131b9ec934c1390c0b7ce963f63188
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,331
java
// isComment package org.apache.commons.collections.keyvalue; import java.util.Map; /** * isComment */ public abstract class isClassOrIsInterface extends AbstractKeyValue implements Map.Entry { /** * isComment */ protected isConstructor(Object isParameter, Object isParameter) { super(isNameExpr, isNameExpr); } // isComment // isComment /** * isComment */ public Object isMethod(Object isParameter) { Object isVariable = this.isFieldAccessExpr; this.isFieldAccessExpr = isNameExpr; return isNameExpr; } /** * isComment */ public boolean isMethod(Object isParameter) { if (isNameExpr == this) { return true; } if (isNameExpr instanceof Map.Entry == true) { return true; } Map.Entry isVariable = (Map.Entry) isNameExpr; return (isMethod() == null ? isNameExpr.isMethod() == null : isMethod().isMethod(isNameExpr.isMethod())) && (isMethod() == null ? isNameExpr.isMethod() == null : isMethod().isMethod(isNameExpr.isMethod())); } /** * isComment */ public int isMethod() { return (isMethod() == null ? isIntegerConstant : isMethod().isMethod()) ^ (isMethod() == null ? isIntegerConstant : isMethod().isMethod()); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
b553b32888b2ec7e369b920bf3f9cf5a8314bd00
93874da6a7fc44d357c464446f1eb990201d90d5
/src/main/java/com/fedorov/httpserver/io/exception/BadRequestException.java
ace88ece5b3835aaaa7dfe04b6e2bb1981844400
[]
no_license
kajuga/http-sever-project
b5146bab80d1c315b7ff10948eee84ae76e4885a
72ff724d787eb063b188741ddc402654b22524bf
refs/heads/main
2023-04-07T06:35:34.465227
2021-04-01T15:33:13
2021-04-01T15:33:13
349,934,540
0
0
null
null
null
null
UTF-8
Java
false
false
294
java
package com.fedorov.httpserver.io.exception; public class BadRequestException extends AbstractRequestParseFailedException { public BadRequestException(String message, Throwable cause, String startingLine) { super(message, cause, startingLine); setStatusCode(400); } }
[ "msg2fedorov@gmail.com" ]
msg2fedorov@gmail.com
39a1e59acd6ce3b55dd5a356c4356d84d0de7f6c
d550ee10b64e6502d97a919e46ee5bf367a0940a
/src/java_swing/swing/JScrollBarExample2.java
d5acf0fa868f37deebbaca11887bba60cc9dfbd6
[]
no_license
smaltamash/java-learning-core
93101ffc00c817c12dfbdeda7f679f20742b2a50
37dedeb8d8db74cb271e71d0ee5ed1360b53bbf7
refs/heads/master
2020-04-05T15:18:57.670672
2018-11-10T09:15:11
2018-11-10T09:15:11
156,962,178
3
0
null
null
null
null
UTF-8
Java
false
false
838
java
package java_swing.swing; import javax.swing.JFrame; import javax.swing.JScrollBar; import javax.swing.JLabel; import java.awt.event.AdjustmentListener; import java.awt.event.AdjustmentEvent; public class JScrollBarExample2 { JScrollBarExample2() { JFrame f=new JFrame("ScrollBar Example"); final JLabel label=new JLabel(); label.setHorizontalAlignment(JLabel.CENTER); label.setSize(400,100); final JScrollBar s=new JScrollBar(); s.setBounds(100,100,50,100); f.add(s); f.add(label); f.setSize(400,400); f.setLayout(null); f.setVisible(true); s.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { label.setText("Vertical ScrollBar value is : "+s.getValue()); } }); } public static void main(String args[]) { new JScrollBarExample2(); } }
[ "44392139+smaltamash@users.noreply.github.com" ]
44392139+smaltamash@users.noreply.github.com
d41ae8504d42db9875ab49772ba7a4639bf8ed0f
884056b6a120b2a4c1c1202a4c69b07f59aecc36
/java projects/muse/result/original/traditional_mutants/int_Set_Min(int,int)/AOIS_33/original.java
16912baf795fb08c75357eebfd1660e428eefb9f
[ "MIT" ]
permissive
NazaninBayati/SMBFL
a48b16dbe2577a3324209e026c1b2bf53ee52f55
999c4bca166a32571e9f0b1ad99085a5d48550eb
refs/heads/master
2021-07-17T08:52:42.709856
2020-09-07T12:36:11
2020-09-07T12:36:11
204,252,009
3
0
MIT
2020-01-31T18:22:23
2019-08-25T05:47:52
Java
UTF-8
Java
false
false
561
java
// This is mutant program. // Author : ysma public class original { static int min = 0; static int diff = 0; static int same = 0; static int zero = 0; int Set_Min( int x, int y ) { min = -x; if (min > y) { min = y; if (x * y < 0) { diff = diff + 1; } else { if (x * y > 0) { same = ++same + 1; } else { zero = zero + 1; } } } return min; } }
[ "n.bayati20@gmail.com" ]
n.bayati20@gmail.com
ee724d597888e67ef9063805eccb9760a5f0b2ca
7df338fd7ed930ceb07b05a5b979f43c8ac16ee6
/GYOA/test/cn/gy/oa/test/TestAction.java
430b723a8f47d73ccd97237c1e893c2e370cb846
[]
no_license
hddudu/GYOA
2a3b528f56da026422d2bd9a72d063de2914b6ba
dc8229907ff7488a00efc95b3b187b23887abfb1
refs/heads/master
2020-03-22T11:35:33.100554
2018-07-07T14:33:00
2018-07-07T14:33:00
139,981,495
0
0
null
null
null
null
UTF-8
Java
false
false
525
java
package cn.gy.oa.test; import javax.annotation.Resource; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import com.opensymphony.xwork2.ActionSupport; @Controller @Scope("prototype") public class TestAction extends ActionSupport { @Resource private TestService testService; @Override public String execute() throws Exception { System.out.println("---------"+"TestAction()"); testService.saveTwoUsers(); return "success"; } }
[ "15574948314@163.com" ]
15574948314@163.com
3ce02272cc087527e4496bb71047130133a13d91
0319afb5c64ed401fc4bcadc20fe39fe2634cb8e
/branches/icepdf-6.1.0_989/icepdf/viewer/src/org/icepdf/ri/common/views/AnnotationSelector.java
bbb60f9eec36061f3053407dc1b833ddffcc721b
[ "Apache-2.0" ]
permissive
svn2github/icepdf-6_3_0_all
e3334b1d98c8fb3b400a57b05a32a7bcc2c86d99
e73b943f4449c8967472a1f5a477c8c136afb803
refs/heads/master
2023-09-03T10:39:31.313071
2018-09-06T03:00:25
2018-09-06T03:00:25
133,867,237
1
0
null
null
null
null
UTF-8
Java
false
false
4,325
java
/* * Copyright 2006-2016 ICEsoft Technologies 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.icepdf.ri.common.views; import org.icepdf.core.pobjects.Document; import org.icepdf.core.pobjects.Reference; import org.icepdf.core.pobjects.annotations.AbstractWidgetAnnotation; import org.icepdf.ri.common.SwingController; import org.icepdf.ri.common.views.annotations.AbstractAnnotationComponent; import java.util.ArrayList; /** * Utility for locating an AnnotationComponent on a page and setup up focus within int he context of the * DocumentView. * todo: some concurrency issue need some further thought. */ public class AnnotationSelector { /** * Utility to find a Annotation's JComponent within a AbstractPageComponent implementation. * * @param controller swing controller. * @param widgetAnnotation annotation to do search for wrapping component. * @return true if component could be found, false otherwise. */ public static boolean SelectAnnotationComponent(SwingController controller, AbstractWidgetAnnotation widgetAnnotation) { // turn out the parent is seldom used correctly and generally just points to page zero. // so we need to do a deep search for the annotation. Document document = controller.getDocument(); java.util.List<AbstractPageViewComponent> pageViewComponentList = controller.getDocumentViewController().getDocumentViewModel().getPageComponents(); int pages = controller.getPageTree().getNumberOfPages(); boolean found = false; int pageIndex; for (pageIndex = 0; pageIndex < pages; pageIndex++) { // check is page's annotation array for a matching reference. ArrayList<Reference> annotationReferences = document.getPageTree().getPage(pageIndex).getAnnotationReferences(); if (annotationReferences != null) { for (Reference reference : annotationReferences) { if (reference.equals(widgetAnnotation.getPObjectReference())) { // found, so navigate to page which will start the full page load off awt thread. if (controller.getCurrentPageNumber() != pageIndex) { controller.showPage(pageIndex); } found = true; break; } } } if (found) break; } // the trick now is to init only the pageComponent that contains the clicked on annotation. if (found) { AbstractPageViewComponent pageViewComponent = pageViewComponentList.get(pageIndex); pageViewComponent.init(); // still need to work our some concurrency issue with regard to page init. as a result // annotation Components may be null and user will have ot double click again // todo need to figure out a better scheme. // ((PageViewComponentImpl)pageViewComponent).getSynchronousAnnotationComponents(); ArrayList<AbstractAnnotationComponent> annotationComponents = pageViewComponent.getAnnotationComponents(); if (annotationComponents != null) { for (AbstractAnnotationComponent annotationComponent : annotationComponents) { if (widgetAnnotation.getPObjectReference().equals( annotationComponent.getAnnotation().getPObjectReference())) { annotationComponent.requestFocus(); break; } } } } return found; } }
[ "patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74" ]
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
66ba95c97023befdbd0999dde2cf9635b25aa66c
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/p019d/p307j/p308a/C13068C.java
ec0b178333dcbd06eb6240fe2d3eb229f47986a8
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
487
java
package p019d.p307j.p308a; import java.util.List; /* renamed from: d.j.a.C */ /* compiled from: IQueuesHandler */ public interface C13068C { /* renamed from: a */ int mo41974a(); /* renamed from: a */ void mo41975a(List<Integer> list); /* renamed from: a */ boolean mo41976a(int i); /* renamed from: a */ boolean mo41977a(C13130l lVar); /* renamed from: b */ void mo41978b(); /* renamed from: b */ boolean mo41979b(C13130l lVar); }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
73aac43b07281fcbcab04fa811d0453438c81b16
4b887ee9c07e3afc15bdd8e25e7351ce0c49600c
/src/org/technbolts/jbehave/eclipse/editors/story/scanner/AllInOneScanner.java
e1a2a3296a83733b10e9c80caba8bc3542c053d6
[ "MIT" ]
permissive
LuisgarciaGC/jbehave-eclipse-plugin
65be115cfced12f4ea326c734a5c15adb2485978
b759bb5722f50c74711254749f1681520d14a758
refs/heads/master
2021-01-17T21:20:36.584441
2015-10-10T07:24:22
2015-10-10T07:24:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,458
java
package org.technbolts.jbehave.eclipse.editors.story.scanner; import java.util.Iterator; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.Region; import org.eclipse.jface.text.TextAttribute; import org.eclipse.jface.text.rules.Token; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.technbolts.eclipse.util.TextAttributeProvider; import org.technbolts.jbehave.eclipse.JBehaveProject; import org.technbolts.jbehave.eclipse.textstyle.TextStyle; import org.technbolts.jbehave.parser.StoryPart; import org.technbolts.jbehave.support.JBKeyword; public class AllInOneScanner extends AbstractStoryPartBasedScanner { private Logger logger = LoggerFactory.getLogger(AllInOneScanner.class); public static boolean allInOne = true; private ExampleTableScanner exampleTableScanner; private MiscScanner miscScanner; private NarrativeScanner narrativeScanner; private ScenarioScanner scenarioScanner; private StepScannerStyled stepScannerStyled; private Region realRange; private Token errorToken; public AllInOneScanner(JBehaveProject jbehaveProject, TextAttributeProvider textAttributeProvider) { super(jbehaveProject, textAttributeProvider); initialize(); exampleTableScanner = new ExampleTableScanner(jbehaveProject, textAttributeProvider); miscScanner = new MiscScanner(jbehaveProject, textAttributeProvider); narrativeScanner = new NarrativeScanner(jbehaveProject, textAttributeProvider); scenarioScanner = new ScenarioScanner(jbehaveProject, textAttributeProvider); stepScannerStyled = new StepScannerStyled(jbehaveProject, textAttributeProvider); } @Override public void setRange(IDocument document, int offset, int length) { realRange = new Region(offset, length); super.setRange(document, 0, document.getLength()); } @Override protected void evaluateFragments() { super.evaluateFragments(); Iterator<Fragment> iterator = getFragments().iterator(); while(iterator.hasNext()) { Fragment fragment = iterator.next(); if(!fragment.intersects(realRange)) { iterator.remove(); } } } @Override protected void initialize() { super.initialize(); TextAttribute textAttribute; textAttribute = textAttributeProvider.get(TextStyle.DEFAULT); setDefaultToken(new Token(textAttribute)); textAttribute = textAttributeProvider.get(TextStyle.ERROR); errorToken = new Token(textAttribute); } protected Token getErrorToken() { return errorToken; } @Override protected boolean isPartAccepted(StoryPart part) { return true; } @Override protected void emitPart(StoryPart part) { JBKeyword keyword = part.getPreferredKeyword(); if(keyword==null) { logger.warn("Weird case: no keywork for part. Content: {}", part); emitCommentAware(getErrorToken(), part.getOffset(), part.getContent()); return; } switch(keyword) { case Given: case When: case Then: case And: emitPart(stepScannerStyled, part); break; case ExamplesTable: case ExamplesTableHeaderSeparator: case ExamplesTableIgnorableSeparator: case ExamplesTableRow: case ExamplesTableValueSeparator: emitPart(exampleTableScanner, part); break; case Narrative: case AsA: case InOrderTo: case IWantTo: emitPart(narrativeScanner, part); break; case GivenStories: case Meta: case MetaProperty: emitPart(miscScanner, part); break; case Scenario: emitPart(scenarioScanner, part); break; case Ignorable: default: emitCommentAware(getDefaultToken(), part.getOffset(), part.getContent()); break; } } private void emitPart(AbstractStoryPartBasedScanner scanner, StoryPart part) { scanner.setRange(document, 0, document.getLength()); scanner.emitPart(part); addFragments(scanner.getFragments()); } }
[ "arnauld.loyer@gmail.com" ]
arnauld.loyer@gmail.com
6bd59263db478c4ee1757018de4246c3374f29f9
6dff50c5a413b89f8935d411be2449b4ee1849fe
/src/main/java/com/unbank/pipeline/builder/AbstractArticleInfoBuilder.java
09586deae4325d88063f1dc6701b656140656e47
[]
no_license
liangyangtao/grab_expend_2016
fa5a49a0d6585f16ceafd041cdd738dbfe3791d4
9da101483297a4b83d7035946b522e10da6c248d
refs/heads/master
2021-01-10T08:38:39.602875
2016-03-31T05:13:29
2016-03-31T05:13:29
55,121,619
0
0
null
null
null
null
UTF-8
Java
false
false
416
java
package com.unbank.pipeline.builder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.unbank.pipeline.entity.Information; public abstract class AbstractArticleInfoBuilder implements ArticleBuilder { public static Log logger = LogFactory .getLog(AbstractArticleInfoBuilder.class); public void createArticleEntity(Information information) { } }
[ "674613438@qq.com" ]
674613438@qq.com
73f2f5ac5bdd72349302e858fa460918010bb346
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.3-rc2/mule/src/java/org/mule/routing/inbound/ForwardingConsumer.java
60e6f71af1b43cbd420666304c46db62cea2374b
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-symphonysoft" ]
permissive
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
2,575
java
/* * $Header$ * $Revision$ * $Date$ * ------------------------------------------------------------------------------------------------------ * * Copyright (c) SymphonySoft Limited. All rights reserved. * http://www.symphonysoft.com * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.mule.routing.inbound; import org.mule.impl.MuleEvent; import org.mule.impl.MuleMessage; import org.mule.umo.MessagingException; import org.mule.umo.UMOEvent; import org.mule.umo.UMOException; import org.mule.umo.UMOMessage; import org.mule.umo.routing.RoutingException; import org.mule.umo.routing.UMOOutboundMessageRouter; /** * <code>ForwardingConsumer</code> is used to forward an incoming event over * another transport without invoking a component. This can be used to implement * a bridge accross defferent transports. * * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> * @version $Revision$ */ public class ForwardingConsumer extends SelectiveConsumer { public UMOEvent[] process(UMOEvent event) throws MessagingException { if (super.process(event) != null) { UMOOutboundMessageRouter router = event.getComponent().getDescriptor().getOutboundRouter(); // Set the stopFurtherProcessing flag to true // to inform the InboundMessageRouter not to route // these events to the component event.setStopFurtherProcessing(true); if (router == null) { logger.debug("Descriptor has no outbound router configured to forward to, continuing with normal processing"); return new UMOEvent[] { event }; } else { try { UMOMessage msg = router.route(new MuleMessage(event.getTransformedMessage(), event.getMessage()), event.getSession(), event.isSynchronous()); // what's the correct behaviour for async endpoints? // maybe let router.route() return a Future for the returned // msg? if (msg != null) { return new UMOEvent[] { new MuleEvent(msg, event) }; } else { return null; } } catch (UMOException e) { throw new RoutingException(event.getMessage(), event.getEndpoint(), e); } } } return null; } }
[ "(no author)@bf997673-6b11-0410-b953-e057580c5b09" ]
(no author)@bf997673-6b11-0410-b953-e057580c5b09
8b1ed1cdbef681af37560a65024ef9c8dc4af5d5
7b12f67da8c10785efaebe313547a15543a39c77
/jjg-common-db/src/main/java/com/jjg/trade/model/form/EsAppletGetCartForm.java
0e6b2b945faf67c0a7f53ef3cc9b7450c6b5ef2e
[]
no_license
liujinguo1994/xdl-jjg
071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8
051da0a0dba18e6e5021ecb4ef3debca16b01a93
refs/heads/master
2023-01-06T09:11:30.487559
2020-11-06T14:42:45
2020-11-06T14:42:45
299,525,315
1
3
null
null
null
null
UTF-8
Java
false
false
1,437
java
package com.jjg.trade.model.form; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.hibernate.validator.constraints.NotBlank; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import java.io.Serializable; /** * <p> * 小程序-获取购物车 * </p> * * @author rm 2817512105@qq.com * @since 2020-06-30 */ @Data @ApiModel public class EsAppletGetCartForm implements Serializable { private static final long serialVersionUID = 3863114069985817704L; /** * 显示方式 */ @ApiModelProperty(required = false,value = "显示方式",example = "all,checked") private String showType; /** * TAB页显示 */ @ApiModelProperty(required = false,value = "TAB页显示",example = "priceDown,stockShortage") private String tab; /** * 是否选中 */ @ApiModelProperty(required = false,value = "是否选中",example = "0,1") @Min(message = "必须为数字且,1为开启,0为关闭", value = 0) @Max(message = "必须为数字且,1为开启,0为关闭", value = 1) private Integer checked; /** * 店铺id */ @ApiModelProperty(required = false,value = "店铺id") private Long shopId; @ApiModelProperty(required = true,value = "登录态标识") @NotBlank(message = "登录态标识不能为空") private String skey; }
[ "344009799@qq.com" ]
344009799@qq.com
841cea8906323942c3e7c602471be3a798cea17c
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2011-12-23/seasar2-2.4.45/seasar2/s2-framework/src/main/java/org/seasar/framework/xml/TagHandlerRule.java
c08c66bf8fad9e13c2d4c319dc5f21d1066a53d9
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
1,612
java
/* * Copyright 2004-2011 the Seasar Foundation and the Others. * * 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.seasar.framework.xml; import java.io.Serializable; import java.util.HashMap; import java.util.Map; /** * {@link TagHandler}を登録するクラスです。 * * @author higa * */ public class TagHandlerRule implements Serializable { static final long serialVersionUID = 1L; private Map tagHandlers = new HashMap(); /** * {@link TagHandlerRule}を作成します。 */ public TagHandlerRule() { } /** * {@link TagHandler}を追加します。 * * @param path * @param tagHandler */ public final void addTagHandler(String path, TagHandler tagHandler) { tagHandlers.put(path, tagHandler); } /** * {@link TagHandler}を返します。 * * @param path * @return {@link TagHandler} */ public final TagHandler getTagHandler(String path) { return (TagHandler) tagHandlers.get(path); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
708524867e0b25046cdc2aa78a9e7676143e31b6
677fd0f13b75966be41da5f9c4010f6f19147395
/src/main/java/com/holding/Application.java
f2eca8527ae12d17c7fc642ffc970fc4b3f7799f
[]
no_license
jnsierra/holding-experian
92f6a20f489b51861dfd6dcceecad18be849d58c
7b7f8bd66d85aa5aaf891707232785fc3fb702f5
refs/heads/master
2020-05-17T20:46:07.711795
2019-04-29T23:00:47
2019-04-29T23:00:47
183,953,118
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.holding; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; /** * * @author Nicolas Sierra */ @SpringBootApplication public class Application extends SpringBootServletInitializer{ public static void main(String ... args){ SpringApplication.run(Application.class, args); } }
[ "jnsierrac@gmail.com" ]
jnsierrac@gmail.com
7ea3954480eaba85b574cb821dbb14b97f61639d
7df83744484caddfcb81a12f7e102b0e664851ae
/rio-lib/src/main/java/org/rioproject/impl/persistence/FileSystem.java
12f740be3d57b2b09d8de15c93ebfcff6e20b213
[ "Apache-2.0" ]
permissive
dreedyman/Rio
e3f2c5dfcd5bd59f8cff435611494abd27ac8cba
0872068d3a955f4cfc5687f241b72a7ebbdf70cb
refs/heads/master
2022-05-03T22:13:22.385969
2022-03-10T22:13:34
2022-03-10T22:13:34
1,068,402
15
15
Apache-2.0
2021-01-27T15:43:40
2010-11-10T14:26:52
Java
UTF-8
Java
false
false
2,925
java
/* * Copyright to 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.rioproject.impl.persistence; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * Miscellaneous file system manipulation methods. * * @author Sun Microsystems, Inc. */ public class FileSystem { /** * Remove this completely. If the parameter is a directory, it is * removed after recursively destroying all its contents, including * subdirectories. If the named file does not exist, * <code>destroy</code> simply returns. * * @param proceed Proceed in the face of errors; otherwise the first error stops * the execution of the method. * @throws IOException The list of files that couldn't be removed (in the detail string). */ public static void destroy(File file, boolean proceed) throws IOException { if (!file.exists() || file.delete()) // that was easy return; List<File> errors = (proceed ? new ArrayList<File>() : null); destroyDir(file, errors); if (errors != null && !errors.isEmpty()) { StringBuilder buf = new StringBuilder("couldn't delete:"); for (File error : errors) buf.append('\n').append(error); throw new IOException(buf.toString()); } } /** * Perform the recursion for <code>destroy</code>. */ private static void destroyDir(File dir, Collection<File> errors) throws IOException { if (!dir.isDirectory()) { // catch assumption that this is a dir handleError(errors, dir); return; } String[] names = dir.list(); for (String name : names) { File file = new File(dir, name); if (!file.delete()) // assume it's a dir destroyDir(file, errors); } if (!dir.delete()) handleError(errors, dir); } /** * Handle an error, either by adding to the list, or if there is no * list, throwing an <code>IOException</code>. */ private static void handleError(Collection<File> errors, File path) throws IOException { if (errors == null) throw new IOException("couldn't delete " + path); errors.add(path); } }
[ "dennis.reedy@gmail.com" ]
dennis.reedy@gmail.com
a544d0d9ef761b722687622016c58c3cce09a71a
6253283b67c01a0d7395e38aeeea65e06f62504b
/decompile/app/Contacts/src/main/java/com/android/contacts/group/GroupDetailDisplayUtils.java
19d9340f05cd2b3826301110011af2c4f9c6470c
[]
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
1,453
java
package com.android.contacts.group; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.android.contacts.model.AccountTypeManager; import com.android.contacts.model.account.AccountType; import com.google.android.gms.R; public class GroupDetailDisplayUtils { private GroupDetailDisplayUtils() { } public static View getNewGroupSourceView(Context context) { return ((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.group_source_button, null); } public static void bindGroupSourceView(Context context, View view, String accountTypeString, String dataSet) { AccountType accountType = AccountTypeManager.getInstance(context).getAccountType(accountTypeString, dataSet); TextView label = (TextView) view.findViewById(16908310); if (label == null) { throw new IllegalStateException("Group source view must contain a TextView with idandroid.R.id.label"); } label.setText(accountType.getViewGroupLabel(context)); ImageView accountIcon = (ImageView) view.findViewById(16908294); if (accountIcon == null) { throw new IllegalStateException("Group source view must contain an ImageView with idandroid.R.id.icon"); } accountIcon.setImageDrawable(accountType.getDisplayIcon(context)); } }
[ "liming@droi.com" ]
liming@droi.com
9226255c14a7b480d859008819adf03ce9f76ade
75604d83db3d7c6e783a54097687a1bb9d1be338
/src/BaekJoon/P18406.java
56f26a171ccf1c8ab3b0ebbb6ef914d83f276702
[]
no_license
nn98/Algorithm
262cbe20c71ff9b5de292c244b95a2a0c25e5bd7
c1999a8ef3bfc1370abee56c0597c286a1cb81af
refs/heads/master
2023-08-17T04:39:41.236707
2022-09-07T06:22:56
2022-09-07T06:22:56
178,701,901
0
0
null
null
null
null
UTF-8
Java
false
false
283
java
package BaekJoon; public class P18406 { public static void main(String[] args) { String a=new java.util.Scanner(System.in).next(); int n=a.length()/2,p=Integer.parseInt(a.substring(0,n)),q=Integer.parseInt(a.substring(n)),i,j,m=1; System.out.println(); } }
[ "jkllhgb@gmail.com" ]
jkllhgb@gmail.com
64a05c1016460c9f3272fc0805ff434e0c20bf80
0a4bfac4307a19534fec7f58000b7fe5c8ea840b
/src/me/coley/recaf/ui/component/editor/AccessMethodEditor.java
95d6a7e6727d95b308bba5309c2ec22fecc4ba8f
[ "MIT" ]
permissive
zgkxzx/Recaf
1fe5315fa952ff3cd7e0fcc94fb89786ae8e7222
364af5fab7037cab853a7884112f3394640e5f97
refs/heads/master
2020-04-23T19:55:19.090354
2019-02-13T19:47:21
2019-02-13T19:47:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
718
java
package me.coley.recaf.ui.component.editor; import org.controlsfx.control.PropertySheet.Item; import javafx.scene.Node; import me.coley.recaf.bytecode.AccessFlag; import me.coley.recaf.ui.component.AccessButton; /** * Editor for editing access flags for methods. * * @author Matt */ public class AccessMethodEditor<T extends Integer> extends StagedCustomEditor<T> { public AccessMethodEditor(Item item) { super(item); } @Override public Node getEditor() { return new AccessButton(AccessFlag.Type.METHOD, getValue().intValue()) { @SuppressWarnings("unchecked") @Override public void setAccess(int access) { super.setAccess(access); setValue((T) Integer.valueOf(access)); } }; } }
[ "mcoley2@gmu.edu" ]
mcoley2@gmu.edu
f5dad7081b62b7ef16f034f2b6b0e7658b64f730
7dc048252bef2e980eb17aaba2eb2e51b6c306e6
/app/src/main/java/com/example/rentalapp/Admin.java
359afe1ad3a42c44504616f76c9339172882f509
[]
no_license
BowieGian/Rental-Application-Old
3dc8dddffd72b5811e6d0fd5b3b7d14540d843ce
df3ff2d0127816de902653db8512f71f6f4dcf49
refs/heads/master
2023-01-16T01:08:24.229238
2020-11-30T06:49:59
2020-11-30T06:49:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.example.rentalapp; public class Admin { private String adminName; private void removeUser(int ID) { // remove user by ID } private void addUser(int ID){ //add user by ID } private void modifyRoom(House thisHouse){ // modify thisHouse } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
546bb0a286c751adcbb8d8839e2a1d57ca33805b
f6beea8ab88dad733809e354ef9a39291e9b7874
/com/planet_ink/coffee_mud/MOBS/Tiger.java
2e9082320936a679a442bc5832e8065df1111350
[ "Apache-2.0" ]
permissive
bonnedav/CoffeeMud
c290f4d5a96f760af91f44502495a3dce3eea415
f629f3e2e10955e47db47e66d65ae2883e6f9072
refs/heads/master
2020-04-01T12:13:11.943769
2018-10-11T02:50:45
2018-10-11T02:50:45
153,196,768
0
0
Apache-2.0
2018-10-15T23:58:53
2018-10-15T23:58:53
null
UTF-8
Java
false
false
2,694
java
package com.planet_ink.coffee_mud.MOBS; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2018 Bo Zimmerman 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. */ public class Tiger extends StdMOB { @Override public String ID() { return "Tiger"; } public Tiger() { super(); final Random randomizer = new Random(System.currentTimeMillis()); username="a tiger"; setDescription("Tigers have reddish-orange fur and dark vertical stripes."); setDisplayText("A tiger prowls here."); CMLib.factions().setAlignment(this,Faction.Align.NEUTRAL); setMoney(0); basePhyStats.setWeight(300 + Math.abs(randomizer.nextInt() % 55)); baseCharStats().setStat(CharStats.STAT_INTELLIGENCE,1); baseCharStats().setStat(CharStats.STAT_STRENGTH,13); baseCharStats().setStat(CharStats.STAT_DEXTERITY,17); baseCharStats().setMyRace(CMClass.getRace("GreatCat")); baseCharStats().getMyRace().startRacing(this,false); basePhyStats().setDamage(10); basePhyStats().setSpeed(2.0); basePhyStats().setAbility(0); basePhyStats().setLevel(5); basePhyStats().setArmor(70); baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level())); addBehavior(CMClass.getBehavior("Aggressive")); recoverMaxState(); resetToMaxState(); recoverPhyStats(); recoverCharStats(); } }
[ "bo@zimmers.net" ]
bo@zimmers.net
8af2d17b710045e0f9e35bd8d344a060afb56ddf
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/75_openhre-com.browsersoft.openhre.hl7.impl.config.HL7SegmentImpl-1.0-9/com/browsersoft/openhre/hl7/impl/config/HL7SegmentImpl_ESTest.java
1087a02c7d4a56e3de945ebbd054d062f1663b3a
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
673
java
/* * This file was automatically generated by EvoSuite * Mon Oct 28 23:05:12 GMT 2019 */ package com.browsersoft.openhre.hl7.impl.config; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class HL7SegmentImpl_ESTest extends HL7SegmentImpl_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
57ef954a6dcb94fa14a0ed91555196e55f821b93
7898b6967273fb569d61256b7acc8da372c1326e
/LeetCode/ArrayPartitionI.java
b58aefbdef36024568dbd2a4f0330f33343d6b06
[]
no_license
DavinderSinghKharoud/AlgorithmsAndDataStructures
83d4585ebbdc9bc27529bffcadf03f49fc3d0088
183aeba23f51b9edea6be8afbc9ee6cd221d3195
refs/heads/master
2022-07-08T17:18:23.954213
2022-05-17T02:22:16
2022-05-17T02:22:16
229,511,418
2
1
null
null
null
null
UTF-8
Java
false
false
784
java
package LeetCode; import java.util.Arrays; /** * Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible. * * Example 1: * Input: [1,4,3,2] * * Output: 4 * Explanation: n is 2, and the maximum sum of pairs is 4 = min(1, 2) + min(3, 4). */ public class ArrayPartitionI { public static int arrayPairSum(int[] nums) { Arrays.sort( nums ); int sum = 0; for( int i = 0; i<nums.length; i+=2 ){ sum+=nums[i]; } return sum; } public static void main(String[] args) { System.out.println( arrayPairSum(new int[]{ 1,4,3,2 })); } }
[ "dskharoud2@gmail.com" ]
dskharoud2@gmail.com
7babf9f28c3afffa1ffe9aeebcee88a38cb26a18
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/negocio/init_24/copy3/TestingTry.java
58dbe76ebea27f839e8cd246b6c30ff0b0689713
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,256
java
package cl.stotomas.factura.negocio.init_24.copy3; import java.applet.Applet; public class TestingTry { // Inclusión de funcionalidades de esfera de control que no es de confianza // Un atacante puede insertar funcionalidades maliciosas dentro de este programa. // Las Applet comprometen la seguridad. ya que sus funcionalidades se pueden adaptar a la Web // Ademas la entrega de acceso de credenciales es engorrosa para el cliente. public final class TestApplet extends Applet { private static final long serialVersionUID = 1L; } //Comparación de referencias de objeto en lugar de contenido de objeto // El if dentro de este código no se ejecutará. // porque se prioriza el String a mostrar. public final class compareStrings{ public String str1; public String str2; public void comparar() { if (str1 == str2) { System.out.println("str1 == str2"); } } // RECOMENDACIÓN VERACODE // Utilizar equals para realizar la comparación. // public void comprar() // { // if (str1.equals (str2)) // { // System.out.println ("str1 es igual a str2"); // } // } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
5c8936d3f58e54cbac02c2fc2e1114486255b0bb
a41544231c57edb8170956e75476ce198bef6dd3
/src/core/at/tuwien/ifs/somtoolbox/util/ImageUtils.java
c92c45d40443473edfdf4074ad89eef566394f8f
[]
no_license
TaylorPeer/somtooolbox-dendrograms
c7d915b2ec509c3c55e0704bd80671b4ba52e3eb
36094e8ab20e3bffe2df333d055f59f7384fed4b
refs/heads/master
2021-01-01T05:50:45.307287
2015-02-08T20:41:16
2015-02-08T20:41:16
30,176,715
0
1
null
null
null
null
UTF-8
Java
false
false
6,487
java
/* * Copyright 2004-2010 Information & Software Engineering Group (188/1) * Institute of Software Technology and Interactive Systems * Vienna University of Technology, Austria * * 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.ifs.tuwien.ac.at/dm/somtoolbox/license.html * * 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 at.tuwien.ifs.somtoolbox.util; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Transparency; import java.awt.image.BufferedImage; /** * This class provides methods to manipulate images. * * @author Rudolf Mayer * @version $Id: ImageUtils.java 4308 2014-01-09 13:03:06Z mayer $ */ public class ImageUtils { enum Origin { TOP, RIGHT, LEFT, BOTTOM; } /** * Automatically crops an image, by continously removing full rows or columns from all sides, as long as all the * pixels in them are all white */ public static BufferedImage autoCrop(BufferedImage bi) { // find the crop points from all sides int cropFromTop = findNumberOfRowsToCrop(bi, Origin.TOP); int cropFromBottom = findNumberOfRowsToCrop(bi, Origin.BOTTOM); int cropFromLeft = findNumberOfColumnsToCrop(bi, Origin.LEFT); int cropFromRight = findNumberOfColumnsToCrop(bi, Origin.RIGHT); int width = bi.getWidth() - cropFromLeft - cropFromRight; int height = bi.getHeight() - cropFromBottom - cropFromTop; // System.out.println(width); return bi.getSubimage(cropFromLeft, cropFromTop, width, height); } /** * Computes how many rows of pixels can be cropped from the specified {@link Origin}; only {@link Origin#TOP} and * {@link Origin#BOTTOM} are valid */ private static int findNumberOfRowsToCrop(BufferedImage bi, Origin origin) { if (origin != Origin.TOP && origin != Origin.BOTTOM) { throw new IllegalArgumentException("Direction can onl be '" + Origin.TOP + "' (downwards) or '" + Origin.BOTTOM + "' (upwards)"); } int rows = 0; while (rows >= 0 && rows < bi.getHeight()) { for (int i = 0; i < bi.getWidth(); i++) { Color color = new Color(bi.getRGB(i, origin == Origin.TOP ? rows : bi.getHeight() - rows - 1)); if (!color.equals(Color.WHITE)) { return rows; } } rows++; } return rows; } /** * Computes how many cols of pixels can be cropped from the specified {@link Origin}; only {@link Origin#LEFT} and * {@link Origin#RIGHT} are valid */ private static int findNumberOfColumnsToCrop(BufferedImage bi, Origin origin) { if (origin != Origin.RIGHT && origin != Origin.LEFT) { throw new IllegalArgumentException("Direction can onl be '" + Origin.LEFT + "' (rightwards) or '" + Origin.RIGHT + "' (leftwards)"); } int cols = 0; while (cols >= 0 && cols < bi.getWidth()) { for (int i = 0; i < bi.getHeight(); i++) { Color color = new Color(bi.getRGB(origin == Origin.LEFT ? cols : bi.getWidth() - cols - 1, i)); if (!color.equals(Color.WHITE)) { return cols; } } cols++; } return cols; } /** Compares if two images contain the same pixel content */ public static boolean equalPixelContent(BufferedImage i1, BufferedImage i2) { // simple check first: compare the dimension of the images if (i1.getWidth() != i2.getWidth() || i1.getHeight() != i2.getHeight()) { return false; } // now do a pixel comparison for (int i = 0; i < i1.getWidth(null); i++) { for (int j = 0; j < i2.getHeight(null); j++) { if (i1.getRGB(i, j) != i2.getRGB(i, j)) { return false; } } } return true; } public static BufferedImage scaleImage(BufferedImage buim, int width) { int height = (int) (width / ((double) buim.getWidth() / (double) buim.getHeight())); BufferedImage scaledImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); scaledImage.createGraphics().drawImage(buim.getScaledInstance(width, height, Image.SCALE_SMOOTH), 0, 0, null); return scaledImage; } public static BufferedImage scaleImageByHeight(BufferedImage buim, int height) { int width = (int) (height / ((double) buim.getHeight() / (double) buim.getWidth())); BufferedImage scaledImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); scaledImage.createGraphics().drawImage(buim.getScaledInstance(width, height, Image.SCALE_SMOOTH), 0, 0, null); return scaledImage; } /** Creates a {@link BufferedImage} with a white, empty background. */ public static BufferedImage createEmptyImage(int width, int height) { BufferedImage res = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g = (Graphics2D) res.getGraphics(); Color c = g.getBackground(); g.setBackground(Color.WHITE); g.fillRect(0, 0, width, height); g.setBackground(c); return res; } public static BufferedImage createTransparentImage(int width, int height) { return new BufferedImage(width, height, Transparency.TRANSLUCENT); } /** Get the size of an image in bits */ public static long getSizeOfImage(BufferedImage bufferedImage) { return bufferedImage.getColorModel().getPixelSize() * bufferedImage.getHeight() * bufferedImage.getWidth(); } /** Get the size of an image in MBit, using {@link #getSizeOfImage(BufferedImage)} and {@link NumberUtils#KBit2MBit} */ public static double getSizeOfImageInMBit(BufferedImage bufferedImage) { return getSizeOfImage(bufferedImage) / (double) NumberUtils.KBit2MBit; } }
[ "t.peer@cortical.io" ]
t.peer@cortical.io
dd0798463885bbb19b81592aef5d32e598786310
7f298c2bf9ff5a61eeb87e3929e072c9a04c8832
/spring-aop/src/main/java/org/springframework/aop/interceptor/SimpleTraceInterceptor.java
3ec5ed458d5805b3bccf46a7e491753c07b8cdf4
[ "Apache-2.0" ]
permissive
stwen/my-spring5
1ca1e85786ba1b5fdb90a583444a9c030fe429dd
d44be68874b8152d32403fe87c39ae2a8bebac18
refs/heads/master
2023-02-17T19:51:32.686701
2021-01-15T05:39:14
2021-01-15T05:39:14
322,756,105
0
0
null
null
null
null
UTF-8
Java
false
false
2,550
java
/* * Copyright 2002-2017 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.springframework.aop.interceptor; import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.logging.Log; /** * Simple AOP Alliance {@code MethodInterceptor} that can be introduced * in a chain to display verbose trace information about intercepted method * invocations, with method entry and method exit info. * * <p>Consider using {@code CustomizableTraceInterceptor} for more * advanced needs. * * @author Dmitriy Kopylenko * @author Juergen Hoeller * @see CustomizableTraceInterceptor * @since 1.2 */ @SuppressWarnings("serial") public class SimpleTraceInterceptor extends AbstractTraceInterceptor { /** * Create a new SimpleTraceInterceptor with a static logger. */ public SimpleTraceInterceptor() { } /** * Create a new SimpleTraceInterceptor with dynamic or static logger, * according to the given flag. * * @param useDynamicLogger whether to use a dynamic logger or a static logger * @see #setUseDynamicLogger */ public SimpleTraceInterceptor(boolean useDynamicLogger) { setUseDynamicLogger(useDynamicLogger); } @Override protected Object invokeUnderTrace(MethodInvocation invocation, Log logger) throws Throwable { String invocationDescription = getInvocationDescription(invocation); writeToLog(logger, "Entering " + invocationDescription); try { Object rval = invocation.proceed(); writeToLog(logger, "Exiting " + invocationDescription); return rval; } catch (Throwable ex) { writeToLog(logger, "Exception thrown in " + invocationDescription, ex); throw ex; } } /** * Return a description for the given method invocation. * * @param invocation the invocation to describe * @return the description */ protected String getInvocationDescription(MethodInvocation invocation) { return "method '" + invocation.getMethod().getName() + "' of class [" + invocation.getThis().getClass().getName() + "]"; } }
[ "xianhao_gan@qq.com" ]
xianhao_gan@qq.com
8df9faf0858e7895b22feeed8d9b9b48164782d6
99319ea9880da2e7c3b7236681dc72bb4dffa977
/src/main/java/com/elytradev/marsenal/block/BlockFehuStele.java
32a184c5fa5729d299c4cd76eca7c8cfe621524c
[ "MIT" ]
permissive
Jorch72/MagicArsenal
02dfa507fdbb082998f630a395e7ae5de61f9b77
4a2f4fb389d8ae3b070417619916b3e665dfa6d6
refs/heads/master
2020-03-29T11:28:11.416587
2018-06-18T16:08:12
2018-06-18T16:08:12
149,854,144
0
0
null
null
null
null
UTF-8
Java
false
false
2,128
java
/* * MIT License * * Copyright (c) 2018 Isaac Ellingson (Falkreon) and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.elytradev.marsenal.block; import java.util.List; import com.elytradev.marsenal.StringExtras; import com.elytradev.marsenal.tile.TileEntityFehuStele; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockFehuStele extends BlockAbstractStele { public BlockFehuStele() { super("fehu"); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityFehuStele(); } @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { StringExtras.addInformation("info.magicarsenal.stele.fehu", "", tooltip); StringExtras.addSplitInformation("tooltip.magicarsenal.stele.fehu", "§9§o", tooltip); } }
[ "falkreon@gmail.com" ]
falkreon@gmail.com
b979afcf9477ae0d41ffa27f09aeb1b425879d35
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/jiuyan/inimage/r.java
c33bf6414c021d1d0a1b6a7b3df44cc05c9ceaed
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
612
java
package com.jiuyan.inimage; import android.util.Log; import com.alipay.android.hackbyte.ClassVerifier; /* compiled from: InPhotoEditActivity */ class r implements Runnable { final /* synthetic */ InPhotoEditActivity a; r(InPhotoEditActivity inPhotoEditActivity) { this.a = inPhotoEditActivity; if (Boolean.FALSE.booleanValue()) { Log.v("hackbyte ", ClassVerifier.class.toString()); } } public void run() { if (InSDKEntrance.sEditCallback != null) { InSDKEntrance.sEditCallback.onEditCancel(); } this.a.finish(); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
8db2d9c5efdb71d140bc47d71294f65c48149cdd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_d0ae5e495186a7e1317c4fdc615b355b05916759/CategoryListAdapter/23_d0ae5e495186a7e1317c4fdc615b355b05916759_CategoryListAdapter_t.java
1123fdbd3b5f5a664f2ad8dce02d9e54b1624b0e
[]
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
1,601
java
package com.restaurant.adapter; import java.util.ArrayList; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.restaurant.collection.R; import com.restaurant.collection.entity.Area; import com.restaurant.collection.entity.Category; public class CategoryListAdapter extends BaseAdapter { private final Activity activity; private final ArrayList<Category> data; private static LayoutInflater inflater = null; public CategoryListAdapter(Activity a, ArrayList<Category> cs) { activity = a; data = cs; inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public int getCount() { return data.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { View vi = convertView; if (convertView == null) vi = inflater.inflate(R.layout.item_listview_category, null); TextView text = (TextView) vi.findViewById(R.id.text_list); text.setText(data.get(position).getName()); // vi.setBackground(activity.getResources().getDrawable(R.drawable.restaurant_list_selector)); return vi; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
429eb99079d0db6dc49105cce63065a800b7ea36
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/orientechnologies--orientdb/9328ce558638d85dce5566a565f791beed5230fa/before/ORecordSerializerBinary.java
a495d2e36c52f97cf1da8a218b6fbc6803395962
[]
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
4,167
java
/* * * * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com) * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * * * * For more information: http://www.orientechnologies.com * */ package com.orientechnologies.orient.core.serialization.serializer.record.binary; import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.orient.core.record.ORecord; import com.orientechnologies.orient.core.record.impl.ODocument; import com.orientechnologies.orient.core.serialization.OBase64Utils; import com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer; import com.orientechnologies.orient.core.serialization.serializer.record.OSerializationSetThreadLocal; public class ORecordSerializerBinary implements ORecordSerializer { public static final String NAME = "ORecordSerializerBinary"; public static final ORecordSerializerBinary INSTANCE = new ORecordSerializerBinary(); private static final byte CURRENT_RECORD_VERSION = 0; private ODocumentSerializer[] serializerByVersion; public ORecordSerializerBinary() { serializerByVersion = new ODocumentSerializer[1]; serializerByVersion[0] = new ORecordSerializerBinaryV0(); } @Override public int getCurrentVersion() { return CURRENT_RECORD_VERSION; } @Override public int getMinSupportedVersion() { return CURRENT_RECORD_VERSION; } @Override public String toString() { return NAME; } @Override public ORecord fromStream(final byte[] iSource, ORecord iRecord, final String[] iFields) { if (iSource.length == 0) return iRecord; if (iRecord == null) iRecord = new ODocument(); else checkTypeODocument(iRecord); BytesContainer container = new BytesContainer(iSource); container.skip(1); try { if (iFields != null && iFields.length > 0) serializerByVersion[iSource[0]].deserializePartial((ODocument) iRecord, container, iFields); else serializerByVersion[iSource[0]].deserialize((ODocument) iRecord, container); } catch (RuntimeException e) { OLogManager.instance().warn(this, "Error deserializing record with id %s send this data for debugging: %s ", iRecord.getIdentity().toString(), OBase64Utils.encodeBytes(iSource)); throw e; } return iRecord; } @Override public byte[] toStream(final ORecord iSource, final boolean iOnlyDelta) { checkTypeODocument(iSource); final BytesContainer container = new BytesContainer(); // WRITE SERIALIZER VERSION int pos = container.alloc(1); container.bytes[pos] = CURRENT_RECORD_VERSION; if (!OSerializationSetThreadLocal.checkAndAdd((ODocument) iSource)) { // SERIALIZE CLASS ONLY serializerByVersion[CURRENT_RECORD_VERSION].serialize((ODocument) iSource, container, true); // SET SERIALIZATION AS PARTIAL OSerializationSetThreadLocal.setPartial((ODocument) iSource); return container.fitBytes(); } try { // SERIALIZE RECORD serializerByVersion[CURRENT_RECORD_VERSION].serialize((ODocument) iSource, container, false); } finally { OSerializationSetThreadLocal.removeCheck((ODocument) iSource); } return container.fitBytes(); } private void checkTypeODocument(final ORecord iRecord) { if (!(iRecord instanceof ODocument)) { throw new UnsupportedOperationException("The " + ORecordSerializerBinary.NAME + " don't support record of type " + iRecord.getClass().getName()); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
aed761a98346e4a26eb1167862f722869e2daefd
44a36429df737ef38fae6ac2e525ddc2ce8e3d6b
/ZNTDmsModel/gen/com/znt/diange/dmsmodel/R.java
710865b783faaa8bff13e8bd3604a6680457f001
[]
no_license
mapbased/ZNTVodBox
850c09826f72e5d8300d4a394d980e7b33d37f44
31a6d0babb47e1153906b379e87f4542ab28f0d1
refs/heads/master
2021-05-19T04:00:21.762410
2017-09-04T16:34:06
2017-09-04T16:34:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,030
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.znt.diange.dmsmodel; public final class R { public static final class attr { } public static final class dimen { public static int padding_large=0x7f060002; public static int padding_medium=0x7f060001; public static int padding_small=0x7f060000; } public static final class drawable { public static int ic_action_search=0x7f020000; public static int ic_launcher=0x7f020001; } public static final class layout { public static int activity_main=0x7f030000; } public static final class string { public static int app_name=0x7f040000; public static int dms_app_name=0x7f040001; public static int dms_title_activity_main=0x7f040002; } public static final class style { public static int AppTheme=0x7f050000; } }
[ "yuyan19850204@sina.com" ]
yuyan19850204@sina.com
7fd7987b4df2516a8bdb139927a857edfcff7333
22ca777d5fb55d7270f5b7b12af409e42721d4fa
/src/main/java/com/basic/thread/pipeio/ThreadRead.java
38d61619b40758e57b9be743fb72656db61a831a
[]
no_license
Yommmm/Java-Basic
73d1f8ef59ba6186f7169f0dd885cbe7a21d2094
fec3793a1284ac53676daf71547f53469b33e042
refs/heads/master
2021-05-26T05:14:27.590319
2020-05-15T15:43:04
2020-05-15T15:43:04
127,542,927
1
0
null
null
null
null
UTF-8
Java
false
false
459
java
package com.basic.thread.pipeio; import java.io.PipedInputStream; public class ThreadRead extends Thread { private ReadData readData; private PipedInputStream input; public ThreadRead(ReadData readData, PipedInputStream input) { super(); this.readData = readData; this.input = input; } @Override public void run() { super.run(); readData.readMethod(input); } }
[ "yangzhiwen@chalco-steering.com" ]
yangzhiwen@chalco-steering.com
86cf8befde3d5c266cb98a8533d9d84c774d4a0c
51aef8e206201568d04fb919bf54a3009c039dcf
/trunk/src/com/jme/scene/state/lwjgl/records/LineRecord.java
26fb6a06865fbdbe664d372426031e1f62e6e46e
[]
no_license
lihak/fairytale-soulfire-svn-to-git
0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81
a85eb3fc6f4edf30fef9201902fcdc108da248e4
refs/heads/master
2021-02-11T15:25:47.199953
2015-12-28T14:48:14
2015-12-28T14:48:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,791
java
/* * Copyright (c) 2003-2008 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of 'jMonkeyEngine' nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. */ package com.jme.scene.state.lwjgl.records; import org.lwjgl.opengl.GL11; import com.jme.scene.state.StateRecord; public class LineRecord extends StateRecord { public boolean smoothed = false; public boolean stippled = false; public int smoothHint = -1; public float width = -1; public int stippleFactor = -1; public short stipplePattern = -1; public void applyLineWidth(float lineWidth) { if (!isValid() || this.width != lineWidth) { GL11.glLineWidth(lineWidth); this.width = lineWidth; } } public void applyLineSmooth(boolean smoothed) { if (smoothed) { if (!isValid() || !this.smoothed) { GL11.glEnable(GL11.GL_LINE_SMOOTH); this.smoothed = true; } if (!isValid() || smoothHint != GL11.GL_NICEST) { GL11.glHint(GL11.GL_LINE_SMOOTH_HINT, GL11.GL_NICEST); smoothHint = GL11.GL_NICEST; } } else if (!isValid() || this.smoothed) { GL11.glDisable(GL11.GL_LINE_SMOOTH); this.smoothed = false; } } public void applyLineStipple(int stippleFactor, short stipplePattern) { if (stipplePattern != (short)0xFFFF) { if (!isValid() || !this.stippled) { GL11.glEnable(GL11.GL_LINE_STIPPLE); this.stippled = true; } if (!isValid() || stippleFactor != this.stippleFactor || stipplePattern != this.stipplePattern) { GL11.glLineStipple(stippleFactor, stipplePattern); this.stippleFactor = stippleFactor; this.stipplePattern = stipplePattern; } } else if (!isValid() || this.stippled) { GL11.glDisable(GL11.GL_LINE_STIPPLE); this.stippled = false; } } @Override public void invalidate() { super.invalidate(); smoothed = false; stippled = false; smoothHint = -1; width = -1; stippleFactor = -1; stipplePattern = -1; } }
[ "you@example.com" ]
you@example.com
b27cf35dbc03389868aa37fe4f30a2bf04afa644
4fc929e44e4c8ca07faa85cc7fe3f68bf1005c61
/src/com/facebook/buck/jvm/java/abi/StubJarClassEntry.java
9d1d62c7da8253a49770a3c15f10274b9a9d600d
[ "Apache-2.0" ]
permissive
johnblaze321/buck
99a70237f4104acdb7a8052ff651f8a8f1d96873
3964170ba4ecb7d5c0f269e0bd6a6d44e157950f
refs/heads/master
2020-12-02T11:04:47.801319
2017-07-07T22:41:43
2017-07-07T23:53:13
96,597,214
1
0
null
2017-07-08T05:03:15
2017-07-08T05:03:15
null
UTF-8
Java
false
false
6,010
java
/* * Copyright 2017-present Facebook, 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 com.facebook.buck.jvm.java.abi; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.Set; import javax.annotation.Nullable; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.InnerClassNode; class StubJarClassEntry extends StubJarEntry { @Nullable private final Set<String> referencedClassNames; private final Path path; private final ClassNode stub; @Nullable public static StubJarClassEntry of(LibraryReader input, Path path, boolean sourceAbiCompatible) throws IOException { ClassNode stub = new ClassNode(Opcodes.ASM5); // As we read the class in, we create a partial stub that removes non-ABI methods and fields // but leaves the entire InnerClasses table. We record all classes that are referenced from // ABI methods and fields, and will use that information later to filter the InnerClasses table. ClassReferenceTracker referenceTracker = new ClassReferenceTracker(stub); ClassVisitor firstLevelFiltering = new AbiFilteringClassVisitor(referenceTracker); // If we want ABIs that are compatible with those generated from source, we add a visitor // at the very start of the chain which transforms the event stream coming out of `ClassNode` // to look like what ClassVisitorDriverFromElement would have produced. if (sourceAbiCompatible) { firstLevelFiltering = new SourceAbiCompatibleVisitor(firstLevelFiltering); } input.visitClass(path, firstLevelFiltering); // The synthetic package-info class is how package annotations are recorded; that one is // actually used by the compiler if (!isAnonymousOrLocalOrSyntheticClass(stub) || stub.name.endsWith("/package-info")) { return new StubJarClassEntry(path, stub, referenceTracker.getReferencedClassNames()); } return null; } private StubJarClassEntry(Path path, ClassNode stub, Set<String> referencedClassNames) { this.path = path; this.stub = stub; this.referencedClassNames = referencedClassNames; } @Override public void write(StubJarWriter writer) throws IOException { writer.writeEntry(path, this::openInputStream); } private InputStream openInputStream() throws IOException { ClassWriter writer = new ClassWriter(0); ClassVisitor visitor = writer; visitor = new InnerClassSortingClassVisitor(stub.name, visitor); visitor = new AbiFilteringClassVisitor(visitor, referencedClassNames); stub.accept(visitor); return new ByteArrayInputStream(writer.toByteArray()); } private static boolean isAnonymousOrLocalOrSyntheticClass(ClassNode node) { if ((node.access & Opcodes.ACC_SYNTHETIC) == Opcodes.ACC_SYNTHETIC) { return true; } InnerClassNode innerClass = getInnerClassMetadata(node); while (innerClass != null) { if (innerClass.outerName == null) { return true; } innerClass = getInnerClassMetadata(node, innerClass.outerName); } return false; } @Nullable private static InnerClassNode getInnerClassMetadata(ClassNode node) { String name = node.name; return getInnerClassMetadata(node, name); } @Nullable private static InnerClassNode getInnerClassMetadata(ClassNode node, String className) { for (InnerClassNode innerClass : node.innerClasses) { if (innerClass.name.equals(className)) { return innerClass; } } return null; } private static class InnerClassSortingClassVisitor extends ClassVisitor { private final String className; private final List<InnerClassNode> innerClasses = new ArrayList<>(); private InnerClassSortingClassVisitor(String className, ClassVisitor cv) { super(Opcodes.ASM5, cv); this.className = className; } @Override public void visitInnerClass(String name, String outerName, String innerName, int access) { innerClasses.add(new InnerClassNode(name, outerName, innerName, access)); } @Override public void visitEnd() { innerClasses.sort( (o1, o2) -> { // Enclosing classes and member classes should come first, with their order preserved boolean o1IsEnclosingOrMember = isEnclosingOrMember(o1); boolean o2IsEnclosingOrMember = isEnclosingOrMember(o2); if (o1IsEnclosingOrMember && o2IsEnclosingOrMember) { // Preserve order among these return 0; } else if (o1IsEnclosingOrMember) { return -1; } else if (o2IsEnclosingOrMember) { return 1; } // References to other classes get sorted. return o1.name.compareTo(o2.name); }); for (InnerClassNode innerClass : innerClasses) { innerClass.accept(cv); } super.visitEnd(); } private boolean isEnclosingOrMember(InnerClassNode innerClass) { if (className.equals(innerClass.name)) { // Self! return true; } if (className.equals(innerClass.outerName)) { // Member class return true; } // Enclosing class return className.startsWith(innerClass.name + "$"); } } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
28ddc4ea7cd3ddc5c69d1a225d9eb8676da313cb
c4623aa95fb8cdd0ee1bc68962711c33af44604e
/src/com/yelp/android/ui/util/aj$b.java
b84564dbefc40888d0612a46ebf67d8b8e0f66cc
[]
no_license
reverseengineeringer/com.yelp.android
48f7f2c830a3a1714112649a6a0a3110f7bdc2b1
b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8
refs/heads/master
2021-01-19T02:07:25.997811
2016-07-19T16:37:24
2016-07-19T16:37:24
38,555,675
1
0
null
null
null
null
UTF-8
Java
false
false
2,522
java
package com.yelp.android.ui.util; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; public class aj$b<Clearable extends BaseAdapter, extends g> { public final Clearable a; public CharSequence b; public final int[] c; public final int d; public final View e; public final View f; public boolean g; public final boolean h; public boolean i = true; public aj$b(Clearable paramClearable, CharSequence paramCharSequence, int[] paramArrayOfInt, int paramInt, View paramView1, View paramView2) { a = paramClearable; b = paramCharSequence; c = paramArrayOfInt; d = paramInt; e = paramView1; f = paramView2; if ((paramView1 != null) || (!TextUtils.isEmpty(paramCharSequence))) { bool1 = true; g = bool1; if (paramView2 == null) { break label88; } } label88: for (boolean bool1 = bool2;; bool1 = false) { h = bool1; return; bool1 = false; break; } } private View a(View paramView, ViewGroup paramViewGroup) { if (e != null) { paramViewGroup = e; return paramViewGroup; } if (paramView == null) { if (paramViewGroup == null) { throw new IllegalArgumentException("If convertView is null a parent must be supplied"); } paramView = new TextView(paramViewGroup.getContext(), null, d); } for (;;) { TextView localTextView = (TextView)paramView; localTextView.setText(b); paramViewGroup = paramView; if (c == null) { break; } localTextView.setCompoundDrawablesWithIntrinsicBounds(c[0], c[1], c[2], c[3]); return paramView; } } public View a() { return e; } public void a(CharSequence paramCharSequence) { b = paramCharSequence; if ((e != null) || (!TextUtils.isEmpty(b))) {} for (boolean bool = true;; bool = false) { g = bool; return; } } public View b() { return f; } public String toString() { if (a != null) { return String.format("\nSection[types:%s, header:%s, footer:%s size:%s]", new Object[] { Integer.valueOf(a.getViewTypeCount()), Boolean.valueOf(g), Boolean.valueOf(h), Integer.valueOf(a.getCount()) }); } return "Empty"; } } /* Location: * Qualified Name: com.yelp.android.ui.util.aj.b * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
e1f564ffde7e14f6a3d0499be1b85b890c9d5a3e
793df459501d0113d6acdd41faf590122a242796
/confu-master/benchmarks/xalan/original_source_from_jdcore/org/apache/xalan/xsltc/compiler/UnsupportedElement.java
8404c8b3c745d88e4ac85683a8fb6c247fbb6357
[ "Apache-2.0" ]
permissive
tsmart-date/nasac-2017-demo
fc9c927eb6cc88e090066fc351b58c74a79d936e
07f2d3107f1b40984ffda9e054fa744becd8c8a3
refs/heads/master
2021-07-15T21:29:42.245245
2017-10-24T14:28:14
2017-10-24T14:28:14
105,340,725
0
1
null
null
null
null
UTF-8
Java
false
false
3,012
java
package org.apache.xalan.xsltc.compiler; import java.util.Vector; import org.apache.bcel.generic.ConstantPoolGen; import org.apache.bcel.generic.INVOKESTATIC; import org.apache.bcel.generic.InstructionList; import org.apache.bcel.generic.PUSH; import org.apache.xalan.xsltc.compiler.util.ClassGenerator; import org.apache.xalan.xsltc.compiler.util.ErrorMsg; import org.apache.xalan.xsltc.compiler.util.MethodGenerator; import org.apache.xalan.xsltc.compiler.util.Type; import org.apache.xalan.xsltc.compiler.util.TypeCheckError; import org.apache.xalan.xsltc.compiler.util.Util; final class UnsupportedElement extends SyntaxTreeNode { private Vector _fallbacks = null; private ErrorMsg _message = null; private boolean _isExtension = false; public UnsupportedElement(String uri, String prefix, String local, boolean isExtension) { super(uri, prefix, local); _isExtension = isExtension; } public void setErrorMessage(ErrorMsg message) { _message = message; } public void display(int indent) { indent(indent); Util.println("Unsupported element = " + _qname.getNamespace() + ":" + _qname.getLocalPart()); displayContents(indent + 4); } private void processFallbacks(Parser parser) { Vector children = getContents(); if (children != null) { int count = children.size(); for (int i = 0; i < count; i++) { SyntaxTreeNode child = (SyntaxTreeNode)children.elementAt(i); if ((child instanceof Fallback)) { Fallback fallback = (Fallback)child; fallback.activate(); fallback.parseContents(parser); if (_fallbacks == null) { _fallbacks = new Vector(); } _fallbacks.addElement(child); } } } } public void parseContents(Parser parser) { processFallbacks(parser); } public Type typeCheck(SymbolTable stable) throws TypeCheckError { if (_fallbacks != null) { int count = _fallbacks.size(); for (int i = 0; i < count; i++) { Fallback fallback = (Fallback)_fallbacks.elementAt(i); fallback.typeCheck(stable); } } return Type.Void; } public void translate(ClassGenerator classGen, MethodGenerator methodGen) { if (_fallbacks != null) { int count = _fallbacks.size(); for (int i = 0; i < count; i++) { Fallback fallback = (Fallback)_fallbacks.elementAt(i); fallback.translate(classGen, methodGen); } } else { ConstantPoolGen cpg = classGen.getConstantPool(); InstructionList il = methodGen.getInstructionList(); int unsupportedElem = cpg.addMethodref("org.apache.xalan.xsltc.runtime.BasisLibrary", "unsupported_ElementF", "(Ljava/lang/String;Z)V"); il.append(new PUSH(cpg, getQName().toString())); il.append(new PUSH(cpg, _isExtension)); il.append(new INVOKESTATIC(unsupportedElem)); } } }
[ "liuhan0518@gmail.com" ]
liuhan0518@gmail.com
b03135981c0218d3764dde861527d2df1eee168f
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/8139665.java
b344b0e79a78382d355546f9c361fe14bfb713f2
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,766
java
class c8139665 { public ActionResponse executeAction(ActionRequest request) throws Exception { BufferedReader in = null; try { CurrencyEntityManager em = new CurrencyEntityManager(); String id = (String) request.getProperty("ID"); CurrencyMonitor cm = getCurrencyMonitor(em, Long.valueOf(id)); String code = cm.getCode(); if (code == null || code.length() == 0) code = DEFAULT_SYMBOL; String tmp = URL.replace("@", code); ActionResponse resp = new ActionResponse(); URL url = new URL(tmp); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); int status = conn.getResponseCode(); if (status == 200) { in = new BufferedReader(new InputStreamReader(conn.getInputStream())); StringBuilder value = new StringBuilder(); while (true) { String line = in.readLine(); if (line == null) break; value.append(line); } cm.setLastUpdateValue(new BigDecimal(value.toString())); cm.setLastUpdateTs(new Date()); em.updateCurrencyMonitor(cm); resp.addResult("CURRENCYMONITOR", cm); } else { resp.setErrorCode(ActionResponse.GENERAL_ERROR); resp.setErrorMessage("HTTP Error [" + status + "]"); } return resp; } catch (Exception e) { String st = MiscUtils.stackTrace2String(e); logger.error(st); throw e; } finally { if (in != null) { in.close(); } } } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
eddce64a76d1b3a30234b9d165b0e3cc5a77d673
7abad4023ba4a6f30fbda31b11cfb7f22c8d5ed3
/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auton/teams/technic/red/right/RedRightFourCommand.java
f20f60a4413a08c7869184b4e7df6e80eb106f63
[]
no_license
FTC-13266-Apex/DroidRage-Apex-UltimateGoal
1369664932cb73ccccc8275cc48c4a11396af4d2
0b4f814ba1a8600e7fbbe33f490e1d31dc866770
refs/heads/main
2023-09-04T02:49:12.598816
2021-10-28T15:08:35
2021-10-28T15:08:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,051
java
package org.firstinspires.ftc.teamcode.auton.teams.technic.red.right; import com.arcrobotics.ftclib.command.SequentialCommandGroup; import org.firstinspires.ftc.robotcore.external.Telemetry; import org.firstinspires.ftc.teamcode.commands.PlaceWobbleGoal; import org.firstinspires.ftc.teamcode.commands.drive.DriveForwardCommand; import org.firstinspires.ftc.teamcode.commands.drive.TurnCommand; import org.firstinspires.ftc.teamcode.commands.drive.TurnToCommand; import org.firstinspires.ftc.teamcode.subsystems.Drivetrain; import org.firstinspires.ftc.teamcode.subsystems.Intake; import org.firstinspires.ftc.teamcode.subsystems.ShooterFeeder; import org.firstinspires.ftc.teamcode.subsystems.ShooterWheels; import org.firstinspires.ftc.teamcode.subsystems.Vision; import org.firstinspires.ftc.teamcode.subsystems.WobbleGoalArm; import org.firstinspires.ftc.teamcode.auton.values.outside.OutsideFourValues; public class RedRightFourCommand extends SequentialCommandGroup { public RedRightFourCommand(Drivetrain drivetrain, ShooterWheels shooterWheels, ShooterFeeder feeder, Intake intake, WobbleGoalArm wobbleGoalArm, Vision vision, Telemetry telemetry) { final int HG_SPEED = 3600; final int POWERSHOT_SPEED = 3000; OutsideFourValues distance = new OutsideFourValues(); OutsideFourValues angle = new OutsideFourValues(); addCommands( new RedRightShootingSequence(drivetrain, shooterWheels, feeder), new DriveForwardCommand(drivetrain, distance.distanceOne), new TurnToCommand(drivetrain, angle.angleOne, true), new DriveForwardCommand(drivetrain, distance.distanceTwo), new PlaceWobbleGoal(wobbleGoalArm), new TurnToCommand(drivetrain, angle.angleTwo, true), new DriveForwardCommand(drivetrain, distance.distanceThree) ); } } //new SplineCommand(drivetrain, new Vector2d(-30, 24), Math.toRadians(15), false) //new DriveForwardCommand(drivetrain, -40), //
[ "you@example.com" ]
you@example.com
f3301c1b1272d9d6a513cdb50c386d17a786856a
84311489ad6d6aef2c8fef8429e4a90f3c32a9d6
/legend-pure-m3-core/src/main/java/org/finos/legend/pure/m3/compiler/validation/validator/PropertyValidator.java
4e796c002dbcd2e87e35e867d2e793def5490c53
[ "Apache-2.0", "CC0-1.0" ]
permissive
junjikatto/legend-pure
dc277883e4317434f2a32800a380c741b54d0405
af9fc2ef1c6c7b50eb57978674442e26ac768e93
refs/heads/master
2023-02-06T11:48:22.662689
2020-12-24T02:19:00
2020-12-24T02:19:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,858
java
// Copyright 2020 Goldman Sachs // // 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.finos.legend.pure.m3.compiler.validation.validator; import org.eclipse.collections.api.list.ListIterable; import org.finos.legend.pure.m3.navigation.M3Paths; import org.finos.legend.pure.m3.compiler.Context; import org.finos.legend.pure.m3.navigation.Instance; import org.finos.legend.pure.m3.navigation.generictype.GenericType; import org.finos.legend.pure.m3.navigation.importstub.ImportStub; import org.finos.legend.pure.m3.navigation.multiplicity.Multiplicity; import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property; import org.finos.legend.pure.m3.navigation.ProcessorSupport; import org.finos.legend.pure.m3.tools.matcher.MatchRunner; import org.finos.legend.pure.m3.tools.matcher.Matcher; import org.finos.legend.pure.m3.tools.matcher.MatcherState; import org.finos.legend.pure.m4.coreinstance.CoreInstance; import org.finos.legend.pure.m4.ModelRepository; import org.finos.legend.pure.m4.exception.PureCompilationException; public class PropertyValidator implements MatchRunner<Property> { @Override public String getClassName() { return M3Paths.Property; } @Override public void run(Property instance, MatcherState state, Matcher matcher, ModelRepository modelRepository, Context context) throws PureCompilationException { validateProperty(instance, state.getProcessorSupport()); } public static void validateProperty(Property property, ProcessorSupport processorSupport) throws PureCompilationException { GenericTypeValidator.validateGenericType(property._genericType(), processorSupport); validateNonPrimitiveBinaryType(property, processorSupport); } public static void validateTypeRange(CoreInstance coreInstance, CoreInstance property, CoreInstance instance, ProcessorSupport processorSupport) throws PureCompilationException { CoreInstance propertyReturnGenericType = GenericType.resolvePropertyReturnType(Instance.extractGenericTypeFromInstance(coreInstance, processorSupport), property, processorSupport); CoreInstance instanceGenericType = Instance.extractGenericTypeFromInstance(instance, processorSupport); if (!GenericType.subTypeOf(instanceGenericType, propertyReturnGenericType, processorSupport)) { throw new PureCompilationException(instance.getSourceInformation(), "Property: '" + org.finos.legend.pure.m3.navigation.property.Property.getPropertyName(property) + "' / Type Error: '" + GenericType.print(instanceGenericType, processorSupport) + "' not a subtype of '" + GenericType.print(propertyReturnGenericType, processorSupport) + "'"); } } public static void validateMultiplicityRange(CoreInstance coreInstance, CoreInstance property, ListIterable<? extends CoreInstance> values, ProcessorSupport processorSupport) throws PureCompilationException { // Check Multiplicity Range CoreInstance multiplicity = org.finos.legend.pure.m3.navigation.property.Property.resolveInstancePropertyReturnMultiplicity(coreInstance, property, processorSupport); if (!Multiplicity.isValid(multiplicity, values.size())) { throw new PureCompilationException(coreInstance.getSourceInformation(), "Error instantiating the type '" + coreInstance.getClassifier().getName() + "'. The property '" + org.finos.legend.pure.m3.navigation.property.Property.getPropertyName(property) + "' has a multiplicity range of " + Multiplicity.print(multiplicity) + " when the given list has a cardinality equal to '" + values.size() + "'"); } } private static void validateNonPrimitiveBinaryType(Property property, ProcessorSupport processorSupport) throws PureCompilationException { CoreInstance type = ImportStub.withImportStubByPass(property._genericType()._rawTypeCoreInstance(), processorSupport); if (processorSupport.type_isPrimitiveType(type) && ModelRepository.BINARY_TYPE_NAME.equals(type.getName())) { throw new PureCompilationException(property.getSourceInformation(), "The property '" + org.finos.legend.pure.m3.navigation.property.Property.getPropertyName(property) + "' has type of 'Binary'. 'Binary' type is not supported for property."); } } }
[ "pierre.debelen@gs.com" ]
pierre.debelen@gs.com
b0bd2ba9cbf14735e6c0868a71f97f2161a75f8a
2ec282c465a50429743a6cfd10782ef6a50d6f8b
/src/Leetcode/TwoSum.java
fd2f343e27f25a48ee82e2b851dd9045ace3aea7
[]
no_license
kalpak92/TechInterview2020
c72f288e24c78bc69551e4e0b1d41b095cd93ef1
d835ab8f9fa4cc1fd1b54d377d833c5a2fda4d54
refs/heads/master
2023-04-12T02:29:45.858841
2021-04-14T02:50:03
2021-04-14T02:50:03
294,589,117
11
1
null
null
null
null
UTF-8
Java
false
false
1,510
java
package Leetcode; import java.util.HashMap; import java.util.Map; /** * @author kalpak * * Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. * You may assume that each input would have exactly one solution, and you may not use the same element twice. * You can return the answer in any order. * * Example 1: * * Input: nums = [2,7,11,15], target = 9 * Output: [0,1] * Output: Because nums[0] + nums[1] == 9, we return [0, 1]. * * Example 2: * * Input: nums = [3,2,4], target = 6 * Output: [1,2] * * Example 3: * * Input: nums = [3,3], target = 6 * Output: [0,1] * * * Constraints: * * 2 <= nums.length <= 105 * -109 <= nums[i] <= 109 * -109 <= target <= 109 * Only one valid answer exists. * */ public class TwoSum { public static int[] twoSum(int[] nums, int target) { int[] result = new int[2]; Map<Integer, Integer> map = new HashMap<>(); for(int i = 0; i < nums.length; i++) { if(map.containsKey(target - nums[i])) { result[1] = i; result[0] = map.get(target - nums[i]); break; } map.put(nums[i], i); } return result; } public static void main(String[] args) { int[] arr = new int[]{2,7,11,15}; int[] result = twoSum(arr, 9); for(int i : result) System.out.print(i + " "); System.out.println(); } }
[ "kals9seals@gmail.com" ]
kals9seals@gmail.com
97bb116133d1a43b7b75ea551fec623375be14fc
2a1de1e2c65bf48736c507aa19d2ec6675514381
/flatlaf-intellij-themes/src/main/java/com/formdev/flatlaf/intellijthemes/FlatDraculaIJTheme.java
89abe663ff048fa97784f4116cabb645e1b2ef29
[ "Apache-2.0" ]
permissive
lsimediasarl/FlatLaf
cff8b410175f1e005073a37d5090926745df18af
75f76f4875836fbd73db902324038a4a6e2f085c
refs/heads/main
2023-06-29T07:58:14.825084
2021-08-02T13:27:25
2021-08-02T13:27:25
353,286,928
0
0
Apache-2.0
2021-03-31T08:43:29
2021-03-31T08:43:28
null
UTF-8
Java
false
false
1,504
java
/* * Copyright 2020 FormDev Software GmbH * * 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 * * https://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.formdev.flatlaf.intellijthemes; // // DO NOT MODIFY // Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator // import com.formdev.flatlaf.IntelliJTheme; /** * @author Karl Tauber */ public class FlatDraculaIJTheme extends IntelliJTheme.ThemeLaf { public static final String NAME = "Dracula"; public static boolean setup() { try { return setup( new FlatDraculaIJTheme() ); } catch( RuntimeException ex ) { return false; } } /** * @deprecated use {@link #setup()} instead; this method will be removed in a future version */ @Deprecated public static boolean install() { return setup(); } public static void installLafInfo() { installLafInfo( NAME, FlatDraculaIJTheme.class ); } public FlatDraculaIJTheme() { super( Utils.loadTheme( "Dracula.theme.json" ) ); } @Override public String getName() { return NAME; } }
[ "karl@jformdesigner.com" ]
karl@jformdesigner.com
9281153c01f9c2174ffa23bbf5de6ea073ac0672
fc6c869ee0228497e41bf357e2803713cdaed63e
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/appbrand/dynamic/b/a.java
276ed0e18fffcb928f00b758578a9e1a313426f7
[]
no_license
hyb1234hi/reverse-wechat
cbd26658a667b0c498d2a26a403f93dbeb270b72
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
refs/heads/master
2020-09-26T10:12:47.484174
2017-11-16T06:54:20
2017-11-16T06:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,810
java
package com.tencent.mm.plugin.appbrand.dynamic.b; import android.graphics.Bitmap; import com.tencent.gmtrace.GMTrace; import com.tencent.mm.modelappbrand.a.b.c; import com.tencent.mm.modelappbrand.a.b.i; import com.tencent.mm.plugin.appbrand.dynamic.i.c; import com.tencent.mm.sdk.platformtools.bg; import com.tencent.mm.sdk.platformtools.d; import com.tencent.mm.sdk.platformtools.w; import com.tencent.xweb.k; import java.io.IOException; import java.io.InputStream; public final class a { private static final b.i hTh; static { GMTrace.i(19912273690624L, 148358); hTh = new b.c(); GMTrace.o(19912273690624L, 148358); } public static Bitmap aV(String paramString1, String paramString2) { GMTrace.i(19912139472896L, 148357); if ((bg.nm(paramString1)) || (bg.nm(paramString2))) { GMTrace.o(19912139472896L, 148357); return null; } Object localObject = com.tencent.mm.plugin.appbrand.appcache.a.oj(paramString2); if (bg.nm((String)localObject)) { GMTrace.o(19912139472896L, 148357); return null; } paramString2 = paramString1 + '#' + (String)localObject; Bitmap localBitmap = hTh.hC(paramString2); if ((localBitmap != null) && (!localBitmap.isRecycled())) { GMTrace.o(19912139472896L, 148357); return localBitmap; } paramString1 = c.aX(paramString1, (String)localObject); if (paramString1 != null) {} try { if (paramString1.mInputStream != null) { int i = paramString1.mInputStream.available(); if (i > 0) {} } else { if (paramString1 != null) { bg.g(paramString1.mInputStream); } GMTrace.o(19912139472896L, 148357); return null; } localObject = d.decodeStream(paramString1.mInputStream); if ((localObject != null) && (!((Bitmap)localObject).isRecycled())) { hTh.b(paramString2, (Bitmap)localObject); if (paramString1 != null) { bg.g(paramString1.mInputStream); } GMTrace.o(19912139472896L, 148357); return (Bitmap)localObject; } } catch (IOException paramString2) { for (;;) { w.e("MicroMsg.CanvasImageCache", "try decode icon e = %s", new Object[] { paramString2 }); if (paramString1 != null) { bg.g(paramString1.mInputStream); } } } finally { if (paramString1 == null) { break label276; } bg.g(paramString1.mInputStream); } GMTrace.o(19912139472896L, 148357); return null; } } /* Location: D:\tools\apktool\weixin6519android1140\jar\classes2-dex2jar.jar!\com\tencent\mm\plugin\appbrand\dynamic\b\a.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "robert0825@gmail.com" ]
robert0825@gmail.com
ee4f14d196053f764c0a1fb63fe791aff0f7f4f5
0f21b35272ae2527ff1ab95a258378d3fb8418eb
/Basic/src/main/java/com/sh/$17/$02/$17/App1.java
fdf106c81841a0b49263e1cdeb7f3c241571b851
[]
no_license
ShuaiJunlan/java-learning
c1a92b41ba4ed1ff880e55a70330dd342dc6e8c6
ae5cbbf146e6c059b5cd613bcd095d7855a00f8e
refs/heads/master
2023-03-04T07:14:22.649266
2022-11-18T07:34:16
2022-11-18T07:34:16
162,292,537
4
0
null
2023-02-22T07:22:48
2018-12-18T13:29:13
Java
UTF-8
Java
false
false
372
java
package com.sh.$17.$02.$17; /** * @author Junlan Shuai[shuaijunlan@gmail.com]. * @date Created on 10:36 2017/2/17. */ public class App1 { private int m; public int inc() { return m + 1; } public void trye() { try { } catch(Exception e) { } finally { } } }
[ "shuaijunlan@gmail.com" ]
shuaijunlan@gmail.com
3b1b7aeb3478546b9def7c9224c8ee29898dc9e6
ed865190ed878874174df0493b4268fccb636a29
/PuridiomWeb/src/com/tsa/puridiom/handlers/VendorInsuranceRetrieveByVendorIdHandler.java
4e59783ba07c3165df297d2590cc89367e78e153
[]
no_license
zach-hu/srr_java8
6841936eda9fdcc2e8185b85b4a524b509ea4b1b
9b6096ba76e54da3fe7eba70989978edb5a33d8e
refs/heads/master
2021-01-10T00:57:42.107554
2015-11-06T14:12:56
2015-11-06T14:12:56
45,641,885
0
0
null
null
null
null
UTF-8
Java
false
false
1,117
java
package com.tsa.puridiom.handlers; import com.tsagate.foundation.processengine.*; import java.util.*; public class VendorInsuranceRetrieveByVendorIdHandler implements IHandler { public Map handleRequest (Map incomingRequest) throws Exception { try { PuridiomProcessLoader processLoader = new PuridiomProcessLoader((String)incomingRequest.get("organizationId")); PuridiomProcess process = processLoader.loadProcess("vendorinsurance-retrieve-by-vendorid.xml"); process.executeProcess(incomingRequest); if (process.getStatus() == Status.SUCCEEDED) { incomingRequest.put("viewPage", incomingRequest.get("successPage")); } else { incomingRequest.put("viewPage", incomingRequest.get("failurePage")); } } catch (Exception exception) { incomingRequest.put("errorMsg", exception.getMessage()); incomingRequest.put("viewPage", incomingRequest.get("failurePage")); throw exception; } finally { if (incomingRequest.get("viewPage") == null) { incomingRequest.put("viewPage", incomingRequest.get("failurePage")); } } return incomingRequest; } }
[ "brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466" ]
brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466
c20d447cfeb758c34d9fc5f2c765f75c1b1c7ccb
ad3c28816f4ed9e1b027be6fe5d1f246457683c9
/dingdinghelper/src/main/java/com/ucmap/dingdinghelper/pixelsdk/ActivityManager.java
7c3d2860ee6926b9553a443a9cb5ccc8b2f02489
[]
no_license
hgqian/DingDingHelper
ff299bb33b68b5d66a435f3d95618d632aaec1b0
83bcccdc26086a5bdfa54d968b4d7db6d55c4815
refs/heads/master
2020-11-29T16:58:31.960651
2017-11-24T15:03:28
2017-11-24T15:03:28
230,173,585
0
1
null
2019-12-26T01:27:12
2019-12-26T01:27:12
null
UTF-8
Java
false
false
2,418
java
package com.ucmap.dingdinghelper.pixelsdk; import android.app.Activity; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicReference; /** * <b>@项目名:</b> DingDingHelper<br> * <b>@包名:</b>com.ucmap.dingdinghelper<br> * <b>@创建者:</b> cxz -- just<br> * <b>@创建时间:</b> &{DATE}<br> * <b>@公司:</b> 宝诺科技<br> * <b>@邮箱:</b> cenxiaozhong.qqcom@qq.com<br> * <b>@描述</b><br> */ public class ActivityManager implements IActivityManager { private static final List<WeakReference<Activity>> mActivities = new ArrayList<>(); private static final AtomicReference<ActivityManager> atomic = new AtomicReference<>(); private ActivityManager() { } public static ActivityManager getInstance() { for (; ; ) { ActivityManager mActivityManager = atomic.get(); if (mActivityManager != null) return mActivityManager; if (atomic.compareAndSet(null, new ActivityManager())) { return atomic.get(); } } } private boolean findTargetAndRemove(Class<? extends Activity> activityClazz) { boolean tag = false; //倒序remove for (int i = mActivities.size() - 1; i >= 0; i--) { WeakReference<Activity> mActivityWeakReference = mActivities.get(i); if (mActivityWeakReference.get() == null) { mActivities.remove(i); } } for (int i = 0; i < mActivities.size(); i++) { WeakReference<Activity> mWeakReference = mActivities.get(i); if (mWeakReference.get() != null && mWeakReference.get().getClass() == activityClazz) { mWeakReference.get().finish(); mActivities.remove(i); tag = true; break; } } return tag; } public void addActivity(Activity activity) { if (activity != null) { findTargetAndRemove(activity.getClass()); mActivities.add(new WeakReference<Activity>(activity)); } } public void removeActivity(Activity activity) { findTargetAndRemove(activity.getClass()); } @Override public void removeAcitivtyByClazz(Class<? extends Activity> clazz) { findTargetAndRemove(clazz); } }
[ "xiaozhongcen@gmail.com" ]
xiaozhongcen@gmail.com
c0d9be02d1a433d83ea743f57f4ba4179408eea0
f92d6f8376fc86b3e70c7e514c9b0e8869ae3ed0
/app/src/main/java/com/yihai/caotang/event/BeaconTriggerEvent.java
ce76cf147e1c17d81c4fd9f23d3e6d1c761643ae
[]
no_license
saonam/pigeonhole
9db0f956922a5fec36a14cae6238fca747d3f1ac
05e7383a1e112e80eedd6dcd68ce7da27d6bf579
refs/heads/master
2020-04-27T17:27:41.611099
2018-05-08T03:26:52
2018-05-08T03:26:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
913
java
package com.yihai.caotang.event; import com.huijimuhei.beacon.data.BleDevice; /** * Created by mac on 2017/8/27. */ public class BeaconTriggerEvent { public static final int EVENT_LOCATION = 0; public static final int EVENT_GATE_TRIGGER = 1; public static final int EVENT_SPOT_TRIGGER = 2; public static final int EVENT_FENCE_TRIGGER = 3; private BleDevice device; private int event; private String type; public BeaconTriggerEvent(BleDevice device, int event) { this.device = device; this.event = event; } public BeaconTriggerEvent(BleDevice device, int event, String type) { this.device = device; this.event = event; this.type = type; } public BleDevice getDevice() { return device; } public int getEvent() { return event; } public String getType() { return type; } }
[ "381226310@qq.com" ]
381226310@qq.com
d690566cd91dd24c7707878b3f5c4a982e3bdba8
1d2ceb9aea3f8674ac662600f1296c6eb2cc4bbc
/src/main/java/com/cdkj/coin/wallet/api/impl/XN802756.java
254cb578b5778dc2e0b5305d15c12ac3786c7a8c
[]
no_license
13110992819/cs-wellet
4eed68622480c7e7ea5974578edc2c03d90e4f40
abf8134e3813ef6880dbf52764048ce2e64cc337
refs/heads/master
2020-04-09T18:19:26.452780
2018-02-10T03:55:45
2018-02-10T03:55:45
124,237,903
0
0
null
null
null
null
UTF-8
Java
false
false
1,106
java
package com.cdkj.coin.wallet.api.impl; import com.cdkj.coin.wallet.ao.IWithdrawAO; import com.cdkj.coin.wallet.api.AProcessor; import com.cdkj.coin.wallet.common.JsonUtil; import com.cdkj.coin.wallet.core.StringValidater; import com.cdkj.coin.wallet.dto.req.XN802756Req; import com.cdkj.coin.wallet.exception.BizException; import com.cdkj.coin.wallet.exception.ParaException; import com.cdkj.coin.wallet.spring.SpringContextHolder; /** * 取现详情 * @author: xieyj * @since: 2017年5月17日 下午6:35:28 * @history: */ public class XN802756 extends AProcessor { private IWithdrawAO withdrawAO = SpringContextHolder .getBean(IWithdrawAO.class); private XN802756Req req = null; @Override public Object doBusiness() throws BizException { return withdrawAO.getWithdraw(req.getCode(), req.getSystemCode()); } @Override public void doCheck(String inputparams, String operator) throws ParaException { req = JsonUtil.json2Bean(inputparams, XN802756Req.class); StringValidater.validateBlank(req.getCode(), req.getSystemCode()); } }
[ "leo.zheng@hichengdai.com" ]
leo.zheng@hichengdai.com