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
14aa94ba93f8bbbb91acc75f5dd78fef406019f7
c58577238fe4642c89a4907cc1fcd68efd9a694d
/chapter11/11.2-4/SpringOrderServiceClient/src/main/java/com/ensoa/orderservice/PurchaseOrder.java
950d1f07efe42978ab56ce084a2c9ee693f1d113
[]
no_license
jonghwankwon/All-In-One-Java
11cf6e0b419b3bbfaf56bf4d5d62cc277b836ce6
45f619cb25bb412ef3b7b6b13f718cace2e6f257
refs/heads/master
2022-12-26T22:59:01.166801
2019-07-31T03:45:41
2019-07-31T03:45:41
198,590,202
0
0
null
2022-12-16T04:29:06
2019-07-24T08:17:15
Java
UTF-8
Java
false
false
1,342
java
package com.ensoa.orderservice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>purchaseOrder complex type์— ๋Œ€ํ•œ Java ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค. * * <p>๋‹ค์Œ ์Šคํ‚ค๋งˆ ๋‹จํŽธ์ด ์ด ํด๋ž˜์Šค์— ํฌํ•จ๋˜๋Š” ํ•„์š”ํ•œ ์ฝ˜ํ…์ธ ๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. * * <pre> * &lt;complexType name="purchaseOrder"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="arg0" type="{http://orderservice.ensoa.com/}order" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "purchaseOrder", propOrder = { "arg0" }) public class PurchaseOrder { protected Order arg0; /** * arg0 ์†์„ฑ์˜ ๊ฐ’์„ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค. * * @return * possible object is * {@link Order } * */ public Order getArg0() { return arg0; } /** * arg0 ์†์„ฑ์˜ ๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. * * @param value * allowed object is * {@link Order } * */ public void setArg0(Order value) { this.arg0 = value; } }
[ "whdghks1048@naver.com" ]
whdghks1048@naver.com
89c1045d43d6926c54bfb35bfea789f5f22ab3e0
80169c3f5fda99d7102c995610219450397fa69f
/src/main/java/xml/tutorial6/SlayDragonQuest.java
adf091f6bf9707392a04e0943494c4dd38c0fb8a
[]
no_license
demotivirus/spring-core-tutorials
5a7c9238e9026da52faf5742b5af4732004bc4cf
eac02b3ef8c7033a9e7a705c9456e7bd8b97edab
refs/heads/master
2020-05-14T14:00:13.405062
2019-04-17T05:30:59
2019-04-17T05:30:59
181,824,208
1
0
null
null
null
null
UTF-8
Java
false
false
233
java
package xml.tutorial6; public class SlayDragonQuest implements Quest{ public void embark(){ System.out.println("Go to the dragon head!"); } @Override public void embarkOnQuest() { embark(); } }
[ "demotivirus@gmail.com" ]
demotivirus@gmail.com
0910dd9cdc4b4e22cd703385edd5e1985c53229a
70533af14c57c24c89969e60b0c506aec564cae9
/src/cloud_plugin/testcase/algorithm/videoplanassess/pa_modeling/Volumen_Estimate_AlgorithmCreateTask.java
0fe0bf4c8b08ba8996f18e899d662c0488cd210b
[]
no_license
yangquan1982/AutomationTestFramework1
e393d6ac69b8412a91290e88b2a46d39856ecfcc
bc8faa61dd62a221af2a481e5b0f5d3b7a8200b5
refs/heads/master
2020-03-09T13:07:01.660799
2019-06-13T04:33:48
2019-06-13T04:33:48
128,802,310
2
0
null
null
null
null
UTF-8
Java
false
false
5,791
java
package cloud_plugin.testcase.algorithm.videoplanassess.pa_modeling; import java.util.Arrays; import java.util.Collection; import org.fest.swing.annotation.GUITest; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import org.openqa.selenium.WebDriver; import cloud_plugin.task.network_performance_analysis_center.network_planning.lte_seq_vmos.SeqVMOSTask; import cloud_public.page.GetDataByTypePage; import cloud_public.page.HomePage; import cloud_public.page.IndexPage; import cloud_public.task.LoginTask; import common.constant.constparameter.ConstUrl; import common.util.CommonWD; import common.util.ParamUtil; @GUITest @FixMethodOrder(MethodSorters.NAME_ASCENDING) @RunWith(value = Parameterized.class) public class Volumen_Estimate_AlgorithmCreateTask { private static WebDriver driver = null; private static String defaultWindowID = null; private static String ParaFile = ConstUrl.getProjectHomePath()+"\\Data\\baseline\\02_็ฎ—ๆณ•\\ๅ‚ๆ•ฐๅŒ–\\่ง†้ข‘่ง„ๅˆ’ไธŽ่ฏ„ไผฐ\\ๅฎน้‡่ฏ„ไผฐๅ‰ๅฐๅ‚ๆ•ฐๅŒ–่กจ.xlsx"; private static String SheetName = "VMOS_็ฎ—ๆณ•"; private String secns; private String TestCaseId; private String ProjectName; private String[] TaskType; private String[] CfgData; private String[] ParamData; private String[] SigData; private String[] NonEncryptedVideoSourceData; private String[] EncryptedVideoSourceData; private String[] OTTData; private String[] ElectronicMapData; private String[] LTECharacteristicLibraryData; private String[] PerformanceData; private String VideoTrafficForecastResultFile; private String[] XDR_MRPreprocessData; private String[] CDRData; private String[] UELogsData; private String[] DataPreprocessingSetItems; private String[] DataPreprocessingSetValues; private String[] EvaluationSetItems; private String[] EvaluationSetItemsValues; private String IsIndependentBusyhourKPIs; private String FilteringMode; private String BusyhourKPI; private String[] CustomHours; private String BusyDays; private String LegendSetItem; private String LegendSetSegmentNumber; private String[] LegendSetValue; public Volumen_Estimate_AlgorithmCreateTask(String secns, String testId,String projectName, String[] taskType, String[] cfgData, String[] paramData, String[] sigData, String[] nonEncryptedVideoSourceData, String[] encryptedVideoSourceData, String[] oTTData, String[] electronicMapData, String[] lTECharacteristicLibraryData, String[] performanceData, String videoTrafficForecastResultFile,String[] xDR_MRPreprocessData, String[] cDRData, String[] uELogsData, String[] dataPreprocessingSetItems, String[] dataPreprocessingSetValues, String[] evaluationSetItems, String[] evaluationSetItemsValues, String isIndependentBusyhourKPIs, String filteringMode, String busyhourKPI, String[] customHours, String busyDays, String legendSetItem, String legendSetSegmentNumber, String[] legendSetValue) { this.secns = secns; TestCaseId=testId; ProjectName = projectName; TaskType = taskType; CfgData = cfgData; ParamData = paramData; SigData = sigData; NonEncryptedVideoSourceData = nonEncryptedVideoSourceData; EncryptedVideoSourceData = encryptedVideoSourceData; OTTData = oTTData; ElectronicMapData = electronicMapData; LTECharacteristicLibraryData = lTECharacteristicLibraryData; PerformanceData = performanceData; VideoTrafficForecastResultFile = videoTrafficForecastResultFile; XDR_MRPreprocessData = xDR_MRPreprocessData; CDRData = cDRData; UELogsData = uELogsData; DataPreprocessingSetItems = dataPreprocessingSetItems; DataPreprocessingSetValues = dataPreprocessingSetValues; EvaluationSetItems = evaluationSetItems; EvaluationSetItemsValues = evaluationSetItemsValues; IsIndependentBusyhourKPIs = isIndependentBusyhourKPIs; FilteringMode = filteringMode; BusyhourKPI = busyhourKPI; CustomHours = customHours; BusyDays = busyDays; LegendSetItem = legendSetItem; LegendSetSegmentNumber = legendSetSegmentNumber; LegendSetValue = legendSetValue; } @Parameters() public static Collection<Object[]> data() throws Exception { System.out.print("This is collection"); Collection<Object[]> coll = Arrays.asList(ParamUtil.getObjectArr( ParaFile, SheetName)); return coll; } @BeforeClass public static void setUpBeforeClass() { driver = CommonWD.getWebDriver(); defaultWindowID = driver.getWindowHandle(); LoginTask.login(driver); HomePage.gotoldVersion(driver); IndexPage.OpenNetPerfomanceAnalysisCenter(driver); } @Before public void setUp() { GetDataByTypePage.closeOtherWindows(driver, defaultWindowID); SeqVMOSTask.goBackToNetworkAnalysisCenter(driver); } @After public void tearDown() { // StartBackFillTMSS.backFill(TestCaseId,result); System.out.println("tmss end xx"); } @AfterClass public static void tearDownAfterClass() { driver.quit(); } @Test public void T00_Algorithm_vMOSCreateTask() { SeqVMOSTask.ParamCreateTask(driver, secns, ProjectName, TaskType, CfgData, ParamData, SigData, NonEncryptedVideoSourceData, EncryptedVideoSourceData, OTTData, ElectronicMapData, LTECharacteristicLibraryData, PerformanceData, VideoTrafficForecastResultFile, XDR_MRPreprocessData,CDRData, UELogsData, DataPreprocessingSetItems, DataPreprocessingSetValues, EvaluationSetItems, EvaluationSetItemsValues, IsIndependentBusyhourKPIs, FilteringMode, BusyhourKPI, CustomHours, BusyDays, LegendSetItem, LegendSetSegmentNumber, LegendSetValue); } }
[ "tbg127@gmail.com" ]
tbg127@gmail.com
294b0dfb5056c9845f1fc321ea2f533ec0a7af91
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/4/FusionIndexBase.java
4a869484bbc2380f564e4f0e49ab1926b9503bc3
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
6,462
java
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.impl.index.schema.fusion; import java.lang.reflect.Array; import java.util.Arrays; import org.neo4j.collection.primitive.PrimitiveIntCollections; import org.neo4j.function.ThrowingConsumer; import org.neo4j.function.ThrowingFunction; import org.neo4j.helpers.Exceptions; import org.neo4j.kernel.api.index.IndexProvider; /** * Acting as a simplifier for the multiplexing that is going in inside a fusion index. A fusion index consists of multiple parts, * each handling one or more value groups. Each instance, be it a reader, populator or accessor should extend this class * to get that multiplexing at a low cost. All parts will live in an array with specific slot constants to each specific part. * * @param <T> type of instances */ public abstract class FusionIndexBase<T> { static final int INSTANCE_COUNT = 5; static final int STRING = 0; static final int NUMBER = 1; static final int SPATIAL = 2; static final int TEMPORAL = 3; static final int LUCENE = 4; final T[] instances; final FusionIndexProvider.Selector selector; FusionIndexBase( T[] instances, FusionIndexProvider.Selector selector ) { assert instances.length == INSTANCE_COUNT; this.instances = instances; this.selector = selector; } <R,E extends Exception> R[] instancesAs( Class<R> cls, ThrowingFunction<T,R,E> converter ) throws E { return instancesAs( instances, cls, converter ); } static <T,R,E extends Exception> R[] instancesAs( T[] instances, Class<R> cls, ThrowingFunction<T,R,E> converter ) throws E { R[] result = (R[]) Array.newInstance( cls, instances.length ); for ( int i = 0; i < instances.length; i++ ) { result[i] = converter.apply( instances[i] ); } return result; } /** * NOTE: duplicate of {@link #forAll(ThrowingConsumer, Iterable)} to avoid having to wrap subjects of one form into another. * There are some real use cases for passing in an array instead of {@link Iterable} out there... * * Method for calling a lambda function on many objects when it is expected that the function might * throw an exception. First exception will be thrown and subsequent will be suppressed. * * For example, in FusionIndexAccessor: * <pre> * public void drop() throws IOException * { * forAll( IndexAccessor::drop, firstAccessor, secondAccessor, thirdAccessor ); * } * </pre> * * @param consumer lambda function to call on each object passed * @param subjects varargs array of objects to call the function on * @param <E> the type of exception anticipated, inferred from the lambda * @throws E if consumption fails with this exception */ @SafeVarargs public static <T, E extends Exception> void forAll( ThrowingConsumer<T,E> consumer, T... subjects ) throws E { // Duplicate this method for array to avoid creating a purely internal list to shove that in to the other method. E exception = null; for ( T subject : subjects ) { try { consumer.accept( subject ); } catch ( Exception e ) { exception = Exceptions.chain( exception, (E) e ); } } if ( exception != null ) { throw exception; } } /** * See {@link #forAll(ThrowingConsumer, Object[])} * NOTE: duplicate of {@link #forAll(ThrowingConsumer, Object[])} to avoid having to wrap subjects of one form into another. * There are some real use cases for passing in an Iterable instead of array out there... * * Method for calling a lambda function on many objects when it is expected that the function might * throw an exception. First exception will be thrown and subsequent will be suppressed. * * For example, in FusionIndexAccessor: * <pre> * public void drop() throws IOException * { * forAll( IndexAccessor::drop, firstAccessor, secondAccessor, thirdAccessor ); * } * </pre> * * @param consumer lambda function to call on each object passed * @param subjects varargs array of objects to call the function on * @param <E> the type of exception anticipated, inferred from the lambda * @throws E if consumption fails with this exception */ public static <T, E extends Exception> void forAll( ThrowingConsumer<T,E> consumer, Iterable<T> subjects ) throws E { E exception = null; for ( T subject : subjects ) { try { consumer.accept( subject ); } catch ( Exception e ) { exception = Exceptions.chain( exception, (E) e ); } } if ( exception != null ) { throw exception; } } static void validateSelectorInstances( Object[] instances, int... aliveIndex ) { for ( int i = 0; i < instances.length; i++ ) { boolean expected = PrimitiveIntCollections.contains( aliveIndex, i ); boolean actual = instances[i] != IndexProvider.EMPTY; if ( expected != actual ) { throw new IllegalArgumentException( String.format( "Only indexes expected to be separated from IndexProvider.EMPTY are %s but was %s", Arrays.toString( aliveIndex ), Arrays.toString( instances ) ) ); } } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
ca707534ade91b2c2836edaa9527e40d079bb1cd
aca457909ef8c4eb989ba23919de508c490b074a
/DialerJADXDecompile/defpackage/ai.java
9752a5d1c52282fd8f9cbf801495d8f474dd035e
[]
no_license
KHikami/ProjectFiCallingDeciphered
bfccc1e1ba5680d32a4337746de4b525f1911969
cc92bf6d4cad16559a2ecbc592503d37a182dee3
refs/heads/master
2021-01-12T17:50:59.643861
2016-12-08T01:20:34
2016-12-08T01:23:04
71,650,754
1
0
null
null
null
null
UTF-8
Java
false
false
373
java
package defpackage; import java.lang.ref.WeakReference; /* compiled from: PG */ /* renamed from: ai */ public final class ai { final WeakReference a; public int b; public ai(int i, ah ahVar) { this.a = new WeakReference(ahVar); this.b = i; } final boolean a(ah ahVar) { return ahVar != null && this.a.get() == ahVar; } }
[ "chu.rachelh@gmail.com" ]
chu.rachelh@gmail.com
65d10abf2f0b41a4abf33694ee32ae3ad2e0a125
5cb5d1fc80c1f68ade44f0a26a02d1aeb118c64d
/ink-user/ink-user-core/src/main/java/com/ink/user/core/dao/IReqLogDao.java
e86cf754d6b45da3d7bc3d5901c9da92d9e0e1cd
[]
no_license
gspandy/zx-parent
4350d1ef851d05eabdcf8c6c7049a46593e3c22e
5cdc52e645537887e86e5cbc117139ca1a56f55d
refs/heads/master
2023-08-31T15:29:50.763388
2016-08-11T09:17:29
2016-08-11T09:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
/** * <p> Copyright (c) 2015-2025 ้“ถๅฎข็ฝ‘.</p> * <p>All Rights Reserved. ไฟ็•™ๆ‰€ๆœ‰ๆƒๅˆฉ. </p> */ package com.ink.user.core.dao; import com.ink.user.core.po.ReqLog; import com.ink.base.EntityDao; /** * @author * @version 1.0 * @since 1.0 */ public interface IReqLogDao extends EntityDao<ReqLog, java.lang.Long>{ ReqLog checkReqLog(String ordId, String txnCode, String mchId); }
[ "zxzhouxiang123@163.com" ]
zxzhouxiang123@163.com
3aaba598c7abf6fb0e5f1cf88f2d2acb051576e5
f54fad3847c91e417812289c5870da0ddfd17585
/client/console/src/main/java/org/apache/syncope/client/console/rest/UserSelfRestClient.java
6a09b7c805e4ccdebdf7d7ec6a707e852172bc38
[ "Apache-2.0" ]
permissive
cs-keum/syncope
58e22bf2ad0847f30b2e6124329eedac05441d0e
29f2d7b2617a9dd2e5dd2f40f7d25e5cfc49cd95
refs/heads/master
2021-05-31T07:16:29.005937
2015-12-31T10:03:32
2015-12-31T10:03:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,511
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.syncope.client.console.rest; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.patch.UserPatch; import org.apache.syncope.common.lib.to.UserTO; import org.apache.syncope.common.rest.api.service.UserSelfService; import org.springframework.stereotype.Component; @Component public class UserSelfRestClient extends BaseRestClient { private static final long serialVersionUID = 2994691796924731295L; public boolean isSelfRegistrationAllowed() { Boolean result = null; try { result = SyncopeConsoleSession.get().getSyncopeTO().isSelfRegAllowed(); } catch (SyncopeClientException e) { LOG.error("While seeking if self registration is allowed", e); } return result == null ? false : result; } public UserTO read() { return SyncopeConsoleSession.get().getSelfTO(); } public void create(final UserTO userTO, final boolean storePassword) { getService(UserSelfService.class).create(userTO, storePassword); } public void update(final UserPatch userPatch) { getService(UserSelfService.class).update(userPatch); } public void delete() { getService(UserSelfService.class).delete(); } public boolean isPasswordResetAllowed() { Boolean result = null; try { result = SyncopeConsoleSession.get().getSyncopeTO().isPwdResetAllowed(); } catch (SyncopeClientException e) { LOG.error("While seeking if password reset is allowed", e); } return result == null ? false : result; } public boolean isPwdResetRequiringSecurityQuestions() { Boolean result = null; try { result = SyncopeConsoleSession.get().getSyncopeTO().isPwdResetRequiringSecurityQuestions(); } catch (SyncopeClientException e) { LOG.error("While seeking if password reset requires security question", e); } return result == null ? false : result; } public void changePassword(final String password) { getService(UserSelfService.class).changePassword(password); } public void requestPasswordReset(final String username, final String securityAnswer) { getService(UserSelfService.class).requestPasswordReset(username, securityAnswer); } public void confirmPasswordReset(final String token, final String password) { getService(UserSelfService.class).confirmPasswordReset(token, password); } }
[ "ilgrosso@apache.org" ]
ilgrosso@apache.org
72c7ef15813fd242eae3c08a33ee25f9ca47d56d
8bbeb7b5721a9dbf40caa47a96e6961ceabb0128
/java/37.Sudoku Solver(่งฃๆ•ฐ็‹ฌ).java
a4ba6e507ad4ae780a2547c279c77207543ade4e
[ "MIT" ]
permissive
lishulongVI/leetcode
bb5b75642f69dfaec0c2ee3e06369c715125b1ba
6731e128be0fd3c0bdfe885c1a409ac54b929597
refs/heads/master
2020-03-23T22:17:40.335970
2018-07-23T14:46:06
2018-07-23T14:46:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,858
java
/** <p>Write a program to solve a Sudoku puzzle by filling the empty cells.</p> <p>A&nbsp;sudoku solution must satisfy <strong>all of&nbsp;the following rules</strong>:</p> <ol> <li>Each of the digits&nbsp;<code>1-9</code> must occur exactly&nbsp;once in each row.</li> <li>Each of the digits&nbsp;<code>1-9</code>&nbsp;must occur&nbsp;exactly once in each column.</li> <li>Each of the the digits&nbsp;<code>1-9</code> must occur exactly once in each of the 9 <code>3x3</code> sub-boxes of the grid.</li> </ol> <p>Empty cells are indicated by the character <code>&#39;.&#39;</code>.</p> <p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png" style="height:250px; width:250px" /><br /> <small>A sudoku puzzle...</small></p> <p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png" style="height:250px; width:250px" /><br /> <small>...and its solution numbers marked in red.</small></p> <p><strong>Note:</strong></p> <ul> <li>The given board&nbsp;contain only digits <code>1-9</code> and the character <code>&#39;.&#39;</code>.</li> <li>You may assume that the given Sudoku puzzle will have a single unique solution.</li> <li>The given board size is always <code>9x9</code>.</li> </ul> <p>็ผ–ๅ†™ไธ€ไธช็จ‹ๅบ๏ผŒ้€š่ฟ‡ๅทฒๅกซๅ……็š„็ฉบๆ ผๆฅ่งฃๅ†ณๆ•ฐ็‹ฌ้—ฎ้ข˜ใ€‚</p> <p>ไธ€ไธชๆ•ฐ็‹ฌ็š„่งฃๆณ•้œ€<strong>้ตๅพชๅฆ‚ไธ‹่ง„ๅˆ™</strong>๏ผš</p> <ol> <li>ๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅœจๆฏไธ€่กŒๅช่ƒฝๅ‡บ็Žฐไธ€ๆฌกใ€‚</li> <li>ๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅœจๆฏไธ€ๅˆ—ๅช่ƒฝๅ‡บ็Žฐไธ€ๆฌกใ€‚</li> <li>ๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅœจๆฏไธ€ไธชไปฅ็ฒ—ๅฎž็บฟๅˆ†้š”็š„&nbsp;<code>3x3</code>&nbsp;ๅฎซๅ†…ๅช่ƒฝๅ‡บ็Žฐไธ€ๆฌกใ€‚</li> </ol> <p>็ฉบ็™ฝๆ ผ็”จ&nbsp;<code>&#39;.&#39;</code>&nbsp;่กจ็คบใ€‚</p> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png"></p> <p><small>ไธ€ไธชๆ•ฐ็‹ฌใ€‚</small></p> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png"></p> <p><small>็ญ”ๆกˆ่ขซๆ ‡ๆˆ็บข่‰ฒใ€‚</small></p> <p><strong>Note:</strong></p> <ul> <li>็ป™ๅฎš็š„ๆ•ฐ็‹ฌๅบๅˆ—ๅชๅŒ…ๅซๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅ’Œๅญ—็ฌฆ&nbsp;<code>&#39;.&#39;</code>&nbsp;ใ€‚</li> <li>ไฝ ๅฏไปฅๅ‡่ฎพ็ป™ๅฎš็š„ๆ•ฐ็‹ฌๅชๆœ‰ๅ”ฏไธ€่งฃใ€‚</li> <li>็ป™ๅฎšๆ•ฐ็‹ฌๆฐธ่ฟœๆ˜ฏ&nbsp;<code>9x9</code>&nbsp;ๅฝขๅผ็š„ใ€‚</li> </ul> <p>็ผ–ๅ†™ไธ€ไธช็จ‹ๅบ๏ผŒ้€š่ฟ‡ๅทฒๅกซๅ……็š„็ฉบๆ ผๆฅ่งฃๅ†ณๆ•ฐ็‹ฌ้—ฎ้ข˜ใ€‚</p> <p>ไธ€ไธชๆ•ฐ็‹ฌ็š„่งฃๆณ•้œ€<strong>้ตๅพชๅฆ‚ไธ‹่ง„ๅˆ™</strong>๏ผš</p> <ol> <li>ๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅœจๆฏไธ€่กŒๅช่ƒฝๅ‡บ็Žฐไธ€ๆฌกใ€‚</li> <li>ๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅœจๆฏไธ€ๅˆ—ๅช่ƒฝๅ‡บ็Žฐไธ€ๆฌกใ€‚</li> <li>ๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅœจๆฏไธ€ไธชไปฅ็ฒ—ๅฎž็บฟๅˆ†้š”็š„&nbsp;<code>3x3</code>&nbsp;ๅฎซๅ†…ๅช่ƒฝๅ‡บ็Žฐไธ€ๆฌกใ€‚</li> </ol> <p>็ฉบ็™ฝๆ ผ็”จ&nbsp;<code>&#39;.&#39;</code>&nbsp;่กจ็คบใ€‚</p> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png"></p> <p><small>ไธ€ไธชๆ•ฐ็‹ฌใ€‚</small></p> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png"></p> <p><small>็ญ”ๆกˆ่ขซๆ ‡ๆˆ็บข่‰ฒใ€‚</small></p> <p><strong>Note:</strong></p> <ul> <li>็ป™ๅฎš็š„ๆ•ฐ็‹ฌๅบๅˆ—ๅชๅŒ…ๅซๆ•ฐๅญ—&nbsp;<code>1-9</code>&nbsp;ๅ’Œๅญ—็ฌฆ&nbsp;<code>&#39;.&#39;</code>&nbsp;ใ€‚</li> <li>ไฝ ๅฏไปฅๅ‡่ฎพ็ป™ๅฎš็š„ๆ•ฐ็‹ฌๅชๆœ‰ๅ”ฏไธ€่งฃใ€‚</li> <li>็ป™ๅฎšๆ•ฐ็‹ฌๆฐธ่ฟœๆ˜ฏ&nbsp;<code>9x9</code>&nbsp;ๅฝขๅผ็š„ใ€‚</li> </ul> **/ class Solution { public void solveSudoku(char[][] board) { } }
[ "lishulong@wecash.net" ]
lishulong@wecash.net
fe28e121d1d96aa9efa6a3b43b438cd92492cffb
c19435aface677d3de0958c7fa8b0aa7e3b759f3
/base/config/src/main/java/org/artifactory/descriptor/security/PasswordExpirationPolicy.java
1295aca5c3de2158804af95edb0a58e8e202ae73
[]
no_license
apaqi/jfrog-artifactory-5.11.0
febc70674b4a7b90f37f2dfd126af36b90784c28
6a4204ed9ce9334d3eb7a8cb89c1d9dc72d709c1
refs/heads/master
2020-03-18T03:13:41.286825
2018-05-21T06:57:30
2018-05-21T06:57:30
134,229,368
0
0
null
null
null
null
UTF-8
Java
false
false
2,345
java
/* * * Artifactory is a binaries repository manager. * Copyright (C) 2016 JFrog Ltd. * * Artifactory is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Artifactory 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Artifactory. If not, see <http://www.gnu.org/licenses/>. * */ package org.artifactory.descriptor.security; import lombok.Data; import org.artifactory.descriptor.Descriptor; import org.jfrog.common.config.diff.GenerateDiffFunction; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import java.util.Optional; /** * Password expiration configuration * * @author Michael Pasternak */ @XmlType(name = "PasswordExpirationPolicyType", propOrder = {"enabled", "passwordMaxAge", "notifyByEmail", "currentPasswordValidFor"}, namespace = Descriptor.NS ) @GenerateDiffFunction @Data public class PasswordExpirationPolicy implements Descriptor { @XmlElement(defaultValue = "false", required = false) private Boolean enabled = false; /** * number of days for password to get expired (general password live time) */ @XmlElement(defaultValue = "60", required = false) private Integer passwordMaxAge = 60; @XmlElement(defaultValue = "true", required = false) private Boolean notifyByEmail = true; /** * number of days till password should be changed */ @XmlElement(required = false) private Integer currentPasswordValidFor; public void setNotifyByEmail(Boolean notifyByEmail) { this.notifyByEmail = Optional.ofNullable(notifyByEmail).orElse(true); } public void setEnabled(Boolean enabled) { this.enabled = Optional.ofNullable(enabled).orElse(false); } public void setPasswordMaxAge(Integer passwordMaxAge) { this.passwordMaxAge = Optional.ofNullable(passwordMaxAge).orElse(60); } }
[ "wangpeixuan00@126.com" ]
wangpeixuan00@126.com
1959c01091982add0ee0b2f9cc9a00575cbac6c2
69e336d4c9c58fff7c93395339cc0f840e31601c
/src/main/com/idamobile/vpb/courier/navigation/AlwaysOpenNewNavigationController.java
42f4b6c7b250b3202e02ca40eac3acac781b2c23
[]
no_license
idamobile/vpb-courier-app
d8ee1f4cad11a05c4e82b492defcee37c3affb43
760b5a271e6de21b4ea140d68f4e1b29f9de151a
refs/heads/master
2021-01-11T02:08:55.045189
2014-02-20T08:07:30
2014-02-20T08:07:30
8,136,215
0
1
null
null
null
null
UTF-8
Java
false
false
2,393
java
package com.idamobile.vpb.courier.navigation; import android.app.Activity; import android.content.Context; import android.content.Intent; import com.idamobile.vpb.courier.ApplicationMediator; import com.idamobile.vpb.courier.CoreApplication; import com.idamobile.vpb.courier.LoginActivity; import com.idamobile.vpb.courier.OrderListActivity; public class AlwaysOpenNewNavigationController extends AbstractNavigationController { private static final int NEXT_ACTIVITY_REQUEST_CODE = 2209; private RootActivityBackButtonController backButtonController; public AlwaysOpenNewNavigationController(Context context) { super(context, new AlwaysOpenNewNavigationMethodFactory()); if (context instanceof Activity) { backButtonController = new RootActivityBackButtonController((Activity) getContext()); } } @Override public boolean onBackPressed() { Activity activity = (Activity) getContext(); ApplicationMediator mediator = CoreApplication.getMediator(activity); boolean loggedIn = mediator.getLoginManager().isLoggedIn(); boolean hasPrevious = AlwaysOpenNewNavigationUtils.hasPreviousActivity(activity); if (loggedIn && !hasPrevious && backButtonController.dispatchOnBackPressed()) { return true; } else { if (activity instanceof OrderListActivity) { mediator.getLoginManager().logout(); activity.setResult(Activity.RESULT_OK); } return false; } } @Override public void onCreate() { } @Override public void onNewIntent(Intent intent) { } @Override public void processSuccessLogin() { getOrdersList().startForResult(NEXT_ACTIVITY_REQUEST_CODE); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { Activity activity = (Activity) getContext(); if (activity instanceof LoginActivity) { if (requestCode == NEXT_ACTIVITY_REQUEST_CODE) { activity.finish(); } } } @Override public void processSignOut() { NavigationMethod method = getLogin(); if (method instanceof AlwaysOpenNewLoginNavigationMethod) { ((AlwaysOpenNewLoginNavigationMethod) method).setSignOut(); } method.start(); } }
[ "shaubert.alexander@gmail.com" ]
shaubert.alexander@gmail.com
7beaaed5e92fe282302c9876910bb7a1b61dc340
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/21224972.java
322d88b8ebe49b21623d1ecd0a6fa666d7f2007d
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,265
java
import java.io.UncheckedIOException; import java.io.UncheckedIOException; class c21224972 { public MyHelperClass conexionBD; public MyHelperClass populatePreparedStatement(jugador o0){ return null; } public boolean update(int idJugador, jugador jugadorModificado) { int intResult = 0; String sql = "UPDATE jugador " + "SET apellidoPaterno = ?, apellidoMaterno = ?, nombres = ?, fechaNacimiento = ?, " + " pais = ?, rating = ?, sexo = ? " + " WHERE idJugador = " + idJugador; try { MyHelperClass connection = new MyHelperClass(); connection = conexionBD.getConnection(); // MyHelperClass connection = new MyHelperClass(); connection.setAutoCommit(false); MyHelperClass ps = new MyHelperClass(); ps = connection.prepareStatement(sql); populatePreparedStatement(jugadorModificado); // MyHelperClass ps = new MyHelperClass(); intResult =(int)(Object) ps.executeUpdate(); // MyHelperClass connection = new MyHelperClass(); connection.commit(); } catch (UncheckedIOException ex) { ex.printStackTrace(); try { MyHelperClass connection = new MyHelperClass(); connection.rollback(); } catch (UncheckedIOException exe) { exe.printStackTrace(); } } finally { MyHelperClass ps = new MyHelperClass(); conexionBD.close(ps); MyHelperClass connection = new MyHelperClass(); conexionBD.close(connection); } return (intResult > 0); } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass commit(){ return null; } public MyHelperClass rollback(){ return null; } public MyHelperClass executeUpdate(){ return null; } public MyHelperClass close(MyHelperClass o0){ return null; } public MyHelperClass getConnection(){ return null; } public MyHelperClass prepareStatement(String o0){ return null; } public MyHelperClass setAutoCommit(boolean o0){ return null; }} class jugador { } class SQLException extends Exception{ public SQLException(String errorMessage) { super(errorMessage); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
5b15ee9fa08c001c6eccff9c97e7fab079d4c7a1
522c4abef6c0410d52dd5b8433bf4487d46c1c25
/efamily-task/src/main/java/com/winterframework/efamily/exception/ServerException.java
3b192d7a66ec7518543c7ee57d5d924c55384d81
[]
no_license
xjiafei/efamily
05b1c71e1f7f485132e5d6243e7af7208b567517
0401d6ec572c7959721c294408f6d525e3d12866
refs/heads/master
2020-03-10T11:42:00.359799
2018-04-13T08:13:58
2018-04-13T08:13:58
129,361,914
0
3
null
null
null
null
UTF-8
Java
false
false
655
java
package com.winterframework.efamily.exception; @SuppressWarnings("serial") public class ServerException extends Exception { private int code=9; public ServerException() { super(); } public ServerException(String message) { super(message); } public ServerException(Throwable cause) { super(cause); } public ServerException(int code, String msg, Throwable exception) { super(msg, exception); this.code = code; } public ServerException(int code) { super(); this.code = code; } public ServerException(int code,Throwable exception) { super(exception); this.code = code; } public int getCode() { return this.code; } }
[ "xjiafei126@126.com" ]
xjiafei126@126.com
aa41efad98a9d3f0e3a293b6afcf947f8ac3aa24
97288799ee35d78fcdd0619bb654a32d8fbd1e78
/src/org/unclesniper/winter/mvc/util/EmptyIterator.java
4290e2b8e111b175c7d0717986f15e9df38534fb
[]
no_license
UncleSniper/winter-mvc
c2bb505ed48397418392769030d90c0fb9c94a55
0159be104ac2899c533da393e69920cf79265dcf
refs/heads/master
2020-03-09T18:23:25.836348
2019-03-11T12:09:24
2019-03-11T12:09:24
128,930,895
0
0
null
null
null
null
UTF-8
Java
false
false
930
java
package org.unclesniper.winter.mvc.util; import java.util.ListIterator; import java.util.function.Consumer; import java.util.NoSuchElementException; public class EmptyIterator<E> implements ListIterator<E> { public static final EmptyIterator instance = new EmptyIterator(); public EmptyIterator() {} public boolean hasNext() { return false; } public E next() { throw new NoSuchElementException(); } public void remove() { throw new IllegalStateException(); } public void forEachRemaining(Consumer<? super E> action) {} public void set(E e) { throw new IllegalStateException(); } public void add(E e) { throw new UnsupportedOperationException(EmptyIterator.class.getName() + ".add(E)"); } public int nextIndex() { return 0; } public E previous() { throw new NoSuchElementException(); } public int previousIndex() { return -1; } public boolean hasPrevious() { return false; } }
[ "simon@bausch-alfdorf.de" ]
simon@bausch-alfdorf.de
d413510fb064fc58403b595f7aa46c4420232be1
18e70aac3ba9151dbe331e863ea45310fd28748a
/Ex82_Socket2/app/src/main/java/com/ict/ex82_socket2/MainActivity1.java
5c07cafa0dd01eb32e1dd2d9135bc634e60965a2
[]
no_license
woocharle/ict.edu.android
40ce4bc81dc2cf4cf0356cbb59e7bae6ebad0e9f
e0bab546feb8897c47c75d0829df4427797952de
refs/heads/master
2022-12-30T13:00:54.615897
2020-10-16T08:43:59
2020-10-16T08:43:59
285,203,261
0
0
null
null
null
null
UTF-8
Java
false
false
2,328
java
package com.ict.ex82_socket2; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; public class MainActivity1 extends AppCompatActivity { EditText editText1; Button button1; TextView result1; Handler handler = new Handler(); String msg = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main1); editText1 = findViewById(R.id.editText1); button1 = findViewById(R.id.button1_1); result1 = findViewById(R.id.result1); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { new Thread(new Runnable() { @Override public void run() { String str = editText1.getText().toString(); msg = sendServer(str); handler.post(new Runnable() { @Override public void run() { result1.append(msg+"\n"); editText1.setText(""); } }); } }).start(); } }); } public String sendServer(String str){ String res = null; BufferedWriter writer = null; BufferedReader reader = null; try { Socket s = new Socket("203.236.220.86", 9999); writer = new BufferedWriter(new OutputStreamWriter(s.getOutputStream())); reader = new BufferedReader(new InputStreamReader(s.getInputStream())); writer.write(str + System.getProperty("line.separator")); writer.flush(); res = reader.readLine(); s.close(); }catch (Exception e){ Log.d("my",e+""); } return res; } }
[ "silvershots@naver.com" ]
silvershots@naver.com
ae1e4041b2e4f8fc05ea7bf6ba051e48cd92a9f3
acb7217f9eb7c4be1586cd3bff4c4f177b79321a
/gotopXmzh/src/com/eos/web/taglib/bean/RemoveTag.java
b4ba1c584a887ed2ee57dd980e57519217e4c3c6
[]
no_license
2416879170/XMpro
4f4650eff3428c12edfd9ade5eb8b7af0b375904
676dbcbf05ba25e7b49e623c0ebd3998b3f11535
refs/heads/master
2020-06-25T22:03:53.991120
2017-07-12T10:11:40
2017-07-12T10:11:40
94,502,163
0
0
null
null
null
null
UTF-8
Java
false
false
2,076
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) fieldsfirst ansi // Source File Name: RemoveTag.java package com.eos.web.taglib.bean; import com.eos.data.xpath.XPathLocator; import com.eos.web.taglib.basic.BaseIteratorTagSupport; import com.eos.web.taglib.util.XpathUtil; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; public class RemoveTag extends BaseIteratorTagSupport { private String ignore; private boolean _ignore; public RemoveTag() { ignore = "true"; _ignore = true; } public String isIgnore() { return ignore; } public void setIgnore(String ignore) { this.ignore = ignore; } public void initAttributes() throws JspException { super.initAttributes(); _ignore = XpathUtil.getBooleanByXpathSupport(getRootObj(), ignore, true, "ignore"); } public int doStartTag() throws JspException { initAttributes(); if(getScope().startsWith("f")) throw new JspException("b:remove tag ,unsupport remove flow context"); Object value = getPropertyValue(); if(value == null) { if(!_ignore) throw new JspException("b:remove tag, can not found oject !"); } else { try { if(getIterateId() != null) XPathLocator.getInstance().deleteValue(pageContext.getAttribute(getIterateId()), getProperty()); else XPathLocator.getInstance().deleteValue(getRootObj(), getProperty()); } catch(Exception e) { throw new JspException("b:remove tag,remove object exception !"); } } return 0; } public void release() { super.release(); ignore = "true"; } }
[ "2416879170@qq.com" ]
2416879170@qq.com
111a439f1f407980838865771dee4f3800050374
8ec379a02be629165c97f12d75551e09279e5f97
/shop-manage/src/main/java/quick/pager/shop/response/EnumResponse.java
170b34d9f33366da27553175ee37b702bd8d81ae
[ "MIT" ]
permissive
donniezhanggit/spring-cloud-shop
73c9e99c714310cb4ecbacb2f764a452b24dfefc
aeeaba1be804d7197692fa6bef8bdcaedb2302ac
refs/heads/master
2020-06-19T14:15:02.682581
2019-10-14T06:25:38
2019-10-14T06:25:38
196,739,760
0
0
MIT
2019-10-14T06:25:40
2019-07-13T15:56:03
Java
UTF-8
Java
false
false
298
java
package quick.pager.shop.response; import java.io.Serializable; import lombok.Data; @Data public class EnumResponse implements Serializable { private static final long serialVersionUID = -1280398705355998555L; private Integer type; private String key; private String value; }
[ "siguiyang1992@outlook.com" ]
siguiyang1992@outlook.com
f365f1b8585ce6e5fde8eaa29ddf4a19e7f3bc53
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/baike/sources/pl/droidsonroids/gif/f.java
d2762cc14e2b6d5ce25c2ba5d5633cbee0311660
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
237
java
package pl.droidsonroids.gif; class f extends a { final /* synthetic */ GifDrawable a; f(GifDrawable gifDrawable) { this.a = gifDrawable; super(); } public void doWork() { this.a.h.c(); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
2b1d4a18c1bdf2114be7aad67fb80b5bdb80db2b
d1bd1246f161b77efb418a9c24ee544d59fd1d20
/java/Common/src/org/javenstudio/common/indexdb/analysis/Analyzer.java
6ab5d9a7e4325bbc36908cd1e207893f45b3c700
[]
no_license
navychen2003/javen
f9a94b2e69443291d4b5c3db5a0fc0d1206d2d4a
a3c2312bc24356b1c58b1664543364bfc80e816d
refs/heads/master
2021-01-20T12:12:46.040953
2015-03-03T06:14:46
2015-03-03T06:14:46
30,912,222
0
1
null
2023-03-20T11:55:50
2015-02-17T10:24:28
Java
UTF-8
Java
false
false
4,208
java
package org.javenstudio.common.indexdb.analysis; import java.io.IOException; import java.io.Reader; import org.javenstudio.common.indexdb.IAnalyzer; import org.javenstudio.common.indexdb.ITokenStream; /** * An Analyzer builds TokenStreams, which analyze text. It thus represents a * policy for extracting index terms from text. * <p> * In order to define what analysis is done, subclasses must define their * {@link TokenComponents} in {@link #createComponents(String, Reader)}. * The components are then reused in each call to {@link #tokenStream(String, Reader)}. */ public abstract class Analyzer implements IAnalyzer { private final ReuseStrategy mReuseStrategy; public Analyzer() { this(new GlobalReuseStrategy()); } public Analyzer(ReuseStrategy reuseStrategy) { mReuseStrategy = reuseStrategy; } /** * Creates a new {@link TokenComponents} instance for this analyzer. * * @param fieldName * the name of the fields content passed to the * {@link TokenComponents} sink as a reader * @param reader * the reader passed to the {@link Tokenizer} constructor * @return the {@link TokenComponents} for this analyzer. */ public abstract TokenComponents createComponents(String fieldName, Reader reader) throws IOException; /** * Creates a TokenStream that is allowed to be re-use from the previous time * that the same thread called this method. Callers that do not need to use * more than one TokenStream at the same time from this analyzer should use * this method for better performance. * <p> * This method uses {@link #createComponents(String, Reader)} to obtain an * instance of {@link TokenComponents}. It returns the sink of the * components and stores the components internally. Subsequent calls to this * method will reuse the previously stored components after resetting them * through {@link TokenComponents#reset(Reader)}. * </p> * * @param fieldName the name of the field the created TokenStream is used for * @param reader the reader the streams source reads from */ @Override public final ITokenStream tokenStream(final String fieldName, final Reader reader) throws IOException { TokenComponents components = mReuseStrategy.getReusableComponents(fieldName); final Reader r = initReader(fieldName, reader); if (components == null) { components = createComponents(fieldName, r); mReuseStrategy.setReusableComponents(fieldName, components); } else { components.reset(r); } return components.getTokenStream(); } /** * Override this if you want to add a CharFilter chain. */ public Reader initReader(String fieldName, Reader reader) throws IOException { return reader; } /** * Invoked before indexing a IField instance if * terms have already been added to that field. This allows custom * analyzers to place an automatic position increment gap between * IndexbleField instances using the same field name. The default value * position increment gap is 0. With a 0 position increment gap and * the typical default token position increment of 1, all terms in a field, * including across IField instances, are in successive positions, allowing * exact PhraseQuery matches, for instance, across IField instance boundaries. * * @param fieldName IField name being indexed. * @return position increment gap, added to the next token emitted * from {@link #tokenStream(String,Reader)} */ @Override public int getPositionIncrementGap(String fieldName) throws IOException { return 0; } /** * Just like {@link #getPositionIncrementGap}, except for * Token offsets instead. By default this returns 1. * This method is only called if the field * produced at least one token for indexing. * * @param fieldName the field just indexed * @return offset gap, added to the next token emitted from * {@link #tokenStream(String,Reader)}. * This value must be {@code >= 0}. */ @Override public int getOffsetGap(String fieldName) throws IOException { return 1; } /** Frees persistent resources used by this Analyzer */ public void close() throws IOException { mReuseStrategy.close(); } }
[ "navychen2003@hotmail.com" ]
navychen2003@hotmail.com
7c74d5ee8459efb2a3bf625c7d87d63b5b22754d
76a7c720f8c0c5babd092093708e7323dd941aa4
/bubing_tools/src/main/java/com/bubing/tools/utils/JsonUtils.java
6aa4569d08e8575df94dbed707637e26422cb2b3
[]
no_license
General757/BubingTools
13b2622a65cdba982a8f5ab2b6d6541ce4f1d14a
550af7395935e3f2e1411a9c80eed6698343a607
refs/heads/master
2023-02-23T03:53:10.106504
2020-11-02T03:35:04
2020-11-02T03:35:04
260,145,210
0
0
null
null
null
null
UTF-8
Java
false
false
3,469
java
package com.bubing.tools.utils; import android.text.TextUtils; import org.json.JSONException; import org.json.JSONObject; //json่งฃๆž่พ…ๅŠฉๅทฅๅ…ท public class JsonUtils { /* ็งป้™คbom */ public static final String removeBOM(String data) { if (TextUtils.isEmpty(data)) return data; if (data.startsWith("\ufeff")) return data.substring(1); else return data; } /* * jsonๅญ—ๆฎตๆ˜ฏBoolean */ public static boolean getJSONBoolean(JSONObject json, String name) throws JSONException { if (json.has(name)) return json.getBoolean(name); else return false; } /* * jsonๅญ—ๆฎตๆ˜ฏDouble */ public static double getJSONDouble(JSONObject json, String name) throws JSONException { if (json.has(name)) { if (TextUtils.isEmpty(json.getString(name))) return 0; else return Double.valueOf(json.getString(name)); } else return 0; } /* * jsonๅญ—ๆฎตๆ˜ฏFloat */ public static float getJSONFloat(JSONObject json, String name) throws JSONException { if (json.has(name)) { if (TextUtils.isEmpty(json.getString(name))) return 0; else return Float.valueOf(json.getString(name)); } else return 0; } /* * jsonๅญ—ๆฎตๆ˜ฏInt */ public static int getJSONInt(JSONObject json, String name) throws JSONException { if (json.has(name)) { if (TextUtils.isEmpty(json.getString(name))) return 0; else return json.getInt(name); } else return 0; } /* * jsonๅญ—ๆฎตๆ˜ฏLOng */ public static long getJSONLong(JSONObject json, String name) throws JSONException { if (json.has(name)) { if (TextUtils.isEmpty(json.getString(name))) return 0; else return json.getLong(name); } else return 0; } /* * jsonๅญ—ๆฎตๆ˜ฏString */ public static String getJSONString(JSONObject json, String name) throws JSONException { if (json.has(name)) { String value = json.getString(name); if (TextUtils.isEmpty(value)) return ""; else return value; } else return ""; } /* * jsonๅญ—ๆฎตๆ˜ฏๅฆไธบ็ฉบ */ public static boolean getJSONObjectText(JSONObject json, String name) throws JSONException { if (json.has(name)) { String value = json.getString(name); if (TextUtils.isEmpty(value)) return false; else if (value.equals("[]")) return false; else if (value.equals("{}")) return false; else return true; } else return false; } /* * jsonๆ•ฐ็ป„ๆ˜ฏๅฆไธบ็ฉบ */ public static String getJSONArrayText(JSONObject json, String name) throws JSONException { if (json.has(name)) { String value = json.getString(name); if (TextUtils.isEmpty(value)) return "[]"; else if (value.equals("{}")) return "[]"; else return value; } else return "[]"; } }
[ "1183561804@qq.com" ]
1183561804@qq.com
675237de964783c7da91e3ef8e33b0daadf3e3df
042bebd173184469c083739f128d0b8593aac3d7
/src/main/java/it/richkmeli/RMC/model/Device.java
2b4cbde7f7137d9ff0f5818197f9dedad7a84481
[ "Apache-2.0" ]
permissive
ldh0227/Richkware-Manager-Client
463432c5087c1f16d958ffc16da1faca9a6f4abb
a7301c4d4ce1e998916be826467d31039911a7e4
refs/heads/master
2020-05-27T21:07:21.623396
2019-05-26T17:40:04
2019-05-26T17:40:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package it.richkmeli.RMC.model; public class Device { private String name; private String IP; private String serverPort; private String lastConnection; private String encryptionKey; public Device(String name, String iP, String serverPort, String lastConnection, String encryptionKey) { super(); this.name = name; IP = iP; this.serverPort = serverPort; this.lastConnection = lastConnection; this.encryptionKey = encryptionKey; } public String getIP() { return IP; } public String getLastConnection() { return lastConnection; } public String getServerPort() { return serverPort; } public String getName() { return name; } public String getEncryptionKey() { return encryptionKey; } public void setEncryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; } public void setServerPort(String serverPort) { this.serverPort = serverPort; } public void setIP(String iP) { IP = iP; } public void setLastConnection(String lastConnection) { this.lastConnection = lastConnection; } public void setName(String name) { this.name = name; } }
[ "richkmeli@gmail.com" ]
richkmeli@gmail.com
69221b808b5bd15a4dbc866b52c5018d422a3dbe
df04dfe964f9cf035717106205101e6f8e583ea7
/domain/OccupationStaus.java
4d70168ff3fecb38a3aabbe19cd4fc931314fe49
[]
no_license
nishantsinghcarnation/Cj-Project
88e2173cdd450584f543231af4c29b66503c7a3b
06fa9dd7f0d0760143ffb43d48abcdac717f1f68
refs/heads/master
2023-02-27T08:09:51.682092
2021-02-01T09:59:39
2021-02-01T09:59:39
334,212,362
0
0
null
null
null
null
UTF-8
Java
false
false
624
java
package com.cts.cj.domain; import org.neo4j.ogm.annotation.GeneratedValue; import org.neo4j.ogm.annotation.Id; import org.neo4j.ogm.annotation.NodeEntity; @NodeEntity public class OccupationStaus { @Id @GeneratedValue private Long occupStatusId; private String occupationStatus; public Long getOccupStatusId() { return occupStatusId; } public void setOccupStatusId(Long occupStatusId) { this.occupStatusId = occupStatusId; } public String getOccupationStatus() { return occupationStatus; } public void setOccupationStatus(String occupationStatus) { this.occupationStatus = occupationStatus; } }
[ "you@example.com" ]
you@example.com
402dcf6764300dd010040614ce132ff8af338e15
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/market/IAppraise.java
a49019d35d88c4913e168b4bc75c486cf66ab63a
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
2,935
java
package com.kingdee.eas.fdc.market; import com.kingdee.bos.BOSException; //import com.kingdee.bos.metadata.*; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.*; import com.kingdee.bos.Context; import java.lang.String; import com.kingdee.eas.fdc.basedata.IFDCDataBase; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.bos.metadata.entity.SorterItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.bos.util.*; import com.kingdee.bos.metadata.entity.FilterInfo; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.framework.*; public interface IAppraise extends IFDCDataBase { public boolean exists(IObjectPK pk) throws BOSException, EASBizException; public boolean exists(FilterInfo filter) throws BOSException, EASBizException; public boolean exists(String oql) throws BOSException, EASBizException; public AppraiseInfo getAppraiseInfo(IObjectPK pk) throws BOSException, EASBizException; public AppraiseInfo getAppraiseInfo(IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException; public AppraiseInfo getAppraiseInfo(String oql) throws BOSException, EASBizException; public IObjectPK addnew(AppraiseInfo model) throws BOSException, EASBizException; public void addnew(IObjectPK pk, AppraiseInfo model) throws BOSException, EASBizException; public void update(IObjectPK pk, AppraiseInfo model) throws BOSException, EASBizException; public void updatePartial(AppraiseInfo model, SelectorItemCollection selector) throws BOSException, EASBizException; public void updateBigObject(IObjectPK pk, AppraiseInfo model) throws BOSException; public void delete(IObjectPK pk) throws BOSException, EASBizException; public IObjectPK[] getPKList() throws BOSException, EASBizException; public IObjectPK[] getPKList(String oql) throws BOSException, EASBizException; public IObjectPK[] getPKList(FilterInfo filter, SorterItemCollection sorter) throws BOSException, EASBizException; public AppraiseCollection getAppraiseCollection() throws BOSException; public AppraiseCollection getAppraiseCollection(EntityViewInfo view) throws BOSException; public AppraiseCollection getAppraiseCollection(String oql) throws BOSException; public IObjectPK[] delete(FilterInfo filter) throws BOSException, EASBizException; public IObjectPK[] delete(String oql) throws BOSException, EASBizException; public void delete(IObjectPK[] arrayPK) throws BOSException, EASBizException; public boolean enabled(IObjectPK ctPK) throws BOSException, EASBizException; public boolean disEnabled(IObjectPK ctPK) throws BOSException, EASBizException; }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
c70d5e2c2764d02ac75dbd73030b94066ae6d5f8
a7020e7449ead95cf7cc3af058fb15e0515154fd
/src/app/Hrad40_TCP_ไผบๆœ็ซฏ.java
ee337b577fc4cbcb8002484d0a06f6fddbadcac3
[]
no_license
gorillaz18010589/tomcat_p_java_v1
7bf013aa11eaf4f590d89aee091f1c2ed556aab9
6034b6d8e312487a00e4828803b57534ce850baa
refs/heads/master
2021-01-02T07:10:38.733385
2020-02-10T15:16:39
2020-02-10T15:16:39
239,542,547
0
0
null
null
null
null
UTF-8
Java
false
false
1,711
java
package app; import java.io.InputStream; import java.net.InetAddress; //ไผบๆœๅ™จ็”จไธฒๆตๆ–นๅผ //java.net.ServerSocket.ServerSocket(int port) :ไผบๆœๅ™จ็ซฏๅปบ็ซ‹ServerSocket(port่™Ÿ) //java.net.ServerSocket.accept():ไผบๆœๅ™จ็ซฏ้–‹ๅง‹่ฝๆŽฅๆ”ถ(ๅ›žๅ‚ณSocket) //java.net.Socket.getInetAddress()://ๅ–ๅพ—ๅฐๆ–นip(ๅ›žๅ‚ณInetAddress ) //java.net.Socket.getInputStream()://ๅ–ๅพ—็”จๆˆถ็ซฏ็š„่จŠๆฏไธฒๆต(ๅ›žๅ‚ณInputStream) //java.io.InputStream.read(byte[] b) //็”จไธฒๆตๆ–นๅผread่ฎ€้ปจ,็•ถread่ฎ€้ปจ้ƒจ็ญ‰ๆ–ผ-1็นผ็บŒ่ฎ€(ๅ›žๅ‚ณint) //java.lang.String.String(byte[] bytes, int offset, int length)://String(buf่ณ‡่จŠ,ๅพž0้–‹ๅง‹,buf.lentgthๆช”ๆกˆๅคšๆ‰“่ฎ€ๅคšๅคง) //ไผบๆœๅ™จๅปบ็ซ‹ๅฅฝๅพŒcmdๆ‰“netstat /na,็œ‹ๆ˜ฏๅฆๅ‡บ็พ7777port่™Ÿ,ๅŸท่กŒๅพŒๅ‡บ็พ7777 import java.net.ServerSocket; import java.net.Socket; public class Hrad40_TCP_ไผบๆœ็ซฏ { public static void main(String[] args) { try { ServerSocket server = new ServerSocket(7777);//ไผบๆœๅ™จ็ซฏๅปบ็ซ‹ServerSocket(7777่™Ÿ) Socket socket = server.accept(); //ไผบๆœๅ™จ็ซฏ้–‹ๅง‹ๆŽฅๆ”ถ็”จๆˆถ็ซฏ่จŠๆฏ InputStream in = socket.getInputStream(); //ๅ–ๅพ—็”จๆˆถ็ซฏ็š„่จŠๆฏไธฒๆต,ๅญ˜ๅ…ฅin InetAddress urip = socket.getInetAddress(); //ๅ–ๅพ—ๅฐๆ–นip int len; byte[] buf = new byte[1024]; //read(่ฎ€byte้™ฃๅˆ—) ๅ›žๅ‚ณint:len while((len = in.read(buf))!= -1) { //็”จไธฒๆตๆ–นๅผread่ฎ€้ปจ,็•ถread่ฎ€้ปจ้ƒจ็ญ‰ๆ–ผ-1็นผ็บŒ่ฎ€ System.out.println(urip + ":" + new String(buf, 0, buf.length)); //String(buf่ณ‡่จŠ,ๅพž0้–‹ๅง‹,buf.lentgthๆช”ๆกˆๅคšๆ‰“่ฎ€ๅคšๅคง) } server.close(); System.out.println("ไผบๆœๅ™จๆŽฅๆ”ถOK"); }catch (Exception e) { System.out.println(e.toString()); } } }
[ "gorillaz1801058@gmail.com" ]
gorillaz1801058@gmail.com
fc65082577684f3f8b7d4999d1dda663f86897f8
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5686313294495744_0/java/MathBunny123/ProblemC.java
cea916ed6291d394bb0b7e191de44e3acd63cd49
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
2,834
java
/* Programming Competition - Template (Horatiu Lazu) */ import java.io.*; import java.util.*; import java.lang.*; import java.awt.*; import java.awt.geom.*; import java.math.*; import java.text.*; class Main{ BufferedReader in; StringTokenizer st; public static void main (String [] args){ new Main(); } static class Priority implements Comparable<Priority>{ String a; String b; int p; public Priority(String a, String b, int p){ this.a = a; this.b = b; this.p = p; } public int compareTo(Priority o){ return o.p - p; } } public Main(){ try{ in = new BufferedReader(new FileReader("cSmall3.in")); PrintWriter out = new PrintWriter(new FileWriter("out.txt")); int T = nextInt(); for(int q = 0; q < T; q++){ int N = nextInt(); Priority[] arr = new Priority[N]; HashMap<String, Boolean> usedA = new HashMap<String, Boolean>(); HashMap<String, Boolean> usedB = new HashMap<String, Boolean>(); HashMap<String, Boolean> ex = new HashMap<String, Boolean>(); for(int qq = 0; qq < N; qq++){ String a = next(); String b = next(); if (usedA.get(a) == null && usedB.get(b) == null){ arr[qq] = new Priority(a, b, 0); } else{ arr[qq] = new Priority(a, b, 0); } usedA.put(a, true); usedB.put(b, true); } for(int qq = 0; qq < N; qq++){ if (usedA.get(arr[qq].a) != null && usedB.get(arr[qq].b)!=null){ arr[qq].p=0; } else if (usedA.get(arr[qq].a) != null || usedB.get(arr[qq].b)!=null){ arr[qq].p=1; } } Arrays.sort(arr); int counter = 0; usedA = new HashMap<String, Boolean>(); usedB = new HashMap<String, Boolean>(); ex = new HashMap<String, Boolean>(); for(int x = 0; x < arr.length; x++){ Priority temp = arr[x]; //System.out.println(temp.a + " " + temp.b); if (usedA.get(temp.a) != null && usedB.get(temp.b) != null && ex.get(temp.a + temp.b) == null){ //if (!(usedA.get(temp.a) == null && usedB.get(temp.b) == null)){ counter++; ex.put(temp.a + temp.b, true); //} } usedA.put(temp.a, true); usedB.put(temp.b, true); } out.println("Case #" + (q+1)+": " + counter); } out.close(); } catch(IOException e){ System.out.println("IO: General"); } } String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(in.readLine().trim()); return st.nextToken(); } long nextLong() throws IOException { return Long.parseLong(next()); } int nextInt() throws IOException { return Integer.parseInt(next()); } double nextDouble() throws IOException { return Double.parseDouble(next()); } String nextLine() throws IOException { return in.readLine().trim(); } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
2f9750bf9944742e460b655a015e2c9fd828dbcb
55fd75151de7e7afb7118fe3cc0d49dff329645e
/src/minecraft/net/minecraft/block/BlockClay.java
dfb84604b1e690116a045011bbba977290c4c81e
[]
no_license
DraconisIra/MFBridge
ded956980905328a2d728c8f8f083e10d6638706
fa77fe09f2872b7feae52fb814e1920c98d10e91
refs/heads/master
2021-01-23T04:49:08.935654
2017-01-30T04:39:40
2017-01-30T04:39:40
80,393,957
2
0
null
null
null
null
UTF-8
Java
false
false
702
java
package net.minecraft.block; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class BlockClay extends Block { public BlockClay(int par1) { super(par1, Material.clay); this.setCreativeTab(CreativeTabs.tabBlock); } /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return Item.clay.itemID; } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random par1Random) { return 4; } }
[ "mikal_500@yahoo.com.au" ]
mikal_500@yahoo.com.au
71fc60695977232be2947799b9b951db4bd08c3c
48fd0b689f9cdb660ad06a191107e14d47542fd8
/ada97/src/Main.java
c98328bbf5e82f7c0674abf5f3bd866fc566851e
[ "MIT" ]
permissive
chiendarrendor/AlbertsAdalogicalAenigmas
3dfc6616d47c361ad6911e2ee4e3a3ec24bb6b75
c6f91d4718999089686f3034a75a11b312fa1458
refs/heads/master
2022-08-28T11:34:02.261386
2022-07-08T22:45:24
2022-07-08T22:45:24
115,220,665
1
1
null
null
null
null
UTF-8
Java
false
false
4,912
java
import grid.copycon.Deep; import grid.puzzlebits.Direction; import grid.puzzlebits.Path.Path; import grid.puzzlebits.Turns; import grid.solverrecipes.singleloopflatten.EdgeState; import grid.spring.GridFrame; import grid.spring.GridPanel; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Point; import java.awt.image.BufferedImage; public class Main { private static class MyListener implements GridPanel.GridListener, GridPanel.EdgeListener{ Board b; String[] lines; public MyListener(Board b,String[] lines) { this.b = b; this.lines = lines; } @Override public int getNumXCells() { return b.getWidth(); } @Override public int getNumYCells() { return b.getHeight(); } @Override public boolean drawGridNumbers() { return true; } @Override public boolean drawGridLines() { return true; } @Override public boolean drawBoundary() { return true; } @Override public String[] getAnswerLines() { return lines; } private static EdgeDescriptor WALL = new EdgeDescriptor(Color.BLACK,5); private static EdgeDescriptor INSIDE = new EdgeDescriptor(Color.BLACK,1); private EdgeDescriptor getED(int x, int y, Direction d) { Point op = d.delta(x,y,1); return b.getRegion(x,y) == b.getRegion(op.x,op.y) ? INSIDE : WALL; } @Override public EdgeDescriptor onBoundary() { return WALL; } @Override public EdgeDescriptor toEast(int x, int y) { return getED(x,y,Direction.EAST); } @Override public EdgeDescriptor toSouth(int x, int y) { return getED(x,y,Direction.SOUTH); } private void drawPath(BufferedImage bi,int x,int y, Direction d) { Graphics2D g = (Graphics2D)bi.getGraphics(); int cenx = bi.getWidth()/2; int ceny = bi.getHeight()/2; EdgeState es = b.getEdge(x,y,d); int ox = -1; int oy = -1; switch(d) { case NORTH: ox = cenx; oy = 0; break; case EAST: ox = bi.getWidth(); oy = ceny; break; case SOUTH: ox = cenx; oy = bi.getHeight(); break; case WEST: ox = 0; oy = ceny ; break; } switch(es) { case UNKNOWN: return; case PATH: g.setColor(Color.BLUE); g.setStroke(new BasicStroke(5)); g.drawLine(cenx,ceny,ox,oy); break; case WALL: GridPanel.DrawStringInCorner(bi,Color.RED,"X",d); break; } } @Override public boolean drawCellContents(int cx, int cy, BufferedImage bi) { if (b.hasLetter(cx,cy)) GridPanel.DrawStringInCorner(bi,Color.BLACK,""+b.getLetter(cx,cy),Direction.NORTHWEST); if (b.hasNumber(cx,cy)) { Graphics2D g = (Graphics2D)bi.getGraphics(); g.setColor(Color.BLACK); g.setFont(g.getFont().deriveFont(g.getFont().getSize() * 3.0f)); GridPanel.DrawStringInCorner(g,0,0,bi.getWidth(),bi.getHeight(),""+b.getNumber(cx,cy),Direction.NORTHWEST); } drawPath(bi,cx,cy,Direction.NORTH); drawPath(bi,cx,cy,Direction.SOUTH); drawPath(bi,cx,cy,Direction.WEST); drawPath(bi,cx,cy,Direction.EAST); return true; } } public static void main(String[] args) { if (args.length != 1) { System.out.println("Bad Command Line"); System.exit(1); } Board b = new Board(args[0]); String[] lines = new String[] { "", "Adalogical Aenigma", "#97 solver"}; lines[0] = b.getTitle(); Solver s = new Solver(b); s.Solve(b); if (s.GetSolutions().size() == 1) { System.out.println("Solution Found"); b = s.GetSolutions().get(0); Path p = b.getPaths().iterator().next(); Point start = new Point(0,0); Path.Cursor cursor = p.getCursor(0,0); if (!cursor.getNext().equals(new Point(1,0))) { p.reverse(); cursor = p.getCursor(0,0); } StringBuffer sb = new StringBuffer(); for( ; !cursor.getNext().equals(start) ; cursor.next()) { Point cp = cursor.get(); if (!b.hasLetter(cp.x,cp.y)) continue; if (Turns.makeTurn(cursor.getPrev(),cursor.get(),cursor.getNext()) != Turns.RIGHT) continue; sb.append(b.getLetter(cp.x,cp.y)); } lines[1] = sb.toString(); lines[2] = b.getSolution(); } MyListener myl = new MyListener(b,lines); GridFrame gf = new GridFrame("Adalogical Aenigma #97 solver",1200,800,myl,myl); } }
[ "chiendarrendor@yahoo.com" ]
chiendarrendor@yahoo.com
f3646700d8c0f1c4dd448b7b02ce7216f97b12b5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_eff11c3a1f96e8b48830f21eb670bed372f780ec/MessageSender/8_eff11c3a1f96e8b48830f21eb670bed372f780ec_MessageSender_s.java
d8c1d82c97735d7ae70dea6f74e394aa2abf1feb
[]
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
4,997
java
package freemail; import java.io.File; import java.io.FileOutputStream; import java.io.FileInputStream; import java.io.IOException; import java.util.Vector; import java.util.Enumeration; import freemail.fcp.HighLevelFCPClient; import freemail.utils.EmailAddress; import freemail.utils.DateStringFactory; public class MessageSender implements Runnable { public static final String OUTBOX_DIR = "outbox"; private static final int MIN_RUN_TIME = 60000; public static final String NIM_KEY_PREFIX = "KSK@freemail-nim-"; private static final int MAX_TRIES = 10; private final File datadir; private Thread senderthread; public MessageSender(File d) { this.datadir = d; } public void send_message(String from_user, Vector to, File msg) throws IOException { File user_dir = new File(this.datadir, from_user); File outbox = new File(user_dir, OUTBOX_DIR); Enumeration e = to.elements(); while (e.hasMoreElements()) { EmailAddress email = (EmailAddress) e.nextElement(); this.copyToOutbox(msg, outbox, email.user + "@" + email.domain); } this.senderthread.interrupt(); } private void copyToOutbox(File src, File outbox, String to) throws IOException { File tempfile = File.createTempFile("fmail-msg-tmp", null, Freemail.getTempDir()); FileOutputStream fos = new FileOutputStream(tempfile); FileInputStream fis = new FileInputStream(src); byte[] buf = new byte[1024]; int read; while ( (read = fis.read(buf)) > 0) { fos.write(buf, 0, read); } fis.close(); fos.close(); this.moveToOutbox(tempfile, 0, to, outbox); } // save a file to the outbox handling name collisions and atomicity private void moveToOutbox(File f, int tries, String to, File outbox) { File destfile; int prefix = 1; synchronized (this.senderthread) { do { String filename = prefix + ":" + tries + ":" + to; destfile = new File(outbox, filename); prefix++; } while (destfile.exists()); f.renameTo(destfile); } } public void run() { this.senderthread = Thread.currentThread(); while (true) { long start = System.currentTimeMillis(); // iterate through users File[] files = this.datadir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].getName().startsWith(".")) continue; File outbox = new File(files[i], OUTBOX_DIR); if (!outbox.exists()) outbox.mkdir(); this.sendDir(files[i], outbox); } // don't spin around the loop if nothing's // going on long runtime = System.currentTimeMillis() - start; if (MIN_RUN_TIME - runtime > 0) { try { Thread.sleep(MIN_RUN_TIME - runtime); } catch (InterruptedException ie) { } } } } private void sendDir(File accdir, File dir) { File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].getName().startsWith(".")) continue; this.sendSingle(accdir, files[i]); } } private void sendSingle(File accdir, File msg) { String parts[] = msg.getName().split(":", 3); EmailAddress addr; int tries; if (parts.length < 3) { System.out.println("Warning invalid file in outbox - deleting."); msg.delete(); return; } else { tries = Integer.parseInt(parts[1]); addr = new EmailAddress(parts[2]); } if (addr.domain == null || addr.domain.length() == 0) { msg.delete(); return; } if (addr.is_nim_address()) { HighLevelFCPClient cli = new HighLevelFCPClient(); if (cli.SlotInsert(msg, NIM_KEY_PREFIX+addr.user+"-"+DateStringFactory.getKeyString(), 1, "") > -1) { msg.delete(); } } else { if (this.sendSecure(accdir, addr, msg)) { msg.delete(); } else { tries++; if (tries > MAX_TRIES) { if (Postman.bounceMessage(msg, new MessageBank(accdir.getName()), "Tried too many times to deliver this message, but it doesn't apear that this address even exists. If you're sure that it does, check your Freenet connection.")) { msg.delete(); } } else { this.moveToOutbox(msg, tries, parts[2], msg.getParentFile()); } } } } private boolean sendSecure(File accdir, EmailAddress addr, File msg) { System.out.println("sending secure"); OutboundContact ct; try { ct = new OutboundContact(accdir, addr); } catch (BadFreemailAddressException bfae) { // bounce return Postman.bounceMessage(msg, new MessageBank(accdir.getName()), "The address that this message was destined for ("+addr+") is not a valid Freemail address."); } catch (OutboundContactFatalException obfe) { // bounce return Postman.bounceMessage(msg, new MessageBank(accdir.getName()), obfe.getMessage()); } catch (IOException ioe) { // couldn't get the mailsite - try again if you're not ready //to give up yet return false; } return ct.sendMessage(msg); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7347a298ebae4aa0ef905afd476b203481b4e43a
2148a0f14418ac28ea9780706173308d72a2ae2d
/src/protocol47/java/org/topdank/minenet/protocols/v47/packets/play/server/entity/player/PacketPS38PlayerList.java
a0a147982d73b0e293e67d339d39c3a16aa18ef2
[]
no_license
t81lal/mcbot
85831a0a62c49c5142114bfdeaf85362b5d502a2
de6f8ca7879e3d83e253d2f6fbf9ecfb263462fb
refs/heads/master
2022-06-03T06:16:29.541751
2015-12-24T19:46:30
2015-12-24T19:46:30
229,469,980
0
0
null
2022-05-20T21:19:45
2019-12-21T18:53:48
Java
UTF-8
Java
false
false
4,395
java
package org.topdank.minenet.protocols.v47.packets.play.server.entity.player; import java.io.IOException; import java.util.UUID; import org.topdank.bot.net.io.ReadableInput; import org.topdank.bot.net.packet.IdentifiableReadablePacket; import org.topdank.mc.bot.api.world.settings.GameMode; import org.topdank.minenet.protocols.v47.packets.play.server.entity.player.PacketPS38PlayerList.CompletePlayerListEntry.Property; public class PacketPS38PlayerList implements IdentifiableReadablePacket { // (PlayerListEntryAction.ADD_PLAYER, 0); // (PlayerListEntryAction.UPDATE_GAMEMODE, 1); // (PlayerListEntryAction.UPDATE_LATENCY, 2); // (PlayerListEntryAction.UPDATE_DISPLAY_NAME, 3); // (PlayerListEntryAction.REMOVE_PLAYER, 4); private CompletePlayerListEntry[] entries; public PacketPS38PlayerList() { } @Override public void read(ReadableInput in) throws IOException { int action = in.readVarInt(); int len = in.readVarInt(); entries = new CompletePlayerListEntry[len]; for (int i = 0; i < len; i++) { UUID uuid = in.readUUID(); CompletePlayerListEntry currentEntry = entries[i] = new CompletePlayerListEntry(uuid); switch (action) { case 0: currentEntry.setUsername(in.readString()); int pLen = in.readVarInt(); Property[] properties = new Property[pLen]; for (int pI = 0; pI < pLen; pI++) { String n = in.readString(); String v = in.readString(); String s = null; if (in.readBoolean()) { // is signed s = in.readString(); } properties[pI] = currentEntry.new Property(n, v, s); } currentEntry.setProperties(properties); currentEntry.setGameMode(GameMode.getGameModeById(in.readVarInt())); currentEntry.setPing(in.readVarInt()); if (in.readBoolean()) { // Has Display Name currentEntry.setDisplayName(in.readString()); } break; case 1: currentEntry.setGameMode(GameMode.getGameModeById(in.readVarInt())); break; case 2: currentEntry.setPing(in.readVarInt()); break; case 3: if (in.readBoolean()) { // Has Display Name currentEntry.setDisplayName(in.readString()); } break; case 4: break; } } } public CompletePlayerListEntry[] getEntries() { return entries; } @Override public boolean isPriorityPacket() { return false; } @Override public int getId() { return 0x38; } public abstract class PlayerListEntry { private final UUID uuid; public PlayerListEntry(UUID uuid) { this.uuid = uuid; } public UUID getUUID() { return uuid; } } public class CompletePlayerListEntry extends PlayerListEntry { private String username; private Property[] properties; private GameMode gameMode; private int ping; private String displayName; public CompletePlayerListEntry(UUID uuid) { super(uuid); } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public Property[] getProperties() { return properties; } public void setProperties(Property[] properties) { this.properties = properties; } public GameMode getGameMode() { return gameMode; } public void setGameMode(GameMode gameMode) { this.gameMode = gameMode; } public int getPing() { return ping; } public void setPing(int ping) { this.ping = ping; } public String getDisplayName() { return displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } public class Property { private final String name; private final String value; private final String signature; public Property(String name, String value, String signature) { this.name = name; this.value = value; this.signature = signature; } public String getName() { return name; } public String getValue() { return value; } public String getSignature() { return signature; } public boolean isSigned() { return signature != null; } @Override public String toString() { return "Property [name=" + name + ", value=" + value + ", signature=" + signature + "]"; } } } }
[ "GenerallyCool@hotmail.com" ]
GenerallyCool@hotmail.com
07d56f2750721d5dbf06fc36f24c33d76063609c
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13372-7-4-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/xar/internal/handler/packager/Packager_ESTest.java
b0fa46d0ea1481a1e4a159d3db4feb1ebb386e5f
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
572
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 06:07:10 UTC 2020 */ package org.xwiki.extension.xar.internal.handler.packager; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class Packager_ESTest extends Packager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
1d4dc9bd13538bbf8bfa0e9d9decb64b883385a9
963e8a65011aa3083d58b184697253732b675a0c
/src/main/java/com/sinmin/rest/solr/SolrClient.java
8509c171edc0041def00b7e1d8ba45a7b1eb89bc
[ "Apache-2.0" ]
permissive
DImuthuUpe/SinminREST
835318756f0b4a9ea7b54f5bd2b1777fdbaab195
9f2f74071b4a869572d7f6be277a4593903db1b9
refs/heads/master
2016-08-04T21:23:37.925090
2015-02-12T21:08:49
2015-02-12T21:08:49
27,870,215
0
0
null
null
null
null
UTF-8
Java
false
false
792
java
package com.sinmin.rest.solr; import com.sinmin.rest.beans.response.WildCardR; import corpus.sinhala.wildcard.search.SolrWildCardSearch; import java.util.List; /** * Created by dimuthuupeksha on 1/8/15. */ public class SolrClient { public WildCardR[] getWildCardWords(String val){ SolrWildCardSearch solrWildCardSearch = new SolrWildCardSearch(); List<String> wordList= solrWildCardSearch.searchWord(val, true); if(wordList!=null){ WildCardR [] wordArr = new WildCardR[wordList.size()]; for(int i=0;i<wordList.size();i++){ WildCardR resp = new WildCardR(); resp.setValue(wordList.get(i)); wordArr[i]=resp; } return wordArr; } return null; } }
[ "dimuthu.upeksha2@gmail.com" ]
dimuthu.upeksha2@gmail.com
a80cbd033413b4f362fd6a19a547ac4837213a04
1695529661fbcd37aba21493153393b78a146f68
/Utilkhh/src/khh/db/connection/pool/ConnectionQueue.java
40bcab47bb22e681721b69545d9406081855a46b
[]
no_license
visualkhh/lib-java
b3d33ac72b2c7d1923b580cde53a7ba7b94aa3c7
54a832881b58f7378b403be95be39dc8d6e66349
refs/heads/master
2021-06-11T18:27:21.846677
2016-11-04T00:39:55
2016-11-04T00:39:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,092
java
package khh.db.connection.pool; import java.util.ArrayList; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import khh.db.connection.ConnectionCreator_I; import khh.debug.LogK; public class ConnectionQueue extends Thread{ private int min = 1; private int max = 10; private long pollTimeoutms = 10000; private ConnectionCreator_I creator; private ArrayList<ConnectionPool_Connection> storege; private LinkedBlockingQueue<ConnectionPool_Connection> queue; private LogK log = LogK.getInstance(); public ConnectionQueue(ConnectionCreator_I creator, int max) { this.creator = creator; this.max = max; init(); } private void init() { storege = new ArrayList<ConnectionPool_Connection>(); queue = new LinkedBlockingQueue<ConnectionPool_Connection>(); try { storege.add(new ConnectionPool_Connection(getCreator().getMakeConnection())); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public int getMin() { return min; } public void setMin(int min) { this.min = min; } public int getMax() { return max; } public void setMax(int max) { this.max = max; } public ConnectionCreator_I getCreator() { return creator; } public void setCreator(ConnectionCreator_I creator) { this.creator = creator; } public long getPollTimeoutms() { return pollTimeoutms; } public void setPollTimeoutms(long pollTimeoutms) { this.pollTimeoutms = pollTimeoutms; } public void run() { //๊ณ„์†๋Œ๋ฉด์„œ ๋„ฃ์–ด์ค˜์•ผํ•จ while(true){ try {Thread.sleep(100);} catch (InterruptedException e1) {e1.printStackTrace();} for (int i = 0; i < storege.size(); i++){ //์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ๊ฒƒ์ด ์žˆ์„๋•Œ queue์— ๋„ฃ๋Š”๋‹ค. try{ ConnectionPool_Connection c = storege.get(i); //log.debug("Connection State:"+c+" storege.size("+storege.size()+") qsize:"+queue.size()); if(c.isClosed()){ //์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ๊ฒƒ์ด ์žˆ์„๋•Œ queue์— ๋„ฃ๋Š”๋‹ค. c.open(); if(!queue.contains(c)){ queue.put(c); log.debug("move BlockingQueue("+c+") storege.size("+storege.size()+") qsize:"+queue.size()); } }; if(storege.size()<max && queue.size()<=0){ try { storege.add(new ConnectionPool_Connection(getCreator().getMakeConnection())); log.debug("Full Busy storege.size("+storege.size()+") qsize:"+queue.size()+" (setting -> min:"+getMin()+", max:"+getMax()+") -> add one Connection Create"); } catch (Exception e) {e.printStackTrace();} } }catch(Exception e){log.debug("queue Error",e);} } } } public ConnectionPool_Connection poll() throws InterruptedException{ return poll(getPollTimeoutms()); } public ConnectionPool_Connection poll(long pollTimeoutms) throws InterruptedException { ConnectionPool_Connection i = queue.poll(pollTimeoutms, TimeUnit.MILLISECONDS); if(null==i){ log.debug("getConnection TimeOut wite mills: "+pollTimeoutms); } return i; } }
[ "visualkhh@gmail.com" ]
visualkhh@gmail.com
c1a0cad47621534fc815ba820fe1582b301b384c
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/market/client/AreaSetListUI.java
af2d024949ff56e730b20f6136d4e504dea13aff
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
1,762
java
/** * output package name */ package com.kingdee.eas.fdc.market.client; import org.apache.log4j.Logger; import com.kingdee.bos.ui.face.CoreUIObject; import com.kingdee.eas.basedata.org.OrgConstants; import com.kingdee.eas.basedata.org.SaleOrgUnitInfo; import com.kingdee.eas.common.client.UIFactoryName; import com.kingdee.eas.fdc.basedata.FDCDataBaseInfo; import com.kingdee.eas.fdc.basedata.client.FDCClientHelper; import com.kingdee.eas.fdc.market.AreaSetFactory; import com.kingdee.eas.fdc.market.AreaSetInfo; import com.kingdee.eas.fdc.sellhouse.client.SHEHelper; import com.kingdee.eas.framework.ICoreBase; /** * output class name */ public class AreaSetListUI extends AbstractAreaSetListUI { private static final Logger logger = CoreUIObject.getLogger(AreaSetListUI.class); SaleOrgUnitInfo saleOrg = SHEHelper.getCurrentSaleOrg(); /** * output class constructor */ public AreaSetListUI() throws Exception { super(); } public void onLoad() throws Exception { super.onLoad(); FDCClientHelper.addSqlMenu(this, this.menuEdit); if (!saleOrg.getId().toString().equals(OrgConstants.DEF_CU_ID)){ actionAddNew.setEnabled(false); actionEdit.setEnabled(false); actionRemove.setEnabled(false); } } /** * output storeFields method */ public void storeFields() { super.storeFields(); } protected FDCDataBaseInfo getBaseDataInfo() { return new AreaSetInfo(); } protected ICoreBase getBizInterface() throws Exception { return AreaSetFactory.getRemoteInstance(); } protected String getEditUIName() { return com.kingdee.eas.fdc.market.client.AreaSetEditUI.class.getName(); } protected String getEditUIModal() { return UIFactoryName.MODEL; } }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
d26d58321e0b4a1a6e0d0d73af913512fbf7298a
a25b0cf7fc632540d29875bfcf0489424f6ef839
/YiBaoTong/libDialog/src/main/java/ybt/library/dialog/bean/CCountysBean.java
2fee3aec5860fad7082b6a2c0270c5a68a7c7707
[]
no_license
ILoveLin/YibaoTong
6ace12e7d829e9680097c0b0e0b59ea0ae3e7f07
a885b90a186e1fa3413a4b2c438c0721bdf428e8
refs/heads/master
2021-10-28T04:49:50.532101
2019-04-22T06:51:34
2019-04-22T06:51:34
182,638,313
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
package ybt.library.dialog.bean; import java.io.Serializable; /** * ๅŽฟ็บงๅŸŽๅธ‚ * Created by yang on 2017/01/05. */ public class CCountysBean implements Serializable { private String county; private String county_id; public String getCounty() { return county; } public void setCounty(String county) { this.county = county; } public String getCounty_id() { return county_id; } public void setCounty_id(String county_id) { this.county_id = county_id; } }
[ "tongzhengtong@126.com" ]
tongzhengtong@126.com
84cb807c6001c6506ad88307ce4856d05b0676c4
4b9cbe7cc1cbe526454788aecbb2499cc59f0c8a
/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/audit/SamlRequestAuditResourceResolver.java
c032ae00ae02c1cd61cd28bef29b92092d4cf2a7
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
jimmytheneutrino/cas
e631b5ef878bfff2fdede7f596688f6f2b9ac8ae
1a200a7122a343d3e463ff02872c49079e5dae0f
refs/heads/master
2019-07-11T13:46:08.499721
2018-07-04T16:18:25
2018-07-04T16:18:25
114,123,654
0
0
Apache-2.0
2018-07-04T16:18:26
2017-12-13T13:23:07
Java
UTF-8
Java
false
false
2,251
java
package org.apereo.cas.support.saml.web.idp.audit; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.tuple.Pair; import org.apereo.inspektr.audit.spi.support.ReturnValueAsStringResourceResolver; import org.aspectj.lang.JoinPoint; import org.opensaml.core.xml.XMLObject; import org.opensaml.saml.saml2.core.AuthnRequest; import org.opensaml.saml.saml2.core.LogoutRequest; /** * This is {@link SamlRequestAuditResourceResolver}. * * @author Misagh Moayyed * @since 5.3.0 */ @Slf4j public class SamlRequestAuditResourceResolver extends ReturnValueAsStringResourceResolver { @Override public String[] resolveFrom(final JoinPoint joinPoint, final Object returnValue) { if (returnValue instanceof Pair) { return getAuditResourceFromSamlRequest((Pair) returnValue); } return new String[]{}; } private String[] getAuditResourceFromSamlRequest(final Pair result) { final var returnValue = (XMLObject) result.getLeft(); if (returnValue instanceof AuthnRequest) { return getAuditResourceFromSamlAuthnRequest((AuthnRequest) returnValue); } if (returnValue instanceof LogoutRequest) { return getAuditResourceFromSamlLogoutRequest((LogoutRequest) returnValue); } return new String[]{}; } private String[] getAuditResourceFromSamlLogoutRequest(final LogoutRequest returnValue) { final var request = returnValue; final var result = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE) .append("issuer", request.getIssuer().getValue()) .toString(); return new String[]{result}; } private String[] getAuditResourceFromSamlAuthnRequest(final AuthnRequest returnValue) { final var request = returnValue; final var result = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE) .append("issuer", request.getIssuer().getValue()) .append("binding", request.getProtocolBinding()) .toString(); return new String[]{result}; } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
a884d95899c0e3aaf86cbf0b504548b4efe176c0
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/dds-20151201/src/main/java/com/aliyun/dds20151201/models/ModifyDBInstanceConnectionStringRequest.java
579fc2c95a48bc8d3ca39d97ebca07a0be58eab2
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
4,672
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dds20151201.models; import com.aliyun.tea.*; public class ModifyDBInstanceConnectionStringRequest extends TeaModel { /** * <p>The current connection string, which is to be modified.</p> */ @NameInMap("CurrentConnectionString") public String currentConnectionString; /** * <p>The ID of the instance.</p> * <br> * <p>> If you set this parameter to the ID of a sharded cluster instance, you must also specify the **NodeId** parameter.</p> */ @NameInMap("DBInstanceId") public String DBInstanceId; /** * <p>The new connection string. It must be 8 to 64 characters in length and can contain letters and digits. It must start with a lowercase letter.</p> * <br> * <p>> You need only to specify the prefix of the connection string. The content other than the prefix cannot be modified.</p> */ @NameInMap("NewConnectionString") public String newConnectionString; /** * <p>this parameter can be used. The new port should be within the range of 1000 to 65535.</p> * <p>>When the DBInstanceId parameter is passed in as a cloud disk instance ID</p> */ @NameInMap("NewPort") public Integer newPort; /** * <p>The ID of the mongos in the specified sharded cluster instance. Only one mongos ID can be specified in each call.</p> * <br> * <p>> This parameter is valid only if you set the **DBInstanceId** parameter to the ID of a sharded cluster instance.</p> */ @NameInMap("NodeId") public String nodeId; @NameInMap("OwnerAccount") public String ownerAccount; @NameInMap("OwnerId") public Long ownerId; @NameInMap("ResourceOwnerAccount") public String resourceOwnerAccount; @NameInMap("ResourceOwnerId") public Long resourceOwnerId; @NameInMap("SecurityToken") public String securityToken; public static ModifyDBInstanceConnectionStringRequest build(java.util.Map<String, ?> map) throws Exception { ModifyDBInstanceConnectionStringRequest self = new ModifyDBInstanceConnectionStringRequest(); return TeaModel.build(map, self); } public ModifyDBInstanceConnectionStringRequest setCurrentConnectionString(String currentConnectionString) { this.currentConnectionString = currentConnectionString; return this; } public String getCurrentConnectionString() { return this.currentConnectionString; } public ModifyDBInstanceConnectionStringRequest setDBInstanceId(String DBInstanceId) { this.DBInstanceId = DBInstanceId; return this; } public String getDBInstanceId() { return this.DBInstanceId; } public ModifyDBInstanceConnectionStringRequest setNewConnectionString(String newConnectionString) { this.newConnectionString = newConnectionString; return this; } public String getNewConnectionString() { return this.newConnectionString; } public ModifyDBInstanceConnectionStringRequest setNewPort(Integer newPort) { this.newPort = newPort; return this; } public Integer getNewPort() { return this.newPort; } public ModifyDBInstanceConnectionStringRequest setNodeId(String nodeId) { this.nodeId = nodeId; return this; } public String getNodeId() { return this.nodeId; } public ModifyDBInstanceConnectionStringRequest setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; return this; } public String getOwnerAccount() { return this.ownerAccount; } public ModifyDBInstanceConnectionStringRequest setOwnerId(Long ownerId) { this.ownerId = ownerId; return this; } public Long getOwnerId() { return this.ownerId; } public ModifyDBInstanceConnectionStringRequest setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; return this; } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public ModifyDBInstanceConnectionStringRequest setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; return this; } public Long getResourceOwnerId() { return this.resourceOwnerId; } public ModifyDBInstanceConnectionStringRequest setSecurityToken(String securityToken) { this.securityToken = securityToken; return this; } public String getSecurityToken() { return this.securityToken; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
5a3828e48306394bab45fb5af3e536b3d19e4c93
c27a9ab18791cbcd5b99f24a90c9d33b02b84d99
/src/main/java/io/github/juliandresbv/jhipster/mg/application/config/CloudDatabaseConfiguration.java
7bd46af262ad26404e94a7ee79f4cfad833f89fe
[]
no_license
juliandresbv/JHMicroservicesGatewayApplication
4f31241a50244d5773bf6641846fa53acdbd4f4f
ba958edf54166d27e365e4d886c26251bd25ecdf
refs/heads/master
2021-08-23T11:16:32.627612
2017-12-04T17:04:09
2017-12-04T17:04:09
113,070,651
0
0
null
null
null
null
UTF-8
Java
false
false
3,153
java
package io.github.juliandresbv.jhipster.mg.application.config; import com.github.mongobee.Mongobee; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.domain.util.JSR310DateConverters.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.CacheManager; import org.springframework.cloud.Cloud; import org.springframework.cloud.CloudException; import org.springframework.cloud.config.java.AbstractCloudConfig; import org.springframework.cloud.service.ServiceInfo; import org.springframework.cloud.service.common.MongoServiceInfo; import org.springframework.context.annotation.*; import org.springframework.core.convert.converter.Converter; import org.springframework.data.mongodb.MongoDbFactory; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.convert.CustomConversions; import org.springframework.data.mongodb.core.mapping.event.ValidatingMongoEventListener; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; import java.util.ArrayList; import java.util.List; @Configuration @EnableMongoRepositories("io.github.juliandresbv.jhipster.mg.application.repository") @Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) public class CloudDatabaseConfiguration extends AbstractCloudConfig { private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); @Bean public MongoDbFactory mongoFactory() { return connectionFactory().mongoDbFactory(); } @Bean public LocalValidatorFactoryBean validator() { return new LocalValidatorFactoryBean(); } @Bean public ValidatingMongoEventListener validatingMongoEventListener() { return new ValidatingMongoEventListener(validator()); } @Bean public CustomConversions customConversions() { List<Converter<?, ?>> converterList = new ArrayList<>(); converterList.add(DateToZonedDateTimeConverter.INSTANCE); converterList.add(ZonedDateTimeToDateConverter.INSTANCE); return new CustomConversions(converterList); } @Bean public Mongobee mongobee(MongoDbFactory mongoDbFactory, MongoTemplate mongoTemplate, Cloud cloud) { log.debug("Configuring Cloud Mongobee"); List<ServiceInfo> matchingServiceInfos = cloud.getServiceInfos(MongoDbFactory.class); if (matchingServiceInfos.size() != 1) { throw new CloudException("No unique service matching MongoDbFactory found. Expected 1, found " + matchingServiceInfos.size()); } MongoServiceInfo info = (MongoServiceInfo) matchingServiceInfos.get(0); Mongobee mongobee = new Mongobee(info.getUri()); mongobee.setDbName(mongoDbFactory.getDb().getName()); mongobee.setMongoTemplate(mongoTemplate); // package to scan for migrations mongobee.setChangeLogsScanPackage("io.github.juliandresbv.jhipster.mg.application.config.dbmigrations"); mongobee.setEnabled(true); return mongobee; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
3b3f2467813be7bfa17c39bfaa78bac89c7b6e7d
4d37505edab103fd2271623b85041033d225ebcc
/spring-aop/src/main/java/org/springframework/aop/target/PoolingConfig.java
d8a1dbe05b484de9aad9db610a61514e7ff857ff
[ "Apache-2.0" ]
permissive
huifer/spring-framework-read
1799f1f073b65fed78f06993e58879571cc4548f
73528bd85adc306a620eedd82c218094daebe0ee
refs/heads/master
2020-12-08T08:03:17.458500
2020-03-02T05:51:55
2020-03-02T05:51:55
232,931,630
6
2
Apache-2.0
2020-03-02T05:51:57
2020-01-10T00:18:15
Java
UTF-8
Java
false
false
1,323
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.aop.target; /** * Config interface for a pooling target source. * * @author Rod Johnson * @author Juergen Hoeller */ public interface PoolingConfig { /** * Return the maximum size of the pool. */ int getMaxSize(); /** * Return the number of active objects in the pool. * * @throws UnsupportedOperationException if not supported by the pool */ int getActiveCount() throws UnsupportedOperationException; /** * Return the number of idle objects in the pool. * * @throws UnsupportedOperationException if not supported by the pool */ int getIdleCount() throws UnsupportedOperationException; }
[ "huifer97@163.com" ]
huifer97@163.com
db7947782138f540b45a3982e0fde8af4bcc86e9
972c92ef8d42ca405386a123fd8b160aa98291f0
/chapter 11/Holding/11.27/E27_CommandQueue.java
7fc400364fc1cb169681321d5c3b86935cadcfce
[]
no_license
zhwei5311/Think-in-Java-4th-Edition-Exercise
d60051e3377abdea0d96c4d2ccead494e1dd2053
ae554b0b03124ab7cd79f51265872aa2cd23ce50
refs/heads/master
2020-03-07T22:55:40.195224
2018-04-02T14:30:02
2018-04-02T14:30:02
127,767,671
4
0
null
null
null
null
UTF-8
Java
false
false
1,235
java
//: holding/E27_CommandQueue.java /****************** Exercise 27 ***************** * Write a class called Command that contains a * String and has a method operation() that * displays the String. Write a second class with * a method that fills a Queue with Command objects * and returns it. Pass the filled Queue to a method * in a third class that consumes the objects in the * Queue and calls their operation() methods. ***********************************************/ package holding; import java.util.*; class Command { private final String cmd; Command(String cmd) { this.cmd = cmd; } public void operation() { System.out.println(cmd); } } class Producer { public static void produce(Queue<Command> q) { q.offer(new Command("load")); q.offer(new Command("delete")); q.offer(new Command("save")); q.offer(new Command("exit")); } } class Consumer { public static void consume(Queue<Command> q) { while(q.peek() != null) q.remove().operation(); } } public class E27_CommandQueue { public static void main(String[] args) { Queue<Command> cmds = new LinkedList<Command>(); Producer.produce(cmds); Consumer.consume(cmds); } } /* Output: load delete save exit *///:~
[ "zhwei1228@qq.com" ]
zhwei1228@qq.com
c7146e700a3baaef4d4c8d67c132607408f2465f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_910dded9a0a2e350a681482a5a65a9031b6d74d3/TrackingLogger/2_910dded9a0a2e350a681482a5a65a9031b6d74d3_TrackingLogger_t.java
9047d87c9dc2f3dfcf01f4d79775fe604a4dea7d
[]
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
3,340
java
/* * Copyright 2006 Niclas Hedhman. * * 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.ops4j.pax.logging.internal; import org.ops4j.pax.logging.DefaultServiceLog; import org.ops4j.pax.logging.PaxLogger; import org.ops4j.pax.logging.PaxLoggingService; import org.osgi.framework.Bundle; public class TrackingLogger implements PaxLogger { private PaxLoggingService m_service; private String m_category; private Bundle m_bundle; private PaxLogger m_delegate; private String m_fqcn; public TrackingLogger( PaxLoggingService service, String category, Bundle bundle, String fqcn ) { m_fqcn = fqcn; m_category = category; m_bundle = bundle; added( service ); } public boolean isTraceEnabled() { return m_delegate.isTraceEnabled(); } public boolean isDebugEnabled() { return m_delegate.isDebugEnabled(); } public boolean isWarnEnabled() { return m_delegate.isWarnEnabled(); } public boolean isInfoEnabled() { return m_delegate.isInfoEnabled(); } public boolean isErrorEnabled() { return m_delegate.isErrorEnabled(); } public boolean isFatalEnabled() { return m_delegate.isFatalEnabled(); } public void trace( String message, Throwable t ) { m_delegate.trace( message, t ); } public void debug( String message, Throwable t ) { m_delegate.debug( message, t ); } public void inform( String message, Throwable t ) { m_delegate.inform( message, t ); } public void warn( String message, Throwable t ) { m_delegate.warn( message, t ); } public void error( String message, Throwable t ) { m_delegate.error( message, t ); } public void fatal( String message, Throwable t ) { m_delegate.fatal( message, t ); } public int getLogLevel() { return m_delegate.getLogLevel(); } public String getName() { return m_delegate.getName(); } public void added( PaxLoggingService service ) { m_service = service; if( m_service != null ) { m_delegate = m_service.getLogger( m_bundle, m_category, m_fqcn ); } else { m_delegate = new DefaultServiceLog( m_bundle, m_category ); } } /** * Called by the tracker when there is no service available, and the reference should * be dropped. */ public void removed() { m_service = null; m_delegate = new DefaultServiceLog( m_bundle, m_category ); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
93881567fa7aff82848f5cab846c30569926f2f1
447520f40e82a060368a0802a391697bc00be96f
/apks/obfuscation_and_logging/com_advantage_RaiffeisenBank/source/com/thinkdesquared/banking/models/Biller.java
55c5730631ae55401fbf7e023adc210ada6e8348
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
1,547
java
package com.thinkdesquared.banking.models; import java.util.ArrayList; public class Biller { private String highDefImage; private String id; private String logoPath; private String lowDefImage; private String mediumDefImage; private String name; private ArrayList<BillPaymentVariableField> variableFields; public Biller() {} public String getHighDefImage() { return this.highDefImage; } public String getId() { return this.id; } public String getLogoPath() { return this.logoPath; } public String getLowDefImage() { return this.lowDefImage; } public String getMediumDefImage() { return this.mediumDefImage; } public String getName() { return this.name; } public ArrayList<BillPaymentVariableField> getVariableFields() { return this.variableFields; } public void setHighDefImage(String paramString) { this.highDefImage = paramString; } public void setId(String paramString) { this.id = paramString; } public void setLogoPath(String paramString) { this.logoPath = paramString; } public void setLowDefImage(String paramString) { this.lowDefImage = paramString; } public void setMediumDefImage(String paramString) { this.mediumDefImage = paramString; } public void setName(String paramString) { this.name = paramString; } public void setVariableFields(ArrayList<BillPaymentVariableField> paramArrayList) { this.variableFields = paramArrayList; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
0b4b4321313d30f24449e6391a0d9d9bdb468416
945b270ea1e4b941d71f2b98d4405bcb730883b7
/src/main/java/net/jodah/failsafe/DelayablePolicy.java
cb4ae927567fbcd44ae969d45edb5c66b10cddf3
[ "Apache-2.0" ]
permissive
abhisheknishant138/failsafe
7dea82e68928d57f35f99fe0f1697e0ddff760d7
3cf9e66db76bcd1adfc57f9bd1e4f0127be87776
refs/heads/master
2022-12-02T01:49:32.284162
2020-08-20T11:58:30
2020-08-20T11:58:30
286,497,593
0
0
Apache-2.0
2020-08-10T14:28:23
2020-08-10T14:28:22
null
UTF-8
Java
false
false
3,670
java
package net.jodah.failsafe; import net.jodah.failsafe.function.DelayFunction; import net.jodah.failsafe.internal.util.Assert; import java.time.Duration; /** * A policy that can be delayed between executions. * * @param <S> self type * @param <R> result type * @author Jonathan Halterman */ public abstract class DelayablePolicy<S, R> extends FailurePolicy<S, R> { DelayFunction<R, ? extends Throwable> delayFn; Object delayResult; Class<? extends Throwable> delayFailure; /** * Returns the function that determines the next delay before allowing another execution. * * @see #withDelay(DelayFunction) * @see #withDelayOn(DelayFunction, Class) * @see #withDelayWhen(DelayFunction, Object) */ public DelayFunction<R, ? extends Throwable> getDelayFn() { return delayFn; } /** * Sets the {@code delayFunction} that computes the next delay before allowing another execution. * * @param delayFunction the function to use to compute the delay before a next attempt * @throws NullPointerException if {@code delayFunction} is null * @see DelayFunction */ @SuppressWarnings("unchecked") public S withDelay(DelayFunction<R, ? extends Throwable> delayFunction) { Assert.notNull(delayFunction, "delayFunction"); this.delayFn = delayFunction; return (S) this; } /** * Sets the {@code delayFunction} that computes the next delay before allowing another execution. Delays will only * occur for failures that are assignable from the {@code failure}. * * @param delayFunction the function to use to compute the delay before a next attempt * @param failure the execution failure that is expected in order to trigger the delay * @param <F> failure type * @throws NullPointerException if {@code delayFunction} or {@code failure} are null * @see DelayFunction */ @SuppressWarnings("unchecked") public <F extends Throwable> S withDelayOn(DelayFunction<R, F> delayFunction, Class<F> failure) { withDelay(delayFunction); Assert.notNull(failure, "failure"); this.delayFailure = failure; return (S) this; } /** * Sets the {@code delayFunction} that computes the next delay before allowing another execution. Delays will only * occur for results that equal the {@code result}. * * @param delayFunction the function to use to compute the delay before a next attempt * @param result the execution result that is expected in order to trigger the delay * @throws NullPointerException if {@code delayFunction} or {@code result} are null * @see DelayFunction */ @SuppressWarnings("unchecked") public S withDelayWhen(DelayFunction<R, ? extends Throwable> delayFunction, R result) { withDelay(delayFunction); Assert.notNull(result, "result"); this.delayResult = result; return (S) this; } /** * Returns a computed delay for the {@code result} and {@code context} else {@code null} if no delay function is * configured or the computed delay is invalid. */ @SuppressWarnings("unchecked") protected Duration computeDelay(ExecutionContext context) { Duration computed = null; if (context != null && delayFn != null) { Object exResult = context.getLastResult(); Throwable exFailure = context.getLastFailure(); if ((delayResult == null || delayResult.equals(exResult)) && (delayFailure == null || (exFailure != null && delayFailure.isAssignableFrom(exFailure.getClass())))) { computed = ((DelayFunction<Object, Throwable>) delayFn).computeDelay(exResult, exFailure, context); } } return computed != null && !computed.isNegative() ? computed : null; } }
[ "jhalterman@gmail.com" ]
jhalterman@gmail.com
c510a180d6def5c011b169cd46e5d4795ef5224f
0529524c95045b3232f6553d18a7fef5a059545e
/app/src/androidTest/java/TestCase_01F43BBD70800267D46EDA936621C4DFFE292EBD59B3448689EBDE206501484E_1698085100.java
160c378523535ecadd494c91565f9f6f1d0a6200
[]
no_license
sunxiaobiu/BasicUnitAndroidTest
432aa3e10f6a1ef5d674f269db50e2f1faad2096
fed24f163d21408ef88588b8eaf7ce60d1809931
refs/heads/main
2023-02-11T21:02:03.784493
2021-01-03T10:07:07
2021-01-03T10:07:07
322,577,379
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class TestCase_01F43BBD70800267D46EDA936621C4DFFE292EBD59B3448689EBDE206501484E_1698085100 { @Test public void testCase() throws Exception { // $FF: Couldn't be decompiled } }
[ "sunxiaobiu@gmail.com" ]
sunxiaobiu@gmail.com
9130208ba555da683813ce4f5339507cd6f20354
81be6755cff2e3166e45f3827dbb998e69bebb53
/src/main/java/com/CIMthetics/jvulkan/Wayland/Objects/WaylandEventObject.java
1dd8ac689b181c1b547e2a587229a4dd5ea63605
[ "Apache-2.0" ]
permissive
dkaip/jvulkan
a48f461c42228c38f6f070e4e1be9962098e839a
ff3547ccc17b39e264b3028672849ccd4e59addc
refs/heads/master
2021-07-06T23:21:57.192034
2020-09-13T23:04:46
2020-09-13T23:04:46
183,513,821
0
0
null
null
null
null
UTF-8
Java
false
false
1,170
java
/* * Copyright 2019-2020 Douglas Kaip * * 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.CIMthetics.jvulkan.Wayland.Objects; import com.CIMthetics.jvulkan.VulkanCore.Handles.VulkanHandle; public class WaylandEventObject { private VulkanHandle vulkanHandle; private boolean dieYaBastard = false; public WaylandEventObject(VulkanHandle vulkanHandle) { this.vulkanHandle = vulkanHandle; } void killEventHandler() { dieYaBastard = true; } boolean isTimeToDie() { return dieYaBastard; } public VulkanHandle getHandle() { return vulkanHandle; } }
[ "dkaip@earthlink.net" ]
dkaip@earthlink.net
e350e5c04b44e416137daca9c3cac73296e4b032
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/147/470/CWE89_SQL_Injection__getParameter_Servlet_executeUpdate_75a.java
a5248226ee7f75c5be27a357a356db39c347428d
[]
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
6,906
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE89_SQL_Injection__getParameter_Servlet_executeUpdate_75a.java Label Definition File: CWE89_SQL_Injection.label.xml Template File: sources-sinks-75a.tmpl.java */ /* * @description * CWE: 89 SQL Injection * BadSource: getParameter_Servlet Read data from a querystring using getParameter() * GoodSource: A hardcoded string * Sinks: executeUpdate * GoodSink: Use prepared statement and executeUpdate (properly) * BadSink : data concatenated into SQL statement used in executeUpdate(), which could result in SQL Injection * Flow Variant: 75 Data flow: data passed in a serialized object from one method to another in different source files in the same package * * */ import java.io.ByteArrayOutputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.io.IOException; import java.util.logging.Level; import javax.servlet.http.*; public class CWE89_SQL_Injection__getParameter_Servlet_executeUpdate_75a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; /* POTENTIAL FLAW: Read data from a querystring using getParameter */ data = request.getParameter("name"); /* serialize data to a byte array */ ByteArrayOutputStream streamByteArrayOutput = null; ObjectOutput outputObject = null; try { streamByteArrayOutput = new ByteArrayOutputStream() ; outputObject = new ObjectOutputStream(streamByteArrayOutput) ; outputObject.writeObject(data); byte[] dataSerialized = streamByteArrayOutput.toByteArray(); (new CWE89_SQL_Injection__getParameter_Servlet_executeUpdate_75b()).badSink(dataSerialized , request, response ); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "IOException in serialization", exceptIO); } finally { /* clean up stream writing objects */ try { if (outputObject != null) { outputObject.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", exceptIO); } try { if (streamByteArrayOutput != null) { streamByteArrayOutput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", exceptIO); } } } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* goodG2B() - use GoodSource and BadSink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; /* FIX: Use a hardcoded string */ data = "foo"; /* serialize data to a byte array */ ByteArrayOutputStream streamByteArrayOutput = null; ObjectOutput outputObject = null; try { streamByteArrayOutput = new ByteArrayOutputStream() ; outputObject = new ObjectOutputStream(streamByteArrayOutput) ; outputObject.writeObject(data); byte[] dataSerialized = streamByteArrayOutput.toByteArray(); (new CWE89_SQL_Injection__getParameter_Servlet_executeUpdate_75b()).goodG2BSink(dataSerialized , request, response ); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "IOException in serialization", exceptIO); } finally { /* clean up stream writing objects */ try { if (outputObject != null) { outputObject.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", exceptIO); } try { if (streamByteArrayOutput != null) { streamByteArrayOutput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", exceptIO); } } } /* goodB2G() - use BadSource and GoodSink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; /* POTENTIAL FLAW: Read data from a querystring using getParameter */ data = request.getParameter("name"); /* serialize data to a byte array */ ByteArrayOutputStream streamByteArrayOutput = null; ObjectOutput outputObject = null; try { streamByteArrayOutput = new ByteArrayOutputStream() ; outputObject = new ObjectOutputStream(streamByteArrayOutput) ; outputObject.writeObject(data); byte[] dataSerialized = streamByteArrayOutput.toByteArray(); (new CWE89_SQL_Injection__getParameter_Servlet_executeUpdate_75b()).goodB2GSink(dataSerialized , request, response ); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "IOException in serialization", exceptIO); } finally { /* clean up stream writing objects */ try { if (outputObject != null) { outputObject.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", exceptIO); } try { if (streamByteArrayOutput != null) { streamByteArrayOutput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", exceptIO); } } } /* 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
06ca375581b6175cc27848f83882666dfe6e4af0
b6e703be01f5019b395032ebef2263fdb38f8493
/src/main/java/com/mikemyzhao/springbootdemo/entity/Student.java
9f2a6417d804f82f4263f7c5f6c6cdf6462b2be0
[]
no_license
tjzhaomengyi/SpringBootDemo
0bbb9d243c72e3ce1c4c930b03dfc74a2bd5f9a9
f8906bea691109d5d13eb2c4b0a9ae1d335daaf1
refs/heads/master
2020-07-16T18:01:54.399546
2019-09-03T09:20:06
2019-09-03T09:20:06
205,838,257
0
0
null
null
null
null
UTF-8
Java
false
false
2,394
java
package com.mikemyzhao.springbootdemo.entity; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Component; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Map; /** * @Auther: zhaomengyi * @Date: 2019/9/2 16:19 * @Description: */ @Component @ConfigurationProperties(prefix = "student") //@PropertySource(value = {"classpath:confg.properties"}) public class Student { // @Value("zl") private String name; private int age; private boolean sex; private Date birthday; private Map<String,Object> location; private String[] hobbies; private List<String> skills; private Pet pet; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public boolean isSex() { return sex; } public void setSex(boolean sex) { this.sex = sex; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public Map<String, Object> getLocation() { return location; } public void setLocation(Map<String, Object> location) { this.location = location; } public String[] getHobbies() { return hobbies; } public void setHobbies(String[] hobbies) { this.hobbies = hobbies; } public List<String> getSkills() { return skills; } public void setSkills(List<String> skills) { this.skills = skills; } public Pet getPet() { return pet; } public void setPet(Pet pet) { this.pet = pet; } @Override public String toString() { return "Student{" + "name='" + name + '\'' + ", age=" + age + ", sex=" + sex + ", birthday=" + birthday + ", location=" + location + ", hobbies=" + Arrays.toString(hobbies) + ", skills=" + skills + ", pet=" + pet + '}'; } }
[ "tjzhaomengyi@163.com" ]
tjzhaomengyi@163.com
cc2b1636dcdb2bb6375250ec86c858ddf535da20
9d09f0a59fe5087000ce4010737441357de9ae65
/app/src/main/java/com/xsvideoLive/www/mvp/contract/ChiliOutlayContract.java
66a294b5920146b904b6bbaf261e64e4b744f372
[]
no_license
lgh990/XiuSe
694e6fd078fec2c4ca537654f8d4aeef5037272d
b3d659c47fae10cf59b2a8fe1eeb65e68f82836f
refs/heads/master
2023-03-01T13:14:19.763557
2021-02-02T04:53:38
2021-02-02T04:53:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,423
java
package com.xsvideoLive.www.mvp.contract; import com.xsvideoLive.www.base.BaseView; import com.xsvideoLive.www.net.HttpObservable; import com.xsvideoLive.www.net.bean.BaseResponse; import com.xsvideoLive.www.net.bean.ChiliIncomeResult; import com.xsvideoLive.www.net.bean.HomeRoomResult; import com.scwang.smartrefresh.layout.api.RefreshLayout; import java.util.List; public interface ChiliOutlayContract { interface View extends BaseView { void onError(String msg); /** * ่ฎพ็ฝฎๆ—ถ้—ด * * @param date */ void setTime(String date); /** * ๅˆทๆ–ฐๆˆๅŠŸ * @param refresh * @param incomeList */ void refreshSuccess(RefreshLayout refresh, List<ChiliIncomeResult> incomeList); /** * ๅŠ ่ฝฝๆˆๅŠŸ * @param refresh * @param incomeList */ void loadMoreSuccess(RefreshLayout refresh, List<ChiliIncomeResult> incomeList); } interface Presenter { /** * ๆ—ถ้—ด้€‰ๆ‹ฉ */ void selectTime(String date); /** * ่Žทๅ–ๆ”ถๅ…ฅๅˆ—่กจ * @param date */ void getOutlayList(RefreshLayout refresh, String date); } interface Model { HttpObservable<BaseResponse<HomeRoomResult<List<ChiliIncomeResult>>>> getOutlayList(String current, String size, String date); } }
[ "895977304@qq.com" ]
895977304@qq.com
bb96371fcc97821f0289dbbc418464fc718aeaf4
b16953fc909eea1116dd9ee7a9ee1a9d340ffb80
/src/main/java/com/gioov/spiny/system/controller/ApiController.java
c207c820745da2ede81cb311d9c15098901fd569
[]
no_license
tamutamu-archive/spiny
b166ab3fb1ce99e5977f7a27f6e18a286374b125
1bcc52e090593888130b4299cd0258b05970bc51
refs/heads/master
2021-09-20T06:27:41.278456
2018-08-06T00:29:22
2018-08-06T00:29:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
997
java
package com.gioov.spiny.system.controller; import com.gioov.spiny.common.constant.Page; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import static com.gioov.spiny.user.service.UserService.SYSTEM_ADMIN; /** * @author godcheese * @date 2018/5/18 */ @Controller @RequestMapping(Page.System.API) public class ApiController { @PreAuthorize("hasRole('" + SYSTEM_ADMIN + "') OR hasAuthority('/SYSTEM/API/PAGE_ALL')") @RequestMapping("/page_all") public String pageAll() { return Page.System.API + "/page_all"; } @PreAuthorize("isAuthenticated()") @RequestMapping("/add_dialog") public String addDialog() { return Page.System.API + "/add_dialog"; } @PreAuthorize("isAuthenticated()") @RequestMapping("/edit_dialog") public String editDialog() { return Page.System.API + "/edit_dialog"; } }
[ "godcheese@outlook.com" ]
godcheese@outlook.com
be4fd70a74f7ecf9279a5c3437aff8f6064ab116
c19cb77e3958a194046d6f84ca97547cc3a223c3
/pkix/src/main/java/org/bouncycastle/pkcs/bc/BcPKCS12MacCalculatorBuilder.java
b9420793fcd15454e59cd5f83806605b83e36f51
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bcgit/bc-java
1b6092bc5d2336ec26ebd6da6eeaea6600b4c70a
62b03c0f704ebd243fe5f2d701aef4edd77bba6e
refs/heads/main
2023-09-04T00:48:33.995258
2023-08-30T05:33:42
2023-08-30T05:33:42
10,416,648
1,984
1,021
MIT
2023-08-26T05:14:28
2013-06-01T02:38:42
Java
UTF-8
Java
false
false
1,823
java
package org.bouncycastle.pkcs.bc; import java.security.SecureRandom; import org.bouncycastle.asn1.DERNull; import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers; import org.bouncycastle.asn1.pkcs.PKCS12PBEParams; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.bouncycastle.crypto.ExtendedDigest; import org.bouncycastle.crypto.digests.SHA1Digest; import org.bouncycastle.operator.MacCalculator; import org.bouncycastle.pkcs.PKCS12MacCalculatorBuilder; public class BcPKCS12MacCalculatorBuilder implements PKCS12MacCalculatorBuilder { private ExtendedDigest digest; private AlgorithmIdentifier algorithmIdentifier; private SecureRandom random; private int saltLength; private int iterationCount = 1024; public BcPKCS12MacCalculatorBuilder() { this(new SHA1Digest(), new AlgorithmIdentifier(OIWObjectIdentifiers.idSHA1, DERNull.INSTANCE)); } public BcPKCS12MacCalculatorBuilder(ExtendedDigest digest, AlgorithmIdentifier algorithmIdentifier) { this.digest = digest; this.algorithmIdentifier = algorithmIdentifier; this.saltLength = digest.getDigestSize(); } public BcPKCS12MacCalculatorBuilder setIterationCount(int iterationCount) { this.iterationCount = iterationCount; return this; } public AlgorithmIdentifier getDigestAlgorithmIdentifier() { return algorithmIdentifier; } public MacCalculator build(final char[] password) { if (random == null) { random = new SecureRandom(); } byte[] salt = new byte[saltLength]; random.nextBytes(salt); return PKCS12PBEUtils.createMacCalculator(algorithmIdentifier.getAlgorithm(), digest, new PKCS12PBEParams(salt, iterationCount), password); } }
[ "dgh@cryptoworkshop.com" ]
dgh@cryptoworkshop.com
0116a8a439b31d06365ecf9e8579b832ea13791e
afab90e214f8cb12360443e0877ab817183fa627
/bitcamp-java/src/main/java/com/eomcs/oop/ex12/Exam0140.java
f122c9f0ac805a1be40341a408536be81d4e3ea1
[]
no_license
oreoTaste/bitcamp-study
40a96ef548bce1f80b4daab0eb650513637b46f3
8f0af7cd3c5920841888c5e04f30603cbeb420a5
refs/heads/master
2020-09-23T14:47:32.489490
2020-05-26T09:05:40
2020-05-26T09:05:40
225,523,347
1
0
null
null
null
null
UTF-8
Java
false
false
427
java
// ๋žŒ๋‹ค(lambda) - ํŒŒ๋ผ๋ฏธํ„ฐ package com.eomcs.oop.ex12; public class Exam0140 { static interface Player { void play(String name, int age); } public static void main(String[] args) { Player p1 = (String name, int age) -> System.out.println(name + "(" + age + ")"); p1.play("ํ™๊ธธ๋™", 34); p1 = (name, age) -> System.out.println(name + "\"" + age + "\""); p1.play("ํ™๊ธธ๋™", 34); } }
[ "youngkuk.sohn@gmail.com" ]
youngkuk.sohn@gmail.com
5063468d7c2596dbfab17dfa75ebd4c559b40452
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/LANG-9b-1-14-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/apache/commons/lang3/time/FastDateParser_ESTest_scaffolding.java
1b3c895fefdce041082449dbea1a647a5758e299
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat May 16 11:40:00 UTC 2020 */ package org.apache.commons.lang3.time; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class FastDateParser_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c425d20ce99c501edbd1f1bea2891efdc978b202
1b9f5edf161592d468267846d3d6e7a9ec2c28e9
/app/src/main/java/com/yy/yybaselibary/proxy/ProxyUtil.java
9ace85331e4f37f2e0256add064229a063f75ff8
[]
no_license
yy-Kevin/YYBaseLibrary
e32882f1206e3a5dceffe5d72163e812b01f9126
52071af201ecfd7c57be3946c63b6dfa8bd4fc4f
refs/heads/master
2020-06-28T04:42:02.185970
2019-08-30T01:31:52
2019-08-30T01:31:52
200,145,323
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package com.yy.yybaselibary.proxy; import java.lang.reflect.Proxy; /** * author: Created by yuyao on 2019/8/5 14:52 * E-Mail: 380712098@qq.com * description: */ public class ProxyUtil { public static Object getRroxy(Object o) { AllProxy allProxy = new AllProxy(); allProxy.setObj(o); return Proxy.newProxyInstance(o.getClass().getClassLoader(), o.getClass().getInterfaces(), allProxy); } }
[ "380712098@qq.com" ]
380712098@qq.com
42a7028f64783128af3fb230cbfebe4e4292403f
5c3fc5aa705c24e5fe54928613fac819052a817a
/.svn/pristine/4f/4fa4f6c0c00cdad1e50a4d0229c14e8adbc9c97f.svn-base
9df6bfda5df3e03b31d96c9843add417b23e7efe
[ "MIT" ]
permissive
wang-shun/eichong
30e0ca01e9e5f281c9c03f609c52cecb3a5299f0
c13a6d464150e25039b601aed184fd3fab9e87b7
refs/heads/master
2020-04-02T12:19:31.963507
2018-03-21T09:40:34
2018-03-21T09:40:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,502
package com.wanma.ims.controller.feedback; /** * Created by 18486 on 2018/1/25. */ import com.wanma.ims.common.domain.ChargingFaultRecord; import com.wanma.ims.common.domain.base.Pager; import com.wanma.ims.constants.WanmaConstants; import com.wanma.ims.controller.BaseController; import com.wanma.ims.controller.result.JsonException; import com.wanma.ims.controller.result.JsonResult; import com.wanma.ims.service.ChargingFaultRecordService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; import java.util.Map; /** * ccuๅ……็”ตๆ•…้šœ่ฎฐๅฝ• */ @Controller @RequestMapping("/manage/chargingFaultRecord") public class ChargingFaultRecordController extends BaseController{ private final Logger LOGGER = LoggerFactory.getLogger(this.getClass()); @Autowired private ChargingFaultRecordService chargingFaultRecordService; /** * ่Žทๅ–ccuๅ……็”ตๆ•…้šœ่ฎฐๅฝ•ๅˆ—่กจ */ @RequestMapping(value = "getChargingFaultRecordList") @ResponseBody public void getChargingFaultRecordList(ChargingFaultRecord chargingfaultrecord,Pager pager){ JsonResult result = new JsonResult(); try { pager.setPageSize(Long.valueOf(100)); long total = chargingFaultRecordService.getChargingFaultRecordCount(chargingfaultrecord); if (total <= pager.getOffset()) { pager.setPageNo(1L); } pager.setTotal(total); chargingfaultrecord.setPager(pager); List<ChargingFaultRecord> faultRecordList = chargingFaultRecordService.getChargingFaultRecordList(chargingfaultrecord); faultRecordList=changeFaultCause(faultRecordList); result.setDataObject(faultRecordList); result.setPager(pager); responseJson(result); }catch (Exception e){ LOGGER.error(this.getClass() + "-getChargingFaultRecordList is error|loginUser={}", chargingfaultrecord, e); responseJson(new JsonException("่Žทๅ–ccuๅ……็”ตๆ•…้šœ่ฎฐๅฝ•ๅˆ—่กจๅคฑ่ดฅ๏ผ")); } } private List<ChargingFaultRecord> changeFaultCause(List<ChargingFaultRecord> faultRecordList){ for (ChargingFaultRecord chargingFaultRecord:faultRecordList){ String cFReFaultCause = chargingFaultRecord.getcFReFaultCause(); String str[] = cFReFaultCause.split("\\|"); if (str.length>1){ Map orderStopReasonMap = WanmaConstants.getOrderStopReson(); if (orderStopReasonMap.get(str[0])!=null){ cFReFaultCause = orderStopReasonMap.get(str[0]).toString(); }else { cFReFaultCause = str[0]; } cFReFaultCause+="|"; if ("249".equals(str[0])){ Map startupErrorDetailMap = WanmaConstants.getStartErrorDetail(); cFReFaultCause += startupErrorDetailMap.get(str[1]); }else { Map pileErrorDetailMap = WanmaConstants.getPileErrorDetail(); cFReFaultCause += pileErrorDetailMap.get(str[1]); } } chargingFaultRecord.setcFReFaultCause(cFReFaultCause); } return faultRecordList; } }
[ "wwzero@hotmail.com" ]
wwzero@hotmail.com
2baf87b9dd355e08b8d27eb91bee5d74104ef3e5
19490fcc6f396eeb35a9234da31e7b615abf6d04
/JDownloader/src/org/jdownloader/captcha/v2/challenge/stringcaptcha/ImageCaptchaChallenge.java
56c9c07553a15491568b7a446550107a012f10d8
[]
no_license
amicom/my-project
ef72026bb91694e74bc2dafd209a1efea9deb285
951c67622713fd89448ffe6e0983fe3f934a7faa
refs/heads/master
2021-01-02T09:15:45.828528
2015-09-06T15:57:01
2015-09-06T15:57:01
41,953,961
0
0
null
null
null
null
UTF-8
Java
false
false
1,256
java
package org.jdownloader.captcha.v2.challenge.stringcaptcha; import java.io.File; import javax.imageio.ImageIO; import jd.plugins.Plugin; import org.appwork.utils.images.IconIO; import org.appwork.utils.net.httpserver.responses.FileResponse; import org.jdownloader.captcha.v2.Challenge; public abstract class ImageCaptchaChallenge<T> extends Challenge<T> { private File imageFile; public ImageCaptchaChallenge(File file, String method, String explain, Plugin plugin) { super(method, explain); this.imageFile = file; this.plugin = plugin; } public String toString() { return "CaptchaChallenge by " + plugin.getHost() + "-" + getTypeID() + " File: " + imageFile; } public Plugin getPlugin() { return plugin; } public void setPlugin(Plugin plugin) { this.plugin = plugin; } private Plugin plugin; public File getImageFile() { return imageFile; } public void setImageFile(File imageFile) { this.imageFile = imageFile; } public Object getAPIStorable() throws Exception { String mime = FileResponse.getMimeType(getImageFile().getName()); return IconIO.toDataUrl(ImageIO.read(getImageFile()), mime); } }
[ "amicom.pro@gmail.com" ]
amicom.pro@gmail.com
c70974d4b85576432ec63159755cb490914a31b8
0874d515fb8c23ae10bf140ee5336853bceafe0b
/l2j-universe/java/lineage2/gameserver/skills/effects/EffectFakeDeath.java
1f53017af2bac91fe98b746cfed46fc4ec54a76c
[]
no_license
NotorionN/l2j-universe
8dfe529c4c1ecf0010faead9e74a07d0bc7fa380
4d05cbd54f5586bf13e248e9c853068d941f8e57
refs/heads/master
2020-12-24T16:15:10.425510
2013-11-23T19:35:35
2013-11-23T19:35:35
37,354,291
0
1
null
null
null
null
UTF-8
Java
false
false
2,681
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 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package lineage2.gameserver.skills.effects; import lineage2.gameserver.ai.CtrlEvent; import lineage2.gameserver.cache.Msg; import lineage2.gameserver.model.Effect; import lineage2.gameserver.model.Player; import lineage2.gameserver.network.serverpackets.ChangeWaitType; import lineage2.gameserver.network.serverpackets.Revive; import lineage2.gameserver.network.serverpackets.SystemMessage; import lineage2.gameserver.stats.Env; /** * @author Mobius * @version $Revision: 1.0 $ */ public final class EffectFakeDeath extends Effect { /** * Constructor for EffectFakeDeath. * @param env Env * @param template EffectTemplate */ public EffectFakeDeath(Env env, EffectTemplate template) { super(env, template); } /** * Method onStart. */ @Override public void onStart() { super.onStart(); Player player = (Player) getEffected(); player.setFakeDeath(true); player.getAI().notifyEvent(CtrlEvent.EVT_FAKE_DEATH, null, null); player.broadcastPacket(new ChangeWaitType(player, ChangeWaitType.WT_START_FAKEDEATH)); player.broadcastCharInfo(); } /** * Method onExit. */ @Override public void onExit() { super.onExit(); Player player = (Player) getEffected(); player.setNonAggroTime(System.currentTimeMillis() + 5000L); player.setFakeDeath(false); player.broadcastPacket(new ChangeWaitType(player, ChangeWaitType.WT_STOP_FAKEDEATH)); player.broadcastPacket(new Revive(player)); player.broadcastCharInfo(); } /** * Method onActionTime. * @return boolean */ @Override public boolean onActionTime() { if (getEffected().isDead()) { return false; } double manaDam = calc(); if (manaDam > getEffected().getCurrentMp()) { if (getSkill().isToggle()) { getEffected().sendPacket(Msg.NOT_ENOUGH_MP); getEffected().sendPacket(new SystemMessage(SystemMessage.THE_EFFECT_OF_S1_HAS_BEEN_REMOVED).addSkillName(getSkill().getId(), getSkill().getDisplayLevel())); return false; } } getEffected().reduceCurrentMp(manaDam, null); return true; } }
[ "jmendezsr@gmail.com" ]
jmendezsr@gmail.com
fa61bc4675cb32ad99ea255e0eb254f900da0bd9
364f66fed587e695724b9dbe916de521b437e083
/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TLanguage.java
56e5191a8c249bcbdf224997d7ac9aa636774caf
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
dooApp/jOOQ
febdc254d69506220c2bd23c2f063f79b25f7fe8
6784ea88828ee88f934657e22c9dfd9b2ff5173b
refs/heads/master
2020-12-25T12:27:32.856552
2013-08-21T15:21:17
2013-08-21T15:21:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,243
java
/** * This class is generated by jOOQ */ package org.jooq.test.sybase.generatedclasses.tables; /** * This class is generated by jOOQ. * * An entity holding language master data */ @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TLanguage extends org.jooq.impl.TableImpl<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord> { private static final long serialVersionUID = 359982849; /** * The singleton instance of <code>DBA.t_language</code> */ public static final org.jooq.test.sybase.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.sybase.generatedclasses.tables.TLanguage(); /** * The class holding records for this type */ @Override public java.lang.Class<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord> getRecordType() { return org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord.class; } /** * The column <code>DBA.t_language.cd</code>. */ public final org.jooq.TableField<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord, java.lang.String> CD = createField("cd", org.jooq.impl.SQLDataType.CHAR.length(2), this); /** * The column <code>DBA.t_language.description</code>. */ public final org.jooq.TableField<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord, java.lang.String> DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR.length(50), this); /** * The column <code>DBA.t_language.description_english</code>. */ public final org.jooq.TableField<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord, java.lang.String> DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR.length(50), this); /** * The column <code>DBA.t_language.id</code>. */ public final org.jooq.TableField<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord, java.lang.Integer> ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, this); /** * Create a <code>DBA.t_language</code> table reference */ public TLanguage() { super("t_language", org.jooq.test.sybase.generatedclasses.Dba.DBA); } /** * Create an aliased <code>DBA.t_language</code> table reference */ public TLanguage(java.lang.String alias) { super(alias, org.jooq.test.sybase.generatedclasses.Dba.DBA, org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE); } /** * {@inheritDoc} */ @Override public org.jooq.UniqueKey<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord> getPrimaryKey() { return org.jooq.test.sybase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE; } /** * {@inheritDoc} */ @Override public java.util.List<org.jooq.UniqueKey<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord>> getKeys() { return java.util.Arrays.<org.jooq.UniqueKey<org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord>>asList(org.jooq.test.sybase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE); } /** * {@inheritDoc} */ @Override public org.jooq.test.sybase.generatedclasses.tables.TLanguage as(java.lang.String alias) { return new org.jooq.test.sybase.generatedclasses.tables.TLanguage(alias); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
29a9c7d2b37ae55de0360f4d899e6a3e1c683a7d
9560c3b8ba825f49c1e9b8440b7905cfe9c7ef78
/module-examples/communications/dom/src/main/java/org/incode/example/communications/dom/mixins/Document_communications.java
4afd45a1a55dc858df5158bf779f5215c22028eb
[ "Apache-2.0" ]
permissive
incodehq/incode-examples
756e447a7ac2f84a750571548aed85eb133f8f28
911497115d5d049ea1edd3f703c0ccd052db5f9c
refs/heads/master
2020-03-26T16:35:38.058452
2018-08-22T08:13:36
2018-08-22T08:13:36
145,111,756
1
0
null
null
null
null
UTF-8
Java
false
false
4,345
java
package org.incode.example.communications.dom.mixins; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; import javax.inject.Inject; import com.google.common.collect.Lists; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.Contributed; import org.apache.isis.applib.annotation.DomainService; import org.apache.isis.applib.annotation.Mixin; import org.apache.isis.applib.annotation.NatureOfService; import org.apache.isis.applib.annotation.SemanticsOf; import org.apache.isis.applib.services.tablecol.TableColumnOrderService; import org.incode.example.communications.dom.impl.comms.Communication; import org.incode.example.communications.dom.impl.covernotes.Document_coverNoteFor; import org.incode.example.document.DocumentModule; import org.incode.example.document.dom.impl.docs.Document; import org.incode.example.document.dom.impl.paperclips.PaperclipRepository; import org.incode.example.document.dom.spi.SupportingDocumentsEvaluator; @Mixin(method = "coll") public class Document_communications { private final Document document; public Document_communications(final Document document) { this.document = document; } public static class ActionDomainEvent extends DocumentModule.ActionDomainEvent<Document_communications> { } @Action( semantics = SemanticsOf.SAFE, domainEvent = ActionDomainEvent.class ) @ActionLayout( contributed = Contributed.AS_ASSOCIATION ) public List<Communication> coll() { final List<Communication> communications = Lists.newArrayList( paperclipRepository.findByDocument(document).stream() .map(paperclip -> paperclip.getAttachedTo()) .filter(attachedTo -> attachedTo instanceof Communication) .map(Communication.class::cast) .collect(Collectors.toList())); Collections.reverse(communications); return communications; } public boolean hideColl() { // hide for supporting documents for (SupportingDocumentsEvaluator supportingDocumentsEvaluator : supportingDocumentsEvaluators) { final SupportingDocumentsEvaluator.Evaluation evaluation = supportingDocumentsEvaluator.evaluate(document); if(evaluation == SupportingDocumentsEvaluator.Evaluation.SUPPORTING) { return true; } } return false; } @DomainService(nature = NatureOfService.DOMAIN) public static class TableColumnOrderServiceForDocumentCommunications implements TableColumnOrderService { @Override public List<String> orderParented( final Object parent, final String collectionId, final Class<?> collectionType, final List<String> propertyIds) { if(parent instanceof Document && Objects.equals(collectionId, "communications")) { propertyIds.remove("primaryDocument"); return propertyIds; } return null; } @Override public List<String> orderStandalone(final Class<?> aClass, final List<String> list) { return null; } } @DomainService( nature = NatureOfService.DOMAIN, menuOrder = "110" ) public static class SupportingDocumentsEvaluatorForCoverNotes implements SupportingDocumentsEvaluator { @Override public List<Document> supportedBy(final Document candidateSupportingDocument) { return null; } @Override public Evaluation evaluate(final Document candidateSupportingDocument) { final Communication communication = coverNoteEvaluator.coverNoteFor(candidateSupportingDocument); return communication != null ? Evaluation.SUPPORTING : Evaluation.UNKNOWN; } @Inject Document_coverNoteFor.Evaluator coverNoteEvaluator; } @Inject List<SupportingDocumentsEvaluator> supportingDocumentsEvaluators; @Inject PaperclipRepository paperclipRepository; }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
af806edd497458a7d3f2b304fc45cf9826ec09e6
16358360fe1cf527fcf45e1cf13bbf2e441b530c
/runtime/citrus-xml/src/test/java/org/citrusframework/xml/container/AssertTest.java
ba37098439cf268e78a52a2a3308609b29089bb4
[ "Apache-2.0" ]
permissive
citrusframework/citrus
cc08796208428fe29ae0502ff7da340cc70b5a6c
dd8d57602d77cb6cc10c8793b8f7aa00f1e99a4a
refs/heads/main
2023-08-26T16:25:20.966016
2023-08-21T13:39:31
2023-08-21T18:36:14
500,806
232
95
Apache-2.0
2023-09-12T11:33:21
2010-02-03T15:32:30
Java
UTF-8
Java
false
false
2,529
java
/* * Copyright 2022 the original author or authors. * * 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.citrusframework.xml.container; import org.citrusframework.TestCase; import org.citrusframework.TestCaseMetaInfo; import org.citrusframework.actions.FailAction; import org.citrusframework.exceptions.CitrusRuntimeException; import org.citrusframework.xml.XmlTestLoader; import org.citrusframework.xml.actions.AbstractXmlActionTest; import org.testng.Assert; import org.testng.annotations.Test; /** * @author Christoph Deppisch */ public class AssertTest extends AbstractXmlActionTest { @Test public void shouldLoadAssert() { XmlTestLoader testLoader = createTestLoader("classpath:org/citrusframework/xml/container/assert-test.xml"); testLoader.load(); TestCase result = testLoader.getTestCase(); Assert.assertEquals(result.getName(), "AssertTest"); Assert.assertEquals(result.getMetaInfo().getAuthor(), "Christoph"); Assert.assertEquals(result.getMetaInfo().getStatus(), TestCaseMetaInfo.Status.FINAL); Assert.assertEquals(result.getActionCount(), 1L); Assert.assertEquals(result.getTestAction(0).getClass(), org.citrusframework.container.Assert.class); Assert.assertEquals(((org.citrusframework.container.Assert) result.getTestAction(0)).getException(), CitrusRuntimeException.class); Assert.assertEquals(((org.citrusframework.container.Assert) result.getTestAction(0)).getMessage(), "Something went wrong"); Assert.assertEquals(((org.citrusframework.container.Assert) result.getTestAction(0)).getActionCount(), 1L); Assert.assertEquals(((org.citrusframework.container.Assert) result.getTestAction(0)).getAction().getClass(), FailAction.class); } }
[ "cdeppisch@redhat.com" ]
cdeppisch@redhat.com
48665b921575ea5ffab0caa46f127532c733e333
c2f4654ad76bb64a34eaa9950000e58b70b3acdc
/src/org/drip/sample/bondmetrics/Bhatpara.java
c62b8d2397aff36d93cb169a4cf49a9e511d134e
[ "Apache-2.0" ]
permissive
IanMadlenya/DROP
0a1361a1f6fd46d9dc8d9795edf04ee8f928b437
872d93bbae48ce071bcd9bae2b5ce1570bbbc862
refs/heads/master
2021-07-23T01:41:01.575353
2017-11-03T14:45:49
2017-11-03T14:45:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,538
java
package org.drip.sample.bondmetrics; import org.drip.analytics.date.*; import org.drip.product.creator.BondBuilder; import org.drip.product.credit.BondComponent; import org.drip.product.params.EmbeddedOptionSchedule; import org.drip.service.env.EnvManager; import org.drip.service.scenario.*; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! * Copyright (C) 2017 Lakshmi Krishnamurthy * * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model * libraries targeting analysts and developers * https://lakshmidrip.github.io/DRIP/ * * DRIP is composed of four main libraries: * * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ * * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. * * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy * Incorporator, Holdings Constraint, and Transaction Costs. * * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. * * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. * * 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. */ /** * Bhatpara generates the Full Suite of Replication Metrics for a Sample Bond. * * @author Lakshmi Krishnamurthy */ public class Bhatpara { private static final void SetEOS ( final BondComponent bond, final EmbeddedOptionSchedule eosCall, final EmbeddedOptionSchedule eosPut) throws java.lang.Exception { if (null != eosPut) bond.setEmbeddedPutSchedule (eosPut); if (null != eosCall) bond.setEmbeddedCallSchedule (eosCall); } public static final void main ( final String[] astArgs) throws Exception { EnvManager.InitEnv (""); JulianDate dtSpot = DateUtil.CreateFromYMD ( 2017, DateUtil.AUGUST, 31 ); String[] astrDepositTenor = new String[] { "2D" }; double[] adblDepositQuote = new double[] { 0.0130411 // 2D }; double[] adblFuturesQuote = new double[] { 0.01345, // 98.655 0.01470, // 98.530 0.01575, // 98.425 0.01660, // 98.340 0.01745, // 98.255 0.01845 // 98.155 }; String[] astrFixFloatTenor = new String[] { "02Y", "03Y", "04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y" }; String[] astrGovvieTenor = new String[] { "1Y", "2Y", "3Y", "5Y", "7Y", "10Y", "20Y", "30Y" }; double[] adblFixFloatQuote = new double[] { 0.016410, // 2Y 0.017863, // 3Y 0.019030, // 4Y 0.020035, // 5Y 0.020902, // 6Y 0.021660, // 7Y 0.022307, // 8Y 0.022879, // 9Y 0.023363, // 10Y 0.023820, // 11Y 0.024172, // 12Y 0.024934, // 15Y 0.025581, // 20Y 0.025906, // 25Y 0.025973, // 30Y 0.025838, // 40Y 0.025560 // 50Y }; double[] adblGovvieYield = new double[] { 0.01219, // 1Y 0.01391, // 2Y 0.01590, // 3Y 0.01937, // 5Y 0.02200, // 7Y 0.02378, // 10Y 0.02677, // 20Y 0.02927 // 30Y }; String[] astrCreditTenor = new String[] { "06M", "01Y", "02Y", "03Y", "04Y", "05Y", "07Y", "10Y" }; double[] adblCreditQuote = new double[] { 60., // 6M 68., // 1Y 88., // 2Y 102., // 3Y 121., // 4Y 138., // 5Y 168., // 7Y 188. // 10Y }; double dblFX = 1.; int iSettleLag = 3; int iCouponFreq = 2; String strName = "Bhatpara"; double dblCleanPrice = 1.01394; double dblIssuePrice = 1.0; String strCurrency = "USD"; double dblSpreadBump = 20.; double dblCouponRate = 0.05125; double dblIssueAmount = 5.25e08; String strTreasuryCode = "UST"; String strCouponDayCount = "30/360"; double dblSpreadDurationMultiplier = 5.; JulianDate dtEffective = DateUtil.CreateFromYMD ( 2013, 10, 11 ); JulianDate dtMaturity = DateUtil.CreateFromYMD ( 2023, 4, 1 ); BondComponent bond = BondBuilder.CreateSimpleFixed ( strName, strCurrency, strName, dblCouponRate, iCouponFreq, strCouponDayCount, dtEffective, dtMaturity, null, null ); SetEOS ( bond, EmbeddedOptionSchedule.FromAmerican ( dtSpot.julian(), new int[] { DateUtil.CreateFromYMD (2018, 04, 01).julian(), DateUtil.CreateFromYMD (2019, 04, 01).julian(), DateUtil.CreateFromYMD (2020, 04, 01).julian(), DateUtil.CreateFromYMD (2021, 04, 01).julian(), DateUtil.CreateFromYMD (2023, 04, 01).julian(), }, new double[] { 1.02563, 1.01708, 1.00854, 1.00000, 1.00000, }, false, 15, 15, false, Double.NaN, "", Double.NaN ), null ); BondReplicator abr = BondReplicator.Standard ( dblCleanPrice, dblIssuePrice, dblIssueAmount, dtSpot, astrDepositTenor, adblDepositQuote, adblFuturesQuote, astrFixFloatTenor, adblFixFloatQuote, dblSpreadBump, dblSpreadDurationMultiplier, strTreasuryCode, astrGovvieTenor, adblGovvieYield, astrCreditTenor, adblCreditQuote, dblFX, Double.NaN, iSettleLag, bond ); BondReplicationRun abrr = abr.generateRun(); System.out.println (abrr.display()); } }
[ "lakshmi7977@gmail.com" ]
lakshmi7977@gmail.com
a04c181640ea75a3e90afb603c86c5e356843dc1
e8bdd57edc0b70169711bce0cbd75316d7b922fa
/services/hrdb/src/com/auto_xjqgvfkoug/hrdb/service/HrdbProcedureExecutorService.java
614c5f0bb3aa3416c80b68424232eecf370c270e
[]
no_license
wavemakerapps/Auto_xJQGvfkOuG
c46c2fe86399eb4f67a9043fa8509bb26c3f5797
df430ad564ec562011d33883d06b35037db09200
refs/heads/master
2020-03-07T02:28:39.406461
2018-03-28T23:26:11
2018-03-28T23:26:11
127,209,681
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ package com.auto_xjqgvfkoug.hrdb.service; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ public interface HrdbProcedureExecutorService { }
[ "automate1@wavemaker.com" ]
automate1@wavemaker.com
67c32f3d48673ccc09e3a075ccb961feb2ad6379
2a3f19a4a2b91d9d715378aadb0b1557997ffafe
/sources/com/amap/api/mapcore2d/IUiSettingsDelegate.java
fca23c869281d2f91fb6d613e700483f146b504f
[]
no_license
amelieko/McDonalds-java
ce5062f863f7f1cbe2677938a67db940c379d0a9
2fe00d672caaa7b97c4ff3acdb0e1678669b0300
refs/heads/master
2022-01-09T22:10:40.360630
2019-04-21T14:47:20
2019-04-21T14:47:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,434
java
package com.amap.api.mapcore2d; import android.os.RemoteException; /* renamed from: com.amap.api.mapcore2d.ak */ public interface IUiSettingsDelegate { /* renamed from: a */ void mo9714a(int i) throws RemoteException; /* renamed from: a */ void mo9715a(boolean z) throws RemoteException; /* renamed from: a */ boolean mo9716a() throws RemoteException; /* renamed from: b */ void mo9717b(int i) throws RemoteException; /* renamed from: b */ void mo9718b(boolean z) throws RemoteException; /* renamed from: b */ boolean mo9719b() throws RemoteException; /* renamed from: c */ void mo9720c(boolean z) throws RemoteException; /* renamed from: c */ boolean mo9721c() throws RemoteException; /* renamed from: d */ void mo9722d(boolean z) throws RemoteException; /* renamed from: d */ boolean mo9723d() throws RemoteException; /* renamed from: e */ void mo9724e(boolean z) throws RemoteException; /* renamed from: e */ boolean mo9725e() throws RemoteException; /* renamed from: f */ void mo9726f(boolean z) throws RemoteException; /* renamed from: f */ boolean mo9727f() throws RemoteException; /* renamed from: g */ int mo9728g() throws RemoteException; /* renamed from: g */ void mo9729g(boolean z) throws RemoteException; /* renamed from: h */ int mo9730h() throws RemoteException; }
[ "makfc1234@gmail.com" ]
makfc1234@gmail.com
65ee21943e8b70b3011641d6dae594725f01f77f
d73c0629120b1d1b8bba6147d22c01bc6405c7d9
/super-devops-common/src/main/java/com/wl4g/devops/common/constants/UMCDevOpsConstants.java
9feb6f4cb496cc9ea82904ad707a7efa858eef50
[ "Apache-2.0" ]
permissive
YKHahahaha/super-devops
c4e7d799b561eb55fd266c592e012ca453bbd311
3ce21181119235f97abb271634c129a5256c42d8
refs/heads/master
2020-09-07T18:34:16.182181
2019-11-08T16:07:13
2019-11-08T16:07:13
220,878,807
1
0
null
2019-11-11T01:43:05
2019-11-11T01:43:05
null
UTF-8
Java
false
false
6,638
java
/* * Copyright 2017 ~ 2025 the original author or authors. <wanglsir@gmail.com, 983708408@qq.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.wl4g.devops.common.constants; /** * DevOps UMC Constants. * * @author Wangl.sir <983708408@qq.com> * @version v1.0 * @date 2018ๅนด11ๆœˆ13ๆ—ฅ * @since */ public abstract class UMCDevOpsConstants extends DevOpsConstants { // // UMC admin definition. // /** Administrator dashboard's base URI. */ final public static String URI_ADMIN_HOME = "/dashboard"; // // UMC receiver definition.(corresponding to agent collector) // /** Receiver end-point based URI */ final public static String URI_HTTP_RECEIVER_BASE = "/receiver"; /** HTTP receiver metric end-point URI.(corresponding to agent collector) */ final public static String URI_HTTP_RECEIVER_ENDPOINT = "metric"; // // UMC alarm definition. // /** * UMC Alarm template prefix key corresponding to a collector. */ final public static String KEY_CACHE_ALARM_TPLS = "umc_alarm_tpls_"; /** * UMC alarm metric value in time window queue key prefix. */ final public static String KEY_CACHE_ALARM_METRIC_QUEUE = "umc_alarm_queue_"; /** * Simulation UMC alarm metric value in time window queue key prefix. */ final public static String KEY_CACHE_ALARM_METRIC_QUEUE_SIMULATE = "umc_alarm_queue_simulate_"; /** * KAFKA receiver metric topic pattern.(corresponding to agent collector) */ final public static String TOPIC_KAFKA_RECEIVE_PATTERN = "umc_agent_metrics"; // // UMC watch definition. // /** Watch fetch sharding cache key. */ final public static String KEY_CACHE_FETCH_META = "umc_fetch_meta_sharding_"; // // UMC serial store definition.(corresponding to agent collector) // /** tag -- id */ final public static String TAG_ID = "id"; /** tag -- disk : mount */ // final public static String TAG_DISK_MOUNT_POINT="mountPoint"; /** tag -- disk : device */ final public static String TAG_DISK_DEVICE = "device"; /** tag -- net : port */ final public static String TAG_DISK_NET_PORT = "port"; /** tag -- docker : containerId */ final public static String TAG_DOCKER_CONTAINER_ID = "containerId"; /** tag -- docker : name */ final public static String TAG_DOCKER_NAME = "name"; /** metric -- cpu */ final public static String METRIC_CPU = "basic.cpu"; /** metric -- mem : total */ final public static String METRIC_MEM_TOTAL = "basic.mem.total"; /** metric -- mem : free */ final public static String METRIC_MEM_FREE = "basic.mem.free"; /** metric -- mem : used percent */ final public static String METRIC_MEM_USED_PERCENT = "basic.mem.usedPercent"; /** metric -- mem : used */ final public static String METRIC_MEM_USED = "basic.mem.used"; /** metric -- mem cached */ final public static String METRIC_MEM_CACHE = "basic.mem.cached"; /** metric -- mem buffers */ final public static String METRIC_MEM_BUFFERS = "basic.mem.buffers"; /** metric -- disk : total */ final public static String METRIC_DISK_TOTAL = "basic.disk.total"; /** metric -- disk : free */ final public static String METRIC_DISK_FREE = "basic.disk.free"; /** metric -- disk : used */ final public static String METRIC_DISK_USED = "basic.disk.used"; /** metric -- disk : used Percent */ final public static String METRIC_DISK_USED_PERCENT = "basic.disk.usedPercent"; /** metric -- disk : inodes Physical */ final public static String METRIC_DISK_INODES_TOTAL = "basic.disk.inodesTotal"; /** metric -- disk : inodes Used */ final public static String METRIC_DISK_INODES_USED = "basic.disk.inodesUsed"; /** metric -- disk : inodes Free */ final public static String METRIC_DISK_INODES_FREE = "basic.disk.inodesFree"; /** metric -- disk : inodes Used Percent */ final public static String METRIC_DISK_INODES_USED_PERCENT = "basic.disk.inodesUsedPercent"; /** metric -- net : up */ final public static String METRIC_NET_UP = "basic.net.up"; /** metric -- net : down */ final public static String METRIC_NET_DOWN = "basic.net.down"; /** metric -- net : count */ final public static String METRIC_NET_COUNT = "basic.net.count"; /** metric -- net : estab */ final public static String METRIC_NET_ESTAB = "basic.net.estab"; /** metric -- net : closeWait */ final public static String METRIC_NET_CLOSE_WAIT = "basic.net.closeWait"; /** metric -- net : timeWait */ final public static String METRIC_NET_TIME_WAIT = "basic.net.timeWait"; /** metric -- net : close */ final public static String METRIC_NET_CLOSE = "basic.net.close"; /** metric -- net : listen */ final public static String METRIC_NET_LISTEN = "basic.net.listen"; /** metric -- net : closing */ final public static String METRIC_NET_CLOSING = "basic.net.closing"; /** metric -- docker : cpu.perc */ final public static String METRIC_DOCKER_CPU = "docker.cpu.perc"; /** metric -- docker : mem.usage */ final public static String METRIC_DOCKER_MEM_USAGE = "docker.mem.usage"; /** metric -- docker : mem.perc */ final public static String METRIC_DOCKER_MEM_PERC = "docker.mem.perc"; /** metric -- docker : net.in */ final public static String METRIC_DOCKER_NET_IN = "docker.net.in"; /** metric -- docker : net.out */ final public static String METRIC_DOCKER_NET_OUT = "docker.net.out"; /** metric -- docker : block.in */ final public static String METRIC_DOCKER_BLOCK_IN = "docker.block.in"; /** metric -- docker : block.out */ final public static String METRIC_DOCKER_BLOCK_OUT = "docker.block.out"; /* alarm limit */ final public static String ALARM_LIMIT_PHONE = "alarm_limit_phone"; final public static String ALARM_LIMIT_DINGTALK = "alarm_limit_dingtalk"; final public static String ALARM_LIMIT_FACEBOOK = "alarm_limit_facebook"; final public static String ALARM_LIMIT_TWITTER = "alarm_limit_twitter"; final public static String ALARM_LIMIT_WECHAT = "alarm_limit_wechat"; /* alarm notification contact status */ final public static String ALARM_SATUS_SEND = "1"; final public static String ALARM_SATUS_UNSEND = "2"; final public static String ALARM_SATUS_ACCEPTED = "3"; final public static String ALARM_SATUS_UNACCEPTED = "4"; }
[ "983708408@qq.com" ]
983708408@qq.com
f677579b6fd67f5f1eb353caa829d8b0d89f2758
710fc3dcf6ca83f90653cbf3ff0645441e9a4edf
/java/src/configuration/ConfigurationMapperImplSQL.java
ada474f0700f35e13ad99ca63907118a9b0b99f8
[]
no_license
BBK-PiJ-2015-10/mtp-abm
dac029fe0187b4eef4cfedfbedeafdfaa57fd5c7
40848df7dba57a9a5d355ad84d414c814b32fbc8
refs/heads/master
2020-05-22T05:44:56.007762
2016-09-21T11:36:47
2016-09-21T11:36:47
60,769,600
0
0
null
null
null
null
UTF-8
Java
false
false
972
java
package configuration; import java.util.Scanner; import java.util.NoSuchElementException; /* * An extension of ConfigurationMapperAbstract to support an SQL ABC configuration. */ public class ConfigurationMapperImplSQL extends ConfigurationMapperAbstract implements ConfigurationMapper { public ConfigurationMapperImplSQL(ConfigurationManagerAbstract configurationManager){ super(configurationManager); mapCreatorFactory = new MapCreatorFactorySQL(); } public boolean execManager(Scanner sc) { try { configurationManager.loadFilesMap(); ((ConfigurationManagerSQL)configurationManager).captureGLConnectionSettings(sc); configurationManager.grabFilesAttributes(); configurationManager.loadGlFilesMainAttributes(sc); configurationManager.loadBpaFilesMainAttributes(sc); configurationManager.save(); return true; } catch (NoSuchElementException ex){ return false; } catch (NullPointerException ex){ return false; } } }
[ "yasserpo@hotmail.com" ]
yasserpo@hotmail.com
01e3588b8644255a397358c0843dd28ca522196c
45f23cd51c1149f200c7b00fd548dabb1d6506f0
/src/org/ovirt/engine/sdk/decorators/NetworkLabel.java
dffa594dc484317a384994af40a87e83922a05b8
[]
no_license
zuoguagua/myproject
27c6755237183271ed3a6082b51167ebbf122496
ac3807490b8c507a05e76bebcf73cc9b8c1473fb
refs/heads/master
2021-01-21T04:54:48.716686
2016-06-30T07:05:26
2016-06-30T07:05:26
55,661,175
2
0
null
null
null
null
UTF-8
Java
false
false
5,096
java
// // Copyright (c) 2012 Red Hat, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // ********************************************************************* // ********************* GENERATED CODE - DO NOT MODIFY **************** // ********************************************************************* package org.ovirt.engine.sdk.decorators; import java.io.IOException; import java.util.List; import org.apache.http.Header; import org.apache.http.client.ClientProtocolException; import org.ovirt.engine.sdk.entities.Action; import org.ovirt.engine.sdk.entities.Response; import org.ovirt.engine.sdk.exceptions.ServerException; import org.ovirt.engine.sdk.utils.HttpHeaderBuilder; import org.ovirt.engine.sdk.utils.HttpHeaderUtils; import org.ovirt.engine.sdk.utils.UrlBuilder; import org.ovirt.engine.sdk.web.HttpProxyBroker; import org.ovirt.engine.sdk.web.UrlParameterType; /** * <p>NetworkLabel providing relation and functional services * <p>to {@link org.ovirt.engine.sdk.entities.Label }. */ @SuppressWarnings("unused") public class NetworkLabel extends org.ovirt.engine.sdk.entities.Label { private HttpProxyBroker proxy; private final Object LOCK = new Object(); /** * @param proxy HttpProxyBroker */ public NetworkLabel(HttpProxyBroker proxy) { this.proxy = proxy; } /** * @return HttpProxyBroker */ private HttpProxyBroker getProxy() { return proxy; } /** * Deletes object. * * @return * {@link Response } * * @throws ClientProtocolException * Signals that HTTP/S protocol error has occurred. * @throws ServerException * Signals that an oVirt api error has occurred. * @throws IOException * Signals that an I/O exception of some sort has occurred. */ public Response delete() throws ClientProtocolException, ServerException, IOException { String url = this.getHref(); HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); List<Header> headers = headersBuilder.build(); UrlBuilder urlBuilder = new UrlBuilder(url); url = urlBuilder.build(); return getProxy().delete(url, Response.class, headers); } /** * Deletes object. * * @param async * <pre> * [true|false] * </pre> * * @return * {@link Response } * * @throws ClientProtocolException * Signals that HTTP/S protocol error has occurred. * @throws ServerException * Signals that an oVirt api error has occurred. * @throws IOException * Signals that an I/O exception of some sort has occurred. */ public Response delete(Boolean async) throws ClientProtocolException, ServerException, IOException { String url = this.getHref(); HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); List<Header> headers = headersBuilder.build(); UrlBuilder urlBuilder = new UrlBuilder(url); if (async != null) { urlBuilder.add("async", async, UrlParameterType.MATRIX); } url = urlBuilder.build(); return getProxy().delete(url, Response.class, headers); } /** * Deletes object. * * @param correlationId * <pre> * [any string] * </pre> * * @param async * <pre> * [true|false] * </pre> * * @return * {@link Response } * * @throws ClientProtocolException * Signals that HTTP/S protocol error has occurred. * @throws ServerException * Signals that an oVirt api error has occurred. * @throws IOException * Signals that an I/O exception of some sort has occurred. */ public Response delete(Boolean async, String correlationId) throws ClientProtocolException, ServerException, IOException { String url = this.getHref(); HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); if (correlationId != null) { headersBuilder.add("Correlation-Id", correlationId); } List<Header> headers = headersBuilder.build(); UrlBuilder urlBuilder = new UrlBuilder(url); if (async != null) { urlBuilder.add("async", async, UrlParameterType.MATRIX); } url = urlBuilder.build(); return getProxy().delete(url, Response.class, headers); } }
[ "admin@example.com" ]
admin@example.com
b3951c490deac0c9ca68b1e37a7e31abc96c0dd8
95fa8c4371957e2acf62204f9170917b493d8fd8
/planet/test/start-hive/src/main/java/com/item/hive/entity/DbInfo.java
635bcc10a69a1194e088ed04dad036235842d6ab
[]
no_license
JinggeSun/newword
dd6fa9ddbf575b080bf71fdf74fb248643ad5ce0
8ce5763f3c6ec6746dd12aa21d11d6dfb3343f96
refs/heads/master
2022-09-07T14:55:13.597224
2021-06-16T14:42:39
2021-06-16T14:42:39
231,100,188
0
0
null
2022-09-01T23:32:47
2019-12-31T14:12:50
JavaScript
UTF-8
Java
false
false
489
java
package com.item.hive.entity; import java.util.List; /** * @author zcm */ public class DbInfo { public DbInfo(String dbName) { this.dbName = dbName; } private String dbName; public void setDbName(String dbName) { this.dbName = dbName; } public String getDbName() { return dbName; } @Override public String toString() { return "DbInfo{" + "dbName='" + dbName + '\'' + '}'; } }
[ "yulinsunjingge@gmail.com" ]
yulinsunjingge@gmail.com
6c41dee4eda7a0452c8365240e4ab0d441d4771c
23ea1ede5a6f7549917337b679e2b7692dc23d9f
/oasys/src/com/oasys/controller/OrganizationController.java
e7a0746371278d84eae0db284bf4c40d430aa8df
[]
no_license
amtech/learngit
85099959537626c0271d2a0a84fe1329a5d2da9b
93e8488d45f1f8d2820aae61f51edc20ee7f9873
refs/heads/master
2020-04-26T11:32:37.487749
2015-10-21T08:01:23
2015-10-21T08:01:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
java
package com.oasys.controller; import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.oasys.service.OrganizationService; import com.oasys.viewModel.TreeModel; /** * * @ClassName: LoginController * @Description: TODO * @Author xujianwei * @Version 1.0 * @Date 2015ๅนด8ๆœˆ17ๆ—ฅ ไธ‹ๅˆ2:24:06 * ้ƒจ้—จ */ @Controller @RequestMapping("/Organization") public class OrganizationController extends BaseController{ @Autowired private OrganizationService organization; //้ƒจ้—จๅˆ—่กจ @ResponseBody @RequestMapping(value="/organizationList",method=RequestMethod.POST) public String findMenuList(HttpServletResponse httpServletResponse){ List<TreeModel> organizationList = organization.findOrganizationList(); OutputJson(httpServletResponse,organizationList); return null; } }
[ "sunyiban@sina.com" ]
sunyiban@sina.com
83790e676192c203fb0578ea26c4831e518508a1
8534ea766585cfbd6986fd845e59a68877ecb15b
/com/slideme/sam/manager/controller/p053a/ak.java
2bddf43c03e21ea42c4cfd51dda6144ab8068509
[]
no_license
Shanzid01/NanoTouch
d7af94f2de686f76c2934b9777a92b9949b48e10
6d51a44ff8f719f36b880dd8d1112b31ba75bfb4
refs/heads/master
2020-04-26T17:39:53.196133
2019-03-04T10:23:51
2019-03-04T10:23:51
173,720,526
0
0
null
null
null
null
UTF-8
Java
false
false
965
java
package com.slideme.sam.manager.controller.p053a; import android.app.AlertDialog; import android.graphics.Bitmap; import android.webkit.WebView; import android.webkit.WebViewClient; /* compiled from: TermsAndConditionsDialog */ class ak extends WebViewClient { final /* synthetic */ aj f2686a; private final /* synthetic */ AlertDialog f2687b; ak(aj ajVar, AlertDialog alertDialog) { this.f2686a = ajVar; this.f2687b = alertDialog; } public void onPageStarted(WebView webView, String str, Bitmap bitmap) { super.onPageStarted(webView, str, bitmap); try { this.f2687b.getButton(-1).setEnabled(false); } catch (NullPointerException e) { } } public void onPageFinished(WebView webView, String str) { super.onPageFinished(webView, str); try { this.f2687b.getButton(-1).setEnabled(true); } catch (NullPointerException e) { } } }
[ "shanzid.shaiham@gmail.com" ]
shanzid.shaiham@gmail.com
ed9790362131647cc5b1bfe9928b43d22a31611b
58e100e3b16479b4f0c45750945a03274f4ea114
/formation-programmation-java/projets/java/Chifoumi/src/chifoumi/JeuUnTour.java
7779313af5606d147f3430e72122ccb4bb8c459d
[]
no_license
ltearno/formations
73bc5180610c345bc8170d1d15a96f33e684a1ab
7e13403928b8538a371b3cdfb0bacd2f830ef849
refs/heads/master
2023-06-29T00:14:27.801517
2022-06-06T06:32:08
2022-06-06T06:32:08
110,226,568
2
4
null
2023-06-14T20:19:05
2017-11-10T09:08:37
JavaScript
UTF-8
Java
false
false
1,629
java
package chifoumi; public class JeuUnTour { private Joueur joueur1; private Joueur joueur2; public JeuUnTour( String nomJoueur1, String nomJoueur2 ) { joueur1 = new Joueur( nomJoueur1 ); joueur2 = new Joueur( nomJoueur2 ); } public void jouer() { tour(); joueur1.ecrireScore(); joueur2.ecrireScore(); conclure(); } @SuppressWarnings( "incomplete-switch" ) private void tour() { Choix choixJoueur1 = joueur1.choisir(); Choix choixJoueur2 = joueur2.choisir(); Joueur joueurGagnant = null; switch( choixJoueur1 ) { case CAILLOU: switch( choixJoueur2 ) { case CISEAUX: joueurGagnant = joueur2; break; case PAPIER: joueurGagnant = joueur2; break; } break; case CISEAUX: switch( choixJoueur2 ) { case CAILLOU: joueurGagnant = joueur2; break; case PAPIER: joueurGagnant = joueur1; break; } break; case PAPIER: switch( choixJoueur2 ) { case CAILLOU: joueurGagnant = joueur1; break; case CISEAUX: joueurGagnant = joueur2; break; } break; } if( joueurGagnant != null ) joueurGagnant.crediter(); } private void conclure() { int scoreJoueur1 = joueur1.getScore(); int scoreJoueur2 = joueur2.getScore(); if( scoreJoueur1 == scoreJoueur2 ) { System.out.println( "Les deux joueurs font รฉgalitรฉ" ); } else if( scoreJoueur1 > scoreJoueur2 ) { System.out.println( "Le joueur " + joueur1.getNom() + " a gagnรฉ !" ); } else { System.out.println( "Le joueur " + joueur2.getNom() + " a gagnรฉ !" ); } } }
[ "ltearno@gmail.com" ]
ltearno@gmail.com
f6d769a93c6ab817d7ff122f2ce005dde335ca04
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_20487.java
64f9dbbbb3da7d2dca85ef139a8b7869c441b79e
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
/** * Called by worker task when a tile has loaded. Redraws the view. */ private synchronized void onTileLoaded(){ debug("onTileLoaded"); checkReady(); checkImageLoaded(); if (isBaseLayerReady() && bitmap != null) { if (!bitmapIsCached) { bitmap.recycle(); } bitmap=null; if (onImageEventListener != null && bitmapIsCached) { onImageEventListener.onPreviewReleased(); } bitmapIsPreview=false; bitmapIsCached=false; } invalidate(); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
29f0e930d6658209e1089a1ed7197dbf85d20819
9c24963d818a03422ba4db661aad16cca9e23d89
/src/main/java/com/demo/springboot2/c5database/beetl/UserController.java
14f97a1a6c56a20acac05b6d0e6b1d7dced5658a
[]
no_license
yhb2010/springboot2.0_demo
ced9d9a2870190fe90bddd31fb97463c141912ff
fe6adf5956615eb512cb9dbc7db39f760964c3c3
refs/heads/master
2020-04-09T16:46:59.639887
2018-12-12T11:19:08
2018-12-12T11:19:08
160,462,721
1
1
null
null
null
null
UTF-8
Java
false
false
598
java
package com.demo.springboot2.c5database.beetl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import com.demo.springboot2.c5database.beetl.service.UserService; @RestController public class UserController { @Autowired private UserService userService; @GetMapping("/user/credit/{id}") public Integer getCredit(@PathVariable int id){ return userService.getCredit(id); } }
[ "youtong82@163.com" ]
youtong82@163.com
690f98f11b2e699ff1e2ca883b3bd3676d26e6aa
c95c03f659007f347cc02e293faeb339eff85a59
/Coverage/commons-functor-FUNCTOR_1_0_RC1/src/main/java/org/apache/commons/functor/BinaryPredicate.java
8262431dd16245006def99194497a1e04dd7b797
[ "Apache-2.0" ]
permissive
dormaayan/TestsReposirotry
e2bf6c247d933b278fcc47082afa7282dd916baa
75520c8fbbbd5f721f4c216ae7f142ec861e2c67
refs/heads/master
2020-04-11T21:34:56.287920
2019-02-06T13:34:31
2019-02-06T13:34:31
162,110,352
0
2
null
null
null
null
UTF-8
Java
false
false
1,568
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.commons.functor; /** * A functor that takes two arguments and returns a <code>boolean</code> value. * <p> * Implementors are encouraged but not required to make their functors * {@link java.io.Serializable Serializable}. * </p> * * @param <L> the left argument type. * @param <R> the right argument type. * @since 1.0 * @version $Revision$ $Date$ * @author Rodney Waldhoff */ public interface BinaryPredicate<L, R> extends BinaryFunctor<L, R> { /** * Evaluate this predicate. * * @param left the L element of the ordered pair of arguments * @param right the R element of the ordered pair of arguments * @return the result of this test for the given arguments */ boolean test(L left, R right); }
[ "dor.d.ma@gmail.com" ]
dor.d.ma@gmail.com
35852ef35ccb59ab7172a4e2d1dec797e0febb88
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/hd/ddemp/rec/HD_DDEMP_4000_LCURLISTRecord.java
97dddeeaa5c0a4a17420e442d5271f0497a64ca4
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
WINDOWS-1252
Java
false
false
5,013
java
package chosun.ciis.hd.ddemp.rec; import java.sql.*; import chosun.ciis.hd.ddemp.dm.*; import chosun.ciis.hd.ddemp.ds.*; /** * */ public class HD_DDEMP_4000_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{ public String duty_yymm; public String mang_no; public String flnm; public String prn; public String ptph_no; public String octgr_cd; public String octgr_cd_nm; public String lve_job_resn_cd; public String lve_job_resn_cd_nm; public String duty_dds; public String pay_amt; public String dd_amt; public String time_amt; public String incm_tax; public String res_tax; public String fisc_dt; public String emp_insr_fee; public String hlth_insr_fee; public String np_fee; public String budg_cd; public String budg_nm; public String rmks; public String actu_slip_no; public String proc_stat; public String proc_stat_nm; public String use_dept_cd; public String use_dept_nm; public HD_DDEMP_4000_LCURLISTRecord(){} public void setDuty_yymm(String duty_yymm){ this.duty_yymm = duty_yymm; } public void setMang_no(String mang_no){ this.mang_no = mang_no; } public void setFlnm(String flnm){ this.flnm = flnm; } public void setPrn(String prn){ this.prn = prn; } public void setPtph_no(String ptph_no){ this.ptph_no = ptph_no; } public void setOctgr_cd(String octgr_cd){ this.octgr_cd = octgr_cd; } public void setOctgr_cd_nm(String octgr_cd_nm){ this.octgr_cd_nm = octgr_cd_nm; } public void setLve_job_resn_cd(String lve_job_resn_cd){ this.lve_job_resn_cd = lve_job_resn_cd; } public void setLve_job_resn_cd_nm(String lve_job_resn_cd_nm){ this.lve_job_resn_cd_nm = lve_job_resn_cd_nm; } public void setDuty_dds(String duty_dds){ this.duty_dds = duty_dds; } public void setPay_amt(String pay_amt){ this.pay_amt = pay_amt; } public void setDd_amt(String dd_amt){ this.dd_amt = dd_amt; } public void setTime_amt(String time_amt){ this.time_amt = time_amt; } public void setIncm_tax(String incm_tax){ this.incm_tax = incm_tax; } public void setRes_tax(String res_tax){ this.res_tax = res_tax; } public void setFisc_dt(String fisc_dt){ this.fisc_dt = fisc_dt; } public void setEmp_insr_fee(String emp_insr_fee){ this.emp_insr_fee = emp_insr_fee; } public void setHlth_insr_fee(String hlth_insr_fee){ this.hlth_insr_fee = hlth_insr_fee; } public void setNp_fee(String np_fee){ this.np_fee = np_fee; } public void setBudg_cd(String budg_cd){ this.budg_cd = budg_cd; } public void setBudg_nm(String budg_nm){ this.budg_nm = budg_nm; } public void setRmks(String rmks){ this.rmks = rmks; } public void setActu_slip_no(String actu_slip_no){ this.actu_slip_no = actu_slip_no; } public void setProc_stat(String proc_stat){ this.proc_stat = proc_stat; } public void setProc_stat_nm(String proc_stat_nm){ this.proc_stat_nm = proc_stat_nm; } public void setUse_dept_cd(String use_dept_cd){ this.use_dept_cd = use_dept_cd; } public void setUse_dept_nm(String use_dept_nm){ this.use_dept_nm = use_dept_nm; } public String getDuty_yymm(){ return this.duty_yymm; } public String getMang_no(){ return this.mang_no; } public String getFlnm(){ return this.flnm; } public String getPrn(){ return this.prn; } public String getPtph_no(){ return this.ptph_no; } public String getOctgr_cd(){ return this.octgr_cd; } public String getOctgr_cd_nm(){ return this.octgr_cd_nm; } public String getLve_job_resn_cd(){ return this.lve_job_resn_cd; } public String getLve_job_resn_cd_nm(){ return this.lve_job_resn_cd_nm; } public String getDuty_dds(){ return this.duty_dds; } public String getPay_amt(){ return this.pay_amt; } public String getDd_amt(){ return this.dd_amt; } public String getTime_amt(){ return this.time_amt; } public String getIncm_tax(){ return this.incm_tax; } public String getRes_tax(){ return this.res_tax; } public String getFisc_dt(){ return this.fisc_dt; } public String getEmp_insr_fee(){ return this.emp_insr_fee; } public String getHlth_insr_fee(){ return this.hlth_insr_fee; } public String getNp_fee(){ return this.np_fee; } public String getBudg_cd(){ return this.budg_cd; } public String getBudg_nm(){ return this.budg_nm; } public String getRmks(){ return this.rmks; } public String getActu_slip_no(){ return this.actu_slip_no; } public String getProc_stat(){ return this.proc_stat; } public String getProc_stat_nm(){ return this.proc_stat_nm; } public String getUse_dept_cd(){ return this.use_dept_cd; } public String getUse_dept_nm(){ return this.use_dept_nm; } } /* ร€ร›ยผยบยฝรƒยฐยฃ : Tue Feb 08 19:38:00 KST 2011 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
9225834f1ab9c6d0df805e212b2e430ab308a8e9
bd7b2f839e76e37bf8a3fd841a7451340f7df7a9
/archunit-example/example-plain/src/main/java/com/tngtech/archunit/example/onionarchitecture_by_annotations/onion/order/PaymentMethod.java
3e27ac4a2c3550ab63a65323d74ac6ec4750778c
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
TNG/ArchUnit
ee7a1cb280360481a004c46f9861c5db181d7335
87cc595a281f84c7be6219714b22fbce337dd8b1
refs/heads/main
2023-09-01T14:18:52.601280
2023-08-29T09:15:13
2023-08-29T09:15:13
88,962,042
2,811
333
Apache-2.0
2023-09-14T08:11:13
2017-04-21T08:39:20
Java
UTF-8
Java
false
false
223
java
package com.tngtech.archunit.example.onionarchitecture_by_annotations.onion.order; import com.tngtech.archunit.example.onionarchitecture_by_annotations.annotations.DomainModel; @DomainModel public class PaymentMethod { }
[ "peter.gafert@tngtech.com" ]
peter.gafert@tngtech.com
b8318051a207f409bc516d684f25cd9ae3a03323
f2c8b25b6a63cd26a211f60fcf598c84d1f743c9
/Android21/android-5.0.2_r1/src/com/android/okhttp/internal/http/HttpDate.java
38705a293ae433cf4e3921235e3dffea718aa122
[]
no_license
EnSoftCorp/AnalyzableAndroid
1ba0d5db531025e517e5e4fbb7e455bbb2bb2191
d9b29a11308eb8e6511335b24a44d0388eb7b068
refs/heads/master
2022-10-17T22:52:32.933849
2015-05-01T18:17:48
2015-05-01T18:17:48
21,949,091
1
0
null
null
null
null
UTF-8
Java
false
false
3,352
java
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.okhttp.internal.http; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; /** * Best-effort parser for HTTP dates. */ public final class HttpDate { /** * Most websites serve cookies in the blessed format. Eagerly create the parser to ensure such * cookies are on the fast path. */ private static final ThreadLocal<DateFormat> STANDARD_DATE_FORMAT = new ThreadLocal<DateFormat>() { @Override protected DateFormat initialValue() { DateFormat rfc1123 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US); rfc1123.setTimeZone(TimeZone.getTimeZone("GMT")); return rfc1123; } }; /** If we fail to parse a date in a non-standard format, try each of these formats in sequence. */ private static final String[] BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS = new String[] { "EEEE, dd-MMM-yy HH:mm:ss zzz", // RFC 1036 "EEE MMM d HH:mm:ss yyyy", // ANSI C asctime() "EEE, dd-MMM-yyyy HH:mm:ss z", "EEE, dd-MMM-yyyy HH-mm-ss z", "EEE, dd MMM yy HH:mm:ss z", "EEE dd-MMM-yyyy HH:mm:ss z", "EEE dd MMM yyyy HH:mm:ss z", "EEE dd-MMM-yyyy HH-mm-ss z", "EEE dd-MMM-yy HH:mm:ss z", "EEE dd MMM yy HH:mm:ss z", "EEE,dd-MMM-yy HH:mm:ss z", "EEE,dd-MMM-yyyy HH:mm:ss z", "EEE, dd-MM-yyyy HH:mm:ss z", /* RI bug 6641315 claims a cookie of this format was once served by www.yahoo.com */ "EEE MMM d yyyy HH:mm:ss z", }; private static final DateFormat[] BROWSER_COMPATIBLE_DATE_FORMATS = new DateFormat[BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS.length]; /** Returns the date for {@code value}. Returns null if the value couldn't be parsed. */ public static Date parse(String value) { try { return STANDARD_DATE_FORMAT.get().parse(value); } catch (ParseException ignored) { } synchronized (BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS) { for (int i = 0, count = BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS.length; i < count; i++) { DateFormat format = BROWSER_COMPATIBLE_DATE_FORMATS[i]; if (format == null) { format = new SimpleDateFormat(BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS[i], Locale.US); BROWSER_COMPATIBLE_DATE_FORMATS[i] = format; } try { return format.parse(value); } catch (ParseException ignored) { } } } return null; } /** Returns the string for {@code value}. */ public static String format(Date value) { return STANDARD_DATE_FORMAT.get().format(value); } private HttpDate() { } }
[ "benjholla@gmail.com" ]
benjholla@gmail.com
3d89a80b1b09b1c6032e0ede0d3c43aa7a321b05
3b473afc657926b5ec78b6acc5ade578c4c35345
/org.pdtextensions.server.ui/src/org/pdtextensions/server/ui/internal/lhttpd/ServerConfigurationEditorPart.java
aae13609658ad784c507cc16091b1ddb87d328d5
[]
no_license
pdt-eg/Core-Plugin
80f5dede757b3aea8581590098f8a76eadfa53a8
f393923be5c8c0de300e8a72c0e49843328aff39
refs/heads/master
2021-12-22T11:32:22.212223
2021-12-17T16:39:21
2021-12-17T16:39:21
5,639,261
29
13
null
2018-03-23T13:55:23
2012-09-01T12:03:13
Java
UTF-8
Java
false
false
1,619
java
/******************************************************************************* * Copyright (c) 2012 The PDT Extension Group (https://github.com/pdt-eg) * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package org.pdtextensions.server.ui.internal.lhttpd; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.wst.server.ui.editor.ServerEditorPart; /** * Editor part for configuration of local httpd runtime. * * @author mepeisen */ public class ServerConfigurationEditorPart extends ServerEditorPart { @Override public void createPartControl(Composite parent) { FormToolkit toolkit = getFormToolkit(parent.getDisplay()); ScrolledForm form = toolkit.createScrolledForm(parent); toolkit.decorateFormHeading(form.getForm()); form.setText(Messages.ServerConfigurationEditorPart_FormTitle); /* TODO form.setImage(TomcatUIPlugin.getImage(TomcatUIPlugin.IMG_WEB_MODULE));*/ GridLayout layout = new GridLayout(); layout.marginTop = 6; layout.marginLeft = 6; form.getBody().setLayout(layout); // TODO Auto-generated method stub } @Override public void setFocus() { // TODO Auto-generated method stub } }
[ "mep_eisen@web.de" ]
mep_eisen@web.de
6cf54d6d314318c0f734fcad9771b7cf5ed910a4
40dd2c2ba934bcbc611b366cf57762dcb14c48e3
/RI_Stack/java/src/base/org/cablelabs/impl/manager/ResourceReclamationManager.java
16f7e97a3fcad9d54b125636f8f57e289fa20282
[]
no_license
amirna2/OCAP-RI
afe0d924dcf057020111406b1d29aa2b3a796e10
254f0a8ebaf5b4f09f4a7c8f4961e9596c49ccb7
refs/heads/master
2020-03-10T03:22:34.355822
2018-04-11T23:08:49
2018-04-11T23:08:49
129,163,048
0
0
null
null
null
null
UTF-8
Java
false
false
7,401
java
// COPYRIGHT_BEGIN // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER // // Copyright (C) 2008-2013, Cable Television Laboratories, Inc. // // This software is available under multiple licenses: // // (1) BSD 2-clause // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // ยทRedistributions of source code must retain the above copyright notice, this list // of conditions and the following disclaimer. // ยทRedistributions in binary form must reproduce the above copyright notice, this list of conditions // and the following disclaimer in the documentation and/or other materials provided with the // distribution. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // (2) GPL Version 2 // 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, version 2. This program is distributed // in the hope that it will be useful, but WITHOUT ANY WARRANTY; without // even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along // with this program.If not, see<http:www.gnu.org/licenses/>. // // (3)CableLabs License // If you or the company you represent has a separate agreement with CableLabs // concerning the use of this code, your rights and obligations with respect // to this code shall be as set forth therein. No license is granted hereunder // for any other purpose. // // Please contact CableLabs if you need additional information or // have any questions. // // CableLabs // 858 Coal Creek Cir // Louisville, CO 80027-9750 // 303 661-9100 // COPYRIGHT_END package org.cablelabs.impl.manager; import org.dvb.application.AppID; import org.ocap.system.event.ResourceDepletionEvent; /** * The purpose of the <code>ResourceReclamationManager</code> is to implement a * subset of the overall <i>resource reclamation</i> policy for the OCAP stack. * In particular it is responsible for implementing support for requested * resource reclamations within the Java space. This includes: * <ul> * <li>Forced garbage collection and finalization cycles as a form of * non-destructive resource reclamation. * <li>Allowing the <i>Monitor Application</i> to be notified of low resource * situations via {@link ResourceDepletionEvent} delivery, giving it the chance * to reclaim resources. * <li>Forced destruction of lower-priority applications in an attempt to make * additional resources available. * </ul> * * @author Aaron Kamienski */ public interface ResourceReclamationManager extends Manager { // Currently, no externally accessible methods are exposed via this // interface // This may change. Some possibilities include: // * Allowing registration of callback routines for cache cleanup. // * Allowing instigation of resource reclamation. // * Retrieval of statistics. /** * This utility class can be used to manipulate an application's <i>context * identifier</i>. It is meant to be used within the context of OCAP * resource reclamation. * * @author Aaron Kamienski */ public static class ContextID { /** * Create a <i>context id</i> for the application specified by the given * parameters. * * @param id * the <code>AppID</code> for the given app or * <code>null</code> * @param priority * the application priority * @return a <i>context id</i> for the given parameters; <code>0L</code> * is returned if <i>id</i> is <code>null</code> */ public static long create(AppID id, int priority) { if (id == null) return 0L; return id.getAID() | (((long) id.getOID() & 0xFFFFFFFF) << 16) | ((long) priority << 48); } /** * Returns the <code>AppID</code> encoded in the given <i>contextId</i>. * * @param contextId * the given <i>contextId</i> * @return the <code>AppID</code> encoded in the given <i>contextId</i>; * if the <i>contextId</i> is zero, then <code>AppID(0,0)</code> * is still returned */ public static AppID getAppID(long contextId) { int OID = (int) (contextId >> 16); int AID = (int) (contextId & 0xFFFF); return new AppID(OID, AID); } /** * Returns the <i>priority</i> encoded in the given <i>contextId</i>. * * @param contextId * the given <i>contextId</i> * @return the <i>priority</i> encoded in the given <i>contextId</i>; if * the <i>contextId</i> is zero, then a priority of zero is * still returned */ public static int getPriority(long contextId) { return (short) (contextId >>> 48); } /** * Sets the <i>context id</i> for the {@link Thread#currentThread() * current thread}. * <p> * The <i>context id</i> for all threads defaults to zero unless * explicitly set. * <p> * This would generally be used as follows: * * <pre> * long oldId = ContextID.set(newId); * try * { * //... * } * finally * { * ContextID.set(oldId); * } * </pre> * <p> * This method is not intended for general-purpose use, but is intended * for use by the {@link CallerContextManager} and {@link CallerContext} * implementations. * * @param contextId * @return the previous <i>context id</i> for the current thread */ public static long set(long contextId) { return nSet(contextId); } /** * Native method used to implement {@link #set(long)}. Sets the * <i>context id</i> for the current thread. * * @param contextId * the new contextId * @return the old contextId */ private static native long nSet(long contextId); } }
[ "amir.nathoo@ubnt.com" ]
amir.nathoo@ubnt.com
4dac57a27393b99b36e5cb0d39bc3e1ed7c2ef35
5ca998ddcf2bdfc6a3483c923101d8ce2f329116
/src/api/org/jzy3d/chart/factories/ChartComponentFactory.java
0316c1a0537a88abcafaf3688d56ae860b2ee279
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
fendres/jzy3d-api
2a42d5e43e232f751cbcf66d2fe04c2f139bc58f
de0b6646e54a6dd52d76b4397396cd48653e33bc
refs/heads/master
2021-01-18T10:38:06.537200
2013-02-13T21:37:45
2013-02-13T21:37:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,248
java
package org.jzy3d.chart.factories; import java.awt.Rectangle; import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLProfile; import org.jzy3d.bridge.IFrame; import org.jzy3d.bridge.awt.FrameAWT; import org.jzy3d.bridge.swing.FrameSwing; import org.jzy3d.chart.Chart; import org.jzy3d.chart.ChartScene; import org.jzy3d.chart.ChartView; import org.jzy3d.chart.controllers.keyboard.camera.CameraKeyController; import org.jzy3d.chart.controllers.keyboard.camera.CameraKeyControllerNewt; import org.jzy3d.chart.controllers.keyboard.camera.ICameraKeyController; import org.jzy3d.chart.controllers.keyboard.screenshot.IScreenshotKeyController; import org.jzy3d.chart.controllers.keyboard.screenshot.IScreenshotKeyController.IScreenshotEventListener; import org.jzy3d.chart.controllers.keyboard.screenshot.ScreenshotKeyController; import org.jzy3d.chart.controllers.keyboard.screenshot.ScreenshotKeyControllerNewt; import org.jzy3d.chart.controllers.mouse.camera.CameraMouseController; import org.jzy3d.chart.controllers.mouse.camera.CameraMouseControllerNewt; import org.jzy3d.chart.controllers.mouse.camera.ICameraMouseController; import org.jzy3d.maths.BoundingBox3d; import org.jzy3d.maths.Coord3d; import org.jzy3d.maths.Utils; import org.jzy3d.plot3d.primitives.axes.AxeBox; import org.jzy3d.plot3d.primitives.axes.IAxe; import org.jzy3d.plot3d.rendering.canvas.CanvasAWT; import org.jzy3d.plot3d.rendering.canvas.CanvasNewt; import org.jzy3d.plot3d.rendering.canvas.CanvasSwing; import org.jzy3d.plot3d.rendering.canvas.ICanvas; import org.jzy3d.plot3d.rendering.canvas.OffscreenCanvas; import org.jzy3d.plot3d.rendering.canvas.Quality; import org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy; import org.jzy3d.plot3d.rendering.ordering.BarycentreOrderingStrategy; import org.jzy3d.plot3d.rendering.scene.Scene; import org.jzy3d.plot3d.rendering.view.Camera; import org.jzy3d.plot3d.rendering.view.Renderer3d; import org.jzy3d.plot3d.rendering.view.View; public class ChartComponentFactory implements IChartComponentFactory { /* (non-Javadoc) * @see org.jzy3d.factories.IChartComponentFactory#newScene(boolean) */ @Override public ChartScene newScene(boolean sort){ return new ChartScene(sort, this); } /* (non-Javadoc) * @see org.jzy3d.factories.IChartComponentFactory#newView(org.jzy3d.plot3d.rendering.scene.Scene, org.jzy3d.plot3d.rendering.canvas.ICanvas, org.jzy3d.plot3d.rendering.canvas.Quality) */ @Override public View newView(Scene scene, ICanvas canvas, Quality quality){ return new ChartView(this, scene, canvas, quality); } /* (non-Javadoc) * @see org.jzy3d.factories.IChartComponentFactory#newCamera(org.jzy3d.maths.Coord3d) */ @Override public Camera newCamera(Coord3d center) { return new Camera(center); } /* (non-Javadoc) * @see org.jzy3d.factories.IChartComponentFactory#newAxe(org.jzy3d.maths.BoundingBox3d, org.jzy3d.plot3d.rendering.view.View) */ @Override public IAxe newAxe(BoundingBox3d box, View view) { AxeBox axe = new AxeBox(box); axe.setView(view); return axe; } /* (non-Javadoc) * @see org.jzy3d.factories.IChartComponentFactory#newRenderer(org.jzy3d.plot3d.rendering.view.View, boolean, boolean) */ @Override public Renderer3d newRenderer(View view, boolean traceGL, boolean debugGL){ return new Renderer3d(view, traceGL, debugGL); } /* (non-Javadoc) * @see org.jzy3d.factories.IChartComponentFactory#newOrderingStrategy() */ @Override public AbstractOrderingStrategy newOrderingStrategy() { return new BarycentreOrderingStrategy(); } /* (non-Javadoc) * @see org.jzy3d.factories.IChartComponentFactory#newCanvas(org.jzy3d.plot3d.rendering.scene.Scene, org.jzy3d.plot3d.rendering.canvas.Quality, java.lang.String, javax.media.opengl.GLCapabilities) */ @Override public ICanvas newCanvas(Scene scene, Quality quality, String chartType, GLCapabilities capabilities){ if("awt".compareTo(chartType)==0) return new CanvasAWT(this, scene, quality, capabilities); else if("swing".compareTo(chartType)==0) return new CanvasSwing(this, scene, quality, capabilities); else if("newt".compareTo(chartType)==0) return new CanvasNewt(this, scene, quality, capabilities); else if(chartType.startsWith("offscreen")){ Pattern pattern = Pattern.compile("offscreen,(\\d+),(\\d+)"); Matcher matcher = pattern.matcher(chartType); if(matcher.matches()){ int width = Integer.parseInt(matcher.group(1)); int height = Integer.parseInt(matcher.group(2)); return new OffscreenCanvas(this, scene, quality, GLProfile.getDefault(), width, height); } else return new OffscreenCanvas(this, scene, quality, GLProfile.getDefault(), 500, 500); } else throw new RuntimeException("unknown chart type:" + chartType); } @Override public ICameraMouseController newMouseController(Chart chart){ ICameraMouseController mouse = null; if(!chart.getWindowingToolkit().equals("newt")) mouse = new CameraMouseController(chart); else mouse = new CameraMouseControllerNewt(chart); return mouse; } @Override public IScreenshotKeyController newScreenshotKeyController(Chart chart){ // trigger screenshot on 's' letter String file = SCREENSHOT_FOLDER + "capture-" + Utils.dat2str(new Date()) + ".png"; IScreenshotKeyController screenshot; if(!chart.getWindowingToolkit().equals("newt")) screenshot = new ScreenshotKeyController(chart, file); else screenshot = new ScreenshotKeyControllerNewt(chart, file); screenshot.addListener(new IScreenshotEventListener() { @Override public void failedScreenshot(String file, Exception e) { System.out.println("Failed to save screenshot:"); e.printStackTrace(); } @Override public void doneScreenshot(String file) { System.out.println("Screenshot: " + file); } }); return screenshot; } public static String SCREENSHOT_FOLDER = "./data/screenshots/"; @Override public ICameraKeyController newKeyController(Chart chart) { ICameraKeyController key = null; if(!chart.getWindowingToolkit().equals("newt")) key = new CameraKeyController(chart); else key = new CameraKeyControllerNewt(chart); return key; } public IFrame newFrame(Chart chart, Rectangle bounds, String title){ Object canvas = chart.getCanvas(); if(canvas instanceof CanvasAWT) return new FrameAWT(chart, bounds, title); // FrameSWT works as well else if(canvas instanceof CanvasNewt) return new FrameAWT(chart, bounds, title, "[Newt]"); // FrameSWT works as well else if(canvas instanceof CanvasSwing) return new FrameSwing(chart, bounds, title); else throw new RuntimeException("No default frame could be found for the given Chart canvas: " + canvas.getClass()); } }
[ "martin.pernollet@calliandra-networks.com" ]
martin.pernollet@calliandra-networks.com
50e5d15b43ee0c58d5bfe5f3d3f10d12d38b5845
701980910117b797b5f7ca5a61a7262ccbc3ee7b
/core/src/main/java/com/matthewmitchell/peercoinj/protocols/payments/package-info.java
dcd505349f807a5e4ef8c9c00a364a191e9ac69d
[ "Apache-2.0" ]
permissive
MatthewLM/peercoinj
c76f356e8cfa5b0cdc133a3bc91df867468e9c28
c385a2347dfad73fa8959362c115970b62e0e8de
refs/heads/master
2023-04-06T19:27:20.008332
2023-03-20T16:07:05
2023-03-20T16:07:05
22,102,786
11
30
null
2015-07-27T16:57:10
2014-07-22T12:19:41
Java
UTF-8
Java
false
false
207
java
/** * The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses * and authentication. */ package com.matthewmitchell.peercoinj.protocols.payments;
[ "matthewmitchell@thelibertyportal.com" ]
matthewmitchell@thelibertyportal.com
13258c8ee43572c3bc72c166dbb8b3402c235b61
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_47f59ae611bbbafdf611698feb6f91db9d332eb3/LuperLoginActivity/14_47f59ae611bbbafdf611698feb6f91db9d332eb3_LuperLoginActivity_t.java
37abd36558ff0f9f3e14efb86e5a2a397c3f23a8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,307
java
package com.teamluper.luper; import android.content.Intent; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.view.View; import android.view.WindowManager; import android.widget.EditText; import android.widget.TextView; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockFragmentActivity; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuItem; import com.facebook.Response; import com.facebook.Session; import com.facebook.SessionState; import com.facebook.UiLifecycleHelper; import com.facebook.Request; import com.facebook.model.GraphUser; import com.googlecode.androidannotations.annotations.Background; import com.googlecode.androidannotations.annotations.EActivity; import com.googlecode.androidannotations.annotations.UiThread; import com.googlecode.androidannotations.annotations.rest.RestService; import com.teamluper.luper.rest.LuperRestClient; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * Activity which displays a login screen to the user, offering registration as * well. */ @EActivity public class LuperLoginActivity extends SherlockFragmentActivity { ViewPager mViewPager; TabsAdapter mTabsAdapter; // Facebook Login Session private Session session; private String accessToken; protected void loadActiveSession() { session = Session.getActiveSession(); accessToken = session.getAccessToken(); } @RestService LuperRestClient restClient; private SQLiteDataSource dataSource; @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,resultCode,data); Session.getActiveSession().onActivityResult(this,requestCode,resultCode,data); } // How Luper should behave when user logs into or out of facebook protected void onSessionStateChange(Session sesh, SessionState seshState, Exception e) { if (seshState.isOpened()) { /** usr logged in **/ // Create new request to facebook API Request.executeMeRequestAsync(session, new Request.GraphUserCallback() { // callback after Graph API response with user object @Override public void onCompleted(GraphUser user, Response response) { String email = ""; //if (user != null) { // TextView welcome = (TextView) findViewById(R.id.welcome); // welcome.setText("Hello " + user.getName() + "!"); // } } }); } else if (seshState.isClosed()) { // usr logged out } else { // probably shouldn't be here } } private Session.StatusCallback callback = new Session.StatusCallback() { @Override public void call(Session sesh, SessionState seshState, Exception e) { onSessionStateChange(sesh,seshState,e); } }; private UiLifecycleHelper uiHelper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); // enable tabs in the ActionBar final ActionBar bar = getSupportActionBar(); bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); bar.setTitle(R.string.login_title); bar.setDisplayHomeAsUpEnabled(false); // set up the ViewPager and Tabs mViewPager = new ViewPager(this); mViewPager.setId(R.id.tabcontentpager); setContentView(mViewPager); mTabsAdapter = new TabsAdapter(this, mViewPager); mTabsAdapter.addTab(bar.newTab().setText(""+"Log In"), TabLoginFragment_.class, null); mTabsAdapter.addTab(bar.newTab().setText(""+"Register"), TabRegisterFragment_.class, null); // connect to the database dataSource = new SQLiteDataSource(this); dataSource.open(); // UI handler - Facebook login uiHelper = new UiLifecycleHelper(this,callback); uiHelper.onCreate(savedInstanceState); } @Override protected void onStop() { if(dataSource.isOpen()) dataSource.close(); super.onStop(); } @Override public void onDestroy() { super.onDestroy(); uiHelper.onDestroy(); } @Override protected void onResume() { if(!dataSource.isOpen()) dataSource.open(); session = Session.getActiveSession(); super.onResume(); uiHelper.onResume(); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); uiHelper.onSaveInstanceState(outState); } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getSupportMenuInflater().inflate(R.menu.luper_login, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { if(item.getItemId() == R.id.action_forgot_password) { Intent intent = new Intent(this, LuperForgotPasswordActivity_.class); startActivity(intent); } return true; } public SQLiteDataSource getDataSource() { return dataSource; } @Background public void skipLogin(View v) { User dummyUser = dataSource.getUserById(1); dataSource.setActiveUser(dummyUser); startMainActivity(); } @UiThread public void startMainActivity() { Intent intent = new Intent(this, LuperMainActivity_.class); startActivity(intent); } @UiThread public void prefillLoginForm(String email) { getSupportActionBar().setSelectedNavigationItem(0); // switch to login tab EditText emailField = (EditText) findViewById(R.id.login_email); EditText passwordField = (EditText) findViewById(R.id.login_password); emailField.setText(email); passwordField.setText(""); passwordField.requestFocus(); } public static String sha1(String input) throws NoSuchAlgorithmException { MessageDigest mDigest = MessageDigest.getInstance("SHA1"); byte[] result = mDigest.digest(input.getBytes()); StringBuffer sb = new StringBuffer(); for (int i = 0; i < result.length; i++) { sb.append(Integer.toString((result[i] & 0xff) + 0x100, 16).substring(1)); } return sb.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2330f040235e5dd11d1730b5ed9e2bafd7129b6b
b2f517a674528795273648a4b3f5211f1df60eaa
/summer-db/src/main/java/cn/cerc/db/mysql/MysqlConnection.java
5b93a102e207cae42a3db91a22e0434449bf5be5
[]
permissive
15218057878/summer-server-1
07c15d7fba28af97ce68a7f4d78d0f0284fce860
fc1e8d410843821df550591ec2df9d04b5cf2fed
refs/heads/main
2023-04-06T19:15:05.827271
2021-03-11T01:18:59
2021-03-11T01:18:59
355,827,435
0
0
Apache-2.0
2021-04-08T08:41:33
2021-04-08T08:41:33
null
UTF-8
Java
false
false
1,631
java
package cn.cerc.db.mysql; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @Component @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class MysqlConnection extends SqlConnection { // IHandleไธญ่ฏ†ๅˆซ็  public static final String sessionId = "sqlSession"; // Propertiesไธญ่ฏ†ๅˆซ็  public static final String rds_site = "rds.site"; public static final String rds_database = "rds.database"; public static final String rds_username = "rds.username"; public static final String rds_password = "rds.password"; public static String dataSource = "dataSource"; private String database; @Override public String getClientId() { return sessionId; } @Override protected String getConnectUrl() { String host = config.getProperty(MysqlConnection.rds_site, "127.0.0.1:3306"); database = config.getProperty(MysqlConnection.rds_database, "appdb"); user = config.getProperty(MysqlConnection.rds_username, "appdb_user"); pwd = config.getProperty(MysqlConnection.rds_password, "appdb_password"); if (host == null || user == null || pwd == null || database == null) { throw new RuntimeException("mysql connection error"); } return String.format("jdbc:mysql://%s/%s?useSSL=false&autoReconnect=true&autoCommit=false&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai", host, database); } public String getDatabase() { return this.database; } }
[ "l1091462907@gmail.com" ]
l1091462907@gmail.com
814e80f602738271f73b60ce35858ea429dd7c46
a773a12e019864b5f0e1fe01ee6f6b47d8bac0c4
/src/main/java/com/guilin/java/designpattern/strategy/s1/ConcreteStrategy1.java
aff713e8b72bbadff7da5dc822aaf713c2245a36
[]
no_license
dongguilin/JavaTest
cba4bf2630065b1b8f1b682c3698fc7eb8fcdad6
71e4d1afd6e5fc6d837ef538d8ad00148297b729
refs/heads/master
2022-05-02T10:18:09.556459
2022-03-14T07:44:24
2022-03-14T07:44:24
40,651,915
3
1
null
2022-03-14T08:11:05
2015-08-13T10:00:57
Java
UTF-8
Java
false
false
283
java
package com.guilin.java.designpattern.strategy.s1; /** * Created by T57 on 2016/9/11 0011. * ๅ…ทไฝ“็ญ–็•ฅ่ง’่‰ฒ */ public class ConcreteStrategy1 implements Strategy { @Override public void doString() { System.out.println("ๅ…ทไฝ“็ญ–็•ฅ1็š„่ฟ็ฎ—ๆณ•ๅˆ™"); } }
[ "guilin1_happy@163.com" ]
guilin1_happy@163.com
676dcac014e1a0021dc2216a8a0b62126893f963
723db10ca7a0b99683c2ff1e00b0775f8f0c3daa
/validator-web/src/main/java/no/difi/vefa/validator/controller/HomeController.java
f611434a4ebb374e5cfc693afb6c1bbcdc5f50cd
[]
no_license
tengvig/vefa-validator
1a296aa54375224998c0f935cbea34870ef9e20f
7ba75c6ca7482d2e21d26b2add7fe9627e4b18c8
refs/heads/master
2020-12-25T20:31:20.393631
2016-01-04T14:56:42
2016-01-04T14:56:42
49,002,037
0
0
null
2016-01-04T14:29:27
2016-01-04T14:29:26
null
UTF-8
Java
false
false
1,545
java
package no.difi.vefa.validator.controller; import no.difi.vefa.validator.service.PiwikService; import no.difi.vefa.validator.service.ValidatorService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.zip.GZIPInputStream; @Controller @RequestMapping("/") public class HomeController { @Autowired private ValidatorService validatorService; @Autowired private PiwikService piwikService; @RequestMapping public String view(ModelMap modelMap) { modelMap.put("packages", validatorService.getPackages()); piwikService.update(modelMap); return "home"; } @RequestMapping(method = RequestMethod.POST) public String upload(@RequestParam("file") MultipartFile file) throws Exception { InputStream inputStream = new ByteArrayInputStream(file.getBytes()); if ("application/x-gzip".equals(file.getContentType())) inputStream = new GZIPInputStream(inputStream); String identifier = validatorService.validateWorkspace(inputStream); return "redirect:/v/" + identifier; } }
[ "erlend@klakegg.net" ]
erlend@klakegg.net
a16a7226c13b35842b050ba8e622a8c35dcb222a
5a474f4bb0bf3981d3b282e6c028ef6b2472f170
/node-plugin/node-plugin-rcra54-outbound/src/generated/com/windsor/node/plugin/rcra54/domain/generated/GISFacilitySubmissionDataType.java
fb9625711c98b21bf7f6ec6919ad6efd82d2e3c4
[]
no_license
jhulick/opennode2-java
deaf72b954516590a38e33953e2025759c33e6ae
37618871d4124c510887acef1cd1e17228d91ab2
refs/heads/master
2021-07-12T04:48:22.245571
2017-10-11T14:20:48
2017-10-11T14:20:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,148
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.06.15 at 06:46:14 PM EDT // package com.windsor.node.plugin.rcra54.domain.generated; import java.util.ArrayList; import java.util.List; import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import org.jvnet.jaxb2_commons.lang.Equals; import org.jvnet.jaxb2_commons.lang.EqualsStrategy; import org.jvnet.jaxb2_commons.lang.HashCode; import org.jvnet.jaxb2_commons.lang.HashCodeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy; import org.jvnet.jaxb2_commons.locator.ObjectLocator; import org.jvnet.jaxb2_commons.locator.util.LocatorUtils; /** * Facility GIS submission. * * <p>Java class for GISFacilitySubmissionDataType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="GISFacilitySubmissionDataType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.exchangenetwork.net/schema/RCRA/5}HandlerID"/> * &lt;element ref="{http://www.exchangenetwork.net/schema/RCRA/5}GeographicInformation" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "GISFacilitySubmissionDataType", propOrder = { "handlerID", "geographicInformation" }) @Entity(name = "GISFacilitySubmissionDataType") @Table(name = "RCRA_GISFACSUB") @Inheritance(strategy = InheritanceType.JOINED) public class GISFacilitySubmissionDataType implements Equals, HashCode { @XmlElement(name = "HandlerID", required = true) protected String handlerID; @XmlElement(name = "GeographicInformation") protected List<GeographicInformationDataType> geographicInformation; @XmlAttribute(name = "Id") protected Long id; /** * Gets the value of the handlerID property. * * @return * possible object is * {@link String } * */ @Basic @Column(name = "HANDLERID", length = 12) public String getHandlerID() { return handlerID; } /** * Sets the value of the handlerID property. * * @param value * allowed object is * {@link String } * */ public void setHandlerID(String value) { this.handlerID = value; } /** * Gets the value of the geographicInformation property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the geographicInformation property. * * <p> * For example, to add a new item, do as follows: * <pre> * getGeographicInformation().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link GeographicInformationDataType } * * */ @OneToMany(targetEntity = GeographicInformationDataType.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "GISFACSUBID") public List<GeographicInformationDataType> getGeographicInformation() { if (geographicInformation == null) { geographicInformation = new ArrayList<GeographicInformationDataType>(); } return this.geographicInformation; } /** * * */ public void setGeographicInformation(List<GeographicInformationDataType> geographicInformation) { this.geographicInformation = geographicInformation; } /** * Gets the value of the id property. * * @return * possible object is * {@link Long } * */ @Id @Column(name = "ID") @GeneratedValue(generator = "ColSequence", strategy = GenerationType.AUTO) @SequenceGenerator(name = "ColSequence", sequenceName = "COLUMN_ID_SEQUENCE", allocationSize = 1) public Long getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link Long } * */ public void setId(Long value) { this.id = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof GISFacilitySubmissionDataType)) { return false; } if (this == object) { return true; } final GISFacilitySubmissionDataType that = ((GISFacilitySubmissionDataType) object); { String lhsHandlerID; lhsHandlerID = this.getHandlerID(); String rhsHandlerID; rhsHandlerID = that.getHandlerID(); if (!strategy.equals(LocatorUtils.property(thisLocator, "handlerID", lhsHandlerID), LocatorUtils.property(thatLocator, "handlerID", rhsHandlerID), lhsHandlerID, rhsHandlerID)) { return false; } } { List<GeographicInformationDataType> lhsGeographicInformation; lhsGeographicInformation = (((this.geographicInformation!= null)&&(!this.geographicInformation.isEmpty()))?this.getGeographicInformation():null); List<GeographicInformationDataType> rhsGeographicInformation; rhsGeographicInformation = (((that.geographicInformation!= null)&&(!that.geographicInformation.isEmpty()))?that.getGeographicInformation():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "geographicInformation", lhsGeographicInformation), LocatorUtils.property(thatLocator, "geographicInformation", rhsGeographicInformation), lhsGeographicInformation, rhsGeographicInformation)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theHandlerID; theHandlerID = this.getHandlerID(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "handlerID", theHandlerID), currentHashCode, theHandlerID); } { List<GeographicInformationDataType> theGeographicInformation; theGeographicInformation = (((this.geographicInformation!= null)&&(!this.geographicInformation.isEmpty()))?this.getGeographicInformation():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "geographicInformation", theGeographicInformation), currentHashCode, theGeographicInformation); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } }
[ "twitch@nervestaple.com" ]
twitch@nervestaple.com
f0ae8f6da01c71c5df448db2c65689b09c69c375
6045518db77c6104b4f081381f61c26e0d19d5db
/datasets/file_version_per_commit_backup/apache-jmeter/c08d3221ad959c7d610452928a7e233c77e57ca2.java
ca21e3c0136e2f05de1559471b5782a7abdaf627
[]
no_license
edisutoyo/msr16_td_removal
6e039da7fed166b81ede9b33dcc26ca49ba9259c
41b07293c134496ba1072837e1411e05ed43eb75
refs/heads/master
2023-03-22T21:40:42.993910
2017-09-22T09:19:51
2017-09-22T09:19:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,970
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.jmeter.protocol.jms.client; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * * ClientPool holds the client instances in an ArrayList. The main purpose of * this is to make it easier to clean up all the instances at the end of a test. * If we didn't do this, threads might become zombie. * * N.B. This class needs to be fully synchronized as it is called from sample threads * and the thread that runs testEnded() methods. */ public class ClientPool { private static final ArrayList<Object> clients = new ArrayList<Object>(); private static final Map<Object, Object> client_map = new HashMap<Object, Object>(); /** * Add a ReceiveClient to the ClientPool. This is so that we can make sure * to close all clients and make sure all threads are destroyed. * * @param client */ public static synchronized void addClient(ReceiveSubscriber client) { clients.add(client); } /** * Add a OnMessageClient to the ClientPool. This is so that we can make sure * to close all clients and make sure all threads are destroyed. * * @param client */ public static synchronized void addClient(OnMessageSubscriber client) { clients.add(client); } /** * Add a Publisher to the ClientPool. This is so that we can make sure to * close all clients and make sure all threads are destroyed. * * @param client */ public static synchronized void addClient(Publisher client) { clients.add(client); } /** * Clear all the clients created by either Publish or Subscribe sampler. We * need to do this to make sure all the threads creatd during the test are * destroyed and cleaned up. In some cases, the client provided by the * manufacturer of the JMS server may have bugs and some threads may become * zombie. In those cases, it is not the responsibility of JMeter for those * bugs. */ public static synchronized void clearClient() { Iterator<Object> itr = clients.iterator(); while (itr.hasNext()) { Object client = itr.next(); if (client instanceof ReceiveSubscriber) { ReceiveSubscriber sub = (ReceiveSubscriber) client; sub.close(); sub = null; } else if (client instanceof Publisher) { Publisher pub = (Publisher) client; pub.close(); pub = null; } else if (client instanceof OnMessageSubscriber) { OnMessageSubscriber sub = (OnMessageSubscriber) client; sub.close(); sub = null; } } clients.clear(); client_map.clear(); } public static synchronized void put(Object key, OnMessageSubscriber client) { client_map.put(key, client); } public static synchronized void put(Object key, Publisher client) { client_map.put(key, client); } public static synchronized Object get(Object key) { return client_map.get(key); } }
[ "everton.maldonado@gmail.com" ]
everton.maldonado@gmail.com
1270d88f841fbd431219ea828c89720bc9df50af
bead5c9388e0d70156a08dfe86d48f52cb245502
/MyNotes/better_write/Java_performance_tuning/A5/test/LinkedListTest.java
ea2790e1ecdd15009e360a270c6eae66a92eed3a
[]
no_license
LinZiYU1996/Learning-Java
bd96e2af798c09bc52a56bf21e13f5763bb7a63d
a0d9f538c9d373c3a93ccd890006ce0e5e1f2d5d
refs/heads/master
2020-11-28T22:22:56.135760
2020-05-03T01:24:57
2020-05-03T01:24:57
229,930,586
0
0
null
null
null
null
UTF-8
Java
false
false
4,800
java
package better_write.Java_performance_tuning.A5.test; import java.util.Iterator; import java.util.LinkedList; /** * \* Created with IntelliJ IDEA. * \* User: LinZiYu * \* Date: 2020/3/25 * \* Time: 11:19 * \* Description: * \ */ public class LinkedListTest { /** * * @param DataNum */ public static void addFromHeaderTest(int DataNum) { LinkedList<String> list=new LinkedList<String>(); int i=0; long timeStart=System.currentTimeMillis(); while(i<DataNum) { list.addFirst(i+"aaavvv"); i++; } long timeEnd=System.currentTimeMillis(); System.out.println("LinkedListไปŽ้›†ๅˆๅคด้ƒจไฝ็ฝฎๆ–ฐๅขžๅ…ƒ็ด ่Šฑ่ดน็š„ๆ—ถ้—ด"+(timeEnd-timeStart)); } /** * * @param DataNum */ public static void addFromMidTest(int DataNum) { LinkedList<String> list=new LinkedList<String>(); int i=0; long timeStart=System.currentTimeMillis(); while(i<DataNum) { int temp = list.size(); list.add(temp/2, i+"aaavvv"); i++; } long timeEnd=System.currentTimeMillis(); System.out.println("LinkedListไปŽ้›†ๅˆไธญ้—ดไฝ็ฝฎๆ–ฐๅขžๅ…ƒ็ด ่Šฑ่ดน็š„ๆ—ถ้—ด"+(timeEnd-timeStart)); } /** * * @param DataNum */ public static void addFromTailTest(int DataNum) { LinkedList<String> list=new LinkedList<String>(); int i=0; long timeStart=System.currentTimeMillis(); while(i<DataNum) { list.add(i+"aaavvv"); i++; } long timeEnd=System.currentTimeMillis(); System.out.println("LinkedListไปŽ้›†ๅˆๅฐพ้ƒจไฝ็ฝฎๆ–ฐๅขžๅ…ƒ็ด ่Šฑ่ดน็š„ๆ—ถ้—ด"+(timeEnd-timeStart)); } /** * * @param DataNum */ public static void deleteFromHeaderTest(int DataNum) { LinkedList<String> list=new LinkedList<String>(); int i=0; while(i<DataNum) { list.add(i+"aaavvv"); i++; } long timeStart=System.currentTimeMillis(); i=0; while(i<DataNum) { list.removeFirst(); i++; } long timeEnd=System.currentTimeMillis(); System.out.println("LinkedListไปŽ้›†ๅˆๅคด้ƒจไฝ็ฝฎๅˆ ้™คๅ…ƒ็ด ่Šฑ่ดน็š„ๆ—ถ้—ด"+(timeEnd-timeStart)); } /** * * @param DataNum */ public static void deleteFromMidTest(int DataNum) { LinkedList<String> list=new LinkedList<String>(); int i=0; while(i<DataNum) { list.add(i+"aaavvv"); i++; } long timeStart=System.currentTimeMillis(); i=0; while(i<DataNum) { int temp = list.size(); list.remove(temp/2); i++; } long timeEnd=System.currentTimeMillis(); System.out.println("LinkedListไปŽ้›†ๅˆไธญ้—ดไฝ็ฝฎๅˆ ้™คๅ…ƒ็ด ่Šฑ่ดน็š„ๆ—ถ้—ด"+(timeEnd-timeStart)); } /** * * @param DataNum */ public static void deleteFromTailTest(int DataNum) { LinkedList<String> list=new LinkedList<String>(); int i=0; while(i<DataNum) { list.add(i+"aaavvv"); i++; } long timeStart=System.currentTimeMillis(); i=0; while(i<DataNum) { list.removeLast(); i++; } long timeEnd=System.currentTimeMillis(); System.out.println("LinkedListไปŽ้›†ๅˆๅฐพ้ƒจไฝ็ฝฎๅˆ ้™คๅ…ƒ็ด ่Šฑ่ดน็š„ๆ—ถ้—ด"+(timeEnd-timeStart)); } /** * * @param DataNum */ public static void getByForTest(int DataNum) { LinkedList<String> list = new LinkedList<String>(); int i = 0; while (i < DataNum) { list.add(i + "aaavvv"); i++; } long timeStart = System.currentTimeMillis(); for (int j=0; j < DataNum ; j++) { list.get(j); } long timeEnd = System.currentTimeMillis(); System.out.println("LinkedList for(;;)ๅพช็Žฏ่Šฑ่ดน็š„ๆ—ถ้—ด" + (timeEnd - timeStart)); } /** * * @param DataNum */ public static void getByIteratorTest(int DataNum) { LinkedList<String> list = new LinkedList<String>(); int i = 0; while (i < DataNum) { list.add(i + "aaavvv"); i++; } long timeStart = System.currentTimeMillis(); for (Iterator<String> it = list.iterator(); it.hasNext();) { it.next(); } long timeEnd = System.currentTimeMillis(); System.out.println("LinkedList ่ฟญไปฃๅ™จ่ฟญไปฃๅพช็Žฏ่Šฑ่ดน็š„ๆ—ถ้—ด" + (timeEnd - timeStart)); } }
[ "2669093302@qq.com" ]
2669093302@qq.com
51c2fa35eeee5836d6419c5e22c3180a10c8edfe
69bb76650dd536ad900bc59d349f62984f334051
/mybatis-genertor/src/main/java/com/issac/ssm/mapper/UsersMapper.java
e0df12c7a7fb3bb6dfb39d45c30029d421dfbc59
[]
no_license
IssacYoung2013/pratice
932fbadc060c8a9327655393b8802fe148dbd4ff
9636d070a0b8dc8a72d8f949925f189ae241db14
refs/heads/master
2022-12-23T02:58:54.986926
2019-08-01T00:37:41
2019-08-01T00:37:41
191,263,461
0
0
null
2022-12-16T04:34:02
2019-06-11T00:15:38
Java
UTF-8
Java
false
false
620
java
package com.issac.mapper; import com.issac.mvc.po.Users; import com.issac.mvc.po.UsersExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface UsersMapper { int countByExample(UsersExample example); int deleteByExample(UsersExample example); int insert(Users record); int insertSelective(Users record); List<Users> selectByExample(UsersExample example); int updateByExampleSelective(@Param("record") Users record, @Param("example") UsersExample example); int updateByExample(@Param("record") Users record, @Param("example") UsersExample example); }
[ "issacyoung@msn.cn" ]
issacyoung@msn.cn
a8f08c9e4aaf246df92fc1451d6aaee918c78275
e6356bebcc294ef7c8af2f828ebdbcf34fb1cf95
/3 survey-handover_mhub@a7072cb1c04/api/src/main/java/com/mainlevel/monitoring/survey/api/exception/EvaluationQueryNotFoundException.java
b4f7678c4a1a370e2a2e28d4f12c417ad7e837eb
[]
no_license
kondwa/nape-backend
e7a0a9df042a8d2fe3c24ff65e7eb58ae276bb04
3d877a05707177081a0fb14ae0728363261cb74b
refs/heads/master
2023-02-11T02:49:44.226746
2021-01-07T11:11:32
2021-01-07T11:11:32
327,583,710
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package com.mainlevel.monitoring.survey.api.exception; import java.text.MessageFormat; /** * Raised when the evaluation query could not be found. */ @SuppressWarnings("serial") public class EvaluationQueryNotFoundException extends RuntimeException { private static final String MESSAGE = "Cypher query with name [{0}] not found."; private String query; /** * Constructor for EvaluationQueryNotFoundException. * * @param query name of the missing query */ public EvaluationQueryNotFoundException(String query) { super(MessageFormat.format(MESSAGE, query)); this.query = query; } /** * Gets the query for EvaluationQueryNotFoundException. * * @return query the query name */ public String getQuery() { return query; } }
[ "kondwa@gmail.com" ]
kondwa@gmail.com
c774d5f6c530adb34578053ae415eadba9507180
7cee584d730d6acc88ef57eb75de9461830dbaf1
/techtribes-updater/src/je/techtribes/updater/Main.java
e0a50bada744bbc452bfbfb620927a88eeba37fa
[ "Apache-2.0" ]
permissive
ajambor/techtribesje
9298c56746bb8f7113d58caa72e3c04e8ebba59d
82ff86834a06f728be35759e6aa7612ed59699c2
refs/heads/master
2020-09-15T09:21:47.415708
2013-07-04T20:56:40
2013-07-04T20:56:40
11,199,943
1
1
null
null
null
null
UTF-8
Java
false
false
5,975
java
package je.techtribes.updater; import je.techtribes.component.contentsource.ContentSourceComponent; import je.techtribes.component.log.LoggingComponent; import je.techtribes.component.newsfeedentry.NewsFeedEntryComponent; import je.techtribes.component.scheduledcontentupdater.ScheduledContentUpdater; import je.techtribes.component.search.SearchComponent; import je.techtribes.component.tweet.TweetComponent; import je.techtribes.domain.NewsFeedEntry; import je.techtribes.domain.Tweet; import je.techtribes.util.DateUtils; import je.techtribes.util.PageSize; import je.techtribes.util.Version; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.List; import java.util.TimeZone; /** * Standalone application that updates tweets, news, badges, etc. */ public class Main { public static void main(String[] args) { TimeZone.setDefault(TimeZone.getTimeZone(DateUtils.UTC_TIME_ZONE)); ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml"); LoggingComponent loggingComponent = (LoggingComponent)applicationContext.getBean("loggingComponent"); loggingComponent.info(Main.class, "techtribes.je updater, version " + Version.getBuildNumber() + " built on " + Version.getBuildTimestamp()); if (args.length > 0 && "rebuildsearch".equals(args[0])) { ContentSourceComponent contentSourceComponent = (ContentSourceComponent)applicationContext.getBean("contentSourceComponent"); contentSourceComponent.refreshContentSources(); rebuildSearchIndexes(applicationContext); System.exit(0); } else if (args.length > 0 && "migrate".equals(args[0])) { NewsFeedEntryComponent newsFeedEntryComponent = (NewsFeedEntryComponent)applicationContext.getBean("newsFeedEntryComponent"); TweetComponent tweetComponent = (TweetComponent)applicationContext.getBean("tweetComponent"); ContentSourceComponent contentSourceComponent = (ContentSourceComponent)applicationContext.getBean("contentSourceComponent"); contentSourceComponent.refreshContentSources(); long numberOfNewsFeedEntries = newsFeedEntryComponent.getNumberOfNewsFeedEntries(); loggingComponent.info(Main.class, "Number of NFEs: " + numberOfNewsFeedEntries); int numberOfPages = PageSize.calculateNumberOfPages(numberOfNewsFeedEntries, PageSize.RECENT_NEWS_FEED_ENTRIES); for (int page = 1; page <= numberOfPages; page++) { loggingComponent.info(Main.class, "Migrating NFEs; page " + page + " of " + numberOfPages); List<NewsFeedEntry> nfes = newsFeedEntryComponent.getRecentNewsFeedEntries(page, PageSize.RECENT_NEWS_FEED_ENTRIES); newsFeedEntryComponent.storeNewsFeedEntries(nfes); } long numberOfTweets = tweetComponent.getNumberOfTweets(); loggingComponent.info(Main.class, "Number of tweets: " + numberOfTweets); numberOfPages = PageSize.calculateNumberOfPages(numberOfTweets, PageSize.RECENT_TWEETS); for (int page = 1; page <= numberOfPages; page++) { loggingComponent.info(Main.class, "Migrating tweets; page " + page + " of " + numberOfPages); List<Tweet> tweets = tweetComponent.getRecentTweets(page, PageSize.RECENT_TWEETS); tweetComponent.storeTweets(tweets); } System.exit(0); } ScheduledContentUpdater scu = (ScheduledContentUpdater)applicationContext.getBean("contentUpdater"); scu.start(); } private static void rebuildSearchIndexes(ApplicationContext applicationContext) { LoggingComponent loggingComponent = (LoggingComponent)applicationContext.getBean("loggingComponent"); loggingComponent.info(Main.class, "Starting to rebuild search indexes"); SearchComponent searchComponent = (SearchComponent)applicationContext.getBean("searchComponent"); NewsFeedEntryComponent newsFeedEntryComponent = (NewsFeedEntryComponent)applicationContext.getBean("newsFeedEntryComponent"); TweetComponent tweetComponent = (TweetComponent)applicationContext.getBean("tweetComponent"); searchComponent.clearSearchIndex(); // add add everything that the news feed service knows about long numberOfNewsFeedEntries = newsFeedEntryComponent.getNumberOfNewsFeedEntries(); loggingComponent.info(Main.class, "Number of news feed entries: " + numberOfNewsFeedEntries); int numberOfPages = PageSize.calculateNumberOfPages(numberOfNewsFeedEntries, PageSize.RECENT_NEWS_FEED_ENTRIES); for (int page = 1; page <= numberOfPages; page++) { loggingComponent.info(Main.class, "Indexing news feed entries; page " + page + " of " + numberOfPages); List<NewsFeedEntry> newsFeedEntries = newsFeedEntryComponent.getRecentNewsFeedEntries(page, PageSize.RECENT_NEWS_FEED_ENTRIES); for (NewsFeedEntry newsFeedEntry : newsFeedEntries) { searchComponent.add(newsFeedEntry); } } // add add everything that the tweet service knows about long numberOfTweets = tweetComponent.getNumberOfTweets(); loggingComponent.info(Main.class, "Number of tweets: " + numberOfTweets); numberOfPages = PageSize.calculateNumberOfPages(numberOfTweets, PageSize.RECENT_TWEETS); for (int page = 1; page <= numberOfPages; page++) { loggingComponent.info(Main.class, "Indexing tweets; page " + page + " of " + numberOfPages); List<Tweet> tweets = tweetComponent.getRecentTweets(page, PageSize.RECENT_TWEETS); for (Tweet tweet : tweets) { searchComponent.add(tweet); } } loggingComponent.info(Main.class, "Finished rebuilding search indexes"); } }
[ "simon.brown@codingthearchitecture.com" ]
simon.brown@codingthearchitecture.com
e62ad3bcff9b84591b4f3cc9107f3545121071cd
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/com/instabug/library/internal/storage/cache/Cache.java
081c791940c834dae2431e93ce839490a8a3c1bc
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,985
java
package com.instabug.library.internal.storage.cache; import java.util.ArrayList; import java.util.List; public abstract class Cache<K, V> { private int appVersion; private String id; private final List<CacheChangedListener<V>> listeners; public abstract V delete(K k); public abstract V get(K k); public abstract List<V> getValues(); public abstract void invalidate(); public abstract V put(K k, V v); public abstract long size(); public Cache(String str) { this(str, 1); } protected Cache(String str, int i) { this.appVersion = -1; this.id = str; this.appVersion = i; this.listeners = new ArrayList(); } public void notifyItemRemoved(V v) { for (CacheChangedListener onCachedItemRemoved : this.listeners) { onCachedItemRemoved.onCachedItemRemoved(v); } } public void notifyItemAdded(V v) { for (CacheChangedListener onCachedItemAdded : this.listeners) { onCachedItemAdded.onCachedItemAdded(v); } } public void notifyItemUpdated(V v, V v2) { for (CacheChangedListener onCachedItemUpdated : this.listeners) { onCachedItemUpdated.onCachedItemUpdated(v, v2); } } public void notifyCacheInvalidated() { for (CacheChangedListener onCacheInvalidated : this.listeners) { onCacheInvalidated.onCacheInvalidated(); } } public String getId() { return this.id; } public int getAppVersion() { return this.appVersion; } public boolean addOnCacheChangedListener(CacheChangedListener<V> cacheChangedListener) { return (this.listeners.contains(cacheChangedListener) || this.listeners.add(cacheChangedListener) == null) ? null : true; } public boolean removeOnCacheChangedListener(CacheChangedListener<V> cacheChangedListener) { return this.listeners.remove(cacheChangedListener); } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
670bc8078c97b188b63d1f3dc75e3e731234f902
94d91903819947c4fb2598af40cf53344304dbac
/wssmall_1.2.0/orderctn_server/src/main/java/com/ztesoft/net/mall/outter/inf/exe/ThreadExecuter.java
6884687d9208b80d22627dcd99d088dbc11d0fe4
[]
no_license
lichao20000/Union
28175725ad19733aa92134ccbfb8c30570f4795a
a298de70065c5193c98982dacc7c2b3e2d4b5d86
refs/heads/master
2023-03-07T16:24:58.933965
2021-02-22T12:34:05
2021-02-22T12:34:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,642
java
package com.ztesoft.net.mall.outter.inf.exe; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import com.ztesoft.net.framework.context.spring.SpringContextHolder; import com.ztesoft.net.mall.outter.inf.iservice.IOrderSyncService; import com.ztesoft.net.mall.outter.inf.iservice.IOutterECSTmplCtnManager; import com.ztesoft.net.mall.outter.inf.model.OutterTmpl; public class ThreadExecuter { //newFixedThreadPool //ๅˆ›ๅปบๅ›บๅฎšๅคงๅฐ็š„็บฟ็จ‹ๆฑ ใ€‚ๆฏๆฌกๆไบคไธ€ไธชไปปๅŠกๅฐฑๅˆ›ๅปบไธ€ไธช็บฟ็จ‹๏ผŒ็›ดๅˆฐ็บฟ็จ‹่พพๅˆฐ็บฟ็จ‹ๆฑ ็š„ๆœ€ๅคงๅคงๅฐใ€‚็บฟ็จ‹ๆฑ ็š„ๅคงๅฐไธ€ๆ—ฆ่พพๅˆฐๆœ€ๅคงๅ€ผๅฐฑไผšไฟๆŒไธๅ˜๏ผŒๅฆ‚ๆžœๆŸไธช็บฟ็จ‹ๅ› ไธบๆ‰ง่กŒๅผ‚ๅธธ่€Œ็ป“ๆŸ๏ผŒ้‚ฃไนˆ็บฟ็จ‹ๆฑ ไผš่กฅๅ……ไธ€ไธชๆ–ฐ็บฟ็จ‹ใ€‚ //newCachedThreadPool //ๅˆ›ๅปบไธ€ไธชๅฏ็ผ“ๅญ˜็š„็บฟ็จ‹ๆฑ ใ€‚ๅฆ‚ๆžœ็บฟ็จ‹ๆฑ ็š„ๅคงๅฐ่ถ…่ฟ‡ไบ†ๅค„็†ไปปๅŠกๆ‰€้œ€่ฆ็š„็บฟ็จ‹๏ผŒ //้‚ฃไนˆๅฐฑไผšๅ›žๆ”ถ้ƒจๅˆ†็ฉบ้—ฒ๏ผˆ60็ง’ไธๆ‰ง่กŒไปปๅŠก๏ผ‰็š„็บฟ็จ‹๏ผŒๅฝ“ไปปๅŠกๆ•ฐๅขžๅŠ ๆ—ถ๏ผŒๆญค็บฟ็จ‹ๆฑ ๅˆๅฏไปฅๆ™บ่ƒฝ็š„ๆทปๅŠ ๆ–ฐ็บฟ็จ‹ๆฅๅค„็†ไปปๅŠกใ€‚ๆญค็บฟ็จ‹ๆฑ ไธไผšๅฏน็บฟ็จ‹ๆฑ ๅคงๅฐๅš้™ๅˆถ๏ผŒ็บฟ็จ‹ๆฑ ๅคงๅฐๅฎŒๅ…จไพ่ต–ไบŽๆ“ไฝœ็ณป็ปŸ๏ผˆๆˆ–่€…่ฏดJVM๏ผ‰่ƒฝๅคŸๅˆ›ๅปบ็š„ๆœ€ๅคง็บฟ็จ‹ๅคงๅฐใ€‚ //private ExecutorService orderExecutor = Executors.newCachedThreadPool(); /** * ๅˆ›ๅปบๅ›บๅฎšๅคงๅฐไธบ5็š„็บฟ็จ‹ๆฑ  */ private static final ExecutorService orderExecutor = Executors.newFixedThreadPool(5); public static void executeOrderTask(OrderSyncThread orderSync){ orderExecutor.execute(orderSync); } public static class OrderSyncThread implements Runnable { private OutterTmpl tmpl; protected IOutterECSTmplCtnManager outterECSTmplCtnManager; public OrderSyncThread(OutterTmpl tmpl) { this.tmpl = tmpl; } @Override public void run() { try{ outterECSTmplCtnManager = SpringContextHolder.getBean("outterECSTmplCtnManager"); IOrderSyncService service = SpringContextHolder.getBean("outerOrderSyncCtn"); service.perform(tmpl); if(-1!=tmpl.getExecute_min().intValue()) outterECSTmplCtnManager.updateRunStatus("00A", tmpl.getTmpl_id()); }catch(Exception ex){ if(-1==tmpl.getExecute_min().intValue()){ outterECSTmplCtnManager.updateRunStatus("00A", "ๅŒๆญฅๅคฑ่ดฅ["+ex.getMessage()+"]",0, tmpl.getTmpl_id()); }else{ outterECSTmplCtnManager.updateRunStatus("00A", tmpl.getTmpl_id()); outterECSTmplCtnManager.updateTmplExecuteInfo(tmpl.getTmpl_id(), 0, 1, tmpl.getExecute_min(), null,"ๅŒๆญฅๅคฑ่ดฅ["+ex.getMessage()+"]"); } ex.printStackTrace(); } } public OutterTmpl getTmpl() { return tmpl; } public void setTmpl(OutterTmpl tmpl) { this.tmpl = tmpl; } } }
[ "hxl971230.outlook.com" ]
hxl971230.outlook.com
69aa5b4799421d9c6cd6206879ca2d1f209b4aa0
656ce78b903ef3426f8f1ecdaee57217f9fbc40e
/src/org/spongycastle/i18n/filter/UntrustedInput.java
27b268a067f326cd153753f16b8714dafe0ed901
[]
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
331
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 org.spongycastle.i18n.filter; public class UntrustedInput { public String toString() { throw new NullPointerException(); } }
[ "hostmaster@zhuharev.ru" ]
hostmaster@zhuharev.ru
47836efeadc5c74fb27bd39db12bb35ba52ce379
ed4a304c72dd4a8ab1f90a5084d03085d79a8c2f
/retrieval/src/framework/base/snoic/base/ApplicationObjectManager.java
d1c984c9c826a448cecfe63edd938f8b9d4f1de1
[]
no_license
4lian/retrieval2014
44e024f04b495806e1347258b5f23bb9f74acf29
a5620c1791bbef412b90307a5659c292283e38fd
refs/heads/master
2021-01-18T05:10:09.899752
2014-01-23T16:35:39
2014-01-23T16:35:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,783
java
/** * Copyright 2010 * * 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 framework.base.snoic.base; import java.util.List; import framework.base.snoic.base.pool.ObjectManager; import framework.base.snoic.base.pool.ObjectPool; import framework.base.snoic.system.interfaces.InitSystem; import framework.base.snoic.system.interfaces.common.CommonObject; /** * ๅบ”็”จ็จ‹ๅบๅฏน่ฑกๆฑ ๏ผŒๅบ”็”จ็จ‹ๅบ็š„ๅฏน่ฑกๆฑ ไฝฟ็”จ็š„ๆ—ถๅ€™ๅบ”่ฏฅ็ปงๆ‰ฟ่ฟ™ไธช็ฑป๏ผŒๅนถ่ฎพ็ฝฎๅˆๅง‹ๅŒ–็ฑปๅ’Œๅฏน่ฑกๆฑ ๅ็งฐ * @author : * */ public abstract class ApplicationObjectManager implements CommonObject{ protected ObjectManager objectManager=ObjectManager.getInstance(); protected String poolname; protected InitSystem applicationInitialize=null; protected IApplicationGetObject applicationGetObject=new ApplicationNoInitGetObject(); /** * ่ฎพ็ฝฎๅฏน่ฑกๆฑ ๅ็งฐ * @param poolname The poolname to set. */ public void setPoolname(String poolname) { this.poolname = poolname; } /** * ่ฎพ็ฝฎๅˆๅง‹ๅŒ–็ฑป * @param applicationInitialize */ public synchronized void setApplicationInitialize(InitSystem applicationInitialize) { this.applicationInitialize = applicationInitialize; if(applicationInitialize!=null){ applicationGetObject=new ApplicationInitGetObject(); } } /** * ๅˆ›ๅปบๅฏน่ฑกๆฑ  * */ public void createPool(){ objectManager.createPool(poolname); } /** * ๅˆ›ๅปบๅฏน่ฑกๆฑ  * @param poolType ๅฏน่ฑกๆฑ ็ฑปๅž‹ * * ๆ™ฎ้€š็ฑปๅž‹็š„ๅฏน่ฑกๆฑ  ObjectPool.NORMAL_POOL * ๅผฑ็ฑปๅž‹็š„ๅฏน่ฑกๆฑ  ObjectPool.WEAK_POOL */ public void createPool(String poolType){ objectManager.createPool(poolname,poolType); } /** * ๆธ…้™คๅฏน่ฑกๆฑ ไธญ็š„ๅฏน่ฑก * */ public void clearPool(){ objectManager.clearPool(poolname); } /** * Security็จ‹ๅบไปŽๅฏน่ฑกๆฑ ไธญๅ–ๅ…ฌๅ…ฑๅฏน่ฑก๏ผŒๅฆ‚ๆžœๆฒกๆœ‰ๅ–ๅพ—ๅฏน่ฑก๏ผŒ้‡ๆ–ฐๅˆๅง‹ๅŒ–็ณป็ปŸ * @param objectname * ๅฏน่ฑกๅ็งฐ * @return Object */ public Object getObject(String objectname) { Object object = applicationGetObject.getObject(objectManager, poolname, objectname, applicationInitialize); return object; } /** * ไปŽๅฏน่ฑกๆฑ ไธญๅ–็งป้™คๅฏน่ฑก * * @param objectName * ๅฏน่ฑกๅ็งฐ * @return Object */ public Object checkOutObject(String objectName) { Object object=objectManager.checkOutObject(poolname,objectName); return object; } /** * ๅพ€็ณป็ปŸๅฏน่ฑกๆฑ ไธญๆ”พๅ…ฅไธ€ไธชๅฏน่ฑก * @param objectName * @param object */ public void checkInObject(String objectName,Object object){ objectManager.checkInObject(poolname,objectName,object); } /** * ่Žทๅ–ๅฏน่ฑกๆฑ ไธญๆ‰€ๆœ‰ๅฏน่ฑกๅ * @return List */ public List getObjectNames(){ ObjectPool objectPool=objectManager.getObjectPool(poolname); return objectPool.getObjectNames(); } /** * ่Žทๅ–ๅฏน่ฑกๆฑ ไธญๆ‰€ๆœ‰ๅฏน่ฑก * @return List */ public List getObjects(){ ObjectPool objectPool=objectManager.getObjectPool(poolname); return objectPool.getObjects(); } /** * ๆ‘งๆฏๅฏน่ฑกๆฑ  * */ public void destoryObjectPool(){ objectManager.removePool(poolname); } }
[ "sxjun1904@qq.com" ]
sxjun1904@qq.com
e8c79bbb3266fbef449452daa866a2377e404cf6
e49ddf6e23535806c59ea175b2f7aa4f1fb7b585
/tags/release-7.2.0/src/gov/nih/mipav/view/renderer/WildMagic/Poisson/Geometry/TriangleIndex.java
a69909dd4adb1dbb1a9cb84855078ae227c2d59d
[ "MIT" ]
permissive
svn2github/mipav
ebf07acb6096dff8c7eb4714cdfb7ba1dcace76f
eb76cf7dc633d10f92a62a595e4ba12a5023d922
refs/heads/master
2023-09-03T12:21:28.568695
2019-01-18T23:13:53
2019-01-18T23:13:53
130,295,718
1
0
null
null
null
null
UTF-8
Java
false
false
133
java
package gov.nih.mipav.view.renderer.WildMagic.Poisson.Geometry; public class TriangleIndex { public int[] idx = new int[3]; }
[ "mccreedy@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96" ]
mccreedy@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96
3686679585108ae97d9c8db64f8c60e0205e47a6
8fabab4675f167352e1a6f4cb1f92cb662e097db
/app/src/main/java/zone/com/retrofitlisthelper/utils/GsonUtils.java
9b9b427451bceae21afb931688611f96ba2298ee
[]
no_license
luhaoaimama1/ZAutoTurnPage
119e4e63ba865ea01db14e6b09e0aa83ef23e90a
43964e9356c836ec3875b1b7069cddb066ead617
refs/heads/master
2022-04-17T17:38:33.067837
2020-04-13T09:24:29
2020-04-13T09:24:29
255,272,814
0
0
null
null
null
null
UTF-8
Java
false
false
1,703
java
package zone.com.retrofitlisthelper.utils; import com.google.gson.Gson; import java.lang.reflect.Array; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; /** * Created by fuzhipeng on 16/9/23. */ public class GsonUtils { static Gson gson=new Gson(); public static String toJson(Object obj) { return gson.toJson(obj); } public static <T> T fromJson(String str, Class<T> t) { try { return gson.fromJson(str, t); } catch (Exception e) { return null; } } /** * ๅฏไปฅไฝฟ็”จ * List<Person> ps = Arrays.asList(gson.fromJson(str, Person[].class)); * ไฝ†ๆ˜ฏ่ฟ˜ๆ˜ฏๆไพ›ไบ†ไธ‹ๆญคๆ–นๆณ• * @param str * @param t * @return */ public static <T> T[] fromJsonToArray(String str, Class<T> t) { try { Class<? extends Object> cls = Array.newInstance(t, 0).getClass(); return gson.fromJson(str, (Type) cls); } catch (Exception e) { return null; } } /** * ๆˆ–่€…็”จ่ฟ™ไธค็ง็งๆ–นๅผ * 1.List<Person> ps = gson.fromJson(str, new TypeToken<List<Person>>() {}.getType()); * 2.List<Person> ps = Arrays.asList * (gson.fromJson(str, Person[].class));//ไธๆ”ฏๆŒๆทปๅŠ ็ญ‰ๆ“ไฝœ!!! * @param str * @param t * @return */ public static <T> List<T> fromJsonToList(String str, Class<T> t) { try { T[] temp = fromJsonToArray(str, t); List<T> result=new ArrayList<>(); for (T t1 : temp) result.add(t1); return result; } catch (Exception e) { return null; } } }
[ "1149324777@qq.com" ]
1149324777@qq.com
68c292843bf9a6cac56cad02e39161e7f7d57c41
3e32c6bd71577217b4b5db4890d314dfd17d6593
/hcms-core/src/main/java/com/abminvestama/hcms/core/repository/T517XRepository.java
4ef3d682bdb3d14d8c2f38c834d35c17d3ce4493
[]
no_license
yauritux/hcms-api
d6e7fd3ac450a170c8065cda6c76224a4ce3c404
2e4538e9bc6f4dde70d894295197c00c9c82fe00
refs/heads/master
2021-01-10T01:15:00.935233
2016-02-03T07:09:54
2016-02-03T07:09:54
50,981,095
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package com.abminvestama.hcms.core.repository; import org.springframework.data.repository.CrudRepository; import com.abminvestama.hcms.core.model.entity.T517X; /** * * @author yauri (yauritux@gmail.com) * @version 1.0.0 * @since 1.0.0 * */ public interface T517XRepository extends CrudRepository<T517X, String> { }
[ "yauritux@gmail.com" ]
yauritux@gmail.com
2cfac6be19e31312a8f409c8713198490f372eb3
e3342af2d25d22eb351b99f8916af87f5de4a68b
/Eclipse/LB/src/ast/Break.java
5b93352799b10e07ad2d5e0eeb84c29183a8ad77
[]
no_license
tacsio/compilers
64637290fab1ce835b36d477abd8f596c03ee982
301a25af789e359f35ac1fc493e84dcbcbe51f35
refs/heads/master
2016-09-06T08:31:54.003853
2012-10-17T02:26:43
2012-10-17T02:26:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
259
java
package ast; import org.antlr.runtime.Token; import visitor.Visitor; public class Break extends No { public Break(Token payload) { super(payload); } @Override public Object accept(Visitor visitor, Object o) { return visitor.visit(this, o); } }
[ "tcs5cin@gmail.com" ]
tcs5cin@gmail.com
a459967df90a488cfdd0fe4beddd4a11a7e2a3cf
6e10dc75f1fb1c08c5c69355b9335abd21e93662
/refrences/dex2jar.src/rx/internal/operators/OnSubscribeFromCallable.java
f9517312f33d87600b23ab64e43513a0f91d6577
[]
no_license
heiliuer/XiaomiCard
d61e35a17c8e80e4dfaa8dfeeecb6d58906a2614
012a496a306469fec31dcd18cecef7bdb8dc9cc9
refs/heads/master
2020-05-30T19:10:49.072231
2017-05-10T04:14:47
2017-05-10T04:14:47
69,148,258
9
1
null
null
null
null
UTF-8
Java
false
false
1,161
java
package rx.internal.operators; import java.util.concurrent.Callable; import rx.Observable.OnSubscribe; import rx.Subscriber; import rx.exceptions.Exceptions; import rx.internal.producers.SingleDelayedProducer; public final class OnSubscribeFromCallable<T> implements Observable.OnSubscribe<T> { private final Callable<? extends T> resultFactory; public OnSubscribeFromCallable(Callable<? extends T> paramCallable) { this.resultFactory = paramCallable; } public void call(Subscriber<? super T> paramSubscriber) { SingleDelayedProducer localSingleDelayedProducer = new SingleDelayedProducer(paramSubscriber); paramSubscriber.setProducer(localSingleDelayedProducer); try { localSingleDelayedProducer.setValue(this.resultFactory.call()); return; } catch (Throwable localThrowable) { while (true) { Exceptions.throwIfFatal(localThrowable); paramSubscriber.onError(localThrowable); } } } } /* Location: d:\Users\Administrator\Desktop\111111_dex2jar.jar * Qualified Name: rx.internal.operators.OnSubscribeFromCallable * JD-Core Version: 0.6.0 */
[ "eee" ]
eee
de5c0e4989f1c25eb8146c091120de9ecfaf3e3a
6edf6c315706e14dc6aef57788a2abea17da10a3
/com/planet_ink/marble_mud/Abilities/Traps/Bomb_Poison.java
427e91b518d624f3897a682861e07b9fa19a4906
[]
no_license
Cocanuta/Marble
c88efd73c46bd152098f588ba1cdc123316df818
4306fbda39b5488dac465a221bf9d8da4cbf2235
refs/heads/master
2020-12-25T18:20:08.253300
2012-09-10T17:09:50
2012-09-10T17:09:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,628
java
package com.planet_ink.marble_mud.Abilities.Traps; import com.planet_ink.marble_mud.core.interfaces.*; import com.planet_ink.marble_mud.core.*; import com.planet_ink.marble_mud.core.collections.*; import com.planet_ink.marble_mud.Abilities.interfaces.*; import com.planet_ink.marble_mud.Areas.interfaces.*; import com.planet_ink.marble_mud.Behaviors.interfaces.*; import com.planet_ink.marble_mud.CharClasses.interfaces.*; import com.planet_ink.marble_mud.Commands.interfaces.*; import com.planet_ink.marble_mud.Common.interfaces.*; import com.planet_ink.marble_mud.Exits.interfaces.*; import com.planet_ink.marble_mud.Items.interfaces.*; import com.planet_ink.marble_mud.Locales.interfaces.*; import com.planet_ink.marble_mud.MOBS.interfaces.*; import com.planet_ink.marble_mud.Races.interfaces.*; import java.util.*; /* 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. */ @SuppressWarnings({"unchecked","rawtypes"}) public class Bomb_Poison extends StdBomb { public String ID() { return "Bomb_Poison"; } public String name(){ return "poison gas bomb";} protected int trapLevel(){return 5;} public String requiresToSet(){return "some poison";} public List<Item> getTrapComponents() { Vector V=new Vector(); Item I=CMLib.materials().makeItemResource(RawMaterial.RESOURCE_POISON); Ability A=CMClass.getAbility(text()); if(A==null) A=CMClass.getAbility("Poison"); I.addNonUninvokableEffect(A); V.addElement(I); return V; } public List<Ability> returnOffensiveAffects(Physical fromMe) { Vector offenders=new Vector(); for(final Enumeration<Ability> a=fromMe.effects();a.hasMoreElements();) { final Ability A=a.nextElement(); if((A!=null)&&((A.classificationCode()&Ability.ALL_ACODES)==Ability.ACODE_POISON)) offenders.addElement(A); } return offenders; } public boolean canSetTrapOn(MOB mob, Physical P) { if(!super.canSetTrapOn(mob,P)) return false; List<Ability> V=returnOffensiveAffects(P); if((!(P instanceof Drink))||(V.size()==0)) { if(mob!=null) mob.tell("You need some poison to make this out of."); return false; } return true; } public Trap setTrap(MOB mob, Physical P, int trapBonus, int qualifyingClassLevel, boolean perm) { if(P==null) return null; List<Ability> V=returnOffensiveAffects(P); if(V.size()>0) setMiscText(((Ability)V.get(0)).ID()); return super.setTrap(mob,P,trapBonus,qualifyingClassLevel,perm); } public void spring(MOB target) { if(target.location()!=null) { if((!invoker().mayIFight(target)) ||(isLocalExempt(target)) ||(invoker().getGroupMembers(new HashSet<MOB>()).contains(target)) ||(target==invoker()) ||(doesSaveVsTraps(target))) target.location().show(target,null,null,CMMsg.MASK_ALWAYS|CMMsg.MSG_NOISE,"<S-NAME> avoid(s) the poison gas!"); else if(target.location().show(invoker(),target,this,CMMsg.MASK_ALWAYS|CMMsg.MSG_NOISE,affected.name()+" spews poison gas all over <T-NAME>!")) { super.spring(target); Ability A=CMClass.getAbility(text()); if(A==null) A=CMClass.getAbility("Poison"); if(A!=null) A.invoke(invoker(),target,true,0); } } } }
[ "Cocanuta@Gmail.com" ]
Cocanuta@Gmail.com
a5516601b05119d130e950e4237375e1394d9d84
d4e4f828a79b4877ffa9b76455770fb5c94f6883
/client/am/console/src/main/java/org/apache/syncope/client/console/pages/SRA.java
bf21b023b1d86d716fef4eb4a8fa7c3aa02c811e
[ "Apache-2.0" ]
permissive
aalzehla/syncope
d8b74a35df013585fa9598bc39fcce75b79ec19f
278216e8b102d6accb5343c08d882d6f175374fa
refs/heads/master
2022-11-24T22:41:14.474597
2020-07-16T08:47:58
2020-07-16T08:47:58
280,235,265
1
0
Apache-2.0
2020-07-16T19:01:46
2020-07-16T19:01:46
null
UTF-8
Java
false
false
3,113
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.syncope.client.console.pages; import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel; import java.util.ArrayList; import java.util.List; import org.apache.syncope.client.console.BookmarkablePageLinkBuilder; import org.apache.syncope.client.console.annotations.AMPage; import org.apache.syncope.client.console.panels.SRARouteDirectoryPanel; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel; import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; import org.apache.wicket.extensions.markup.html.tabs.ITab; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.Model; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.request.mapper.parameter.PageParameters; @AMPage(label = "SRA", icon = "fas fa-share-alt", listEntitlement = "", priority = 0) public class SRA extends BasePage { private static final long serialVersionUID = 9200112197134882164L; public SRA(final PageParameters parameters) { super(parameters); body.add(BookmarkablePageLinkBuilder.build("dashboard", "dashboardBr", Dashboard.class)); WebMarkupContainer content = new WebMarkupContainer("content"); content.setOutputMarkupId(true); AjaxBootstrapTabbedPanel<ITab> tabbedPanel = new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList()); content.add(tabbedPanel); body.add(content); } private List<ITab> buildTabList() { List<ITab> tabs = new ArrayList<>(2); tabs.add(new AbstractTab(new ResourceModel("routes")) { private static final long serialVersionUID = 5211692813425391144L; @Override public Panel getPanel(final String panelId) { return new SRARouteDirectoryPanel(panelId, getPageReference()); } }); tabs.add(new AbstractTab(new ResourceModel("metrics")) { private static final long serialVersionUID = 5211692813425391144L; @Override public Panel getPanel(final String panelId) { return new AjaxTextFieldPanel(panelId, panelId, Model.of("")); } }); return tabs; } }
[ "ilgrosso@apache.org" ]
ilgrosso@apache.org
d5ba1bc53446ab77a893eda1ee2946a6383c41dc
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-cassandra/src/main/java/com/aliyuncs/cassandra/model/v20190101/ModifyClusterRequest.java
fe4369a977d7641ef456bd29fa8169f5beb53c2d
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,888
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.cassandra.model.v20190101; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.cassandra.Endpoint; /** * @author auto create * @version */ public class ModifyClusterRequest extends RpcAcsRequest<ModifyClusterResponse> { private String clusterName; private String clusterId; public ModifyClusterRequest() { super("Cassandra", "2019-01-01", "ModifyCluster", "Cassandra"); 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 String getClusterName() { return this.clusterName; } public void setClusterName(String clusterName) { this.clusterName = clusterName; if(clusterName != null){ putQueryParameter("ClusterName", clusterName); } } public String getClusterId() { return this.clusterId; } public void setClusterId(String clusterId) { this.clusterId = clusterId; if(clusterId != null){ putQueryParameter("ClusterId", clusterId); } } @Override public Class<ModifyClusterResponse> getResponseClass() { return ModifyClusterResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
5ea62885a8595b46a7d1bc7b24289c7234dd35a7
36bf98918aebe18c97381705bbd0998dd67e356f
/projects/castor-1.3.3/cpa/src/test/java/org/castor/cache/hashbelt/reaper/TestNullReaper.java
7563592328a790c227479fab9d1a3d3e093c02b4
[]
no_license
ESSeRE-Lab/qualitas.class-corpus
cb9513f115f7d9a72410b3f5a72636d14e4853ea
940f5f2cf0b3dc4bd159cbfd49d5c1ee4d06d213
refs/heads/master
2020-12-24T21:22:32.381385
2016-05-17T14:03:21
2016-05-17T14:03:21
59,008,169
2
1
null
null
null
null
UTF-8
Java
false
false
1,784
java
/* * Copyright 2006 Ralf Joachim * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.castor.cache.hashbelt.reaper; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.castor.cache.hashbelt.container.Container; import org.castor.cache.hashbelt.container.MapContainer; /** * @author <a href="mailto:ralf DOT joachim AT syscon DOT eu">Ralf Joachim</a> * @version $Revision: 9041 $ $Date: 2011-08-16 11:51:17 +0200 (Di, 16 Aug 2011) $ * @since 1.0 */ public final class TestNullReaper extends TestCase { public static Test suite() { TestSuite suite = new TestSuite("NullReaper Tests"); suite.addTest(new TestNullReaper("test")); return suite; } public TestNullReaper(final String name) { super(name); } public void test() { Container<Integer, String> container = new MapContainer<Integer, String>(); for (int i = 0; i < 10; i++) { container.put(new Integer(i), Integer.toString(i)); } AbstractReaper<Integer, String> reaper = new NullReaper<Integer, String>(); reaper.handleExpiredContainer(container); assertEquals(10, container.size()); } }
[ "marco.zanoni@disco.unimib.it" ]
marco.zanoni@disco.unimib.it