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
51bf673a4c39b8107ba47661a9fe1005bb50df71
5fd861f5ee3768e6b4dc92d5cba08d851eb2e424
/SDPCics/src/main/java/com/jgg/sdp/cics/base/ILexer.java
9effce7710cd218d137f61a76fa5ee1ce4ff3ac6
[]
no_license
Grandez/SDPJavaLite
194b86c364c9c51499bee701c4eb04da10cf36b2
e7431841ae86ad3668082411fdfae2d4667d9575
refs/heads/master
2021-01-19T20:40:36.339865
2017-04-17T17:17:21
2017-04-17T17:17:21
88,531,535
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
/** * Interfaz que deben implementar los diferentes analizadores lexicos * * Establecer el path absoluto del fichero * Obtener el path del fichero * * @author Javier Gonzalez Grandez * @version 3.0 * */ package com.jgg.sdp.cics.base; public interface ILexer { public String getFullName(); public void setFullName(String fullName); }
[ "javier.gonzalez.grandez@gmail.com" ]
javier.gonzalez.grandez@gmail.com
c62f5a25d29a8ed2670c5ba6b4c0adae84ec4972
5cc3b051e592b4f38679c86365cb4290d726debc
/java/client/src/org/openqa/selenium/json/JsonOutput.java
6bfe63fee6968fa2b8418fc9b69b8f48899c1268
[ "Apache-2.0" ]
permissive
narayananpalani/selenium
faa41c870ad92db1a69f6fa9f7f9fa8988835337
90216e938f4ffda83c3afd1fca901069d6a1fc1b
refs/heads/master
2021-04-12T10:04:05.994491
2017-02-27T15:03:44
2018-03-25T16:43:56
126,752,137
1
1
Apache-2.0
2018-03-26T00:18:50
2018-03-26T00:18:49
null
UTF-8
Java
false
false
2,702
java
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC 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.openqa.selenium.json; import com.google.gson.stream.JsonWriter; import java.io.Closeable; import java.io.IOException; import java.io.UncheckedIOException; public class JsonOutput implements Closeable { private final JsonWriter jsonWriter; private final BeanToJsonConverter toJson; JsonOutput(BeanToJsonConverter toJson, JsonWriter jsonWriter) { this.jsonWriter = jsonWriter; this.jsonWriter.setIndent(" "); this.toJson = toJson; } @Override public void close() throws IOException { jsonWriter.close(); } public JsonOutput write(JsonInput input) { try { Object read = input.read(Json.OBJECT_TYPE); jsonWriter.jsonValue(toJson.convert(read)); return this; } catch (IOException e) { throw new UncheckedIOException(e); } } public JsonOutput write(Object input) { try { jsonWriter.jsonValue(toJson.convert(input)); return this; } catch (IOException e) { throw new UncheckedIOException(e); } } public JsonOutput beginObject() { try { jsonWriter.beginObject(); return this; } catch (IOException e) { throw new UncheckedIOException(e); } } public JsonOutput endObject() { try { jsonWriter.endObject(); return this; } catch (IOException e) { throw new UncheckedIOException(e); } } public JsonOutput name(String name) { try { jsonWriter.name(name); return this; } catch (IOException e) { throw new UncheckedIOException(e); } } public JsonOutput beginArray() { try { jsonWriter.beginArray(); return this; } catch (IOException e) { throw new UncheckedIOException(e); } } public JsonOutput endArray() { try { jsonWriter.endArray(); return this; } catch (IOException e) { throw new UncheckedIOException(e); } } }
[ "simon.m.stewart@gmail.com" ]
simon.m.stewart@gmail.com
c110c41efc104c8ead83983528ad3654bd751eeb
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/139/797/CWE470_Unsafe_Reflection__listen_tcp_01.java
41e765dec466267ffd211a3d8a184c6a4e67264a
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
4,849
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE470_Unsafe_Reflection__listen_tcp_01.java Label Definition File: CWE470_Unsafe_Reflection.label.xml Template File: sources-sink-01.tmpl.java */ /* * @description * CWE: 470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') * BadSource: listen_tcp Read data using a listening tcp connection * GoodSource: Set data to a hardcoded class name * BadSink: Instantiate class named in data * Flow Variant: 01 Baseline * * */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.Socket; import java.net.ServerSocket; import java.util.logging.Level; public class CWE470_Unsafe_Reflection__listen_tcp_01 extends AbstractTestCase { /* uses badsource and badsink */ public void bad() throws Throwable { String data; data = ""; /* Initialize data */ /* Read data using a listening tcp connection */ { ServerSocket listener = null; Socket socket = null; BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; /* Read data using a listening tcp connection */ try { listener = new ServerSocket(39543); socket = listener.accept(); /* read input from socket */ readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data using a listening tcp connection */ data = readerBuffered.readLine(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } /* Close socket objects */ try { if (socket != null) { socket.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO); } try { if (listener != null) { listener.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ServerSocket", exceptIO); } } } /* POTENTIAL FLAW: Instantiate object of class named in data (which may be from external input) */ Class<?> tempClass = Class.forName(data); Object tempClassObject = tempClass.newInstance(); IO.writeLine(tempClassObject.toString()); /* Use tempClassObject in some way */ } public void good() throws Throwable { goodG2B(); } /* goodG2B() - uses goodsource and badsink */ private void goodG2B() throws Throwable { String data; /* FIX: Use a hardcoded class name */ data = "Testing.test"; /* POTENTIAL FLAW: Instantiate object of class named in data (which may be from external input) */ Class<?> tempClass = Class.forName(data); Object tempClassObject = tempClass.newInstance(); IO.writeLine(tempClassObject.toString()); /* Use tempClassObject in some way */ } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
db1cd420fb0f5addb1287b8a29627c1b9b53e5ec
37c11a7fa33e0461dc2c19ffdbd0c50014553b15
/app_patient/src/main/java/com/kmwlyy/patient/module/signagreenment/SignAgreenmentActivity.java
4737e9061210f0471b1729c4072d79ded905fc56
[]
no_license
SetAdapter/KMYYAPP
5010d4e8a3dd60240236db15b34696bb443914b7
57eeba04cb5ae57911d1fa47ef4b2320eb1f9cbf
refs/heads/master
2020-04-23T13:56:33.078507
2019-02-18T04:39:40
2019-02-18T04:39:40
171,215,008
0
2
null
null
null
null
UTF-8
Java
false
false
1,032
java
package com.kmwlyy.patient.module.signagreenment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.kmwlyy.patient.R; /** * Created by Administrator on 2017/8/8. */ public class SignAgreenmentActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sign_agreenment); TextView tv_title_center = (TextView) findViewById(R.id.tv_title_center); tv_title_center.setText("签约须知"); Button iv_tools_left = (Button) findViewById(R.id.iv_tools_left); iv_tools_left.setText("取消"); iv_tools_left.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { finish(); } }); } }
[ "383411934@qq.com" ]
383411934@qq.com
b1358ab07d6967e47218c0e106b9b7a6513e95d2
7a33586ec57bf0c2f927d694c33894af6d4c5f53
/hrbm-service/src/main/java/com/xunfeng/business/person/interf/PersonJobRegistServiceInter.java
395fceeeea6d0ea8e91061ad659b3631e38140b0
[]
no_license
zhang765959964/hrbm
c86b8b8f1cbd159bee4b35d1068afdc34b16f1d8
d034c43516f92e8433016ec4db3d910cc5d06881
refs/heads/master
2021-05-11T23:39:36.723156
2018-01-15T08:40:02
2018-01-15T08:40:02
117,515,559
1
0
null
null
null
null
UTF-8
Java
false
false
3,300
java
package com.xunfeng.business.person.interf; import java.sql.Timestamp; import java.util.List; import java.util.Map; import com.xunfeng.business.person.model.PersonJobRegist; import com.xunfeng.core.db.ResultData; import com.xunfeng.core.page.PageBean; import com.xunfeng.core.service.GenericServiceInterface; import com.xunfeng.core.web.query.QueryFilter; /** * <pre> * 对象功能:个人求职登记表 Service类 * 开发公司:河南讯丰信息技术有限公司 * 开发人员:wanghan * 创建时间:2015-07-21 15:59:03 * </pre> */ public interface PersonJobRegistServiceInter extends GenericServiceInterface<PersonJobRegist,Long> { public PersonJobRegist getPersonJobRegist(Long aac001); public List<Map> getLikeJob(QueryFilter queryFilter) ; public ResultData<Map> getResultDataLikeJob(QueryFilter queryFilter,Long ccmu01,Long aac001); public List<Map> getPersonResume(QueryFilter queryFilter); /**获取个人求职意向详情,并封装为Map返回 * @param aac001 个人id * @param ccmc01 当前登录人Id * @return */ public Map getPersonMap(Long aac001,Long ccmc01); //获得个人求职详情并判断是不是已经加入人才库和发送了面试邀请 public Map getPersonCollectionAndMianShiMap(Long aac001,Long ccmc01,Long acb210); public ResultData<Map> getResultDataPersonResume(PageBean pageBean,Map param); /** * * 通过个人编号获得求职登记信息 */ public Map<String,Object> getJobRegistByPersonId (Long aac001); /** * * 通过个人编号获得有效的求职登记信息 */ public Map<String,Object> getValidJobRegistByPersonId(Long aac001); /** * 刷新简历 */ public void refreshJobRegist (Long acc200, Timestamp date); /** * 更新个人信息时更新简历信息 */ public void updateJobRegist (Long aac001,Long aac0d0); /** * 更新简历状态和个人基本信息 * @param personJobRegist * @param personId * @param resumeState */ public void updateJobRegistState(PersonJobRegist personJobRegist , long personId,int resumeState); /** * 求职信息视图查询 * @param fiter * @return */ public ResultData<Map<String,Object>> getPersonRegistViewList(QueryFilter fiter); /** * 个人求职统计查询 * @param fiter 检索条件 * @return 分页数据 */ public ResultData<Map<String,Object>> getJobregStatistics(QueryFilter fiter); /** * 根据个人Id获取所有的求职登记信息 * @param fiter 检索条件 * @return 分页数据 */ public ResultData<PersonJobRegist> getAllByFilter(QueryFilter fiter); /** * 根据个人Id获取有效的求职登记信息(去实体类数据) * @time2016-08-10 * wanlupeng * @return */ public PersonJobRegist getByPersonId(Long aac001); /** * 根据个人ID查询求职登记详情 * @param aac001 个人登记编号 * @return 求职登记详 */ public Map<String,Object> getJobRegistMapByPersonId(Long aac001); /** * 查询有效的求职登记信息中意向职位是否重复 * @time2016-08-10 * wanlupeng * @return */ public PersonJobRegist getIsExist(Long aac001,Long bca111); }
[ "zhang765959964@qq.com" ]
zhang765959964@qq.com
bf4f2c1de6716eaa0401974ec55ead7379c997c0
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE789_Uncontrolled_Mem_Alloc/s03/CWE789_Uncontrolled_Mem_Alloc__URLConnection_HashMap_02.java
ac08b00e8e4d49babf5591246acefce7dac72492
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
6,144
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE789_Uncontrolled_Mem_Alloc__URLConnection_HashMap_02.java Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml Template File: sources-sink-02.tmpl.java */ /* * @description * CWE: 789 Uncontrolled Memory Allocation * BadSource: URLConnection Read data from a web server with URLConnection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * BadSink: HashMap Create a HashMap using data as the initial size * Flow Variant: 02 Control flow: if(true) and if(false) * * */ package testcases.CWE789_Uncontrolled_Mem_Alloc.s03; import testcasesupport.*; import javax.servlet.http.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.URL; import java.net.URLConnection; import java.util.logging.Level; import java.util.HashMap; public class CWE789_Uncontrolled_Mem_Alloc__URLConnection_HashMap_02 extends AbstractTestCase { /* uses badsource and badsink */ public void bad() throws Throwable { int data; if (true) { data = Integer.MIN_VALUE; /* Initialize data */ /* read input from URLConnection */ { URLConnection urlConnection = (new URL("http://www.example.org/")).openConnection(); BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(urlConnection.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from a web server with URLConnection */ /* This will be reading the first "line" of the response body, * which could be very long if there are no newlines in the HTML */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Integer.parseInt(stringNumber.trim()); } catch (NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } } } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } /* POTENTIAL FLAW: Create a HashMap using data as the initial size. data may be very large, creating memory issues */ HashMap intHashMap = new HashMap(data); } /* goodG2B1() - use goodsource and badsink by changing true to false */ private void goodG2B1() throws Throwable { int data; if (false) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } else { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } /* POTENTIAL FLAW: Create a HashMap using data as the initial size. data may be very large, creating memory issues */ HashMap intHashMap = new HashMap(data); } /* goodG2B2() - use goodsource and badsink by reversing statements in if */ private void goodG2B2() throws Throwable { int data; if (true) { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } /* POTENTIAL FLAW: Create a HashMap using data as the initial size. data may be very large, creating memory issues */ HashMap intHashMap = new HashMap(data); } public void good() throws Throwable { goodG2B1(); goodG2B2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "you@example.com" ]
you@example.com
d2f1af8bcd9be2fb7f7e3a585d08156998b65c72
84e064c973c0cc0d23ce7d491d5b047314fa53e5
/latest9.6/hej/net/sf/saxon/functions/Empty.java
7cac258a6484f05cd137a5b592346603cd649b29
[]
no_license
orbeon/saxon-he
83fedc08151405b5226839115df609375a183446
250c5839e31eec97c90c5c942ee2753117d5aa02
refs/heads/master
2022-12-30T03:30:31.383330
2020-10-16T15:21:05
2020-10-16T15:21:05
304,712,257
1
1
null
null
null
null
UTF-8
Java
false
false
6,269
java
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014 Saxonica Limited. // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package net.sf.saxon.functions; import com.saxonica.ee.bytecode.EmptyCompiler; import com.saxonica.ee.bytecode.ExpressionCompiler; import com.saxonica.ee.stream.adjunct.EmptyAdjunct; import net.sf.saxon.expr.*; import net.sf.saxon.expr.parser.ContextItemStaticInfo; import net.sf.saxon.expr.parser.ExpressionTool; import net.sf.saxon.expr.parser.ExpressionVisitor; import net.sf.saxon.expr.parser.Token; import net.sf.saxon.om.Sequence; import net.sf.saxon.om.SequenceIterator; import net.sf.saxon.trans.XPathException; import net.sf.saxon.tree.iter.LookaheadIterator; import net.sf.saxon.value.BooleanValue; /** * Implementation of the fn:exists function */ public class Empty extends Aggregate implements Negatable { public int getImplementationMethod() { return super.getImplementationMethod() | WATCH_METHOD; } /** * Check whether this specific instance of the expression is negatable * * @return true if it is */ public boolean isNegatable(ExpressionVisitor visitor) { return true; } /** * Return the negation of the expression * * @return the negation of the expression */ public Expression negate() { FunctionCall fc = SystemFunctionCall.makeSystemFunction("exists", getArguments()); ExpressionTool.copyLocationInfo(this, fc); return fc; } /** * Perform optimisation of an expression and its subexpressions. * <p/> * <p>This method is called after all references to functions and variables have been resolved * to the declaration of the function or variable, and after all type checking has been done.</p> * * @param visitor an expression visitor * @param contextItemType the static type of "." at the point where this expression is invoked. * The parameter is set to null if it is known statically that the context item will be undefined. * If the type of the context item is not known statically, the argument is set to * {@link net.sf.saxon.type.Type#ITEM_TYPE} * @return the original expression, rewritten if appropriate to optimize execution * @throws net.sf.saxon.trans.XPathException * if an error is discovered during this phase * (typically a type error) */ /*@NotNull*/ public Expression optimize(/*@NotNull*/ ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException { Expression e2 = super.optimize(visitor, contextItemType); if (e2 != this) { return e2; } // See if we can deduce the answer from the cardinality int c = argument[0].getCardinality(); if (c == StaticProperty.ALLOWS_ONE_OR_MORE) { return Literal.makeLiteral(BooleanValue.FALSE, getContainer()); } else if (c == StaticProperty.ALLOWS_ZERO) { return Literal.makeLiteral(BooleanValue.TRUE, getContainer()); } argument[0] = argument[0].unordered(false, false); // Rewrite // empty(A|B) => empty(A) and empty(B) if (argument[0] instanceof VennExpression) { VennExpression v = (VennExpression) argument[0]; if (v.getOperator() == Token.UNION && !visitor.isOptimizeForStreaming()) { FunctionCall e0 = SystemFunctionCall.makeSystemFunction("empty", new Expression[]{v.getOperands()[0]}); FunctionCall e1 = SystemFunctionCall.makeSystemFunction("empty", new Expression[]{v.getOperands()[1]}); return new AndExpression(e0, e1).optimize(visitor, contextItemType); } } return this; } /** * Evaluate the function */ public BooleanValue evaluateItem(XPathContext context) throws XPathException { return BooleanValue.get(effectiveBooleanValue(context)); } /** * Evaluate the function in a boolean context */ public boolean effectiveBooleanValue(XPathContext c) throws XPathException { SequenceIterator iter = argument[0].iterate(c); boolean result; if ((iter.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { result = !((LookaheadIterator) iter).hasNext(); } else { result = iter.next() == null; } iter.close(); return result; } /** * Evaluate the expression * * @param context the dynamic evaluation context * @param arguments the values of the arguments, supplied as Sequences * @return the result of the evaluation, in the form of a Sequence * @throws net.sf.saxon.trans.XPathException * if a dynamic error occurs during the evaluation of the expression */ public BooleanValue call(XPathContext context, Sequence[] arguments) throws XPathException { return BooleanValue.get(arguments[0].head() == null); } //#ifdefined BYTECODE /** * Return the compiler of the Empty expression * * @return the relevant ExpressionCompiler */ @Override public ExpressionCompiler getExpressionCompiler() { return new EmptyCompiler(); } /** * Get a class that supports streamed evaluation of this expression * * @return the relevant StreamingAdjunct, or null if none is available */ @Override public EmptyAdjunct getStreamingAdjunct() { return new EmptyAdjunct(); } //#endif }
[ "oneil@saxonica.com" ]
oneil@saxonica.com
8eed9a042283541ea3ddbd40253a3b6c88a9168d
4ce2ba393712da29cbc212ec92b8049cb69783b4
/src/main/java/net/bither/viewsystem/base/renderer/CurrencyCenterJustifiedWithRightBorderRenderer.java
e8c898e616d03e5dabf0b3974ceb5f6299e4a750
[ "Apache-2.0" ]
permissive
bitwolaiye/bither-desktop-java
11a5172c17a154101fcafdfdf5dae2dfb375b1f6
b3847a4766c49d96859cc62f199ab5bfd350ab4f
refs/heads/master
2020-12-28T21:05:20.688228
2015-01-07T05:34:49
2015-01-07T05:34:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,503
java
package net.bither.viewsystem.base.renderer; /** * Created by nn on 14-11-10. */ import net.bither.viewsystem.base.BitherLabel; import net.bither.viewsystem.base.ColorAndFontConstants; import net.bither.viewsystem.base.FontSizer; import net.bither.viewsystem.themes.Themes; import javax.swing.*; import javax.swing.table.DefaultTableCellRenderer; import java.awt.*; public class CurrencyCenterJustifiedWithRightBorderRenderer extends DefaultTableCellRenderer { private static final long serialVersionUID = 9949545L; private int moduloRow = 0; public CurrencyCenterJustifiedWithRightBorderRenderer(int moduloRow){ this.moduloRow=moduloRow; } BitherLabel label = new BitherLabel(""); @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { label.setHorizontalAlignment(SwingConstants.CENTER); label.setBackground(Themes.currentTheme.detailPanelBackground()); label.setOpaque(true); label.setText((String) value); label.setFont(FontSizer.INSTANCE.getAdjustedDefaultFontWithDelta(-1)); Color backgroundColor = (row % 2 == moduloRow ?Themes.currentTheme.detailPanelBackground() :Themes.currentTheme.detailPanelBackground()); label.setBackground(backgroundColor); label.setForeground(table.getForeground()); return label; } }
[ "woaf1003@gmail.com" ]
woaf1003@gmail.com
7777dddfff526202fc36c28524e61a07180a73eb
ebdcaff90c72bf9bb7871574b25602ec22e45c35
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/FeedItemService.java
b85f058fa49434263a15df15f13d2d7c599bf294
[ "Apache-2.0" ]
permissive
ColleenKeegan/googleads-java-lib
3c25ea93740b3abceb52bb0534aff66388d8abd1
3d38daadf66e5d9c3db220559f099fd5c5b19e70
refs/heads/master
2023-04-06T16:16:51.690975
2018-11-15T20:50:26
2018-11-15T20:50:26
158,986,306
1
0
Apache-2.0
2023-04-04T01:42:56
2018-11-25T00:56:39
Java
UTF-8
Java
false
false
1,255
java
// Copyright 2018 Google LLC // // 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. /** * FeedItemService.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201809.cm; public interface FeedItemService extends javax.xml.rpc.Service { public java.lang.String getFeedItemServiceInterfacePortAddress(); public com.google.api.ads.adwords.axis.v201809.cm.FeedItemServiceInterface getFeedItemServiceInterfacePort() throws javax.xml.rpc.ServiceException; public com.google.api.ads.adwords.axis.v201809.cm.FeedItemServiceInterface getFeedItemServiceInterfacePort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
79672cbcc670e1d7a7f27da7224a9c76291e81ef
40426d7fc13d36c7be0ff4c29bfc432d799d98af
/extra/ksim_src/edu/wsu/KheperaSimulator/RobotControllerDirector.java
ec5bc6004198cc67f65d57d99416b84792f6f56b
[]
no_license
linstar4067/khepera-1
72c033f679552709195857ec1cef963131b7ea2f
1fc8e8c61ee3e3179fd2b4494200686ee79728a9
refs/heads/master
2021-01-13T13:38:51.433853
2016-10-22T11:39:26
2016-10-22T11:39:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,349
java
/** * @(#)RobotControllerDirector.java 1.1 2002/10/13 * * Copyright Brian Potchik. All Rights Reserved. * * This file is part of the WSU Khepera Simulator. * * This file may be distributed under the terms of the Q Public License * as defined by Trolltech AS of Norway and appearing in the file * WSU_Khepera_Sim_license.txt included in the packaging of this file. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * For information on the Q Public License see: * http://www.opensource.org/licenses/qtpl.php * * For information on the WSU Khepera Simulator see: * http://gozer.cs.wright.edu and follow the links. * * Contact robostaff@gozer.cs.wright.edu if any conditions of this licensing are * not clear to you. */ package edu.wsu.KheperaSimulator; import java.io.*; import java.util.ArrayList; import java.util.HashMap; import java.util.StringTokenizer; import javax.swing.JOptionPane; /** * A <code>RobotControllerDirector</code> is a utility class used to load, manage, and unload controllers that extend <code>RobotController</code>. */ public class RobotControllerDirector { /** * A hash of the loaded controllers by controller name. */ private HashMap controllers; /** * The path of where controllers should reside with respect to the current working directory of the Khepera Simulator. The default location where * controllers should be placed is in "./controllers/". For example if the simulator is running from the directory "c:\KheperaSimulator\", then the * controller class files would be located in "c:\KheperaSimulator\controllers\". */ private final String controllerPathName = "./controllers/"; /** * A <code>String</code> array of all controllers available. */ private String[] controllerNames; /** * A reference to the current robot state which is passed to each controller. */ private CurrentRobotState currentRobotState = null; private long controllerThreadWaitTime = 20; /** * Initialize and create a new <code>RobotControllerDirector</code>. The availiable controllers will be discovered and made available. * * @param currentRobotState * a reference that allows access to the robot accessor methods. */ public RobotControllerDirector(CurrentRobotState currentRobotState) { this.currentRobotState = currentRobotState; controllers = new HashMap(); findControllers(); } /** * Find the available controllers that can be loaded and update the hashmap if needed. */ private void findControllers() { try { File directory = new File(controllerPathName); controllerNames = null; controllerNames = directory.list(new ClassFileFilter()); for (int i = 0; i < controllerNames.length; i++) { controllerNames[i] = (new StringTokenizer(controllerNames[i], ".", false)).nextToken(); if (!controllers.containsKey(controllerNames[i])) { controllers.put(controllerNames[i], null); } } } catch (Exception e) { } } /** * Return a <code>String</code> array of the controllers available to the application. * * @return the controller names */ protected String[] availableControllers() { findControllers(); return controllerNames; } /** * Start the controller and return <tt>true</tt> if the controller started successfully. Only one instance of a particular controller can be loaded at one * time. If the controller is already loaded or it failed to load, this method will return false. * * @param controllerName * the name of the controller to load * @return <tt>true</tt> on success; <tt>false</tt> otherwise. */ protected boolean startController(String controllerName) { RobotController controller = (RobotController) controllers.get(controllerName); if (controller != null) { return false; } try { Class c = Class.forName(controllerName, true, new DirectoryClassLoader(controllerPathName)); controller = (RobotController) c.newInstance(); controllers.put(controllerName, controller); controller.initialize(controllerName, currentRobotState, controllerThreadWaitTime); controller.simStart(); return true; } catch (java.lang.ClassNotFoundException ex) { JOptionPane.showMessageDialog(null, "The module class could not be found", "Class not Found", JOptionPane.ERROR_MESSAGE); } catch (Exception e) { e.printStackTrace(); } return false; } // loadController /** * Stop a running controller. The controller is not guarenteed to terminate immediatly. The controller is simply informed that it is time to finish. The * controller will then terminate itself when a safe state is reached. * * @param controllerName * the name of the controller to stop */ protected void stopController(String controllerName) { RobotController controller = (RobotController) controllers.get(controllerName); if (controller == null) return; controller.setFinished(true); // tell the controller to terminate gracefully controllers.put(controllerName, null); } /** * Terminate all controllers. */ protected void stopAll() { for (int i = 0; i < controllerNames.length; i++) { stopController(controllerNames[i]); } } /** * Provide a list of the running controllers. * * @return a list of controllers that are currently running */ protected ArrayList runningControllers() { ArrayList list = new ArrayList(); RobotController c = null; for (int i = 0; i < controllerNames.length; i++) { c = (RobotController) controllers.get(controllerNames[i]); if (c != null) { list.add(new String(controllerNames[i])); } } return list; } } // RobotControllerDirector /** * A <code>FilenameFilter</code> class used to filter a directory to only see class files. * * Filter modified to exclude class files that contain the $ character */ class ClassFileFilter implements FilenameFilter { @Override public boolean accept(File dir, String name) { if (name.indexOf('$') > -1) return false; StringTokenizer tokenizer = new StringTokenizer(name, ".", false); String ext = null; while (tokenizer.hasMoreTokens()) { ext = tokenizer.nextToken(); } if (ext.equals("class")) { return true; } return false; } } // ClassFileFilter
[ "mail@habitats.no" ]
mail@habitats.no
8de73f0861e4be42275903005ea029243a454098
b1d85ee852462da15e46175a16d8b9c98f705e8e
/src/main/java/com/cap10mycap10/config/Constants.java
b96ddf89549bcf633f8e62667b71583afeb321f8
[]
no_license
cap10/jhipster-sample-application
66b88521af512d43474a41ab0ae7fc9b8ad15c92
dd0e793a7c4468d4e9b57128c5eef172a29b6705
refs/heads/master
2022-12-10T23:12:31.965987
2020-08-29T10:42:09
2020-08-29T10:42:09
291,251,361
0
0
null
null
null
null
UTF-8
Java
false
false
187
java
package com.cap10mycap10.config; /** * Application constants. */ public final class Constants { public static final String SYSTEM_ACCOUNT = "system"; private Constants() {} }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5fca348682efb2e2dafd2513e9cb5cdca1d859c6
bdaa35b0ea7472d4fb0bdd8fce289dcb2833b2e4
/src/main/java/org/mikeneck/graalvm/config/task/WriteObjectOperation.java
c34a8a4ac88d2c56e8198530c5eccb5fa1f865ef
[ "Apache-2.0" ]
permissive
mike-neck/graalvm-native-image-plugin
bad1d1a1b8a276c5c9679602dc855af41e1d36b2
561c90e3fb1338e73abd85a211bd0c525d66fd84
refs/heads/master
2021-12-29T21:45:00.838824
2021-06-04T02:23:47
2021-06-04T02:23:47
220,639,723
96
15
Apache-2.0
2021-12-22T09:38:24
2019-11-09T12:34:58
Java
UTF-8
Java
false
false
250
java
package org.mikeneck.graalvm.config.task; import java.io.IOException; import org.jetbrains.annotations.NotNull; public interface WriteObjectOperation<T> { void write(@NotNull UnCloseableOutputStream out, @NotNull T object) throws IOException; }
[ "jkrt3333@gmail.com" ]
jkrt3333@gmail.com
2868f7bc4449973595b833e8247810e6f8f67767
8c69d5080dee0d09acd42255173df1c3907fc3a4
/solutions/inheritanceattributes/src/test/java/inheritanceattributes/order/ShippedBookTestBonus.java
d02cbdca77040dd9718b8ec4e33bbe18dbc2aef8
[]
no_license
edoom/strukturavalto-java-public
2ec2a1f77916b5b01ddd4189c0c19d6356b648f2
d1df0fa29942c69ed28744ecb2a6334f67f8de2d
refs/heads/master
2023-01-08T17:18:18.119783
2020-10-22T10:05:16
2020-10-22T10:05:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package inheritanceattributes.order; import org.junit.Test; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; public class ShippedBookTestBonus { @Test public void purchaseTest() { //Given ShippedBook book = new ShippedBook("Gyűrűk ura", 3000, 1200); //Then assertThat(book.purchase(2), equalTo(6000)); } }
[ "viczian.istvan@gmail.com" ]
viczian.istvan@gmail.com
fb587a703c91118ee857de498dfff7271abf3f51
376e849705ea05d6f271a919f32c93e72690f0ad
/leasing-identity-parent/leasing-identity-service/src/main/java/com/cloudkeeper/leasing/identity/repository/RoleMenuRepository.java
c52a87519ec1b4d6c9ae9573dada58f534735882
[]
no_license
HENDDJ/EngineeringApi
314198ce8b91212b1626decde2df1134cb1863c8
3bcc2051d2877472eda4ac0fce42bee81e81b0be
refs/heads/master
2020-05-16T03:41:05.335371
2019-07-31T08:21:57
2019-07-31T08:21:57
182,734,226
0
0
null
null
null
null
UTF-8
Java
false
false
1,507
java
package com.cloudkeeper.leasing.identity.repository; import com.cloudkeeper.leasing.identity.domain.RoleMenu; import com.cloudkeeper.leasing.base.repository.BaseRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import javax.annotation.Nonnull; import java.util.List; /** * 角色菜单 repository * @author jerry */ @Repository public interface RoleMenuRepository extends BaseRepository<RoleMenu> { /** * 查询列表 根据角色id * @param roleId 角色id * @return 角色菜单关系列表 */ @Nonnull List<RoleMenu> findAllByRoleIdOrderByCreatedAtAsc(@Nonnull String roleId); /** * 查询列表 根据角色id * @param roleId 角色id * @return 角色菜单关系列表 */ @Nonnull List<RoleMenu> findAllByRoleIdOrderBySysRoutesCreatedAtAsc(@Nonnull String roleId); /** * 删除角色与菜单的关系 * @param roleId 角色id */ void deleteAllByRoleId(@Nonnull String roleId); /** * 获取用户的所有菜单集合 * @return 菜单集合 */ // @Nonnull // @Query("select distinct cirm.menuCode from RoleMenu cirm where exists (select 'X' from OrganizationRole cior where cirm.roleId = cior.roleId and exists (select 'X' from PrincipalOrganization cipo where cipo.organizationId = cior.organizationId and cipo.principalId = ?1))") // List<String> findAllMenuCodeByPrincipalId(@Nonnull String principalId); }
[ "243485908@qq.com" ]
243485908@qq.com
7d094aef43d3e0dbed2064569bcd905b74642ed6
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/bass/BAS0230U00GrdBas0230Handler.java
23466aa0b5c71efff7d13ac537539cf5b0adbc18
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,695
java
package nta.med.service.ihis.handler.bass; import java.util.List; import javax.annotation.Resource; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.vertx.java.core.Vertx; import nta.med.core.utils.BeanUtils; import nta.med.data.dao.medi.bas.Bas0230Repository; import nta.med.data.model.ihis.adma.BAS0230U00GrdBAS0230Info; import nta.med.core.infrastructure.socket.handler.ScreenHandler; import nta.med.service.ihis.proto.BassServiceProto; import nta.med.service.ihis.proto.BassServiceProto.BAS0230U00GrdBas0230Request; import nta.med.service.ihis.proto.BassServiceProto.BAS0230U00GrdBas0230Response; import nta.med.service.ihis.proto.CommonModelProto; @Service @Scope("prototype") public class BAS0230U00GrdBas0230Handler extends ScreenHandler<BassServiceProto.BAS0230U00GrdBas0230Request, BassServiceProto.BAS0230U00GrdBas0230Response> { private static final Log LOGGER = LogFactory.getLog(BAS0230U00GrdBas0230Handler.class); @Resource private Bas0230Repository bas0230Repository; @Override @Transactional(readOnly = true) public BAS0230U00GrdBas0230Response handle(Vertx vertx, String clientId, String sessionId, long contextId, BAS0230U00GrdBas0230Request request) throws Exception { BassServiceProto.BAS0230U00GrdBas0230Response.Builder response = BassServiceProto.BAS0230U00GrdBas0230Response.newBuilder(); List<BAS0230U00GrdBAS0230Info> listItem = bas0230Repository.getBAS0230U00GrdBAS0230(getHospitalCode(vertx, sessionId), getLanguage(vertx, sessionId), request.getStartYmd()); if (!CollectionUtils.isEmpty(listItem)) { for (BAS0230U00GrdBAS0230Info item : listItem) { CommonModelProto.BAS0230U00GrdBAS0230Info.Builder info = CommonModelProto.BAS0230U00GrdBAS0230Info.newBuilder(); BeanUtils.copyProperties(item, info, getLanguage(vertx, sessionId)); response.addGrdBas0230Info(info); } } return response.build(); } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
0e66d95e5088db252462def83d1d22e84d7ec225
6f559135d1c0814dd4e520e49093de9db06ab171
/src/main/java/zen/chapter17/common/ConcreteDecorator1.java
2034b39f4a4c5f6957d980aa85a0674d9f0aeac5
[]
no_license
sBobHuang/Design-Patterns
c3b2885a05f7cd270a91caebfcecb935935b3c4d
ab0aaa0bb8cff8d31c56ecd648bb254b8de0501c
refs/heads/master
2022-04-27T23:17:11.366601
2020-04-30T07:32:59
2020-04-30T07:32:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
package zen.chapter17.common; /** * @author xiangdotzhaoAtwoqutechcommacom * @date 2019/10/23 */ public class ConcreteDecorator1 extends Decorator { public ConcreteDecorator1(Component component) { super(component); } private void method1() { System.out.println("method1 修饰"); } @Override public void operate() { this.method1(); super.operate(); } }
[ "xiangflight@foxmail.com" ]
xiangflight@foxmail.com
b6f0d8a838c08c38cc73ad9ecb845fd2f5309657
1f0a896d12afa98b937f546b352046deef3326fd
/src/test/java/edu/msstate/nsparc/wings/integration/tests/trade/trainingWaivers/TC_17_01_Training_Waivers_Create_Ineligible_Participant_With_Ineligible_Reasons.java
3703137d40a9b752645ae11e4b491c57e5400689
[]
no_license
allaallala/wings_maven
8e3f2fc9e9a789664b4f4ccf4e506895cf595853
8f33c3cb567ffde08921e22a91d8dc75efbc97cb
refs/heads/master
2022-01-26T06:30:26.290273
2019-06-04T13:12:17
2019-06-04T13:12:17
190,203,243
0
0
null
null
null
null
UTF-8
Java
false
false
3,944
java
package edu.msstate.nsparc.wings.integration.tests.trade.trainingWaivers; import edu.msstate.nsparc.wings.integration.base.BaseWingsTest; import edu.msstate.nsparc.wings.integration.enums.Buttons; import edu.msstate.nsparc.wings.integration.enums.Popup; import edu.msstate.nsparc.wings.integration.enums.Roles; import edu.msstate.nsparc.wings.integration.forms.menu.WingsTopMenu; import edu.msstate.nsparc.wings.integration.forms.trainingWaiver.TrainingWaiverCreationForm; import edu.msstate.nsparc.wings.integration.forms.trainingWaiver.TrainingWaiverSearchForm; import edu.msstate.nsparc.wings.integration.models.trade.TradeEnrollment; import edu.msstate.nsparc.wings.integration.steps.BaseNavigationSteps; import edu.msstate.nsparc.wings.integration.steps.BaseWingsSteps; import edu.msstate.nsparc.wings.integration.storage.TradeEnrollmentObjects; import edu.msstate.nsparc.xray.info.TestCase; import framework.CommonFunctions; /** * Created by a.vnuchko on 01.07.2015. * Creating of ineligible participant with ineligible reasons (Create Training Waiver:- with a few marked check boxes) */ @TestCase(id = "WINGS-10903") public class TC_17_01_Training_Waivers_Create_Ineligible_Participant_With_Ineligible_Reasons extends BaseWingsTest { String type = "some"; String other = "other"; public void main(){ makeActions(type); } /** * Make actions * @param type - training waiver type */ public void makeActions(String type){ TradeEnrollment tradeEnrollment = TradeEnrollmentObjects.getCreatedTradeEnrollment(); logStep("Log in as Staff and open Training Waiver creation form"); BaseWingsSteps.openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_TRADE_TRAINING_WAIVERS, Popup.Create); logStep("Input valid participant and select valid trade enrollment"); TrainingWaiverCreationForm waiverPage = new TrainingWaiverCreationForm(); waiverPage.selectParticipantAndTradeEnrollment(tradeEnrollment.getParticipant()); logStep("Select 'Ineligible' radio button in the 'Is this participant eligible?' string"); waiverPage.clickIneligible(); logStep("Create Training Waiver:- with a few marked check boxes"); createType(type); logResult("A new Training Waiver was created and contains the same data you have entered"); finalAction(tradeEnrollment); } /** * Create some training waiver using different types (few checkbox, all checkbox, without checkbox chosen) * @param type type */ private void createType(String type){ TrainingWaiverCreationForm waiverPage = new TrainingWaiverCreationForm(); switch (type){ case "some": waiverPage.selectSomeCheckboxType(); break; case "all": waiverPage.selectAllCheckboxType(); break; case "other": waiverPage.inputOtherReason(other); break; default: break; } waiverPage.inputIssueDate(CommonFunctions.getCurrentDate()); waiverPage.clickButton(Buttons.Create); waiverPage.clickButton(Buttons.Done); BaseNavigationSteps.logout(); } /** * some steps to check, that new training waiver is created. * @param enrl trade enrollment */ private void finalAction(TradeEnrollment enrl) { BaseWingsSteps.openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_TRADE_TRAINING_WAIVERS, Popup.Search); TrainingWaiverSearchForm searchPage = new TrainingWaiverSearchForm(); searchPage.selectParticipant(enrl.getParticipant()); searchPage.selectInactivePetition(enrl.getPetition()); searchPage.clickButton(Buttons.Search); searchPage.validateSearchResult(enrl, CommonFunctions.getCurrentDate()); BaseNavigationSteps.logout(); } }
[ "B2eQa&udeg" ]
B2eQa&udeg
61631fc57db931b260473206e2e548ec563ff339
b6178780b1897aab7ee6b427020302622afbf7e4
/src/main/java/org/nfunk/jep/Token.java
5242c49cfa1723307e7881ecfc379c2038f30446
[ "GPL-2.0-only", "MIT" ]
permissive
Pokecube-Development/Pokecube-Core
ea9a22599fae9016f8277a30aee67a913b50d790
1343c86dcb60b72e369a06dd7f63c05103e2ab53
refs/heads/master
2020-03-26T20:59:36.089351
2020-01-20T19:00:53
2020-01-20T19:00:53
145,359,759
5
0
MIT
2019-06-08T22:58:58
2018-08-20T03:07:37
Java
UTF-8
Java
false
false
2,752
java
/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ package org.nfunk.jep; /** * Describes the input token stream. */ public class Token { /** * Returns a new Token object, by default. However, if you want, you * can create and return subclass objects based on the value of ofKind. * Simply add the cases to the switch for all those special cases. * For example, if you have a subclass of Token called IDToken that * you want to create if ofKind is ID, simlpy add something like : * * case MyParserConstants.ID : return new IDToken(); * * to the following switch statement. Then you can cast matchedToken * variable to the appropriate type and use it in your lexical actions. */ public static final Token newToken(int ofKind) { switch(ofKind) { default : return new Token(); } } /** * An integer that describes the kind of this token. This numbering * system is determined by JavaCCParser, and a table of these numbers is * stored in the file ...Constants.java. */ public int kind; /** * beginLine and beginColumn describe the position of the first character * of this token; endLine and endColumn describe the position of the * last character of this token. */ public int beginLine, beginColumn, endLine, endColumn; /** * The string image of the token. */ public String image; /** * A reference to the next regular (non-special) token from the input * stream. If this is the last token from the input stream, or if the * token manager has not read tokens beyond this one, this field is * set to null. This is true only if this token is also a regular * token. Otherwise, see below for a description of the contents of * this field. */ public Token next; /** * This field is used to access special tokens that occur prior to this * token, but after the immediately preceding regular (non-special) token. * If there are no such special tokens, this field is set to null. * When there are more than one such special token, this field refers * to the last of these special tokens, which in turn refers to the next * previous special token through its specialToken field, and so on * until the first special token (whose specialToken field is null). * The next fields of special tokens refer to other special tokens that * immediately follow it (without an intervening regular token). If there * is no such token, this field is null. */ public Token specialToken; /** * Returns the image. */ @Override public String toString() { return image; } }
[ "elpatricimo@gmail.com" ]
elpatricimo@gmail.com
b49940a82a7390f4c38c3726a8b26093388f9ef4
daab099e44da619b97a7a6009e9dee0d507930f3
/rt/sun/net/httpserver/TimeSource.java
3c17e963c46d9252f8c5ab2189261e22e3c26cf5
[]
no_license
xknower/source-code-jdk-8u211
01c233d4f498d6a61af9b4c34dc26bb0963d6ce1
208b3b26625f62ff0d1ff6ee7c2b7ee91f6c9063
refs/heads/master
2022-12-28T17:08:25.751594
2020-10-09T03:24:14
2020-10-09T03:24:14
278,289,426
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package sun.net.httpserver; interface TimeSource { long getTime(); } /* Location: D:\tools\env\Java\jdk1.8.0_211\rt.jar!\sun\net\httpserver\TimeSource.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "xknower@126.com" ]
xknower@126.com
f8488ebd11953048308f20834cca69713c34a50f
a1c97755d0a71f78ee43440d35112fce3fce72ad
/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptStringJob.java
381641f38b3010735f39081e31a60bf9b89f1b0a
[ "Apache-2.0" ]
permissive
aslakhellesoy/htmlunit
3611663a7e8ffb703a5a6ba58e3846081aa34199
b8d350e91d3482cf12df9167a31fc8a310ca149f
refs/heads/master
2021-01-19T15:29:04.886414
2011-02-08T21:03:15
2011-02-08T21:03:15
1,324,920
7
2
null
null
null
null
UTF-8
Java
false
false
1,977
java
/* * Copyright (c) 2002-2011 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.javascript.background; import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.html.HtmlPage; /** * A {@link JavaScriptExecutionJob} created from a string of code. * @author Brad Clarke * @version $Revision: 6204 $ */ public class JavaScriptStringJob extends JavaScriptExecutionJob { /** The JavaScript code to execute. */ private final String script_; /** * Creates a new JavaScript execution job, where the JavaScript code to execute is a string. * @param initialDelay the initial amount of time to wait before executing this job * @param period the amount of time to wait between executions of this job (may be <tt>null</tt>) * @param label the label for the job * @param window the window to which the job belongs * @param script the JavaScript code to execute */ public JavaScriptStringJob(final int initialDelay, final Integer period, final String label, final WebWindow window, final String script) { super(initialDelay, period, label, window); script_ = script; } /** {@inheritDoc} */ @Override protected void runJavaScript(final HtmlPage page) { if (script_ == null) { return; } page.executeJavaScriptIfPossible(script_, "JavaScriptStringJob", 1); } }
[ "aslak.hellesoy@gmail.com" ]
aslak.hellesoy@gmail.com
e3082b30d0cca002d0934f7c82d23218f9c8ea74
b9c24d8872b3f1d0168d86ec11293fc3bf9dd734
/template-pattern-app/src/com/techlab/model/Football.java
0136004cd5ad3377db694f9127d228e566865ae6
[]
no_license
deepak-misal/java_design_patterns
24497c1eb784da071f434dd0237159c396d935be
0021f0bd9a98579addbe337b10b2fb0d140f47f9
refs/heads/master
2023-07-09T21:46:15.746052
2021-08-06T04:29:20
2021-08-06T04:29:20
393,247,875
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package com.techlab.model; public class Football extends Game{ @Override void endPlay() { System.out.println("Football Game Finished!"); } @Override void initialize() { System.out.println("Football Game Initialized! Start playing."); } @Override void startPlay() { System.out.println("Football Game Started. Enjoy the game!"); } }
[ "deepak.misal2350@gmail.com" ]
deepak.misal2350@gmail.com
8cf8ba0509955be3483dee6a303a3e4e7e584eb9
f1a85ae8b9d5d9d9a848c4c8d9c2410b9726e194
/driver/app/src/main/java/com/yaoguang/driver/order/adapter/OrderChildAdapterWait.java
e9a6ba31596316daf85e0612eeb682c81d87a3c8
[]
no_license
P79N6A/as
45dc7c76d58cdc62e3e403c9da4a1c16c4234568
a57ee2a3eb2c73cc97c3fb130b8e389899b19d99
refs/heads/master
2020-04-20T05:55:10.175425
2019-02-01T08:49:15
2019-02-01T08:49:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,221
java
package com.yaoguang.driver.order.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import com.yaoguang.driver.R; import com.yaoguang.greendao.entity.Order; /** * 订单列表:待接单 * Created by wly on 2017/5/9. */ public class OrderChildAdapterWait extends OrderChildAdapter { private View mView; public OrderChildAdapterWait(Context context) { super(context); } public class ItemViewHolderCustom extends ItemViewHolder { Button btnAccept; Button btnRefuse; ItemViewHolderCustom(View view) { super(view); mView = view; btnAccept = view.findViewById(R.id.btnAccept); btnRefuse = view.findViewById(R.id.btnRefuse); } } @Override public ItemViewHolder onCreateItemViewHolderCustom(View view) { return new ItemViewHolderCustom(view); } @Override public View onCreateItemViewHolderCustom(ViewGroup parent) { return LayoutInflater.from(parent.getContext()).inflate(R.layout.item_order_wait, parent, false); } @Override public void onItemBtnRegisterClick(View view, ItemViewHolder holder) { } @Override public void onItemBtnAcceptClick(final View view, final ItemViewHolder holder) { view.findViewById(R.id.btnAccept).setOnClickListener(v -> { final int position = holder.getAdapterPosition(); if (position != RecyclerView.NO_POSITION) mOnRecyclerViewItemClickListener.onItemBtnAcceptClick(view, OrderChildAdapterWait.this.getList().get(position), position); }); } @Override public void onItemBtnRefuseClick(final View view, final ItemViewHolder holder) { view.findViewById(R.id.btnRefuse).setOnClickListener(v -> { final int position = holder.getAdapterPosition(); if (position != RecyclerView.NO_POSITION) mOnRecyclerViewItemClickListener.onItemBtnRefuseClick(view, OrderChildAdapterWait.this.getList().get(position), position); }); } @Override public void onBindItemViewHolderCustom(ItemViewHolder itemViewHolder, int position) { ItemViewHolderCustom itemViewHolderCustom = (ItemViewHolderCustom) itemViewHolder; Order order = getItem(position); // 能否拒单(0:非可拒 1:可拒) if (order.getRefusable() == null || order.getRefusable() == 0) itemViewHolderCustom.btnRefuse.setVisibility(View.GONE); else itemViewHolderCustom.btnRefuse.setVisibility(View.VISIBLE); } //按钮点击事件 public interface OnRecyclerViewItemClickListener<Order> { void onItemBtnAcceptClick(View itemView, Order item, int position); void onItemBtnRefuseClick(View itemView, Order item, int position); } private OnRecyclerViewItemClickListener<Order> mOnRecyclerViewItemClickListener = null; public void setOnRecyclerViewItemClickListener(OnRecyclerViewItemClickListener listener) { this.mOnRecyclerViewItemClickListener = listener; } }
[ "254191389@qq.com" ]
254191389@qq.com
e527abdaf37fb29de7f200e73bbab22f49b8923c
f7a25da32609d722b7ac9220bf4694aa0476f7b2
/net/minecraft/world/level/levelgen/feature/EndPodiumFeature.java
bf7e6e7cfe8fa4ce53927e4fff7fafde17895983
[]
no_license
basaigh/temp
89e673227e951a7c282c50cce72236bdce4870dd
1c3091333f4edb2be6d986faaa026826b05008ab
refs/heads/master
2023-05-04T22:27:28.259481
2021-05-31T17:15:09
2021-05-31T17:15:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,173
java
package net.minecraft.world.level.levelgen.feature; import net.minecraft.world.level.block.state.AbstractStateHolder; import java.util.Iterator; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.block.WallTorchBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.core.Direction; import net.minecraft.world.level.LevelWriter; import net.minecraft.world.level.block.Blocks; import net.minecraft.core.Vec3i; import java.util.Random; import net.minecraft.world.level.levelgen.ChunkGeneratorSettings; import net.minecraft.world.level.chunk.ChunkGenerator; import net.minecraft.world.level.LevelAccessor; import net.minecraft.core.BlockPos; public class EndPodiumFeature extends Feature<NoneFeatureConfiguration> { public static final BlockPos END_PODIUM_LOCATION; private final boolean active; public EndPodiumFeature(final boolean boolean1) { super(NoneFeatureConfiguration::deserialize); this.active = boolean1; } @Override public boolean place(final LevelAccessor bhs, final ChunkGenerator<? extends ChunkGeneratorSettings> bxi, final Random random, final BlockPos ew, final NoneFeatureConfiguration cdd) { for (final BlockPos ew2 : BlockPos.betweenClosed(new BlockPos(ew.getX() - 4, ew.getY() - 1, ew.getZ() - 4), new BlockPos(ew.getX() + 4, ew.getY() + 32, ew.getZ() + 4))) { final boolean boolean9 = ew2.closerThan(ew, 2.5); if (boolean9 || ew2.closerThan(ew, 3.5)) { if (ew2.getY() < ew.getY()) { if (boolean9) { this.setBlock(bhs, ew2, Blocks.BEDROCK.defaultBlockState()); } else { if (ew2.getY() >= ew.getY()) { continue; } this.setBlock(bhs, ew2, Blocks.END_STONE.defaultBlockState()); } } else if (ew2.getY() > ew.getY()) { this.setBlock(bhs, ew2, Blocks.AIR.defaultBlockState()); } else if (!boolean9) { this.setBlock(bhs, ew2, Blocks.BEDROCK.defaultBlockState()); } else if (this.active) { this.setBlock(bhs, new BlockPos(ew2), Blocks.END_PORTAL.defaultBlockState()); } else { this.setBlock(bhs, new BlockPos(ew2), Blocks.AIR.defaultBlockState()); } } } for (int integer7 = 0; integer7 < 4; ++integer7) { this.setBlock(bhs, ew.above(integer7), Blocks.BEDROCK.defaultBlockState()); } final BlockPos ew3 = ew.above(2); for (final Direction fb9 : Direction.Plane.HORIZONTAL) { this.setBlock(bhs, ew3.relative(fb9), ((AbstractStateHolder<O, BlockState>)Blocks.WALL_TORCH.defaultBlockState()).<Comparable, Direction>setValue((Property<Comparable>)WallTorchBlock.FACING, fb9)); } return true; } static { END_PODIUM_LOCATION = BlockPos.ZERO; } }
[ "mark70326511@gmail.com" ]
mark70326511@gmail.com
ef05c9f275a80839f9162a1c815f0aed3a1121ad
656ce78b903ef3426f8f1ecdaee57217f9fbc40e
/src/o/_cls1D50.java
ad6108fd59d2e3274a1463483d4cdaead7cebf2f
[]
no_license
zhuharev/periscope-android-source
51bce2c1b0b356718be207789c0b84acf1e7e201
637ab941ed6352845900b9d465b8e302146b3f8f
refs/heads/master
2021-01-10T01:47:19.177515
2015-12-25T16:51:27
2015-12-25T16:51:27
48,586,306
8
10
null
null
null
null
UTF-8
Java
false
false
477
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package o; public final class _cls1D50 extends Enum { public static final int jZ = 1; private static int jx = 5; public static final int ka = 2; public static final int kb = 3; public static final int kc = 4; private static final int kd[] = { 1, 2, 3, 4, 5 }; }
[ "hostmaster@zhuharev.ru" ]
hostmaster@zhuharev.ru
08d638aa84bd87ab88b751c78ff63a6cf054a9c2
7dd0bc318958b5666ee7c30b3e38d440958a6eca
/property/src/main/java/com/modinfodesigns/property/transform/SetPropertyTransform.java
e9ee65ed006174ed823a278f325d0b0571fcd0e2
[ "Apache-2.0" ]
permissive
Shicheng-Guo/modular-informatic-designs
50b0f83ffc1bb3115702269a679c906964fa4bec
15f5ff2abe1aefe9286daaeb7ac00d68e69d761d
refs/heads/master
2023-03-16T17:29:23.430366
2016-10-06T13:36:51
2016-10-06T13:36:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,467
java
package com.modinfodesigns.property.transform; import com.modinfodesigns.property.IProperty; import com.modinfodesigns.property.IPropertyHolder; /** * Sets or Adds a Property to a PropertyHolder. * * @author Ted Sullivan */ public class SetPropertyTransform extends BasePropertyTransform implements IPropertyHolderTransform { private IProperty newProperty; private boolean isAdd = false; public void setProperty( IProperty property ) { System.out.println( "setProperty " + property + " " + property.getValue( ) ); this.newProperty = property; } public void setIsAdd( boolean isAdd ) { this.isAdd = isAdd; } public void setIsAdd( String isAdd ) { this.isAdd = Boolean.parseBoolean( isAdd ); } @Override public IProperty transform( IProperty input ) throws PropertyTransformException { return input; } @Override public IPropertyHolder transformPropertyHolder( IPropertyHolder input ) throws PropertyTransformException { System.out.println( "SetPropertyTransform.transformPropertyHolder..." ); if (newProperty != null) { if (isAdd) { input.addProperty( newProperty.copy() ); } else { System.out.println( "setProperty: " + newProperty.getName( ) + " = " + newProperty.getValue( ) ); input.setProperty( newProperty.copy() ); } } return input; } }
[ "ted.sullivan@lucidworks.com" ]
ted.sullivan@lucidworks.com
f24570e2a6640b3db3537a848262e1dcb64a683d
bff75bc953787f8dee210553916fedf38904a5f5
/unit-tests/src/test/java/com/gs/collections/impl/list/immutable/ImmutableSingletonListTest.java
c785c27ac1291d636dcd0ce2cf7f808c5e7f2235
[ "Apache-2.0" ]
permissive
paulbakker/gs-collections
ded9833a70cdb727026688fe3148527895c1761a
378238ce3b0e13db99b2405e77ed4dd651369bea
refs/heads/master
2020-12-11T07:32:57.596630
2014-09-30T22:58:34
2014-09-30T22:58:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,819
java
/* * Copyright 2011 Goldman Sachs. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gs.collections.impl.list.immutable; import com.gs.collections.api.list.ImmutableList; import org.junit.Test; public class ImmutableSingletonListTest extends AbstractImmutableListTestCase { @Override protected ImmutableList<Integer> classUnderTest() { return new ImmutableSingletonList<Integer>(1); } @Test @Override public void min_null_throws() { // Collections with one element should not throw to emulate the JDK Collections behavior super.min_null_throws(); } @Test @Override public void max_null_throws() { // Collections with one element should not throw to emulate the JDK Collections behavior super.max_null_throws(); } @Test @Override public void min_null_throws_without_comparator() { // Collections with one element should not throw to emulate the JDK Collections behavior super.min_null_throws_without_comparator(); } @Test @Override public void max_null_throws_without_comparator() { // Collections with one element should not throw to emulate the JDK Collections behavior super.max_null_throws_without_comparator(); } }
[ "craig.motlin@gs.com" ]
craig.motlin@gs.com
9d5eab7bca49c38f2757a2314bd0647dc9f2b521
354f50cb9bfe8fbdc626d09971e1508766562408
/Resto/SB12/src/vn/com/hkt/enterprise/ext/entity/ExecutiveOffice.java
5c0b1208da50fa885c51b9a51b386c131adb9142
[]
no_license
duongnguyenhoang103/FileJava
3d94ed3141eae568206973043cce4ddfc9609516
0d38d7761d63f67f2e21a88606fb3a7843ae0a7f
refs/heads/master
2021-01-17T15:06:04.157148
2012-04-11T09:52:45
2012-04-11T09:52:45
3,205,744
0
0
null
null
null
null
UTF-8
Java
false
false
3,404
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package vn.com.hkt.enterprise.ext.entity; import java.lang.reflect.Field; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import org.openide.util.lookup.ServiceProvider; import vn.com.hkt.enterprise.ext.dao.ExecutiveBN; import vn.com.hkt.extension.Installer; import vn.com.hkt.pilot.identity.access.api.IAccessData; import vn.com.hkt.pilot.identity.entitiy.api.IEntity; /** * * @author khangpn */ @Entity @ServiceProvider(service = IEntity.class) public class ExecutiveOffice implements IEntity { public static final String FIELD_EXECUTIVEOFFICE_ID_ACTUAL = "executiveOfficeIdActual"; public static final String FIELD_EXECUTIVEOFFICE_NAME = "executiveOfficeName"; public static final String FIELD_PERSON_ID_ACTUAL = "personIdActual"; public static final String FIELD_MISSION_ID = "missionIdActual"; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; private int executiveOfficeIdActual; private int executiveOfficeName; // 0 là điều hành, 1 là cổ đông //@OneToOne private int personIdActual; //@OneToOne private int missionIdActual; public ExecutiveOffice() { } public ExecutiveOffice(int executiveOfficeIdActual, int executiveOfficeName, int personIdActual, int missionIdActual) { this.executiveOfficeIdActual = executiveOfficeIdActual; this.executiveOfficeName = executiveOfficeName; this.personIdActual = personIdActual; this.missionIdActual = missionIdActual; } public int getExecutiveOfficeIdActual() { return executiveOfficeIdActual; } public void setExecutiveOfficeIdActual(int executiveOfficeIdActual) { this.executiveOfficeIdActual = executiveOfficeIdActual; } public int getExecutiveOfficeName() { return executiveOfficeName; } public void setExecutiveOfficeName(int executiveOfficeName) { this.executiveOfficeName = executiveOfficeName; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getMissionIdActual() { return missionIdActual; } public void setMissionIdActual(int missionIdActual) { this.missionIdActual = missionIdActual; } public int getPersonIdActual() { return personIdActual; } public void setPersonIdActual(int personIdActual) { this.personIdActual = personIdActual; } @Override public String getEntityName() { return this.getClass().getSimpleName(); } @Override public String getModuleOfEntity() { return Installer.MODULE_NAME; } @Override public String getEntityDescription() { return "Mở rộng Enterprise SB12"; } @Override public IAccessData getAccessDataOfEntity() { return new ExecutiveBN(); } @Override public String getFieldNameObjectId() { return FIELD_EXECUTIVEOFFICE_ID_ACTUAL; } @Override public String getDataRealyOfField(String fieldName, String data) { return data; } @Override public String getDescriptionOfField(String fieldName) { return fieldName; } }
[ "DuongNguyenHoang.103@gmail.com" ]
DuongNguyenHoang.103@gmail.com
129e6fce390fe8ef9a1e88bc17d4678f5f2f788d
31682d69fa1413e1ebe95b78c85007e4b2733a46
/src/application/SqliteConnection.java
0eff52899a3be7a876297fef836682fa4011e626
[]
no_license
AmjadRammahi/GPA_calculator
bbeecabdce63266a8e7071e61e4550dd6ed765fd
7237ad18566999b724dc4a5906916232d2056df5
refs/heads/main
2023-02-10T22:38:35.029105
2021-01-08T01:24:59
2021-01-08T01:24:59
327,753,253
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package application; import java.sql.*; public class SqliteConnection { public static Connection connect(){ try { Class.forName("org.sqlite.JDBC"); Connection conn = DriverManager.getConnection("jdbc:sqlite:UserDB.sqlite"); return conn; } catch (Exception e) { System.out.println(e); return null; } } }
[ "you@example.com" ]
you@example.com
18ebbe49f5b9c43690eacea8390ba72e45691bc5
7b1f3549c7358604f363e77b816f739aa01401c9
/src/fx/dom/html/HtmlModElement.java
6f9dfcf62e975a7c35d9f74c6696e9ac03adf289
[ "MIT" ]
permissive
benravago/fx.html
a3d0123d17e9e51f700af19c0e17834307317534
a7ca6eb0554342b96eec94ca4ba8cb5594b44442
refs/heads/master
2023-02-05T19:55:59.647388
2020-12-19T20:38:33
2020-12-19T20:38:33
319,398,458
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
package fx.dom.html; import org.w3c.dom.html.HTMLDocument; import org.w3c.dom.html.HTMLModElement; public class HtmlModElement extends HtmlElement implements HTMLModElement { protected HtmlModElement(HTMLDocument owner, String mod) { super(owner,mod); } // INS, DEL @Override public String getCite() { return getAttribute("cite"); } @Override public void setCite(String cite) { setAttribute("cite",cite); } @Override public String getDateTime() { return getAttribute("datetime"); } @Override public void setDateTime(String dateTime) { setAttribute("datetime",dateTime); } }
[ "ben.ravago@aol.com" ]
ben.ravago@aol.com
5468f59161fb84d81035f0380ae8c92579c90b93
ed78e617e07a86ac0cbf972119ae630e2bb3f3d7
/app/src/main/java/com/example/wb/testzxing/android/CaptureActivityHandler.java
366769ba7575fdfda786b794bd5d003c75d2b042
[]
no_license
wblt/TestZxing
8931ec3cee465be9730eb2c3767af9b754dc788c
10d866afcb911207b0277aeecbdc35d6a5fdff6e
refs/heads/master
2020-03-06T14:41:13.219341
2018-03-27T06:41:58
2018-03-27T06:41:58
126,940,256
0
0
null
null
null
null
UTF-8
Java
false
false
4,352
java
/* * Copyright (C) 2008 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.example.wb.testzxing.android; import android.app.Activity; import android.content.Intent; import android.os.Handler; import android.os.Message; import com.example.wb.testzxing.camera.CameraManager; import com.example.wb.testzxing.common.Constant; import com.example.wb.testzxing.decode.DecodeThread; import com.example.wb.testzxing.view.ViewfinderResultPointCallback; import com.google.zxing.Result; /** * This class handles all the messaging which comprises the state machine for * capture. 该类用于处理有关拍摄状态的所有信息 * * @author dswitkin@google.com (Daniel Switkin) */ public final class CaptureActivityHandler extends Handler { private static final String TAG = CaptureActivityHandler.class .getSimpleName(); private final CaptureActivity activity; private final DecodeThread decodeThread; private State state; private final CameraManager cameraManager; private enum State { PREVIEW, SUCCESS, DONE } public CaptureActivityHandler(CaptureActivity activity,CameraManager cameraManager) { this.activity = activity; decodeThread = new DecodeThread(activity, new ViewfinderResultPointCallback( activity.getViewfinderView())); decodeThread.start(); state = State.SUCCESS; // Start ourselves capturing previews and decoding. // 开始拍摄预览和解码 this.cameraManager = cameraManager; cameraManager.startPreview(); restartPreviewAndDecode(); } @Override public void handleMessage(Message message) { switch (message.what) { case Constant.RESTART_PREVIEW: // 重新预览 restartPreviewAndDecode(); break; case Constant.DECODE_SUCCEEDED: // 解码成功 state = State.SUCCESS; activity.handleDecode((Result) message.obj); break; case Constant.DECODE_FAILED: // 尽可能快的解码,以便可以在解码失败时,开始另一次解码 state = State.PREVIEW; cameraManager.requestPreviewFrame(decodeThread.getHandler(), Constant.DECODE); break; case Constant.RETURN_SCAN_RESULT: activity.setResult(Activity.RESULT_OK, (Intent) message.obj); activity.finish(); break; case Constant.FLASH_OPEN: activity.switchFlashImg(Constant.FLASH_OPEN); break; case Constant.FLASH_CLOSE: activity.switchFlashImg(Constant.FLASH_CLOSE); break; } } /** * 完全退出 */ public void quitSynchronously() { state = State.DONE; cameraManager.stopPreview(); Message quit = Message.obtain(decodeThread.getHandler(), Constant.QUIT); quit.sendToTarget(); try { // Wait at most half a second; should be enough time, and onPause() // will timeout quickly decodeThread.join(500L); } catch (InterruptedException e) { // continue } // Be absolutely sure we don't send any queued up messages //确保不会发送任何队列消息 removeMessages(Constant.DECODE_SUCCEEDED); removeMessages(Constant.DECODE_FAILED); } public void restartPreviewAndDecode() { if (state == State.SUCCESS) { state = State.PREVIEW; cameraManager.requestPreviewFrame(decodeThread.getHandler(), Constant.DECODE); activity.drawViewfinder(); } } }
[ "940422068@qq.com" ]
940422068@qq.com
6e70c4fd6f526350d0e974c49801fe913abaa42f
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/response/AlipayPcreditHuabeiSpayAuthConsultResponse.java
42e788422f0b27fde3d54490ee6d04e527bd3328
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
1,518
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.MultiStagePayInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.pcredit.huabei.spay.auth.consult response. * * @author auto create * @since 1.0, 2020-05-12 12:30:10 */ public class AlipayPcreditHuabeiSpayAuthConsultResponse extends AlipayResponse { private static final long serialVersionUID = 2555441462797944118L; /** * 是否通过了鉴权的校验,通过了为true,没有通过为false */ @ApiField("auth_approved") private Boolean authApproved; /** * 分次支付的支付信息,内部包含明细 */ @ApiField("multi_stage_pay_info") private MultiStagePayInfo multiStagePayInfo; /** * 用户没有通过鉴权的接口校验,未能通过的原因;如果用户是可用的,那么这个字段为空; */ @ApiField("refuse_desc") private String refuseDesc; public void setAuthApproved(Boolean authApproved) { this.authApproved = authApproved; } public Boolean getAuthApproved( ) { return this.authApproved; } public void setMultiStagePayInfo(MultiStagePayInfo multiStagePayInfo) { this.multiStagePayInfo = multiStagePayInfo; } public MultiStagePayInfo getMultiStagePayInfo( ) { return this.multiStagePayInfo; } public void setRefuseDesc(String refuseDesc) { this.refuseDesc = refuseDesc; } public String getRefuseDesc( ) { return this.refuseDesc; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
4506a069950aee7ad7b359c1709f22fb9b8480cf
4930894fc0fb64295e0901b8a1d7f8caa99c23a0
/redisson/src/main/java/org/redisson/reactive/RedissonReadWriteLockReactive.java
80d63d706a731d4209d245c7ebdd88c6bb738b38
[ "Apache-2.0" ]
permissive
rohitgulia/redisson
75285aa9021b122b40601e3b4c40c795a9dde720
fd9643f9cf1931eb9169452a69f3fb3688382530
refs/heads/master
2020-03-27T16:38:36.897539
2018-08-30T19:34:36
2018-08-30T19:34:36
146,796,922
0
1
Apache-2.0
2018-08-30T19:26:28
2018-08-30T19:26:28
null
UTF-8
Java
false
false
1,617
java
/** * Copyright 2018 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.reactive; import org.redisson.RedissonReadWriteLock; import org.redisson.api.RLockReactive; import org.redisson.api.RReadWriteLock; import org.redisson.api.RReadWriteLockReactive; import org.redisson.command.CommandReactiveExecutor; /** * * @author Nikita Koksharov * */ public class RedissonReadWriteLockReactive extends RedissonExpirableReactive implements RReadWriteLockReactive { private final RReadWriteLock instance; public RedissonReadWriteLockReactive(CommandReactiveExecutor commandExecutor, String name) { super(commandExecutor, name, new RedissonReadWriteLock(commandExecutor, name)); this.instance = (RReadWriteLock) super.instance; } @Override public RLockReactive readLock() { return new RedissonLockReactive(commandExecutor, getName(), instance.readLock()); } @Override public RLockReactive writeLock() { return new RedissonLockReactive(commandExecutor, getName(), instance.writeLock()); } }
[ "abracham.mitchell@gmail.com" ]
abracham.mitchell@gmail.com
1c992bbd6ef57d43750fea30bef4a05640460a3c
07f2fa83cafb993cc107825223dc8279969950dd
/game_logic_server/src/main/java/com/xgame/logic/server/game/chat/handler/ReqBuyTyphonHandler.java
21f6d8134d4732a0f643416e9cee35f2ccb4d144
[]
no_license
hw233/x2-slg-java
3f12a8ed700e88b81057bccc7431237fae2c0ff9
03dcdab55e94ee4450625404f6409b1361794cbf
refs/heads/master
2020-04-27T15:42:10.982703
2018-09-27T08:35:27
2018-09-27T08:35:27
174,456,389
0
1
null
null
null
null
UTF-8
Java
false
false
2,493
java
package com.xgame.logic.server.game.chat.handler; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import com.xgame.config.fastPaid.FastPaidPir; import com.xgame.config.fastPaid.FastPaidPirFactory; import com.xgame.config.items.ItemsPir; import com.xgame.config.items.ItemsPirFactory; import com.xgame.logic.server.core.gamelog.constant.GameLogSource; import com.xgame.logic.server.core.language.Language; import com.xgame.logic.server.core.language.view.error.ErrorCodeEnum; import com.xgame.logic.server.core.net.process.PlayerCommand; import com.xgame.logic.server.core.utils.CurrencyUtil; import com.xgame.logic.server.game.bag.ItemKit; import com.xgame.logic.server.game.chat.message.ReqBuyTyphonMessage; import com.xgame.logic.server.game.chat.message.ResBuyTyphonMessage; import com.xgame.logic.server.game.constant.CurrencyEnum; import com.xgame.logic.server.game.constant.SystemEnum; @Component @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class ReqBuyTyphonHandler extends PlayerCommand<ReqBuyTyphonMessage>{ @Override public void action() { //参数判断 if(message.num < 1 || message.itemId < 1) { Language.ERRORCODE.send(player, ErrorCodeEnum.E001_LOGIN.CODE15.get()); return; } //配置判断 ItemsPir itemsPir = ItemsPirFactory.get(message.itemId); if(itemsPir == null){ Language.ERRORCODE.send(player, ErrorCodeEnum.E001_LOGIN.CODE6.get(),ItemsPir.class.getSimpleName(),message.itemId); return; } //钻石判断 //获取快速购买价格 FastPaidPir configModel = FastPaidPirFactory.get(message.itemId); if(configModel == null) { Language.ERRORCODE.send(player, ErrorCodeEnum.E001_LOGIN.CODE6.get(),FastPaidPir.class.getSimpleName(),message.itemId); return; } if(!CurrencyUtil.verify(player, configModel.getPrice()*message.num , CurrencyEnum.DIAMOND)) { Language.ERRORCODE.send(player, ErrorCodeEnum.E001_LOGIN.CODE16.get()); return; } //扣钻石发道具 CurrencyUtil.decrement(player, configModel.getPrice()*message.num , CurrencyEnum.DIAMOND, GameLogSource.EDIT_ALLIANCE_INFO); CurrencyUtil.send(player); ItemKit.addItemAndTopic(player, message.itemId, message.num, SystemEnum.FASTPAID, GameLogSource.FAST_PAID); ResBuyTyphonMessage resBuyTyphonMessage = new ResBuyTyphonMessage(); resBuyTyphonMessage.success = 1; player.send(resBuyTyphonMessage); } }
[ "ityuany@126.com" ]
ityuany@126.com
d7a67ee252be9daaceab583db582e956b97901e5
5f14a75cb6b80e5c663daa6f7a36001c9c9b778c
/src/com/google/android/gms/measurement/AppMeasurementContentProvider.java
b049267f89ac48367f327198218a31d9c00151bf
[]
no_license
MaTriXy/com.ubercab
37b6f6d3844e6a63dc4c94f8b6ba6bb4eb0118fb
ccd296d27e0ecf5ccb46147e8ec8fb70d2024b2c
refs/heads/master
2021-01-22T11:16:39.511861
2016-03-19T20:58:25
2016-03-19T20:58:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,088
java
package com.google.android.gms.measurement; import android.content.ContentProvider; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import bko; public class AppMeasurementContentProvider extends ContentProvider { public int delete(Uri paramUri, String paramString, String[] paramArrayOfString) { return 0; } public String getType(Uri paramUri) { return null; } public Uri insert(Uri paramUri, ContentValues paramContentValues) { return null; } public boolean onCreate() { bko.a(getContext()); return false; } public Cursor query(Uri paramUri, String[] paramArrayOfString1, String paramString1, String[] paramArrayOfString2, String paramString2) { return null; } public int update(Uri paramUri, ContentValues paramContentValues, String paramString, String[] paramArrayOfString) { return 0; } } /* Location: * Qualified Name: com.google.android.gms.measurement.AppMeasurementContentProvider * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
4ad5e6b895ec4aed349534e85aebbd519379d1c3
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/52_lagoon-nu.staldal.lagoon.core.AuthenticationMissingException-1.0-3/nu/staldal/lagoon/core/AuthenticationMissingException_ESTest_scaffolding.java
d6080ef4b504a164866a4d36eeafb39175090819
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
559
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 15:52:02 GMT 2019 */ package nu.staldal.lagoon.core; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class AuthenticationMissingException_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
db03ba1138ddc3727d0ea8b23b2b1babb7a72098
64b47f83d313af33804b946d0613760b8ff23840
/tags/dev-3-5-5/tests/weka/filters/unsupervised/attribute/ClusterMembershipTest.java
ad3eb4670bc7efd195b27b575e0ec4eca0ea209b
[]
no_license
hackerastra/weka
afde1c7ab0fbf374e6d6ac6d07220bfaffb9488c
c8366c454e9718d0e1634ddf4a72319dac3ce559
refs/heads/master
2021-05-28T08:25:33.811203
2015-01-22T03:12:18
2015-01-22T03:12:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,969
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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Copyright (C) 2005 University of Waikato, Hamilton, New Zealand */ package weka.filters.unsupervised.attribute; import weka.classifiers.Classifier; import weka.classifiers.meta.FilteredClassifier; import weka.core.Instances; import weka.core.TestInstances; import weka.filters.AbstractFilterTest; import weka.filters.Filter; import junit.framework.Test; import junit.framework.TestSuite; /** * Tests ClusterMembership. Run from the command line with: <p/> * java weka.filters.unsupervised.attribute.ClusterMembershipTest * * @author FracPete (fracpete at waikato dot ac dot nz) * @version $Revision: 1.3 $ */ public class ClusterMembershipTest extends AbstractFilterTest { public ClusterMembershipTest(String name) { super(name); } /** Need to remove non-nominal/numeric attributes, set class index */ protected void setUp() throws Exception { super.setUp(); // remove attributes that are not nominal/numeric int i = 0; while (i < m_Instances.numAttributes()) { if ( ( !m_Instances.attribute(i).isNominal() && !m_Instances.attribute(i).isNumeric() ) || m_Instances.attribute(i).isDate() ) m_Instances.deleteAttributeAt(i); else i++; } // class index m_Instances.setClassIndex(1); } /** Creates a default ClusterMembership */ public Filter getFilter() { ClusterMembership f = new ClusterMembership(); return f; } /** * returns the configured FilteredClassifier. Since the base classifier is * determined heuristically, derived tests might need to adjust it. * * @return the configured FilteredClassifier */ protected FilteredClassifier getFilteredClassifier() { FilteredClassifier result; result = new FilteredClassifier(); result.setFilter(getFilter()); result.setClassifier(new weka.classifiers.trees.J48()); return result; } /** * returns data generated for the FilteredClassifier test * * @return the dataset for the FilteredClassifier * @throws Exception if generation of data fails */ protected Instances getFilteredClassifierData() throws Exception{ TestInstances test; Instances result; test = TestInstances.forCapabilities(m_FilteredClassifier.getCapabilities()); test.setClassIndex(TestInstances.CLASS_IS_LAST); result = test.generate(); return result; } public void testNominal() { m_Filter = getFilter(); m_Instances.setClassIndex(1); Instances result = useFilter(); // classes must be still the same assertEquals(m_Instances.numClasses(), result.numClasses()); // at least one cluster per label besides class assertTrue(result.numAttributes() >= m_Instances.numClasses() + 1); } public void testNumeric() { m_Filter = getFilter(); m_Instances.setClassIndex(2); Instances result = useFilter(); // at least one cluster (only one clusterer is generateed) besides class assertTrue(result.numAttributes() >= 1 + 1); } public static Test suite() { return new TestSuite(ClusterMembershipTest.class); } public static void main(String[] args){ junit.textui.TestRunner.run(suite()); } }
[ "(no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92" ]
(no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92
973e81c5afe631f0a18399fd79d98f5fa729b5d5
231a828518021345de448c47c31f3b4c11333d0e
/src/pdf/bouncycastle/asn1/bc/EncryptedSecretKeyData.java
780ccedab12f9681c72c62e519c5aa66bed897c9
[]
no_license
Dynamit88/PDFBox-Java
f39b96b25f85271efbb3a9135cf6a15591dec678
480a576bc97fc52299e1e869bb80a1aeade67502
refs/heads/master
2020-05-24T14:58:29.287880
2019-05-18T04:25:21
2019-05-18T04:25:21
187,312,933
0
0
null
null
null
null
UTF-8
Java
false
false
2,078
java
package pdf.bouncycastle.asn1.bc; import pdf.bouncycastle.asn1.ASN1EncodableVector; import pdf.bouncycastle.asn1.ASN1Object; import pdf.bouncycastle.asn1.ASN1OctetString; import pdf.bouncycastle.asn1.ASN1Primitive; import pdf.bouncycastle.asn1.ASN1Sequence; import pdf.bouncycastle.asn1.DEROctetString; import pdf.bouncycastle.asn1.DERSequence; import pdf.bouncycastle.asn1.x509.AlgorithmIdentifier; import pdf.bouncycastle.util.Arrays; /** * <pre> * EncryptedSecretKeyData ::= SEQUENCE { * keyEncryptionAlgorithm AlgorithmIdentifier, * encryptedKeyData OCTET STRING * } * </pre> */ public class EncryptedSecretKeyData extends ASN1Object { private final AlgorithmIdentifier keyEncryptionAlgorithm; private final ASN1OctetString encryptedKeyData; public EncryptedSecretKeyData(AlgorithmIdentifier keyEncryptionAlgorithm, byte[] encryptedKeyData) { this.keyEncryptionAlgorithm = keyEncryptionAlgorithm; this.encryptedKeyData = new DEROctetString(Arrays.clone(encryptedKeyData)); } private EncryptedSecretKeyData(ASN1Sequence seq) { this.keyEncryptionAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(0)); this.encryptedKeyData = ASN1OctetString.getInstance(seq.getObjectAt(1)); } public static EncryptedSecretKeyData getInstance(Object o) { if (o instanceof EncryptedSecretKeyData) { return (EncryptedSecretKeyData)o; } else if (o != null) { return new EncryptedSecretKeyData(ASN1Sequence.getInstance(o)); } return null; } public AlgorithmIdentifier getKeyEncryptionAlgorithm() { return keyEncryptionAlgorithm; } public byte[] getEncryptedKeyData() { return Arrays.clone(encryptedKeyData.getOctets()); } public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(keyEncryptionAlgorithm); v.add(encryptedKeyData); return new DERSequence(v); } }
[ "vtuse@mail.ru" ]
vtuse@mail.ru
ee1dc8d00a7bd11b3853eabd65cbb7d2a75d69e0
899bb01502d675371721030b0e6675fc7c91422b
/src/main/java/org/agoncal/application/petstore/web/AccountController.java
41e41cd74fef82488ca89ebaf0a149e42d75e1bd
[]
no_license
lanaflonPerso/agoncal-application-petstore-ee6
1680a22125d872b0246ba0a50cd069dfef1c2e41
f2b9f78b12524537c64e70a94c5d0ab6a7a16c02
refs/heads/master
2020-11-27T09:56:00.696721
2012-02-07T14:59:52
2012-02-07T15:02:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,536
java
package org.agoncal.application.petstore.web; import org.agoncal.application.petstore.domain.Customer; import org.agoncal.application.petstore.service.CustomerService; import javax.enterprise.context.SessionScoped; import javax.enterprise.inject.Produces; import javax.inject.Inject; import javax.inject.Named; import java.io.Serializable; /** * @author Antonio Goncalves * http://www.antoniogoncalves.org * -- */ @Named @SessionScoped public class AccountController extends Controller implements Serializable { // ====================================== // = Attributes = // ====================================== @Inject private CustomerService customerService; @Inject private Credentials credentials; @Produces @LoggedIn private Customer loggedinCustomer; // ====================================== // = Public Methods = // ====================================== public String doLogin() { String navigateTo = null; try { loggedinCustomer = customerService.findCustomer(credentials.getLogin(), credentials.getPassword()); navigateTo = "main.xhtml"; } catch (Exception e) { addMessage(this.getClass().getName(), "doLogin", e); } return navigateTo; } public String doCreateNewAccount() { // Login has to be unique if (customerService.doesLoginAlreadyExist(credentials.getLogin())) { addWarningMessage("Login already exists"); return null; } // Id and password must be filled if ("".equals(credentials.getLogin()) || "".equals(credentials.getPassword()) || "".equals(credentials.getPassword2())) { addWarningMessage("Id and passwords have to be filled"); return null; } else if (!credentials.getPassword().equals(credentials.getPassword2())) { addWarningMessage("Both entered passwords have to be the same"); return null; } // Login and password are ok loggedinCustomer = new Customer(); loggedinCustomer.setLogin(credentials.getLogin()); loggedinCustomer.setPassword(credentials.getPassword()); return "createaccount.xhtml"; } public String doCreateCustomer() { String navigateTo = null; try { // Creates the customer loggedinCustomer = customerService.createCustomer(loggedinCustomer); navigateTo = "main.xhtml"; } catch (Exception e) { addMessage(this.getClass().getName(), "doCreateCustomer", e); } return navigateTo; } public void doLogout() { loggedinCustomer = null; } public String doUpdateAccount() { String navigateTo = null; try { // Updates the customer loggedinCustomer = customerService.updateCustomer(loggedinCustomer); addInformationMessage("Your account has been updated"); navigateTo = "account.updated"; } catch (Exception e) { addMessage(this.getClass().getName(), "doUpdateAccount", e); } return navigateTo; } public boolean isLoggedIn() { return loggedinCustomer != null; } public Customer getLoggedinCustomer() { return loggedinCustomer; } public void setLoggedinCustomer(Customer loggedinCustomer) { this.loggedinCustomer = loggedinCustomer; } }
[ "antonio.goncalves@gmail.com" ]
antonio.goncalves@gmail.com
157971a444a10e1b49a0b4695d143e8e9658451f
8da77614b236926df90a819bda1a65e0aa5e0e74
/educrm-api/src/main/java/com/wuxue/api/service/MarketReportService.java
d1204eb638188a72e1a1468e9f19d60cb2357173
[ "Apache-2.0" ]
permissive
azzdinemj/edu-crmclub
01eb423561f7458525030e5705413188ddf91a52
442eb2474d14eb3e333cbad07eb6adbcf64116cc
refs/heads/master
2020-04-20T23:48:33.277687
2018-09-30T14:00:45
2018-09-30T14:00:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
193
java
package com.wuxue.api.service; import com.wuxue.api.interfaces.IFindService; import com.wuxue.model.MarketReport; public interface MarketReportService extends IFindService<MarketReport> { }
[ "frankdevhub@163.com" ]
frankdevhub@163.com
f840bc3808d365dda7d2c2eb1fdb971b14412f2f
c2d8181a8e634979da48dc934b773788f09ffafb
/storyteller/output/adserver/beans/AdvertisementForm.java
be7f7b74c454b88f3cedb139965964a4e783472e
[]
no_license
toukubo/storyteller
ccb8281cdc17b87758e2607252d2d3c877ffe40c
6128b8d275efbf18fd26d617c8503a6e922c602d
refs/heads/master
2021-05-03T16:30:14.533638
2016-04-20T12:52:46
2016-04-20T12:52:46
9,352,300
0
0
null
null
null
null
UTF-8
Java
false
false
3,475
java
package net.adserver.beans; import org.apache.struts.upload.FormFile; import java.util.Date; import org.apache.commons.lang.StringUtils; public class AdvertisementForm extends org.apache.struts.validator.ValidatorForm implements java.io.Serializable { private static final java.text.DateFormat format = new java.text.SimpleDateFormat("yyyy/MM/dd");static { format.setLenient(true); }private Integer id; public void setId(Integer id){ this.id = id; } public Integer getId(){ return this.id; } private String url; public void setUrl(String url){ this.url = url; } public String getUrl(){ return this.url; } private Date startdate; public void setStartdate(Date startdate){ this.startdate = startdate; } public Date getStartdate(){ return this.startdate; } private boolean startdateIsValid = false; public void setStartdateIsValid(boolean startdateIsValid){ this.startdateIsValid = startdateIsValid; } public boolean isStartdateIsValid(){ return this.startdateIsValid; } private java.lang.String startdateAsRawString =""; public java.lang.String getStartdateAsString(){ return (startdate== null) ? null : format.format(startdate); } public void setStartdateAsString(java.lang.String startdate){ this.startdateIsValid = true; this.startdateAsRawString = startdate; try{ if(StringUtils.isNotBlank(startdate)){ format.parse(startdate);} }catch (java.text.ParseException pe){ this.startdateIsValid = false; } if(startdateIsValid){ try { this.startdate = (org.apache.commons.lang.StringUtils.isBlank(startdate)) ? null : format.parse(startdate); } catch (Exception e) { e.printStackTrace(); } } } public void setStartdateAsRawString(java.lang.String startdate){ this.startdateAsRawString = startdate; } public String getStartdateAsRawString(){ return this.startdateAsRawString; } private Date enddate; public void setEnddate(Date enddate){ this.enddate = enddate; } public Date getEnddate(){ return this.enddate; } private boolean enddateIsValid = false; public void setEnddateIsValid(boolean enddateIsValid){ this.enddateIsValid = enddateIsValid; } public boolean isEnddateIsValid(){ return this.enddateIsValid; } private java.lang.String enddateAsRawString =""; public java.lang.String getEnddateAsString(){ return (enddate== null) ? null : format.format(enddate); } public void setEnddateAsString(java.lang.String enddate){ this.enddateIsValid = true; this.enddateAsRawString = enddate; try{ if(StringUtils.isNotBlank(enddate)){ format.parse(enddate);} }catch (java.text.ParseException pe){ this.enddateIsValid = false; } if(enddateIsValid){ try { this.enddate = (org.apache.commons.lang.StringUtils.isBlank(enddate)) ? null : format.parse(enddate); } catch (Exception e) { e.printStackTrace(); } } } public void setEnddateAsRawString(java.lang.String enddate){ this.enddateAsRawString = enddate; } public String getEnddateAsRawString(){ return this.enddateAsRawString; } private String clientname; public void setClientname(String clientname){ this.clientname = clientname; } public String getClientname(){ return this.clientname; } FormFile formFile = null; public void setFormFile(FormFile formFile){ this.formFile = formFile; } public FormFile getFormFile(){ return this.formFile; } public void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request){} }
[ "toukubo@gmail.com" ]
toukubo@gmail.com
3ac33f5d1c41dbf89d55132d4c671fe8cf928e9d
1f742409cbab86f55d310ab282359fccf5f907c0
/jdbc_assignment/Server.java
8bea7adbaf2435c6d12ed5e4418ee90728489909
[]
no_license
sriramselvaraj21/Java
fc675550a4476b9e5975c69db7218253ae920897
6b9df408fcc439308148c54a5b4cad55adafe5af
refs/heads/main
2023-04-25T10:48:30.105298
2021-04-27T05:35:35
2021-04-27T05:35:35
353,292,828
0
1
null
null
null
null
UTF-8
Java
false
false
427
java
package jdbc_assignment; import java.rmi.Naming; import java.rmi.registry.LocateRegistry; public class Server { public static void main(String[] args) throws Exception { //InvoiceServer is = new InvoiceServer(); // // LocateRegistry.createRegistry(1099); // Rmiserver rmiservice = new RmiServer(); // System.out.println("Invoice app ready..."); // // Naming.bind("rmi://localhost:1099/myinvoiceapp", rmiservice); } }
[ "Sriram.Selvaraj@gds.ey.com" ]
Sriram.Selvaraj@gds.ey.com
638e5e126a4531fdc443287d5fc919742de522be
fe29f9223ca2a0c0de11f26adbc560a417168ae1
/sharepoint/src/main/java/com/sharepoint/rest/helper/AuthTokenHelperOnline.java
97fdcfe0d8bb8bf9ad214509ffd96019dc0e1e22
[]
no_license
nileshkadam222/Spring-Boot
d2fd25630feecd7586cfcbb8694f9f2f9b01a427
80edfe08d101e79e217d1d557d7c1fcd37627f20
refs/heads/master
2023-04-29T22:28:59.437898
2023-02-12T08:48:55
2023-02-12T08:48:55
229,517,894
0
0
null
2023-04-14T18:05:08
2019-12-22T04:29:25
Java
UTF-8
Java
false
false
6,838
java
package com.sharepoint.rest.helper; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.stream.Collectors; import javax.xml.transform.TransformerException; import org.json.JSONException; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; public class AuthTokenHelperOnline { private static final Logger LOG = LoggerFactory.getLogger(AuthTokenHelperOnline.class); private MultiValueMap<String, String> headers; private String spSiteUri; private String formDigestValue ; private String domain; private List<String> cookies; private final String TOKEN_LOGIN_URL = "https://login.microsoftonline.com/extSTS.srf"; private String payload = "<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"\n" + " xmlns:a=\"http://www.w3.org/2005/08/addressing\"\n" + " xmlns:u=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">\n" + " <s:Header>\n" + " <a:Action s:mustUnderstand=\"1\">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>\n" + " <a:ReplyTo>\n" + " <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>\n" + " </a:ReplyTo>\n" + " <a:To s:mustUnderstand=\"1\">https://login.microsoftonline.com/extSTS.srf</a:To>\n" + " <o:Security s:mustUnderstand=\"1\"\n" + " xmlns:o=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\n" + " <o:UsernameToken>\n" + " <o:Username><![CDATA[%s]]></o:Username>\n" + " <o:Password><![CDATA[%s]]></o:Password>\n" + " </o:UsernameToken>\n" + " </o:Security>\n" + " </s:Header>\n" + " <s:Body>\n" + " <t:RequestSecurityToken xmlns:t=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\n" + " <wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\n" + " <a:EndpointReference>\n" + " <a:Address>%s</a:Address>\n" + " </a:EndpointReference>\n" + " </wsp:AppliesTo>\n" + " <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType>\n" + " <t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>\n" + " <t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType>\n" + " </t:RequestSecurityToken>\n" + " </s:Body>\n" + "</s:Envelope>"; private RestTemplate restTemplate; /** * Helper class to manage login against SharepointOnline and retrieve auth token and cookies to * perform calls to rest API. * Retrieves all info needed to set auth headers to call Sharepoint Rest API v1. * * @param restTemplate * @param user * @param passwd * @param domain * @param spSiteUri */ public AuthTokenHelperOnline(RestTemplate restTemplate, String user, String passwd, String domain, String spSiteUri) { super(); this.restTemplate = restTemplate; this.domain = domain; this.spSiteUri = spSiteUri; this.payload = String.format(this.payload, user, passwd, domain); } protected String receiveSecurityToken() throws URISyntaxException, AuthenticationException { RequestEntity<String> requestEntity = new RequestEntity<>(this.payload, HttpMethod.POST, new URI(TOKEN_LOGIN_URL)); ResponseEntity<String> responseEntity = restTemplate.exchange(requestEntity, String.class); return AuthenticationResponseParser.parseAuthenticationResponse(responseEntity.getBody()); } protected List<String> getSignInCookies(String securityToken) throws TransformerException, URISyntaxException, Exception { RequestEntity<String> requestEntity = new RequestEntity<>(securityToken, HttpMethod.POST, new URI(String.format("https://%s/_forms/default.aspx?wa=wsignin1.0", this.domain))); ResponseEntity<String> responseEntity = restTemplate.exchange(requestEntity, String.class); HttpHeaders headers = responseEntity.getHeaders(); List<String> cookies = headers.get("Set-Cookie"); if (CollectionUtils.isEmpty(cookies)) { throw new Exception("Unable to sign in: no cookies returned in response"); } return cookies; } protected String getFormDigestValue(List<String> cookies) throws IOException, URISyntaxException, TransformerException, JSONException { headers = new LinkedMultiValueMap<>(); headers.add("Cookie", cookies.stream().collect(Collectors.joining(";")) ); headers.add("Accept", "application/json;odata=verbose"); headers.add("X-ClientService-ClientTag", "SDK-JAVA"); RequestEntity<String> requestEntity = new RequestEntity<>(headers, HttpMethod.POST, new URI(String.format("https://%s/_api/contextinfo", this.domain))); ResponseEntity<String> responseEntity = restTemplate.exchange(requestEntity, String.class); String body = responseEntity.getBody(); JSONObject json = new JSONObject(body); return json.getJSONObject("d").getJSONObject("GetContextWebInformation").getString("FormDigestValue"); } /** * @throws Exception */ public void init() throws Exception { String securityToken = receiveSecurityToken(); this.cookies = getSignInCookies(securityToken); formDigestValue = getFormDigestValue(this.cookies); } /** * The security token to use in Authorization Bearer header or X-RequestDigest header * (depending on operation called from Rest API). * * @return */ public String getFormDigestValue() { return formDigestValue; } /** * Retrieves session cookies to use in communication with the Sharepoint Online Rest API. * * @return */ public List<String> getCookies() { return this.cookies; } /** * Mounts the sharepoint online site url, composed by the protocol, domain and spSiteUri. * * @return * @throws URISyntaxException */ public URI getSharepointSiteUrl(String apiPath) throws URISyntaxException { return new URI("https", this.domain, this.spSiteUri + apiPath, null ); } /** * @param apiPath * @param query * @return * @throws URISyntaxException */ public URI getSharepointSiteUrl(String apiPath, String query) throws URISyntaxException { if (!query.startsWith("$filter=")) { LOG.debug("Missing $filter in query string, adding"); query = String.format("%s%s", "$filter=", query); } return new URI("https", this.domain, this.spSiteUri + apiPath, query, null ); } }
[ "nilesh.kadam222@gmail.com" ]
nilesh.kadam222@gmail.com
5a686ec9786cb18d998b680d2ccb19db1dd52539
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/median/9013bd3be8c00de447e6ed49a0fe0fab037251c28e26954bf780f2f3b929a9e7ce9da037811c76028e4069d3857410f82b8f399c7fa4386ea8f97f80aab1f191/000/mutations/128/median_9013bd3b_000.java
a90b1e68758b0cf716d72dd28801feb47c7e508f
[]
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,326
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 median_9013bd3b_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { median_9013bd3b_000 mainClass = new median_9013bd3b_000 (); 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 { DoubleObj first = new DoubleObj (), second = new DoubleObj (), third = new DoubleObj (); output += (String.format ("Please enter 3 numbers seperated by spaces > ")); first.value = scanner.nextDouble (); second.value = scanner.nextDouble (); third.value = scanner.nextDouble (); if ((first.value > second.value && first.value < third.value) || (first.value < second.value && first.value > third.value)) { output += (String.format ("%.0f is the median\n", first.value)); } if ((second.value > second.value && second.value < third.value) || (second.value < first.value && second.value > third.value)) { output += (String.format ("%.0f is the median\n", second.value)); } if ((third.value > first.value && third.value < second.value) || (third.value < first.value && third.value > second.value)) { output += (String.format ("%.0f is the median\n", third.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
c857fae78bf92db5e9116beb044fcef9d92da855
c036afc4ba9aeaaede13e4153a91718805de9ed6
/trunk/v1.0.0/src/com/youthor/bsp/view/abdf/common/form/TreeForm.java
975c59d1ce5dcd1a69a2377e8f35108cb1b86349
[]
no_license
BGCX262/zz-bsp-svn-to-git
c5713cd23c2423013b7515ecbc95415785f34c45
1c64b407aff1fc6632c93944cada76160c0f1423
refs/heads/master
2021-01-10T21:31:27.458998
2015-08-23T06:57:00
2015-08-23T06:57:00
41,245,256
0
0
null
null
null
null
UTF-8
Java
false
false
1,664
java
package com.youthor.bsp.view.abdf.common.form; import com.youthor.bsp.view.abdf.common.base.BaseForm; public class TreeForm extends BaseForm{ private static final long serialVersionUID = -8620626913250249518L; private String id; //数据库id private String name; //名称 private String parentId; //父id private String allParentId; //所有父id private String allParentName;//所有父名称���и���� private float orderIndex;//排序号 private String deleteFlag="N"; public String getDeleteFlag() { return deleteFlag; } public void setDeleteFlag(String deleteFlag) { this.deleteFlag = deleteFlag; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public String getAllParentId() { return allParentId; } public void setAllParentId(String allParentId) { this.allParentId = allParentId; } public String getAllParentName() { return allParentName; } public void setAllParentName(String allParentName) { this.allParentName = allParentName; } public float getOrderIndex() { return orderIndex; } public void setOrderIndex(float orderIndex) { this.orderIndex = orderIndex; } }
[ "you@example.com" ]
you@example.com
2d4ef0aba56a24fb2c104f7af07caf78c61c4f31
8b5e2b57b05edc09e6c063046785f4e8234e8f2b
/MVN-NFe-Core/src/main/java/br/com/systeconline/nfe/xml/nota/transporte/Reboque.java
a56a4fd1b5319ca97cc7606ee1177d503e484183
[]
no_license
Rafasystec/MVN
d3a0e82ecd22852642342196f873127164a20656
e8a739b27a8cde54579261ebce8771068fd385b3
refs/heads/master
2021-01-19T02:40:59.145594
2017-11-24T00:38:49
2017-11-24T00:38:49
54,285,723
1
0
null
null
null
null
UTF-8
Java
false
false
303
java
package br.com.systeconline.nfe.xml.nota.transporte; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; //X22 @XmlRootElement(name="reboque") @XmlAccessorType(XmlAccessType.FIELD) public class Reboque { }
[ "rafasystec@yahoo.com.br" ]
rafasystec@yahoo.com.br
5313aeab43ae93f84b52fa77003ed2d886ec9e6a
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/6f1c1c76a8bf4355faedc44b0496391912aaf798/after/MavenProjectRootStep.java
27d25a0b35cc5efb9127ed4c5d20da79e5ffec8d
[]
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
5,880
java
package org.jetbrains.idea.maven.wizards; import com.intellij.ide.util.projectWizard.NamePathComponent; import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.openapi.options.Configurable; import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.options.ShowSettingsUtil; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.projectImport.ProjectImportWizardStep; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.Nullable; import org.jetbrains.idea.maven.project.MavenGeneralSettings; import org.jetbrains.idea.maven.project.*; import javax.swing.*; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; /** * @author Vladislav.Kaznacheev */ public class MavenProjectRootStep extends ProjectImportWizardStep { private MavenGeneralSettings myCoreSettings; private MavenProjectBuilder myImportContext; private MavenImportingSettings myImportingSettings; private final JPanel myPanel; private NamePathComponent myRootPathComponent; private final MavenImportingSettingsForm myImporterSettingsForm; public MavenProjectRootStep(WizardContext wizardContext) { super(wizardContext); myImporterSettingsForm = new MavenImportingSettingsForm(true) { public String getDefaultModuleDir() { return myRootPathComponent.getPath(); } }; myPanel = new JPanel(new GridBagLayout()); myPanel.setBorder(BorderFactory.createEtchedBorder()); myRootPathComponent = new NamePathComponent("", ProjectBundle.message("maven.import.label.select.root"), ProjectBundle.message("maven.import.title.select.root"), "", false); myRootPathComponent.setNameComponentVisible(false); myPanel.add(myRootPathComponent, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 6, 0, 6), 0, 0)); myPanel.add(myImporterSettingsForm.createComponent(), new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(15, 6, 0, 6), 0, 0)); JButton advancedButton = new JButton(ProjectBundle.message("maven.advanced.button.name")); myPanel.add(advancedButton, new GridBagConstraints(0, 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHEAST, 0, new Insets(15, 6, 0, 6), 0, 0)); advancedButton.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent event) { super.mouseClicked(event); ShowSettingsUtil.getInstance().editConfigurable(myPanel, new MavenPathsConfigurable()); } }); } public JComponent getComponent() { return myPanel; } public void updateDataModel() { final MavenImportingSettings settings = getImportingSettings(); myImporterSettingsForm.getData(settings); suggestProjectNameAndPath(settings.getDedicatedModuleDir(), myRootPathComponent.getPath()); } public boolean validate() throws ConfigurationException { updateDataModel(); // needed to make 'exhaustive search' take an effect. return getImportContext().setRootDirectory(myRootPathComponent.getPath()); } public void updateStep() { if (!myRootPathComponent.isPathChangedByUser()) { final VirtualFile rootDirectory = getImportContext().getRootDirectory(); final String path; if (rootDirectory != null) { path = rootDirectory.getPath(); } else { path = getWizardContext().getProjectFileDirectory(); } if (path != null) { myRootPathComponent.setPath(FileUtil.toSystemDependentName(path)); myRootPathComponent.getPathComponent().selectAll(); } } myImporterSettingsForm.setData(getImportingSettings()); } public JComponent getPreferredFocusedComponent() { return myRootPathComponent.getPathComponent(); } private MavenGeneralSettings getCoreSettings() { if (myCoreSettings == null) { myCoreSettings = ((MavenProjectBuilder)getBuilder()).getGeneralSettings(); } return myCoreSettings; } public MavenProjectBuilder getImportContext() { if (myImportContext == null) { myImportContext = (MavenProjectBuilder)getBuilder(); } return myImportContext; } public MavenImportingSettings getImportingSettings() { if (myImportingSettings == null) { myImportingSettings = ((MavenProjectBuilder)getBuilder()).getImportingSettings(); } return myImportingSettings; } @NonNls public String getHelpId() { return "reference.dialogs.new.project.import.maven.page1"; } class MavenPathsConfigurable implements Configurable { MavenEnvironmentForm myForm = new MavenEnvironmentForm(); @Nls public String getDisplayName() { return ProjectBundle.message("maven.paths.configurable.name"); } @Nullable public Icon getIcon() { return null; } @Nullable @NonNls public String getHelpTopic() { return null; } public JComponent createComponent() { return myForm.getPanel(); } public boolean isModified() { return myForm.isModified(getCoreSettings()); } public void apply() throws ConfigurationException { myForm.setData(getCoreSettings()); } public void reset() { myForm.getData(getCoreSettings()); } public void disposeUIResources() { } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
a0a77100a6449d3de6c45a5f6a04df3da3e7f389
4d9629467b331e1a8fa39834c34b76c5f7fb2b22
/LeetCode_Nowcoder/src/day27_200110/Main1.java
c73e90ac85b86784ba420a4ff9b78628a43f410e
[]
no_license
kangwubin/XATU_Bit_JavaSE
c634e8adc25e15d1631dd3e8daa75a6a132fc425
08ce305d584fd0709271a8f140cdf1b210aca0db
refs/heads/master
2020-09-07T10:42:25.592354
2020-08-01T10:27:39
2020-08-01T10:27:39
220,754,088
0
1
null
null
null
null
UTF-8
Java
false
false
1,085
java
package day27_200110; import java.util.Scanner; /** * Description: * * @author: KangWuBin * @Date: 2020/1/10 * @Time: 14:40 */ public class Main1 { /* 输入一个数n,然后输入n个数值各不相同,再输·入一个值x,输出这个值在这个数组中的下标(从 0开始,若不在数组中则输出-1)。 * 输入:测试数据有多组,输入n (1<=n<=200) ,接着输入n个数,然后输入x。 * 输出:对于每组输入,请输出结果。*/ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int n = scanner.nextInt(); int[] numbers = new int[n]; for (int i = 0; i < n; i++) { numbers[i] = scanner.nextInt(); } int key = scanner.nextInt(); int ret = -1; for (int i = 0; i < n; i++) { if (key == numbers[i]) { ret = i; break; } } System.out.println(ret); } } }
[ "2624656980@qq.com" ]
2624656980@qq.com
8933eea76d20aaf1b98beeb0acd607c77dbec599
de806161d50f53f4b4249d5ea53ddddc82bfd3f6
/Bench4Q_SUT/DB2_SUT/branches/db2_v1/src/org/bench4Q/servlet/order_inquiry_servlet.java
4d206c095b363c44fde23d03d44df524dc59584b
[]
no_license
lijianfeng941227/Bench4Q-TPCW
1ad2141fd852ad88c6db3ed8ae89a56f2fdb0ecc
2e1c84d1bf1d6cdad4b19a348daf85b59e4f1ce4
refs/heads/master
2021-01-11T05:43:33.312249
2016-04-07T01:58:01
2016-04-07T01:58:01
71,343,265
1
0
null
2016-10-19T09:55:21
2016-10-19T09:55:21
null
UTF-8
Java
false
false
3,687
java
/** * * Create at: 2009-5-14 * @version: 1.0 * * * Copyright Technology Center for Software Engineering,Institute of Software, Chinese Academy of Sciences * and distributed according to the GNU Lesser General Public Licence. * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or any * later version. * See Copyright.txt for full copyright information. * * * http://otc.iscas.ac.cn/ * Technology Center for Software Engineering * Institute of Software, Chinese Academy of Sciences * Beijing 100190, China * * This version is a based on the implementation from University of Wisconsin * * * * Initial developer(s): Zhiquan Duan, Wei Wang. * */ package org.bench4Q.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class order_inquiry_servlet extends HttpServlet { private static final long serialVersionUID = 1L; @Override public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { HttpSession session = req.getSession(false); PrintWriter out = res.getWriter(); // Set the content type of this servlet's result. res.setContentType("text/html"); String username = ""; String url; String C_ID = req.getParameter("C_ID"); String SHOPPING_ID = req.getParameter("SHOPPING_ID"); out.print("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD W3 HTML//EN\">\n"); out.print("<HTML><HEAD><TITLE>Order Inquiry Page</TITLE>\n"); out.print("</HEAD><BODY BGCOLOR=\"#ffffff\">\n"); out.print("<H1 ALIGN=\"center\">Bench4Q</H1>\n"); out.print("<H1 ALIGN=\"center\">A QoS oriented B2C benchmark for Internetware Middleware</H1>\n"); out.print("<H2 ALIGN=\"center\">Order Inquiry Page</H2>\n"); out.print("<FORM ACTION=\"order_display;$sessionid$" + req.getRequestedSessionId() + "\" METHOD=\"get\">\n"); out.print("<TABLE ALIGN=\"CENTER\">\n"); out.print("<TR> <TD> <H4>Username:</H4></TD>\n"); out.print("<TD><INPUT NAME=\"UNAME\" VALUE=\"" + username + "\" SIZE=\"23\"></TD></TR>\n"); out.print("<TR><TD> <H4>Password:</H4></TD>\n"); out.print("<TD> <INPUT NAME=\"PASSWD\" SIZE=\"14\" " + "TYPE=\"password\"></TD>\n"); out.print("</TR></TABLE> <P ALIGN=\"CENTER\"><CENTER>\n"); out.print("<INPUT TYPE=\"IMAGE\" NAME=\"Display Last Order\" " + "SRC=\"Images/display_last_order_B.gif\">\n"); if (SHOPPING_ID != null) out.print("<INPUT TYPE=HIDDEN NAME=\"SHOPPING_ID\" value = \"" + SHOPPING_ID + "\">\n"); if (C_ID != null) out.print("<INPUT TYPE=HIDDEN NAME=\"C_ID\" value = \"" + C_ID + "\">\n"); url = "search_request"; if (SHOPPING_ID != null) { url = url + "?SHOPPING_ID=" + SHOPPING_ID; if (C_ID != null) url = url + "&C_ID=" + C_ID; } else if (C_ID != null) url = url + "?C_ID=" + C_ID; out.print("<A HREF=\"" + res.encodeUrl(url)); out.print("\"><IMG SRC=\"Images/search_B.gif\" " + "ALT=\"Search\"></A>\n"); url = "home"; if (SHOPPING_ID != null) { url = url + "?SHOPPING_ID=" + SHOPPING_ID; if (C_ID != null) url = url + "&C_ID=" + C_ID; } else if (C_ID != null) url = url + "?C_ID=" + C_ID; out.print("<A HREF=\"" + res.encodeUrl(url)); out.print("\"><IMG SRC=\"Images/home_B.gif\" " + "ALT=\"Home\"></A></P></CENTER>\n"); out.print("</CENTER></FORM></BODY></HTML>"); out.close(); return; } }
[ "silenceofdaybreak@gmail.com" ]
silenceofdaybreak@gmail.com
8a81598a138c8eede34af5dd0dcef59b68ead150
f45f13360e35f7c72d83811d73448dc833208f0d
/Spring/si.retoproext/src/pe/gob/mtpe/retorno/bean/Discapacidad.java
303ff89df2ce3cc234b20da57ee0f1cf1eaa610e
[]
no_license
cequattro/obras
f42c78de62e55b562c6d98fe12b83245c0738ac0
f0090b73fce499cc349fcc7d6659c6b1082164df
refs/heads/master
2021-01-13T09:50:28.833568
2020-02-11T22:28:09
2020-02-11T22:28:09
72,766,955
0
0
null
null
null
null
UTF-8
Java
false
false
1,089
java
package pe.gob.mtpe.retorno.bean; public class Discapacidad { /** * String vCoddiscap * CODIGO DISCAPACIDAD */ private String vCoddiscap; /** * String vDesdiscap * DESCRIPCION DISCAPACIDAD */ private String vDesdiscap; /** * String vEstreg * ESTADO DEL REGISTRO 1:ACTIVO 0:INACTIVO */ private String vEstreg; /** * String dFecreg * FECHA DE REGISTRO */ private String dFecreg; public String getvCoddiscap() { return vCoddiscap; } public void setvCoddiscap(String vCoddiscap) { this.vCoddiscap = vCoddiscap; } public String getvDesdiscap() { return vDesdiscap; } public void setvDesdiscap(String vDesdiscap) { this.vDesdiscap = vDesdiscap; } public String getvEstreg() { return vEstreg; } public void setvEstreg(String vEstreg) { this.vEstreg = vEstreg; } public String getdFecreg() { return dFecreg; } public void setdFecreg(String dFecreg) { this.dFecreg = dFecreg; } }
[ "cequattro@gmail.com" ]
cequattro@gmail.com
e971274caf94480082fa8235912bbaabcd28af76
e65bee7d02ef8d1e2009e0d92056accfc9e92b5c
/src/test/java/com/sylla/myapp/web/rest/errors/ExceptionTranslatorTestController.java
cf02d3ae6578ac0c937c10b8e10b76a90c09089c
[]
no_license
doudousylla/jhipster-micro-service
095cdc487fa167deb3fd4b3ca86a6daa109a9427
345a59d77fd4a1d50b7f2cb8afbb8b9e8d033495
refs/heads/master
2020-09-15T21:48:24.770338
2019-11-23T09:24:37
2019-11-23T09:24:37
223,563,177
0
0
null
2020-01-31T18:26:20
2019-11-23T09:24:28
Java
UTF-8
Java
false
false
1,852
java
package com.sylla.myapp.web.rest.errors; import org.springframework.http.HttpStatus; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import javax.validation.constraints.NotNull; @RestController public class ExceptionTranslatorTestController { @PostMapping("/test/method-argument") public void methodArgument(@Valid @RequestBody TestDTO testDTO) { } @GetMapping("/test/missing-servlet-request-part") public void missingServletRequestPartException(@RequestPart String part) { } @GetMapping("/test/missing-servlet-request-parameter") public void missingServletRequestParameterException(@RequestParam String param) { } @GetMapping("/test/access-denied") public void accessdenied() { throw new AccessDeniedException("test access denied!"); } @GetMapping("/test/unauthorized") public void unauthorized() { throw new BadCredentialsException("test authentication failed!"); } @GetMapping("/test/response-status") public void exceptionWithResponseStatus() { throw new TestResponseStatusException(); } @GetMapping("/test/internal-server-error") public void internalServerError() { throw new RuntimeException(); } public static class TestDTO { @NotNull private String test; public String getTest() { return test; } public void setTest(String test) { this.test = test; } } @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") @SuppressWarnings("serial") public static class TestResponseStatusException extends RuntimeException { } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f2eff163ab46a4cdb383e9b5664fba6ad319423f
737253197104a69ec973836c2b5b5d6dd811270f
/app/src/main/java/com/zys/jym/lanhu/service/UpdateService.java
3808da9a6221fd43051dbae3ea110c794a43fe83
[]
no_license
bailyzheng/lanhu1
12484164dd81535ee6b8656e3cbf692b9133fd5b
af35117804956ae7517abeb97238a61794f74381
refs/heads/master
2020-12-03T00:00:14.649537
2017-06-30T10:13:35
2017-06-30T10:13:35
95,970,978
0
0
null
2017-07-01T15:04:16
2017-07-01T15:04:16
null
UTF-8
Java
false
false
4,731
java
package com.zys.jym.lanhu.service; import android.app.Notification; import android.app.NotificationManager; import android.app.Service; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Environment; import android.os.IBinder; import android.widget.RemoteViews; import com.zhy.http.okhttp.OkHttpUtils; import com.zhy.http.okhttp.callback.FileCallBack; import com.zys.jym.lanhu.App; import com.zys.jym.lanhu.R; import com.zys.jym.lanhu.utils.MyUtils; import com.zys.jym.lanhu.utils.TimeUtil; import java.io.File; import okhttp3.Call; /** * Created by Administrator on 2017/1/6. */ public class UpdateService extends Service { String TAG="TAG--UpdateService"; private NotificationManager nm; private Notification notification; private RemoteViews views; private int notificationId = 0x123; int i=0; App app; @Override public IBinder onBind(Intent intent) { return null; } @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); } @Override public int onStartCommand(Intent intent, int flags, int startId) { app= (App) getApplicationContext(); nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); notification = new Notification(); notification.icon = android.R.drawable.stat_sys_download; //notification.icon=android.R.drawable.stat_sys_download_done; notification.tickerText = getString(R.string.app_name) + "更新"; notification.when = System.currentTimeMillis(); notification.defaults = Notification.DEFAULT_LIGHTS; //设置任务栏中下载进程显示的views views = new RemoteViews(getPackageName(), R.layout.view_nf_update); notification.contentView = views; // PendingIntent contentIntent=PendingIntent.getActivity(this,0,new Intent(this,City.class),0); // notification.setLatestEventInfo(this,"","", contentIntent); //将下载任务添加到任务栏中 nm.notify(notificationId, notification); //启动线程开始执行下载任务 downFile(); return super.onStartCommand(intent, flags, startId); } //下载更新文件 private void downFile() { String url=app.getmNewApkData().getUrl(); MyUtils.Loge(TAG,"URL="+url); OkHttpUtils .get() .url(url) .build() .execute(new FileCallBack(Environment.getExternalStorageDirectory().getAbsolutePath() + "/lh/", "lhws_"+ TimeUtil.getTimeStamp()+".apk") { @Override public void inProgress(float progress, long l) { // MyUtils.Loge(TAG,"+progress="+progress); if ((progress*100)>=(2*i)){ i++; views.setTextViewText(R.id.tv_process, "已下载" + MyUtils.Intercept_Int_Point(progress*100+"") + "%"); views.setProgressBar(R.id.pb_download, 100, MyUtils.Str2Int(MyUtils.Intercept_Int_Point(progress*100+"")), false); notification.contentView = views; nm.notify(notificationId, notification); } } @Override public void onError(Call call, Exception e) { i=0; MyUtils.Loge(TAG,e.toString()); nm.cancel(notificationId); } @Override public void onResponse(File file) { //下载完成后清除所有下载信息,执行安装提示 i=0; nm.cancel(notificationId); Instanll(file, UpdateService.this); //停止掉当前的服务 stopSelf(); } }); } //安装下载后的apk文件 private void Instanll(File file, Context context) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive"); context.startActivity(intent); } @Override public void onDestroy() { try { nm.cancel(notificationId); //停止掉当前的服务 stopSelf(); }catch (Exception e){ } super.onDestroy(); } }
[ "867814102@qq.com" ]
867814102@qq.com
c62eaf45b880ad2e41aa6ab92f9e4fe12ccf0cef
308b3f320c5bc53091725dfa40460505ab7b5555
/Utilities/src/main/java/org/softwareFm/utilities/maps/ArraySimpleMap.java
0d2ce7b68a77647a51f9554a755f3bc1e5cd68d3
[]
no_license
phil-rice/Arc4Eclipse
75134c3032a9d9173fef551c326686a7ca28bb8a
95948538ceac12f9793546b1ed85cd0bca8a34d0
refs/heads/master
2020-04-19T15:52:38.952070
2011-09-09T10:57:41
2011-09-09T10:57:41
2,031,297
0
0
null
null
null
null
UTF-8
Java
false
false
1,284
java
package org.softwareFm.utilities.maps; import java.lang.reflect.Array; import java.util.List; import org.softwareFm.utilities.annotations.TightLoop; /** * This is on object identity simple map backed by an array. The allowed values of K are defined at the start. It is intended that this is a very fast object to use, and it can easily be pooled. */ public class ArraySimpleMap<K, V> implements ISimpleMap<K, V> { protected List<K> keys; protected V[] values; @SuppressWarnings("unchecked") public ArraySimpleMap(List<K> keys, Class<V> valueClass) { this.keys = keys; values = (V[]) Array.newInstance(valueClass, keys.size()); }; @TightLoop public V get(K key) { for (int i = 0; i < keys.size(); i++) if (key == keys.get(i))// object equality is very fast compared to equals. So check all the equalities before starting on the equals return values[i]; for (int i = 0; i < keys.size(); i++) if (key.equals(keys.get(i))) return values[i]; return null; } public List<K> keys() { return keys; } /** This is intended to allow the pooling software to reset the values */ public V[] getValues() { return values; } public void setValuesFrom(List<V> values) { for (int i = 0; i < keys.size(); i++) this.values[i] = values.get(i); } }
[ "phil.rice@iee.org" ]
phil.rice@iee.org
920ca74e88c2b45cef885d04a71f9c40b3bb1e7d
04cc53efc476a5dbb7f1dfc35600e3eeaf54316b
/jframe-core/src/main/java/com/jf/system/db/DataConfig.java
ec1a204401d458565351ce55eaf68a4e02f3dbd3
[ "BSD-3-Clause" ]
permissive
jacksonrick/JFrameBoot
eb57390a6ae0ab3f11bdda62ab7309a52b7825d8
7bb6d3b35ed6bcae1851f1536fe5644183399945
refs/heads/master
2021-05-13T21:13:51.513239
2020-09-04T01:53:34
2020-09-04T01:53:34
116,456,932
7
3
BSD-3-Clause
2021-04-13T02:41:46
2018-01-06T05:40:54
JavaScript
UTF-8
Java
false
false
6,118
java
package com.jf.system.db; import com.github.pagehelper.PageInterceptor; import com.jf.commons.LogManager; import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.boot.autoconfigure.SpringBootVFS; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.Advisor; import org.springframework.aop.aspectj.AspectJExpressionPointcut; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.interceptor.*; import javax.sql.DataSource; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Properties; /** * Created with IntelliJ IDEA. * Description: DB数据源、Mybatis|Plugins、事务 * User: xujunfei * Date: 2017-11-28 * Time: 10:43 * * @version 2.0 */ @Configuration @MapperScan(basePackages = {DataConfig.mapperPackage, DataConfig.mapperOtherPackage}, sqlSessionFactoryRef = "sqlSessionFactory") @EnableTransactionManagement public class DataConfig { private Logger logger = LoggerFactory.getLogger(DataConfig.class); public final static String mapperPackage = "com.jf.database.mapper"; public final static String mapperOtherPackage = "com.jf.mapper"; public final static String modelPackage = "com.jf.database.model"; public final static String xmlMapperLocation = "classpath*:mapper/**/*.xml"; @Bean(name = "sqlSessionFactory") @Primary public SqlSessionFactory sqlSessionFactory(DataSource dataSource) { try { SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); bean.setDataSource(dataSource); // we MUST set the 'VFS' if you use jar bean.setVfs(SpringBootVFS.class); // 实体类位置 bean.setTypeAliasesPackage(modelPackage); // 设置mapper.xml文件所在位置 org.springframework.core.io.Resource[] resources = new PathMatchingResourcePatternResolver().getResources(xmlMapperLocation); bean.setMapperLocations(resources); // 添加分页插件 PageInterceptor pageHelper = new PageInterceptor(); Properties p = new Properties(); p.setProperty("helperDialect", "mysql"); // 数据库方言,注意如果是pg数据库,请替换为postgresql p.setProperty("supportMethodsArguments", "true"); p.setProperty("params", "pageNum=pageNo;pageSize=pageSize;"); pageHelper.setProperties(p); Interceptor[] plugins = new Interceptor[]{pageHelper}; bean.setPlugins(plugins); return bean.getObject(); } catch (Exception e) { logger.error("Database sqlSessionFactory create error!", e); return null; } } @Bean(name = "sqlSessionTemplate") @Primary public SqlSessionTemplate sqlSessionTemplate(@Qualifier("sqlSessionFactory") SqlSessionFactory sqlSessionFactory) { return new SqlSessionTemplate(sqlSessionFactory); } /** * 事务管理 * * @return */ @Bean(name = "platformTransactionManager") @Primary public PlatformTransactionManager platformTransactionManager(DataSource dataSource) { return new DataSourceTransactionManager(dataSource); } /** * 声明式事务 * * @param platformTransactionManager * @return */ //@Bean(name = "txInterceptor") //@Primary public TransactionInterceptor transactionInterceptor(@Qualifier("platformTransactionManager") PlatformTransactionManager platformTransactionManager) { LogManager.info("txInterceptor init...", getClass()); NameMatchTransactionAttributeSource source = new NameMatchTransactionAttributeSource(); /* 只读事务,不做更新操作 */ RuleBasedTransactionAttribute readOnlyTx = new RuleBasedTransactionAttribute(); readOnlyTx.setReadOnly(true); readOnlyTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_NOT_SUPPORTED); /* 当前存在事务就使用当前事务,当前不存在事务就创建一个新的事务 */ RuleBasedTransactionAttribute requiredTx = new RuleBasedTransactionAttribute(); requiredTx.setRollbackRules(Collections.singletonList(new RollbackRuleAttribute(Exception.class))); requiredTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); requiredTx.setTimeout(5); Map<String, TransactionAttribute> txMap = new HashMap<>(); txMap.put("add*", requiredTx); txMap.put("save*", requiredTx); txMap.put("insert*", requiredTx); txMap.put("update*", requiredTx); txMap.put("delete*", requiredTx); txMap.put("get*", readOnlyTx); txMap.put("query*", readOnlyTx); source.setNameMap(txMap); TransactionInterceptor interceptor = new TransactionInterceptor(platformTransactionManager, source); return interceptor; } //@Bean public Advisor txAdviceAdvisor(@Qualifier("txInterceptor") TransactionInterceptor transactionInterceptor) { AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut(); pointcut.setExpression("execution (* com.jf.service.*.*(..))"); return new DefaultPointcutAdvisor(pointcut, transactionInterceptor); } }
[ "809573150@qq.com" ]
809573150@qq.com
786fdff774bd6731ab18d8498fd0512995e97d29
35c8eec665c0b34871024b58c5dba0f00b4e2830
/program/src/main/java/com/microsoft/z3/AstMapDecRefQueue.java
f4c6b2ab5420e942d1f7380dc8b403d72cf86202
[ "CC-BY-4.0" ]
permissive
foens/dash
24ee374df51ee22e2bcc8deaa9714d7b7f95991d
d45a044c2854ee6636c1f0a1fab556e56cf185a7
refs/heads/master
2021-01-25T04:52:53.692761
2015-05-02T13:16:50
2015-05-02T13:16:50
12,943,347
2
0
null
null
null
null
UTF-8
Java
false
false
588
java
/** * Copyright (c) 2012 Microsoft Corporation * @author Christoph M. Wintersteiger (cwinter) **/ package com.microsoft.z3; class ASTMapDecRefQueue extends IDecRefQueue { protected void incRef(Context ctx, long obj) { try { Native.astMapIncRef(ctx.nCtx(), obj); } catch (Z3Exception e) { // OK. } } protected void decRef(Context ctx, long obj) { try { Native.astMapDecRef(ctx.nCtx(), obj); } catch (Z3Exception e) { // OK. } } };
[ "kfoens@gmail.com" ]
kfoens@gmail.com
58131e70d64223079d8d52c1fc160ee263f36602
488eb21b4bf318ee0ebc7303f3b85a32eb99e89c
/s13-bridge/src/main/java/com/coffeepoweredcrew/bridge/e2/TextMessage.java
a54ebe0d393b7a4e220a399d22c33858492f2344
[]
no_license
alperarabaci/design-patterns
a2b8d18769a2c23a51b0aed4f3e06ea067fff6c3
ceda46cadd71eda3f8a922179550cd5ca4a0fb70
refs/heads/master
2023-01-07T15:29:27.934072
2020-11-11T10:15:58
2020-11-11T10:15:58
289,209,149
1
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.coffeepoweredcrew.bridge.e2; public class TextMessage extends Message { public TextMessage(MessageSender messageSender) { super(messageSender); } @Override public void send() { messageSender.sendMessage(); } }
[ "melihalper.arabaci@gmail.com" ]
melihalper.arabaci@gmail.com
b64ebf45f192505f86a01a8b1e06ddd892e29c27
d52a6140813140e83a84f2d04efe15a2f67c259d
/tensquare-parent/tensquare-common/src/main/java/com/ssw/entity/PageResult.java
32265dcd3b6a1e6620b542668b47964bc7eeaaae
[]
no_license
aixiaoqie/tensquare
2185a2a1ddf3ded8854c8f68cfb248aa9df20ce0
4ef75c0e23b8624b30b4584b41662c62cc82fbcb
refs/heads/master
2022-07-19T11:00:50.349839
2020-03-19T07:32:40
2020-03-19T07:32:40
223,129,377
1
0
null
2022-06-21T02:55:11
2019-11-21T08:49:50
Java
UTF-8
Java
false
false
640
java
package com.ssw.entity; import java.util.List; /** * @author ssw * @description 分页查询返回结果 * @date 2019/11/21 * @time 14:22 */ public class PageResult<T> { private Long total; private List<T> rows; public Long getTotal() { return total; } public void setTotal(Long total) { this.total = total; } public List<T> getRows() { return rows; } public void setRows(List<T> rows) { this.rows = rows; } public PageResult() { } public PageResult(Long total, List<T> rows) { this.total = total; this.rows = rows; } }
[ "2390734879@qq.com" ]
2390734879@qq.com
1ddeef6196a731642beafd0da9e958eb06fa4233
9e89bbb5fe80d42dcd54fcaa9788725d3ad83b6c
/src/interfaces/InternetConnection.java
ea7caa4500e2db0f8fa7cb8dc09df8e76c186e2f
[]
no_license
UnitecSPS/Programacion2_1_2_2014
b69a3261b9383ed3b4d12796b7d052ae8fdf9d77
f0c6851c4c77e3089e0a04714cd71c4def13668a
refs/heads/master
2020-05-27T04:36:01.751999
2014-06-12T14:04:50
2014-06-12T14:04:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package interfaces; /** * * @author Docente 17082011 */ public interface InternetConnection { int VERSION=112333; boolean makeConnection(); int httpResultCode(); String getDeviceType(); }
[ "cgotcha@gmail.com" ]
cgotcha@gmail.com
46d7481c05635656f28d27bab77af72b8a404779
dba87418d2286ce141d81deb947305a0eaf9824f
/sources/kotlin/p055io/FilesKt__FileReadWriteKt$readLines$1.java
75cd23ca25924c3ea18fd0e2f3383f54f672bd94
[]
no_license
Sluckson/copyOavct
1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6
d20597e14411e8607d1d6e93b632d0cd2e8af8cb
refs/heads/main
2023-03-09T12:14:38.824373
2021-02-26T01:38:16
2021-02-26T01:38:16
341,292,450
0
1
null
null
null
null
UTF-8
Java
false
false
1,310
java
package kotlin.p055io; import java.util.ArrayList; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; import org.jetbrains.annotations.NotNull; @Metadata(mo66931bv = {1, 0, 3}, mo66932d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, mo66933d2 = {"<anonymous>", "", "it", "", "invoke"}, mo66934k = 3, mo66935mv = {1, 1, 16}) /* renamed from: kotlin.io.FilesKt__FileReadWriteKt$readLines$1 */ /* compiled from: FileReadWrite.kt */ final class FilesKt__FileReadWriteKt$readLines$1 extends Lambda implements Function1<String, Unit> { final /* synthetic */ ArrayList $result; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ FilesKt__FileReadWriteKt$readLines$1(ArrayList arrayList) { super(1); this.$result = arrayList; } public /* bridge */ /* synthetic */ Object invoke(Object obj) { invoke((String) obj); return Unit.INSTANCE; } public final void invoke(@NotNull String str) { Intrinsics.checkParameterIsNotNull(str, "it"); this.$result.add(str); } }
[ "lucksonsurprice94@gmail.com" ]
lucksonsurprice94@gmail.com
06870435d8f1137016f59241fa6e68ea08b44f71
a3da6bd637c3cc0d60236ede3862d2da70b97ceb
/service-app/src/main/java/com/eshop/serviceapp/model/MemberBpHistory.java
a00c46d280807f3f73011438a4d8524a58dcf1e8
[]
no_license
CocoaK/comeshop
28c4e42a27ade9602a26b87869a33fc10e5ab4ae
b4756092d5a0f929aa90034052a8f7010b73dd81
refs/heads/master
2020-03-26T08:36:45.720931
2018-09-18T12:35:14
2018-09-18T12:35:14
144,711,078
0
0
null
null
null
null
UTF-8
Java
false
false
2,919
java
package com.eshop.serviceapp.model; import java.util.Date; public class MemberBpHistory extends BaseModel { private Integer integrationId; private Integer memberId; private Integer integration; private Integer preIntegration; private Integer afterIntegration; private Date eventTime; private String eventType; private String eventBy; private String createdBy; private Date createdDate; private String lastUpdatedBy; private Date lastUpdatedDate; private String rowId; public Integer getIntegrationId() { return integrationId; } public void setIntegrationId(Integer integrationId) { this.integrationId = integrationId; } public Integer getMemberId() { return memberId; } public void setMemberId(Integer memberId) { this.memberId = memberId; } public Integer getIntegration() { return integration; } public void setIntegration(Integer integration) { this.integration = integration; } public Integer getPreIntegration() { return preIntegration; } public void setPreIntegration(Integer preIntegration) { this.preIntegration = preIntegration; } public Integer getAfterIntegration() { return afterIntegration; } public void setAfterIntegration(Integer afterIntegration) { this.afterIntegration = afterIntegration; } public Date getEventTime() { return eventTime; } public void setEventTime(Date eventTime) { this.eventTime = eventTime; } public String getEventType() { return eventType; } public void setEventType(String eventType) { this.eventType = eventType == null ? null : eventType.trim(); } public String getEventBy() { return eventBy; } public void setEventBy(String eventBy) { this.eventBy = eventBy == null ? null : eventBy.trim(); } public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy == null ? null : createdBy.trim(); } public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } public String getLastUpdatedBy() { return lastUpdatedBy; } public void setLastUpdatedBy(String lastUpdatedBy) { this.lastUpdatedBy = lastUpdatedBy == null ? null : lastUpdatedBy.trim(); } public Date getLastUpdatedDate() { return lastUpdatedDate; } public void setLastUpdatedDate(Date lastUpdatedDate) { this.lastUpdatedDate = lastUpdatedDate; } public String getRowId() { return rowId; } public void setRowId(String rowId) { this.rowId = rowId == null ? null : rowId.trim(); } }
[ "kyq001@gmail.com" ]
kyq001@gmail.com
16ea44ef89c170c0f00454dd01e5cc7eb69863dd
5e28167d8e3ce18698f9d67466b3c5ce8a0f1659
/authentication-service/src/main/java/com/micro/authenticationservice/WebSecurityConfig.java
b5e1cc229a46e00dccd08e7c4a86c5dd2885fb81
[]
no_license
dickanirwansyah/spring-cloud-oauth2-zuul-proxy
9e2b6fb035ff57eb996b491c9d7594663cdb2efa
d9f7f3780b1a85e553bbce7288e432d77324ea54
refs/heads/master
2020-04-06T19:58:21.772454
2018-11-15T18:48:23
2018-11-15T18:48:23
157,756,444
0
0
null
null
null
null
UTF-8
Java
false
false
841
java
package com.micro.authenticationservice; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration //@EnableWebSecurity @Order(-5) public class WebSecurityConfig extends WebSecurityConfigurerAdapter{ @Override protected void configure(HttpSecurity security) throws Exception{ security.requestMatchers() .antMatchers("/login", "/oauth/authorize", "/oauth/confirm_access") .and().authorizeRequests().anyRequest().authenticated() .and().formLogin().loginPage("/login").permitAll(); } }
[ "dicka.nirwansyah@fusi24.com" ]
dicka.nirwansyah@fusi24.com
b8df568cc88817d49f942c712f57040c05d12942
796b2a20eaa6c3ae23041b02b646170550f87e3c
/app/src/main/java/com/vn/ntsc/app/ActionParam.java
4b3066ae3dd6992f032cb208f512924a63f3f260
[]
no_license
vinhnb90/NationalTrafficSocialAndroid
f3bca20789d340b7bdbb9781d734949c31184457
b14029f8977c81b0966309d669693cedfac65aba
refs/heads/master
2020-03-19T20:44:55.945975
2018-06-11T11:09:13
2018-06-11T11:09:13
136,914,888
0
0
null
null
null
null
UTF-8
Java
false
false
987
java
package com.vn.ntsc.app; public class ActionParam { // Act key - value public static final String TOP = "toppage"; public static final String MY_PROFILE = "myprofile"; public static final String USER_PROFILE = "otherprofile"; public static final String USER_PROFILE_ID = USER_PROFILE + "-"; public static final String MY_PAGE = "mypage"; public static final String GOOGLE_PLAY_PAGE = "googleplay"; public static final String APPLE_STORE = "appstore"; public static final String TERMS = "terms"; public static final String PRIVACY = "privacy"; public static final String CLOSE_APP = "close"; public static final String CALL_SETTING = "telconfig"; public static final String FOLLOWER = "follower"; public static final String TIMELINE = "timeline"; // Act login public static final String LOGIN_MOCOM = "mocomlogin"; public static final String MOCOM_ID = "mocom_id"; public static final String LOGIN_FAMU = "famulogin"; public static final String FAMU_ID = "famu_id"; }
[ "nbvinh.it@gmail.com" ]
nbvinh.it@gmail.com
c5bd11a92503a1c85e358e512a0d34fa4cd7d32a
9b5cc7a95bb2a8d2a18c0bd5d8aba55218f3147a
/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/TernaryExpression.java
40dd9b6e9403abceaf82336faa83bb0be455ef1f
[]
no_license
linshuguang/myspark
c847567e61d7d35105e06f6a195f81beaf192aa0
2403c45eb94c220f2133841c47792be914c07327
refs/heads/master
2020-04-23T20:45:39.873546
2019-04-26T10:08:39
2019-04-26T10:08:39
171,450,328
1
0
null
null
null
null
UTF-8
Java
false
false
157
java
package org.apache.spark.sql.catalyst.expressions; /** * Created by kenya on 2019/2/22. */ public abstract class TernaryExpression extends Expression { }
[ "linshuguang@xiaomi.com" ]
linshuguang@xiaomi.com
460b9cf58ed9c03870d51a903bfe9275387d192c
bc2bb51284be3ed335b06ded2085ec6ff97136b7
/src/main/java/wholemusic/core/provider/yiting/YitingAlbum.java
80d7e30eaa501a500a8948e8dba6e292bd815988
[ "Apache-2.0" ]
permissive
sakura-fly/WholeMusic
8286d82c76d847035291d3ce8772029f26ad7165
c1784187eb892419338e01cf4910b8855add5a4f
refs/heads/master
2020-04-07T12:17:17.900711
2018-03-17T08:30:41
2018-03-17T08:30:41
158,361,478
3
0
null
2018-11-20T09:12:43
2018-11-20T09:12:42
null
UTF-8
Java
false
false
1,385
java
package wholemusic.core.provider.yiting; import com.alibaba.fastjson.annotation.JSONField; import wholemusic.core.api.MusicProvider; import wholemusic.core.model.Album; import wholemusic.core.model.Artist; import wholemusic.core.model.BaseBean; import wholemusic.core.model.Song; import wholemusic.core.util.SongUtils; import java.util.List; /** * Created by haohua on 2018/2/11. */ @SuppressWarnings("SpellCheckingInspection") class YitingAlbum extends BaseBean implements Album { public String name; public String id; @JSONField(name = "artists") public List<YitingArtist> artists; public List<YitingSong> songs; @Override public String getName() { return name; } @Override public String getAlbumId() { return id; } @Override public List<? extends Song> getSongs() { return songs; } public void setSongs(List<YitingSong> songs) { this.songs = songs; } @Override public List<? extends Artist> getArtists() { return artists; } public void setArtists(List<YitingArtist> artists) { this.artists = artists; } @Override public String getFormattedArtistsString() { return SongUtils.getArtistsString(getArtists()); } @Override public MusicProvider getMusicProvider() { return MusicProvider.Yiting; } }
[ "eggfly@qq.com" ]
eggfly@qq.com
3d02526aabeb5c6a14a869a52b250b252e8a26bb
b796867c5ff3a5044ec2cd086741193ec2eefd09
/wildfly/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestTEIID5686.java
566e6628eef360aab199cbb4f5bcb3401fba0f00
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
teiid/teiid
56971cbdc8910b51019ba184b8bb1bb054ff6a47
3de2f782befef980be5dc537249752e28ad972f7
refs/heads/master
2023-08-19T06:32:20.244837
2022-03-10T17:49:34
2022-03-10T17:49:34
6,092,163
277
269
NOASSERTION
2023-01-04T18:50:23
2012-10-05T15:21:04
Java
UTF-8
Java
false
false
4,931
java
package org.teiid.dqp.internal.process; import static org.junit.Assert.*; import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import javax.sql.DataSource; import org.junit.After; import org.junit.Test; import org.mockito.Mockito; import org.teiid.adminapi.Model.Type; import org.teiid.adminapi.impl.ModelMetaData; import org.teiid.runtime.EmbeddedConfiguration; import org.teiid.runtime.EmbeddedServer; import org.teiid.runtime.HardCodedExecutionFactory; import org.teiid.translator.ExecutionContext; import org.teiid.translator.TranslatorException; @SuppressWarnings("nls") public class TestTEIID5686 { private EmbeddedServer es; @After public void after() { es.stop(); } @Test public void testJoinPlanInProcedureLoop() throws Exception { es = new EmbeddedServer(); es.start(new EmbeddedConfiguration()); HardCodedExecutionFactory ef = new HardCodedExecutionFactory() { @Override public Object getConnection(Object factory, ExecutionContext executionContext) throws TranslatorException { return null; } }; ef.setSupportsInnerJoins(true); List<List<? extends Object>> e = Arrays.asList( Arrays.asList ("test", 1234), Arrays.asList ("abcde", 1111), Arrays.asList ("abtest", 2222), Arrays.asList ("testab", 3333), Arrays.asList ("abtestab", 4444)); ef.addData("SELECT test_e.e FROM test_e", e.stream().map(l->l.subList(0, 1)).collect(Collectors.toList())); List<List<Integer>> a = Arrays.asList( Arrays.asList (1, 1), Arrays.asList (1, 2), Arrays.asList (2, 1), Arrays.asList (2, 2), Arrays.asList (3, 2), Arrays.asList (3, 10)); ef.addData("SELECT test_a.a, test_a.b FROM test_a", a); ef.addData( "SELECT test_e.e, test_e.f, test_a.a, test_a.b FROM test_e, test_a", e.stream().flatMap(l -> a.stream().map(a_row -> { ArrayList<Object> row = new ArrayList<>(); row.addAll(l); row.addAll(a_row); return row; })).collect(Collectors.toList())); es.addTranslator("pg", ef); es.addConnectionFactory("pg", Mockito.mock(DataSource.class)); ModelMetaData physical = new ModelMetaData(); physical.setName("test_tables_pg"); physical.addSourceMetadata("ddl", "\n" + "CREATE foreign TABLE test_a\n" + "(\n" + " a integer,\n" + " b integer\n" + ") options (cardinality 5);\nCREATE foreign TABLE test_e\n" + "(\n" + " e varchar(254),\n" + " f integer\n" + ") options (cardinality 6);"); physical.addSourceMapping("physical", "pg", "pg"); ModelMetaData virtual = new ModelMetaData(); virtual.setModelType(Type.VIRTUAL); virtual.setName("views"); virtual.addSourceMetadata("ddl", "create view v as\n" + " select *\n" + " from(\n" + " select e\n" + " from \"test_tables_pg.test_e\" tb1, TEXTTABLE(tb1.e COLUMNS col1 string) x\n" + " ) t \n" + " join \"test_tables_pg.test_a\" tb2 \n" + " on true"); es.deployVDB("vdb", physical, virtual); Connection c = es.getDriver().connect("jdbc:teiid:vdb", null); Statement s = c.createStatement(); s.executeQuery("begin\n" + " declare integer i=0;\n" + " while (i < 2)\n" + " begin\n" + " select * \n" + " from \"test_tables_pg.test_a\" t0\n" + " JOIN \"test_tables_pg.test_e\" t1\n" + " ON true\n" + " JOIN \"test_tables_pg.test_e\" t2\n" + " ON true\n" + " JOIN views.v t3\n" + " on true\n" + " JOIN views.v t4\n" + " on true\n" + " limit 257 ;\n" + " i=i+1;\n" + " end\n" + "end"); ResultSet rs = s.getResultSet(); int count = 0; while (rs.next()) { count++; } s.close(); assertEquals(257, count); } }
[ "shawkins@redhat.com" ]
shawkins@redhat.com
9b3d047637de010c19d2058080eec0c72c76d539
27f6a988ec638a1db9a59cf271f24bf8f77b9056
/Code-Hunt-data/users/User121/Sector1-Level5/attempt002-20140920-063031.java
9b043777687e4381e7709e1f2a23ecdbbc3a49a8
[]
no_license
liiabutler/Refazer
38eaf72ed876b4cfc5f39153956775f2123eed7f
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
refs/heads/master
2021-07-22T06:44:46.453717
2017-10-31T01:43:42
2017-10-31T01:43:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
164
java
public class Program { public static int Puzzle(int[] a) { int sum=0; for (int i=o;i<a.length;i++) { sum+=a[i]; } return sum; } }
[ "liiabiia@yahoo.com" ]
liiabiia@yahoo.com
737d64a9cd8cec456041a400e83f207cad644fe2
63d9e7683582b52fd1edbee460f35f797e892ad4
/src/main/java/gw/lang/cli/SystemExitIgnoredException.java
303e5ac5e76437bbc3aabe67a3f1ae10a9ddbde7
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
driedtoast/gosu-lang
2f1c9c08b7c2fdb10554645ee9634ec65281c60b
eb1b962b723adfe198d4e41e089add039646519b
refs/heads/master
2023-07-31T12:25:17.094738
2011-08-22T20:48:30
2011-08-22T20:48:30
2,251,131
0
1
null
null
null
null
UTF-8
Java
false
false
143
java
package gw.lang.cli; /** * Copyright 2010 Guidewire Software, Inc. */ public class SystemExitIgnoredException extends RuntimeException { }
[ "driedtoast@gmail.com" ]
driedtoast@gmail.com
2c94a9269d02ff28cca4a16410272dd42a00c319
d06f031a2c7cb37895d0dea7e1f49070a018f298
/src/main/java/okjiaoyu/qa/middle/auto/testcase/parentApp/parent/mj/Api1_4.java
b75afd72c3775be6b34f9e04bf376178c33146fb
[]
no_license
mylove132/monitor_middle_whole
398124830f96996f8acea63d21a0f135eb68fd61
4f8279a29b0351ddba3dc69116ae879ebf5a7820
refs/heads/master
2022-07-17T05:31:38.950432
2019-11-06T08:17:00
2019-11-06T08:17:00
219,944,397
0
0
null
2022-06-21T02:14:56
2019-11-06T08:10:23
Java
UTF-8
Java
false
false
1,014
java
package okjiaoyu.qa.middle.auto.testcase.parentApp.parent.mj; import com.alibaba.fastjson.JSONObject; import okjiaoyu.qa.middle.auto.testcase.parentApp.parent.ParentApp_parent; import org.testng.annotations.Test; import java.util.Map; /** * shenbingbing add * 获取知识详情 */ public class Api1_4 extends ParentApp_parent { @Override public String getRequestJsonString(Map<String, String> param) { JSONObject json = new JSONObject(); json.put( "token",account_token); json.put( "uid",account_uid); json.put( "k_id",param.get( "k_id" )); json.put( "k_type",param.get( "k_type" )); return json.toJSONString(); } @Test(dataProvider = "providerMethod", groups = {"normal"}) public void test(Map<String, String> param) { postRequestByJson(param); } @Test(dataProvider = "providerMethod", groups = {"exception"}) public void exceptionTest(Map<String, String> param) { postRequestByJson(param); } }
[ "liuzhanhui@okay.cn" ]
liuzhanhui@okay.cn
9062600c3ccaa3ae6a26b6e6f5069647ebd9c367
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/iText/rev2818-3625/right-branch-3625/core/com/lowagie/text/xml/SAXmyHandler.java
1446b0d0a3412865cb5cf590d451cc21d2e7d698
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
1,297
java
package com.lowagie.text.xml; import java.util.HashMap; import java.util.Properties; import org.xml.sax.Attributes; import com.lowagie.text.DocListener; public class SAXmyHandler extends SAXiTextHandler { public SAXmyHandler(DocListener document, HashMap<String, XmlPeer> myTags) { super(document, myTags); } public void startElement(String uri, String lname, String name, Attributes attrs) { if (myTags.containsKey(name)) { XmlPeer peer = myTags.get(name); handleStartingTags(peer.getTag(), peer.getAttributes(attrs)); } else { Properties attributes = new Properties(); if (attrs != null) { for (int i = 0; i < attrs.getLength(); i++) { String attribute = attrs.getQName(i); attributes.setProperty(attribute, attrs.getValue(i)); } } handleStartingTags(name, attributes); } } public void endElement(String uri, String lname, String name) { if (myTags.containsKey(name)) { XmlPeer peer = myTags.get(name); handleEndingTags(peer.getTag()); } else { handleEndingTags(name); } } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
51e8858978347705f852d3e190e3b487d65c7fc9
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/JADX/src/main/java/org/telegram/p004ui/C1443-$$Lambda$ChatRightsEditActivity$JCoxEgngqfok3q7QQt4m73nFirw.java
94c6f39664cd457ef39958f7ff91ba9bcffa6cd6
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
824
java
package org.telegram.p004ui; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; /* compiled from: lambda */ /* renamed from: org.telegram.ui.-$$Lambda$ChatRightsEditActivity$JCoxEgngqfok3q7QQt4m73nFirw */ public final /* synthetic */ class C1443-$$Lambda$ChatRightsEditActivity$JCoxEgngqfok3q7QQt4m73nFirw implements OnClickListener { public static final /* synthetic */ C1443-$$Lambda$ChatRightsEditActivity$JCoxEgngqfok3q7QQt4m73nFirw INSTANCE = new C1443-$$Lambda$ChatRightsEditActivity$JCoxEgngqfok3q7QQt4m73nFirw(); private /* synthetic */ C1443-$$Lambda$ChatRightsEditActivity$JCoxEgngqfok3q7QQt4m73nFirw() { } public final void onClick(DialogInterface dialogInterface, int i) { ChatRightsEditActivity.lambda$null$1(dialogInterface, i); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
954d621d1bf43f5b276478f2b1e76072a90133b6
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project24/src/main/java/org/gradle/test/performance24_5/Production24_482.java
c6d0e4b8b443431b5dd1e82ca7b7015003966eef
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance24_5; public class Production24_482 extends org.gradle.test.performance11_5.Production11_482 { private final String property; public Production24_482() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
4c16557853c333db63b158b1c519c7c52721001a
ce55e10448040cf27b4abccc9fb2b46e83ffb434
/trunk/dam/src/main/java/gov/nih/nci/ncicb/tcga/dcc/dam/util/TabDelimitedContent.java
8fa7e59332c806abdf0ab52b37ebeff125820a28
[]
no_license
NCIP/tcga-sandbox-v1
0518dee6ee9e31a48c6ebddd1c10d20dca33c898
c8230c07199ddaf9d69564480ff9124782525cf5
refs/heads/master
2021-01-19T04:07:08.906026
2013-05-29T18:00:15
2013-05-29T18:00:15
87,348,860
1
7
null
null
null
null
UTF-8
Java
false
false
862
java
/* * Software License, Version 1.0 Copyright 2009 SRA International, Inc. * Copyright Notice. The software subject to this notice and license includes both human * readable source code form and machine readable, binary, object code form (the "caBIG * Software"). * * Please refer to the complete License text for full details at the root of the project. */ package gov.nih.nci.ncicb.tcga.dcc.dam.util; import java.util.Map; /** * Interface for SDRF implementations * * @author Robert S. Sfeir * Last updated by: $Author: sfeirr $ * @version $Rev: 3419 $ */ public interface TabDelimitedContent { void setTabDelimitedContents( Map<Integer, String[]> tabDelimitedContents ); Map<Integer, String[]> getTabDelimitedContents(); void setTabDelimitedHeader( String[] headerValues ); String[] getTabDelimitedHeaderValues(); }
[ "reillysm@mail.nih.gov" ]
reillysm@mail.nih.gov
873c04b57b429c512cca5da70369851669d21033
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/spoon/learning/5106/SwitchNode.java
3f7e3844e2ca0c902b94a651c8b0097d097548de
[]
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
7,979
java
/** * Copyright (C) 2006-2018 INRIA and contributors * Spoon - http://spoon.gforge.inria.fr/ * * This software is governed by the CeCILL-C License under French law and * abiding by the rules of distribution of free software. You can use, modify * and/or redistribute the software under the terms of the CeCILL-C license as * circulated by CEA, CNRS and INRIA at http://www.cecill.info. * * 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 CeCILL-C License for more details. * * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ package spoon.pattern.internal.node; import spoon.SpoonException; import spoon.pattern.internal.DefaultGenerator; import spoon.pattern.internal.ResultHolder; import spoon.pattern.internal.matcher.Matchers; import spoon.pattern.internal.matcher.TobeMatched; import spoon.pattern.internal.parameter.ParameterInfo; import spoon.reflect.code.CtBlock; import spoon.reflect.code.CtExpression; import spoon.reflect.code.CtIf; import spoon.reflect.code.CtStatement; import spoon.reflect.factory.CoreFactory; import spoon.reflect.factory.Factory; import spoon.support.util.ImmutableMap; import java.util.ArrayList; import java.util.List; import java.util.function.BiConsumer; /** * List of conditional cases * {code} * if (a) { * ... someStatements if a == true.. * } else if (b) { * ... someStatements if b == true.. * } else { * ... someStatements in other cases ... * } */ public class SwitchNode extends AbstractNode implements InlineNode { private List<CaseNode> cases = new ArrayList<>(); public SwitchNode() { } @Override public boolean replaceNode(RootNode oldNode, RootNode newNode) { for (CaseNode caseNode : cases) { if (caseNode.replaceNode(oldNode, newNode)) { return true; } } return false; } /** * Adds another case into this switch statement * @param vrOfExpression if value of this parameter is true then statement has to be used. If vrOfExpression is null, then statement is always used * @param statement optional statement */ public void addCase(PrimitiveMatcher vrOfExpression, RootNode statement) { cases.add(new CaseNode(vrOfExpression, statement)); } @Override public <T> void generateTargets(DefaultGenerator generator, ResultHolder<T> result, ImmutableMap parameters) { for (CaseNode case1 : cases) { if (case1.isCaseSelected(generator, parameters)) { //generate result using first matching if branch generator.generateTargets(case1, result, parameters); return; } } } @Override public void forEachParameterInfo(BiConsumer<ParameterInfo, RootNode> consumer) { for (CaseNode case1 : cases) { if (case1.vrOfExpression != null) { case1.vrOfExpression.forEachParameterInfo(consumer); } if (case1.statement != null) { case1.statement.forEachParameterInfo(consumer); } } } @Override public TobeMatched matchTargets(TobeMatched targets, Matchers nextMatchers) { boolean hasDefaultCase = false; //detect which case is matching - if any for (CaseNode case1 : cases) { TobeMatched match = case1.matchTargets(targets, nextMatchers); if (match != null) { return match; } if (case1.vrOfExpression == null) { hasDefaultCase = true; } } //no case matched if (hasDefaultCase) { //nothing matched and even the default case didn't matched, so whole switch cannot match return null; } /* * else this switch is optional and matches 0 targets - OK, it is match too. * 1) set all expressions to false * 2) match nextMatchers */ return new CaseNode(null, null).matchTargets(targets, nextMatchers); } private class CaseNode extends AbstractNode implements InlineNode { /* * is null for the default case */ private PrimitiveMatcher vrOfExpression; private RootNode statement; private CaseNode(PrimitiveMatcher vrOfExpression, RootNode statement) { this.vrOfExpression = vrOfExpression; this.statement = statement; } @Override public boolean replaceNode(RootNode oldNode, RootNode newNode) { if (vrOfExpression != null) { if (vrOfExpression == oldNode) { vrOfExpression = (PrimitiveMatcher) newNode; return true; } if (vrOfExpression.replaceNode(oldNode, newNode)) { return true; } } if (statement != null) { if (statement == oldNode) { statement = newNode; return true; } return statement.replaceNode(oldNode, newNode); } return false; } @Override public TobeMatched matchTargets(TobeMatched targets, Matchers nextMatchers) { ImmutableMap parameters = targets.getParameters(); //set all switch parameter values following match case. Even no matching case is OK - everything is false then for (CaseNode case1 : cases) { if (case1.vrOfExpression != null) { //set expression of this `if` depending on if this case matched or not parameters = case1.vrOfExpression.matchTarget(case1 == this, parameters); if (parameters == null) { //this value doesn't matches we cannot match this case return null; } } } targets = targets.copyAndSetParams(parameters); if (statement != null) { return statement.matchTargets(targets, nextMatchers); } return nextMatchers.matchAllWith(targets); } @Override public void forEachParameterInfo(BiConsumer<ParameterInfo, RootNode> consumer) { SwitchNode.this.forEachParameterInfo(consumer); } @Override public <T> void generateTargets(DefaultGenerator generator, ResultHolder<T> result, ImmutableMap parameters) { if (statement != null) { generator.generateTargets(statement, result, parameters); } } private boolean isCaseSelected(DefaultGenerator generator, ImmutableMap parameters) { if (vrOfExpression == null) { return true; } Boolean value = generator.generateSingleTarget(vrOfExpression, parameters, Boolean.class); return value == null ? false : value.booleanValue(); } @Override public <T> void generateInlineTargets(DefaultGenerator generator, ResultHolder<T> result, ImmutableMap parameters) { Factory f = generator.getFactory(); CoreFactory cf = f.Core(); CtBlock<?> block = cf.createBlock(); if (statement != null) { block.setStatements(generator.generateTargets(statement, parameters, CtStatement.class)); } if (vrOfExpression != null) { //There is if expression CtIf ifStmt = cf.createIf(); ifStmt.setCondition(generator.generateSingleTarget(vrOfExpression, parameters, CtExpression.class)); ifStmt.setThenStatement(block); result.addResult((T) ifStmt); } else { //There is no expression. It represents the last else block result.addResult((T) block); } } } @Override public <T> void generateInlineTargets(DefaultGenerator generator, ResultHolder<T> result, ImmutableMap parameters) { CtStatement resultStmt = null; CtStatement lastElse = null; CtIf lastIf = null; for (CaseNode caseNode : cases) { CtStatement stmt = generator.generateSingleTarget(caseNode, parameters, CtStatement.class); if (stmt instanceof CtIf) { CtIf ifStmt = (CtIf) stmt; if (lastIf == null) { //it is first IF resultStmt = ifStmt; lastIf = ifStmt; } else { //it is next IF. Append it as else into last IF lastIf.setElseStatement(ifStmt); lastIf = ifStmt; } } else { if (lastElse != null) { throw new SpoonException("Only one SwitchNode can have no expression."); } lastElse = stmt; } } if (lastIf == null) { //there is no IF if (lastElse != null) { result.addResult((T) lastElse); } return; } if (lastElse != null) { //append last else into lastIf lastIf.setElseStatement(lastElse); } result.addResult((T) resultStmt); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
abb07a5a50747ea5e5c2c83364fcba4fbea84658
dea4003b0fc5051e7c1092b782f6df41676c0dd2
/app/src/main/java/com/toly1994/ds4android/model/TreeNode.java
947ed42ba6c4766014ad82d07948af3213fe572d
[ "MIT" ]
permissive
ky48302430/DS4Android
4afda046581394f23eee071cb2739504b8ecd2f1
6421d32b03509b28c1088a8df58c114c47111554
refs/heads/master
2020-04-15T16:19:12.792748
2018-12-07T04:44:37
2018-12-07T04:44:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
package com.toly1994.ds4android.model; import android.support.annotation.NonNull; /** * 作者:张风捷特烈<br/> * 时间:2018/11/21 0021:8:46<br/> * 邮箱:1981462002@qq.com<br/> * 说明:模型层双链表的单体 */ public class TreeNode<T extends Comparable<T>> extends Viewable implements Comparable<TreeNode<T>> { public T data;//链表结构承载的核心数据 @Override public boolean equals(Object obj) { return ((TreeNode) obj).data.equals(data); } public TreeNode(T data) { this.data = data; } public TreeNode(float x, float y) { super(x, y); } @Override public int compareTo(@NonNull TreeNode<T> o) { return data.compareTo(o.data); } }
[ "1981462002@qq.com" ]
1981462002@qq.com
590b813576fab5bcfef7b360e9de7b2e8267fb8e
a8e92b921f4e32f2491bb3aca7a1d6e02fce52f0
/mvcexam/src/main/java/kr/or/connect/mvcexam/config/WebMvcContextConfiguration.java
e66b2299eee451e2267aca4c40458dbd7ba19ae6
[]
no_license
minsung8/SpringMVC_Exercise
122141867aadc109c908d98dfb95bf75d2b72870
353eefb103de1a7d2c7663fa37d037130d11124f
refs/heads/master
2022-12-10T19:34:25.094720
2020-09-11T08:42:14
2020-09-11T08:42:14
294,058,596
0
0
null
null
null
null
UTF-8
Java
false
false
2,199
java
package kr.or.connect.mvcexam.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.view.InternalResourceViewResolver; @Configuration @EnableWebMvc @ComponentScan(basePackages = { "kr.or.connect.mvcexam.controller"}) // basePackage 설정 public class WebMvcContextConfiguration extends WebMvcConfigurerAdapter { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/assets/**").addResourceLocations("classpath:/META-INF/resources/webjars/").setCachePeriod(31556926); registry.addResourceHandler("/css/**").addResourceLocations("/css/").setCachePeriod(31556926); registry.addResourceHandler("/img/**").addResourceLocations("/img/").setCachePeriod(31556926); registry.addResourceHandler("/js/**").addResourceLocations("/js/").setCachePeriod(31556926); } // default servlet handler를 사용하게 합니다. @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { configurer.enable(); } @Override public void addViewControllers(final ViewControllerRegistry registry) { System.out.println("addViewControllers가 호출됩니다. "); registry.addViewController("/").setViewName("main"); } @Bean public InternalResourceViewResolver getInternalResourceViewResolver() { InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setPrefix("/WEB-INF/views/"); resolver.setSuffix(".jsp"); return resolver; } }
[ "alstjddl8@naver.com" ]
alstjddl8@naver.com
270b1ba519417767e57e02ccd5dd573de09251ad
207ac89fcd8dacdc8955f4bf09780aa942383152
/src/test/java/com/gsww/jhipster/demo/web/rest/errors/ExceptionTranslatorTestController.java
75cb1ea925f7063cc84fdc209a4172e7dc022174
[]
no_license
programDream/jhipsterSampleApplication
47045b1161930eb957e4f53f9add0e034b1bb4b6
f2fb29d375e2ec9a4408c01a90a186e70a679a04
refs/heads/master
2021-08-31T11:25:04.386598
2017-12-21T06:11:05
2017-12-21T06:11:05
114,969,500
0
0
null
null
null
null
UTF-8
Java
false
false
2,988
java
package com.gsww.jhipster.demo.web.rest.errors; import org.springframework.dao.ConcurrencyFailureException; import org.springframework.http.HttpStatus; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.support.MissingServletRequestPartException; import javax.validation.Valid; import javax.validation.constraints.NotNull; import java.util.HashMap; import java.util.Map; @RestController public class ExceptionTranslatorTestController { @GetMapping("/test/concurrency-failure") public void concurrencyFailure() { throw new ConcurrencyFailureException("test concurrency failure"); } @PostMapping("/test/method-argument") public void methodArgument(@Valid @RequestBody TestDTO testDTO) { } @GetMapping("/test/parameterized-error") public void parameterizedError() { throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value"); } @GetMapping("/test/parameterized-error2") public void parameterizedError2() { Map<String, Object> params = new HashMap<>(); params.put("foo", "foo_value"); params.put("bar", "bar_value"); throw new CustomParameterizedException("test parameterized error", params); } @GetMapping("/test/missing-servlet-request-part") public void missingServletRequestPartException() throws Exception { throw new MissingServletRequestPartException("missing Servlet request part"); } @GetMapping("/test/missing-servlet-request-parameter") public void missingServletRequestParameterException() throws Exception { throw new MissingServletRequestParameterException("missing Servlet request parameter", "parameter type"); } @GetMapping("/test/access-denied") public void accessdenied() { throw new AccessDeniedException("test access denied!"); } @GetMapping("/test/unauthorized") public void unauthorized() { throw new BadCredentialsException("test authentication failed!"); } @GetMapping("/test/response-status") public void exceptionWithReponseStatus() { throw new TestResponseStatusException(); } @GetMapping("/test/internal-server-error") public void internalServerError() { throw new RuntimeException(); } public static class TestDTO { @NotNull private String test; public String getTest() { return test; } public void setTest(String test) { this.test = test; } } @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") @SuppressWarnings("serial") public static class TestResponseStatusException extends RuntimeException { } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
a2684feea66b40053c7599f28a6422c7f9b1f079
ebc27101c70c4ccd418df22d5d6b86987ae5ad42
/smartmining/src/main/java/com/seater/smartmining/service/impl/ProjectErrorLogServiceImpl.java
ff14311531377cd920d6726e80c4691f22218f96
[]
no_license
KanadeSong/webserver
f555210a443c8023bfca3fe7cb49f372a3779801
b464c21d5eb33108573a2319ffd982473a489752
refs/heads/master
2022-03-31T03:07:10.023485
2019-12-31T09:59:55
2019-12-31T09:59:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,035
java
package com.seater.smartmining.service.impl; import com.seater.smartmining.dao.ProjectErrorLogDaoI; import com.seater.smartmining.entity.ProjectErrorLog; import com.seater.smartmining.service.ProjectErrorLogServiceI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import java.io.IOException; import java.util.List; /** * @Description: * @Author yueyuzhe * @Email 87167070@qq.com * @Date 2019/5/22 0022 17:30 */ @Service public class ProjectErrorLogServiceImpl implements ProjectErrorLogServiceI { @Autowired ApplicationContext applicationContext; @Autowired ProjectErrorLogDaoI projectErrorLogDaoI; @Override public ProjectErrorLog get(Long id) throws IOException { return projectErrorLogDaoI.get(id); } @Override public ProjectErrorLog save(ProjectErrorLog log) throws IOException { return projectErrorLogDaoI.save(log); } @Override public void delete(Long id) { projectErrorLogDaoI.delete(id); } @Override public void delete(List<Long> ids) { projectErrorLogDaoI.delete(ids); } @Override public Page<ProjectErrorLog> query() { return projectErrorLogDaoI.query(); } @Override public Page<ProjectErrorLog> query(Specification<ProjectErrorLog> spec) { return projectErrorLogDaoI.query(spec); } @Override public Page<ProjectErrorLog> query(Pageable pageable) { return projectErrorLogDaoI.query(pageable); } @Override public Page<ProjectErrorLog> query(Specification<ProjectErrorLog> spec, Pageable pageable) { return projectErrorLogDaoI.query(spec, pageable); } @Override public List<ProjectErrorLog> getAll() { return projectErrorLogDaoI.getAll(); } }
[ "545430154@qq.com" ]
545430154@qq.com
6b17403293cba2fdf7fba510516af7e2b97f1db4
cb505014430cbdef1c3ef79c69cfa21b720b497c
/baseio-test/src/main/java/com/generallycloud/test/io/jms/TestBrowser.java
290ac6c638e3b66b06c2d1aee71b3373318c9bb6
[ "Apache-2.0" ]
permissive
heirenheiren/baseio
5c8a2a934b65c92bb25158b0cf2e9268cfc2c00b
3e5a051afc20e6422b15f2c89ff612684f3d7cad
refs/heads/master
2021-09-09T07:36:54.745244
2018-03-14T08:35:29
2018-03-14T08:35:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,637
java
/* * Copyright 2015-2017 GenerallyCloud.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.generallycloud.test.io.jms; import com.generallycloud.baseio.codec.protobase.ProtobaseProtocolFactory; import com.generallycloud.baseio.component.LoggerSocketSEListener; import com.generallycloud.baseio.component.NioSocketChannelContext; import com.generallycloud.baseio.component.SocketChannelContext; import com.generallycloud.baseio.configuration.ServerConfiguration; import com.generallycloud.baseio.connector.SocketChannelConnector; import com.generallycloud.baseio.container.FixedSession; import com.generallycloud.baseio.container.SimpleIoEventHandle; import com.generallycloud.baseio.container.jms.Message; import com.generallycloud.baseio.container.jms.client.MessageBrowser; import com.generallycloud.baseio.container.jms.client.impl.DefaultMessageBrowser; import com.generallycloud.baseio.log.LoggerFactory; public class TestBrowser { public static void main(String[] args) throws Exception { String queueName = "qName"; LoggerFactory.configure(); SimpleIoEventHandle eventHandle = new SimpleIoEventHandle(); ServerConfiguration configuration = new ServerConfiguration(8300); SocketChannelContext context = new NioSocketChannelContext(configuration); SocketChannelConnector connector = new SocketChannelConnector(context); context.setIoEventHandleAdaptor(eventHandle); context.setProtocolFactory(new ProtobaseProtocolFactory()); context.addSessionEventListener(new LoggerSocketSEListener()); FixedSession session = new FixedSession(connector.connect()); session.login("admin", "admin100"); MessageBrowser browser = new DefaultMessageBrowser(session); Message message = browser.browser(queueName); System.out.println("message:" + message); int size = browser.size(); System.out.println("size:" + size); boolean isOnline = browser.isOnline(queueName); System.out.println("isOnline:" + isOnline); connector.close(); } }
[ "8738115@qq.com" ]
8738115@qq.com
08f648a302ed43c006c2e7bb221c12f5d99cde50
6e055d1e88c7216e3daf209125ee9adfc023c7a8
/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
69df572272a440923bc940aa7ba71ccf73ea66ed
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
rjrodger/vespa
94163f85b9b47850758362457cce923860b71dea
1ea8ffeac549f91c2b7e41325711235626c53359
refs/heads/master
2021-05-09T22:50:54.207474
2018-01-24T12:35:31
2018-01-24T12:35:31
118,764,186
1
0
null
2018-01-24T12:44:26
2018-01-24T12:44:25
null
UTF-8
Java
false
false
1,053
java
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.rule; import com.yahoo.searchlib.rankingexpression.evaluation.Context; import com.yahoo.searchlib.rankingexpression.evaluation.Value; import java.util.Deque; /** * An opaque name in a ranking expression. This is used to represent names passed to the context * and interpreted by the given context in a way which is opaque to the ranking expressions. * * @author Simon Thoresen */ public final class NameNode extends ExpressionNode { private final String name; public NameNode(String name) { this.name = name; } public String getValue() { return name; } @Override public String toString(SerializationContext context, Deque<String> path, CompositeNode parent) { return name; } @Override public Value evaluate(Context context) { throw new RuntimeException("Name nodes should never be evaluated"); } }
[ "bratseth@yahoo-inc.com" ]
bratseth@yahoo-inc.com
a64e23eb88d3d33fa397e33431ec440fd7d57051
efb7efbbd6baa5951748dfbe4139e18c0c3608be
/sources/androidx/core/util/SparseLongArrayKt$keyIterator$1.java
4476ddeebd75d98a75946f477c3b2c7165b7c90a
[]
no_license
blockparty-sh/600302-1_source_from_JADX
08b757291e7c7a593d7ec20c7c47236311e12196
b443bbcde6def10895756b67752bb1834a12650d
refs/heads/master
2020-12-31T22:17:36.845550
2020-02-07T23:09:42
2020-02-07T23:09:42
239,038,650
0
0
null
null
null
null
UTF-8
Java
false
false
1,555
java
package androidx.core.util; import android.util.SparseLongArray; import kotlin.Metadata; import kotlin.collections.IntIterator; @Metadata(mo37403bv = {1, 0, 3}, mo37404d1 = {"\u0000\u001b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\t\u0010\b\u001a\u00020\tH–\u0002J\b\u0010\n\u001a\u00020\u0003H\u0016R\u001a\u0010\u0002\u001a\u00020\u0003X†\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0004\u0010\u0005\"\u0004\b\u0006\u0010\u0007¨\u0006\u000b"}, mo37405d2 = {"androidx/core/util/SparseLongArrayKt$keyIterator$1", "Lkotlin/collections/IntIterator;", "index", "", "getIndex", "()I", "setIndex", "(I)V", "hasNext", "", "nextInt", "core-ktx_release"}, mo37406k = 1, mo37407mv = {1, 1, 15}) /* compiled from: SparseLongArray.kt */ public final class SparseLongArrayKt$keyIterator$1 extends IntIterator { final /* synthetic */ SparseLongArray $this_keyIterator; private int index; SparseLongArrayKt$keyIterator$1(SparseLongArray sparseLongArray) { this.$this_keyIterator = sparseLongArray; } public final int getIndex() { return this.index; } public final void setIndex(int i) { this.index = i; } public boolean hasNext() { return this.index < this.$this_keyIterator.size(); } public int nextInt() { SparseLongArray sparseLongArray = this.$this_keyIterator; int i = this.index; this.index = i + 1; return sparseLongArray.keyAt(i); } }
[ "hello@blockparty.sh" ]
hello@blockparty.sh
b220a5dcd14adbb9741ea19242b2464f60188099
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-ext/med-ext-phr/src/main/java/nta/med/ext/phr/model/StandardFitnessDistanceModel.java
0baed02749cde4d83b6f51548b78a86fef052f76
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,261
java
package nta.med.ext.phr.model; import java.math.BigDecimal; import java.math.BigInteger; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; /** * The persistent class for the PHR_STANDARD_TEMPERATURE database table. * */ public class StandardFitnessDistanceModel { @JsonProperty("fitness_id") private BigInteger id; @JsonProperty("datetime_record") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'", timezone = "UTC") private Timestamp datetimeRecord; @JsonProperty("walk_run_distance") private BigDecimal walkRunDistance; @JsonProperty("note") private String note; public BigInteger getId() { return id; } public void setId(BigInteger id) { this.id = id; } public Timestamp getDatetimeRecord() { return datetimeRecord; } public void setDatetimeRecord(Timestamp datetimeRecord) { this.datetimeRecord = datetimeRecord; } public BigDecimal getWalkRunDistance() { return walkRunDistance; } public void setWalkRunDistance(BigDecimal walkRunDistance) { this.walkRunDistance = walkRunDistance; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
ed94c8371e7f497fbe95fba83960cad85d78a000
68cb4d647309ac0892d5968a9a3d2156e5c1dabd
/day31_code/讲师代码/gjp/src/cn/itcast/gjp/view/MainView_001.java
442fee374a2ea0824d1b9cab2a44b804b2774931
[]
no_license
chaiguolong/JavaSE
651c4eb1179d05912cbc8d8a5d1930ca6ce9bad4
bb9629843ebafea221365b43c471ae3aa663b1c5
refs/heads/master
2021-07-25T09:46:34.190516
2018-07-30T08:17:49
2018-07-30T08:17:49
130,962,634
0
0
null
null
null
null
UTF-8
Java
false
false
7,391
java
package cn.itcast.gjp.view; /* * 视图层,用户看到和操作的界面 * 数据传递给controller层实现 * 成员位置,创建controller对象 */ import java.util.List; import java.util.Scanner; import cn.itcast.gjp.controller.ZhangWuController; import cn.itcast.gjp.domain.ZhangWu; public class MainView_001{ private ZhangWuController controller = new ZhangWuController(); /* * 实现界面效果 * 接受用户输入 * 根据数据,调用不同的功能方法 */ public void run(){ //创建Scanner类对象,反复键盘输入 Scanner sc = new Scanner(System.in); while(true){ System.out.println("---------------管家婆家庭记账软件---------------"); System.out.println("1.添加账务 2.编辑账务 3.删除账务 4.查询账务 5.退出系统"); System.out.println("请输入要操作的功能序号[1-5]:"); //接收用户的菜单选择 int choose = sc.nextInt(); //对选择的菜单判断,调用不同的功能 switch(choose){ case 1: //选择添加账务,调用添加账务的方法 addZhangWu(); break; case 2: //选择编辑账务,调用编辑账务方法 editZhangWu(); break; case 3: //选择删除账务,调用删除账务方法 deleteZhangWu(); break; case 4: //选择的是查询账务,调用查询方法 selectZhangWu(); break; case 5: System.exit(0); break; } } } /* * 定义方法,实现账务删除 * 实现思想: * 接收用户的输入,输入一个主键数据 * 调用控制层方法,传递一个主键 */ public void deleteZhangWu(){ //调用查询所有数据的功能,显示出来 //看到所有数据,从中选择一项,进行修改 selectAll(); System.out.println("选择的是删除功能,请输入序号即可"); int zwid = new Scanner(System.in).nextInt(); //调用控制层方法,传递主键id即可 controller.deleteZhangWu(zwid); System.out.println("删除账务成功"); } /* * 定义方法,实现对账务的编辑功能 * 实现思想: * 接受用户的输入信息 * 封装成ZhangWu对象,实现编辑 */ public void editZhangWu(){ //调用查询所有账务数据功能,显示出来 //看到所有数据,从中选择一项,进行修改 selectAll(); System.out.println("选择的是编辑功能,请输入数据"); Scanner sc = new Scanner(System.in); System.out.println("请输入ID"); int zwid = sc.nextInt(); System.out.println("请输入分类名称"); String flname = sc.next(); System.out.println("请输入金额"); double money = sc.nextDouble(); System.out.println("请输入账户"); String zhanghu = sc.next(); System.out.println("输入日期:格式XXXX-XX-xx"); String createtime = sc.next(); System.out.println("输入具体描述"); String description = sc.next(); //将用户输入的数据,封装到ZhangWu对象中 //用户输入的ID,必须封装到对象中 ZhangWu zw = new ZhangWu(zwid,flname,money,zhanghu,createtime,description); //调用controller层中的方法,实现编辑账务 controller.editZhangWu(zw); System.out.println("账务编辑成功"); } /* * 定义方法addZhangWu * 添加账务的方法,用户在界面中选择菜单1的时候调用 * 实现思想: * 接受键盘输入,5项输入,调用controller层方法 */ public void addZhangWu(){ System.out.println("选择的添加账务功能,请输入以下内容"); Scanner sc = new Scanner(System.in); System.out.println("输入分类名称"); String flname = sc.next(); System.out.println("输入金额"); double money = sc.nextDouble(); System.out.println("输入账户"); String zhanghu = sc.next(); System.out.println("输入日期:格式XXXX-XX-xx"); String createtime = sc.next(); System.out.println("输入具体描述"); String description = sc.next(); //蒋接收到的数据,调用controller层的方法,传递参数,实现数据添加 //将用户输入的所有参数,封装成ZhangWu对象 ZhangWu zw = new ZhangWu(0,flname,money,zhanghu,createtime,description); controller.addZhangWu(zw); System.out.println("恭喜添加账务成功"); } /* * 定义方法,selectZhangWu() * 显示查询的方式 1 所有查询 2 条件查询 * 接受用户的选择 */ public void selectZhangWu(){ System.out.println("1. 查询所有 2. 条件查询"); Scanner sc = new Scanner(System.in); int selectChooser = sc.nextInt(); //判断根据用户的选择,调用不同的功能 switch(selectChooser){ case 1: //选择的查询所有,调用查询所有的方法 selectAll(); break; case 2: //选的条件查询,调用带有查询条件的方法 select(); break; } } /* * 定义方法,实现查询所有的账务数据 */ public void selectAll(){ //调用控制层中的方法,查询所有的账务数据 List<ZhangWu> list = controller.selectAll(); if(list.size() != 0){ print(list); }else{ System.out.println("没有查询到数据"); } } /* * 定义方法,实现条件查询账务数据 * 提供用户的输入日期,开始日期结束日期 * 就2个日期,传递到controller层 * 调用controller的方法,传递2个日期参数 * 获取到controller查询的结果集,打印出来 */ public void select(){ System.out.println("选择条件查询,输入日期格式XXXX-XX-XX"); Scanner sc = new Scanner(System.in); System.out.println("请输入开始日期:"); String startDate = sc.next(); System.out.println("请输入结束日期"); String endDate = sc.next(); //调用controller层的方法,传递日期,获取查询结果集 List<ZhangWu> list = controller.select(startDate,endDate); if(list.size() != 0) print(list); else System.out.println("没有查询到数据"); } //输出账务数据方法,接受List集合,遍历集合,输出表格 private void print(List<ZhangWu> list){ //输出表头 System.out.println("ID\t\t类别\t\t账户\t\t\t金额\t\t时间\t\t\t说明"); //遍历集合,结果输出控制台 for(ZhangWu zw : list){ System.out.println(zw.getZwid()+"\t\t"+zw.getFlname()+"\t\t"+zw.getZhanghu()+"\t\t"+ zw.getMoney()+"\t\t"+zw.getCreatetime()+"\t\t"+zw.getDescription()); } } }
[ "584238433@qq.com" ]
584238433@qq.com
93c9825f315dbb98990d1c02d44643505d1efee8
3202ebac7138158613cb05e2cb6688139cc50e79
/src/main/java/com/caychen/micro/xunwu/bo/HouseSort.java
05d7c4fa3a33092782bff3fc44479d3b5acef456
[]
no_license
caychen/xunwu
0e1e5a46041d44a72fa51e934c5ec7933508a971
5666cc1ffe1271a5c0d2ba07da3c39b4ad4f4181
refs/heads/master
2021-06-20T11:59:41.910064
2019-09-28T15:21:30
2019-09-28T15:21:30
211,517,102
0
0
null
2021-04-26T19:32:57
2019-09-28T14:58:56
JavaScript
UTF-8
Java
false
false
1,162
java
package com.caychen.micro.xunwu.bo; import com.google.common.collect.Sets; import org.springframework.data.domain.Sort; import java.util.Optional; import java.util.Set; /** * Author: Caychen * Date: 2019/9/28 * Desc: */ public class HouseSort { public static final String DEFAULT_SORT_KEY = "lastUpdateTime"; public static final String DISTANCE_TO_SUBWAY_KEY = "distanceToSubway"; public static final String CREATE_TIME_KEY = "createTime"; public static final String PRICE_KEY = "price"; public static final String AREA_KEY = "area"; private static final Set<String> SORT_KEYS = Sets.newHashSet( DEFAULT_SORT_KEY, CREATE_TIME_KEY, PRICE_KEY, AREA_KEY, DISTANCE_TO_SUBWAY_KEY ); public static Sort generateSort(String key, String directionKey){ key = getSortKey(key); Optional<Sort.Direction> optionalDirection = Sort.Direction.fromOptionalString(directionKey); Sort.Direction direction = optionalDirection.orElse(Sort.Direction.DESC); return new Sort(direction, key); } public static String getSortKey(String key){ if(!SORT_KEYS.contains(key)){ key = DEFAULT_SORT_KEY; } return key; } }
[ "412425870@qq.com" ]
412425870@qq.com
ce84d70833beab7cefe55dec2f40a708389e305a
cb225247cb15b453d8fa1be7a275ee876daea696
/src/main/java/gigaherz/elementsofpower/renders/SpellRenderOverlay.java
1be53903f72a9d75a2ac35368465709c96a99ac3
[]
no_license
Riderj/ElementsOfPower
a5233a10677fa19d64ba6875dd6cab59cea036db
850cac330e13d1e7995694cbd9c2b70e6c10559c
refs/heads/master
2021-01-24T00:08:44.753023
2016-02-15T03:01:32
2016-02-15T03:01:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,950
java
package gigaherz.elementsofpower.renders; import com.google.common.collect.Maps; import gigaherz.elementsofpower.entitydata.SpellcastEntityData; import gigaherz.elementsofpower.renders.spellrender.RenderBeam; import gigaherz.elementsofpower.renders.spellrender.RenderCone; import gigaherz.elementsofpower.renders.spellrender.RenderSpell; import gigaherz.elementsofpower.renders.spellrender.RenderSphere; import gigaherz.elementsofpower.spells.SpellManager; import gigaherz.elementsofpower.spells.Spellcast; import gigaherz.elementsofpower.spells.shapes.SpellShape; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.Vec3; import net.minecraftforge.client.event.RenderPlayerEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.Map; public class SpellRenderOverlay { public static final Map<SpellShape, RenderSpell> rendererRegistry = Maps.newHashMap(); static { rendererRegistry.put(SpellManager.beam, new RenderBeam()); rendererRegistry.put(SpellManager.cone, new RenderCone()); rendererRegistry.put(SpellManager.sphere, new RenderSphere()); } @SubscribeEvent public void renderFirstPerson(RenderWorldLastEvent event) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); float ppitch = player.prevRotationPitch + event.partialTicks * (player.rotationPitch - player.prevRotationPitch); float pyaw = player.prevRotationYawHead + event.partialTicks * (player.rotationYawHead - player.prevRotationYawHead); Vec3 off = new Vec3(0, -0.15, 0); off = off.rotatePitch(-(float) Math.toRadians(ppitch)); off = off.rotateYaw(-(float) Math.toRadians(pyaw)); drawSpellsOnPlayer(player, renderManager, 0, player.getEyeHeight(), 0, event.partialTicks, off); } @SubscribeEvent public void playerRenderPost(RenderPlayerEvent.Post event) { if (event.entityPlayer == Minecraft.getMinecraft().thePlayer) return; boolean isSelf = event.entityPlayer.getEntityId() == Minecraft.getMinecraft().thePlayer.getEntityId(); EntityPlayer player = event.entityPlayer; RenderManager renderManager = event.renderer.getRenderManager(); float ppitch = player.prevRotationPitch + event.partialRenderTick * (player.rotationPitch - player.prevRotationPitch); float pyaw = player.prevRotationYawHead + event.partialRenderTick * (player.rotationYawHead - player.prevRotationYawHead); Vec3 off; if (isSelf) { off = new Vec3(0, -0.15, 0); off = off.rotatePitch(-(float) Math.toRadians(ppitch)); off = off.rotateYaw(-(float) Math.toRadians(pyaw)); } else { off = new Vec3(0, 0, 0.4); off = off.rotatePitch(-(float) Math.toRadians(ppitch)); off = off.rotateYaw(-(float) Math.toRadians(pyaw)); off = off.add(new Vec3(0, -0.25, 0)); } drawSpellsOnPlayer(player, renderManager, event.x, event.y + player.getEyeHeight(), event.z, event.partialRenderTick, off); } @SuppressWarnings("unchecked") public void drawSpellsOnPlayer(EntityPlayer player, RenderManager renderManager, double x, double y, double z, float partialTicks, Vec3 offset) { SpellcastEntityData data = SpellcastEntityData.get(player); Spellcast cast = data.getCurrentCasting(); if (cast == null) return; RenderSpell renderer = rendererRegistry.get(cast.getShape()); if (renderer != null) { renderer.doRender(cast, player, renderManager, x, y, z, partialTicks, offset); } } }
[ "gigaherz@gmail.com" ]
gigaherz@gmail.com
f50e73e59b66c37fe42ff9400f8a98961828c9da
0f0603535d370ee0377a27f04f2735a4e305e88f
/January_27/Question_8_PrintKeypad.java
12f6e0dd3ab650f42db0e9d08c2fa2ad8ac937bc
[]
no_license
ishu2/DS-and-Algorithms
a35f6983222f15c3273328bf74bfe79ff3261b96
3b400915ed011144e8d577e95a485e0a23f1e90c
refs/heads/master
2022-01-16T11:08:51.979218
2017-10-10T06:26:34
2017-10-10T06:26:34
106,179,778
0
0
null
null
null
null
UTF-8
Java
false
false
1,202
java
package January_27; public class Question_8_PrintKeypad { public static void printKeypad(int num,String[] resultSoFar) { if(num==0) { for(String s:resultSoFar) { System.out.println(s); } return; } int n=num%10; num=num/10; String res=correspondingCharacters(n); String[] newResultSoFar=new String[resultSoFar.length*res.length()]; int k=0; for(int i=0;i<res.length();i++) { for(int j=0;j<resultSoFar.length;j++) { newResultSoFar[k]=res.charAt(i)+resultSoFar[j]; k++; } } printKeypad(num,newResultSoFar); } public static String correspondingCharacters(int n) { String res=" "; switch(n) { case 1: res=" "; return res; case 2: res="abc"; return res; case 3: res="def"; return res; case 4: res="ghi"; return res; case 5: res="jkl"; return res; case 6: res="mno"; return res; case 7: res="pqrs"; return res; case 8: res="tuv"; return res; case 9: res="wxyz"; return res; } return res; } public static void main(String[] args) { int num=1234; String[] res=new String[1]; res[0]=""; printKeypad(num,res); } }
[ "rathiishita123@gmail.com" ]
rathiishita123@gmail.com
77f6e0ee293c59e85042244ead82a9bbf96bb279
a8cc070ce9d9883384038fa5d32f4c3722da62a0
/server/java/com/l2jserver/gameserver/network/clientpackets/RequestRecipeShopManageQuit.java
ab72b9879833bcb736080f3511bfaaf9299d3659
[]
no_license
gyod/l2jtw_pvp_server
c3919d6070b389eec533687c376bf781b1472772
ce886d33b7f0fcf484c862f54384336597f5bc53
refs/heads/master
2021-01-09T09:34:10.397333
2014-12-06T13:31:03
2014-12-06T13:31:03
25,984,922
1
0
null
2014-12-06T13:31:03
2014-10-30T18:46:17
Java
UTF-8
Java
false
false
1,606
java
/* * Copyright (C) 2004-2014 L2J Server * * This file is part of L2J Server. * * L2J Server 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. * * L2J Server 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 com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.gameserver.enums.PrivateStoreType; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; /** * This class ... cd(dd) * @version $Revision: 1.1.2.2.2.3 $ $Date: 2005/03/27 15:29:30 $ */ public final class RequestRecipeShopManageQuit extends L2GameClientPacket { private static final String _C__BC_RequestRecipeShopManageQuit = "[C] BC2 RequestRecipeShopManageQuit"; @Override protected void readImpl() { // trigger } @Override protected void runImpl() { L2PcInstance player = getClient().getActiveChar(); if (player == null) { return; } /* 603 fix player.setPrivateStoreType(PrivateStoreType.NONE); player.broadcastUserInfo(); player.standUp(); */ } @Override public String getType() { return _C__BC_RequestRecipeShopManageQuit; } }
[ "nakamura.shingo+l2j@gmail.com" ]
nakamura.shingo+l2j@gmail.com
dcd300fb11c4fa104e9d6fdc2571617d2ca8c11b
d5786bf0335010f7de9bb2cea6bb0a9536ff73af
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/DisableMsSgAuthRuleGroupsRequest.java
0c14ac70040733f7ff6c1c44bef96e43e868fb6e
[ "Apache-2.0" ]
permissive
1203802276/aliyun-openapi-java-sdk
8066c546f0177cbbebb7b1178fe6ccaeb6f1da09
e3f89f2ef8542055e3990401a94edccd1bbca410
refs/heads/master
2023-04-15T07:09:27.195262
2021-03-19T06:22:51
2021-03-19T06:22:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,185
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.sofa.model.v20190815; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.sofa.Endpoint; /** * @author auto create * @version */ public class DisableMsSgAuthRuleGroupsRequest extends RpcAcsRequest<DisableMsSgAuthRuleGroupsResponse> { private Long authGroupId; private String instanceId; private String dataId; public DisableMsSgAuthRuleGroupsRequest() { super("SOFA", "2019-08-15", "DisableMsSgAuthRuleGroups", "sofacafedeps"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Long getAuthGroupId() { return this.authGroupId; } public void setAuthGroupId(Long authGroupId) { this.authGroupId = authGroupId; if(authGroupId != null){ putBodyParameter("AuthGroupId", authGroupId.toString()); } } public String getInstanceId() { return this.instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; if(instanceId != null){ putBodyParameter("InstanceId", instanceId); } } public String getDataId() { return this.dataId; } public void setDataId(String dataId) { this.dataId = dataId; if(dataId != null){ putBodyParameter("DataId", dataId); } } @Override public Class<DisableMsSgAuthRuleGroupsResponse> getResponseClass() { return DisableMsSgAuthRuleGroupsResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
3281684e55dbcd61059dba1fb9d7c81e0b022508
c911cec851122d0c6c24f0e3864cb4c4def0da99
/rx/functions/ActionN.java
5647dde314c97bc15b2509b1733510793f668677
[]
no_license
riskyend/PokemonGo_RE_0.47.1
3a468ad7b6fbda5b4f8b9ace30447db2211fc2ed
2ca0c6970a909ae5e331a2430f18850948cc625c
refs/heads/master
2020-01-23T22:04:35.799795
2016-11-19T01:01:46
2016-11-19T01:01:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package rx.functions; public abstract interface ActionN extends Action { public abstract void call(Object... paramVarArgs); } /* Location: /Users/mohamedtajjiou/Downloads/Rerverse Engeneering/dex2jar-2.0/com.nianticlabs.pokemongo_0.47.1-2016111700_minAPI19(armeabi-v7a)(nodpi)_apkmirror.com (1)-dex2jar.jar!/rx/functions/ActionN.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030" ]
mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030
2d3e7b6e6a35bfeb02de0cc58e1718414563fd51
2824daf9890092bd737293e39ef6dc86a621ff0d
/src/main/java/arrays/ArraysMain.java
fde3e3c127dcc374c34bb4ef1c34036c023b3731
[]
no_license
Lipek71/training-solutions
b445f075bec762d1eac40a4b71c68c622a7840c7
64598d9a483bb545f691106000817425194cb358
refs/heads/master
2023-03-11T11:12:25.019437
2021-02-22T23:57:47
2021-02-22T23:57:47
309,207,145
0
0
null
null
null
null
UTF-8
Java
false
false
3,052
java
package arrays; import java.util.Arrays; import java.util.List; public class ArraysMain { String numberOfDaysAsString() { int[] numberOfDays = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; return Arrays.toString(numberOfDays); } List<String> daysOfWeek() { List<String> daysOfWeek = Arrays.asList("hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat", "vasárnap"); return daysOfWeek; } String multiplicationTableAsString(int size) { int[][] multiplicator = new int[size][size]; for (int i = 1; i <= size; i++) { for (int j = 1; j <= size; j++) { multiplicator[i - 1][j - 1] = i * j; } } return Arrays.deepToString(multiplicator); } boolean sameTempValues(double[] day, double[] anotherDay) { return Arrays.equals(day, anotherDay); } boolean wonLottery(int[] ownNumber, int[] winNumber) { int[] ownNumber1 = Arrays.copyOf(ownNumber,ownNumber.length); int[] winNumber1 = Arrays.copyOf(winNumber,winNumber.length); Arrays.sort(ownNumber1); Arrays.sort(winNumber1); return Arrays.equals(ownNumber1, winNumber1); } int min(double[] day1, double[] day2){ if(day1.length < day2.length ){ return day1.length; }else { return day2.length; } } boolean sameTempValuesDaylight(double[] day, double[] anotherDay){ double[] day1; double[] anotherDay1; int min; ArraysMain arraysMain = new ArraysMain(); min=arraysMain.min(day, anotherDay); day1 = Arrays.copyOfRange(day,0,min); anotherDay1 = Arrays.copyOfRange(anotherDay,0,min); return Arrays.equals(day1, anotherDay1); } public static void main(String[] args) { ArraysMain arraysMain = new ArraysMain(); System.out.println(arraysMain.numberOfDaysAsString()); System.out.println(); System.out.println(arraysMain.daysOfWeek()); System.out.println(); System.out.println(arraysMain.multiplicationTableAsString(5)); System.out.println(); double[] firstDay = {3.5, 4.5}; double[] secondDay = {3.5, 4.5}; double[] thirdDay = {4.5, 4.5}; System.out.println(arraysMain.sameTempValues(firstDay, secondDay)); System.out.println(arraysMain.sameTempValues(firstDay, thirdDay)); System.out.println(); int[] ownNumber = {1, 23, 71, 45, 90}; int[] winNumber = {23, 45, 90, 1, 71}; int[] winNumber2 = {23, 46, 90, 1, 71}; System.out.println(arraysMain.wonLottery(ownNumber, winNumber)); System.out.println(arraysMain.wonLottery(ownNumber, winNumber2)); System.out.println(Arrays.toString(ownNumber)); System.out.println(); double[] fourthDay = {3.5, 4.5, 5.5}; double[] fifthDay = {3.5, 4.5, 5.5, 6.5}; System.out.println(arraysMain.sameTempValuesDaylight(fourthDay, fifthDay)); } }
[ "lipek71@gmail.com" ]
lipek71@gmail.com
0b832d9f6c7a3411ccd466b1cc9ffd7cb01248f2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_da9a53812daba655e82c71cf1479f0b5057f56ce/RoomTextListener/5_da9a53812daba655e82c71cf1479f0b5057f56ce_RoomTextListener_s.java
7e257a934d80ed2e8d0557a8affac8463f96f0b2
[]
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,241
java
package client; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import javax.swing.DefaultListModel; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.table.DefaultTableModel; import main.Packet; import main.Connection.Command; public class RoomTextListener implements KeyListener { private JTable roomTable; private JTextField roomText; private ClientConnection conn; private JLabel roomLabel; public RoomTextListener(JTable roomTable, JTextField roomText, JLabel roomLabel, ClientConnection conn) { this.roomTable = roomTable; this.roomText = roomText; this.conn = conn; this.roomLabel = roomLabel; } @Override public void keyPressed(KeyEvent e) { if(e.getKeyCode() == KeyEvent.VK_ENTER) { String room = roomText.getText(); if (room.contains(" ")) { JOptionPane.showMessageDialog(null, "Please type in a name without spaces."); } else { if (!conn.roomExists(room)) { List<String> messages = new ArrayList<String>(); conn.client.roomMessages.put(roomText.getText(), messages); /*DefaultTableModel model = (DefaultTableModel) roomTable.getModel(); model.addRow(new Object[]{"x", ">", room}); this.roomLabel.setText(room); conn.join(room); Packet message = new Packet(Command.LIST_USERS, room, Calendar.getInstance(), "", conn.getUsername()); conn.sendMessage(message);*/ } } roomText.setText(""); } } @Override public void keyReleased(KeyEvent arg0) { // TODO Auto-generated method stub } @Override public void keyTyped(KeyEvent arg0) { // TODO Auto-generated method stub } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
34dd48f93a738aaf2227221d1f96fcba49a05f87
a94ccf4db84a9ccd0e97ef9e89af4045e562e17d
/sdk/plugins/com.liferay.ide.portlet.core/src/com/liferay/ide/portlet/core/model/QName.java
b4a2990a7837d5a4b8d617ba02fe9010b4bf4216
[]
no_license
karatros/liferay-ide
f167c3f34af490278ba54d4968b1fd266ff3a215
a7aacae052d650aa653f357b13b202c5a42a7133
refs/heads/master
2020-12-30T17:33:10.449118
2012-11-23T09:03:31
2012-11-23T09:03:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,673
java
/******************************************************************************* * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * Contributors: * Kamesh Sampath - initial implementation *******************************************************************************/ package com.liferay.ide.portlet.core.model; import com.liferay.ide.portlet.core.model.internal.NameOrQnameValidationService; import com.liferay.ide.portlet.core.model.internal.QNameLocalPartValueBinding; import com.liferay.ide.portlet.core.model.internal.QNamespaceValueBinding; import org.eclipse.sapphire.modeling.IModelElement; import org.eclipse.sapphire.modeling.ModelElementType; import org.eclipse.sapphire.modeling.Value; import org.eclipse.sapphire.modeling.ValueProperty; import org.eclipse.sapphire.modeling.annotations.GenerateImpl; import org.eclipse.sapphire.modeling.annotations.Label; import org.eclipse.sapphire.modeling.annotations.Service; import org.eclipse.sapphire.modeling.xml.annotations.CustomXmlValueBinding; import org.eclipse.sapphire.modeling.xml.annotations.XmlBinding; /** * @author <a href="mailto:kamesh.sampath@accenture.com">Kamesh Sampath</a> */ @GenerateImpl public interface QName extends IModelElement { ModelElementType TYPE = new ModelElementType( QName.class ); // *** NamespaceURI *** @Label( standard = "Namespace URI" ) @XmlBinding( path = "qname" ) @Service( impl = NameOrQnameValidationService.class ) @CustomXmlValueBinding( impl = QNamespaceValueBinding.class, params = { "qname" } ) ValueProperty PROP_NAMESPACE_URI = new ValueProperty( TYPE, "NamespaceURI" ); Value<String> getNamespaceURI(); void setNamespaceURI( String value ); // *** LocalPart *** @Label( standard = "Local Part" ) @XmlBinding( path = "qname" ) @Service( impl = NameOrQnameValidationService.class ) @CustomXmlValueBinding( impl = QNameLocalPartValueBinding.class, params = { "qname", "localpart" } ) ValueProperty PROP_LOCAL_PART = new ValueProperty( TYPE, "LocalPart" ); Value<String> getLocalPart(); void setLocalPart( String value ); }
[ "gregory.amerson@liferay.com" ]
gregory.amerson@liferay.com
c6bf3576ad79d2555a4e6c65819e35963f569765
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/boot/svg/a/a/ev.java
7b8bd89fafc1f838252d5908a009781e84de5ed7
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
4,873
java
package com.tencent.mm.boot.svg.a.a; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.mm.svg.WeChatSVGRenderC2Java; import com.tencent.mm.svg.c; public final class ev extends c { private final int height = 80; private final int width = 84; public final int a(int paramInt, Object[] paramArrayOfObject) { switch (paramInt) { default: case 0: case 1: case 2: } while (true) { paramInt = 0; while (true) { return paramInt; paramInt = 84; continue; paramInt = 80; } Canvas localCanvas = (Canvas)paramArrayOfObject[0]; paramArrayOfObject = (Looper)paramArrayOfObject[1]; Object localObject1 = c.h(paramArrayOfObject); Object localObject2 = c.g(paramArrayOfObject); Paint localPaint1 = c.k(paramArrayOfObject); localPaint1.setFlags(385); localPaint1.setStyle(Paint.Style.FILL); Paint localPaint2 = c.k(paramArrayOfObject); localPaint2.setFlags(385); localPaint2.setStyle(Paint.Style.STROKE); localPaint1.setColor(-16777216); localPaint2.setStrokeWidth(1.0F); localPaint2.setStrokeCap(Paint.Cap.BUTT); localPaint2.setStrokeJoin(Paint.Join.MITER); localPaint2.setStrokeMiter(4.0F); localPaint2.setPathEffect(null); c.a(localPaint2, paramArrayOfObject).setStrokeWidth(1.0F); localCanvas.save(); localPaint2 = c.a(localPaint1, paramArrayOfObject); localPaint2.setColor(-13882324); localObject2 = c.a((float[])localObject2, 1.0F, 0.0F, -1347.0F, 0.0F, 1.0F, -215.0F); ((Matrix)localObject1).reset(); ((Matrix)localObject1).setValues((float[])localObject2); localCanvas.concat((Matrix)localObject1); localCanvas.save(); localObject2 = c.a((float[])localObject2, 1.0F, 0.0F, 1250.0F, 0.0F, 1.0F, 215.0F); ((Matrix)localObject1).reset(); ((Matrix)localObject1).setValues((float[])localObject2); localCanvas.concat((Matrix)localObject1); localCanvas.save(); localObject2 = c.a(localPaint2, paramArrayOfObject); localObject1 = c.l(paramArrayOfObject); ((Path)localObject1).moveTo(131.0F, 51.0F); ((Path)localObject1).lineTo(131.0F, 64.0F); ((Path)localObject1).cubicTo(131.0F, 65.044205F, 132.50389F, 66.626556F, 134.0F, 66.0F); ((Path)localObject1).lineTo(158.0F, 66.0F); ((Path)localObject1).lineTo(169.0F, 76.0F); ((Path)localObject1).cubicTo(169.0921F, 76.419861F, 169.86208F, 76.090591F, 170.0F, 74.0F); ((Path)localObject1).lineTo(170.0F, 66.0F); ((Path)localObject1).lineTo(177.0F, 66.0F); ((Path)localObject1).cubicTo(178.48862F, 66.626556F, 180.0F, 65.033943F, 180.0F, 64.0F); ((Path)localObject1).lineTo(180.0F, 29.0F); ((Path)localObject1).cubicTo(180.0F, 27.582346F, 178.4798F, 26.0F, 177.0F, 26.0F); ((Path)localObject1).lineTo(156.0F, 26.0F); ((Path)localObject1).lineTo(156.0F, 46.0F); ((Path)localObject1).cubicTo(154.65517F, 48.362537F, 152.38159F, 50.729206F, 150.0F, 51.0F); ((Path)localObject1).lineTo(131.0F, 51.0F); ((Path)localObject1).close(); ((Path)localObject1).moveTo(149.02345F, 4.0F); ((Path)localObject1).cubicTo(150.66736F, 4.0F, 152.0F, 5.334057F, 152.0F, 6.97253F); ((Path)localObject1).lineTo(152.0F, 44.02747F); ((Path)localObject1).cubicTo(152.0F, 45.669151F, 150.66797F, 47.0F, 149.02759F, 47.0F); ((Path)localObject1).lineTo(121.0F, 47.0F); ((Path)localObject1).lineTo(110.64339F, 55.630512F); ((Path)localObject1).cubicTo(109.73577F, 56.38686F, 109.0F, 56.041157F, 109.0F, 54.854748F); ((Path)localObject1).lineTo(109.0F, 47.0F); ((Path)localObject1).lineTo(99.966293F, 47.0F); ((Path)localObject1).cubicTo(98.328056F, 47.0F, 97.0F, 45.665943F, 97.0F, 44.02747F); ((Path)localObject1).lineTo(97.0F, 6.97253F); ((Path)localObject1).cubicTo(97.0F, 5.330847F, 98.332306F, 4.0F, 99.97654F, 4.0F); ((Path)localObject1).lineTo(149.02345F, 4.0F); ((Path)localObject1).close(); WeChatSVGRenderC2Java.setFillType((Path)localObject1, 2); localCanvas.drawPath((Path)localObject1, (Paint)localObject2); localCanvas.restore(); localCanvas.restore(); localCanvas.restore(); c.j(paramArrayOfObject); } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar * Qualified Name: com.tencent.mm.boot.svg.a.a.ev * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
46b13e6f975b20eb7ec5947c3e5de213801547f5
89bbc9b2370946d7aa8bc1b2206ca38d1c8a53db
/scribengin/core/src/main/java/com/neverwinterdp/scribengin/dataflow/tracking/TestSimpleTrackingLauncher.java
663038a34ba255aceb402c054bd1fe8baaaaa92d
[]
no_license
tuan08/NeverwinterDP
fcfbbb5001379266a09af090fd6fa93d3d0eeb89
e37d4404f317008d253d5afa05e224aa38188ca2
refs/heads/master
2021-01-12T21:28:21.373618
2016-05-30T06:54:53
2016-05-30T06:54:53
56,740,964
0
0
null
2016-04-21T03:54:31
2016-04-21T03:54:31
null
UTF-8
Java
false
false
662
java
package com.neverwinterdp.scribengin.dataflow.tracking; import com.neverwinterdp.scribengin.dataflow.Dataflow; import com.neverwinterdp.scribengin.dataflow.DataflowClient; import com.neverwinterdp.scribengin.dataflow.DataflowSubmitter; import com.neverwinterdp.scribengin.shell.ScribenginShell; public class TestSimpleTrackingLauncher extends TestTrackingLauncher { @Override public void execute(ScribenginShell shell, TrackingDataflowBuilder dflBuilder) throws Exception { Dataflow dfl = dflBuilder.buildDataflow(); DataflowSubmitter submitter = submitDataflow(shell, dfl); DataflowClient dflClient = submitter.getDataflowClient(60000); } }
[ "tuan08@gmail.com" ]
tuan08@gmail.com
37ee6f0aac248a4c48744507dc0c8ec2b60f63f8
3aa4eb3a19a4b1154d9c7d2445feedd100943958
/nvwa-mybatis/src/main/java/org/apache/ibatis/logging/slf4j/Slf4jImpl.java
fce3a7315d34bd3e654031db82584014d02790af
[]
no_license
big-mouth-cn/nvwa
de367065600d6e751cb432df660f377b57052654
6a460cf62c65ed70478a6e9ef3b5a142e8775d19
refs/heads/master
2020-04-12T02:25:02.566820
2018-01-15T04:34:33
2018-01-15T04:34:33
57,180,498
20
26
null
null
null
null
UTF-8
Java
false
false
1,229
java
/* * Copyright 2009-2012 The MyBatis Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.logging.slf4j; import org.apache.ibatis.logging.Log; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Slf4jImpl implements Log { private Logger log; public Slf4jImpl(String clazz) { log = LoggerFactory.getLogger(clazz); } public boolean isDebugEnabled() { return log.isDebugEnabled(); } public void error(String s, Throwable e) { log.error(s, e); } public void error(String s) { log.error(s); } public void debug(String s) { log.debug(s); } public void warn(String s) { log.warn(s); } }
[ "huxiao.mail@qq.com" ]
huxiao.mail@qq.com
b28da7f7956ceb74a7682d18ccf626519501d189
a39fd5020f79629eb18b362337b2ea997ca4e655
/src/repository/hsqldb/HSQLDBAccountRepository.java
5c71686333c0a569af1eca3ab08649c35b92196f
[]
no_license
Atunala/Qora2
8cbf7020911912df32178eb3d2b1dbddb18fb526
24ae771867cb4a6cdbe39b66117a91efedcd90db
refs/heads/master
2021-09-26T15:17:20.203693
2018-10-31T09:40:27
2018-10-31T09:40:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,406
java
package repository.hsqldb; import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.SQLException; import data.account.AccountBalanceData; import data.account.AccountData; import repository.AccountRepository; import repository.DataException; public class HSQLDBAccountRepository implements AccountRepository { protected HSQLDBRepository repository; public HSQLDBAccountRepository(HSQLDBRepository repository) { this.repository = repository; } // General account @Override public void create(String address) throws DataException { HSQLDBSaver saveHelper = new HSQLDBSaver("Accounts"); saveHelper.bind("account", address); try { saveHelper.execute(this.repository); } catch (SQLException e) { throw new DataException("Unable to create account in repository", e); } } @Override public AccountData getAccount(String address) throws DataException { try (ResultSet resultSet = this.repository.checkedExecute("SELECT reference FROM Accounts WHERE account = ?", address)) { if (resultSet == null) return null; return new AccountData(address, resultSet.getBytes(1)); } catch (SQLException e) { throw new DataException("Unable to fetch account info from repository", e); } } @Override public void save(AccountData accountData) throws DataException { HSQLDBSaver saveHelper = new HSQLDBSaver("Accounts"); saveHelper.bind("account", accountData.getAddress()).bind("reference", accountData.getReference()); try { saveHelper.execute(this.repository); } catch (SQLException e) { throw new DataException("Unable to save account info into repository", e); } } @Override public void delete(String address) throws DataException { // NOTE: Account balances are deleted automatically by the database thanks to "ON DELETE CASCADE" in AccountBalances' FOREIGN KEY // definition. try { this.repository.delete("Accounts", "account = ?", address); } catch (SQLException e) { throw new DataException("Unable to delete account from repository", e); } } // Account balances @Override public AccountBalanceData getBalance(String address, long assetId) throws DataException { try (ResultSet resultSet = this.repository.checkedExecute("SELECT balance FROM AccountBalances WHERE account = ? and asset_id = ?", address, assetId)) { if (resultSet == null) return null; BigDecimal balance = resultSet.getBigDecimal(1).setScale(8); return new AccountBalanceData(address, assetId, balance); } catch (SQLException e) { throw new DataException("Unable to fetch account balance from repository", e); } } @Override public void save(AccountBalanceData accountBalanceData) throws DataException { HSQLDBSaver saveHelper = new HSQLDBSaver("AccountBalances"); saveHelper.bind("account", accountBalanceData.getAddress()).bind("asset_id", accountBalanceData.getAssetId()).bind("balance", accountBalanceData.getBalance()); try { saveHelper.execute(this.repository); } catch (SQLException e) { throw new DataException("Unable to save account balance into repository", e); } } @Override public void delete(String address, long assetId) throws DataException { try { this.repository.delete("AccountBalances", "account = ? and asset_id = ?", address, assetId); } catch (SQLException e) { throw new DataException("Unable to delete account balance from repository", e); } } }
[ "misc-github@talk2dom.com" ]
misc-github@talk2dom.com
43676bf4778e00e216801a683c56803ff77f64ef
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/75_openhre-com.browsersoft.openhre.hl7.impl.config.HL7TableMapImpl-0.5-8/com/browsersoft/openhre/hl7/impl/config/HL7TableMapImpl_ESTest_scaffolding.java
288994c6205f66028dbb02fbd4ecb6ad7991fed8
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
561
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 16:30:33 GMT 2019 */ package com.browsersoft.openhre.hl7.impl.config; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class HL7TableMapImpl_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
e0f112212df69d70aff5cba9be69981ff142024f
dd6d7952cd077d2ec00a2beeb03a51d60c0f5f11
/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/matching/output/PropertyDuplicateRemover.java
a20902198605fb1e042552223735d951ad36e951
[ "CDDL-1.1", "EPL-1.0", "BSD-3-Clause", "EPL-2.0", "CDDL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
JLLeitschuh/incubator-streampipes
d4e486689c0b17c5da2686b75cecc3d5d4a87333
508bfc028a99d6cda276645be073a1f4d1762e45
refs/heads/dev
2021-01-02T13:22:01.371615
2020-02-10T15:58:23
2020-02-10T15:58:23
239,640,440
0
0
Apache-2.0
2020-11-17T11:58:08
2020-02-11T00:10:56
null
UTF-8
Java
false
false
3,951
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.streampipes.manager.matching.output; import org.streampipes.empire.core.empire.SupportsRdfId; import org.apache.streampipes.model.schema.EventProperty; import org.apache.streampipes.model.schema.EventPropertyNested; import org.apache.streampipes.model.schema.EventPropertyPrimitive; import java.net.URI; import java.util.ArrayList; import java.util.List; @Deprecated public class PropertyDuplicateRemover { private List<EventProperty> existingProperties; private List<EventProperty> newProperties; public PropertyDuplicateRemover(List<EventProperty> existingProperties, List<EventProperty> newProperties) { this.existingProperties = existingProperties; this.newProperties = newProperties; } public List<EventProperty> rename() { List<EventProperty> newEventProperties = new ArrayList<>(); for (EventProperty p : newProperties) { int i = 1; EventProperty newProperty = p; while (isAlreadyDefined(existingProperties, newProperty)) { if (newProperty instanceof EventPropertyPrimitive) { EventPropertyPrimitive primitive = (EventPropertyPrimitive) newProperty; newProperty = new EventPropertyPrimitive(primitive.getRuntimeType(), primitive.getRuntimeName() + i, "", primitive.getDomainProperties()); newProperty.setRdfId(new SupportsRdfId.URIKey(URI.create(primitive.getElementId() + i))); } if (newProperty instanceof EventPropertyNested) { EventPropertyNested nested = (EventPropertyNested) newProperty; //TODO: hack List<EventProperty> nestedProperties = new ArrayList<>(); for (EventProperty np : nested.getEventProperties()) { if (np instanceof EventPropertyPrimitive) { EventPropertyPrimitive thisPrimitive = (EventPropertyPrimitive) np; EventProperty newNested = new EventPropertyPrimitive(thisPrimitive.getRuntimeType(), thisPrimitive.getRuntimeName(), "", thisPrimitive.getDomainProperties()); //newNested.setRdfId(new URIKey(URI.create("urn:fzi.de:sepa:" +UUID.randomUUID().toString()))); newNested.setRdfId(new SupportsRdfId.URIKey(URI.create(thisPrimitive.getElementId()))); nestedProperties.add(newNested); } } newProperty = new EventPropertyNested(nested.getRuntimeName() + i, nestedProperties); //newProperty = new EventPropertyNested(nested.getPropertyName() +i, nested.getEventProperties()); //newProperty.setRdfId(new URIKey(URI.create("urn:fzi.de:sepa:" +UUID.randomUUID().toString()))); newProperty.setRdfId(new SupportsRdfId.URIKey(URI.create(nested.getElementId() + i))); } i++; } newEventProperties.add(newProperty); } return newEventProperties; } private boolean isAlreadyDefined(List<EventProperty> existingProperties, EventProperty appendProperty) { for (EventProperty existingAppendProperty : existingProperties) { if (appendProperty.getRuntimeName().equals(existingAppendProperty.getRuntimeName())) { return true; } } return false; } }
[ "riemer@fzi.de" ]
riemer@fzi.de
09bd815fbf3101060f73c0b2f328b04bd3911d67
4b178b6c6c91d3b489d4baa12cefedbb83699afa
/chapter03/method-inject/src/main/java/com/codve/prospring/ch03/xml/Employee.java
7ac650b84cf652b6b02fe4817ed16c0b38af5b0b
[]
no_license
jiangyuwise/spring-training
152bc07bcbee778ec4fd19d25c7a1713eea6bfcb
7aab520279c1b5640193c85f5cb6cf884bae3d2b
refs/heads/master
2020-08-13T20:29:06.487757
2019-10-25T09:58:17
2019-10-25T09:58:17
215,032,901
1
0
null
null
null
null
UTF-8
Java
false
false
482
java
package com.codve.prospring.ch03.xml; /** * 使用 setter 注入 Address * 在 employee 实例的整个生命周期中, address 都是不变的. */ public class Employee implements Person{ private Address address; @Override public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } @Override public void info() { System.out.println(address.getName()); } }
[ "jiangyuwise@gmail.com" ]
jiangyuwise@gmail.com
0734619bb3f01a11185ab57437885fbb3d044151
589db07be2a39b1e51e8e8a0a2cd15645c97f3fe
/request-params/src/main/java/cn/alan/converter/MyMessageConverter.java
bd60a8a988955620079398fb20049a94272daa72
[]
no_license
ronggh/SprintBootDemo
285798fa8125edb7dda9151b34612524746ed463
a32e7f7fad2ec557a2340a746327ebac4647e936
refs/heads/master
2023-02-28T00:32:08.307360
2021-01-28T09:05:34
2021-01-28T09:05:34
282,127,402
0
0
null
null
null
null
UTF-8
Java
false
false
1,808
java
package cn.alan.converter; import cn.alan.entity.Person; import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpOutputMessage; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.HttpMessageNotWritableException; import java.io.IOException; import java.io.OutputStream; import java.util.List; /** * 自定义的MessageConverter */ public class MyMessageConverter implements HttpMessageConverter<Person> { @Override public boolean canRead(Class<?> aClass, MediaType mediaType) { return false; } @Override public boolean canWrite(Class<?> aClass, MediaType mediaType) { return aClass.isAssignableFrom(Person.class); } /** * 返回自定义类型,为application/x-alan * @return */ @Override public List<MediaType> getSupportedMediaTypes() { return MediaType.parseMediaTypes("application/x-alan"); } @Override public Person read(Class<? extends Person> aClass, HttpInputMessage httpInputMessage) throws IOException, HttpMessageNotReadableException { return null; } /** * 自定义数据的写出 * @param person * @param mediaType * @param httpOutputMessage * @throws IOException * @throws HttpMessageNotWritableException */ @Override public void write(Person person, MediaType mediaType, HttpOutputMessage httpOutputMessage) throws IOException, HttpMessageNotWritableException { String data = "name="+person.getName()+"|age="+person.getAge(); OutputStream os = httpOutputMessage.getBody(); os.write(data.getBytes()); } }
[ "ronggh@sina.cn" ]
ronggh@sina.cn
cb92ff8dc7971b23afc675c62e0f7eb6e5565ee6
af5b98436a951d1cf28aa04bd564445ce153dfc0
/component_video/src/main/java/com/netposa/ffmpeg/decoder/h264.java
da5b9c4696afdd167e386c91961e87227e500d7c
[]
no_license
allenzhangfan/Tujie
dd595c6a5cf87ea756da79f069d2a9fcefd080e0
ce96f27330f8f8058cf2b2b0a4cb568f7fa7414b
refs/heads/master
2020-04-26T01:58:49.785221
2019-01-08T02:25:26
2019-01-08T02:25:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,427
java
package com.netposa.ffmpeg.decoder; public class h264 { private long mdecoderh264Id; public interface ffmpeg_decoder_h264_callback { void onVideoSize(int width, int height); void onYUVData(byte[] data, int len); } private ffmpeg_decoder_h264_callback l; public h264(ffmpeg_decoder_h264_callback cb) { this.l = cb; } public void closeh264() { close(); mdecoderh264Id = 0; } /** * 打开解码器 * * @return 0 成功 -1 失败 */ public native int open(); /** * 解码 * * @param data h264数据 * @param len 数据长度 */ public native void decode(byte[] data, int len); /** * 关闭解码器 */ public native void close(); /** * 视频分辨率回调 * 注意:如果每一个I帧前都有sps_pps,则会一直回调,上层引用需要根据需求处理 * * @param width 分辨率-宽 * @param height 分辨率-高 */ private void onVideoSize(int width, int height) { if (this.l != null) { l.onVideoSize(width, height); } } /** * h264解码完成的YUV回调 * * @param data YUV数据 * @param len 数据长度 */ private void onYUVFrame(byte[] data, int len) { if (this.l != null) { l.onYUVData(data, len); } } }
[ "yeguoqiang6@outlook.com" ]
yeguoqiang6@outlook.com
50800ebb12e2e7c4c28b19e1eafc05d69800dd9a
8f50123114c46c15d1fe3820a985cdaf7a535ea4
/gc-core/src/main/java/com/glacier/crawler/utils/XMLUtil.java
752ba67cbb42247ea582bf114c3d2ae2d31992e1
[]
no_license
rucky2013/GlacierCrawler
6c323661901a2884c90ea82f9dd14afd5315b302
0b76c6b956e681e26a5115f1cb82cc3c7bc85c2b
refs/heads/master
2021-01-24T22:43:43.529769
2016-05-15T03:27:10
2016-05-15T03:27:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package com.glacier.crawler.utils; import org.dom4j.Document; import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWriter; import java.io.StringWriter; /** * Created by Glacier on 16/5/12. */ public class XMLUtil { public static String formatXML(Document document) { String formatXMLStr = null; try { OutputFormat format = OutputFormat.createPrettyPrint(); format.setEncoding("UTF-8"); StringWriter writer = new StringWriter(); XMLWriter xmlWriter = new XMLWriter(writer, format); xmlWriter.write(document); formatXMLStr = writer.toString(); }catch (Exception e) { e.printStackTrace(); } return formatXMLStr.replaceAll("&", ""); } }
[ "OurHom.759@gmail.com" ]
OurHom.759@gmail.com