blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
f9090c33c031f102bb581b7e6172ce53fb25b80e
f58ca9770cfde2a1113bb438300f2e59a3040ac5
/trunk/ezThreadUtils/test/com/chilliwebs/ezthreadutils/test/EzThreadUtilTest.java
30d221933c00dce0a75c871d92ff0bdc69f11c1d
[]
no_license
BGCX067/ezthreadutils-svn-to-git
d97f1929c03bf8df99bebfcebbeaa548adb83b56
7f33613d3eb8bd7a21d1374d2b65bf906707c7f8
refs/heads/master
2016-09-01T08:51:46.511146
2015-12-28T14:41:01
2015-12-28T14:41:01
48,874,422
0
0
null
null
null
null
UTF-8
Java
false
false
4,181
java
/* * Copyright 2013 Nick Hecht chilliwebs@gmail.com. * * DO NOT DISTRIBUTE */ package com.chilliwebs.ezthreadutils.test; import com.chilliwebs.ezthreadutils.Consumer; import com.chilliwebs.ezthreadutils.Finalizer; import com.chilliwebs.ezthreadutils.Producer; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.After; import org.junit.AfterClass; import static org.junit.Assert.*; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; /** * * @author Nick Hecht chilliwebs@gmail.com */ public class EzThreadUtilTest { public EzThreadUtilTest() { } @BeforeClass public static void setUpClass() { } @AfterClass public static void tearDownClass() { } @Before public void setUp() { } @After public void tearDown() { } @Test public void TestProducerConsumer() { Integer[] numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int threads = 4; Producer<Integer> prod = new Producer<Integer>(threads, Integer.class, new Consumer<Integer>() { @Override public void consume(Integer data) throws Exception { assertTrue(data <= 9 && data >= 0); Thread.sleep(10); } }); // test size assertEquals(0, prod.getSize()); try { for (Integer num : numbers) { prod.produce(num); } } catch (Exception ex) { Logger.getLogger(EzThreadUtilTest.class.getName()).log(Level.SEVERE, null, ex); fail(ex.getLocalizedMessage()); } // test size assertEquals(10, prod.getSize()); // test started prod.start(); assertEquals(threads, prod.getLiveConsumers()); assertFalse(prod.isIdle()); try { // test wait untill empty prod.waitUntilQueueEmpty(); assertTrue(prod.isEmpty()); // test idle prod.waitUntilIdle(); assertTrue(prod.isIdle()); //stop prod.stop(); } catch (Exception ex) { Logger.getLogger(EzThreadUtilTest.class.getName()).log(Level.SEVERE, null, ex); fail(ex.getLocalizedMessage()); } //test stoped assertEquals(0, prod.getLiveConsumers()); } @Test public void TestFinalizer() { final boolean[] after_injectThreadFinalCallback = {false}; final boolean[] thread_callback_called = {false}; try { Thread t = new Thread() { @Override public void run() { try { Finalizer.injectThreadFinalCallback(new Runnable() { @Override public void run() { synchronized (thread_callback_called) { thread_callback_called[0] = true; } } }); synchronized (after_injectThreadFinalCallback) { after_injectThreadFinalCallback[0] = true; } } catch (InterruptedException ex) { Logger.getLogger(EzThreadUtilTest.class.getName()).log(Level.SEVERE, null, ex); fail(ex.getLocalizedMessage()); } } }; t.start(); t.join(); Thread.sleep(10); } catch (InterruptedException ex) { Logger.getLogger(EzThreadUtilTest.class.getName()).log(Level.SEVERE, null, ex); fail(ex.getLocalizedMessage()); } assertTrue("inject was not called successfully", after_injectThreadFinalCallback[0]); assertTrue("callback was not called successfully", thread_callback_called[0]); } }
[ "you@example.com" ]
you@example.com
679cf63100becf12eef554d4d8046b42ecd1108a
14aacd43c9e52e53b762071bfb2b8b16366ed84a
/unalcol/collection/unalcol/sort/Insertion.java
9c891a4400bcfacfec090259ade8de38b44cfe79
[]
no_license
danielrcardenas/unalcol
26ff523a80a4b62b687e2b2286523fa2adde69c4
b56ee54145a7c5bcc0faf187c09c69b7587f6ffe
refs/heads/master
2021-01-15T17:15:02.732499
2019-04-28T05:18:09
2019-04-28T05:18:09
203,480,783
0
0
null
2019-08-21T01:19:47
2019-08-21T01:19:47
null
UTF-8
Java
false
false
1,193
java
package unalcol.sort; /** * <p>InsertionSort algorithm</p> * * <p>Copyright: Copyright (c) 2010</p> * * @author Jonatan Gomez Perdomo * @version 1.0 */ public class Insertion<T> extends Sort<T> { /** * Default constructor */ public Insertion(){} /** * Crates a Insertion sort algorithm with the given order * @param order Order used for sorting the objects */ public Insertion( Order order ){ super( order ); } /** * Creates a Insertion sort algorithm using the given order and overwriting array flag * @param order Order used for sorting the objects * @param overwrite If the array should be overwritten or not */ public Insertion( Order order, boolean overwrite ){ super( order, overwrite ); } /** * Sorts a vector of objects using Insertion sort * @param a array to be sorted */ public boolean apply(T[] a, int start, int end) { for (int i = start; i < end && continueFlag; i++) { int j = i - 1; T value = a[i]; while(j >= start && compare(value, a[j])<0 && continueFlag) { a[j+1] = a[j]; j--; } a[j+1] = value; } return true; } }
[ "jgomezpe@unal.edu.co" ]
jgomezpe@unal.edu.co
06c88f3046a0ba3a9a0151e60fb761c011d86f53
a31913790a5aa5e88900a5d059727fbf55fc844d
/tools/at.bestsolution.dart.service.spec.ui/src/at/bestsolution/dart/service/spec/ui/DartServiceSpecUiModule.java
3fc3fa2e09fe4051b60c920cb5a0722919a2402f
[]
no_license
BestSolution-at/dartedit
a12e7b4b798423e2f5e8f2fc3d1e46e22817f17c
4aa7f55735948d961d3d2466ea3f55203ed66313
refs/heads/master
2020-04-05T14:03:07.237484
2016-09-16T08:47:10
2016-09-16T08:47:10
39,617,841
1
1
null
null
null
null
UTF-8
Java
false
false
397
java
/* * generated by Xtext */ package at.bestsolution.dart.service.spec.ui; import org.eclipse.ui.plugin.AbstractUIPlugin; /** * Use this class to register components to be used within the IDE. */ public class DartServiceSpecUiModule extends at.bestsolution.dart.service.spec.ui.AbstractDartServiceSpecUiModule { public DartServiceSpecUiModule(AbstractUIPlugin plugin) { super(plugin); } }
[ "tom.schindl@bestsolution.at" ]
tom.schindl@bestsolution.at
3d9fb4d6e6d4044a2e613aa7b05196e0563d9768
5c143eaa95bf0f5c63a5297840030ef2e1ef52d9
/BusinessProc-Dev/asset-services/asset-services-impl/src/main/java/com/fujixerox/aus/asset/impl/query/handlers/Interval.java
5d897b8655c4628d759a3328f4a1c0b65ae57f2a
[]
no_license
jhonner72/plat
c01a5b1e688b0d5ea75f394fe9d131a4641a1199
94c440606941e6512d58db46cecbc41a9c23a712
refs/heads/master
2016-08-10T17:22:40.387186
2016-01-12T21:15:13
2016-01-12T21:15:13
49,529,171
1
1
null
null
null
null
UTF-8
Java
false
false
541
java
package com.fujixerox.aus.asset.impl.query.handlers; import com.fujixerox.aus.asset.api.beans.tuples.Triplet; /** * @author Andrey B. Panfilov <andrew@panfilov.tel> */ public class Interval extends Triplet<Interval, Integer, Integer, Boolean> { public Interval(int low, int high, boolean interval) { super(low, high, interval); } public int getLow() { return getFirst(); } public int getHigh() { return getSecond(); } public boolean include() { return getThird(); } }
[ "BPS\\fraueaa" ]
BPS\fraueaa
e3c52640629b2d589b6032fdf9d56a328aa4ab05
1c99931e81886ebecb758d68003f22e072951ff9
/alipay/api/domain/AlipaySecurityRiskDirectionalRainscoreQueryModel.java
48474825aaccac5409cda0b3aeb5cb5950520d4c
[]
no_license
futurelive/vscode
f402e497933c12826ef73abb14506aab3c541c98
9f8d1da984cf4f9f330af2b75ddb21a7fff00eb9
refs/heads/master
2020-04-08T06:30:13.208537
2018-11-26T07:09:55
2018-11-26T07:09:55
159,099,314
0
0
null
null
null
null
UTF-8
Java
false
false
1,214
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * “蚁盾”风险评分定向接口服务 * * @author auto create * @since 1.0, 2017-12-12 10:00:27 */ public class AlipaySecurityRiskDirectionalRainscoreQueryModel extends AlipayObject { private static final long serialVersionUID = 3773648675777823437L; /** * 帐号内容,目前为中国大陆手机号(11位阿拉伯数字,不包含特殊符号或空格) */ @ApiField("account") private String account; /** * 账号类型,目前仅支持手机号(MOBILE_NO) */ @ApiField("account_type") private String accountType; /** * “蚁盾”风险评分服务版本号,当前版本为2.0 */ @ApiField("version") private String version; public String getAccount() { return this.account; } public void setAccount(String account) { this.account = account; } public String getAccountType() { return this.accountType; } public void setAccountType(String accountType) { this.accountType = accountType; } public String getVersion() { return this.version; } public void setVersion(String version) { this.version = version; } }
[ "1052418627@qq.com" ]
1052418627@qq.com
c6101f7a13028ca86d49bc2dfee1e2fd25c39bfa
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0425_public/tests/more/src/java/module0425_public_tests_more/a/IFoo3.java
54c7b9643237c0c0f86ea32640146886c2c326df
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
793
java
package module0425_public_tests_more.a; import java.beans.beancontext.*; import java.io.*; import java.rmi.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.io.File * @see java.rmi.Remote * @see java.nio.file.FileStore */ @SuppressWarnings("all") public interface IFoo3<Z> extends module0425_public_tests_more.a.IFoo2<Z> { java.sql.Array f0 = null; java.util.logging.Filter f1 = null; java.util.zip.Deflater f2 = null; String getName(); void setName(String s); Z get(); void set(Z e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
b55e0bbc72bb9347411ec057e2a9f420fad4c321
5064ac5f17e70b0ab7739e8b0f0049c6193294db
/src/main/java/lupos/example/MemoryIndexQueryEvaluatorTest.java
b2659dcda4272eb730121694b3bcb035f48c98d7
[]
no_license
luposdate/luposdate_example
590e24055795bab3f8585bdfa2c0ff3c3883bee9
839c971ebb0d1c6510cb7bc336707f0f5b765243
refs/heads/master
2021-06-28T12:49:37.197249
2016-11-01T09:26:01
2016-11-01T09:26:01
9,214,806
0
0
null
null
null
null
UTF-8
Java
false
false
1,951
java
package lupos.example; import java.util.Iterator; import java.util.LinkedList; import lupos.datastructures.bindings.Bindings; import lupos.datastructures.items.Variable; import lupos.datastructures.items.literal.LiteralFactory; import lupos.datastructures.items.literal.URILiteral; import lupos.datastructures.queryresult.QueryResult; import lupos.engine.evaluators.MemoryIndexQueryEvaluator; /** * This class just demonstrates a simple example using the luposdate query evaluator indexing data in main memory * by querying previously inserted data. */ public class MemoryIndexQueryEvaluatorTest { /** * The main entry point: Will be executed when the program is running * @param args the command line arguments will be ignored * @throws Exception in case of any errors */ public static void main(String[] args) throws Exception{ // use a hash map as dictionary in main memory LiteralFactory.setType(LiteralFactory.MapType.HASHMAP); // instantiate a new query evaluator working in main memory MemoryIndexQueryEvaluator evaluator = new MemoryIndexQueryEvaluator(); // first use an empty index evaluator.prepareInputData(new LinkedList<URILiteral>(), new LinkedList<URILiteral>()); // insert a first triple using a SPARUL query evaluator.getResult("INSERT DATA { <subject> <predicate> <object> }"); // set up a next query QueryResult result = evaluator.getResult("SELECT * WHERE { <subject> <predicate> ?object }"); // get iterator for iterating one time through the result of the query Iterator<Bindings> iterator = result.oneTimeIterator(); while(iterator.hasNext()) { // get the next solution of the query Bindings bindings = iterator.next(); // iterate through all bound variables for(Variable variable: bindings.getVariableSet()){ // print out the bound value of the variable System.out.println("Variable " + variable + " is bound to value " + bindings.get(variable)); } } } }
[ "luposdate@ifis.uni-luebeck.de" ]
luposdate@ifis.uni-luebeck.de
76c24f4a7fdaa29c9ebcfda0a0dc1f9859679b09
e94a35d021d318fc3f8f6dff72ac391a2131ccf4
/src/com/fourth/mythread20/Run.java
787528b3c317f5c4c7a2770f9a3481112b5da0d5
[]
no_license
zhangmenghan/JavaThread
5af8eea7ddfbc9030cafbbd9325158329ac2be49
8cbd824bd6cfde57b86b1bf26f1f001b743e8571
refs/heads/master
2020-06-30T00:12:36.758044
2019-08-13T07:31:52
2019-08-13T07:31:52
200,663,448
1
0
null
null
null
null
UTF-8
Java
false
false
540
java
package com.fourth.mythread20; public class Run { public static void main(String[] args) throws InterruptedException { final MyService service = new MyService(); Runnable runnableRef = new Runnable() { @Override public void run() { service.waitMethod(); } }; Thread threadA = new Thread(runnableRef); threadA.setName("A"); threadA.start(); Thread.sleep(500); Thread threadB = new Thread(runnableRef); threadB.setName("B"); threadB.start(); threadB.interrupt(); System.out.println("main end!"); } }
[ "2423306508@qq.com" ]
2423306508@qq.com
a7ef23d1288335ee774c1b3f92d9586d63bcbeea
88529b98c0dbc869b21eb6f419e92df89adaad6b
/app/src/main/java/com/example/administrator/pandachannels/fragmentlive/fragment/Burang_fragment.java
b23ec8d5394b5987513f0929c328d180474c5b9e
[]
no_license
hh415415/PandaChannelss
6468db54eb1cc7d8e07d4a9390e17d6a9322cc9a
778d885918440474c64c1dda0ff8eeca3a44f18c
refs/heads/master
2021-05-05T18:46:10.256366
2017-09-16T10:53:27
2017-09-16T10:53:27
103,745,343
0
0
null
null
null
null
UTF-8
Java
false
false
3,555
java
package com.example.administrator.pandachannels.fragmentlive.fragment; import android.content.Intent; import android.support.v4.app.Fragment; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.LinearLayoutManager; import android.view.View; import com.example.administrator.pandachannels.R; import com.example.administrator.pandachannels.fragmentchinese.fragmentclassify.moble.BeanTaishan; import com.example.administrator.pandachannels.fragmentlive.App; import com.example.administrator.pandachannels.fragmentlive.VideoActivity; import com.example.administrator.pandachannels.fragmentlive.adapter.WondfulAdapters; import com.example.administrator.pandachannels.fragmentlive.model.entity.ManyBean; import com.example.administrator.pandachannels.fragmentlive.model.entity.PandaLiveBean; import com.example.administrator.pandachannels.fragmentlive.model.entity.WondBean; import com.example.administrator.pandachannels.fragmentlive.presenter.BurangPersenterImpl; import com.example.administrator.pandachannels.framework.baseview.BaseFragment; import com.example.administrator.pandachannels.framework.contract.MainContract; import com.jcodecraeer.xrecyclerview.XRecyclerView; import java.util.ArrayList; import java.util.List; /** * A simple {@link Fragment} subclass. */ public class Burang_fragment extends BaseFragment implements MainContract.XSubView{ BurangPersenterImpl burangPersenter=new BurangPersenterImpl(this); private List<WondBean.VideoBean> mlist=new ArrayList<>(); private XRecyclerView recyclerView; @Override public void showLoading() { } @Override public void dissmissLoading() { } @Override public void showData(ArrayList<BeanTaishan.LiveBean> list) { } @Override public void showrror() { } @Override protected void initView(View view) { recyclerView = view.findViewById(R.id.bur_recycle); burangPersenter.requsetData(); } @Override protected int getLayout() { return R.layout.fragment_burang_fragment; } @Override protected void initData() { } @Override public void showDatas(PandaLiveBean pandaLiveBean) { } @Override public void showDatas1(List<ManyBean.ListBean> list) { } @Override public void showDatasWond(List<WondBean.VideoBean> videolist) { mlist.addAll(videolist); WondfulAdapters adapters=new WondfulAdapters(mlist,getActivity()); recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(),LinearLayoutManager.VERTICAL,false)); recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL)); recyclerView.setAdapter(adapters); adapters.setOnclick(new WondfulAdapters.Listener() { @Override public void Onclick(int position, View view) { Intent intent=new Intent(getActivity(), VideoActivity.class); String url = mlist.get(position).getUrl(); String vid = mlist.get(position).getVid(); intent.putExtra("url",url+vid); startActivity(intent); } }); recyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { @Override public void onRefresh() { mlist.clear(); App.PAGE=1; burangPersenter.requsetData(); recyclerView.refreshComplete(); } @Override public void onLoadMore() { App.PAGE++; burangPersenter.requsetData(); recyclerView.loadMoreComplete(); } }); } }
[ "1282775652@QQ.com" ]
1282775652@QQ.com
04f9d052958cd7387aa715d277a38a6888df1e04
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/com/android/server/wifi/hotspot2/anqp/I18Name.java
55f0a84b4f5445e20e8a046541732696d0bd9010
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,134
java
package com.android.server.wifi.hotspot2.anqp; import android.text.TextUtils; import com.android.internal.annotations.VisibleForTesting; import com.android.server.wifi.ByteBufferReader; import java.net.ProtocolException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Locale; public class I18Name { @VisibleForTesting public static final int LANGUAGE_CODE_LENGTH = 3; @VisibleForTesting public static final int MINIMUM_LENGTH = 3; private final String mLanguage; private final Locale mLocale; private final String mText; @VisibleForTesting public I18Name(String language, Locale locale, String text) { this.mLanguage = language; this.mLocale = locale; this.mText = text; } public static I18Name parse(ByteBuffer payload) throws ProtocolException { int length = payload.get() & Constants.BYTE_MASK; if (length >= 3) { String language = ByteBufferReader.readString(payload, 3, StandardCharsets.US_ASCII).trim(); return new I18Name(language, Locale.forLanguageTag(language), ByteBufferReader.readString(payload, length - 3, StandardCharsets.UTF_8)); } throw new ProtocolException("Invalid length: " + length); } public String getLanguage() { return this.mLanguage; } public Locale getLocale() { return this.mLocale; } public String getText() { return this.mText; } public boolean equals(Object thatObject) { boolean z = true; if (this == thatObject) { return true; } if (!(thatObject instanceof I18Name)) { return false; } I18Name that = (I18Name) thatObject; if (!TextUtils.equals(this.mLanguage, that.mLanguage) || !TextUtils.equals(this.mText, that.mText)) { z = false; } return z; } public int hashCode() { return (31 * this.mLanguage.hashCode()) + this.mText.hashCode(); } public String toString() { return this.mText + ':' + this.mLocale.getLanguage(); } }
[ "dstmath@163.com" ]
dstmath@163.com
6d4b1b851aaa84b8b590873f90de72fdb4e00a5f
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14263-35-6-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java
264e48d42384d5d4985a81fc59a3bf742cb932b0
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 01 04:42:34 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class InternalTemplateManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
ff0e8fcf0e949adca8786853f2cbe0cd0904e1cb
7630c50d8277ea7e7d1acd3fc0310c847df87339
/gwt-cs-main/src/main/java/org/cesiumjs/cs/datasources/updater/DynamicGeometryUpdater.java
44c8035bcb20b4aff81802f0a98d06bd85a6d50f
[ "Apache-2.0" ]
permissive
Oraza1704/gwt-cs
14947e6349161035382384b87d38d3271fe84a40
9b584eb03cf35cfea213d50c294f6adf9caabfae
refs/heads/master
2020-03-07T15:11:01.550416
2018-04-04T08:12:44
2018-04-04T08:12:44
127,547,682
0
0
null
2018-03-31T16:00:25
2018-03-31T16:00:24
null
UTF-8
Java
false
false
1,890
java
/* * Copyright 2018 iserge. * * 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.cesiumjs.cs.datasources.updater; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsType; import org.cesiumjs.cs.core.JulianDate; /** * Defines the interface for a dynamic geometry updater. A {@link DynamicGeometryUpdater} is responsible for handling * visualization of a specific type of geometry that needs to be recomputed based on simulation time. * This object is never used directly by client code, but is instead created by {@link GeometryUpdater} implementations * which contain dynamic geometry. This type defines an interface and cannot be instantiated directly. * * @author Serge Silaev aka iSergio <s.serge.b@gmail.com> */ @JsType(isNative = true, namespace = "Cesium", name = "DynamicGeometryUpdater") public interface DynamicGeometryUpdater { /** * Destroys and resources used by the object. Once an object is destroyed, it should not be used. */ @JsMethod void destroy(); /** * Returns true if this object was destroyed; otherwise, false. * @return True if this object was destroyed; otherwise, false. */ @JsMethod boolean isDestroyed(); /** * Updates the geometry to the specified time. * @param time The current time. */ @JsMethod void update(JulianDate time); }
[ "s.serge.b@gmail.com" ]
s.serge.b@gmail.com
e955077a627773e8e1a3407bec5c24aee5d7b488
fb41c04a4ead3b79625d0eb30ca85f0fd1c2d4c9
/main/boofcv-geo/src/test/java/boofcv/alg/geo/pose/TestPoseRodriguesCodec.java
7abcfa896159d8517b6fc87b06beb617517af5e5
[ "Apache-2.0", "LicenseRef-scancode-takuya-ooura" ]
permissive
thhart/BoofCV
899dcf1b4302bb9464520c36a9e54c6fe35969c7
43f25488673dc27590544330323c676f61c1a17a
refs/heads/SNAPSHOT
2023-08-18T10:19:50.269999
2023-07-15T23:13:25
2023-07-15T23:13:25
90,468,259
0
0
Apache-2.0
2018-10-26T08:47:44
2017-05-06T14:24:01
Java
UTF-8
Java
false
false
1,386
java
/* * Copyright (c) 2021, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package boofcv.alg.geo.pose; import boofcv.testing.BoofStandardJUnit; import georegression.struct.se.Se3_F64; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author Peter Abeles */ public class TestPoseRodriguesCodec extends BoofStandardJUnit { @Test void encode_decode() { double []orig = new double[]{.1,.2,.3,4,5,6}; double []found = new double[6]; Se3_F64 encoded = new Se3_F64(); PnPRodriguesCodec codec = new PnPRodriguesCodec(); assertEquals(6,codec.getParamLength()); codec.decode(orig,encoded); codec.encode(encoded,found); for( int i = 0; i < 6; i++ ) { assertEquals(orig[i],found[i],1e-6); } } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
99cc614148b8f9c9f5d02b21e661739884224ed7
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_18_0/Software/SoftwareWindowUpdate.java
6dd54a1c5def9458857dd6ced37b75e597c1ae12
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
2,321
java
package Netspan.NBI_18_0.Software; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="Name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="SoftwareWindow" type="{http://Airspan.Netspan.WebServices}SwWindowWs" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "name", "softwareWindow" }) @XmlRootElement(name = "SoftwareWindowUpdate") public class SoftwareWindowUpdate { @XmlElement(name = "Name") protected String name; @XmlElement(name = "SoftwareWindow") protected SwWindowWs softwareWindow; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the softwareWindow property. * * @return * possible object is * {@link SwWindowWs } * */ public SwWindowWs getSoftwareWindow() { return softwareWindow; } /** * Sets the value of the softwareWindow property. * * @param value * allowed object is * {@link SwWindowWs } * */ public void setSoftwareWindow(SwWindowWs value) { this.softwareWindow = value; } }
[ "ggrunwald@airspan.com" ]
ggrunwald@airspan.com
a17f9be6399bcf8d645f4475d3f06fa79ccbc260
c0fe21b86f141256c85ab82c6ff3acc56b73d3db
/cdn/src/main/java/com/jdcloud/sdk/service/cdn/model/DeleteForbiddenInfoCommonResponse.java
0b9e1175f45222ebec319d15e5b8cd5292f4de7f
[ "Apache-2.0" ]
permissive
jdcloud-api/jdcloud-sdk-java
3fec9cf552693520f07b43a1e445954de60e34a0
bcebe28306c4ccc5b2b793e1a5848b0aac21b910
refs/heads/master
2023-07-25T07:03:36.682248
2023-07-25T06:54:39
2023-07-25T06:54:39
126,275,669
47
61
Apache-2.0
2023-09-07T08:41:24
2018-03-22T03:41:41
Java
UTF-8
Java
false
false
1,109
java
/* * Copyright 2018 JDCLOUD.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. * * 域名url封禁类接口 * Openapi For JCLOUD cdn * * OpenAPI spec version: v1 * Contact: pid-cdn@jd.com * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.cdn.model; import com.jdcloud.sdk.service.JdcloudResponse; /** * 删除封禁信息 */ public class DeleteForbiddenInfoCommonResponse extends JdcloudResponse<DeleteForbiddenInfoCommonResult> implements java.io.Serializable { private static final long serialVersionUID = 1L; }
[ "jdcloud-api@jd.com" ]
jdcloud-api@jd.com
41fa0f2c056031d3fa193f9732e785ff280fffdb
5928bc46d350fbb1abd6dfe6be598033b63ea7ed
/upay-server/src/main/java/af/asr/server/infrastructure/exception/common/ParseException.java
8f11515c115758fd4e06cab904e475e48b49221c
[]
no_license
mohbadar/upay
3fa4808b298a1e06a62130ace8c97cc230cbb0c1
c40c46d305abf0e1b0a1fd5ecd50202864985931
refs/heads/master
2023-06-22T07:58:23.959294
2020-01-06T11:05:54
2020-01-06T11:05:54
231,886,323
1
0
null
2023-06-14T22:26:05
2020-01-05T08:04:01
Java
UTF-8
Java
false
false
495
java
package af.asr.server.infrastructure.exception.common; /** * Signals that an error has been reached unexpectedly while parsing. */ public class ParseException extends BaseUncheckedException { private static final long serialVersionUID = 924722202110630628L; public ParseException(String errorCode, String errorMessage) { super(errorCode, errorMessage); } public ParseException(String errorCode, String errorMessage, Throwable cause) { super(errorCode, errorMessage, cause); } }
[ "mohammadbadarhashimi@gmail.com" ]
mohammadbadarhashimi@gmail.com
7943d03611bd33c04e190f2354eea894ff00fac2
0a633ff415c395f22df865acddb3f41566c1e99b
/cascading-core/src/main/java/cascading/flow/planner/process/FlowStepGraph.java
93a17203ffb69f0e5158ff312237220d1f66a2df
[ "Apache-2.0" ]
permissive
etleap/cascading
8b37914f692b72b753c6dde855bf223c689e3a90
f518308d47d6131cceaef9b7945396b3ff684bd1
refs/heads/3.1
2021-01-20T21:38:15.147809
2016-09-11T03:08:10
2016-09-11T03:08:10
67,954,568
0
0
null
2016-09-11T21:11:14
2016-09-11T21:11:14
null
UTF-8
Java
false
false
3,565
java
/* * Copyright (c) 2007-2016 Concurrent, Inc. All Rights Reserved. * * Project and contact information: http://www.cascading.org/ * * This file is part of the Cascading project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package cascading.flow.planner.process; import java.util.Iterator; import java.util.List; import java.util.Map; import cascading.flow.FlowElement; import cascading.flow.FlowStep; import cascading.flow.planner.BaseFlowStep; import cascading.flow.planner.FlowPlanner; import cascading.flow.planner.graph.AnnotatedDecoratedElementGraph; import cascading.flow.planner.graph.ElementGraph; import cascading.flow.planner.graph.FlowElementGraph; import cascading.util.EnumMultiMap; public class FlowStepGraph extends BaseProcessGraph<FlowStep> { public FlowStepGraph() { } public FlowStepGraph( FlowStepFactory flowStepFactory, FlowElementGraph flowElementGraph, Map<ElementGraph, List<? extends ElementGraph>> nodeSubGraphsMap ) { this( flowStepFactory, flowElementGraph, nodeSubGraphsMap, null ); } public FlowStepGraph( FlowStepFactory flowStepFactory, FlowElementGraph flowElementGraph, Map<ElementGraph, List<? extends ElementGraph>> nodeSubGraphsMap, Map<ElementGraph, List<? extends ElementGraph>> pipelineSubGraphsMap ) { buildGraph( flowStepFactory, flowElementGraph, nodeSubGraphsMap, pipelineSubGraphsMap ); Iterator<FlowStep> iterator = getTopologicalIterator(); int ordinal = 0; int size = vertexSet().size(); while( iterator.hasNext() ) { BaseFlowStep flowStep = (BaseFlowStep) iterator.next(); flowStep.setOrdinal( ordinal++ ); flowStep.setName( flowStepFactory.makeFlowStepName( flowStep, size, flowStep.getOrdinal() ) ); } } protected void buildGraph( FlowStepFactory flowStepFactory, FlowElementGraph flowElementGraph, Map<ElementGraph, List<? extends ElementGraph>> nodeSubGraphsMap, Map<ElementGraph, List<? extends ElementGraph>> pipelineSubGraphsMap ) { for( ElementGraph stepSubGraph : nodeSubGraphsMap.keySet() ) { List<? extends ElementGraph> nodeSubGraphs = nodeSubGraphsMap.get( stepSubGraph ); FlowNodeGraph flowNodeGraph = createFlowNodeGraph( flowStepFactory, flowElementGraph, pipelineSubGraphsMap, nodeSubGraphs ); EnumMultiMap<FlowElement> annotations = flowNodeGraph.getAnnotations(); // pull up annotations if( !annotations.isEmpty() ) stepSubGraph = new AnnotatedDecoratedElementGraph( stepSubGraph, annotations ); FlowStep flowStep = flowStepFactory.createFlowStep( stepSubGraph, flowNodeGraph ); addVertex( flowStep ); } bindEdges(); } protected FlowNodeGraph createFlowNodeGraph( FlowStepFactory flowStepFactory, FlowElementGraph flowElementGraph, Map<ElementGraph, List<? extends ElementGraph>> pipelineSubGraphsMap, List<? extends ElementGraph> nodeSubGraphs ) { return new FlowNodeGraph( flowStepFactory.getFlowNodeFactory(), flowElementGraph, nodeSubGraphs, pipelineSubGraphsMap ); } }
[ "chris@wensel.net" ]
chris@wensel.net
17e130647d6207dc75e9954cce014d31568c38bb
311f1237e7498e7d1d195af5f4bcd49165afa63a
/sourcedata/poi-REL_3_0/src/java/org/apache/poi/ddf/EscherRecordFactory.java
cd52b635dd564f57d2ef6f0f35bdb1c4691a4337
[ "Apache-2.0" ]
permissive
DXYyang/SDP
86ee0e9fb7032a0638b8bd825bcf7585bccc8021
6ad0daf242d4062888ceca6d4a1bd4c41fd99b63
refs/heads/master
2023-01-11T02:29:36.328694
2019-11-02T09:38:34
2019-11-02T09:38:34
219,128,146
10
1
Apache-2.0
2023-01-02T21:53:42
2019-11-02T08:54:26
Java
UTF-8
Java
false
false
1,396
java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.ddf; /** * The escher record factory interface allows for the creation of escher * records from a pointer into a data array. * * @author Glen Stampoultzis (glens at apache.org) */ public interface EscherRecordFactory { /** * Create a new escher record from the data provided. Does not attempt * to fill the contents of the record however. */ EscherRecord createRecord( byte[] data, int offset ); }
[ "512463514@qq.com" ]
512463514@qq.com
04977792420e5a699325a5fa13ca203c7f57f91b
d704ec43f7a5a296b91f5de0023def92f013dcda
/core/src/main/java/org/elasticsearch/search/suggest/term/TermSuggester.java
34cd3ad4d56369569c84565946de9c8b05ad96e1
[ "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
diegopacheco/elassandra
e4ede3085416750d4a71bcdf1ae7b77786b6cc36
d7f85d1768d5ca8e7928d640609dd5a777b2523c
refs/heads/master
2021-01-12T08:24:05.935475
2016-12-15T06:53:09
2016-12-15T06:53:09
76,563,249
0
1
Apache-2.0
2023-03-20T11:53:08
2016-12-15T13:46:19
Java
UTF-8
Java
false
false
4,300
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.search.suggest.term; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.spell.DirectSpellChecker; import org.apache.lucene.search.spell.SuggestWord; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.CharsRefBuilder; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.text.Text; import org.elasticsearch.search.suggest.SuggestContextParser; import org.elasticsearch.search.suggest.SuggestUtils; import org.elasticsearch.search.suggest.Suggester; import org.elasticsearch.search.suggest.SuggestionSearchContext.SuggestionContext; import java.io.IOException; import java.util.ArrayList; import java.util.List; public final class TermSuggester extends Suggester<TermSuggestionContext> { @Override public TermSuggestion innerExecute(String name, TermSuggestionContext suggestion, IndexSearcher searcher, CharsRefBuilder spare) throws IOException { DirectSpellChecker directSpellChecker = SuggestUtils.getDirectSpellChecker(suggestion.getDirectSpellCheckerSettings()); final IndexReader indexReader = searcher.getIndexReader(); TermSuggestion response = new TermSuggestion( name, suggestion.getSize(), suggestion.getDirectSpellCheckerSettings().sort() ); List<Token> tokens = queryTerms(suggestion, spare); for (Token token : tokens) { // TODO: Extend DirectSpellChecker in 4.1, to get the raw suggested words as BytesRef SuggestWord[] suggestedWords = directSpellChecker.suggestSimilar( token.term, suggestion.getShardSize(), indexReader, suggestion.getDirectSpellCheckerSettings().suggestMode() ); Text key = new Text(new BytesArray(token.term.bytes())); TermSuggestion.Entry resultEntry = new TermSuggestion.Entry(key, token.startOffset, token.endOffset - token.startOffset); for (SuggestWord suggestWord : suggestedWords) { Text word = new Text(suggestWord.string); resultEntry.addOption(new TermSuggestion.Entry.Option(word, suggestWord.freq, suggestWord.score)); } response.addTerm(resultEntry); } return response; } @Override public SuggestContextParser getContextParser() { return new TermSuggestParser(this); } private List<Token> queryTerms(SuggestionContext suggestion, CharsRefBuilder spare) throws IOException { final List<Token> result = new ArrayList<>(); final String field = suggestion.getField(); SuggestUtils.analyze(suggestion.getAnalyzer(), suggestion.getText(), field, new SuggestUtils.TokenConsumer() { @Override public void nextToken() { Term term = new Term(field, BytesRef.deepCopyOf(fillBytesRef(new BytesRefBuilder()))); result.add(new Token(term, offsetAttr.startOffset(), offsetAttr.endOffset())); } }, spare); return result; } private static class Token { public final Term term; public final int startOffset; public final int endOffset; private Token(Term term, int startOffset, int endOffset) { this.term = term; this.startOffset = startOffset; this.endOffset = endOffset; } } }
[ "vroyer@vroyer.org" ]
vroyer@vroyer.org
dfe49020d43d35e21af086c4f1ba1fb01a1d510a
f11913610e93f6a925204d9e9482980db4a809b6
/examples/APetriNetEditorIn15Minutes.diagram/src/PetriNets/diagram/navigator/PetriNetNavigatorLinkHelper.java
def5053af4b8525c5e9f911f91cfb49993a70559
[]
no_license
ekkart/ECNO
c402cfbebf29b27f15524459058a72c2c3852a80
2cf7eb844ef897ab4a4d56ae72721d4b000bc34c
refs/heads/master
2020-03-06T23:53:07.109577
2020-03-03T19:57:54
2020-03-03T19:57:54
127,144,163
1
0
null
null
null
null
UTF-8
Java
false
false
4,746
java
package PetriNets.diagram.navigator; import org.eclipse.core.resources.IFile; import org.eclipse.emf.common.ui.URIEditorInput; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; import org.eclipse.gef.EditPart; import org.eclipse.gef.GraphicalViewer; import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.navigator.ILinkHelper; import org.eclipse.ui.part.FileEditorInput; /** * @generated */ public class PetriNetNavigatorLinkHelper implements ILinkHelper { /** * @generated */ private static IEditorInput getEditorInput(Diagram diagram) { Resource diagramResource = diagram.eResource(); for (EObject nextEObject : diagramResource.getContents()) { if (nextEObject == diagram) { return new FileEditorInput( WorkspaceSynchronizer.getFile(diagramResource)); } if (nextEObject instanceof Diagram) { break; } } URI uri = EcoreUtil.getURI(diagram); String editorName = uri.lastSegment() + '#' + diagram.eResource().getContents().indexOf(diagram); IEditorInput editorInput = new URIEditorInput(uri, editorName); return editorInput; } /** * @generated */ public IStructuredSelection findSelection(IEditorInput anInput) { IDiagramDocument document = PetriNets.diagram.part.PetriNetDiagramEditorPlugin .getInstance().getDocumentProvider() .getDiagramDocument(anInput); if (document == null) { return StructuredSelection.EMPTY; } Diagram diagram = document.getDiagram(); if (diagram == null || diagram.eResource() == null) { return StructuredSelection.EMPTY; } IFile file = WorkspaceSynchronizer.getFile(diagram.eResource()); if (file != null) { PetriNets.diagram.navigator.PetriNetNavigatorItem item = new PetriNets.diagram.navigator.PetriNetNavigatorItem( diagram, file, false); return new StructuredSelection(item); } return StructuredSelection.EMPTY; } /** * @generated */ public void activateEditor(IWorkbenchPage aPage, IStructuredSelection aSelection) { if (aSelection == null || aSelection.isEmpty()) { return; } if (false == aSelection.getFirstElement() instanceof PetriNets.diagram.navigator.PetriNetAbstractNavigatorItem) { return; } PetriNets.diagram.navigator.PetriNetAbstractNavigatorItem abstractNavigatorItem = (PetriNets.diagram.navigator.PetriNetAbstractNavigatorItem) aSelection .getFirstElement(); View navigatorView = null; if (abstractNavigatorItem instanceof PetriNets.diagram.navigator.PetriNetNavigatorItem) { navigatorView = ((PetriNets.diagram.navigator.PetriNetNavigatorItem) abstractNavigatorItem) .getView(); } else if (abstractNavigatorItem instanceof PetriNets.diagram.navigator.PetriNetNavigatorGroup) { PetriNets.diagram.navigator.PetriNetNavigatorGroup navigatorGroup = (PetriNets.diagram.navigator.PetriNetNavigatorGroup) abstractNavigatorItem; if (navigatorGroup.getParent() instanceof PetriNets.diagram.navigator.PetriNetNavigatorItem) { navigatorView = ((PetriNets.diagram.navigator.PetriNetNavigatorItem) navigatorGroup .getParent()).getView(); } } if (navigatorView == null) { return; } IEditorInput editorInput = getEditorInput(navigatorView.getDiagram()); IEditorPart editor = aPage.findEditor(editorInput); if (editor == null) { return; } aPage.bringToTop(editor); if (editor instanceof DiagramEditor) { DiagramEditor diagramEditor = (DiagramEditor) editor; ResourceSet diagramEditorResourceSet = diagramEditor .getEditingDomain().getResourceSet(); EObject selectedView = diagramEditorResourceSet.getEObject( EcoreUtil.getURI(navigatorView), true); if (selectedView == null) { return; } GraphicalViewer graphicalViewer = (GraphicalViewer) diagramEditor .getAdapter(GraphicalViewer.class); EditPart selectedEditPart = (EditPart) graphicalViewer .getEditPartRegistry().get(selectedView); if (selectedEditPart != null) { graphicalViewer.select(selectedEditPart); } } } }
[ "ekki@dtu.dk" ]
ekki@dtu.dk
f0e282b5ef8f12afb480aaa138212af00aae8490
ea8013860ed0b905c64f449c8bce9e0c34a23f7b
/WallpaperPickerGoogleRelease/sources/androidx/fragment/app/LogWriter.java
38c9fc150abd752793ed72986686ec97abae2636
[]
no_license
TheScarastic/redfin_b5
5efe0dc0d40b09a1a102dfb98bcde09bac4956db
6d85efe92477576c4901cce62e1202e31c30cbd2
refs/heads/master
2023-08-13T22:05:30.321241
2021-09-28T12:33:20
2021-09-28T12:33:20
411,210,644
1
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
package androidx.fragment.app; import android.util.Log; import java.io.Writer; /* loaded from: classes.dex */ public final class LogWriter extends Writer { public StringBuilder mBuilder = new StringBuilder(128); public final String mTag; public LogWriter(String str) { this.mTag = str; } @Override // java.io.Writer, java.io.Closeable, java.lang.AutoCloseable public void close() { flushBuilder(); } @Override // java.io.Writer, java.io.Flushable public void flush() { flushBuilder(); } public final void flushBuilder() { if (this.mBuilder.length() > 0) { Log.d(this.mTag, this.mBuilder.toString()); StringBuilder sb = this.mBuilder; sb.delete(0, sb.length()); } } @Override // java.io.Writer public void write(char[] cArr, int i, int i2) { for (int i3 = 0; i3 < i2; i3++) { char c = cArr[i + i3]; if (c == '\n') { flushBuilder(); } else { this.mBuilder.append(c); } } } }
[ "warabhishek@gmail.com" ]
warabhishek@gmail.com
eacef7be2cf2b6468208223356edf25e45c2c482
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/learning/5606/CountsStoreRecoveryTest.java
bcd9bb0d6d47ff5975d7c3695d80784747702a47
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,257
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j 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 recovery; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import java.io.IOException; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Transaction; import org.neo4j.internal.kernel.api.Kernel; import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.kernel.impl.api.CountsVisitor; import org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine; import org.neo4j.kernel.impl.store.MetaDataStore; import org.neo4j.kernel.impl.store.NeoStores; import org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointer; import org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo; import org.neo4j.kernel.internal.GraphDatabaseAPI; import org.neo4j.test.TestGraphDatabaseFactory; import org.neo4j.test.rule.fs.EphemeralFileSystemRule; import static org.junit.Assert.assertEquals; import static org.neo4j.graphdb.Label.label; import static org.neo4j.internal.kernel.api.TokenRead.NO_TOKEN; import static org.neo4j.internal.kernel.api.Transaction.Type.explicit; import static org.neo4j.internal.kernel.api.security.LoginContext.AUTH_DISABLED; public class CountsStoreRecoveryTest { @Rule public final EphemeralFileSystemRule fsRule = new EphemeralFileSystemRule(); private GraphDatabaseService db; @Before public void before() { db = databaseFactory( fsRule.get() ).newImpermanentDatabase(); } @After public void after() { db.shutdown(); } @Test public void shouldRecoverTheCountsStoreEvenWhenIfNeoStoreDoesNotNeedRecovery() throws Exception { // given createNode( "A" ); checkPoint(); createNode( "B" ); flushNeoStoreOnly(); // when crashAndRestart(); // then try ( org.neo4j.internal.kernel.api.Transaction tx = ((GraphDatabaseAPI) db).getDependencyResolver().resolveDependency( Kernel.class ) .beginTransaction( explicit, AUTH_DISABLED ) ) { assertEquals( 1, tx.dataRead().countsForNode( tx.tokenRead().nodeLabel( "A" ) ) ); assertEquals( 1, tx.dataRead().countsForNode( tx.tokenRead().nodeLabel( "B" ) ) ); assertEquals( 2, tx.dataRead().countsForNode( NO_TOKEN ) ); } } private void flushNeoStoreOnly() { NeoStores neoStores = ((GraphDatabaseAPI) db).getDependencyResolver() .resolveDependency( RecordStorageEngine.class ).testAccessNeoStores(); MetaDataStore metaDataStore = neoStores.getMetaDataStore(); metaDataStore.flush(); } private void checkPoint() throws IOException { ((GraphDatabaseAPI) db).getDependencyResolver() .resolveDependency( CheckPointer.class ).forceCheckPoint( new SimpleTriggerInfo( "test" ) ); } private void crashAndRestart() throws Exception { final GraphDatabaseService db1 = db; FileSystemAbstraction uncleanFs = fsRule.snapshot( db1::shutdown ); db = databaseFactory( uncleanFs ).newImpermanentDatabase(); } private void createNode( String label ) { try ( Transaction tx = db.beginTx() ) { db.createNode( label( label ) ); tx.success(); } } private TestGraphDatabaseFactory databaseFactory( FileSystemAbstraction fs ) { return new TestGraphDatabaseFactory().setFileSystem( fs ); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
c7481796029dcb5f51a6f89023edbe733aa0208c
774d36285e48bd429017b6901a59b8e3a51d6add
/sources/com/google/android/gms/tasks/Tasks.java
c059d78c27a0440cbb5f8ebcc71f8826b972821a
[]
no_license
jorge-luque/hb
83c086851a409e7e476298ffdf6ba0c8d06911db
b467a9af24164f7561057e5bcd19cdbc8647d2e5
refs/heads/master
2023-08-25T09:32:18.793176
2020-10-02T11:02:01
2020-10-02T11:02:01
300,586,541
0
0
null
null
null
null
UTF-8
Java
false
false
7,526
java
package com.google.android.gms.tasks; import com.google.android.gms.common.internal.Preconditions; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.CancellationException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import javax.annotation.concurrent.GuardedBy; public final class Tasks { private static final class zza implements zzb { private final CountDownLatch zzaf; private zza() { this.zzaf = new CountDownLatch(1); } public final void await() throws InterruptedException { this.zzaf.await(); } public final void onCanceled() { this.zzaf.countDown(); } public final void onFailure(Exception exc) { this.zzaf.countDown(); } public final void onSuccess(Object obj) { this.zzaf.countDown(); } public final boolean await(long j, TimeUnit timeUnit) throws InterruptedException { return this.zzaf.await(j, timeUnit); } /* synthetic */ zza(zzv zzv) { this(); } } interface zzb extends OnCanceledListener, OnFailureListener, OnSuccessListener<Object> { } private static final class zzc implements zzb { private final Object mLock = new Object(); private final zzu<Void> zza; @GuardedBy("mLock") private Exception zzab; private final int zzag; @GuardedBy("mLock") private int zzah; @GuardedBy("mLock") private int zzai; @GuardedBy("mLock") private int zzaj; @GuardedBy("mLock") private boolean zzak; public zzc(int i, zzu<Void> zzu) { this.zzag = i; this.zza = zzu; } @GuardedBy("mLock") private final void zzf() { if (this.zzah + this.zzai + this.zzaj != this.zzag) { return; } if (this.zzab != null) { zzu<Void> zzu = this.zza; int i = this.zzai; int i2 = this.zzag; StringBuilder sb = new StringBuilder(54); sb.append(i); sb.append(" out of "); sb.append(i2); sb.append(" underlying tasks failed"); zzu.setException(new ExecutionException(sb.toString(), this.zzab)); } else if (this.zzak) { this.zza.zza(); } else { this.zza.setResult(null); } } public final void onCanceled() { synchronized (this.mLock) { this.zzaj++; this.zzak = true; zzf(); } } public final void onFailure(Exception exc) { synchronized (this.mLock) { this.zzai++; this.zzab = exc; zzf(); } } public final void onSuccess(Object obj) { synchronized (this.mLock) { this.zzah++; zzf(); } } } private Tasks() { } public static <TResult> TResult await(Task<TResult> task) throws ExecutionException, InterruptedException { Preconditions.checkNotMainThread(); Preconditions.checkNotNull(task, "Task must not be null"); if (task.isComplete()) { return zzb(task); } zza zza2 = new zza((zzv) null); zza(task, zza2); zza2.await(); return zzb(task); } public static <TResult> Task<TResult> call(Callable<TResult> callable) { return call(TaskExecutors.MAIN_THREAD, callable); } public static <TResult> Task<TResult> forCanceled() { zzu zzu = new zzu(); zzu.zza(); return zzu; } public static <TResult> Task<TResult> forException(Exception exc) { zzu zzu = new zzu(); zzu.setException(exc); return zzu; } public static <TResult> Task<TResult> forResult(TResult tresult) { zzu zzu = new zzu(); zzu.setResult(tresult); return zzu; } public static Task<Void> whenAll(Collection<? extends Task<?>> collection) { if (collection.isEmpty()) { return forResult((Object) null); } for (Task task : collection) { if (task == null) { throw new NullPointerException("null tasks are not accepted"); } } zzu zzu = new zzu(); zzc zzc2 = new zzc(collection.size(), zzu); for (Task zza2 : collection) { zza(zza2, zzc2); } return zzu; } public static Task<List<Task<?>>> whenAllComplete(Collection<? extends Task<?>> collection) { return whenAll(collection).continueWithTask(new zzx(collection)); } public static <TResult> Task<List<TResult>> whenAllSuccess(Collection<? extends Task<?>> collection) { return whenAll(collection).continueWith(new zzw(collection)); } private static void zza(Task<?> task, zzb zzb2) { task.addOnSuccessListener(TaskExecutors.zzw, (OnSuccessListener<? super Object>) zzb2); task.addOnFailureListener(TaskExecutors.zzw, (OnFailureListener) zzb2); task.addOnCanceledListener(TaskExecutors.zzw, (OnCanceledListener) zzb2); } private static <TResult> TResult zzb(Task<TResult> task) throws ExecutionException { if (task.isSuccessful()) { return task.getResult(); } if (task.isCanceled()) { throw new CancellationException("Task is already canceled"); } throw new ExecutionException(task.getException()); } public static <TResult> Task<TResult> call(Executor executor, Callable<TResult> callable) { Preconditions.checkNotNull(executor, "Executor must not be null"); Preconditions.checkNotNull(callable, "Callback must not be null"); zzu zzu = new zzu(); executor.execute(new zzv(zzu, callable)); return zzu; } public static Task<List<Task<?>>> whenAllComplete(Task<?>... taskArr) { return whenAllComplete((Collection<? extends Task<?>>) Arrays.asList(taskArr)); } public static <TResult> Task<List<TResult>> whenAllSuccess(Task<?>... taskArr) { return whenAllSuccess((Collection<? extends Task<?>>) Arrays.asList(taskArr)); } public static <TResult> TResult await(Task<TResult> task, long j, TimeUnit timeUnit) throws ExecutionException, InterruptedException, TimeoutException { Preconditions.checkNotMainThread(); Preconditions.checkNotNull(task, "Task must not be null"); Preconditions.checkNotNull(timeUnit, "TimeUnit must not be null"); if (task.isComplete()) { return zzb(task); } zza zza2 = new zza((zzv) null); zza(task, zza2); if (zza2.await(j, timeUnit)) { return zzb(task); } throw new TimeoutException("Timed out waiting for Task"); } public static Task<Void> whenAll(Task<?>... taskArr) { if (taskArr.length == 0) { return forResult((Object) null); } return whenAll((Collection<? extends Task<?>>) Arrays.asList(taskArr)); } }
[ "jorge.luque@taiger.com" ]
jorge.luque@taiger.com
30bf5ad4f59231ede6d1415b7278867c68a38b81
7f8911ca170a2a974576a0d44125e733eeca3b0c
/admin-portal/sms-server/src/main/java/com/tng/portal/sms/server/service/SMSProviderService.java
7563d4563e5a2602f5247e6767166d9732751490
[]
no_license
jianfengEric/testcase3
019afb24e28a8019e1bc4f3b22239be8fe48aa77
f7f98e281fd12d413f4c923172e96f86ccb6d34b
refs/heads/master
2020-04-28T08:53:01.617761
2019-04-01T03:12:24
2019-04-01T03:12:24
175,145,884
0
0
null
null
null
null
UTF-8
Java
false
false
547
java
package com.tng.portal.sms.server.service; import java.util.List; import com.tng.portal.common.vo.sms.SMSProviderDto; import com.tng.portal.sms.server.vo.SMSServiceApplicationDto; public interface SMSProviderService { List<SMSProviderDto> getSMSProviderList(String applicationCode); String querySMSProviderStatus(String smsProviderId); void changeSMSProviderStatus(String applicationCode, String smsProviderId, String status); String updateSMSProvider(SMSProviderDto dto); void changePriority(List<SMSServiceApplicationDto> dtos); }
[ "eric.lu@sinodynamic.com" ]
eric.lu@sinodynamic.com
5b313aec7368d8db3bf744bb9184f1b21431874b
6419a212e9ec9354edf09626f75e89d46d06e6ab
/fs_SRE_base/src/configurableLucene/com/funshion/luc/defines/AllIndexDetector.java
80a0a50f62f838e2d96e0b327a0b8149f16efa84
[]
no_license
liyiwei0405/fs
7c51d031e0059e77348a9b8c7b628fa7498b0af8
759355c537780105fd6cd9005ee9d4799805614f
refs/heads/master
2020-05-18T13:28:02.707640
2014-03-07T10:30:08
2014-03-07T10:30:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.funshion.luc.defines; import com.funshion.search.IndexableRecord; public class AllIndexDetector extends IndexActionDetector{ @Override public ActionType checkType(IndexableRecord rec) { return ActionType.ADD; } }
[ "liyw@funshion.com" ]
liyw@funshion.com
ebf67a35807f126d245ff9d514e4d32dbe95cb83
f1f5734f383d227a8cebd553fe5d6e2b3b470633
/net/divinerpg/blocks/overworld/BlockLights.java
02a8e759984d5522bc60468d4554e4b047d812f7
[ "MIT" ]
permissive
mazetar/Divine-Rpg
eec230de679b8187e9ecbef54d439e3287f219e1
ed865743547265e8d085e9c370229be8a3d8789a
refs/heads/master
2016-09-05T20:35:28.769169
2013-10-04T19:12:13
2013-10-04T19:12:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
192
java
package net.divinerpg.blocks.overworld; import net.minecraft.block.BlockLadder; public class BlockLights extends BlockLadder { public BlockLights(int par1, int par2) { super(par1); } }
[ "admin@mazetar.com" ]
admin@mazetar.com
4e7be61ae74c85ac87e71ed064e4537ce09091ff
07e511ef2cf0d5100327d3c5763b6cad0ad2f331
/intercept-activity/src/main/java/com/android/intercept_activity/StubActivity.java
ba2d15d69925a23434f5f8c0b29536e947fa4407
[ "Apache-2.0" ]
permissive
jhwsx/Understand_Plugin_Framework_Weishu
7dc071e554a1309e6b10e7c7194244ca6a15644e
f3fe995c5bb707f31526b70f754e47bdb324d14b
refs/heads/master
2021-01-23T13:08:10.014033
2017-07-12T11:23:16
2017-07-12T11:23:16
93,220,985
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
package com.android.intercept_activity; import android.app.Activity; /** * Created by wzc on 2017/7/5. * 替身Activity,在AndroidManifest.xml中进行注册,用来欺骗AMS */ public class StubActivity extends Activity { }
[ "392337950@qq.com" ]
392337950@qq.com
af8fbd70e45348f6d8e9b574f73ceaf22bb8e123
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/com/isseiaoki/simplecropview/R$id.java
441018bb853947c5e9027f4c27fdcf29d8a2ec1d
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
788
java
package com.isseiaoki.simplecropview; public final class R$id { public static final int circle = 2131362023; public static final int circle_square = 2131362025; public static final int custom = 2131362105; public static final int fit_image = 2131362218; public static final int free = 2131362245; public static final int not_show = 2131362549; public static final int ratio_16_9 = 2131362751; public static final int ratio_3_4 = 2131362752; public static final int ratio_4_3 = 2131362753; public static final int ratio_9_16 = 2131362754; public static final int show_always = 2131362930; public static final int show_on_touch = 2131362931; public static final int square = 2131362959; private R$id() { } }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
d2c0fbcb320330fe452dbca6a3a60af8a3722129
d16724e97358f301e99af0687f5db82d9ac4ff7e
/rawdata/java/snippets/561.java
209da3f0fac2778fd0ce09f48cea53b9e48c7699
[]
no_license
kaushik-rohit/code2seq
39b562f79e9555083c18c73c05ffc4f379d1f3b8
c942b95d7d5997e5b2d45ed8c3161ca9296ddde3
refs/heads/master
2022-11-29T11:46:43.105591
2020-01-04T02:04:04
2020-01-04T02:04:04
225,870,854
0
0
null
2022-11-16T09:21:10
2019-12-04T13:12:59
C#
UTF-8
Java
false
false
535
java
public CompletableFuture<PingTxnStatus> pingTxn(final String scope, final String stream, final UUID txId, final long lease, final OperationContext contextOpt) { final OperationContext context = getNonNullOperationContext(scope, stream, contextOpt); return pingTxnBody(scope, stream, txId, lease, context); }
[ "kaushikrohit325@gmail.com" ]
kaushikrohit325@gmail.com
537984f9fe082e1f0d072448133418d28f197c60
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/center-open/src/main/java/com/smate/center/open/service/inspg/InspgModuleService.java
fcc9075e473066989f2360631ee98d9daabec932
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
214
java
package com.smate.center.open.service.inspg; import java.util.List; import com.smate.center.open.model.inspg.Inspg; public interface InspgModuleService { public List<Inspg> ManagerInspgList(Long psnId); }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
37aa1da85ec85effbfbf900d2da5a02ab9dd9d75
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_48b82cb428a1a8579e39011b42cbc978061414a3/Engine/31_48b82cb428a1a8579e39011b42cbc978061414a3_Engine_t.java
2d83683a675e88ef0b21b355d66ced1cb55bb32f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,372
java
package cn.edu.tsinghua.academic.c00740273.magictower.engine; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.util.Map; /** * This is the main entry point of a game application run. */ public class Engine { public enum Termination { /** * Terminate the game automatically based on attributes or other * criteria. */ AUTOMATIC, /** * Reject actions that lead to game termination. */ MANUAL, /** * Never check termination criteria. */ NEVER; } protected Game game; protected Termination successTermination, failureTermination; public Engine() { this.successTermination = Termination.AUTOMATIC; this.failureTermination = Termination.MANUAL; } /** * Get the game running currently. * * @return */ public Game getGame() { return this.game; } /** * Run the given game in this application. * * The given game must be already initialized. * * @param game */ public void setGame(Game game) { this.game = game; } /** * Initialize and load a newly created Game instance. * * @param game * @return * @throws DataException */ public Event loadGame(Game game) throws DataException { Event event = game.initialize(); this.setGame(game); return event; } /** * Load game from previously saved data. * * This clears any existing execution information. * * @param serialization * @throws IOException * @throws InstantiationException * @throws IllegalAccessException * @throws ClassNotFoundException */ public void unserializeGame(byte[] serialization) throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException { ByteArrayInputStream bis = new ByteArrayInputStream(serialization); ObjectInput in = null; try { in = new ObjectInputStream(bis); Game game = (Game) Class.forName((String) in.readObject()) .newInstance(); GameData gameData = (GameData) in.readObject(); game.setGameData(gameData); this.setGame(game); } finally { bis.close(); in.close(); } } /** * Save data for the current game for future load. * * @return Data * @throws IOException */ public byte[] serializeGame() throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutput out = null; try { out = new ObjectOutputStream(bos); out.writeObject(this.game.getClass().getName()); out.writeObject(this.game.getGameData()); return bos.toByteArray(); } finally { out.close(); bos.close(); } } /** * Get the current success termination mode. * * @return */ public Termination getSuccessTermination() { return this.successTermination; } /** * Set the current success termination mode. * * @param termination * @return */ public Termination setSuccessTermination(Termination termination) { Termination prev = this.successTermination; this.successTermination = termination; return prev; } /** * Get the current failure termination mode. * * @return */ public Termination getFailureTermination() { return this.failureTermination; } /** * Set the current failure termination mode. * * @param termination * @return */ public Termination setFailureTermination(Termination termination) { Termination prev = this.failureTermination; this.failureTermination = termination; return prev; } protected void checkGameLoad() { if (this.game == null) { throw new IllegalStateException("No game has been loaded yet."); } } @SuppressWarnings("incomplete-switch") protected Event moveEvent(Coordinate coord) throws GameTerminationException { Event event = this.game.attemptMoveTo(coord); try { this.game.simulateEvent(event); } catch (GameSuccessTerminationException e) { switch (this.getSuccessTermination()) { case AUTOMATIC: throw e; case MANUAL: return null; } } catch (GameFailureTerminationException e) { switch (this.getFailureTermination()) { case AUTOMATIC: throw e; case MANUAL: return null; } } return event; } /** * Move the character to the given coordinate. * * @param coord * @return The event, or null if rejected due to termination policy. * @throws GameTerminationException */ public Event moveTo(Coordinate coord) throws GameTerminationException { this.checkGameLoad(); Event event = this.moveEvent(coord); if (event != null) { this.game.applyEvent(event); } return event; } /** * See what happens if the character moves to the given coordinate. * * @param coord * @return The event, or null if rejected due to termination policy. * @throws GameTerminationException */ public Event simulateMoveTo(Coordinate coord) throws GameTerminationException { this.checkGameLoad(); return this.moveEvent(coord); } /** * Fetch the event when the character moves to the given coordinate. * * Does not check game termination. * * @param coord * @return The event */ public Event attemptMoveTo(Coordinate coord) { this.checkGameLoad(); return this.game.attemptMoveTo(coord); } /** * Get the current position of the character. * * @return */ public Coordinate getCurrentCoordinate() { this.checkGameLoad(); return this.game.getCurrentCoordinate(); } /** * Get current attributes of the character. * * @return */ public Map<String, Object> getAttributes() { return this.game.getAttributes(); } /** * Get a current attribute of the character. * * @param key * @return */ public Object getAttribute(String key) { return this.game.getAttribute(key); } /** * Set a current attribute of the character. * * @param key * @return */ public Object setAttribute(String key, Object value) { Object prev = this.game.getAttribute(key); this.game.setAttribute(key, value); return prev; } /** * Get the Tile at given coordinate. * * @param coord * @return */ public Tile getTile(Coordinate coord) { this.checkGameLoad(); return this.game.getTile(coord); } /** * Shortcut function to get Tile objects for a whole layer. * * @param z * @return Tile[x][y] */ public Tile[][] getLayerTiles(int z) { this.checkGameLoad(); if (this.game instanceof TileArrayGame) { TileArrayGame game = (TileArrayGame) this.game; return game.getTiles()[z]; } else { int maxX = this.game.getMaximumCoordinate().getX(); int maxY = this.game.getMaximumCoordinate().getY(); Tile[][] layerTiles = new Tile[maxX + 1][maxY + 1]; for (int x = 0; x <= maxX; x++) { for (int y = 0; y <= maxY; y++) { Coordinate coord = new Coordinate(z, x, y); layerTiles[x][y] = this.game.getTile(coord); } } return layerTiles; } } public Coordinate getMaximumCoordinate() { this.checkGameLoad(); return this.game.getMaximumCoordinate(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8cce10f389076c22f12e6cd2c9542381322b981e
ce2813f714d83602ee9b3b237c7304446ae741da
/src/LINTCODE16/LINTCODE1507.java
8460cf765988c8ea5fb685f12c500044cb73a1f5
[]
no_license
tmhbatw/LINTCODEANSWER
bc54bb40a4826b0f9aa11aead4d99978a22e1ee8
7db879f075cde6e1b2fce86f6a3068e59f4e9b34
refs/heads/master
2021-12-13T16:38:05.780408
2021-10-09T16:50:59
2021-10-09T16:50:59
187,010,547
2
0
null
null
null
null
UTF-8
Java
false
false
1,256
java
package LINTCODE16; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; public class LINTCODE1507 { /*Description * 返回 A 的最短的非空连续子数组的长度,该子数组的和至少为 K 。 * 如果没有和至少为 K 的非空子数组,返回 -1 。 * */ public int shortestSubarray(int[] A, int K) { int result=Integer.MAX_VALUE; List<int[]> q=new ArrayList(); int curSum=0; q.add(new int[]{0,-1}); for(int i=0;i<A.length;i++){ curSum+=A[i]; if(curSum-q.get(0)[0]>=K){ int l=0,r=q.size()-1; while(l<r){ int mid = l+(r-l+1)/2; if(curSum-q.get(mid)[0]>=K) l=mid; else r=mid-1; } result=Math.min(result,i-q.get(l)[1]); } for(int j=q.size()-1;j>=0;j--){ if(q.get(j)[0]<curSum) break; q.remove(j); } q.add(new int[]{curSum,i}); } return result==Integer.MAX_VALUE?-1:result; // Write your code here. } }
[ "1060226998@qq.com" ]
1060226998@qq.com
0191d6a967b849701debad26059f1bff02730ae3
a85d2dccd5eab048b22b2d66a0c9b8a3fba4d6c2
/rebellion_h5_realm/java/l2r/gameserver/utils/GameStats.java
243cba089b9fb0a73dffb2f91a1a63114a5d2298
[]
no_license
netvirus/reb_h5_storm
96d29bf16c9068f4d65311f3d93c8794737d4f4e
861f7845e1851eb3c22d2a48135ee88f3dd36f5c
refs/heads/master
2023-04-11T18:23:59.957180
2021-04-18T02:53:10
2021-04-18T02:53:10
252,070,605
0
0
null
2021-04-18T02:53:11
2020-04-01T04:19:39
HTML
UTF-8
Java
false
false
2,888
java
package l2r.gameserver.utils; import l2r.commons.dbutils.DbUtils; import l2r.gameserver.Config; import l2r.gameserver.database.DatabaseFactory; import l2r.gameserver.instancemanager.ServerVariables; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.concurrent.atomic.AtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class GameStats { private static final Logger _log = LoggerFactory.getLogger(GameStats.class); /* database statistics */ private static AtomicLong _updatePlayerBase = new AtomicLong(0L); /* in-game statistics */ private static AtomicLong _playerEnterGameCounter = new AtomicLong(0L); private static AtomicLong _taxSum = new AtomicLong(0L); private static long _taxLastUpdate; private static AtomicLong _rouletteSum = new AtomicLong(0L); private static long _rouletteLastUpdate; private static AtomicLong _adenaSum = new AtomicLong(0L); static { _taxSum.set(ServerVariables.getLong("taxsum", 0)); _rouletteSum.set(ServerVariables.getLong("rouletteSum", 0)); Connection con = null; PreparedStatement statement = null; ResultSet rset = null; try { con = DatabaseFactory.getInstance().getConnection(); statement = con.prepareStatement("SELECT (SELECT SUM(count) FROM items WHERE item_id=57) + (SELECT SUM(treasury) FROM castle) AS `count`"); rset = statement.executeQuery(); if(Config.RATE_DROP_ADENA < 25) { if(rset.next()) _adenaSum.addAndGet((rset.getLong("count") / (long)Config.RATE_DROP_ADENA)); } else _adenaSum.addAndGet(140000000000L); } catch(Exception e) { _log.error("", e); } finally { DbUtils.closeQuietly(con, statement, rset); } } public static void increaseUpdatePlayerBase() { _updatePlayerBase.incrementAndGet(); } public static long getUpdatePlayerBase() { return _updatePlayerBase.get(); } public static void incrementPlayerEnterGame() { _playerEnterGameCounter.incrementAndGet(); } public static long getPlayerEnterGame() { return _playerEnterGameCounter.get(); } public static void addTax(long sum) { long taxSum = _taxSum.addAndGet(sum); if(System.currentTimeMillis() - _taxLastUpdate < 10000) return; _taxLastUpdate = System.currentTimeMillis(); ServerVariables.set("taxsum", taxSum); } public static void addRoulette(long sum) { long rouletteSum = _rouletteSum.addAndGet(sum); if(System.currentTimeMillis() - _rouletteLastUpdate < 10000) return; _rouletteLastUpdate = System.currentTimeMillis(); ServerVariables.set("rouletteSum", rouletteSum); } public static long getTaxSum() { return _taxSum.get(); } public static long getRouletteSum() { return _rouletteSum.get(); } public static void addAdena(long sum) { _adenaSum.addAndGet(sum); } public static long getAdena() { return _adenaSum.get(); } }
[ "l2agedev@gmail.com" ]
l2agedev@gmail.com
6f4ea111df138cbbf821e7e8b9455d71ae94c63f
38e029b3a1f782d0b03afd13504aa9abe6a1065b
/src/day06/Test10.java
a47e8879ac1ed90fe317bdd7ce8149da5e750800
[]
no_license
MisBonnie/HomeWork
520d1af34e42f6d326c28188c0468b089c858100
5db2ccdd488d10c7e5c5ca9054f45fa6a9644187
refs/heads/master
2022-11-23T22:50:34.733694
2020-07-19T01:27:46
2020-07-19T01:27:46
280,769,593
2
0
null
null
null
null
UTF-8
Java
false
false
507
java
package day06; /** * 要求用户输入一个员工信息,格式为: * name,age,gender,salary,hiredate * 例如: * 张三,25,男,5000,2006-02-15 * 然后将输入的员工信息解析成Emp对象。 * 然后将该Emp对象的toString返回的字符串写入到文件中,该文件的 * 名字为:name.emp,以上面的例子,那么该文件名为:张三.emp * 至少运行5次该程序,输入五个员工信息,并生成5个文件。 * @author Bonnie * */ public class Test10 { }
[ "hz_liuzb@163.com" ]
hz_liuzb@163.com
3ba072d020f8d18ca31d8952be759a69f4f7e4b5
bc87ddc02a23fd7158d6b9c096006059b18afd30
/src/main/java/ivorius/pandorasbox/client/rendering/effects/PBEffectRendererExplosion.java
083a04fdb4c5c92548167f7fc6fa343116f0e7a8
[]
no_license
Mazdallier/PandorasBox
74cf8e199f5c73616b7d4383268d8149f2f4acc5
4fb2563fce392edfcc37b56040f7fb4633d1ae5b
refs/heads/master
2021-01-20T07:54:21.750274
2014-12-10T09:15:20
2014-12-10T09:15:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,933
java
package ivorius.pandorasbox.client.rendering.effects; import ivorius.pandorasbox.effects.PBEffectExplode; import ivorius.pandorasbox.effects.PBEffectNormal; import ivorius.pandorasbox.entitites.EntityPandorasBox; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import org.lwjgl.opengl.GL11; import java.util.Random; /** * Created by lukas on 05.12.14. */ public class PBEffectRendererExplosion implements PBEffectRenderer<PBEffectExplode> { @Override public void renderBox(EntityPandorasBox entity, PBEffectExplode effect, float partialTicks) { if (!entity.isInvisible()) { int lightColor = effect.burning ? 0xff0088 : 0xdd3377; float timePassed = (float) entity.getEffectTicksExisted() / (float) effect.maxTicksAlive; timePassed *= timePassed; timePassed *= timePassed; float scale = (timePassed * 0.3f) * effect.explosionRadius * 0.3f; GL11.glPushMatrix(); GL11.glTranslatef(0.0f, 0.2f, 0.0f); GL11.glScalef(scale, scale, scale); renderLights(entity.ticksExisted + partialTicks, lightColor, timePassed, 10); GL11.glPopMatrix(); } } public static void renderLights(float ticks, int color, float alpha, int number) { float width = 2.5f; Tessellator tessellator = Tessellator.instance; float usedTicks = ticks / 200.0F; Random random = new Random(432L); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE, GL11.GL_ZERO); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDepthMask(false); GL11.glPushMatrix(); for (int var7 = 0; (float) var7 < number; ++var7) { float xLogFunc = (((float) var7 / number * 28493.0f + ticks) / 10.0f) % 20.0f; if (xLogFunc > 10.0f) { xLogFunc = 20.0f - xLogFunc; } float yLogFunc = 1.0f / (1.0f + (float) Math.pow(2.71828f, -0.8f * xLogFunc) * ((1.0f / 0.01f) - 1.0f)); float lightAlpha = yLogFunc; if (lightAlpha > 0.01f) { GL11.glRotatef(random.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(random.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(random.nextFloat() * 360.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(random.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(random.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(random.nextFloat() * 360.0F + usedTicks * 90.0F, 0.0F, 0.0F, 1.0F); tessellator.startDrawing(6); float var8 = random.nextFloat() * 20.0F + 5.0F; float var9 = random.nextFloat() * 2.0F + 1.0F; tessellator.setColorRGBA_I(color, (int) (255.0F * alpha * lightAlpha)); tessellator.addVertex(0.0D, 0.0D, 0.0D); tessellator.setColorRGBA_I(color, 0); tessellator.addVertex(-width * (double) var9, var8, (-0.5F * var9)); tessellator.addVertex(width * (double) var9, var8, (-0.5F * var9)); tessellator.addVertex(0.0D, var8, (1.0F * var9)); tessellator.addVertex(-width * (double) var9, var8, (-0.5F * var9)); tessellator.draw(); } } GL11.glPopMatrix(); GL11.glDepthMask(true); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_BLEND); GL11.glShadeModel(GL11.GL_FLAT); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_ALPHA_TEST); } }
[ "lukastenbrink@googlemail.com" ]
lukastenbrink@googlemail.com
143f8423ea0ac59864181a42ef1aa1a843fc7b1b
329307375d5308bed2311c178b5c245233ac6ff1
/src/com/tencent/mm/ah/k.java
64c4d68ea4eae405f3fd6cb49e9bd2f2a1cd5413
[]
no_license
ZoneMo/com.tencent.mm
6529ac4c31b14efa84c2877824fa3a1f72185c20
dc4f28aadc4afc27be8b099e08a7a06cee1960fe
refs/heads/master
2021-01-18T12:12:12.843406
2015-07-05T03:21:46
2015-07-05T03:21:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package com.tencent.mm.ah; import com.tencent.mm.compatible.util.i; import com.tencent.mm.q.d; import com.tencent.mm.sdk.platformtools.aj.a; final class k implements aj.a { k(h paramh) {} public final boolean lO() { if (bOC.a(h.g(bOC), h.e(bOC)) == -1) { h.a(bOC, 0 - (i.pf() + 10000)); h.e(bOC).a(3, -1, "doScene failed", bOC); } return false; } } /* Location: * Qualified Name: com.tencent.mm.ah.k * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
01b29838ce17d57e73314870713751b363ce36ad
258de8e8d556901959831bbdc3878af2d8933997
/agent/agent-core/src/main/java/com/voxlearning/utopia/agent/workflow/refund/RefundNotifySender.java
3d269fd0380d00d878a2e892903db0102da181aa
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
2,844
java
package com.voxlearning.utopia.agent.workflow.refund; import com.voxlearning.alps.core.util.CollectionUtils; import com.voxlearning.alps.core.util.StringUtils; import com.voxlearning.alps.lang.mapper.json.JsonUtils; import com.voxlearning.utopia.agent.constants.AgentNotifyType; import com.voxlearning.utopia.agent.service.common.BaseGroupService; import com.voxlearning.utopia.agent.service.notify.AgentNotifyService; import com.voxlearning.utopia.service.crm.api.constants.agent.AgentRoleType; import com.voxlearning.utopia.service.crm.api.entities.agent.AgentGroup; import com.voxlearning.utopia.service.crm.api.entities.agent.AgentGroupUser; import com.voxlearning.utopia.service.crm.api.entities.agent.AgentOrder; import javax.inject.Inject; import javax.inject.Named; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * 退货流程发送通知 * Created by Wang Yuechen on 2016/4/1. */ @Named public class RefundNotifySender { @Inject private BaseGroupService baseGroupService; @Inject private AgentNotifyService agentNotifyService; // 生成退货单的时候给财务发送通知 public void initRefundOrderNotify(AgentOrder agentOrder) { List<AgentGroupUser> financeUsers = baseGroupService.getGroupUsersByGroupId(getFinanceGroupId()); List<Long> receiverList = new ArrayList<>(); for (AgentGroupUser groupUser : financeUsers) { if (!receiverList.contains(groupUser.getUserId())) { receiverList.add(groupUser.getUserId()); } } StringBuilder notifyContent = new StringBuilder(); notifyContent.append("CRM提交了退款申请:"); Map<String, Object> refundInfoMap = JsonUtils.convertJsonObjectToMap(agentOrder.getOrderNotes()); String productInfo = StringUtils.join( "外部订单号:", refundInfoMap.get("orderId"), "," , "产品名称:", refundInfoMap.get("productName"),"," , "金额:", refundInfoMap.get("amount"), "," , "支付流水号:", refundInfoMap.get("transactionId"),"," , "支付方式:", refundInfoMap.get("payMethod") ); notifyContent.append(productInfo); notifyContent.deleteCharAt(notifyContent.length() - 1); agentNotifyService.sendNotify(AgentNotifyType.REFUND_NOTICE.getType(), notifyContent.toString(), receiverList); } private Long getFinanceGroupId(){ List<AgentGroup> fianceGroups = baseGroupService.getAgentGroupByRoleId(AgentRoleType.Finance.getId()); if (CollectionUtils.isNotEmpty(fianceGroups)) { return fianceGroups.get(0).getId(); } // FIXME 这里的 id=3 是从 AGENT_GROUP 里直接取的 return 3L; } }
[ "wangahai@300.cn" ]
wangahai@300.cn
41f84d0831cd4e0b77b3536d02582857bcce7383
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_80d26cb5e84d28c77425db95169393ecb8dbf12e/ClosureCompilerProcess/21_80d26cb5e84d28c77425db95169393ecb8dbf12e_ClosureCompilerProcess_s.java
016196976cf29fe208d722bda686360d24b2d1e9
[]
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
6,453
java
package net.vtst.ow.eclipse.js.closure.launching.compiler; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.IStreamListener; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IStreamMonitor; import org.eclipse.debug.core.model.IStreamsProxy; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.console.FileLink; import org.eclipse.jface.text.BadLocationException; import org.eclipse.ui.console.IConsole; import org.eclipse.ui.console.IPatternMatchListener; import org.eclipse.ui.console.PatternMatchEvent; import org.eclipse.ui.console.TextConsole; import com.google.javascript.jscomp.BasicErrorManager; import com.google.javascript.jscomp.CheckLevel; import com.google.javascript.jscomp.ErrorFormat; import com.google.javascript.jscomp.ErrorManager; import com.google.javascript.jscomp.JSError; import com.google.javascript.jscomp.MessageFormatter; public class ClosureCompilerProcess implements IProcess { private ILaunch launch; private boolean terminated = false; public ClosureCompilerProcess(ILaunch launch) { this.launch = launch; launch.addProcess(this); IConsole console = DebugUITools.getConsole(this); if (console instanceof TextConsole) ((TextConsole) console).addPatternMatchListener(patternMatchListener); else System.out.println("CONSOLE NOT FOUND"); } @SuppressWarnings("rawtypes") @Override public Object getAdapter(Class arg0) { return null; } @Override public boolean canTerminate() { return false; } @Override public boolean isTerminated() { return terminated; } @Override public void terminate() throws DebugException {} @Override public String getAttribute(String arg0) { return null; } @Override public int getExitValue() throws DebugException { return 0; } @Override public String getLabel() { return "closure-compiler-output"; } @Override public ILaunch getLaunch() { return launch; } @Override public IStreamsProxy getStreamsProxy() { return streamsProxy; } public ErrorManager getErrorManager() { return errorManager; } public void setTerminated() { terminated = true; } @Override public void setAttribute(String name, String value) {} private static class ErrorInfo { JSError error; IFile file; String fileName; ErrorInfo(JSError error) { IFile[] errorFiles = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI((new File(error.sourceName)).toURI()); if (errorFiles.length > 0) { this.file = errorFiles[0]; this.fileName = errorFiles[0].getFullPath().toOSString(); this.error = JSError.make(this.fileName, error.lineNumber, error.getCharno(), error.getDefaultLevel(), error.getType(), error.description); } else { this.file = null; this.fileName = null; this.error = error; } } } private class StreamMonitorErrorManager extends BasicErrorManager implements IStreamMonitor { private MessageFormatter formatter; private ArrayList<ErrorInfo> errorInfos = new ArrayList<ErrorInfo>(); StreamMonitorErrorManager(MessageFormatter formatter) { this.formatter = formatter; } StreamMonitorErrorManager() { this(ErrorFormat.SOURCELESS.toFormatter(null, false)); } public ErrorInfo getErrorInfo(int i) { if (i < errorInfos.size()) return errorInfos.get(i); return null; } // Implementation of BasicErrorManager @Override protected void printSummary() { append( String.format("%d error(s), %d warning(s), %.1f%% typed%n", getErrorCount(), getWarningCount(), getTypedPercent())); } @Override public void println(CheckLevel level, JSError error) { ErrorInfo info = new ErrorInfo(error); errorInfos.add(info); append(info.error.format(level, formatter)); } // Implementation of IStreamMonitor private Set<IStreamListener> listeners = new HashSet<IStreamListener>(); private StringBuffer buffer = new StringBuffer(); @Override public void addListener(IStreamListener listener) { listeners.add(listener); } @Override public String getContents() { return buffer.toString(); } @Override public void removeListener(IStreamListener listener) { listeners.remove(listener); } private void append(String text) { buffer.append(text); for (IStreamListener listener: listeners) listener.streamAppended(text, this); } } private StreamMonitorErrorManager errorManager = new StreamMonitorErrorManager(); private IStreamsProxy streamsProxy = new IStreamsProxy() { @Override public IStreamMonitor getErrorStreamMonitor() { return null; } @Override public IStreamMonitor getOutputStreamMonitor() { return errorManager; } @Override public void write(String input) throws IOException {} }; private IPatternMatchListener patternMatchListener = new IPatternMatchListener(){ private TextConsole console; private int lineIndex = 0; @Override public void connect(TextConsole console) { this.console = console; } @Override public void disconnect() {} @Override public void matchFound(PatternMatchEvent event) { ErrorInfo info = errorManager.getErrorInfo(lineIndex); if (info != null && info.file != null) { FileLink link = new FileLink(info.file, null, -1, -1, info.error.lineNumber); try { console.addHyperlink(link, event.getOffset(), info.fileName.length()); } catch (BadLocationException e) {} } ++lineIndex; } @Override public int getCompilerFlags() { return 0; } @Override public String getLineQualifier() { return null; } @Override public String getPattern() { return ".+"; }}; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fa524e8b103d050de004d471c7960b2008c24902
768754287090c335417da829e2c68c7482225c95
/1182/1706803_WA.java
cfc89b0476282bcec3e7cd7dd0728cd8728eb108
[]
no_license
zhangfaen/pku-online-judge
f6a276eaac28a39b00133133ccaf3402f5334184
e770ce41debe1cf832f4859528c7c751509ab97c
refs/heads/master
2021-04-23T16:52:00.365894
2020-03-25T09:59:52
2020-03-25T09:59:52
249,941,140
0
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Arrays; public class Main { static int [] p; static int [] q; static int n; public static void main(String [] args) throws IOException { BufferedReader cin = new BufferedReader( new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out); String s = cin.readLine(); String [] sa=s.split(" "); int m; n=Integer.parseInt(sa[0]); m=Integer.parseInt(sa[1]); p=new int[n]; q=new int[n]; for(int i=0;i<n;i++) p[i]=i; int re=0; while(m--!=0) { s=cin.readLine(); sa=s.split(" "); int type=Integer.parseInt(sa[0]); int x=Integer.parseInt(sa[1])-1; int y=Integer.parseInt(sa[2])-1; if(x>=n||y>=n||(type==2&&x==y)) { re++;continue; } int xr=find(x),yr=find(y); if(xr!=yr) { if(type==2) { p[yr]=xr; q[yr]=1; } else { p[yr]=xr; q[yr]=0; } } else { if(type==2) { if((xr+1)%3!=yr) re++; } else { if(xr!=yr) re++; } } } System.out.println(re); } public static int find(int x) { if(p[x]==x) return x; int root=find(p[x]); q[x]=(q[x]+q[p[x]])%3; p[x]=root; return root; } }
[ "zhangfaen@ainnovation.com" ]
zhangfaen@ainnovation.com
3b50a8b2f755b3d63d6bff18daf1942fa6e08d21
39e880dacc9a01d03399b3ff1fb5e96b98802039
/tern-core/src/main/java/org/ternlang/core/convert/proxy/ClosurePredicateBuilder.java
a645077f17eac79e1aa7b7d180825c7bf9a871cc
[]
no_license
tern-lang/tern
581aa79bebcfe079fe7648f764e921ecb7a12390
7cf10f325f25b379717985673af4c0bae308a712
refs/heads/master
2023-07-18T12:27:05.425643
2023-07-09T13:54:21
2023-07-09T13:54:21
169,908,813
24
2
null
2023-02-10T16:44:12
2019-02-09T20:11:12
Java
UTF-8
Java
false
false
1,890
java
package org.ternlang.core.convert.proxy; import java.lang.reflect.Method; import org.ternlang.common.Predicate; import org.ternlang.core.Context; import org.ternlang.core.convert.ConstraintMatcher; import org.ternlang.core.error.InternalStateException; import org.ternlang.core.function.Function; import org.ternlang.core.type.TypeExtractor; import org.ternlang.core.type.TypeLoader; public class ClosurePredicateBuilder { private final ClosureMethodResolver resolver; public ClosurePredicateBuilder(Context context) { this.resolver = new ClosureMethodResolver(context); } public Predicate create(Function function, Class type) { if(type != null) { try { Method method = resolver.resolve(function, type); if(method != null) { Class[] types = method.getParameterTypes(); String name = method.getName(); return new MethodPredicate(name, types); } } catch(Exception e) { throw new InternalStateException("Could not match '" + function + "' with " + type, e); } } return new MethodPredicate(null); } private static class ClosureMethodResolver { private ClosureMethodFinder finder; private Context context; public ClosureMethodResolver(Context context) { this.context = context; } public Method resolve(Function function, Class type) throws Exception { if(finder == null) { ConstraintMatcher matcher = context.getMatcher(); TypeExtractor extractor = context.getExtractor(); TypeLoader loader = context.getLoader(); finder = new ClosureMethodFinder(matcher, extractor, loader); } return finder.findClosure(function, type); } } }
[ "authrus.root@gmail.com" ]
authrus.root@gmail.com
14e4c7166e3b60dbc31a873889541d5e05fa5881
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_4aae59cc90b402a4ed2bd6a9d1a6f1bddeb9101a/MoskitoFilter/2_4aae59cc90b402a4ed2bd6a9d1a6f1bddeb9101a_MoskitoFilter_t.java
3a08f7f47100c45563c26a2d024ad2cf6012991b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,241
java
/* * $Id$ * * This file is part of the MoSKito software project * that is hosted at http://moskito.dev.java.net. * * All MoSKito files are distributed under MIT License: * * Copyright (c) 2006 The MoSKito Project Team. * * 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 net.anotheria.moskito.web; import net.anotheria.moskito.core.dynamic.EntryCountLimitedOnDemandStatsProducer; import net.anotheria.moskito.core.dynamic.OnDemandStatsProducer; import net.anotheria.moskito.core.dynamic.OnDemandStatsProducerException; import net.anotheria.moskito.core.predefined.Constants; import net.anotheria.moskito.core.predefined.FilterStats; import net.anotheria.moskito.core.predefined.FilterStatsFactory; import net.anotheria.moskito.core.registry.ProducerRegistryFactory; import net.anotheria.moskito.core.stats.Interval; import org.apache.log4j.Logger; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import java.io.IOException; public abstract class MoskitoFilter implements Filter{ /** * Logger instance, available for all subclasses. */ protected Logger log; /** * Parameter name for the init parameter for the limit of dynamic case names (number of names) in the filter config. If the number of cases will exceed this limit, * the new cases will be ignored (to prevent memory leakage). */ public static final String INIT_PARAM_LIMIT = "limit"; /** * Constant for use-cases which are over limit. In case we gather all request urls and we set a limit of 1000 it may well happen, that we actually have more than the set limit. * In this case it is good to know how many requests those, 'other' urls produce. */ public static final String OTHER = "-other-"; private FilterStats otherStats = null; /** * The internal producer instance. */ private OnDemandStatsProducer<FilterStats> onDemandProducer; protected MoskitoFilter(){ log = Logger.getLogger(getClass()); } @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { if (onDemandProducer==null){ log.error("Access to filter before it's inited!"); chain.doFilter(req, res); return; } FilterStats defaultStats = onDemandProducer.getDefaultStats(); FilterStats caseStats = null; String caseName = extractCaseName(req, res); try{ if (caseName!=null) caseStats = onDemandProducer.getStats(caseName); }catch(OnDemandStatsProducerException e){ log.info("Couldn't get stats for case : "+caseName+", probably limit reached"); caseStats = otherStats; } defaultStats.addRequest(); if (caseStats!=null) caseStats.addRequest(); try{ long startTime = System.nanoTime(); chain.doFilter(req, res); long exTime = System.nanoTime() - startTime; defaultStats.addExecutionTime(exTime); if (caseStats!=null) caseStats.addExecutionTime(exTime); }catch(ServletException e){ defaultStats.notifyServletException(); if (caseStats!=null) caseStats.notifyServletException(); throw e; }catch(IOException e){ defaultStats.notifyIOException(); if (caseStats!=null) caseStats.notifyIOException(); throw e; }catch(RuntimeException e){ defaultStats.notifyRuntimeException(); if (caseStats!=null) caseStats.notifyRuntimeException(); throw e; }catch(Error e){ defaultStats.notifyError(); if (caseStats!=null) caseStats.notifyError(); throw e; }finally{ defaultStats.notifyRequestFinished(); if (caseStats!=null) caseStats.notifyRequestFinished(); } } @Override public void init(FilterConfig config) throws ServletException { int limit = -1; String pLimit = config.getInitParameter(INIT_PARAM_LIMIT); if (pLimit!=null) try{ limit = Integer.parseInt(pLimit); }catch(NumberFormatException ignored){ log.warn("couldn't parse limit \""+pLimit+"\", assume -1 aka no limit."); } onDemandProducer = limit == -1 ? new OnDemandStatsProducer<FilterStats>(getProducerId(), getCategory(), getSubsystem(), new FilterStatsFactory(getMonitoringIntervals())) : new EntryCountLimitedOnDemandStatsProducer<FilterStats>(getProducerId(), getCategory(), getSubsystem(), new FilterStatsFactory(getMonitoringIntervals()), limit); ProducerRegistryFactory.getProducerRegistryInstance().registerProducer(onDemandProducer); //force request uri filter to create 'other' stats. try{ if (limit!=-1) otherStats = onDemandProducer.getStats(OTHER); }catch(OnDemandStatsProducerException e){ log.error("Can't create default stats for limit excess", e); } } @Override public void destroy(){ } /** * Overwrite this to provide a name allocation mechanism to make request -> name mapping. * @param req ServletRequest. * @param res ServletResponse. * @return name of the use case for stat storage. */ protected abstract String extractCaseName(ServletRequest req, ServletResponse res ); /** * Returns the producer id. Override this method if you want a useful name in your logs. Default is class name. */ public String getProducerId() { return getClass().getSimpleName(); } /** * Overwrite this method to register the filter in a category of your choice. Default is 'filter'. * @return the category of this producer. */ protected String getCategory() { return "filter"; } /** * Override this to register the filter as specially defined subsystem. Default is 'default'. * @return the subsystem of this producer. */ protected String getSubsystem(){ return "default"; } protected Interval[] getMonitoringIntervals(){ return Constants.getDefaultIntervals(); } protected OnDemandStatsProducer<FilterStats> getProducer(){ return onDemandProducer; } protected FilterStats getOtherStats(){ return otherStats; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6d0c6608bee30a40ea0ae400cbbfe729dd2b9414
41e224d12f2a11b1734a085b94ad6d4f160259cd
/src/main/java/com/system/es/model/FilterParam.java
0f6d8428cb9aeb53ca6dc8f98cbf4beee788ebf5
[]
no_license
lyb-geek/exam_system
6f48c26772c8b8372b7aa3da5f377e5df4af63f6
5001c07aa06483c55e1a73fe36bc5e88118851c7
refs/heads/master
2021-05-05T19:04:27.473211
2017-09-17T10:49:55
2017-09-17T10:49:55
103,814,773
0
0
null
null
null
null
UTF-8
Java
false
false
2,932
java
package com.system.es.model; public class FilterParam { private String key; private Object value; private int type = 1;// 过滤类型,1表示match,2表示term,3表示multi_match,4、range,5 terms(构造sql的in查询) private int multiMatchflag = 1;// type为3时使用 private int rangeType;// 1表示大于等于小于等于,2表示大于等于小于,3表示大于小于等于,4表示大于小于 private Object maxValue; private Object minValue; private boolean isDate = false;// 是否为日期匹配 private String dateFormat;// 日期格式 private boolean isNested;// 是否是内嵌 private String nestedPath;// 假如是内嵌,则需要内嵌path; private byte boolType = 1;// 1表示must,2表示filter,3表示should private int minimumShouldMatch = 1;// should查询时使用 private boolean isNestedBool = false;// 是否内嵌bool,这个标志位用来,做(A and B) or D public boolean isDate() { return isDate; } public void setDate(boolean isDate) { this.isDate = isDate; } public String getDateFormat() { return dateFormat; } public void setDateFormat(String dateFormat) { this.dateFormat = dateFormat; } public int getMultiMatchflag() { return multiMatchflag; } public void setMultiMatchflag(int multiMatchflag) { this.multiMatchflag = multiMatchflag; } public int getRangeType() { return rangeType; } public void setRangeType(int rangeType) { this.rangeType = rangeType; } public Object getMaxValue() { return maxValue; } public void setMaxValue(Object maxValue) { this.maxValue = maxValue; } public Object getMinValue() { return minValue; } public void setMinValue(Object minValue) { this.minValue = minValue; } public byte getBoolType() { return boolType; } public void setBoolType(byte boolType) { this.boolType = boolType; } public int getMinimumShouldMatch() { return minimumShouldMatch; } public void setMinimumShouldMatch(int minimumShouldMatch) { this.minimumShouldMatch = minimumShouldMatch; } public boolean isNested() { return isNested; } public void setNested(boolean isNested) { this.isNested = isNested; } public String getNestedPath() { return nestedPath; } public void setNestedPath(String nestedPath) { this.nestedPath = nestedPath; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public Object getValue() { return value; } public void setValue(Object value) { this.value = value; } public int getType() { return type; } public void setType(int type) { this.type = type; } public boolean isNestedBool() { return isNestedBool; } public void setNestedBool(boolean isNestedBool) { this.isNestedBool = isNestedBool; } }
[ "410480180@qq.com" ]
410480180@qq.com
9a672d8e5fca558e9695b1ce7ceb882aace18d79
f2b6d20a53b6c5fb451914188e32ce932bdff831
/src/com/linkedin/android/infra/ui/NativeVideoSurfaceView$PlayerReleasedListener.java
a0022745e26979a858031079ca78af3e35eeaba7
[]
no_license
reverseengineeringer/com.linkedin.android
08068c28267335a27a8571d53a706604b151faee
4e7235e12a1984915075f82b102420392223b44d
refs/heads/master
2021-04-09T11:30:00.434542
2016-07-21T03:54:43
2016-07-21T03:54:43
63,835,028
3
0
null
null
null
null
UTF-8
Java
false
false
336
java
package com.linkedin.android.infra.ui; public abstract interface NativeVideoSurfaceView$PlayerReleasedListener { public abstract void onPlayerReleased(); } /* Location: * Qualified Name: com.linkedin.android.infra.ui.NativeVideoSurfaceView.PlayerReleasedListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
10a42ff33df3027ddfb5eae50094652193895f7e
62e993fd9aa1b1fb94da07be5777729a58931522
/org.jebtk.core/src/main/java/org/jebtk/core/geom/IntBlock.java
c1d2f2139e75781bc082b0d4bea872e5c745139c
[]
no_license
antonybholmes/jebtk-core
4a19cc3dd3467c657421a3b45f28b58cf84c58c1
168f9956c0907f285be433edc9bf2917546d20f6
refs/heads/master
2021-07-30T19:05:14.503155
2021-07-24T21:59:14
2021-07-24T21:59:14
100,537,629
0
0
null
2020-10-13T04:40:12
2017-08-16T22:25:46
Java
UTF-8
Java
false
false
3,089
java
/** * Copyright 2016 Antony Holmes * * 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.jebtk.core.geom; import java.awt.Dimension; /** * Immutable integer dimension. * * @author Antony Holmes * */ public class IntBlock implements Comparable<IntBlock> { /** The Constant DIM_ZERO. */ public static final IntBlock DIM_ZERO = new IntBlock(0, 0); /** * The member w. */ public final int mX; /** * The member h. */ public final int mW; /** * Instantiates a new int dim. * * @param w the w * @param h the h */ public IntBlock(int w, int h) { mX = w; mW = h; } /** * Gets the w. * * @return the w */ public int getX() { return mX; } /** * Gets the h. * * @return the h */ public int getW() { return mW; } /* * (non-Javadoc) * * @see java.lang.Object#toString() */ @Override public String toString() { return mX + " " + mW; } /** * To dimension. * * @param size the size * @return the dimension */ public static Dimension toDimension(IntBlock size) { return new Dimension(size.getX(), size.getW()); } /* * (non-Javadoc) * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object o) { if (o instanceof IntBlock) { return compareTo((IntBlock) o) == 0; } else { return false; } } /* * (non-Javadoc) * * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo(IntBlock d) { if (mX > d.mX) { if (mW > d.mW) { return 1; } else { return -1; } } else if (mX < d.mX) { if (mW > d.mW) { return 1; } else { return -1; } } else { // Same width so just consider height if (mW > d.mW) { return 1; } else if (mW < d.mW) { return -1; } else { return 0; } } } /** * Creates a new IntDim. * * @param x the x * @param y the y * @return the int dim */ public static IntBlock create(int x, int y) { return new IntBlock(x, y); } /** * Creates the. * * @param x the x * @param y the y * @return the int dim */ public static IntBlock create(long x, long y) { return new IntBlock((int) x, (int) y); } /** * Creates the. * * @param x the x * @param y the y * @return the int dim */ public static IntBlock create(double x, double y) { return new IntBlock((int) x, (int) y); } }
[ "antony.b.holmes@gmail.com" ]
antony.b.holmes@gmail.com
82d79ae8a5490cd0603263c7885a8932bf23a9ce
3b6a37e4ce71f79ae44d4b141764138604a0f2b9
/phloc-commons/src/main/java/com/phloc/commons/io/file/filter/FileFilterDirectoryOnly.java
64f531219d1b5174aa472c9b299dfb26eca22709
[ "Apache-2.0" ]
permissive
lsimons/phloc-schematron-standalone
b787367085c32e40d9a4bc314ac9d7927a5b83f1
c52cb04109bdeba5f1e10913aede7a855c2e9453
refs/heads/master
2021-01-10T21:26:13.317628
2013-09-13T12:18:02
2013-09-13T12:18:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,857
java
/** * Copyright (C) 2006-2013 phloc systems * http://www.phloc.com * office[at]phloc[dot]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. */ package com.phloc.commons.io.file.filter; import java.io.File; import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.annotation.concurrent.NotThreadSafe; import com.phloc.commons.hash.HashCodeGenerator; import com.phloc.commons.string.ToStringGenerator; /** * A file filter that accepts only directories. * * @author Philip Helger */ @NotThreadSafe public final class FileFilterDirectoryOnly extends AbstractFileFilter { private static final FileFilterDirectoryOnly s_aInstance = new FileFilterDirectoryOnly (); private FileFilterDirectoryOnly () {} @Nonnull public static FileFilterDirectoryOnly getInstance () { return s_aInstance; } public boolean accept (@Nullable final File aFile) { return aFile != null && aFile.isDirectory (); } @Override public boolean equals (final Object o) { if (o == this) return true; if (!(o instanceof FileFilterDirectoryOnly)) return false; return true; } @Override public int hashCode () { return new HashCodeGenerator (this).getHashCode (); } @Override public String toString () { return new ToStringGenerator (this).toString (); } }
[ "mail@leosimons.com" ]
mail@leosimons.com
73596054ebaf0802fca2b243513c32df1705807e
0ac3db7e3a7f1b408f5f8f34bf911b1c7e7a4289
/src/bone/server/server/serverpackets/S_RemoveObject.java
0c80fae9a0d018c3b8b82920a727a5fcd62789f2
[]
no_license
zajako/lineage-jimin
4d56ad288d4417dca92bc824f2d1b484992702e3
d8148ac99ad0b5530be3c22e6d7a5db80bbf2e5e
refs/heads/master
2021-01-10T00:57:46.449401
2011-10-05T22:32:33
2011-10-05T22:32:33
46,512,502
0
2
null
null
null
null
UTF-8
Java
false
false
1,323
java
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package bone.server.server.serverpackets; import bone.server.server.Opcodes; import bone.server.server.model.L1Object; public class S_RemoveObject extends ServerBasePacket { private byte[] _byte = null; public S_RemoveObject(L1Object obj) { writeC(Opcodes.S_OPCODE_REMOVE_OBJECT); writeD(obj.getId()); } public S_RemoveObject(int objId) { writeC(Opcodes.S_OPCODE_REMOVE_OBJECT); writeD(objId); } @Override public byte[] getContent() { if (_byte == null) { _byte = getBytes(); } return _byte; } }
[ "wlals1978@nate.com" ]
wlals1978@nate.com
a9ca7b03fa9b14deca1ac19d8b4f2f14a2489c88
7d28d457ababf1b982f32a66a8896b764efba1e8
/platform-web-ui/src/main/java/ua/com/fielden/platform/web/action/post/FileSaverPostAction.java
9d3b325b8e3ac7c7734edad43dafe674305da0c1
[ "MIT" ]
permissive
fieldenms/tg
f742f332343f29387e0cb7a667f6cf163d06d101
f145a85a05582b7f26cc52d531de9835f12a5e2d
refs/heads/develop
2023-08-31T16:10:16.475974
2023-08-30T08:23:18
2023-08-30T08:23:18
20,488,386
17
9
MIT
2023-09-14T17:07:35
2014-06-04T15:09:44
JavaScript
UTF-8
Java
false
false
1,495
java
package ua.com.fielden.platform.web.action.post; import ua.com.fielden.platform.web.minijs.JsCode; import ua.com.fielden.platform.web.view.master.api.actions.post.IPostAction; /** * A standard post-action that should be used for saving data to a local file. * Its implementation depends on the contract that the underlying functional entity has properties: * <ul> * <li>mime -- a MIME type for the data being exported * <li>fileName -- a file name including file extension where the data should be saved * <li>data -- base64 string representing a binary array * </ul> * * See also an alternative implementation {@link FileDownloadPostAction}. * * @author TG Team * */ public class FileSaverPostAction implements IPostAction { @Override public JsCode build() { final JsCode jsCode = new JsCode( "const byteCharacters = atob(functionalEntity.data);" + "const byteNumbers = new Uint8Array(byteCharacters.length);\n" + "for (let index = 0; index < byteCharacters.length; index++) {\n" + " byteNumbers[index] = byteCharacters.charCodeAt(index);\n" + "}\n" + "const data = new Blob([byteNumbers], {type: functionalEntity.mime});\n" + "saveAs(data, functionalEntity.fileName);\n" + "if (self.$.egi && self.$.egi.clearPageSelection) {\n" + " self.$.egi.clearPageSelection();\n" + "}\n"); return jsCode; } }
[ "oles.hodych@gmail.com" ]
oles.hodych@gmail.com
5beddea42c7dbb057633f6521f6fc7b85dffe42f
1079d877587271a1c90812e2bc3daab6d452cb6f
/android/src/androidTest/java/com/raulh82vlc/BasicCalculator/ui/activities/CalculatorActivityTest.java
065e011a147f28508595699a92442e0dfc2c5fb7
[ "Apache-2.0" ]
permissive
raulh82vlc/SimpleCalculator
c20d6010e748fa6ebb8774063980de42e8065d87
b946cc9f937a349954c74e8abdc7f55dd35b8acb
refs/heads/master
2021-01-25T01:03:28.118315
2017-06-18T23:58:42
2017-06-19T00:02:19
94,719,054
4
0
null
2017-06-18T23:44:23
2017-06-18T23:32:40
Java
UTF-8
Java
false
false
1,420
java
/* * Copyright (C) 2017 Raul Hernandez Lopez @raulh82vlc * * 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.raulh82vlc.BasicCalculator.ui.activities; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; import com.raulh82vlc.BasicCalculator.ui.calculator.CalculatorActivity; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; /** * @author Raul Hernandez Lopez. */ @RunWith(AndroidJUnit4.class) public class CalculatorActivityTest { @Rule public ActivityTestRule<CalculatorActivity> mActivityTestRule = new ActivityTestRule<>(CalculatorActivity.class); @Before public void setUp() throws Exception { } @After public void tearDown() throws Exception { } @Test public void useLayoutId() throws Exception { } }
[ "raul.h82@gmail.com" ]
raul.h82@gmail.com
640abee8f0657e90be0f853b6a0161aaec7e5d2c
fc4b196567b8e0363adad4a11a11640194385ebb
/java_only/module17/src/main/java/module17packageJava0/Foo4.java
ca07ea1b7dd43833b6e10b8cdae32d64c7e3154e
[]
no_license
MaTriXy/android-projects
8c9e93233bfff6661c51d55438224883518f8c5b
53faf79ca3f39b16e48ddbd35a4a11470ed5fd03
refs/heads/master
2020-04-10T12:27:35.232439
2018-10-31T21:18:30
2018-10-31T21:18:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package module17packageJava0; public class Foo4 { public void foo0() { final Runnable anything = () -> System.out.println("anything"); new module17packageJava0.Foo3().foo3(); } public void foo1() { final Runnable anything = () -> System.out.println("anything"); foo0(); } public void foo2() { final Runnable anything = () -> System.out.println("anything"); foo1(); } public void foo3() { final Runnable anything = () -> System.out.println("anything"); foo2(); } }
[ "jingwen@google.com" ]
jingwen@google.com
a4ffb7d2e111c32dc028d717ac5c177daa4bbdf4
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.systemux-SystemUX/sources/com/facebook/imagepipeline/producers/QualifiedResourceFetchProducer.java
fe4d7e3b727c495d10be39009b71b5c0d1ecd099
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,304
java
package com.facebook.imagepipeline.producers; import android.content.ContentResolver; import com.facebook.common.memory.PooledByteBufferFactory; import com.facebook.imagepipeline.image.EncodedImage; import com.facebook.imagepipeline.request.ImageRequest; import java.io.IOException; import java.util.concurrent.Executor; public class QualifiedResourceFetchProducer extends LocalFetchProducer { public static final String PRODUCER_NAME = "QualifiedResourceFetchProducer"; private final ContentResolver mContentResolver; /* access modifiers changed from: protected */ @Override // com.facebook.imagepipeline.producers.LocalFetchProducer public String getProducerName() { return PRODUCER_NAME; } public QualifiedResourceFetchProducer(Executor executor, PooledByteBufferFactory pooledByteBufferFactory, ContentResolver contentResolver) { super(executor, pooledByteBufferFactory); this.mContentResolver = contentResolver; } /* access modifiers changed from: protected */ @Override // com.facebook.imagepipeline.producers.LocalFetchProducer public EncodedImage getEncodedImage(ImageRequest imageRequest) throws IOException { return getEncodedImage(this.mContentResolver.openInputStream(imageRequest.getSourceUri()), -1); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
b8643b605e87fa78d66e89a1ddad6605dbca7880
7c721a4e8c701529396f7c3313da7738f702d276
/src/main/java/com/goelmo/elmo/JhipsterElmoSampleApplicationApp.java
96c0cc8b4e922e0630096dbcde1a670fbbc1734d
[]
no_license
directvox/jhipster-elmo-sample-application
f91d130ed0553a9c9e3278ced3373d1d5d1c9969
4748c56093ad4e9c97923cd004865b80bf49a0f1
refs/heads/master
2022-12-22T00:47:05.117443
2019-12-02T21:54:06
2019-12-02T21:54:06
225,474,709
0
0
null
2022-12-16T04:42:03
2019-12-02T21:45:16
Java
UTF-8
Java
false
false
4,133
java
package com.goelmo.elmo; import com.goelmo.elmo.config.ApplicationProperties; import com.goelmo.elmo.config.DefaultProfileUtil; import io.github.jhipster.config.JHipsterConstants; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.core.env.Environment; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; @SpringBootApplication @EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) public class JhipsterElmoSampleApplicationApp implements InitializingBean { private static final Logger log = LoggerFactory.getLogger(JhipsterElmoSampleApplicationApp.class); private final Environment env; public JhipsterElmoSampleApplicationApp(Environment env) { this.env = env; } /** * Initializes jhipsterElmoSampleApplication. * <p> * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>. */ @Override public void afterPropertiesSet() throws Exception { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { log.error("You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time."); } if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { log.error("You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time."); } } /** * Main method, used to run the application. * * @param args the command line arguments. */ public static void main(String[] args) { SpringApplication app = new SpringApplication(JhipsterElmoSampleApplicationApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); logApplicationStartup(env); } private static void logApplicationStartup(Environment env) { String protocol = "http"; if (env.getProperty("server.ssl.key-store") != null) { protocol = "https"; } String serverPort = env.getProperty("server.port"); String contextPath = env.getProperty("server.servlet.context-path"); if (StringUtils.isBlank(contextPath)) { contextPath = "/"; } String hostAddress = "localhost"; try { hostAddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.warn("The host name could not be determined, using `localhost` as fallback"); } log.info("\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}{}\n\t" + "External: \t{}://{}:{}{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, serverPort, contextPath, protocol, hostAddress, serverPort, contextPath, env.getActiveProfiles()); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
fe28daab7f7014d2fdcb4cf8f039b19e781671be
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
/schemaOrgGson/src/org/kyojo/schemaorg/m3n4/gson/healthLifesci/container/BreastfeedingWarningDeserializer.java
eda053ba561306246491434d5fe0a3a543c617fc
[ "Apache-2.0" ]
permissive
nagaikenshin/schemaOrg
3dec1626781913930da5585884e3484e0b525aea
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
refs/heads/master
2021-06-25T04:52:49.995840
2019-05-12T06:22:37
2019-05-12T06:22:37
134,319,974
1
0
null
null
null
null
UTF-8
Java
false
false
1,154
java
package org.kyojo.schemaorg.m3n4.gson.healthLifesci.container; import java.lang.reflect.Field; import java.lang.reflect.Type; import java.util.HashMap; import java.util.Map; import org.kyojo.gson.JsonDeserializationContext; import org.kyojo.gson.JsonDeserializer; import org.kyojo.gson.JsonElement; import org.kyojo.gson.JsonParseException; import org.kyojo.schemaorg.m3n4.healthLifesci.impl.BREASTFEEDING_WARNING; import org.kyojo.schemaorg.m3n4.healthLifesci.Container.BreastfeedingWarning; import org.kyojo.schemaorg.m3n4.gson.DeserializerTemplate; public class BreastfeedingWarningDeserializer implements JsonDeserializer<BreastfeedingWarning> { public static Map<String, Field> fldMap = new HashMap<>(); @Override public BreastfeedingWarning deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { if(jsonElement.isJsonPrimitive()) { return new BREASTFEEDING_WARNING(jsonElement.getAsString()); } return DeserializerTemplate.deserializeSub(jsonElement, type, context, new BREASTFEEDING_WARNING(), BreastfeedingWarning.class, BREASTFEEDING_WARNING.class, fldMap); } }
[ "nagai@nagaikenshin.com" ]
nagai@nagaikenshin.com
fb0fd0788f0efe79eacd0fe1d7be412c3e03d265
2d5e54e4dd6612aeb19904fcdf8757680c5bfd79
/xmi/src/org/modelio/xmi/model/objing/OCallOperationAction.java
8f93a8aa5028a21321bacb000a1cbaeeb9cfb177
[]
no_license
mondo-project/hawk-modelio
1ef504dde30ce4e43b5db8d7936adbc04851e058
4da0f70dfeddb0451eec8b2f361586e07ad3dab9
refs/heads/master
2021-01-10T06:09:58.281311
2015-11-06T11:08:15
2015-11-06T11:08:15
45,675,632
1
0
null
null
null
null
UTF-8
Java
false
false
3,214
java
/* * Copyright 2013 Modeliosoft * * This file is part of Modelio. * * Modelio 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. * * Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>. * */ package org.modelio.xmi.model.objing; import com.modeliosoft.modelio.javadesigner.annotations.objid; import org.eclipse.uml2.uml.UMLFactory; import org.modelio.metamodel.uml.behavior.activityModel.CallOperationAction; import org.modelio.metamodel.uml.statik.Operation; import org.modelio.xmi.util.GenerationProperties; import org.modelio.xmi.util.NotFoundException; @objid ("e58f9067-c0b6-4ca8-9a7c-0f3fe5e745ca") public class OCallOperationAction extends OActivityNode { @objid ("5922cd8a-b943-4c20-ad31-ce23d6a641c0") private CallOperationAction objingElement = null; @objid ("ba58b57f-7c62-45bd-9612-d37164e018f7") @Override public org.eclipse.uml2.uml.Element createEcoreElt() { return UMLFactory.eINSTANCE.createCallOperationAction(); } @objid ("30495695-a181-4e16-8973-03f8e61766ab") public OCallOperationAction(CallOperationAction element) { super(element); this.objingElement = element; } @objid ("4dd4ac3a-f718-44fe-a104-571de6d214df") @Override public void setProperties(org.eclipse.uml2.uml.Element ecoreElt) { super.setProperties(ecoreElt); setSynchronous( (org.eclipse.uml2.uml.CallOperationAction) ecoreElt); setOperation( (org.eclipse.uml2.uml.CallOperationAction) ecoreElt); } @objid ("1ba40d51-201a-4f1f-82b5-e65c843c1c26") private void setSynchronous(org.eclipse.uml2.uml.CallOperationAction action) { action.setIsSynchronous(this.objingElement.isIsSynchronous()); } @objid ("0763b8bc-1583-4be6-aa26-d4f8b02828b9") private void setOperation(org.eclipse.uml2.uml.CallOperationAction ecoreElt) { Operation objingOperation = this.objingElement.getCalled(); if (objingOperation != null) { org.eclipse.uml2.uml.Element ecoreOperation = GenerationProperties.getInstance().getMappedElement(objingOperation); if (ecoreOperation != null) { if (ecoreOperation instanceof org.eclipse.uml2.uml.Operation) { ecoreElt.setOperation( (org.eclipse.uml2.uml.Operation) ecoreOperation); } else{ ecoreElt.destroy(); throw new NotFoundException("The org.eclipse.uml2.uml.Operation \"" + objingOperation.getName() + "\" has not been mapped correctly."); } } } } }
[ "antonio.garcia-dominguez@york.ac.uk" ]
antonio.garcia-dominguez@york.ac.uk
fdfc5a2b595b3e161987043cd4d3c9f937b0eabc
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/google--error-prone/74b237d6c07be0108be1743d4b1d2ad83f7e37a1/after/ThrowNull.java
57735f987fa4ce548a3bef1af48d41584d1cd49b
[]
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
1,886
java
/* * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.bugpatterns; import static com.google.errorprone.BugPattern.Category.JDK; import static com.google.errorprone.BugPattern.SeverityLevel.ERROR; import static com.google.errorprone.matchers.Description.NO_MATCH; import static com.sun.source.tree.Tree.Kind.NULL_LITERAL; import com.google.errorprone.BugPattern; import com.google.errorprone.BugPattern.ProvidesFix; import com.google.errorprone.VisitorState; import com.google.errorprone.bugpatterns.BugChecker.ThrowTreeMatcher; import com.google.errorprone.fixes.SuggestedFix; import com.google.errorprone.matchers.Description; import com.sun.source.tree.ThrowTree; /** @author cushon@google.com (Liam Miller-Cushon) */ @BugPattern( name = "ThrowNull", category = JDK, summary = "Throwing 'null' always results in a NullPointerException being thrown.", severity = ERROR, providesFix = ProvidesFix.REQUIRES_HUMAN_ATTENTION ) public class ThrowNull extends BugChecker implements ThrowTreeMatcher { @Override public Description matchThrow(ThrowTree tree, VisitorState state) { return (tree.getExpression().getKind() == NULL_LITERAL) ? describeMatch( tree, SuggestedFix.replace(tree.getExpression(), "new NullPointerException()")) : NO_MATCH; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
2d7e40f552e2fdfa0a1897d3cf600b66ce0ffc06
b0a254b0bd13cefa14908de81c795c38508a2732
/src/by/it/_tasks_/lesson02/TaskB2.java
43888ce9c9ba443c1e377baf95543f925681869d
[]
no_license
IvanShevy/cs2019-02-20
893dca1290c07b77559c56ae867e66e0dd918625
6725e4d44a0a845403fea3e41d3ffcdec500c205
refs/heads/master
2020-04-24T15:09:20.033958
2019-03-17T16:19:29
2019-03-17T16:19:29
172,054,187
2
0
null
2019-02-22T11:23:07
2019-02-22T11:23:07
null
UTF-8
Java
false
false
1,329
java
package by.it._tasks_.lesson02; /* Подойдет только 20 В методе main расставь правильно знаки плюс и минус, чтобы значение переменной result получилось равным 20. Знаки нужно расставить только в строчке, в которой объявляется переменная result. Перед каждой переменной должен стоять знак либо плюс, либо минус. Требования: 1. Значения переменных: a, b, c, d не изменять. 2. Перед каждой из переменных: a, b, c, d в строке с объявлением переменной result должен стоять один знак плюс либо минус. 3. В результате работы программы на экран нужно вывести число 20. 4. Знаки плюс и минус должны быть расставлены правильно. */ class TaskB2 { private static int a = 1; private static int b = 3; private static int c = 9; private static int d = 27; public static void main(String[] args) { int result = + a + b + c + d; System.out.println(result); } }
[ "akhmelev@gmail.com" ]
akhmelev@gmail.com
b1fd27aa74b7465b8ba12f473a91d2ba1cac2293
200c9e5cc34199bd8a96ec64784a1ed408dada42
/modules/publicweb-gui/src/org/ejbca/util/ActiveDirectoryTools.java
4509fb4d37f97b9022edcbfc5884c4f235b4ac3d
[]
no_license
chenhuang511/ejbca-custom-ui
79df2b2f7848230febc7d8396e8797bfe2a78218
163592181194130bab858bd8a258246ec6954750
refs/heads/master
2022-07-13T04:46:34.261715
2017-09-08T08:03:58
2017-09-08T08:03:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,887
java
/************************************************************************* * * * EJBCA: The OpenSource Certificate Authority * * * * This software 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 any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.ejbca.util; import java.util.Iterator; import org.apache.log4j.Logger; import org.ejbca.config.GlobalConfiguration; import com.novell.ldap.LDAPConnection; import com.novell.ldap.LDAPEntry; import com.novell.ldap.LDAPException; import com.novell.ldap.LDAPJSSESecureSocketFactory; import com.novell.ldap.LDAPSearchResults; /** * @version $Id: ActiveDirectoryTools.java 11526 2011-03-16 12:03:24Z netmackan $ */ public class ActiveDirectoryTools { private static final Logger log = Logger.getLogger(ActiveDirectoryTools.class); //private static final InternalResources intres = InternalResources.getInstance(); /** * Return the DN of the requested user. * *@param globalConfiguration contains Active Directory configuration for autenrollment used in this method *@param usernameShort is the SAMUserAccountName e.g. "Administrator" */ public static String getUserDNFromActiveDirectory(GlobalConfiguration globalConfiguration, String usernameShort) { String activeDirectoryServer = globalConfiguration.getAutoEnrollADServer(); int activeDirectoryPort = globalConfiguration.getAutoEnrollADPort(); boolean useSSLConnection = globalConfiguration.getAutoEnrollSSLConnection(); String activeDirectoryUserDN = globalConfiguration.getAutoEnrollConnectionDN(); String activeDirectoryUserPassword = globalConfiguration.getAutoEnrollConnectionPwd(); String userSearchBaseDN = globalConfiguration.getAutoEnrollBaseDNUser(); return ActiveDirectoryTools.getSubjectDNFromUserInAD(activeDirectoryServer, activeDirectoryPort, useSSLConnection, activeDirectoryUserDN, activeDirectoryUserPassword, userSearchBaseDN, usernameShort); } /** * Return the DN of the requested user. * * @param serverAddress host of the Active Directory server * @param port can be set to 0 to use the default port (389 or 636 for SSL) * @param useSSL if the AD can handle this * @param connectionDN is the connectors DN. E.g. "cn=Administrator,cn=Users,dc=org,dc=local" * @param connectionPassword is the connectors password * @param baseDN is base DN of where to look for the user. E.g. "cn=Users,dc=org,dc=local" * @param username is the SAMAccountName for the user to look for * @return the full DN of the user */ static public String getSubjectDNFromUserInAD(String serverAddress, int port, boolean useSSL, String connectionDN, String connectionPassword, String baseDN, String username) { String requestedDN = null; LDAPConnection lc = getNewConnection(serverAddress, port, useSSL, connectionDN, connectionPassword); if (lc == null) { return null; } LDAPEntry entry = null; try { String searchFilter = "(&(objectClass=person)(sAMAccountName=" + username + "))"; String[] attrs = { LDAPConnection.NO_ATTRS }; // Search recursively, but don't return any attributes for found objects LDAPSearchResults searchResults = lc.search(baseDN, LDAPConnection.SCOPE_SUB, searchFilter, attrs, true); if (searchResults.hasMore()) { // Re-read the object to get the attributes now requestedDN = searchResults.next().getDN(); // List all props just for fun.. (TODO: Remove this..) entry = lc.read(requestedDN); if (entry != null) { Iterator iter = entry.getAttributeSet().iterator(); while (iter.hasNext()) { log.info(".. " + iter.next().toString().replaceAll("[^A-Za-z]", "")); } } } else { log.info("No matches found using filter: '" +searchFilter + "'."); } } catch (LDAPException e) { if (e.getResultCode() == LDAPException.NO_SUCH_OBJECT) { log.info("No such entry exist."); } else { log.error("Unknown AD error", e); } } finally { // disconnect with the server disconnect(lc); } return requestedDN; } /** * Create new LDAP connection to Active Directory server. * @param port can be set to 0 to use the default port (389 or 636 for SSL) */ private static LDAPConnection getNewConnection(String serverAddress, int port, boolean useSSL, String connectionDN, String connectionPassword) { LDAPConnection lc = null; int ldapPort = port; if (useSSL) { lc = new LDAPConnection(new LDAPJSSESecureSocketFactory()); if (ldapPort == 0) { ldapPort = LDAPConnection.DEFAULT_SSL_PORT; // Port 636 } } else { lc = new LDAPConnection(); if (ldapPort == 0) { ldapPort = LDAPConnection.DEFAULT_PORT; // Port 389 } } try { // connect to the server lc.connect(serverAddress, ldapPort); // authenticate to the server lc.bind(LDAPConnection.LDAP_V3, connectionDN, connectionPassword.getBytes()); } catch (LDAPException e) { log.error("Error during AD bind", e); disconnect(lc); lc = null; } return lc; } /** * Clsoe and clean up existing connection. */ private static void disconnect(LDAPConnection lc) { try { lc.disconnect(); } catch (LDAPException e) { log.error("Error during AD disconnect", e); } } }
[ "hoangtd.ptd@gmail.com" ]
hoangtd.ptd@gmail.com
508ec6042fcb954a0477a3b8b7ecb0ade92363f7
c156bf50086becbca180f9c1c9fbfcef7f5dc42c
/src/main/java/com/waterelephant/drainage/entity/xianJinCard/WorkSoleInfo.java
70b7c75ef01ff641a99d656ebf6a650311345b62
[]
no_license
zhanght86/beadwalletloanapp
9e3def26370efd327dade99694006a6e8b18a48f
66d0ae7b0861f40a75b8228e3a3b67009a1cf7b8
refs/heads/master
2020-12-02T15:01:55.982023
2019-11-20T09:27:24
2019-11-20T09:27:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,655
java
package com.waterelephant.drainage.entity.xianJinCard; /** * Module: WorkSoleInfo.java * * @author huangjin * @since JDK 1.8 * @version 1.0 * @description: <描述> */ public class WorkSoleInfo { private String true_operation_address;// true_operation_address string 是 实际经营所在地 private String industry;// industry string 是 所属行业 private String manage_type;// manage_type string 是 经营类型 private String is_license;// is_license int 是 是否办理营业执照 : 1:否; 2:是 private String manage_life_time;// manage_life_time int 是 经营年限 private String total_revenue;// total_revenue int 是 每月总营收(万元) public String getTrue_operation_address() { return true_operation_address; } public void setTrue_operation_address(String true_operation_address) { this.true_operation_address = true_operation_address; } public String getIndustry() { return industry; } public void setIndustry(String industry) { this.industry = industry; } public String getManage_type() { return manage_type; } public void setManage_type(String manage_type) { this.manage_type = manage_type; } public String getIs_license() { return is_license; } public void setIs_license(String is_license) { this.is_license = is_license; } public String getManage_life_time() { return manage_life_time; } public void setManage_life_time(String manage_life_time) { this.manage_life_time = manage_life_time; } public String getTotal_revenue() { return total_revenue; } public void setTotal_revenue(String total_revenue) { this.total_revenue = total_revenue; } }
[ "wurenbiao@beadwallet.com" ]
wurenbiao@beadwallet.com
acb0a800e191065fb62e774d953c0930e0f902d4
46edd9ee781a85617a211b24b8838300c3de82b7
/health_parent/health_service/src/main/java/com/itheima/health/service/PermissionServiceImpl.java
b54340cb7aaebb0ffe2e9f988975041cad959643
[]
no_license
LeeMrChang/health_lee
03d09fd91e53878952f6a455d546fab59d586523
471c6770536881ee7d7a27081c0067d6d67fc46c
refs/heads/master
2022-12-24T09:47:11.630014
2020-02-09T09:55:26
2020-02-09T09:55:26
220,380,714
0
0
null
2022-12-16T04:29:41
2019-11-08T03:38:53
JavaScript
UTF-8
Java
false
false
658
java
package com.itheima.health.service; import com.alibaba.dubbo.config.annotation.Service; import com.itheima.health.dao.PermissionDao; import com.itheima.health.dao.UserDao; import com.itheima.health.pojo.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; /** * @ClassName:CheckGroupServiceImpl * @Author:Mr.lee * @DATE:2019/11/05 * @TIME: 20:09 * @Description: TODO */ @Service(interfaceClass = PermissionService.class) @Transactional public class PermissionServiceImpl implements PermissionService { @Autowired private PermissionDao permissionDao; }
[ "840591418@qq.com" ]
840591418@qq.com
e84656c489af6192c64915f23bd497d50cc8c4ba
7ef841751c77207651aebf81273fcc972396c836
/astream/src/main/java/com/loki/astream/stubs/SampleClass1487.java
ffa993bfffc118ec74488600f97d3a7ed9e1b9d0
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package com.loki.astream.stubs;import com.jenzz.pojobuilder.api.Builder;import com.jenzz.pojobuilder.api.Ignore; @Builder public class SampleClass1487 { @Ignore private SampleClass1488 sampleClass; public SampleClass1487(){ sampleClass = new SampleClass1488(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
ef67d1be5f54684aa418b91dd0529abdd33e21ad
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
/spring-aop-perf-tests/src/main/java/coas/perf/ComplexCondition200/Advice197.java
1c4ed6dd6d60f16101b5fa643b564a2ed3019443
[]
no_license
pmaslankowski/java-contracts
28b1a3878f68fdd759d88b341c8831716533d682
46518bb9a83050956e631faa55fcdf426589830f
refs/heads/master
2021-03-07T13:15:28.120769
2020-09-07T20:06:31
2020-09-07T20:06:31
246,267,189
0
0
null
null
null
null
UTF-8
Java
false
false
1,644
java
package coas.perf.ComplexCondition200; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.stereotype.Component; import coas.perf.ComplexCondition200.Subject200; @Aspect @Component("Advice_200_197_cc") public class Advice197 { @Around("execution(* coas.perf.ComplexCondition200.Subject200.*(..)) and (execution(* *.junk0(..)) or execution(* *.junk1(..)) or execution(* *.junk2(..)) or execution(* *.junk3(..)) or execution(* *.junk4(..)) or execution(* *.junk5(..)) or execution(* *.junk6(..)) or execution(* *.junk7(..)) or execution(* *.junk8(..)) or execution(* *.junk9(..)) or execution(* *.junk10(..)) or execution(* *.junk11(..)) or execution(* *.junk12(..)) or execution(* *.junk13(..)) or execution(* *.junk14(..)) or execution(* *.junk15(..)) or execution(* *.junk16(..)) or execution(* *.junk17(..)) or execution(* *.junk18(..)) or execution(* *.junk19(..)) or execution(* *.junk20(..)) or execution(* *.junk21(..)) or execution(* *.junk22(..)) or execution(* *.junk23(..)) or execution(* *.junk24(..)) or execution(* *.junk25(..)) or execution(* *.junk26(..)) or execution(* *.junk27(..)) or execution(* *.junk28(..)) or execution(* *.junk29(..)) or execution(* *.target(..)))") public Object onTarget(ProceedingJoinPoint joinPoint) throws Throwable { int res = (int) joinPoint.proceed(); for (int i=0; i < 1000; i++) { if (res % 2 == 0) { res /= 2; } else { res = 2 * res + 1; } } return res; } }
[ "pmaslankowski@gmail.com" ]
pmaslankowski@gmail.com
e2cc3c5f370ce1b63142d1f3709f7a170590c04f
8bfee5ea3567ee70eb408d639b83d030a75ccd98
/middle-trade/src/main/java/com/pousheng/middle/order/dto/MiddleShipmentCriteria.java
3fe97f106a6cb7eef77b2698a5765a4ea9ba1e38
[]
no_license
wang-shun/pousheng-middle-ray
5e613d9ace51de59ba941478dbc0222ab3d23088
930152e493314acd551460700fabbe39fce1c7ee
refs/heads/master
2022-04-14T00:11:01.618490
2020-03-31T15:51:34
2020-03-31T15:51:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package com.pousheng.middle.order.dto; import io.terminus.parana.common.model.PagingCriteria; import lombok.Data; import java.io.Serializable; import java.util.List; /** * @author tanlongjun */ @Data public class MiddleShipmentCriteria extends PagingCriteria implements Serializable{ private static final long serialVersionUID = 8648172902284584642L; /** * 状态 */ private List<Integer> statusList; /** * 店铺编号 */ private Long shopId; }
[ "dreamy.galaxy@gmail.com" ]
dreamy.galaxy@gmail.com
5ccb4e016fac0eeb9cd2d3d05385f0d8ccae5e49
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/androidx/camera/core/ar$$ExternalSyntheticLambda1.java
27986a28675643985958240514fae42a9cbcdfba
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
340
java
package androidx.camera.core; public final class ar$$ExternalSyntheticLambda1 implements Runnable { public final void run() {} } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes9.jar * Qualified Name: androidx.camera.core.ar..ExternalSyntheticLambda1 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
cb1d055d7775f84b72098380393b982f1508bb17
ee7af7fae5485e803ff2a999871b3f4eea9c748d
/src/main/java/ivorius/ivtoolkit/rendering/textures/PreBufferedTexture.java
001886edd41687f36332a81c6cfe5e39e6a8080e
[]
no_license
HeetchPT/YeGamolChattels
e2d2d01c7adcde55f13a0a5cafd7479086aa913a
ed8f6d1a0ed4b2473249901769a44e28ca41b750
refs/heads/master
2020-11-26T21:08:50.526624
2014-08-03T20:52:52
2014-08-03T20:52:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,841
java
/* * Copyright (c) 2014, Lukas Tenbrink. * http://lukas.axxim.net * * You are free to: * * Share — copy and redistribute the material in any medium or format * Adapt — remix, transform, and build upon the material * The licensor cannot revoke these freedoms as long as you follow the license terms. * * Under the following terms: * * Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. * NonCommercial — You may not use the material for commercial purposes, unless you have a permit by the creator. * ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. * No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. */ package ivorius.ivtoolkit.rendering.textures; import net.minecraft.client.renderer.texture.AbstractTexture; import net.minecraft.client.renderer.texture.TextureUtil; import net.minecraft.client.resources.IResourceManager; import java.awt.image.BufferedImage; import java.io.IOException; /** * Created by lukas on 27.07.14. */ public class PreBufferedTexture extends AbstractTexture { private BufferedImage bufferedImage; public PreBufferedTexture(BufferedImage bufferedImage) { this.bufferedImage = bufferedImage; } public BufferedImage getBufferedImage() { return bufferedImage; } @Override public void loadTexture(IResourceManager var1) throws IOException { TextureUtil.uploadTextureImageAllocate(this.getGlTextureId(), bufferedImage, false, false); } }
[ "lukastenbrink@googlemail.com" ]
lukastenbrink@googlemail.com
e39e0794ab635cd63abf6aa43beaab80e542d87c
8a4d2577c66004a6e6a236a78a00207d9cdc6680
/src/main/java/gcampra/com/br/application/service/mapper/package-info.java
f7e27a232eb2d586a1cbe5294b6f64f73bf19929
[]
no_license
BulkSecurityGeneratorProject/myApp1
4a305f2973e1a6cf73bcc3ec79c6cf981d6e090e
6d33363beee61f0e7a9c71d701a18bdbd057c8de
refs/heads/master
2022-12-17T18:32:26.438981
2019-09-10T16:33:40
2019-09-10T16:33:40
296,557,711
0
0
null
2020-09-18T08:13:51
2020-09-18T08:13:50
null
UTF-8
Java
false
false
134
java
/** * MapStruct mappers for mapping domain objects and Data Transfer Objects. */ package gcampra.com.br.application.service.mapper;
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
efa46a356eddd42e1880893959eddf959911459a
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-422-14-23-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/impl/TagStack_ESTest.java
50c65a462f061d95227934babda10f2e651ae074
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 19:01:57 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.impl; 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(useVFS = true, useJEE = true) public class TagStack_ESTest extends TagStack_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
abd98153f14168a2e09f0971bd9c0b1b34da24d8
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/93f87bf20be12abd3b52e14015efb6d78b6038d2022e0ab5889979f9c6b6c8c757d6b5a59feae9f8415158057992ae837da76609dc156ea76b5cca7a43a4678b/015/mutations/181/grade_93f87bf2_015.java
f07aaf76a4b19fe8d984b0d1528983441d6527ff
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,520
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_93f87bf2_015 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_93f87bf2_015 mainClass = new grade_93f87bf2_015 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj score = new FloatObj (), A = new FloatObj (), B = new FloatObj (), C = new FloatObj (), D = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D \n in that order, decreasing percentages > ")); A.value = scanner.nextFloat (); B.value = scanner.nextFloat (); C.value = scanner.nextFloat (); D.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) > ")); score.value = scanner.nextFloat (); if ((score.value >= (A.value))) { output += (String.format ("Student has an A grade\n")); } else if ((score.value >= D.value)) && (score.value < (A.value))) { output += (String.format ("Student has an B grade\n")); } else if ((score.value >= (C.value)) && (score.value < (B.value))) { output += (String.format ("Student has an C grade\n")); } else if ((score.value >= (D.value)) && (score.value < (C.value))) { output += (String.format ("Student has an D grade\n")); } else if ((score.value < (D.value))) { output += (String.format ("Student has an F grade\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
16f5f9bcdd677d9a45070dbd1604446ee75fcdad
a34095918027369dfd795040243fe161f5ce0847
/app/src/main/java/com/hamitao/kids/zxing/android/FinishListener.java
5dd4e8a4259f99b8a09ff6448023b55018e9c720
[]
no_license
lfzzj/Robot
1d25bb10144ba5c71e43bb778c74208472765b5d
a591ca3547d31e94cf3feedd8b1bcfed1d22dd1d
refs/heads/master
2020-04-23T15:02:23.150381
2019-02-18T09:35:20
2019-02-18T09:35:20
171,251,247
2
2
null
null
null
null
UTF-8
Java
false
false
1,349
java
/* * Copyright (C) 2010 ZXing 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 com.hamitao.kids.zxing.android; import android.app.Activity; import android.content.DialogInterface; /** * Simple listener used to exit the app in a few cases. * 用于在少数情况下退出App的监听 * * @author Sean Owen */ public final class FinishListener implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener { private final Activity activityToFinish; public FinishListener(Activity activityToFinish) { this.activityToFinish = activityToFinish; } @Override public void onCancel(DialogInterface dialogInterface) { run(); } @Override public void onClick(DialogInterface dialogInterface, int i) { run(); } private void run() { activityToFinish.finish(); } }
[ "you@example.com" ]
you@example.com
e05baab4e26e57d8a50aba5f765cff4cee0b1ba9
207cbf104cf07e4e3a841a3d802b6807d32a0eef
/src/main/java/com/antrag/myapp/config/CacheConfiguration.java
03cdcd5d4f8a64a2bfc69cb54aa6d77852e48744
[]
no_license
Xhavit2019/jXAntragRepository
a53aeda4773a416500f9d5f36d2c18813544ca7e
5782769e25fdf5769769b9ea358b180df67dd9c0
refs/heads/master
2020-09-22T05:39:25.778758
2019-11-30T21:13:37
2019-11-30T21:13:37
225,070,534
0
0
null
2020-07-18T23:25:07
2019-11-30T21:13:24
Java
UTF-8
Java
false
false
1,761
java
package com.antrag.myapp.config; import java.time.Duration; import org.ehcache.config.builders.*; import org.ehcache.jsr107.Eh107Configuration; import io.github.jhipster.config.JHipsterProperties; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.*; @Configuration @EnableCaching public class CacheConfiguration { private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration; public CacheConfiguration(JHipsterProperties jHipsterProperties) { JHipsterProperties.Cache.Ehcache ehcache = jHipsterProperties.getCache().getEhcache(); jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration( CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.heap(ehcache.getMaxEntries())) .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofSeconds(ehcache.getTimeToLiveSeconds()))) .build()); } @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { createCache(cm, com.antrag.myapp.repository.UserRepository.USERS_BY_LOGIN_CACHE); createCache(cm, com.antrag.myapp.repository.UserRepository.USERS_BY_EMAIL_CACHE); // jhipster-needle-ehcache-add-entry }; } private void createCache(javax.cache.CacheManager cm, String cacheName) { javax.cache.Cache<Object, Object> cache = cm.getCache(cacheName); if (cache != null) { cm.destroyCache(cacheName); } cm.createCache(cacheName, jcacheConfiguration); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
6b6e32ae1c3049be60fe0b4a1ad0f4f83a00dce7
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
/src/main/java/ohos/com/sun/org/apache/xalan/internal/xsltc/NodeIterator.java
9618072349e9b24f510a4047d9c092da3d087ea9
[]
no_license
yearsyan/Harmony-OS-Java-class-library
d6c135b6a672c4c9eebf9d3857016995edeb38c9
902adac4d7dca6fd82bb133c75c64f331b58b390
refs/heads/main
2023-06-11T21:41:32.097483
2021-06-24T05:35:32
2021-06-24T05:35:32
379,816,304
6
3
null
null
null
null
UTF-8
Java
false
false
438
java
package ohos.com.sun.org.apache.xalan.internal.xsltc; public interface NodeIterator extends Cloneable { public static final int END = -1; NodeIterator cloneIterator(); int getLast(); int getPosition(); void gotoMark(); boolean isReverse(); int next(); NodeIterator reset(); void setMark(); void setRestartable(boolean z); NodeIterator setStartNode(int i); }
[ "yearsyan@gmail.com" ]
yearsyan@gmail.com
11d902807bad65d721184dbd335f7c269e8fa30d
2ced3f8d89be1502e239c1b2adbc27e74f511408
/src/com/dpower/pub/dp2700/activity/ScreenSaverPictureActivity.java
60230912da482e4a817b209fe8f133224d6eab2d
[]
no_license
lichao3140/NewPub2700
8206fb1057639b9caa947021525b4df94464c1e0
d170eb13350c1a808435f468911a8dbca9f9658b
refs/heads/master
2021-04-05T23:34:34.099071
2018-03-13T12:16:59
2018-03-13T12:16:59
125,046,468
0
0
null
null
null
null
UTF-8
Java
false
false
4,985
java
package com.dpower.pub.dp2700.activity; import com.dpower.pub.dp2700.R; import com.dpower.pub.dp2700.service.PhysicsKeyService; import com.dpower.pub.dp2700.service.PhysicsKeyService.KeyCallback; import com.dpower.pub.dp2700.tools.ScreenUT; import com.dpower.util.MyLog; import com.dpower.util.ProjectConfigure; import android.os.Bundle; import android.os.Handler; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.animation.AlphaAnimation; import android.view.animation.AnimationSet; import android.widget.ImageView; /** * 图片屏保 */ public class ScreenSaverPictureActivity extends BaseActivity { private static final String TAG = "ScreenSaverPictureActivity"; private AnimationSet mAnimationSet; private AlphaAnimation mAlphaAnimation; private ImageView mPicture; private int[] mWallpaperID = { R.drawable.test_wallpaper1, R.drawable.test_wallpaper2, R.drawable.test_wallpaper3, R.drawable.test_wallpaper4 }; private int mWallpaperCount = 0; private int mOnPauseCount = 0; private boolean[] mKeySwitch; private boolean[] mMeeYiKeySwitch; private KeyCallback mKeyCallback = new KeyCallback() { @Override public void onKey(int keyIO) { switch (keyIO) { case PhysicsKeyService.MESSAGE: case PhysicsKeyService.VOLUME: case PhysicsKeyService.MONITOR: case PhysicsKeyService.UNLOCK: case PhysicsKeyService.HANGUP: finish(); break; default: break; } } }; @Override public boolean dispatchKeyEvent(KeyEvent event) { switch (event.getKeyCode()) { case 131: MyLog.print(TAG, "呼叫管理中心键被按下"); if (event.getAction() == KeyEvent.ACTION_UP) { finish(); } break; case 133: MyLog.print(TAG, "监视键被按下"); if (event.getAction() == KeyEvent.ACTION_UP) { finish(); } break; case 134: MyLog.print(TAG, "接听键被按下"); if (event.getAction() == KeyEvent.ACTION_UP) { finish(); } break; case 135: MyLog.print(TAG, "开锁键被按下"); if (event.getAction() == KeyEvent.ACTION_UP) { finish(); } break; default: break; } return super.dispatchKeyEvent(event); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_screen_saver_picture); init(); } private void init() { mPicture = (ImageView) findViewById(R.id.image_picture); mAnimationSet = new AnimationSet(true); mAlphaAnimation = new AlphaAnimation(1.0f, 0.2f); mAlphaAnimation.setDuration(15 * 1000); mAnimationSet.addAnimation(mAlphaAnimation); mPicture.startAnimation(mAnimationSet); mPicture.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { finish(); } }); final Handler handler = new Handler(); Runnable runnable = new Runnable() { @Override public void run() { if (mWallpaperCount < mWallpaperID.length - 1) { mWallpaperCount++; } else { mWallpaperCount = 0; } mPicture.setBackgroundResource(mWallpaperID[mWallpaperCount]); mPicture.startAnimation(mAnimationSet); handler.postDelayed(this, 15 * 1000); } }; handler.post(runnable); if (ProjectConfigure.project == 2) { new Handler().postDelayed(new Runnable() { @Override public void run() { MainActivity.isStartScreenSaver = false; ScreenUT.getInstance().goToSleep(); } }, 180000); } PhysicsKeyService.registerKeyCallback(mKeyCallback); } @Override protected void onStart() { MyLog.print(TAG, "onStart"); super.onStart(); } @Override protected void onResume() { MyLog.print(TAG, "onResume"); mKeySwitch = PhysicsKeyService.getKeySwitch(); PhysicsKeyService.setKeySwitch(new boolean[] { true, true, true, true, true }); mMeeYiKeySwitch = MainActivity.getKeySwitch(); MainActivity.setKeySwitch(new boolean[] { false, false, false, false }); super.onResume(); } @Override protected void onPause() { MyLog.print(TAG, "onPause"); PhysicsKeyService.setKeySwitch(mKeySwitch); MainActivity.setKeySwitch(mMeeYiKeySwitch); // 来电、报警时关闭屏保界面 mOnPauseCount++; MyLog.print(TAG, "mOnPauseCount = " + mOnPauseCount); if (mOnPauseCount > 1) { MyLog.print(TAG, "onPause finish"); finish(); } super.onPause(); } @Override protected void onStop() { MyLog.print(TAG, "onStop"); super.onStop(); } @Override protected void onRestart() { MyLog.print(TAG, "onRestart"); finish(); super.onRestart(); } @Override protected void onDestroy() { PhysicsKeyService.unregisterKeyCallback(mKeyCallback); ScreenUT.getInstance().releaseWakeLock(); MainActivity.isScreenOff = false; MyLog.print(TAG, "onDestroy"); super.onDestroy(); } }
[ "396229938@qq.com" ]
396229938@qq.com
9ccb57449d05a9fb80f83f18f96096ea74fa186e
bb67511bec8421fd2ecf0d281ef4113923c8873b
/src/main/java/com/flurry/sdk/ie.java
8e95ccd4eb1dbca0a3b2378ff960dadec91fc6b7
[]
no_license
TaintBench/hummingbad_android_samp
5b5183737d92948fb2def5b70af8f008bf94e364
b7ce27e2a9f2977c11ba57144c639fa5c55dbcb5
refs/heads/master
2021-07-21T19:35:45.570627
2021-07-16T11:38:49
2021-07-16T11:38:49
234,354,957
1
0
null
null
null
null
UTF-8
Java
false
false
943
java
package com.flurry.sdk; import android.app.Application; import android.app.Application.ActivityLifecycleCallbacks; import android.content.Context; import android.os.Build.VERSION; public class ie { private static ie b; /* access modifiers changed from: private|static|final */ public static final String c = ie.class.getSimpleName(); public Object a; private ie() { if (VERSION.SDK_INT >= 14 && this.a == null) { Context context = hz.a.b; if (context instanceof Application) { this.a = new if(this); ((Application) context).registerActivityLifecycleCallbacks((ActivityLifecycleCallbacks) this.a); } } } public static synchronized ie a() { ie ieVar; synchronized (ie.class) { if (b == null) { b = new ie(); } ieVar = b; } return ieVar; } }
[ "malwareanalyst1@gmail.com" ]
malwareanalyst1@gmail.com
460a2be2ef2a2a703bac5147171b3734afec3d36
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_f3788e48c22f1b6ab7b42fc439123e4e1ec30ad4/TopicController/2_f3788e48c22f1b6ab7b42fc439123e4e1ec30ad4_TopicController_s.java
bea696d45955bfac738b467e633ee0e0b3929c07
[]
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
2,369
java
package cn.iver.controller; import cn.iver.interceptor.AdminInterceptor; import cn.iver.interceptor.LoginInterceptor; import cn.iver.validator.PostValidator; import cn.iver.validator.TopicValidator; import cn.iver.model.Post; import cn.iver.model.Topic; import com.jfinal.aop.Before; import cn.iver.ext.jfinal.Controller; /** * Created with IntelliJ IDEA. * Author: iver * Date: 13-3-28 */ public class TopicController extends Controller { public void index(){ forwardAction("/post/" + getParaToInt(0)); } public void module(){ setAttr("topicPage", Topic.dao.getPageForModule(getParaToInt(0), getParaToInt(1, 1))); setAttr("actionUrl", "/topic/module/" + getParaToInt(0) + "-"); render("/common/index.html"); } public void hot(){ setAttr("topicPage", Topic.dao.getHotPage(getParaToInt(0, 1))); setAttr("actionUrl", "/topic/hot/"); render("/common/index.html"); } public void nice(){ setAttr("topicPage", Topic.dao.getNicePage(getParaToInt(0, 1))); setAttr("actionUrl", "/topic/nice/"); render("/common/index.html"); } @Before(LoginInterceptor.class) public void add(){ render("/topic/add.html"); } @Before({LoginInterceptor.class, TopicValidator.class, PostValidator.class}) public void save(){ Topic topic = getModel(Topic.class); topic.set("userID", getSessionAttr("userID")).set("topicID", null); Post post = getModel(Post.class); post.set("userID", getSessionAttr("userID")); topic.save(post); redirect("/post/" + topic.getInt("id")); } @Before(AdminInterceptor.class) public void edit(){ Topic topic = Topic.dao.get(getParaToInt(0)); setAttr("topic", topic); render("/topic/edit.html"); } @Before({AdminInterceptor.class, TopicValidator.class}) public void update(){ getModel(Topic.class, "id", "content", "moduleID").myUpdate(); redirect("/post/" + getParaToInt("topic.id")); } @Before(AdminInterceptor.class) public void delete(){ Topic.dao.deleteByID(getParaToInt(0)); forwardAction("/admin/topicList/" + getParaToInt(1)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
48ee50a713b118735beb544940eadbc07e11d97a
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/aos/src/main/java/com/huaweicloud/sdk/aos/v1/model/DeleteTemplateVersionRequest.java
835f5a005f912dfceda6eb840fcc0a1fd1dfe5bf
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
4,183
java
package com.huaweicloud.sdk.aos.v1.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** * Request Object */ public class DeleteTemplateVersionRequest { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "Client-Request-Id") private String clientRequestId; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "template_name") private String templateName; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "version_id") private String versionId; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "template_id") private String templateId; public DeleteTemplateVersionRequest withClientRequestId(String clientRequestId) { this.clientRequestId = clientRequestId; return this; } /** * 用户指定的,对于此请求的唯一ID,用于定位某个请求,推荐使用UUID * @return clientRequestId */ public String getClientRequestId() { return clientRequestId; } public void setClientRequestId(String clientRequestId) { this.clientRequestId = clientRequestId; } public DeleteTemplateVersionRequest withTemplateName(String templateName) { this.templateName = templateName; return this; } /** * 用户希望创建的模板名称 * @return templateName */ public String getTemplateName() { return templateName; } public void setTemplateName(String templateName) { this.templateName = templateName; } public DeleteTemplateVersionRequest withVersionId(String versionId) { this.versionId = versionId; return this; } /** * 模板版本ID,以大写V开头,每次创建模板版本,模板版本ID数字部分会自增加一 * @return versionId */ public String getVersionId() { return versionId; } public void setVersionId(String versionId) { this.versionId = versionId; } public DeleteTemplateVersionRequest withTemplateId(String templateId) { this.templateId = templateId; return this; } /** * 模板的ID。当template_id存在时,模板服务会检查template_id是否和template_name匹配,不匹配会返回400 * @return templateId */ public String getTemplateId() { return templateId; } public void setTemplateId(String templateId) { this.templateId = templateId; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } DeleteTemplateVersionRequest that = (DeleteTemplateVersionRequest) obj; return Objects.equals(this.clientRequestId, that.clientRequestId) && Objects.equals(this.templateName, that.templateName) && Objects.equals(this.versionId, that.versionId) && Objects.equals(this.templateId, that.templateId); } @Override public int hashCode() { return Objects.hash(clientRequestId, templateName, versionId, templateId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeleteTemplateVersionRequest {\n"); sb.append(" clientRequestId: ").append(toIndentedString(clientRequestId)).append("\n"); sb.append(" templateName: ").append(toIndentedString(templateName)).append("\n"); sb.append(" versionId: ").append(toIndentedString(versionId)).append("\n"); sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
a4191cf51b7f3dabc73e46760da6a38f94a1f345
27ff9c6bf0b5a3199b4d8eb0bfc74dc9120c6f3a
/src/com/cxgc/front/dao/impl/SupplierScopeDaoimpl.java
be46224d484a4c3778755c4adec863c9d4993dd8
[]
no_license
MJCoderMJCoder/xfht-
609f1a3cdb3b26e5655b7d9ca01ef750c38495e1
dacccd505beafc9a51ac0d2b79fbc3e3570ebcbb
refs/heads/master
2020-04-17T16:17:11.254567
2019-08-14T02:25:40
2019-08-14T02:25:40
166,734,081
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package com.cxgc.front.dao.impl; import java.util.List; import org.hibernate.Query; import org.springframework.stereotype.Repository; import com.cxgc.front.dao.BaseDao; import com.cxgc.front.dao.SupplierScopeDao; import com.cxgc.front.model.Supplier; import com.cxgc.front.model.SupplierScope; @Repository public class SupplierScopeDaoimpl extends BaseDao implements SupplierScopeDao { @Override public List<SupplierScope> getList() { StringBuilder sqlBuilder = new StringBuilder(); sqlBuilder.append("SELECT supplier_scope.supplier_scope FROM supplier_scope "); Query query = getSession().createSQLQuery(sqlBuilder.toString()); List<SupplierScope> dictionarys = query.list(); return dictionarys; } }
[ "598157378@qq.com" ]
598157378@qq.com
ffe71801c0f0e88fa5d27afb63d6223a22d877f2
08cf7f04cfee9ec89793cface61464db1543b2b4
/game-service/src/main/java/com/lodogame/ldsg/service/OnlyOneService.java
e04aab5f35135f074b28666ae906e634d74143f8
[]
no_license
hongwu666/trunk
56f8daa72a11d777a794f9891726c9ba303d3902
4e7409624af6baa57362c5044285e25653209fab
refs/heads/master
2021-05-28T22:29:12.929361
2015-06-12T08:22:38
2015-06-12T08:22:38
37,310,152
1
2
null
null
null
null
UTF-8
Java
false
false
2,596
java
package com.lodogame.ldsg.service; import java.util.Date; import java.util.List; import com.lodogame.ldsg.bo.CommonDropBO; import com.lodogame.ldsg.bo.OnlyOneRankBO; import com.lodogame.ldsg.bo.OnlyOneRegBO; import com.lodogame.ldsg.bo.OnlyOneRewardBO; import com.lodogame.ldsg.bo.UserHeroBO; import com.lodogame.model.OnlyoneUserReg; /** * 百人斩service * * @author jacky * */ public interface OnlyOneService { /** * 活动未开始 */ public final static int ENTER_ARENA_NOT_START = 2001; /** * 活动已经结束 */ public final static int ENTER_ARENA_HAS_FINISH = 2002; /** * 精力不足 */ public final static int VIGOUR_NOT_ENOUGH = 2001; /** * 死亡武将 */ public final static int DEAN_HERO = 2003; /** * 相同武将不能上阵 */ public final static int SIMPLE_HERO = 2004; /** * 最后一个英雄不能下阵 */ public final static int ONE_HERO = 2005; /** * 进入百人斩 * * @param userId * @return */ public boolean enter(String userId); /** * 退出百人斩 * * @param userId * @return */ public boolean quit(String userId); /** * 获取用户报名数据 * * @param userId * @return */ public OnlyoneUserReg getByUserId(String userId); /** * 开始排队 * * @param userId * @return */ public boolean startMatcher(String userId); /** * 获取排行榜 * * @return */ public List<OnlyOneRankBO> getRankList(String userId, boolean self); /** * 获取连胜榜 * * @return */ public List<OnlyOneRankBO> getWinRankList(); /** * 获取用户个人信息 * * @param userId * @return */ public OnlyOneRegBO getRegBO(String userId); /** * 执行命令 * * @param cmd */ public void execute(String cmd); /** * 获取开始时间 * * @return */ public Date getStartTime(); /** * 获取结束时间 * * @return */ public Date getEndTime(); /** * 获取用户排名 * * @param userId * @return */ public int getRank(String userId); /** * 获取奖励列表 * * @param userId * @return */ public List<OnlyOneRewardBO> getRewardList(String userId); /** * 领取奖励 * * @param userId * @param id * @return */ public CommonDropBO receive(String userId, int id); /** * 展现英雄列表 * @param userId * @return */ public List<UserHeroBO> showHero(String userId); /** * 换阵 * @param userId * @param h1 * @param h2 * @param pos1 * @param pos2 */ public void changePos(String userId,String h1,String h2,int pos1,int pos2); }
[ "sndy@hyx.com" ]
sndy@hyx.com
59126abd42d185855e2af0acb60766348898a8fb
79d081703d7516e474be2da97ee6419a5320b6ff
/src/leetcode/levelOrder/Solution.java
97808fc64e27ece0f922d88eaab457c78cbfebe6
[]
no_license
ITrover/Algorithm
e22494ca4c3b2e41907cc606256dcbd1d173886d
efa4eecc7e02754078d284269556657814cb167c
refs/heads/master
2022-05-26T01:48:28.956693
2022-04-01T11:58:24
2022-04-01T11:58:24
226,656,770
1
0
null
null
null
null
UTF-8
Java
false
false
1,375
java
package leetcode.levelOrder; import java.util.*; import java.util.concurrent.ConcurrentLinkedQueue; /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } public List<List<Integer>> levelOrder(TreeNode root) { List<List<Integer>> lists = new ArrayList<>(); Queue<TreeNode> queue = new ArrayDeque<>(); if (root == null) { return lists; } queue.add(root); while (!queue.isEmpty()){ int size = queue.size(); // 把之前stack里面的东西全部取出来 ArrayList<Integer> list = new ArrayList<>(); for (int i = 0; i < size; i++) { TreeNode node = queue.poll(); // 把该节点的值放到结果集中 list.add(node.val); if (node.left != null){ queue.add(node.left); } if (node.right != null){ queue.add(node.right); } } lists.add(list); } return lists; } }
[ "1172610139@qq.com" ]
1172610139@qq.com
1e51586f8ed183345e3d5792e508931af1e1221f
65423f57d25e34d9440bf894584b92be29946825
/target/generated-sources/xjc/com/clincab/web/app/eutils/jaxb/e2br3/POCPHD080300UVSubject2.java
993310946749cadd36a7acc3692ec3038f4f4b93
[]
no_license
kunalcabcsi/toolsr3
0b518cfa6813a88a921299ab8b8b5d6cbbd362fe
5071990dc2325bc74c34a3383792ad5448dee1b0
refs/heads/master
2021-08-31T04:20:23.924815
2017-12-20T09:25:33
2017-12-20T09:25:33
114,867,895
0
0
null
null
null
null
UTF-8
Java
false
false
7,132
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.12.20 at 02:30:39 PM IST // package com.clincab.web.app.eutils.jaxb.e2br3; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for POCP_HD080300UV.Subject2 complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="POCP_HD080300UV.Subject2"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;group ref="{urn:hl7-org:v3}InfrastructureRootElements"/&gt; * &lt;choice&gt; * &lt;element name="document" type="{urn:hl7-org:v3}POCP_HD080300UV.Document"/&gt; * &lt;element name="characteristic" type="{urn:hl7-org:v3}POCP_HD080300UV.Characteristic"/&gt; * &lt;/choice&gt; * &lt;/sequence&gt; * &lt;attGroup ref="{urn:hl7-org:v3}InfrastructureRootAttributes"/&gt; * &lt;attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" /&gt; * &lt;attribute name="typeCode" type="{urn:hl7-org:v3}ActRelationshipHasSubject" default="SUBJ" /&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "POCP_HD080300UV.Subject2", propOrder = { "realmCode", "typeId", "templateId", "document", "characteristic" }) public class POCPHD080300UVSubject2 { protected List<CS> realmCode; protected II typeId; protected List<II> templateId; @XmlElementRef(name = "document", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false) protected JAXBElement<POCPHD080300UVDocument> document; @XmlElementRef(name = "characteristic", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false) protected JAXBElement<POCPHD080300UVCharacteristic> characteristic; @XmlAttribute(name = "nullFlavor") protected NullFlavor nullFlavor; @XmlAttribute(name = "typeCode") protected ActRelationshipHasSubject typeCode; /** * Gets the value of the realmCode property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the realmCode property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRealmCode().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CS } * * */ public List<CS> getRealmCode() { if (realmCode == null) { realmCode = new ArrayList<CS>(); } return this.realmCode; } /** * Gets the value of the typeId property. * * @return * possible object is * {@link II } * */ public II getTypeId() { return typeId; } /** * Sets the value of the typeId property. * * @param value * allowed object is * {@link II } * */ public void setTypeId(II value) { this.typeId = value; } /** * Gets the value of the templateId property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the templateId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getTemplateId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link II } * * */ public List<II> getTemplateId() { if (templateId == null) { templateId = new ArrayList<II>(); } return this.templateId; } /** * Gets the value of the document property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link POCPHD080300UVDocument }{@code >} * */ public JAXBElement<POCPHD080300UVDocument> getDocument() { return document; } /** * Sets the value of the document property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link POCPHD080300UVDocument }{@code >} * */ public void setDocument(JAXBElement<POCPHD080300UVDocument> value) { this.document = value; } /** * Gets the value of the characteristic property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link POCPHD080300UVCharacteristic }{@code >} * */ public JAXBElement<POCPHD080300UVCharacteristic> getCharacteristic() { return characteristic; } /** * Sets the value of the characteristic property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link POCPHD080300UVCharacteristic }{@code >} * */ public void setCharacteristic(JAXBElement<POCPHD080300UVCharacteristic> value) { this.characteristic = value; } /** * Gets the value of the nullFlavor property. * * @return * possible object is * {@link NullFlavor } * */ public NullFlavor getNullFlavor() { return nullFlavor; } /** * Sets the value of the nullFlavor property. * * @param value * allowed object is * {@link NullFlavor } * */ public void setNullFlavor(NullFlavor value) { this.nullFlavor = value; } /** * Gets the value of the typeCode property. * * @return * possible object is * {@link ActRelationshipHasSubject } * */ public ActRelationshipHasSubject getTypeCode() { if (typeCode == null) { return ActRelationshipHasSubject.SUBJ; } else { return typeCode; } } /** * Sets the value of the typeCode property. * * @param value * allowed object is * {@link ActRelationshipHasSubject } * */ public void setTypeCode(ActRelationshipHasSubject value) { this.typeCode = value; } }
[ "ksingh@localhost.localdomain" ]
ksingh@localhost.localdomain
f52f279d04b17b8a184c033901db5348a860440d
c2407bd15a8528aaece85bf3956556def10b271f
/core/base/src/main/java/com/puhuilink/qbs/core/base/vo/TokenUser.java
b409b513536202ee785fb8d96810862d143eb570
[ "Apache-2.0" ]
permissive
white55opennewbee/MicroQBS
6bf3b5126ba5775711c188049a9ee5acc0dca541
c1231781aac0199cad4be5b47879687443d597e9
refs/heads/master
2022-11-19T12:28:39.697510
2020-07-14T11:31:11
2020-07-14T11:31:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
423
java
package com.puhuilink.qbs.core.base.vo; import java.io.Serializable; import java.util.List; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class TokenUser implements Serializable { /** * */ private static final long serialVersionUID = -4234898740994855314L; private String username; private List<String> permissions; private Boolean saveLogin; }
[ "wencz0321@gmail.com" ]
wencz0321@gmail.com
5ae4058d290146efa3c56a15be47b0a6a7f5d79b
36bf98918aebe18c97381705bbd0998dd67e356f
/projects/castor-1.3.3/cpaptf/src/test/java/org/castor/cpaptf/rel1toN/Equipment.java
9d82ab5e0f6d60bb12b72e9ab63f9c3a5fc37ce1
[]
no_license
ESSeRE-Lab/qualitas.class-corpus
cb9513f115f7d9a72410b3f5a72636d14e4853ea
940f5f2cf0b3dc4bd159cbfd49d5c1ee4d06d213
refs/heads/master
2020-12-24T21:22:32.381385
2016-05-17T14:03:21
2016-05-17T14:03:21
59,008,169
2
1
null
null
null
null
UTF-8
Java
false
false
6,191
java
/* * Copyright 2005 Ralf Joachim * * 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.castor.cpaptf.rel1toN; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Date; /** * @author <a href="mailto:ralf DOT joachim AT syscon DOT eu">Ralf Joachim</a> * @version $Revision:6817 $ $Date: 2011-08-02 01:05:37 +0200 (Di, 02 Aug 2011) $ */ public final class Equipment { //------------------------------------------------------------------------- private Integer _id; private Type _type; private String _number; private String _description; private Supplier _supplier; private Integer _delivery; private Double _cost; private String _serial; private State _state; private Reason _reason; private Integer _count; private Collection < Service > _services = new ArrayList < Service > (); private String _note; private Date _createdAt; private String _createdBy; private Date _updatedAt; private String _updatedBy; //------------------------------------------------------------------------- public Integer getId() { return _id; } public void setId(final Integer id) { _id = id; } public Type getType() { return _type; } public void setType(final Type type) { _type = type; } public String getNumber() { return _number; } public void setNumber(final String number) { _number = number; } public String getDescription() { return _description; } public void setDescription(final String description) { _description = description; } public Supplier getSupplier() { return _supplier; } public void setSupplier(final Supplier supplier) { _supplier = supplier; } public Integer getDelivery() { return _delivery; } public void setDelivery(final Integer delivery) { _delivery = delivery; } public Double getCost() { return _cost; } public void setCost(final Double cost) { _cost = cost; } public String getSerial() { return _serial; } public void setSerial(final String serial) { _serial = serial; } public State getState() { return _state; } public void setState(final State state) { _state = state; } public Reason getReason() { return _reason; } public void setReason(final Reason reason) { _reason = reason; } public Integer getCount() { return _count; } public void setCount(final Integer count) { _count = count; } public Collection < Service > getServices() { return _services; } public void setServices(final Collection < Service > services) { _services = services; } public void addService(final Service service) { if ((service != null) && (!_services.contains(service))) { _services.add(service); service.setEquipment(this); } } public void removeService(final Service service) { if ((service != null) && (_services.contains(service))) { _services.remove(service); service.setEquipment(null); } } public String getNote() { return _note; } public void setNote(final String note) { _note = note; } public Date getCreatedAt() { return _createdAt; } public void setCreatedAt(final Date createdAt) { _createdAt = createdAt; } public String getCreatedBy() { return _createdBy; } public void setCreatedBy(final String createdBy) { _createdBy = createdBy; } public void setCreated(final Date createdAt, final String createdBy) { _createdAt = createdAt; _createdBy = createdBy; } public Date getUpdatedAt() { return _updatedAt; } public void setUpdatedAt(final Date updatedAt) { _updatedAt = updatedAt; } public String getUpdatedBy() { return _updatedBy; } public void setUpdatedBy(final String updatedBy) { _updatedBy = updatedBy; } public void setUpdated(final Date updatedAt, final String updatedBy) { _updatedAt = updatedAt; _updatedBy = updatedBy; } //------------------------------------------------------------------------- public String toString() { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); StringBuffer sb = new StringBuffer(); sb.append("<Equipment id='"); sb.append(_id); sb.append("' number='"); sb.append(_number); sb.append("' description='"); sb.append(_description); sb.append("' delivery='"); sb.append(_delivery); sb.append("' cost='"); sb.append(_cost); sb.append("' serial='"); sb.append(_serial); sb.append("' count='"); sb.append(_count); sb.append("' note='"); sb.append(_note); sb.append("' createdAt='"); if (_createdAt != null) { sb.append(df.format(_createdAt)); } else { sb.append(_createdAt); } sb.append("' createdBy='"); sb.append(_createdBy); sb.append("' updatedAt='"); if (_updatedAt != null) { sb.append(df.format(_updatedAt)); } else { sb.append(_updatedAt); } sb.append("' updatedBy='"); sb.append(_updatedBy); sb.append("'>\n"); sb.append(_type); sb.append(_supplier); sb.append(_state); sb.append(_reason); sb.append("</Equipment>\n"); return sb.toString(); } //------------------------------------------------------------------------- }
[ "marco.zanoni@disco.unimib.it" ]
marco.zanoni@disco.unimib.it
47ebf6dd2b8fd208f64c598e8ccc5e3611ee0aae
5ddf3ecd511861f4d35e1e208861b45e26e4b9ae
/src/main/java/com/draco18s/industry/block/BlockDistributor.java
feee72db76d4098f4ad8f32ee3a032a91b64475e
[]
no_license
Toazt/ReasonableRealism
3ca6e1ac8d4cca8fdbce761359a173b421beb7c6
ca7f51097881ad91d1324b9d8b6b655e06e037cc
refs/heads/master
2022-03-05T06:51:18.901054
2017-02-13T18:09:15
2017-02-13T18:09:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,489
java
package com.draco18s.industry.block; import javax.annotation.Nullable; import com.draco18s.industry.ExpandedIndustryBase; import com.draco18s.industry.IndustryGuiHandler; import com.draco18s.industry.entities.TileEntityDistributor; import com.draco18s.industry.entities.TileEntityWoodenHopper; import net.minecraft.block.Block; import net.minecraft.block.BlockHopper; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; public class BlockDistributor extends BlockHopper { public BlockDistributor() { super(); setHardness(3.0F); setResistance(8.0F); } @Override public boolean hasTileEntity(IBlockState state) { return true; } @Override public TileEntity createTileEntity(World world, IBlockState state) { return new TileEntityDistributor(); } @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { playerIn.openGui(ExpandedIndustryBase.instance, IndustryGuiHandler.EXT_HOPPER, worldIn, pos.getX(), pos.getY(), pos.getZ()); return true; } @Override public boolean removedByPlayer(IBlockState state, World worldIn, BlockPos pos, EntityPlayer player, boolean willHarvest) { TileEntity tileentity = worldIn.getTileEntity(pos); IItemHandler inventory = worldIn.getTileEntity(pos).getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); for(int i=0; i < inventory.getSlots(); i++) { ItemStack stack = inventory.getStackInSlot(i); EntityItem entityIn; if(stack != null) { entityIn = new EntityItem(worldIn, pos.getX(), pos.getY(), pos.getZ(), stack); entityIn.setDefaultPickupDelay(); worldIn.spawnEntityInWorld(entityIn); } } return super.removedByPlayer(state, worldIn, pos, player, willHarvest); } }
[ "draco18s@gmail.com" ]
draco18s@gmail.com
1e3572985c96c02df27db2752fb6868126c70bd9
39a9afdacff8338349ed3c7dd212717d0efd28ab
/basecoder/src/main/java/com/example/basecoder/Widget/NoScrollViewPager.java
277b8748567d03bbba2d3e9948edcf02d1af6972
[]
no_license
SuperPorter/BaseLib
8b5997491e50521dafad2806e9ea77a278d0a4c0
759ba58ed516977501cfcf3d72d333ff4f081fac
refs/heads/master
2020-12-10T03:02:36.449816
2020-01-20T09:15:40
2020-01-20T09:15:40
233,487,963
0
0
null
null
null
null
UTF-8
Java
false
false
1,623
java
package com.example.basecoder.Widget; import android.content.Context; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.MotionEvent; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.viewpager.widget.PagerAdapter; import androidx.viewpager.widget.ViewPager; /** * Create BY Luck-S ON 16:53 * Email: fine9987@163.com * Package:com.example.basecoder.Widget * Description: */ public class NoScrollViewPager extends ViewPager { public NoScrollViewPager(@NonNull Context context) { super(context); } public NoScrollViewPager(@NonNull Context context, @Nullable AttributeSet attrs) { super(context, attrs); } @Override public boolean onInterceptTouchEvent(MotionEvent ev) { return false; } @Override public boolean onTouchEvent(MotionEvent ev) { return false; } @Override public boolean executeKeyEvent(@NonNull KeyEvent event) { return false; } @Override public void setCurrentItem(int item) { boolean smoothScroll; int currentItem = getCurrentItem(); if (currentItem == 0) { smoothScroll = item == currentItem + 1; } else if (currentItem == getConunt() - 1) { smoothScroll = item == currentItem - 1; } else { smoothScroll = Math.abs(currentItem - item) == 1; } super.setCurrentItem(item, smoothScroll); } public int getConunt() { PagerAdapter adapter = getAdapter(); return adapter != null ? adapter.getCount() : 0; } }
[ "admin@admin.com" ]
admin@admin.com
fcb82401729614ed95d3d084f633982defe4468c
74005f159878f5e8fe3dd00bb3f07e7257b2df2b
/Minigames/src/au/com/mineauz/minigames/backend/Backend.java
e70f7f5f2b40b5083a8d16c98f0fd2bd86d9597b
[]
no_license
NorbiPeti/Minigames
898206775ccd2cfbe46456eabc3a639a2c01019c
1f944448aac7175f0069b3e0986984e0fb1fedb9
refs/heads/master
2021-01-18T03:46:39.190375
2015-08-13T14:05:39
2015-08-13T14:05:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,667
java
package au.com.mineauz.minigames.backend; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.UUID; import org.bukkit.configuration.ConfigurationSection; import au.com.mineauz.minigames.minigame.Minigame; import au.com.mineauz.minigames.minigame.ScoreboardOrder; import au.com.mineauz.minigames.stats.MinigameStat; import au.com.mineauz.minigames.stats.StatSettings; import au.com.mineauz.minigames.stats.StatValueField; import au.com.mineauz.minigames.stats.StoredGameStats; import au.com.mineauz.minigames.stats.StoredStat; public abstract class Backend { /** * Initializes the backend. This may include creating / converting tables as needed * @param config The configuration to load settings from * @return Returns true if the initialization succeeded */ public abstract boolean initialize(ConfigurationSection config); /** * Shutsdown the backend cleaning up resources */ public abstract void shutdown(); /** * Saves the game stats to the backend. This method is blocking. * @param stats The game stats to store */ public abstract void saveGameStatus(StoredGameStats stats); /** * Loads all player stats from the backend. This method is blocking. * @param minigame The minigame to load stats for * @param stat The stat to load * @param field The field to load * @param order The order to get the stats in * @return A list of stats matching the requirements */ public abstract List<StoredStat> loadStats(Minigame minigame, MinigameStat stat, StatValueField field, ScoreboardOrder order); /** * Loads player stats from the backend. This method is blocking. * @param minigame The minigame to load stats for * @param stat The stat to load * @param field The field to load * @param order The order to get the stats in * @param offset the starting index to load from * @param length the maximum amount of data to return * @return A list of stats matching the requirements */ public abstract List<StoredStat> loadStats(Minigame minigame, MinigameStat stat, StatValueField field, ScoreboardOrder order, int offset, int length); /** * Gets the value of a stat for a player. This method is blocking * @param minigame The minigame that value should be for * @param playerId the UUID of the player in question * @param stat the stat to load * @param field the field of the stat to load * @return The value of the stat */ public abstract long getStat(Minigame minigame, UUID playerId, MinigameStat stat, StatValueField field); /** * Loads stat settings for the minigame * @param minigame The minigame to load settings from * @return A map of stats to their settings */ public abstract Map<MinigameStat, StatSettings> loadStatSettings(Minigame minigame); /** * Saves the stat settings for the minigame * @param minigame The minigame to save settings for * @param settings The settings to save */ public abstract void saveStatSettings(Minigame minigame, Collection<StatSettings> settings); /** * Exports this backend to another backend * @param other The backend to export to * @param notifier A callback to receive progress updates */ public abstract void exportTo(Backend other, ExportNotifier notifier); protected abstract BackendImportCallback getImportCallback(); protected final BackendImportCallback getImportCallback(Backend other) { return other.getImportCallback(); } /** * Performs a conversion from a previous format * @param notifier A notifier for progress updates * @returns True if the conversion succeeded */ public abstract boolean doConversion(ExportNotifier notifier); }
[ "steven.schmoll@gmail.com" ]
steven.schmoll@gmail.com
cc7ba90fd59fba673702f427f5d0ca7c042ba01b
0034aec96900feef52ad5c3785d88112162c6f86
/app/src/main/java/mao/com/mao_wanandroid_client/di/module/CollectionFragmentModule.java
ba31c26f401a2c667060242a9360e91d48fdd7d3
[ "Apache-2.0" ]
permissive
Blowing/MaoWanAndoidClient
aa4181a852552133fcb50a77cb506f4c226121e2
989c2f71b5ff02cd8dc89655a32782a32abf25fb
refs/heads/master
2020-07-12T16:05:01.861058
2019-08-28T07:01:09
2019-08-28T07:01:09
204,859,307
0
0
Apache-2.0
2019-08-28T14:01:27
2019-08-28T06:01:26
null
UTF-8
Java
false
false
632
java
package mao.com.mao_wanandroid_client.di.module; import dagger.Binds; import dagger.Module; import mao.com.mao_wanandroid_client.di.scope.FragmentScope; import mao.com.mao_wanandroid_client.presenter.drawer.CollectionContract; import mao.com.mao_wanandroid_client.presenter.drawer.CollectionPresenter; /** * @author maoqitian * @Description CollectionFragment 可以提供的注入对象Module * @Time 2019/3/27 0027 23:59 */ @Module public abstract class CollectionFragmentModule { @FragmentScope @Binds abstract CollectionContract.CollectionFragmentPresenter bindPresenter(CollectionPresenter presenter); }
[ "maoqitian068@163.com" ]
maoqitian068@163.com
3e32127d5d1fadc7b00c68dcc7f7c75d99fd9377
801ea23bf1e788dee7047584c5c26d99a4d0b2e3
/com/planet_ink/siplet/support/MXPEntity.java
f4ed6f555a95eaf1d7e58033618409ad00325bed
[ "Apache-2.0" ]
permissive
Tearstar/CoffeeMud
61136965ccda651ff50d416b6c6af7e9a89f5784
bb1687575f7166fb8418684c45f431411497cef9
refs/heads/master
2021-01-17T20:23:57.161495
2014-10-18T08:03:37
2014-10-18T08:03:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,019
java
package com.planet_ink.siplet.support; /* Copyright 2008-2014 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 MXPEntity implements Cloneable { private String name=""; private String definition=""; public MXPEntity(String theName, String theDefinition) { super(); name=theName; definition=theDefinition; } public String getName(){return name;} public String getDefinition(){return definition;} public void setDefinition(String newDefinition){definition=newDefinition;} }
[ "bo@zimmers.net" ]
bo@zimmers.net
8278dbf80796b283b11866b3ef2bb2d4e3b6b2aa
2c319d505e8f6a21708be831e9b5426aaa86d61e
/oauth2/webapp/src/main/java/leap/oauth2/webapp/token/TokenExtractor.java
6bf80215ed5ab3ced79daeff04c317b04f30f5e1
[ "Apache-2.0" ]
permissive
leapframework/framework
ed0584a1468288b3a6af83c1923fad2fd228a952
0703acbc0e246519ee50aa9957f68d931fab10c5
refs/heads/dev
2023-08-17T02:14:02.236354
2023-08-01T09:39:07
2023-08-01T09:39:07
48,562,236
47
23
Apache-2.0
2022-12-14T20:36:57
2015-12-25T01:54:52
Java
UTF-8
Java
false
false
887
java
/* * Copyright 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 leap.oauth2.webapp.token; import leap.web.Request; /** * Extracts the {@link Token} from request. */ public interface TokenExtractor { /** * Returns <code>null</code> if not found. */ Token extractTokenFromRequest(Request request); }
[ "live.evan@gmail.com" ]
live.evan@gmail.com
9b1f8cb908acc336a4673f8e5f68f0ab20c46a4c
8b0e76f39886e3331a836dab07a04a252777d835
/gulimall-auth-server/src/test/java/com/xchb/gulimall/auth/GulimallAuthServerApplicationTests.java
e2809777ef3b04befaa2a730bf2bd5a9006ad050
[ "Apache-2.0" ]
permissive
gaohao2020/gulimall
51f97865b3fdf7a9e481c66d2143446544a0586a
c955c6895e6d77e15437608592599d1de0e70325
refs/heads/master
2023-07-05T07:54:13.813893
2021-08-16T23:55:03
2021-08-16T23:55:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
360
java
package com.xchb.gulimall.auth; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class GulimallAuthServerApplicationTests { @Test public void contextLoads() { } }
[ "704566072@qq.com" ]
704566072@qq.com
2f0165771b5643989adf004625738c1b3f470139
404a189c16767191ffb172572d36eca7db5571fb
/mobile-war/build/classes/gov/georgia/dhr/dfcs/sacwis/web/core/state/.svn/text-base/ElseTag.java.svn-base
bf0b83299b095eb68d9513f1be23720716aff779
[]
no_license
tayduivn/training
648a8e9e91194156fb4ffb631749e6d4bf2d0590
95078fb2c7e21bf2bba31e2bbd5e404ac428da2f
refs/heads/master
2021-06-13T16:20:41.293097
2017-05-08T21:37:59
2017-05-08T21:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
682
package gov.georgia.dhr.dfcs.sacwis.web.core.state; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; /* Careful: IfTag ALWAYS evaluates the body * ThenTag: only evaluates if IfTag was True * ElseTag: only evaluates if IfTag was False */ public class ElseTag extends TagSupport { public int doStartTag() throws JspException { IfTag tag = (IfTag) findAncestorWithClass(this, IfTag.class); if (tag == null) { throw new IllegalStateException("ElseTag must be nested within an IfTag"); } if (tag.getTest() == false) { return EVAL_BODY_INCLUDE; } return SKIP_BODY; } }
[ "lgeddam@gmail.com" ]
lgeddam@gmail.com
0ca67faa6b1f1888f132ccc56d2b16b429c9fc5c
169f2904922ca35c30dd3726f779be5bc02e0752
/src/test/java/tech/jhipster/sample/web/rest/UserJWTControllerIT.java
f6a28c194c864994ec390d8b0572371244ac2059
[]
no_license
mraible/ngx-couchbase
8ba2085dee0b23a326276ba23571242876d054b6
5d557d2297c6e25e71ff6a5f10fa4f5c744cd906
refs/heads/main
2023-02-28T02:52:28.737546
2021-01-31T21:19:56
2021-01-31T21:19:56
334,759,314
0
1
null
2021-02-01T18:57:58
2021-01-31T21:20:23
Java
UTF-8
Java
false
false
3,867
java
package tech.jhipster.sample.web.rest; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.http.MediaType; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.test.web.servlet.MockMvc; import tech.jhipster.sample.IntegrationTest; import tech.jhipster.sample.domain.User; import tech.jhipster.sample.repository.UserRepository; import tech.jhipster.sample.web.rest.vm.LoginVM; /** * Integration tests for the {@link UserJWTController} REST controller. */ @AutoConfigureMockMvc @IntegrationTest class UserJWTControllerIT { @Autowired private UserRepository userRepository; @Autowired private PasswordEncoder passwordEncoder; @Autowired private MockMvc mockMvc; @Test void testAuthorize() throws Exception { User user = new User(); user.setLogin("user-jwt-controller"); user.setEmail("user-jwt-controller@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.save(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller"); login.setPassword("test"); mockMvc .perform(post("/api/authenticate").contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(is(emptyString())))); } @Test void testAuthorizeWithRememberMe() throws Exception { User user = new User(); user.setLogin("user-jwt-controller-remember-me"); user.setEmail("user-jwt-controller-remember-me@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.save(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller-remember-me"); login.setPassword("test"); login.setRememberMe(true); mockMvc .perform(post("/api/authenticate").contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(is(emptyString())))); } @Test void testAuthorizeFails() throws Exception { LoginVM login = new LoginVM(); login.setUsername("wrong-user"); login.setPassword("wrong password"); mockMvc .perform(post("/api/authenticate").contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.id_token").doesNotExist()) .andExpect(header().doesNotExist("Authorization")); } }
[ "matt.raible@okta.com" ]
matt.raible@okta.com
a8279edb1fb80191acd6e5f19e89fd3fcc33ef13
e56df3980b699c90a133157fe6774b91897df0d6
/redisson/src/main/java/org/redisson/executor/ExecutorRemoteService.java
e61ec546773e776bf98d60b66f5bb90e351341ab
[ "Apache-2.0" ]
permissive
zhaoe333/redisson
27c956a75bd218e18e1911a4d0cebf2d8daba92b
8943f0655d4a05e19e3aac844e031f0f2a0854e0
refs/heads/master
2021-01-18T18:58:51.881536
2016-09-06T14:54:58
2016-09-06T14:54:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,665
java
/** * Copyright 2016 Nikita Koksharov * * 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.redisson.executor; import java.util.Arrays; import org.redisson.BaseRemoteService; import org.redisson.RedissonExecutorService; import org.redisson.api.RBlockingQueue; import org.redisson.api.RFuture; import org.redisson.api.RedissonClient; import org.redisson.client.codec.Codec; import org.redisson.client.codec.LongCodec; import org.redisson.client.protocol.RedisCommands; import org.redisson.command.CommandExecutor; import org.redisson.misc.RPromise; import org.redisson.remote.RemoteServiceRequest; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.FutureListener; /** * * @author Nikita Koksharov * */ public class ExecutorRemoteService extends BaseRemoteService { protected String terminationTopicName; protected String tasksCounterName; protected String statusName; public ExecutorRemoteService(Codec codec, RedissonClient redisson, String name, CommandExecutor commandExecutor) { super(codec, redisson, name, commandExecutor); } public void setTerminationTopicName(String terminationTopicName) { this.terminationTopicName = terminationTopicName; } public void setStatusName(String statusName) { this.statusName = statusName; } public void setTasksCounterName(String tasksCounterName) { this.tasksCounterName = tasksCounterName; } @Override protected final RFuture<Boolean> addAsync(RBlockingQueue<RemoteServiceRequest> requestQueue, RemoteServiceRequest request, RemotePromise<Object> result) { final RPromise<Boolean> promise = commandExecutor.getConnectionManager().newPromise(); RFuture<Boolean> future = addAsync(requestQueue, request); result.setAddFuture(future); future.addListener(new FutureListener<Boolean>() { @Override public void operationComplete(Future<Boolean> future) throws Exception { if (!future.isSuccess()) { promise.setFailure(future.cause()); return; } if (!future.getNow()) { promise.cancel(true); return; } promise.setSuccess(true); } }); return promise; } protected RFuture<Boolean> addAsync(RBlockingQueue<RemoteServiceRequest> requestQueue, RemoteServiceRequest request) { return commandExecutor.evalWriteAsync(name, LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "if redis.call('exists', KEYS[2]) == 0 then " + "redis.call('rpush', KEYS[3], ARGV[1]); " + "redis.call('incr', KEYS[1]);" + "return 1;" + "end;" + "return 0;", Arrays.<Object>asList(tasksCounterName, statusName, requestQueue.getName()), encode(request)); } @Override protected boolean remove(RBlockingQueue<RemoteServiceRequest> requestQueue, RemoteServiceRequest request) { byte[] encodedRequest = encode(request); return commandExecutor.evalWrite(name, LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "if redis.call('lrem', KEYS[1], 1, ARGV[1]) > 0 then " + "if redis.call('decr', KEYS[2]) == 0 then " + "redis.call('del', KEYS[2]);" + "if redis.call('get', KEYS[3]) == ARGV[2] then " + "redis.call('set', KEYS[3], ARGV[3]);" + "redis.call('publish', KEYS[4], ARGV[3]);" + "end;" + "end;" + "return 1;" + "end;" + "return 0;", Arrays.<Object>asList(requestQueue.getName(), tasksCounterName, statusName, terminationTopicName), encodedRequest, RedissonExecutorService.SHUTDOWN_STATE, RedissonExecutorService.TERMINATED_STATE); } }
[ "abracham.mitchell@gmail.com" ]
abracham.mitchell@gmail.com
97b69c03739e9976d28708e19a778182d0e3795a
8734f33a6942f12755bc7c700abd545fdf4cd02d
/api/cas-server-core-api-audit/src/main/java/org/apereo/cas/audit/AuditableExecutionResult.java
5aaa562a4c69f2d3d336ce4d117f7f631fcec797
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
jsimomaa/cas
99367183579e5eece7afb917ee9e50bf88a213cb
85f4c401e08b6429bef01b93ed2b385646dacfd7
refs/heads/master
2021-04-26T22:40:39.356718
2018-03-07T06:50:30
2018-03-07T06:50:30
124,130,886
0
0
Apache-2.0
2018-03-06T19:55:40
2018-03-06T19:55:39
null
UTF-8
Java
false
false
6,835
java
package org.apereo.cas.audit; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Setter; import org.apereo.cas.authentication.Authentication; import org.apereo.cas.authentication.AuthenticationResult; import org.apereo.cas.authentication.principal.Service; import org.apereo.cas.services.RegisteredService; import org.apereo.cas.ticket.ServiceTicket; import org.apereo.cas.ticket.TicketGrantingTicket; import java.util.Map; import java.util.Optional; import java.util.TreeMap; /** * This is {@link AuditableExecutionResult}. * * @author Misagh Moayyed * @since 5.3.0 */ @AllArgsConstructor @NoArgsConstructor @Setter public class AuditableExecutionResult { /** * RegisteredService. */ private RegisteredService registeredService; /** * Service. */ private Service service; /** * ServiceTicket. */ private ServiceTicket serviceTicket; /** * Authentication. */ private Authentication authentication; /** * RuntimeException. */ private RuntimeException exception; /** * TicketGrantingTicket. */ private TicketGrantingTicket ticketGrantingTicket; /** * AuthenticationResult. */ private AuthenticationResult authenticationResult; /** * Properties. */ private Map<String, Object> properties = new TreeMap<>(); public boolean isExecutionFailure() { return getException().isPresent(); } /** * Throw exception if needed. */ public void throwExceptionIfNeeded() { if (isExecutionFailure()) { throw getException().get(); } } /** * Factory method to create a result. * * @param e the exception * @param authentication the authentication * @param service the service * @param registeredService the registered service * @return the auditable execution result */ public static AuditableExecutionResult of(final RuntimeException e, final Authentication authentication, final Service service, final RegisteredService registeredService) { final AuditableExecutionResult result = new AuditableExecutionResult(); result.setAuthentication(authentication); result.setException(e); result.setRegisteredService(registeredService); result.setService(service); return result; } /** * Factory method to create a result. * * @param authentication the authentication * @param service the service * @param registeredService the registered service * @return the auditable execution result */ public static AuditableExecutionResult of(final Authentication authentication, final Service service, final RegisteredService registeredService) { return of(null, authentication, service, registeredService); } /** * Of auditable execution result. * * @param serviceTicket the service ticket * @param authenticationResult the authentication result * @param registeredService the registered service * @return the auditable execution result */ public static AuditableExecutionResult of(final ServiceTicket serviceTicket, final AuthenticationResult authenticationResult, final RegisteredService registeredService) { final AuditableExecutionResult result = new AuditableExecutionResult(); result.setServiceTicket(serviceTicket); result.setAuthenticationResult(authenticationResult); result.setRegisteredService(registeredService); return result; } /** * Of auditable execution result. * * @param service the service * @param registeredService the registered service * @param ticketGrantingTicket the ticket granting ticket * @return the auditable execution result */ public static AuditableExecutionResult of(final Service service, final RegisteredService registeredService, final TicketGrantingTicket ticketGrantingTicket) { final AuditableExecutionResult result = new AuditableExecutionResult(); result.setTicketGrantingTicket(ticketGrantingTicket); result.setRegisteredService(registeredService); result.setService(service); return result; } /** * Of auditable execution result. * * @param context the context * @return the auditable execution result */ public static AuditableExecutionResult of(final AuditableContext context) { final AuditableExecutionResult result = new AuditableExecutionResult(); context.getTicketGrantingTicket().ifPresent(result::setTicketGrantingTicket); context.getAuthentication().ifPresent(result::setAuthentication); context.getAuthenticationResult().ifPresent(result::setAuthenticationResult); context.getRegisteredService().ifPresent(result::setRegisteredService); context.getService().ifPresent(result::setService); context.getServiceTicket().ifPresent(result::setServiceTicket); result.getProperties().putAll(context.getProperties()); return result; } /** * Get. * * @return optional registered service */ public Optional<RegisteredService> getRegisteredService() { return Optional.ofNullable(registeredService); } /** * Get. * * @return optional service */ public Optional<Service> getService() { return Optional.ofNullable(service); } /** * Get. * * @return optional service ticket */ public Optional<ServiceTicket> getServiceTicket() { return Optional.ofNullable(serviceTicket); } /** * Get. * * @return optional authentication */ public Optional<Authentication> getAuthentication() { return Optional.ofNullable(authentication); } /** * Get. * * @return optional tgt */ public Optional<TicketGrantingTicket> getTicketGrantingTicket() { return Optional.ofNullable(ticketGrantingTicket); } /** * Get. * * @return optional authentication result */ public Optional<AuthenticationResult> getAuthenticationResult() { return Optional.ofNullable(authenticationResult); } /** * Get. * * @return optional exception */ public Optional<RuntimeException> getException() { return Optional.ofNullable(exception); } /** * Get. * * @return properties */ public Map<String, Object> getProperties() { return properties; } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
28d5a9eba4bda695816e8253bda5588cd41b91d8
f54f4c4f12b3995cd6a513fb9ce7254c75d5be02
/src/main/java/com/simple/portal/biz/v1/board/entity/AlarmHistEntity.java
86d982a14ff8eada2160903e1ecde058b112380a
[]
no_license
hyungLaek/toy_project_portal
68e0ad7d1a2d189a46b8383d833051b2f3660b1e
e8d610e8c5b772922b8d2fda3a87436298889f12
refs/heads/master
2023-04-09T13:32:44.436966
2020-08-23T06:24:09
2020-08-23T06:24:09
280,597,731
0
0
null
2020-07-18T06:34:27
2020-07-18T06:34:27
null
UTF-8
Java
false
false
1,445
java
package com.simple.portal.biz.v1.board.entity; // 알람푸시 테이블 import lombok.Data; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.*; import java.time.LocalDateTime; @Entity @Table(name = "TB_ALARM_HIST") @Data @EntityListeners(AuditingEntityListener.class) public class AlarmHistEntity { public static enum EventType { // 쪽지, 댓글, 좋아요, 싫어요, 최초1회 로그인 EVT_NR, EVT_BC, EVT_BL, EVT_BD, EVT_UL } @Id @GeneratedValue(strategy = GenerationType.AUTO) // test01,1,EVT_BC = 댓글1 // test01,1,EVT_BC = 댓글2 private Long id; private String userId;// 등록자 private Long boardId; // 상세글을 클릭할때 댓글이나, 좋아요/싫어요 관련 카운트를 감소하기 위해 사용. private Long loginId; // 로그인 아이디 private Long noteId; // 쪽지 아이디 @CreatedDate private LocalDateTime regDate; // @Column(name = "NOTE_CNT", columnDefinition = "Decimal(10,2) default '0'") // private Long noteCount; // @Column(name = "BOARD_CNT", columnDefinition = "Decimal(10,2) default '0'") // private Long boardCount; // @Column(name = "USER_CNT", columnDefinition = "Decimal(10,2) default '0'") // private Long userCount; @Enumerated(EnumType.STRING) private EventType eventType; }
[ "toyongyeon@gmail.com" ]
toyongyeon@gmail.com
ae8da0a458eb2aedbc2a463718c6909641079f66
b5c485493f675bcc19dcadfecf9e775b7bb700ed
/jee-utility-server-representation/src/main/java/org/cyk/utility/server/representation/AbstractEntityFromPersistenceEntityLinked.java
043c53c1d30b1f3161b7b3c7a309e03e5db42f87
[]
no_license
devlopper/org.cyk.utility
148a1aafccfc4af23a941585cae61229630b96ec
14ec3ba5cfe0fa14f0e2b1439ef0f728c52ec775
refs/heads/master
2023-03-05T23:45:40.165701
2021-04-03T16:34:06
2021-04-03T16:34:06
16,252,993
1
0
null
2022-10-12T20:09:48
2014-01-26T12:52:24
Java
UTF-8
Java
false
false
591
java
package org.cyk.utility.server.representation; import java.io.Serializable; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.experimental.Accessors; @Getter @Setter @Accessors(chain=true) @NoArgsConstructor @Deprecated public abstract class AbstractEntityFromPersistenceEntityLinked extends AbstractEntityFromPersistenceEntity implements Serializable { private static final long serialVersionUID = 1L; private String link; @Override public String toString() { return link; } /**/ public static final String FIELD_LINK = "link"; }
[ "kycdev@gmail.com" ]
kycdev@gmail.com
54f364a27c521ca0c7faef0f9358ce80eaf10b95
4a8013ffc2f166506fc709698f2242db6b8dde41
/src/main/java/org/elissa/web/repository/impl/UUIDBasedJbpmRepository.java
942090c3a2f9a441144dedb5de6a8ebd3639d35f
[]
no_license
tsurdilo/elissa
a7a255c436420b2cbd75b2f7aac6f49aab6c0b1d
d44604bd6b3ef188563bb4dabd25aae4b3f7a69f
refs/heads/master
2021-01-01T05:39:53.149047
2012-02-05T22:18:20
2012-02-05T22:18:20
3,308,767
0
0
null
null
null
null
UTF-8
Java
false
false
3,917
java
package org.elissa.web.repository.impl; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; import org.elissa.web.profile.IDiagramProfile; import org.elissa.web.profile.impl.ExternalInfo; import org.elissa.web.repository.IUUIDBasedRepository; public class UUIDBasedJbpmRepository implements IUUIDBasedRepository { private static final Logger _logger = Logger.getLogger(UUIDBasedJbpmRepository.class); private final static String DEFAULTS_PATH = "defaults"; private String _defaultsPath; public void configure(HttpServlet servlet) { _defaultsPath = servlet.getServletContext().getRealPath("/" + DEFAULTS_PATH); } public byte[] load(HttpServletRequest req, String uuid, IDiagramProfile profile) throws Exception { String processjson = ""; String preProcessingParam = req.getParameter("pp"); // check with Guvnor to see what it has for this uuid for us String processxml = doHttpUrlConnectionAction(buildExternalLoadURL(profile, uuid)); if(processxml != null && processxml.length() > 0) { processjson = profile.createUnmarshaller().parseModel(processxml, profile, preProcessingParam); return processjson.getBytes("UTF-8"); } else { return new byte[0]; } } public void save(HttpServletRequest req, String uuid, String json, String svg, IDiagramProfile profile, Boolean autosave) { // Guvnor is responsible for saving } private String buildExternalLoadURL(IDiagramProfile profile, String uuid) { StringBuffer buff = new StringBuffer(); buff.append(ExternalInfo.getExternalProtocol(profile)); buff.append("://"); buff.append(ExternalInfo.getExternalHost(profile)); buff.append("/"); buff.append(profile.getExternalLoadURLSubdomain()); buff.append("?uuid=").append(uuid); buff.append("&usr=").append(profile.getUsr()); buff.append("&pwd=").append(profile.getPwd()); return buff.toString(); } public String toXML(String json, IDiagramProfile profile, String preProcessingData) { return profile.createMarshaller().parseModel(json, preProcessingData); } private String doHttpUrlConnectionAction(String desiredUrl) throws Exception { URL url = null; BufferedReader reader = null; StringBuilder stringBuilder; try { url = new URL(desiredUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Content-Type", "application/xml"); connection.setRequestProperty("charset", "UTF-8"); connection.setReadTimeout(5*1000); connection.connect(); reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8")); stringBuilder = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { stringBuilder.append(line + "\n"); } return stringBuilder.toString(); } catch (Exception e) { _logger.error("Unable to connect to Gunvor. Is it running? [" + e.getMessage() + "]"); // don't blow up, we will just show the default process return ""; } finally { if (reader != null) { try { reader.close(); } catch (IOException ioe) { _logger.error("Unable to read from Gunvor. [" + ioe.getMessage() + "]"); // don't blow up, we will just show the default process return ""; } } } } }
[ "tsurdilo@redhat.com" ]
tsurdilo@redhat.com
7d92552bab7ecf7b59ed00b9a7f6ab2d58bdcb7a
e6c5205c9e4d0d81095f7a764a7a2df002d60830
/src/org/apache/ctakes/typesystem/type/relation/IsIndicatedFor_Type.java
1bdce1ecd77944356aaad7820ce78e9f0de86ff4
[ "Apache-2.0" ]
permissive
harryhoch/DeepPhe
796009a6f583bd7f0032d26300cad8692b0d7a6d
fe8c2d2c79ec53bb048235816535901bee961090
refs/heads/master
2020-12-26T03:22:44.606278
2015-05-22T15:21:45
2015-05-22T15:21:45
50,454,055
0
0
null
2016-01-26T19:39:54
2016-01-26T19:39:54
null
UTF-8
Java
false
false
1,964
java
/* First created by JCasGen Mon May 11 11:00:52 EDT 2015 */ package org.apache.ctakes.typesystem.type.relation; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; /** * Updated by JCasGen Mon May 11 11:00:52 EDT 2015 * @generated */ public class IsIndicatedFor_Type extends ElementRelation_Type { /** @generated * @return the generator for this type */ @Override protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (IsIndicatedFor_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = IsIndicatedFor_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new IsIndicatedFor(addr, IsIndicatedFor_Type.this); IsIndicatedFor_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new IsIndicatedFor(addr, IsIndicatedFor_Type.this); } }; /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = IsIndicatedFor.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.ctakes.typesystem.type.relation.IsIndicatedFor"); /** initialize variables to correspond with Cas Type and Features * @generated * @param jcas JCas * @param casType Type */ public IsIndicatedFor_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); } }
[ "tseytlin@pitt.edu" ]
tseytlin@pitt.edu
55aadd22e8cbfd4fb9668baf0fbcefec1aaf53b8
be00843d387f531b0a4b3db6352fafd84bfa0273
/t-odalic/src/main/java/eu/odalic/uv/dpu/transformer/odalic/package-info.java
d8952120ae0880215cc31f6ae5414281d248f70e
[]
no_license
odalic/odalic-uv-plugin
a23e10c073befabdb5cb44ab05b7b74f19af4d15
c12601a630ac6ce97a50b1229f97f5ef1901bce4
refs/heads/master
2021-01-19T13:52:48.489250
2017-06-01T10:34:56
2017-06-01T10:34:56
82,423,633
2
0
null
null
null
null
UTF-8
Java
false
false
189
java
/** * Odalic plug-in implementation. Connects to the Odalic Semantic Table Interpretation server in * order to run configured tasks. */ package eu.odalic.uv.dpu.transformer.odalic;
[ "brodecva@gmail.com" ]
brodecva@gmail.com
990910a2cbabe779cd51812e33407af13a418cea
dfb3f631ed8c18bd4605739f1ecb6e47d715a236
/disconnect-highcharts/src/main/java/js/lang/external/highcharts/PlotAreaDataSortingOptions.java
2cde6ecebd765779d712c7add86f24acd8522117
[ "Apache-2.0" ]
permissive
fluorumlabs/disconnect-project
ceb788b901d1bf7cfc5ee676592f55f8a584a34e
54f4ea5e6f05265ea985e1ee615cc3d59d5842b4
refs/heads/master
2022-12-26T11:26:46.539891
2020-08-20T16:37:19
2020-08-20T16:37:19
203,577,241
6
1
Apache-2.0
2022-12-16T00:41:56
2019-08-21T12:14:42
Java
UTF-8
Java
false
false
2,770
java
package js.lang.external.highcharts; import com.github.fluorumlabs.disconnect.core.annotations.Import; import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage; import js.lang.Any; import org.teavm.jso.JSProperty; import javax.annotation.Nullable; /** * (Highcharts, Highstock) Options for the series data sorting. * */ @NpmPackage( name = "highcharts", version = "^8.1.2" ) @Import( module = "highcharts/es-modules/masters/highcharts.src.js" ) public interface PlotAreaDataSortingOptions extends Any { /** * (Highcharts, Highstock) Enable or disable data sorting for the series. * Use xAxis.reversed to change the sorting order. * */ @JSProperty("enabled") boolean getEnabled(); /** * (Highcharts, Highstock) Enable or disable data sorting for the series. * Use xAxis.reversed to change the sorting order. * */ @JSProperty("enabled") void setEnabled(boolean value); /** * (Highcharts, Highstock) Whether to allow matching points by name in an * update. If this option is disabled, points will be matched by order. * */ @JSProperty("matchByName") boolean getMatchByName(); /** * (Highcharts, Highstock) Whether to allow matching points by name in an * update. If this option is disabled, points will be matched by order. * */ @JSProperty("matchByName") void setMatchByName(boolean value); /** * (Highcharts, Highstock) Determines what data value should be used to sort * by. * */ @JSProperty("sortKey") @Nullable String getSortKey(); /** * (Highcharts, Highstock) Determines what data value should be used to sort * by. * */ @JSProperty("sortKey") void setSortKey(@Nullable String value); static Builder builder() { return new Builder(); } final class Builder { private final PlotAreaDataSortingOptions object = Any.empty(); private Builder() { } public PlotAreaDataSortingOptions build() { return object; } /** * (Highcharts, Highstock) Enable or disable data sorting for the series. * Use xAxis.reversed to change the sorting order. * */ public Builder enabled(boolean value) { object.setEnabled(value); return this; } /** * (Highcharts, Highstock) Whether to allow matching points by name in an * update. If this option is disabled, points will be matched by order. * */ public Builder matchByName(boolean value) { object.setMatchByName(value); return this; } /** * (Highcharts, Highstock) Determines what data value should be used to sort * by. * */ public Builder sortKey(@Nullable String value) { object.setSortKey(value); return this; } } }
[ "fluorumlabs@users.noreply.github.com" ]
fluorumlabs@users.noreply.github.com
b90a99fd3e57a10b08fab75a961406d7ba52cc2d
3c8c6eec3fa1784abe8734ae9f521660891772ab
/src/com/zhonghuan/entity/Register.java
7a432119a8c3b886764b18b458df1d3d3d844f47
[]
no_license
HesionBlack/zhonghuan
24a62cc553bb59171d3bba052990c950852d1f37
4e133ab0b25a8e3b3fff3b61a67ff79b9b12c5a6
refs/heads/master
2020-04-30T21:46:54.386402
2019-03-22T08:42:22
2019-03-22T08:42:22
176,455,159
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
package com.zhonghuan.entity; import java.util.Date; import com.zhonghuan.entity.common.Entity; /** * 学生端注册实体类 * * @author Administrator * */ public class Register extends Entity { // 学生端登录名 private String login; // 学生端密码 private String pwd; // 注册 时间 private Date regitster_time; // 备注 private String memo; public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public String getPwd() { return pwd; } public void setPwd(String pwd) { this.pwd = pwd; } public Date getRegitster_time() { return regitster_time; } public void setRegitster_time(Date regitster_time) { this.regitster_time = regitster_time; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } @Override public String toString() { return "Register [login=" + login + ", pwd=" + pwd + ", regitster_time=" + regitster_time + ", memo=" + memo + "]"; } }
[ "user.email" ]
user.email
23e2194356625f0c76cec18190b17d0de5200d3a
11201bc32f4b8d479cd5f7d5fd4859085207068f
/src/sevencreating_classes/ConstParameterTest.java
360a7def6954ae66773191dcee6901327447cea7
[]
no_license
Bir-Eda/My-Java-Projects
842337614591955410a2730b355d55754e8fa804
eefe94288b94884b9cd813a2c712e2269bf4df14
refs/heads/master
2023-03-15T17:52:04.595827
2021-03-08T03:41:58
2021-03-08T03:41:58
258,254,372
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package sevencreating_classes; public class ConstParameterTest { public static void main(String[] args) { ConstParameter myObj =new ConstParameter(20); System.out.println(myObj.length); ConstParameter myObj2 =new ConstParameter(10); System.out.println(myObj2.length); } }
[ "60522150+Bir-Eda@users.noreply.github.com" ]
60522150+Bir-Eda@users.noreply.github.com
66d738daf231deff6fa255b1a48da4cdfc77cca2
93c3ecf15e5dbb059516c4c9930d6eaaa4aa76bf
/src/main/java/com/adaptris/core/mail/RawMailConsumer.java
0994be5875e2b3fcb5fd7ecb39adbd2c935cb6d3
[ "Apache-2.0" ]
permissive
adaptris/interlok-mail
15b36672dfd54c4583c5b84ca86dce456493f7a1
e78b0bf1b50c6a250ef6fb191d1bccfd2efe2385
refs/heads/develop
2023-08-31T18:08:45.056762
2023-08-28T09:59:08
2023-08-29T00:42:46
184,405,159
0
0
Apache-2.0
2023-09-12T00:32:21
2019-05-01T11:13:13
Java
UTF-8
Java
false
false
3,844
java
/* * Copyright 2015 Adaptris Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.adaptris.core.mail; import static com.adaptris.core.AdaptrisMessageFactory.defaultIfNull; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import com.adaptris.annotation.AdapterComponent; import com.adaptris.annotation.AdvancedConfig; import com.adaptris.annotation.ComponentProfile; import com.adaptris.annotation.DisplayOrder; import com.adaptris.annotation.InputFieldDefault; import com.adaptris.core.AdaptrisMessage; import com.adaptris.core.CoreException; import com.adaptris.core.NullConnection; import com.adaptris.mail.MailException; import com.thoughtworks.xstream.annotations.XStreamAlias; /** * Email implementation of the AdaptrisMessageConsumer interface. * <p> * The raw MimeMessage will not be parsed, and the contents of the entire MimeMessage will be used to create a single * AdaptrisMessage instance for processing. Additionally, any configured encoder will be ignored. * </p> * * @config raw-mail-consumer * * * @see MailConsumerImp */ @XStreamAlias("raw-mail-consumer") @AdapterComponent @ComponentProfile(summary = "Pickup messages from a email account without trying to parse the MIME message.", tag = "consumer,email", recommended = {NullConnection.class}) @DisplayOrder(order = {"mailboxUrl", "poller", "username", "password", "mailReceiverFactory", "headerHandler"}) public class RawMailConsumer extends MailConsumerImp { @AdvancedConfig @InputFieldDefault(value = "false") private Boolean useEmailMessageIdAsUniqueId; public RawMailConsumer() { } @Override protected List<AdaptrisMessage> createMessages(MimeMessage mime) throws MailException, CoreException { List<AdaptrisMessage> result = new ArrayList<AdaptrisMessage>(); try { log.trace("Start Processing [{}]", mime.getMessageID()); AdaptrisMessage msg = defaultIfNull(getMessageFactory()).newMessage(); String uuid = msg.getUniqueId(); try (OutputStream out = msg.getOutputStream()) { mime.writeTo(out); } if (useEmailMessageIdAsUniqueId()) { msg.setUniqueId(StringUtils.defaultIfBlank(mime.getMessageID(), uuid)); } headerHandler().handle(mime, msg); result.add(msg); } catch (MessagingException | IOException e) { throw new MailException(e.getMessage(), e); } return result; } /** * @see com.adaptris.core.AdaptrisComponent#init() */ @Override protected void initConsumer() throws CoreException { } /** * @return the useEmailMessageIdAdUniqueId */ public Boolean getUseEmailMessageIdAsUniqueId() { return useEmailMessageIdAsUniqueId; } /** * Specify whether to use the email unique id as the AdaptrisMessage unique * ID. * * @param b true to use the email message id as the uniqueid */ public void setUseEmailMessageIdAsUniqueId(Boolean b) { useEmailMessageIdAsUniqueId = b; } boolean useEmailMessageIdAsUniqueId() { return BooleanUtils.toBooleanDefaultIfNull(getUseEmailMessageIdAsUniqueId(), false); } }
[ "lewin.chan@adaptris.com" ]
lewin.chan@adaptris.com
75eae77a6597ca356ea175316327c4efa70ab488
6cb1208e0f532ca95d53c581306946f27cd73363
/commander-common/src/main/java/com/arcsoft/commander/cluster/action/server/RemoveAgentRequest.java
4e07f2ccfdad9506a372af9d020991e3ac37cb94
[]
no_license
wwj912790488/Ingest-for-struts2
723b83153265bb3c6ef782836acab698f46fa08a
af1a023660b738f02e00fa5e199d29cd70c88ddb
refs/heads/master
2021-10-09T09:59:29.898063
2016-12-30T01:03:02
2016-12-30T01:03:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package com.arcsoft.commander.cluster.action.server; import javax.xml.bind.annotation.XmlRootElement; import com.arcsoft.commander.cluster.action.BaseRequest; /** * This request is used to remove agent from the commander. * * @author fjli */ @XmlRootElement public class RemoveAgentRequest extends BaseRequest { }
[ "wwj@arcvideo.com" ]
wwj@arcvideo.com