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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
84cae064d3416328dcc14edadc86ce9b3ccc5f96
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE134_Uncontrolled_Format_String/CWE134_Uncontrolled_Format_String__Property_format_52b.java
|
4c4ef3ed66abea1ba80191e436dcbc51ec45852b
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,396
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE134_Uncontrolled_Format_String__Property_format_52b.java
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
Template File: sources-sinks-52b.tmpl.java
*/
/*
* @description
* CWE: 134 Uncontrolled Format String
* BadSource: Property Read data from a system property
* GoodSource: A hardcoded string
* Sinks: format
* GoodSink: dynamic formatted stdout with string defined
* BadSink : dynamic formatted stdout without validation
* Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package
*
* */
package testcases.CWE134_Uncontrolled_Format_String;
import testcasesupport.*;
public class CWE134_Uncontrolled_Format_String__Property_format_52b
{
public void bad_sink(String data ) throws Throwable
{
(new CWE134_Uncontrolled_Format_String__Property_format_52c()).bad_sink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data ) throws Throwable
{
(new CWE134_Uncontrolled_Format_String__Property_format_52c()).goodG2B_sink(data );
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(String data ) throws Throwable
{
(new CWE134_Uncontrolled_Format_String__Property_format_52c()).goodB2G_sink(data );
}
}
|
[
"[email protected]"
] | |
2b6f64eb877b27a9a6e2aedfced1a2169b695c2e
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/src/irvine/oeis/a149/A149223.java
|
3a71ea837236e874828c502f4725d696e1e63f30
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package irvine.oeis.a149;
// Generated by gen_seq4.pl walk23 3 5 1 221201212121110 at 2019-07-08 22:06
// DO NOT EDIT here!
import irvine.oeis.WalkCubeSequence;
/**
* A149223 Number of walks within <code>N^3</code> (the first octant of <code>Z^3)</code> starting at <code>(0,0,0)</code> and consisting of n steps taken from <code>{(-1, -1, 1), (-1, 0, 1), (-1, 1, -1), (1, -1, 1), (1, 1, 0)}</code>.
* @author Georg Fischer
*/
public class A149223 extends WalkCubeSequence {
/** Construct the sequence. */
public A149223() {
super(0, 3, 5, "", 1, "221201212121110");
}
}
|
[
"[email protected]"
] | |
25d902aa27f48dfcaa3f171ce371f402bd87f7f6
|
19e4b4fa8ee6670bef460472325bdc9c2e0c8117
|
/src/main/java/com/ait/tooling/nativetools/client/collection/NFastIntegerDictionary.java
|
941c0a589420439a85741a879a71c64d49db8863
|
[
"Apache-2.0"
] |
permissive
|
romartin/ahome-tooling-nativetools
|
b39a45d1ec476eb9f59e273f7a6741038c862c0a
|
e38ffdc990bfdc2b2d05d6c795312f2e12259665
|
refs/heads/master
| 2020-12-26T02:20:55.704562
| 2016-02-06T23:43:48
| 2016-02-06T23:43:48
| 54,660,676
| 0
| 0
| null | 2016-03-24T17:23:06
| 2016-03-24T17:23:06
| null |
UTF-8
|
Java
| false
| false
| 1,305
|
java
|
/*
Copyright (c) 2014,2015,2016 Ahome' Innovation Technologies. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.ait.tooling.nativetools.client.collection;
public final class NFastIntegerDictionary extends NFastPrimitiveDictionaryBase<NFastIntegerDictionaryJSO>
{
public NFastIntegerDictionary(final NFastIntegerDictionaryJSO jso)
{
super((null == jso) ? NFastIntegerDictionaryJSO.make() : jso);
}
public NFastIntegerDictionary()
{
super(NFastIntegerDictionaryJSO.make());
}
public final NFastIntegerDictionary put(final String name, final int value)
{
getJSO().put(name, value);
return this;
}
public final int get(final String name)
{
return getJSO().get(name);
}
}
|
[
"[email protected]"
] | |
69eca45629bbdbf2c94e094d7bbbe27f1f08949f
|
c6e9d89306da3dee1b2339014d8b8216309c052b
|
/src/org/adligo/fabricate_tests/models/common/ExpectedRoutineInterfaceTrial.java
|
a405b77b53846ff474f28406670b2d371fe78dee
|
[
"Apache-2.0"
] |
permissive
|
adligo/fabricate_tests.adligo.org
|
70143d659c1cf50cc9ef23e1a0c1ac74ba87fa5a
|
b2d2c80d2c6fb84338fb1c1599888629b348abe0
|
refs/heads/master
| 2021-01-10T21:35:35.966080
| 2015-04-01T13:36:45
| 2015-04-01T13:36:45
| 33,228,690
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,690
|
java
|
package org.adligo.fabricate_tests.models.common;
import org.adligo.fabricate.models.common.ExpectedRoutineInterface;
import org.adligo.fabricate.models.common.ExpectedRoutineInterfaceMutant;
import org.adligo.fabricate.models.common.I_ExpectedRoutineInterface;
import org.adligo.fabricate.models.common.I_FabricationRoutine;
import org.adligo.tests4j.shared.asserts.common.ExpectedThrowable;
import org.adligo.tests4j.shared.asserts.common.I_Thrower;
import org.adligo.tests4j.system.shared.trials.SourceFileScope;
import org.adligo.tests4j.system.shared.trials.Test;
import org.adligo.tests4j_4mockito.MockitoSourceFileTrial;
import java.util.Collections;
import java.util.List;
/**
* @author scott
*
*/
@SourceFileScope (sourceClass=ExpectedRoutineInterface.class, minCoverage=97.0)
public class ExpectedRoutineInterfaceTrial extends MockitoSourceFileTrial {
@SuppressWarnings("boxing")
@Test
public void testConstructor() {
Class<?>[] clazzes = null;
ExpectedRoutineInterface copy = new ExpectedRoutineInterface(String.class,
clazzes);
assertEquals(String.class.getName(), copy.getInterfaceClass().getName());
List<Class<?>> gts = copy.getGenericTypes();
assertEquals(0, gts.size());
assertEquals("java.util.Collections$EmptyList", gts.getClass().getName());
copy = new ExpectedRoutineInterface(String.class, Long.class, Integer.class);
assertEquals(String.class.getName(), copy.getInterfaceClass().getName());
gts = copy.getGenericTypes();
assertEquals(Long.class.getName(), gts.get(0).getName());
assertEquals(Integer.class.getName(), gts.get(1).getName());
assertEquals(2, gts.size());
assertEquals("java.util.Collections$UnmodifiableRandomAccessList", gts.getClass().getName());
}
@SuppressWarnings("boxing")
@Test
public void testConstructorCopy() {
ExpectedRoutineInterfaceMutant mut = new ExpectedRoutineInterfaceMutant();
mut.setInterfaceClass(String.class);
ExpectedRoutineInterface copy = new ExpectedRoutineInterface(mut);
assertEquals(String.class.getName(), copy.getInterfaceClass().getName());
List<Class<?>> gts = copy.getGenericTypes();
assertEquals(0, gts.size());
assertEquals("java.util.Collections$EmptyList", gts.getClass().getName());
I_ExpectedRoutineInterface mock = mock(I_ExpectedRoutineInterface.class);
doReturn(String.class).when(mock).getInterfaceClass();
when(mock.getGenericTypes()).thenReturn(null);
copy = new ExpectedRoutineInterface(mock);
assertEquals(String.class.getName(), copy.getInterfaceClass().getName());
gts = copy.getGenericTypes();
assertEquals(0, gts.size());
assertEquals("java.util.Collections$EmptyList", gts.getClass().getName());
mut.setGenericTypes(Collections.singletonList(Long.class));
copy = new ExpectedRoutineInterface(mut);
assertEquals(String.class.getName(), copy.getInterfaceClass().getName());
gts = copy.getGenericTypes();
assertEquals(Long.class.getName(), gts.get(0).getName());
assertEquals(1, gts.size());
assertEquals("java.util.Collections$UnmodifiableRandomAccessList", gts.getClass().getName());
}
@Test
public void testConstructorExceptions() {
ExpectedRoutineInterfaceMutant mut = new ExpectedRoutineInterfaceMutant();
assertThrown(new ExpectedThrowable(NullPointerException.class),
new I_Thrower() {
@SuppressWarnings("unused")
@Override
public void run() throws Throwable {
new ExpectedRoutineInterface(mut);
}
});
assertThrown(new ExpectedThrowable(NullPointerException.class),
new I_Thrower() {
@SuppressWarnings("unused")
@Override
public void run() throws Throwable {
new ExpectedRoutineInterface(null, String.class);
}
});
}
@Test
public void testMethodsGetsAndSets() {
ExpectedRoutineInterfaceMutant mut = new ExpectedRoutineInterfaceMutant();
mut.setInterfaceClass(String.class);
assertEquals(String.class.getName(), mut.getInterfaceClass().getName());
mut.setGenericTypes(Collections.singletonList(Long.class));
List<Class<?>> gts = mut.getGenericTypes();
assertEquals(Long.class.getName(), gts.get(0).getName());
assertEquals("java.util.ArrayList", gts.getClass().getName());
}
@SuppressWarnings("boxing")
@Test
public void testMethodsEqualsHashCode() {
ExpectedRoutineInterfaceMutant a = new ExpectedRoutineInterfaceMutant();
a.setInterfaceClass(String.class);
ExpectedRoutineInterfaceMutant b = new ExpectedRoutineInterfaceMutant();
b.setInterfaceClass(I_FabricationRoutine.class);
ExpectedRoutineInterfaceMutant c = new ExpectedRoutineInterfaceMutant();
c.setInterfaceClass(I_FabricationRoutine.class);
c.setGenericTypes(Collections.singletonList(String.class));
ExpectedRoutineInterface a1 = new ExpectedRoutineInterface(a);
ExpectedRoutineInterface b1 = new ExpectedRoutineInterface(b);
ExpectedRoutineInterface c1 = new ExpectedRoutineInterface(c);
//hash codes
assertEquals(a1.hashCode(), a1.hashCode());
assertEquals(a1.hashCode(), a.hashCode());
assertNotEquals(a1.hashCode(), b1.hashCode());
assertNotEquals(a1.hashCode(), b.hashCode());
assertNotEquals(a1.hashCode(), c1.hashCode());
assertNotEquals(a1.hashCode(), c.hashCode());
assertEquals(b1.hashCode(), b1.hashCode());
assertEquals(b1.hashCode(), b.hashCode());
assertNotEquals(b1.hashCode(), a1.hashCode());
assertNotEquals(b1.hashCode(), a.hashCode());
assertNotEquals(b1.hashCode(), c1.hashCode());
assertNotEquals(b1.hashCode(), c.hashCode());
assertEquals(c1.hashCode(), c1.hashCode());
assertEquals(c1.hashCode(), c.hashCode());
assertNotEquals(c1.hashCode(), a1.hashCode());
assertNotEquals(c1.hashCode(), a.hashCode());
assertNotEquals(c1.hashCode(), b1.hashCode());
assertNotEquals(c1.hashCode(), b.hashCode());
//equals
assertTrue(a1.equals(a1));
assertTrue(a1.equals(a));
assertFalse(a1.equals(b1));
assertFalse(a1.equals(b));
assertFalse(a1.equals(c1));
assertFalse(a1.equals(c));
assertTrue(b1.equals(b1));
assertTrue(b1.equals(b));
assertFalse(b1.equals(a1));
assertFalse(b1.equals(a));
assertFalse(b1.equals(c1));
assertFalse(b1.equals(c));
assertTrue(c1.equals(c1));
assertTrue(c1.equals(c));
assertFalse(c1.equals(a1));
assertFalse(c1.equals(a));
assertFalse(c1.equals(b1));
assertFalse(c1.equals(b));
}
}
|
[
"[email protected]"
] | |
44921bfc102873ddb947c0ff414f16b171132971
|
6f461acdb4dc2f2667c8682ff50c612096405570
|
/Core/src/main/java/com/gaea/game/core/ws/WSMessage.java
|
0008ff2bf73741160dff48bcca581274e9521022
|
[] |
no_license
|
ymw520369/gaeagame
|
f1584aa3d5dd5a186b3318ea3530d2b5814b3749
|
0e989a1fc57a9221d230cc1e2e465fa6c3bedbc3
|
refs/heads/master
| 2021-01-19T18:49:09.886818
| 2017-10-09T10:18:20
| 2017-10-09T10:18:20
| 101,168,005
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 447
|
java
|
package com.gaea.game.core.ws;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created on 2017/8/2.
*
* @author Alan
* @since 1.0
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface WSMessage {
boolean resp() default false;
int messageType() default 0;
int cmd() default 0;
}
|
[
"[email protected]"
] | |
9eb4e93b096ef19a7942f22b9ab357643eb299d9
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a161/A161532Test.java
|
8371ba2a460d8ef21b4030c4e0bc63953323b35a
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a161;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A161532Test extends AbstractSequenceTest {
}
|
[
"[email protected]"
] | |
3c95b5b47392ece3cc75fd6f6692b7412785b899
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_9_0_0/src/main/java/com/android/server/pm/-$$Lambda$InstantAppRegistry$o-Qxi7Gaam-yhhMK-IMWv499oME.java
|
36a1a913887da019a6bd7046e13e0f5b74da5f95
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 615
|
java
|
package com.android.server.pm;
import android.content.pm.PackageParser.Package;
import java.util.function.Predicate;
/* compiled from: lambda */
public final /* synthetic */ class -$$Lambda$InstantAppRegistry$o-Qxi7Gaam-yhhMK-IMWv499oME implements Predicate {
private final /* synthetic */ Package f$0;
public /* synthetic */ -$$Lambda$InstantAppRegistry$o-Qxi7Gaam-yhhMK-IMWv499oME(Package packageR) {
this.f$0 = packageR;
}
public final boolean test(Object obj) {
return ((UninstalledInstantAppState) obj).mInstantAppInfo.getPackageName().equals(this.f$0.packageName);
}
}
|
[
"[email protected]"
] | |
1120dbb26926e055724d108a5d38361acb264bc9
|
2869fc39e2e63d994d5dd8876476e473cb8d3986
|
/Super_clutter/src/test/com/client/TestUserService.java
|
ccc4c45cdcc4ee7955ee0fe3080e1d79aa4edbd5
|
[] |
no_license
|
kavt/feiniu_pet
|
bec739de7c4e2ee896de50962dbd5fb6f1e28fe9
|
82963e2e87611442d9b338d96e0343f67262f437
|
refs/heads/master
| 2020-12-25T17:45:16.166052
| 2016-06-13T10:02:42
| 2016-06-13T10:02:42
| 61,026,061
| 0
| 0
| null | 2016-06-13T10:02:01
| 2016-06-13T10:02:01
| null |
UTF-8
|
Java
| false
| false
| 3,385
|
java
|
package com.client;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import com.lvmama.clutter.model.MobileOrder;
import com.lvmama.clutter.model.MobileUser;
import com.lvmama.clutter.service.client.v3_1.ClientUserServiceV31;
public class TestUserService extends TestBase{
ClientUserServiceV31 os = (ClientUserServiceV31) context.getBean("api_com_user_3_1_0");
/**
* 获取用户信息
*/
//@Test
public void testGetUser() {
Map<String,String> param = new HashMap<String,String>();
param.put("userNo", "ff808081328b6bbe01328b7dfd4000c8");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
MobileUser c = os.getUser(param);
if(null != c) {
System.out.println("=获取用户信息 success the user name =====" +c.getImageUrl());
}else {
System.out.println("=获取用户信息 faild there is no user was found!=====");
}
}
/**
* 获取用户信息
*/
@Test
public void testaddContact() {
Map<String,String> param = new HashMap<String,String>();
param.put("userNo", "5ad32f1a1d2250d7011d22a254e601c7");
param.put("certType", "HUZHAO");
param.put("certNo", "1231231231");
//receiverName
param.put("receiverName", "a");
param.put("mobileNumber", "1111111111");
param.put("gender", "F");
param.put("birthday", "1987-09-08");
os.addContact(param);
}
/**
* 获取用户优惠劵信息
*/
//@Test
public void testGetCoupon() {
Map<String,String> param = new HashMap<String,String>();
param.put("userId", "298");
param.put("state", "USED");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
// List<MobileUserCoupon> c = os.getCoupon(param);
// if(null != c) {
// System.out.println("=获取用户优惠劵信息 success the userCouponList size =====" +c.size());
// }else {
// System.out.println("=获取用户优惠劵信息 faild there is no userCouponList was found!=====");
// }
}
/**
* 获取用户某个订单
*/
//@Test
public void testGetOrder() {
Map<String,Object> param = new HashMap<String,Object>();
param.put("userNo", "40288add3fe1d53a013ff0d54850546f");
param.put("orderId", "2696178");
MobileOrder mo = os.getOrder(param);
System.out.println(mo);
}
/**
* 获取用户订单列表
*/
public void testGetOrderList() {
Map<String,String> param = new HashMap<String,String>();
param.put("userId", "5ad32f1a1d2250d7011d22a254e601c7");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
}
// @Test
// public void testgetBonusBalanceInCome(){
// os.getBonusBalanceInCome();
// }
//@Test
public void testqueryCmtWaitForOrder(){
//{lvversion=3.1.0, osVersion=4.0.4, userAgent=ANDROID_LVMM 3.1.0 (SHV-E160L; Android OS 4.0.4; WIFI), udid=35955404018268, secondChannel=LVMM, isIphone=false, lvsessionid=7f9576e5-fc87-474a-aee5-3c794e6dc7ff, isAndroid=true, appVersion=310, userNo=5ad32f1a1d2250d7011d22a254e601c7, userId=12, method=api.com.user.queryCmtWaitForOrder, firstChannel=ANDROID, formate=json}
Map<String,Object> param = new HashMap<String,Object>();
param.put("userId", "12");
param.put("userNo", "5ad32f1a1d2250d7011d22a254e601c7");
param.put("lvsessionid", "f4233fca-029e-4f17-8075-ac8e7e2c2b0b");
os.queryCmtWaitForOrder(param);
}
}
|
[
"[email protected]"
] | |
1148a6b4790047e68e4e3327dcf5d3a552a75ccd
|
1f752454f82bbfce9c65e3c0f11def69ecdab3bd
|
/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/method/ExtensionMethodsHelper.java
|
888cd37a71dfb91815196cb38ac3860e06ba768b
|
[
"Apache-2.0"
] |
permissive
|
Yamishit/intellij-community
|
85cabd9700ef6a5f802ec2d52c31c6f5bb43d911
|
b852aaedb1e8c48211bc11d4fb973bddcade1a76
|
refs/heads/master
| 2023-01-10T13:35:45.259734
| 2020-11-15T23:01:00
| 2020-11-15T23:14:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,058
|
java
|
package de.plushnikov.intellij.plugin.processor.method;
import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.psi.*;
import com.intellij.psi.infos.MethodCandidateInfo;
import com.intellij.psi.util.*;
import com.intellij.util.SmartList;
import com.intellij.util.containers.ContainerUtil;
import de.plushnikov.intellij.plugin.LombokClassNames;
import de.plushnikov.intellij.plugin.psi.LombokLightMethodBuilder;
import de.plushnikov.intellij.plugin.psi.LombokLightParameter;
import de.plushnikov.intellij.plugin.util.PsiAnnotationUtil;
import de.plushnikov.intellij.plugin.util.PsiClassUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
public class ExtensionMethodsHelper {
private static final Logger LOG = Logger.getInstance(ExtensionMethodsHelper.class);
public static List<PsiMethod> getExtensionMethods(final @NotNull PsiClass targetClass,
final String nameHint,
final @NotNull PsiElement place) {
if (nameHint == null || !(place instanceof PsiMethodCallExpression)) {
return Collections.emptyList();
}
PsiReferenceExpression methodExpression = ((PsiMethodCallExpression)place).getMethodExpression();
PsiExpression qualifierExpression = methodExpression.getQualifierExpression();
if (qualifierExpression == null ||
!nameHint.equals(methodExpression.getReferenceName()) ||
qualifierExpression instanceof PsiReferenceExpression && ((PsiReferenceExpression)qualifierExpression).resolve() instanceof PsiClass) {
return Collections.emptyList();
}
List<PsiMethod> result = new SmartList<>();
@Nullable PsiClass context = PsiTreeUtil.getContextOfType(place, PsiClass.class);
while (context != null) {
final @Nullable PsiAnnotation annotation = context.getAnnotation(LombokClassNames.EXTENSION_METHOD);
if (annotation != null) {
final Set<PsiClass> providers = PsiAnnotationUtil.getAnnotationValues(annotation, PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME, PsiType.class).stream()
.filter(PsiClassType.class::isInstance)
.map(PsiClassType.class::cast)
.map(PsiClassType::resolve)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
if (!providers.isEmpty()) {
List<PsiMethod> extensionMethods = collectExtensionMethods(providers, ((PsiMethodCallExpression)place), targetClass);
extensionMethods
.stream()
.map(method -> MethodSignatureBackedByPsiMethod.create(method, PsiSubstitutor.EMPTY))
.distinct()
.filter(methodSignature -> !targetClass.getVisibleSignatures().contains(methodSignature))
.forEach(methodSignature -> result.add(methodSignature.getMethod()));
}
}
context = PsiTreeUtil.getContextOfType(context, PsiClass.class);
}
return result;
}
private static List<PsiMethod> collectExtensionMethods(final Set<PsiClass> providers,
final PsiMethodCallExpression callExpression,
final PsiClass targetClass) {
List<PsiMethod> psiMethods = new ArrayList<>();
providers.forEach(providerClass -> providerData(providerClass).forEach(function -> ContainerUtil.addIfNotNull(psiMethods, function.apply(targetClass, callExpression))));
return psiMethods;
}
public static List<BiFunction<PsiClass, PsiMethodCallExpression, PsiMethod>> providerData(final PsiClass providerClass) {
return CachedValuesManager.getCachedValue(providerClass, () -> CachedValueProvider.Result
.create(createProviderCandidates(providerClass), PsiModificationTracker.MODIFICATION_COUNT));
}
private static List<BiFunction<PsiClass, PsiMethodCallExpression, PsiMethod>> createProviderCandidates(final PsiClass providerClass) {
final List<BiFunction<PsiClass, PsiMethodCallExpression, PsiMethod>> result = new ArrayList<>();
for (PsiMethod providerStaticMethod : PsiClassUtil.collectClassStaticMethodsIntern(providerClass)) {
if (providerStaticMethod.hasModifierProperty(PsiModifier.PUBLIC)) {
PsiParameter @NotNull [] parameters = providerStaticMethod.getParameterList().getParameters();
if (parameters.length > 0 && !(parameters[0].getType() instanceof PsiPrimitiveType)) {
result.add((targetClass, call) -> createLightMethodBySignature(providerStaticMethod, targetClass, call));
}
}
}
return result;
}
private static LombokLightMethodBuilder createLightMethodBySignature(PsiMethod staticMethod,
PsiClass targetClass,
PsiMethodCallExpression callExpression) {
if (!staticMethod.getName().equals(callExpression.getMethodExpression().getReferenceName())) return null;
PsiClass providerClass = Objects.requireNonNull(staticMethod.getContainingClass());
PsiMethodCallExpression staticMethodCall;
try {
staticMethodCall = (PsiMethodCallExpression)JavaPsiFacade.getElementFactory(staticMethod.getProject())
.createExpressionFromText(providerClass.getQualifiedName() + "." + staticMethod.getName() + "()", callExpression);
PsiExpressionList argList = staticMethodCall.getArgumentList();
argList.add(Objects.requireNonNull(callExpression.getMethodExpression().getQualifierExpression()));
for (PsiExpression expression : callExpression.getArgumentList().getExpressions()) {
argList.add(expression);
}
}
catch (ProcessCanceledException e) {
throw e;
}
catch (Throwable e) {
LOG.error(e);
return null;
}
JavaResolveResult result = staticMethodCall.resolveMethodGenerics();
if (!(result instanceof MethodCandidateInfo)) return null;
PsiMethod method = ((MethodCandidateInfo)result).getElement();
if (!method.equals(staticMethod) || !((MethodCandidateInfo)result).isApplicable()) return null;
PsiSubstitutor substitutor = result.getSubstitutor();
final LombokLightMethodBuilder lightMethod = new LombokLightMethodBuilder(staticMethod.getManager(), staticMethod.getName()) {
@Override
public boolean isEquivalentTo(final PsiElement another) { return staticMethod.isEquivalentTo(another); }
};
lightMethod
.addModifiers(PsiModifier.PUBLIC);
PsiParameter @NotNull [] parameters = staticMethod.getParameterList().getParameters();
if (targetClass.isInterface()) {
lightMethod.addModifier(PsiModifier.DEFAULT);
}
lightMethod.setMethodReturnType(substitutor.substitute(staticMethod.getReturnType()));
for (int i = 1, length = parameters.length; i < length; i++) {
PsiParameter parameter = parameters[i];
lightMethod.addParameter(new LombokLightParameter(parameter.getName(), substitutor.substitute(parameter.getType()), lightMethod, JavaLanguage.INSTANCE));
}
PsiClassType[] thrownTypes = staticMethod.getThrowsList().getReferencedTypes();
for (PsiClassType thrownType : thrownTypes) {
lightMethod.addException((PsiClassType)substitutor.substitute(thrownType));
}
PsiTypeParameter[] staticMethodTypeParameters = staticMethod.getTypeParameters();
HashSet<PsiTypeParameter> initialTypeParameters = ContainerUtil.newHashSet(staticMethodTypeParameters);
Arrays.stream(staticMethodTypeParameters)
.filter(typeParameter -> PsiTypesUtil.mentionsTypeParameters(substitutor.substitute(typeParameter), initialTypeParameters))
.forEach(lightMethod::addTypeParameter);
lightMethod.setNavigationElement(staticMethod);
lightMethod.setContainingClass(targetClass);
return lightMethod;
}
}
|
[
"[email protected]"
] | |
7e118b733fb9e782ecc62639b6035d5b15b7e759
|
fbfcb88a9bfdc2868077a7035a74c98dc3eb25a0
|
/src/combiz/business/pr/PrstatusSrv.java
|
6f448ef334498185145d80575e32c94cb47450e7
|
[] |
no_license
|
jackwysxw/combiz
|
817af9399251ff286d2a4c1d525953e8f66c8e06
|
9a84f3b4e8866a5030462eafa683bf5d7ad4bf40
|
refs/heads/master
| 2020-04-25T14:46:23.301900
| 2016-09-26T07:04:16
| 2016-09-26T07:04:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 173
|
java
|
package combiz.business.pr;
import combiz.domain.pr.Prstatus;
import combiz.system.IBOBaseSrv;
import java.util.List;
public interface PrstatusSrv extends IBOBaseSrv
{
}
|
[
"[email protected]"
] | |
8e12208e46bac8701ab1b50f3a6dae4620d10f4a
|
5f41b17d415dc5f2bd2af688ee5a87acfe731bb0
|
/src/main/java/com/chixing/util/PageModel.java
|
e87c23c73e9a0cf8223b60686b1ecee88dffda50
|
[
"Apache-2.0"
] |
permissive
|
JanlYsone/sleeves
|
1240180f7e66cd82eecef7cc6188711d067011ba
|
13994f1bf185a7ee82f5f21b71cb91673df20630
|
refs/heads/master
| 2022-01-22T11:50:13.687483
| 2018-12-04T07:22:16
| 2018-12-04T07:22:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,235
|
java
|
package com.chixing.util;
import java.util.List;
/**
* 1. 每页显示记录数
* 2. 总记录数
* 3. 总页数
* 4. 当前页码
* 5. 从第几条记录开始显示
* 6. 到第几条记录结束显示
* 7. 当前页显示记录对象集合
*/
public class PageModel<T> {
private final Integer pageSize = 3; //每页显示记录数
private Integer totalRecord ; //总记录数
private Integer totalPages; //总页数
private Integer currentPageCode; //当前页码
private Integer startRecord; //从第几条记录开始显示
private Integer endRecord; // 到第几条记录结束显示
private List<T> modelList; //当前页显示记录对象集合
public Integer getPageSize() {
return pageSize;
}
public Integer getTotalRecord() {
return totalRecord;
}
public void setTotalRecord(Integer totalRecord) {
this.totalRecord = totalRecord;
}
public Integer getTotalPages() {
return totalPages;
}
public void setTotalPages(Integer totalPages) {
this.totalPages = totalPages;
}
public Integer getCurrentPageCode() {
return currentPageCode;
}
public void setCurrentPageCode(Integer currentPageCode) {
this.currentPageCode = currentPageCode;
}
public Integer getStartRecord() {
return startRecord;
}
public void setStartRecord(Integer startRecord) {
this.startRecord = startRecord;
}
public Integer getEndRecord() {
return endRecord;
}
public void setEndRecord(Integer endRecord) {
this.endRecord = endRecord;
}
public List<T> getModelList() {
return modelList;
}
public void setModelList(List<T> modelList) {
this.modelList = modelList;
}
@Override
public String toString() {
return "PageModel{" +
"pageSize=" + pageSize +
", totalRecord=" + totalRecord +
", totalPages=" + totalPages +
", currentPageCode=" + currentPageCode +
", startRecord=" + startRecord +
", endRecord=" + endRecord +
", modelList=" + modelList +
'}';
}
}
|
[
"[email protected]"
] | |
abc6779f5d617c5e7faf7e21adb394f41f54a013
|
b1f51f8ba05ad83ecfbd80e6e7f140e70850bf01
|
/ACE_ERP/src/pms/menu/help/Si110H_01.java
|
5f92e0659f616f3f07e7a1edd8d121bae1c415d3
|
[] |
no_license
|
hyundaimovex-asanwas/asanwas-homepage
|
27e0ba1ed7b41313069e732f3dc9df20053caddd
|
75e30546f11258d8b70159cfbe8ee36b18371bd0
|
refs/heads/master
| 2023-06-07T03:41:10.170367
| 2021-07-01T10:23:54
| 2021-07-01T10:23:54
| 376,739,168
| 1
| 1
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,481
|
java
|
package pms.menu.help;
/***********************************************************************
* 작업 등록 / 디테일1 : 외주 협력사 + 공종 조회
************************************************************************/
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.servlet.ServletException;
import oracle.jdbc.OracleTypes;
import com.gauce.GauceDataSet;
import com.gauce.http.HttpGauceRequest;
import com.gauce.http.HttpGauceResponse;
import com.gauce.io.GauceInputStream;
import com.gauce.io.GauceOutputStream;
import sales.common.HDUtil;
import sales.common.StringUtil;
import pms.common.SuperServlet;
public class Si110H_01 extends SuperServlet {
private static final long serialVersionUID = 1L;
public void makeSql() {
for(int i=0; i<arr_sql.length; i++){
arr_sql[i] = new StringBuffer();
}
arr_sql[0].append ("{call PMS.PR_SI110I_23(?,?) }" );
}
public void init(Connection conn, HttpGauceRequest greq, HttpGauceResponse gres) throws ServletException, Exception {
}
// 조회 method
public void select(Connection conn, HttpGauceRequest greq, HttpGauceResponse gres) throws ServletException, Exception {
CallableStatement cstmt = null;
ResultSet rs = null;
/* DataSet */
GauceDataSet ds1 = null;
try {
GauceInputStream gis = greq.getGauceInputStream();
GauceOutputStream gos = gres.getGauceOutputStream();
// DataSet 생성
ds1 = new GauceDataSet();
int dsType = HDUtil.nullCheckNum(greq.getParameter("dsType"));
int v_site_sid = HDUtil.nullCheckNum(greq.getParameter("v_site_sid"));
//StringUtil.printMsg("v_keyword", v_keyword, this);
cstmt = conn.prepareCall(arr_sql[0].toString());
cstmt.setInt(1, v_site_sid);
cstmt.registerOutParameter(2, OracleTypes.CURSOR); //결과를 받을 커서
cstmt.executeQuery();
rs = (ResultSet)cstmt.getObject(2); //커서 OUT param.
gos.write(getDataSet(rs, ds1));
} catch (SQLException sqle){
//gres.writeException("ERROR", sqle.getErrorCode()+"", sqle.getMessage());
throw sqle;
} catch (Exception e){
//res.writeException("ERROR", "", e.toString());
throw e;
} finally {
if(rs!=null) rs.close();
if(cstmt!=null) cstmt.close();
}
}
public void apply(Connection conn, HttpGauceRequest greq, HttpGauceResponse gres) throws ServletException, Exception {
}
}
|
[
"[email protected]"
] | |
b7ef555e04ec8c9226c87304438bfbc64e8ceadc
|
95d20c83d8aff34e314c56a3ecb2b87c9fa9fc86
|
/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/BreakpointsDecompilerMarginProvider.java
|
2921048c8328e8ebafd3c4a0667e8c9c70d6f3a9
|
[
"GPL-1.0-or-later",
"GPL-3.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
NationalSecurityAgency/ghidra
|
969fe0d2ca25cb8ac72f66f0f90fc7fb2dbfa68d
|
7cc135eb6bfabd166cbc23f7951dae09a7e03c39
|
refs/heads/master
| 2023-08-31T21:20:23.376055
| 2023-08-29T23:08:54
| 2023-08-29T23:08:54
| 173,228,436
| 45,212
| 6,204
|
Apache-2.0
| 2023-09-14T18:00:39
| 2019-03-01T03:27:48
|
Java
|
UTF-8
|
Java
| false
| false
| 4,405
|
java
|
/* ###
* IP: GHIDRA
*
* 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 ghidra.app.plugin.core.debug.gui.breakpoint;
import java.awt.*;
import java.awt.event.*;
import java.math.BigInteger;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import javax.swing.JPanel;
import docking.widgets.fieldpanel.LayoutModel;
import docking.widgets.fieldpanel.listener.IndexMapper;
import docking.widgets.fieldpanel.listener.LayoutModelListener;
import ghidra.app.decompiler.ClangLine;
import ghidra.app.decompiler.component.margin.DecompilerMarginProvider;
import ghidra.app.decompiler.component.margin.LayoutPixelIndexMap;
import ghidra.app.services.LogicalBreakpoint;
import ghidra.app.services.LogicalBreakpoint.State;
import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramLocation;
import ghidra.trace.model.breakpoint.TraceBreakpointKind;
public class BreakpointsDecompilerMarginProvider extends JPanel
implements DecompilerMarginProvider, LayoutModelListener {
private Program program;
private LayoutModel model;
private LayoutPixelIndexMap pixmap;
private final DebuggerBreakpointMarkerPlugin plugin;
public BreakpointsDecompilerMarginProvider(DebuggerBreakpointMarkerPlugin plugin) {
this.plugin = plugin;
setPreferredSize(new Dimension(16, 0));
addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
doToggleBreakpoint(e);
}
});
}
@Override
public void setProgram(Program program, LayoutModel model, LayoutPixelIndexMap pixmap) {
this.program = program;
setLayoutManager(model);
this.pixmap = pixmap;
repaint();
}
private void setLayoutManager(LayoutModel model) {
if (this.model == model) {
return;
}
if (this.model != null) {
this.model.removeLayoutModelListener(this);
}
this.model = model;
if (this.model != null) {
this.model.addLayoutModelListener(this);
}
}
@Override
public Component getComponent() {
return this;
}
@Override
public void modelSizeChanged(IndexMapper indexMapper) {
repaint();
}
@Override
public void dataChanged(BigInteger start, BigInteger end) {
repaint();
}
@Override
public void paint(Graphics g) {
super.paint(g);
if (plugin.breakpointService == null) {
return;
}
Rectangle visible = getVisibleRect();
BigInteger startIdx = pixmap.getIndex(visible.y);
BigInteger endIdx = pixmap.getIndex(visible.y + visible.height);
List<ClangLine> lines = plugin.decompilerMarginService.getDecompilerPanel().getLines();
for (BigInteger index = startIdx; index.compareTo(endIdx) <= 0; index =
index.add(BigInteger.ONE)) {
int i = index.intValue();
if (i >= lines.size()) {
continue;
}
ClangLine line = lines.get(i);
List<ProgramLocation> locs =
DebuggerBreakpointMarkerPlugin.getLocationsFromLine(program, line);
State state = plugin.computeState(locs);
if (state.icon != null) {
state.icon.paintIcon(this, g, 0, pixmap.getPixel(index));
}
}
}
private void doToggleBreakpoint(MouseEvent e) {
if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
int i = pixmap.getIndex(e.getY()).intValue();
List<ClangLine> lines = plugin.decompilerMarginService.getDecompilerPanel().getLines();
List<ProgramLocation> locs =
DebuggerBreakpointMarkerPlugin.nearestLocationsToLine(program, i, lines);
if (locs == null || locs.isEmpty()) {
return;
}
Set<LogicalBreakpoint> col = plugin.collectBreakpoints(locs);
plugin.breakpointService.toggleBreakpointsAt(col, locs.get(0), () -> {
plugin.placeBreakpointDialog.prompt(plugin.getTool(), plugin.breakpointService,
"Set breakpoint", locs.get(0), 1, Set.of(TraceBreakpointKind.SW_EXECUTE), "");
// Not great, but I'm not sticking around for the dialog
return CompletableFuture.completedFuture(Set.of());
});
}
}
}
|
[
"[email protected]"
] | |
00155cc5590195cf839837b3bf485ea930cd480d
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/miniapplcdp-20200113/src/main/java/com/aliyun/miniapplcdp20200113/models/CreateDomainResponse.java
|
0d3b2c9198ed5d02b18d576db1cfa3ce193e9355
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,042
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.miniapplcdp20200113.models;
import com.aliyun.tea.*;
public class CreateDomainResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public CreateDomainResponseBody body;
public static CreateDomainResponse build(java.util.Map<String, ?> map) throws Exception {
CreateDomainResponse self = new CreateDomainResponse();
return TeaModel.build(map, self);
}
public CreateDomainResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public CreateDomainResponse setBody(CreateDomainResponseBody body) {
this.body = body;
return this;
}
public CreateDomainResponseBody getBody() {
return this.body;
}
}
|
[
"[email protected]"
] | |
7891fb6d196d75108abdeab1079c01343df5f4f1
|
e6f0bc837ffbed6feba29b5cefbff3d1f14b4827
|
/src/main/java/com/contentbig/kgdatalake/graphql/generated/DeleteProductPayloadTueryDefinition.java
|
70f8ffca0cff022465eff1ef5ba5e284becc39cb
|
[
"Apache-2.0"
] |
permissive
|
covid19angels/kgis-datalake-dgraph
|
1b152657a105e8c9fb503a5f47464aab853d7557
|
66e3bfabcd24dc1bfd6b8776f563b117362dbf2d
|
refs/heads/master
| 2021-05-23T00:05:36.151365
| 2020-04-22T09:38:52
| 2020-04-22T09:38:52
| 253,148,309
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 248
|
java
|
// Generated from graphql_java_gen gem with template TueryDefinition.java.erb
package com.contentbig.kgdatalake.graphql.generated;
public interface DeleteProductPayloadTueryDefinition {
void define(DeleteProductPayloadTuery _queryBuilder);
}
|
[
"[email protected]"
] | |
17d16313bd65d4cbf6ae594044de55a6717ed247
|
6249a2b3928e2509b8a5d909ef9d8e18221d9637
|
/revolsys-core/src/main/java/com/revolsys/geometry/geomgraph/Depth.java
|
c20cbae561183ed41cc5841b1aacc97d1fb2d8ab
|
[
"Apache-2.0"
] |
permissive
|
revolsys/com.revolsys.open
|
dbcdc3bdcee3276dc3680311948e91ec64e1264e
|
7f4385c632094eb5ed67c0646ee3e2e258fba4e4
|
refs/heads/main
| 2023-08-22T17:18:48.499931
| 2023-05-31T01:59:22
| 2023-05-31T01:59:22
| 2,709,026
| 5
| 11
|
NOASSERTION
| 2023-05-31T01:59:23
| 2011-11-04T12:33:49
|
Java
|
UTF-8
|
Java
| false
| false
| 4,727
|
java
|
/*
* The JTS Topology Suite is a collection of Java classes that
* implement the fundamental operations required to validate a given
* geo-spatial data set to a known topological specification.
*
* Copyright (C) 2001 Vivid Solutions
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, contact:
*
* Vivid Solutions
* Suite #1A
* 2328 Government Street
* Victoria BC V8T 5G5
* Canada
*
* (250)385-6040
* www.vividsolutions.com
*/
package com.revolsys.geometry.geomgraph;
import java.util.Arrays;
import com.revolsys.geometry.model.Location;
/**
* A Depth object records the topological depth of the sides
* of an Edge for up to two Geometries.
* @version 1.7
*/
public class Depth {
private final static int NULL_VALUE = -1;
public static int depthAtLocation(final Location location) {
if (location == Location.EXTERIOR) {
return 0;
}
if (location == Location.INTERIOR) {
return 1;
}
return NULL_VALUE;
}
private final int[][] depth = new int[2][3];
public Depth() {
// initialize depth array to a sentinel value
for (final int[] depths : this.depth) {
Arrays.fill(depths, NULL_VALUE);
}
}
public void add(final int geomIndex, final int posIndex, final Location location) {
if (location == Location.INTERIOR) {
this.depth[geomIndex][posIndex]++;
}
}
public void add(final Label lbl) {
int i = 0;
for (final int[] depths : this.depth) {
for (int j = 1; j < 3; j++) {
final Location loc = lbl.getLocation(i, j);
if (loc == Location.EXTERIOR || loc == Location.INTERIOR) {
// initialize depth if it is null, otherwise add this location value
if (isNull(i, j)) {
depths[j] = depthAtLocation(loc);
} else {
depths[j] += depthAtLocation(loc);
}
}
}
i++;
}
}
public int getDelta(final int geomIndex) {
return this.depth[geomIndex][Position.RIGHT] - this.depth[geomIndex][Position.LEFT];
}
public int getDepth(final int geomIndex, final int posIndex) {
return this.depth[geomIndex][posIndex];
}
public Location getLocation(final int geomIndex, final int posIndex) {
if (this.depth[geomIndex][posIndex] <= 0) {
return Location.EXTERIOR;
}
return Location.INTERIOR;
}
/**
* A Depth object is null (has never been initialized) if all depths are null.
*/
public boolean isNull() {
for (final int[] depths : this.depth) {
for (final int depth : depths) {
if (depth != NULL_VALUE) {
return false;
}
}
}
return true;
}
public boolean isNull(final int geomIndex) {
return this.depth[geomIndex][1] == NULL_VALUE;
}
public boolean isNull(final int geomIndex, final int posIndex) {
return this.depth[geomIndex][posIndex] == NULL_VALUE;
}
/**
* Normalize the depths for each geometry, if they are non-null.
* A normalized depth
* has depth values in the set { 0, 1 }.
* Normalizing the depths
* involves reducing the depths by the same amount so that at least
* one of them is 0. If the remaining value is > 0, it is set to 1.
*/
public void normalize() {
for (final int[] depths : this.depth) {
int minDepth = depths[1];
if (!(minDepth == NULL_VALUE)) {
if (depths[2] < minDepth) {
minDepth = depths[2];
}
if (minDepth < 0) {
minDepth = 0;
}
for (int j = 1; j < 3; j++) {
int newValue = 0;
if (depths[j] > minDepth) {
newValue = 1;
}
depths[j] = newValue;
}
}
}
}
public void setDepth(final int geomIndex, final int posIndex, final int depthValue) {
this.depth[geomIndex][posIndex] = depthValue;
}
@Override
public String toString() {
return "A: " + this.depth[0][1] + "," + this.depth[0][2] + " B: " + this.depth[1][1] + ","
+ this.depth[1][2];
}
}
|
[
"[email protected]"
] | |
71978590f9f87f78765a6d0ad4416a601b01dcca
|
d85b8ae4499b404eabfa344acb528cf30c6ebbf3
|
/SpringDay08DB/src/mapper/BookMapper.java
|
87fda443c7adbfb45b6a74a401281c7d9a487752
|
[] |
no_license
|
irrationnelle/SpringWorkspace
|
ed44100de143a0aa57642b9a51283071091cf837
|
c0e3de0a6ba112f7f80589681bf2e6aa3eadcf78
|
refs/heads/master
| 2020-06-12T13:28:31.656252
| 2017-01-03T08:48:31
| 2017-01-03T08:48:31
| 75,814,600
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 320
|
java
|
package mapper;
import java.util.List;
import java.util.Map;
import vo.Book;
// xml_interface.BookMapper
public interface BookMapper {
public int insertBook(Book book);
public int deleteBook(Map<String, Integer> paramMap);
public Book selectBook(int book_num);
public List<Book> selectBookList();
}
|
[
"[email protected]"
] | |
bce0ed58fa8a48526b4a339dd096a725615caa3b
|
046f8ad87afcb77957a0cc7aa94080214d04c5cc
|
/Chp. 16 - More Problems (Moderate)/_16_20_T9__HashMap_Solution/T9.java
|
b69320b0f1d4fefee2d1f19e55d6c12daac24bf4
|
[] |
no_license
|
sindhu819/Cracking-the-Coding-Interview_solutions
|
7336901d773a0e4b88febac4d01b73f486d36487
|
23b0d5533449a4fa995e445cad026f13d489517a
|
refs/heads/master
| 2020-09-11T12:36:49.758028
| 2019-08-18T22:19:11
| 2019-08-18T22:19:11
| 222,066,798
| 0
| 1
| null | 2019-11-16T08:03:01
| 2019-11-16T08:03:01
| null |
UTF-8
|
Java
| false
| false
| 1,691
|
java
|
package _16_20_T9__HashMap_Solution;
import java.util.*;
// Algorithm: Pre-process all words into a HashMap<String, List<String>> where
// key = Number (well, only numbers that give valid words will be included)
// value = List of Valid Words
public class T9 {
private Map<Character, Character> letterToDigit;
public T9() {
letterToDigit = new HashMap<>();
for (char ch = 'a'; ch <= 'c'; ch++) letterToDigit.put(ch, '2');
for (char ch = 'd'; ch <= 'f'; ch++) letterToDigit.put(ch, '3');
for (char ch = 'g'; ch <= 'i'; ch++) letterToDigit.put(ch, '4');
for (char ch = 'j'; ch <= 'l'; ch++) letterToDigit.put(ch, '5');
for (char ch = 'm'; ch <= 'o'; ch++) letterToDigit.put(ch, '6');
for (char ch = 'p'; ch <= 's'; ch++) letterToDigit.put(ch, '7');
for (char ch = 't'; ch <= 'v'; ch++) letterToDigit.put(ch, '8');
for (char ch = 'w'; ch <= 'z'; ch++) letterToDigit.put(ch, '9');
}
public Map<String, List<String>> buildMap(String[] words) {
Map<String, List<String>> map = new HashMap<>();
for (String word : words) {
String number = getNumber(word);
map.putIfAbsent(number, new ArrayList<>());
List<String> listOfWords = map.get(number);
listOfWords.add(word);
}
return map;
}
private String getNumber(String str) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < str.length(); i++) {
char ch = letterToDigit.get(str.charAt(i));
sb.append(ch);
}
return sb.toString();
}
}
// Time Complexity: O(1) lookup (after preprocessing)
|
[
"[email protected]"
] | |
a4b68693c96f58741ed99b2b4760c67f30551e26
|
31aa78b01c1438148bab51cae0bb9eeaffb0770d
|
/src/Problems/SurroundedRegions.java
|
0bae029ef591b3c764c603c8d6454af7fc111c5a
|
[] |
no_license
|
ChopinXBP/LeetCode-Babel
|
b11a688d539fc75e5926d2080baed498a6dd64f2
|
d888dd73fe96c6c58d5fecd69420e765cafe201c
|
refs/heads/master
| 2021-06-29T18:22:33.726023
| 2021-01-22T04:59:19
| 2021-01-22T04:59:19
| 211,246,259
| 10
| 1
| null | 2020-07-06T15:40:23
| 2019-09-27T05:56:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,628
|
java
|
package Problems;
/**
*
* Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'.
* A region is captured by flipping all 'O's into 'X's in that surrounded region.
* 给定一个二维的矩阵,包含 'X' 和 'O'(字母 O)。
* 找到所有被 'X' 围绕的区域,并将这些区域里所有的 'O' 用 'X' 填充。
*
*/
public class SurroundedRegions {
//单独标记所有边界的O,将所有非边界O改为X
public void solve(char[][] board) {
if(board.length == 0){
return;
}
int row = board.length;
int col = board[0].length;
for(int i = 0; i < row; i++){
DFS(i, 0, row, col, board);
DFS(i, col - 1, row, col, board);
}
for(int j = 1; j < col-1; j++){
DFS(0, j, row, col, board);
DFS(row - 1, j, row, col, board);
}
for(int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
if(board[i][j] == '#'){
board[i][j] = 'O';
}else if(board[i][j] == 'O'){
board[i][j] = 'X';
}
}
}
}
//DFS将所有边界的‘O’标记为‘#’
public void DFS(int x, int y, int row, int col, char[][] board){
if(x < row && x >= 0 && y < col && y >= 0 && board[x][y] == 'O'){
board[x][y] = '#';
DFS(x + 1, y, row, col, board);
DFS(x - 1, y, row, col, board);
DFS(x, y + 1, row, col, board);
DFS(x, y - 1, row, col, board);
}
}
}
|
[
"l"
] |
l
|
52165e8daf8187005c0bf4ae20eb9b2d6e550a3d
|
8228efa27043e0a236ca8003ec0126012e1fdb02
|
/L2JOptimus_Core/java/net/sf/l2j/gameserver/scripting/quests/Q050_LanoscosSpecialBait.java
|
a470f8965cb2ab4927539aac7a41e7fd1c4714b8
|
[] |
no_license
|
wan202/L2JDeath
|
9982dfce14ae19a22392955b996b42dc0e8cede6
|
e0ab026bf46ac82c91bdbd048a0f50dc5213013b
|
refs/heads/master
| 2020-12-30T12:35:59.808276
| 2017-05-16T18:57:25
| 2017-05-16T18:57:25
| 91,397,726
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,297
|
java
|
package net.sf.l2j.gameserver.scripting.quests;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.scripting.Quest;
import net.sf.l2j.gameserver.scripting.QuestState;
import net.sf.l2j.gameserver.scripting.quests.audio.Sound;
public class Q050_LanoscosSpecialBait extends Quest
{
private static final String qn = "Q050_LanoscosSpecialBait";
// Item
private static final int ESSENCE_OF_WIND = 7621;
// Reward
private static final int WIND_FISHING_LURE = 7610;
public Q050_LanoscosSpecialBait()
{
super(50, "Lanosco's Special Bait");
setItemsIds(ESSENCE_OF_WIND);
addStartNpc(31570); // Lanosco
addTalkId(31570);
addKillId(21026); // Singing wind
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
String htmltext = event;
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
if (event.equalsIgnoreCase("31570-03.htm"))
{
st.setState(STATE_STARTED);
st.set("cond", "1");
st.playSound(Sound.SOUND_ACCEPT);
}
else if (event.equalsIgnoreCase("31570-07.htm"))
{
htmltext = "31570-06.htm";
st.takeItems(ESSENCE_OF_WIND, -1);
st.rewardItems(WIND_FISHING_LURE, 4);
st.playSound(Sound.SOUND_FINISH);
st.exitQuest(false);
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
QuestState st = player.getQuestState(qn);
String htmltext = getNoQuestMsg();
if (st == null)
return htmltext;
switch (st.getState())
{
case STATE_CREATED:
htmltext = (player.getLevel() < 27) ? "31570-02.htm" : "31570-01.htm";
break;
case STATE_STARTED:
htmltext = (st.getQuestItemsCount(ESSENCE_OF_WIND) == 100) ? "31570-04.htm" : "31570-05.htm";
break;
case STATE_COMPLETED:
htmltext = getAlreadyCompletedMsg();
break;
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player player, boolean isPet)
{
QuestState st = checkPlayerCondition(player, npc, "cond", "1");
if (st == null)
return null;
if (st.dropItems(ESSENCE_OF_WIND, 1, 100, 500000))
st.set("cond", "2");
return null;
}
}
|
[
"wande@DESKTOP-DM71DUV"
] |
wande@DESKTOP-DM71DUV
|
b9248122194dde13b543b000c803b69ec6423861
|
7ba074aaff5db3aa507df21ac8f421e41838ff24
|
/mfw/mfw/src/com/mfw/util/FileUtil.java
|
c9e6db770d8a439ea074f2c7ea0f4abd02ca99bd
|
[] |
no_license
|
eideo/framework
|
72ae19c53cded98bdeeb31b6460087ba3d3bad63
|
36b83a0a953c97025277eb434b972ad910ba30c1
|
refs/heads/master
| 2020-12-30T15:43:18.681234
| 2015-11-20T18:25:04
| 2015-11-20T18:25:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,047
|
java
|
package com.mfw.util;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileChannel.MapMode;
public class FileUtil {
public static void main(String[] args) {
String dirName = "d:/mfw/topic/";// 创建目录
FileUtil.createDir(dirName);
}
/**
* 创建目录
*
* @param destDirName 目标目录名
* @return 目录创建成功返回true,否则返回false
*/
public static boolean createDir(String destDirName) {
File dir = new File(destDirName);
if (dir.exists()) {
return false;
}
if (!destDirName.endsWith(File.separator)) {
destDirName = destDirName + File.separator;
}
// 创建单个目录
if (dir.mkdirs()) {
return true;
} else {
return false;
}
}
/**
* 删除文件
*
* @param filePathAndName String 文件路径及名称 如c:/fqf.txt
* @param fileContent String
* @return boolean
*/
public static void delFile(String filePathAndName) {
try {
String filePath = filePathAndName;
filePath = filePath.toString();
java.io.File myDelFile = new java.io.File(filePath);
myDelFile.delete();
} catch (Exception e) {
System.out.println("删除文件操作出错");
e.printStackTrace();
}
}
/**
* 读取到字节数组0
*
* @param filePath //路径
* @throws IOException
*/
public static byte[] getContent(String filePath) throws IOException {
File file = new File(filePath);
long fileSize = file.length();
if (fileSize > Integer.MAX_VALUE) {
System.out.println("file too big...");
return null;
}
FileInputStream fi = new FileInputStream(file);
byte[] buffer = new byte[(int) fileSize];
int offset = 0;
int numRead = 0;
while (offset < buffer.length && (numRead = fi.read(buffer, offset, buffer.length - offset)) >= 0) {
offset += numRead;
}
// 确保所有数据均被读取
if (offset != buffer.length) {
throw new IOException("Could not completely read file " + file.getName());
}
fi.close();
return buffer;
}
/**
* 读取到字节数组1
*
* @param filePath
* @return
* @throws IOException
*/
public static byte[] toByteArray(String filePath) throws IOException {
File f = new File(filePath);
if (!f.exists()) {
throw new FileNotFoundException(filePath);
}
ByteArrayOutputStream bos = new ByteArrayOutputStream((int) f.length());
BufferedInputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(f));
int buf_size = 1024;
byte[] buffer = new byte[buf_size];
int len = 0;
while (-1 != (len = in.read(buffer, 0, buf_size))) {
bos.write(buffer, 0, len);
}
return bos.toByteArray();
} catch (IOException e) {
e.printStackTrace();
throw e;
} finally {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
bos.close();
}
}
/**
* 读取到字节数组2
*
* @param filePath
* @return
* @throws IOException
*/
public static byte[] toByteArray2(String filePath) throws IOException {
File f = new File(filePath);
if (!f.exists()) {
throw new FileNotFoundException(filePath);
}
FileChannel channel = null;
FileInputStream fs = null;
try {
fs = new FileInputStream(f);
channel = fs.getChannel();
ByteBuffer byteBuffer = ByteBuffer.allocate((int) channel.size());
while ((channel.read(byteBuffer)) > 0) {
// do nothing
// System.out.println("reading");
}
return byteBuffer.array();
} catch (IOException e) {
e.printStackTrace();
throw e;
} finally {
try {
channel.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
fs.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* Mapped File way MappedByteBuffer 可以在处理大文件时,提升性能
*
* @param filename
* @return
* @throws IOException
*/
public static byte[] toByteArray3(String filePath) throws IOException {
FileChannel fc = null;
RandomAccessFile rf = null;
try {
rf = new RandomAccessFile(filePath, "r");
fc = rf.getChannel();
MappedByteBuffer byteBuffer = fc.map(MapMode.READ_ONLY, 0, fc.size()).load();
//System.out.println(byteBuffer.isLoaded());
byte[] result = new byte[(int) fc.size()];
if (byteBuffer.remaining() > 0) {
// System.out.println("remain");
byteBuffer.get(result, 0, byteBuffer.remaining());
}
return result;
} catch (IOException e) {
e.printStackTrace();
throw e;
} finally {
try {
rf.close();
fc.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
|
[
"[email protected]"
] | |
33a79dd8b14db4bdc67236ae021c9bac36a51913
|
7a53089d9bb134cf9e42a03bc49bc4b283e86594
|
/app/src/test/java/be/ugent/zeus/hydra/library/LibraryTest.java
|
cf7cd50b0c42216485357ca61bfed2f6e6df9b23
|
[] |
no_license
|
engmms/hydra-android
|
80fa6ac43bc94765a2ea6ef7dd1879e02a1a3f71
|
9d1fc46ac1d9fbe0bc4d5dddd116220e8e92edee
|
refs/heads/master
| 2020-12-04T15:42:37.593931
| 2019-09-21T17:32:45
| 2019-09-21T17:32:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 919
|
java
|
package be.ugent.zeus.hydra.library;
import be.ugent.zeus.hydra.common.ModelTest;
import nl.jqno.equalsverifier.Warning;
import org.junit.Test;
import static be.ugent.zeus.hydra.testing.Utils.defaultVerifier;
import static be.ugent.zeus.hydra.testing.Utils.generate;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Niko Strijbol
*/
public class LibraryTest extends ModelTest<Library> {
public LibraryTest() {
super(Library.class);
}
@Test
public void hasTelephone() {
Library empty = new Library();
assertFalse(empty.hasTelephone());
Library full = generate(Library.class);
assertTrue(full.hasTelephone());
}
@Test
@Override
public void equalsAndHash() {
defaultVerifier(Library.class)
.withOnlyTheseFields("code", "favourite")
.verify();
}
}
|
[
"[email protected]"
] | |
ce3f7efe0522e2c766aba10f596d418ac4c892fd
|
0e30f1998d8e06d5ca177ad53ad1b7efb0ed0cad
|
/jBPM6Example_persistence_basic_BPMS6/src/test/java/com/sample/ProcessJPATest.java
|
8c67322a2a802105faffd4a81de7391d213f4e9f
|
[
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
cjk007/jbpm6example
|
ba999f2ca22b975370923b3caed57c4f4634eacc
|
8679948c6cafd199eb3a92f55c38fe12c9a09d82
|
refs/heads/master
| 2021-01-16T18:23:12.027586
| 2014-10-22T03:25:13
| 2014-10-22T03:25:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,782
|
java
|
package com.sample;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import junit.framework.TestCase;
import org.jbpm.process.audit.JPAAuditLogService;
import org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder;
import org.jbpm.services.task.identity.JBossUserGroupCallbackImpl;
import org.jbpm.test.JBPMHelper;
import org.junit.Test;
import org.kie.api.io.ResourceType;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.manager.RuntimeEngine;
import org.kie.api.runtime.manager.RuntimeEnvironment;
import org.kie.api.runtime.manager.RuntimeManager;
import org.kie.api.runtime.manager.RuntimeManagerFactory;
import org.kie.api.runtime.process.ProcessInstance;
import org.kie.api.task.TaskService;
import org.kie.api.task.UserGroupCallback;
import org.kie.api.task.model.TaskSummary;
import org.kie.internal.io.ResourceFactory;
import org.kie.internal.runtime.manager.context.EmptyContext;
import bitronix.tm.BitronixTransactionManager;
import bitronix.tm.TransactionManagerServices;
import bitronix.tm.resource.jdbc.PoolingDataSource;
/**
* This is a sample file to launch a process.
*/
public class ProcessJPATest extends TestCase {
private static EntityManagerFactory emf;
@Test
public void testProcess() throws Exception {
try {
setup();
RuntimeManager manager = getRuntimeManager("sample.bpmn");
RuntimeEngine runtime = manager.getRuntimeEngine(EmptyContext.get());
KieSession ksession = runtime.getKieSession();
// JPAAuditLogService logService = new
// JPAAuditLogService(ksession.getEnvironment());
// logService.clear();
BitronixTransactionManager transactionManager = TransactionManagerServices.getTransactionManager();
transactionManager.setTransactionTimeout(3600); // longer timeout
// for a debugger
// start a new process instance
Map<String, Object> params = new HashMap<String, Object>();
ProcessInstance pi = ksession.startProcess("com.sample.bpmn.hello", params);
System.out.println("A process instance started : pid = " + pi.getId());
TaskService taskService = runtime.getTaskService();
// ------------
{
List<TaskSummary> list = taskService.getTasksAssignedAsPotentialOwner("john", "en-UK");
for (TaskSummary taskSummary : list) {
System.out.println("john starts a task : taskId = " + taskSummary.getId());
taskService.start(taskSummary.getId(), "john");
taskService.complete(taskSummary.getId(), "john", null);
}
}
// -----------
{
List<TaskSummary> list = taskService.getTasksAssignedAsPotentialOwner("mary", "en-UK");
for (TaskSummary taskSummary : list) {
System.out.println("mary starts a task : taskId = " + taskSummary.getId());
taskService.start(taskSummary.getId(), "mary");
taskService.complete(taskSummary.getId(), "mary", null);
}
}
// -----------
manager.disposeRuntimeEngine(runtime);
} catch (Throwable th) {
th.printStackTrace();
}
System.exit(0);
}
private static void setup() {
// for H2 datasource
JBPMHelper.startH2Server();
JBPMHelper.setupDataSource();
// for external database datasource
// setupDataSource();
Map configOverrides = new HashMap();
configOverrides.put("hibernate.hbm2ddl.auto", "create"); // Uncomment if you don't want to clean up tables
configOverrides.put("hibernate.dialect", "org.hibernate.dialect.H2Dialect"); // Edit for other databases
// configOverrides.put("hibernate.dialect", "org.hibernate.dialect.MySQL5InnoDBDialect");
emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa", configOverrides);
}
private static RuntimeManager getRuntimeManager(String process) {
Properties properties = new Properties();
properties.setProperty("krisv", "");
properties.setProperty("mary", "");
properties.setProperty("john", "");
UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties);
RuntimeEnvironment environment =
RuntimeEnvironmentBuilder.getDefault()
.persistence(true)
.entityManagerFactory(emf)
.userGroupCallback(userGroupCallback)
.addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2)
.get();
return RuntimeManagerFactory.Factory.get().newPerProcessInstanceRuntimeManager(environment);
}
public static PoolingDataSource setupDataSource() {
// Please edit here when you want to use your database
PoolingDataSource pds = new PoolingDataSource();
pds.setUniqueName("jdbc/jbpm-ds");
pds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
pds.setMaxPoolSize(5);
pds.setAllowLocalTransactions(true);
pds.getDriverProperties().put("user", "mysql");
pds.getDriverProperties().put("password", "mysql");
pds.getDriverProperties().put("url", "jdbc:mysql://localhost:3306/testbpms602");
pds.getDriverProperties().put("driverClassName", "com.mysql.jdbc.Driver");
pds.init();
return pds;
}
}
|
[
"[email protected]"
] | |
ae2438814871249b914a0e842f14a1141f42a0cf
|
82159a65b13fdfd538a17448f3a572a11489c564
|
/app/src/test/java/com.danilov.supermanga/core/repository/realweb/MangaReaderNetTest.java
|
603ffa56d24d296bbec56a0a2312a04d84683eab
|
[
"Apache-2.0"
] |
permissive
|
SammyVimes/manga
|
130329f9cc7be733b6a2a2cb7021b9ad42a1c6f3
|
971f24e943239e9c1638d5da3c96b0cd33a96c88
|
refs/heads/master
| 2021-01-19T01:06:21.141338
| 2018-10-01T10:59:21
| 2018-10-01T10:59:21
| 53,887,772
| 30
| 13
| null | 2018-04-08T05:06:01
| 2016-03-14T20:02:52
|
Java
|
UTF-8
|
Java
| false
| false
| 4,797
|
java
|
package com.danilov.supermanga.core.repository.realweb;
import com.danilov.supermanga.BuildConfig;
import com.danilov.supermanga.core.model.Manga;
import com.danilov.supermanga.core.model.MangaChapter;
import com.danilov.supermanga.core.model.MangaSuggestion;
import com.danilov.supermanga.core.repository.MangaReaderNetEngine;
import com.danilov.supermanga.core.repository.RepositoryEngine;
import com.danilov.supermanga.core.repository.RepositoryException;
import com.danilov.supermanga.core.repository.RepositoryHolder;
import com.danilov.supermanga.core.util.ServiceContainer;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import java.util.Collections;
import java.util.List;
/**
* Created by Semyon on 19.03.2016.
*/
@RunWith(RobolectricTestRunner.class)
@Config(constants = BuildConfig.class, sdk = 21)
public class MangaReaderNetTest {
private MangaReaderNetEngine engine;
@Before
public void setUp() {
RepositoryHolder service = ServiceContainer.getService(RepositoryHolder.class);
RepositoryEngine.Repository repository = service.valueOf(RepositoryEngine.DefaultRepository.MANGAREADERNET.toString());
engine = (MangaReaderNetEngine) repository.getEngine();
}
@After
public void tearDown() {
}
@Test
public void testGetSuggestions() {
List<MangaSuggestion> suggestions = null;
try {
suggestions = engine.getSuggestions("Naru");
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
Assert.assertNotNull(suggestions);
Assert.assertTrue(!suggestions.isEmpty());
}
@Test
public void testQueryRepository() {
List<Manga> searchResults = null;
try {
searchResults = engine.queryRepository("Dragon", Collections.emptyList());
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
Assert.assertNotNull(searchResults);
Assert.assertTrue(!searchResults.isEmpty());
}
@Test
public void testQueryForMangaDescription() {
List<Manga> searchResults = null;
try {
searchResults = engine.queryRepository("Dragon", Collections.emptyList());
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
Assert.assertNotNull(searchResults);
Assert.assertTrue(!searchResults.isEmpty());
Manga manga = searchResults.get(0);
try {
boolean success = engine.queryForMangaDescription(manga);
Assert.assertTrue(success);
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
}
@Test
public void testQueryForMangaChapters() {
List<Manga> searchResults = null;
try {
searchResults = engine.queryRepository("Dragon", Collections.emptyList());
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
Assert.assertNotNull(searchResults);
Assert.assertTrue(!searchResults.isEmpty());
Manga manga = searchResults.get(0);
try {
boolean success = engine.queryForChapters(manga);
Assert.assertTrue(success);
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
}
@Test
public void testQueryForChapterImages() {
List<Manga> searchResults = null;
try {
searchResults = engine.queryRepository("Dragon", Collections.emptyList());
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
Assert.assertNotNull(searchResults);
Assert.assertTrue(!searchResults.isEmpty());
Manga manga = searchResults.get(0);
try {
boolean success = engine.queryForChapters(manga);
Assert.assertTrue(success);
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
List<MangaChapter> chapters = manga.getChapters();
Assert.assertNotNull(chapters);
Assert.assertTrue(chapters.size() > 0);
MangaChapter mangaChapter = chapters.get(0);
try {
List<String> chapterImages = engine.getChapterImages(mangaChapter);
Assert.assertTrue(chapterImages.size() > 0);
} catch (RepositoryException e) {
Assert.fail("Should not fail: " + e.getMessage());
}
}
}
|
[
"[email protected]"
] | |
5777333481da6ac810ccf50b3c2afce06c4fabeb
|
8ad9e61b602e4fa12fc193ad24ab3483f50b7598
|
/IBM Proactive Technology Online/ProtonJ2SE/src/com/ibm/hrl/proton/metadata/epa/StatefulEventProcesingAgentType.java
|
64cafd8d293474cf801fee81c300eec83a38f0bf
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
mindis/Proton
|
91b54d6a9295d7f42c6fe4b3c18a8131d351ac0a
|
c1f2bd31194e0519dcc85e1f4626e8ac76b403a6
|
refs/heads/master
| 2020-05-29T12:22:39.582754
| 2015-04-28T14:16:59
| 2015-04-28T14:16:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,307
|
java
|
/*******************************************************************************
* Copyright 2014 IBM
*
* 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.ibm.hrl.proton.metadata.epa;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
import com.ibm.hrl.proton.metadata.computedVariable.IComputedVariableType;
import com.ibm.hrl.proton.metadata.context.interfaces.IContextType;
import com.ibm.hrl.proton.metadata.context.interfaces.ISegmentationContextType;
import com.ibm.hrl.proton.metadata.epa.enums.CardinalityPolicyEnum;
import com.ibm.hrl.proton.metadata.epa.enums.EPATypeEnum;
import com.ibm.hrl.proton.metadata.epa.enums.EvaluationPolicyEnum;
import com.ibm.hrl.proton.metadata.epa.interfaces.IDerivationSchema;
import com.ibm.hrl.proton.metadata.epa.interfaces.IFilteringSchema;
import com.ibm.hrl.proton.metadata.epa.interfaces.IMatchingSchema;
import com.ibm.hrl.proton.metadata.event.IEventType;
import com.ibm.hrl.proton.runtime.epa.interfaces.IExpression;
public class StatefulEventProcesingAgentType extends EventProcessingAgentType {
/**
*
*/
private static final long serialVersionUID = 1L;
public IMatchingSchema matchingSchema;
protected EvaluationPolicyEnum evaluation;
protected CardinalityPolicyEnum cardinality;
protected IExpression parsedAssertion;
protected String assertion;
protected Collection<ISegmentationContextType> epaSegmentation;
protected IComputedVariableType agentContextInformation;
public StatefulEventProcesingAgentType(UUID id, String name, EPATypeEnum epaType,
List<IEventType> inputEvents,
IMatchingSchema matchingSchema,
IFilteringSchema filteringSchema,
IDerivationSchema derivationSchema, IContextType context,
boolean isFair){
super(id, name, epaType, inputEvents,filteringSchema, derivationSchema, context,isFair);
this.matchingSchema = matchingSchema;
}
/**
* The order of input and output events in the input and derivation lists matter - should be as operands order
* @param id
* @param name
* @param epaType
* @param inputEvents
* @param derivedEvents
* @param matchingSchema
* @param filteringSchema
* @param derivationSchema
* @param context
* @param cardinality
* @param reportParticipants
* @param isFair
*/
public StatefulEventProcesingAgentType(
UUID id,
String name,
EPATypeEnum epaType, List<IEventType> inputEvents,
IMatchingSchema matchingSchema,
IFilteringSchema filteringSchema,
IDerivationSchema derivationSchema, IContextType context,
CardinalityPolicyEnum cardinality,
boolean isFair,String assertion, IExpression parsedExpression,EvaluationPolicyEnum evaluationPolicy,
Collection<ISegmentationContextType> epaSegmentation) {
super(id, name, epaType, inputEvents, filteringSchema,
derivationSchema, context, isFair);
this.matchingSchema = matchingSchema;
this.cardinality = cardinality;
this.parsedAssertion = parsedExpression;
this.evaluation = evaluationPolicy;
this.epaSegmentation = epaSegmentation;
// TODO Auto-generated constructor stub
}
public void setEpaSegmentation(Collection<ISegmentationContextType> epaSegmentation) {
this.epaSegmentation = epaSegmentation;
}
public EvaluationPolicyEnum getEvaluation() {
return evaluation;
}
public CardinalityPolicyEnum getCardinality() {
return cardinality;
}
public IExpression getParsedAssertion() {
return parsedAssertion;
}
public IMatchingSchema getMatchingSchema()
{
return matchingSchema;
}
public void setMatchingSchema(IMatchingSchema matchingSchema) {
this.matchingSchema = matchingSchema;
}
public void setEvaluation(EvaluationPolicyEnum evaluation) {
this.evaluation = evaluation;
}
public void setCardinality(CardinalityPolicyEnum cardinality) {
this.cardinality = cardinality;
}
public void setParsedAssertion(IExpression parsedAssertion) {
this.parsedAssertion = parsedAssertion;
}
public void setAssertion(String assertion) {
this.assertion = assertion;
}
public IComputedVariableType getAgentContextInformation() {
return agentContextInformation;
}
public void setAgentContextInformation(
IComputedVariableType agentContextInformation) {
this.agentContextInformation = agentContextInformation;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "EPA '"+getName()+"' of type: "+getType();
}
@Override
public Collection<ISegmentationContextType> getLocalSegmentation() {
return epaSegmentation;
}
}
|
[
"[email protected]"
] | |
c20a6cd43a0be62e60a12ac6ba5905ba8f8c4d2e
|
3f9c5f9bd4317d56196461f46b1d482c0a20df9b
|
/src/main/java/com/frostwire/jlibtorrent/plugins/SwigPlugin.java
|
5a4624f89be0791c314ccf3c219154be60d568e4
|
[
"MIT"
] |
permissive
|
davidxv/frostwire-jlibtorrent
|
2c2bf139ef8d2ebce1873f6638e59e1892ce5d91
|
c6a1c82dcb167b81bfe21cd0fc21a7d91c15e773
|
refs/heads/master
| 2021-01-17T20:17:20.655235
| 2015-10-20T05:06:01
| 2015-10-20T05:06:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,160
|
java
|
package com.frostwire.jlibtorrent.plugins;
import com.frostwire.jlibtorrent.*;
import com.frostwire.jlibtorrent.alerts.Alerts;
import com.frostwire.jlibtorrent.swig.*;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
/**
* @author gubatron
* @author aldenml
*/
public final class SwigPlugin extends swig_plugin {
private static final Logger LOG = Logger.getLogger(SwigPlugin.class);
private final Plugin p;
private final List<SwigTorrentPlugin> mem;
private final Object memLock;
private final List<SwigDhtPlugin> memDht;
public SwigPlugin(Plugin p) {
this.p = p;
this.mem = new LinkedList<SwigTorrentPlugin>();
this.memLock = new Object();
this.memDht = new LinkedList<SwigDhtPlugin>();
}
@Override
public swig_torrent_plugin new_torrent(torrent_handle t) {
try {
if (p.handleOperation(Plugin.Operation.NEW_TORRENT)) {
TorrentPlugin tp = p.newTorrent(new TorrentHandle(t));
if (tp != null) {
return pin(new SwigTorrentPlugin(tp, t));
}
}
} catch (Throwable e) {
LOG.error("Error in plugin (new_torrent)", e);
}
return super.new_torrent(t);
}
@Override
public void added(session_handle s) {
try {
p.added(new SessionHandle(s));
} catch (Throwable e) {
LOG.error("Error in plugin (added)", e);
}
}
@Override
public void register_dht_extensions(string_dht_extension_handler_listener_ptr_pair_vector dht_extensions) {
try {
if (p.handleOperation(Plugin.Operation.REGISTER_DHT_EXTENSIONS)) {
List<Pair<String, DhtPlugin>> plugins = new LinkedList<Pair<String, DhtPlugin>>();
p.registerDhtPlugins(plugins);
for (Pair<String, DhtPlugin> pp : plugins) {
String q = pp.first;
SwigDhtPlugin h = pin(new SwigDhtPlugin(pp.second));
string_dht_extension_handler_listener_ptr_pair pair = new string_dht_extension_handler_listener_ptr_pair(q, h);
dht_extensions.add(pair);
}
}
} catch (Throwable e) {
LOG.error("Error in plugin (register_dht_extensions)", e);
}
}
@Override
public void on_alert(alert a) {
try {
if (p.handleOperation(Plugin.Operation.ON_ALERT)) {
p.onAlert(Alerts.cast(a));
}
} catch (Throwable e) {
LOG.error("Error in plugin (on_alert)", e);
}
}
@Override
public boolean on_unknown_torrent(sha1_hash info_hash, peer_connection_handle pc, add_torrent_params p) {
try {
if (this.p.handleOperation(Plugin.Operation.ON_UNKNOWN_TORRENT)) {
return this.p.onUnknownTorrent(new Sha1Hash(info_hash), new PeerConnection(pc.native_handle()), new AddTorrentParams(p));
}
} catch (Throwable e) {
LOG.error("Error in plugin (on_unknown_torrent)", e);
}
return false;
}
@Override
public void on_tick() {
try {
p.onTick();
} catch (Throwable e) {
LOG.error("Error in plugin (on_tick)", e);
}
cleanup();
}
@Override
public boolean on_optimistic_unchoke(peer_connection_handle_vector peers) {
try {
if (this.p.handleOperation(Plugin.Operation.ON_OPTIMISTIC_UNCHOKE)) {
int size = (int) peers.size();
PeerConnectionHandle[] arr = new PeerConnectionHandle[size];
for (int i = 0; i < size; i++) {
arr[i] = new PeerConnectionHandle(peers.get(i));
}
return p.onOptimisticUnchoke(arr);
}
} catch (Throwable e) {
LOG.error("Error in plugin (on_optimistic_unchoke)", e);
}
return false;
}
@Override
public void save_state(entry e) {
try {
if (p.handleOperation(Plugin.Operation.SAVE_STATE)) {
p.saveState(new Entry(e));
}
} catch (Throwable t) {
LOG.error("Error in plugin (save_state)", t);
}
}
@Override
public void load_state(bdecode_node n) {
try {
if (p.handleOperation(Plugin.Operation.LOAD_STATE)) {
p.loadState(n);
}
} catch (Throwable e) {
LOG.error("Error in plugin (load_state)", e);
}
}
private SwigTorrentPlugin pin(SwigTorrentPlugin p) {
mem.add(p);
return p;
}
private SwigDhtPlugin pin(SwigDhtPlugin p) {
memDht.add(p);
return p;
}
private void cleanup() {
synchronized (memLock) {
Iterator<SwigTorrentPlugin> it = mem.iterator();
while (it.hasNext()) {
SwigTorrentPlugin p = it.next();
if (p.t.is_aborted()) {
it.remove();
}
}
}
}
}
|
[
"[email protected]"
] | |
10aff1958e2ebda7b54f88c5793f68e78413c520
|
e21d17cdcd99c5d53300a7295ebb41e0f876bbcb
|
/22_Chapters_Edition/src/main/java/com/lypgod/test/tij4/practices/Ch10_InnerClasses/Practice4/Sequence.java
|
0924c087c88c558e113c03c4c1d4d5d82ade470a
|
[] |
no_license
|
lypgod/Thinking_In_Java_4th_Edition
|
dc42a377de28ae51de2c4000a860cd3bc93d0620
|
5dae477f1a44b15b9aa4944ecae2175bd5d8c10e
|
refs/heads/master
| 2020-04-05T17:39:55.720961
| 2018-11-11T12:07:56
| 2018-11-11T12:08:26
| 157,070,646
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,357
|
java
|
package com.lypgod.test.tij4.practices.Ch10_InnerClasses.Practice4;//: innerclasses/Sequence.java
// Holds a sequence of Objects.
interface Selector {
boolean end();
Object current();
void next();
}
public class Sequence {
private Object[] items;
private int next = 0;
public Sequence(int size) {
items = new Object[size];
}
public void add(Object x) {
if (next < items.length)
items[next++] = x;
}
private class SequenceSelector implements Selector {
private int i = 0;
public boolean end() {
return i == items.length;
}
public Object current() {
return items[i];
}
public void next() {
if (i < items.length) i++;
}
public Sequence getSequence() {
return Sequence.this;
}
}
public Selector selector() {
return new SequenceSelector();
}
public static void main(String[] args) {
Sequence sequence = new Sequence(10);
for (int i = 0; i < 10; i++)
sequence.add(Integer.toString(i));
Selector selector = sequence.selector();
while (!selector.end()) {
System.out.print(selector.current() + " ");
selector.next();
}
}
} /* Output:
0 1 2 3 4 5 6 7 8 9
*///:~
|
[
"[email protected]"
] | |
7ae319bdf7db65099b88539a8a4020821a98b5c0
|
972ba7db7018f146f2a426ce6bf712b848fde2f1
|
/src/main/querydsl/kr/co/mash_up/nine_tique/domain/QSellerProduct_Id.java
|
0312325c149adb8038988a128aaec84b79e8654d
|
[] |
no_license
|
waffle-iron/9tique-backend
|
63c73baa7bb2c581ae734b651863bc99ecd4c949
|
c865eb95e1137810710607d2586347e56452e2cf
|
refs/heads/develop
| 2021-01-19T08:11:20.025600
| 2017-04-08T04:48:41
| 2017-04-08T04:48:41
| 87,608,778
| 0
| 0
| null | 2017-04-08T04:48:40
| 2017-04-08T04:48:40
| null |
UTF-8
|
Java
| false
| false
| 1,120
|
java
|
package kr.co.mash_up.nine_tique.domain;
import static com.mysema.query.types.PathMetadataFactory.*;
import com.mysema.query.types.path.*;
import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;
/**
* QSellerProduct_Id is a Querydsl query type for Id
*/
@Generated("com.mysema.query.codegen.EmbeddableSerializer")
public class QSellerProduct_Id extends BeanPath<SellerProduct.Id> {
private static final long serialVersionUID = 1704331980L;
public static final QSellerProduct_Id id = new QSellerProduct_Id("id");
public final NumberPath<Long> productId = createNumber("productId", Long.class);
public final NumberPath<Long> sellerId = createNumber("sellerId", Long.class);
public QSellerProduct_Id(String variable) {
super(SellerProduct.Id.class, forVariable(variable));
}
public QSellerProduct_Id(Path<? extends SellerProduct.Id> path) {
super(path.getType(), path.getMetadata());
}
public QSellerProduct_Id(PathMetadata<?> metadata) {
super(SellerProduct.Id.class, metadata);
}
}
|
[
"[email protected]"
] | |
99af420878e12827b0c3a2908a9adebf732b3b45
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13303-9-4-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/doc/XWikiDocument_ESTest.java
|
eab306c4886417ce4e14ed16976bdf4d868db421
|
[] |
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
| 550
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 01 16:28:00 UTC 2020
*/
package com.xpn.xwiki.doc;
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 XWikiDocument_ESTest extends XWikiDocument_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"[email protected]"
] | |
988aaece23df154f86d38cc2869ba38099a50c91
|
eff51af628af059cbb5be0c8397ea067ba2913c4
|
/tunnel-core/src/main/java/dll/struct/hw/META_RECT_S.java
|
262108c30f2182d7c06392a4c2a2f9538b060d01
|
[
"Apache-2.0"
] |
permissive
|
jjzhang166/tunnel
|
e4ce8f39dcdd9188eba35b31147d3dcd5d1d11c6
|
fce57e1c3daa74ca4946b60e1b6aeae8a05a6933
|
refs/heads/master
| 2022-01-21T20:42:49.970616
| 2019-01-04T01:38:19
| 2019-01-04T01:38:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,772
|
java
|
package dll.struct;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : D:\HWPuSDK.h</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.
*/
public class META_RECT_S extends Structure {
/** \u77e9\u5f62\u5de6\u4e0a\u9876\u70b9\u7684x\u5750\u6807 */
public short usX;
/** \u77e9\u5f62\u5de6\u4e0a\u9876\u70b9\u7684y\u5750\u6807 */
public short usY;
/** \u77e9\u5f62\u5bbd */
public short usWidth;
/** \u77e9\u5f62\u9ad8 */
public short usHeight;
public META_RECT_S() {
super();
}
protected List<String> getFieldOrder() {
return Arrays.asList("usX", "usY", "usWidth", "usHeight");
}
/**
* @param usX \u77e9\u5f62\u5de6\u4e0a\u9876\u70b9\u7684x\u5750\u6807<br>
* @param usY \u77e9\u5f62\u5de6\u4e0a\u9876\u70b9\u7684y\u5750\u6807<br>
* @param usWidth \u77e9\u5f62\u5bbd<br>
* @param usHeight \u77e9\u5f62\u9ad8
*/
public META_RECT_S(short usX, short usY, short usWidth, short usHeight) {
super();
this.usX = usX;
this.usY = usY;
this.usWidth = usWidth;
this.usHeight = usHeight;
}
public META_RECT_S(Pointer peer) {
super(peer);
}
public static class ByReference extends META_RECT_S implements Structure.ByReference {
};
public static class ByValue extends META_RECT_S implements Structure.ByValue {
};
}
|
[
"[email protected]"
] | |
545217c08b7e1a0074cc520a96c9fe2e00867071
|
76852b1b29410436817bafa34c6dedaedd0786cd
|
/sources-2020-07-19-tempmail/sources/com/tempmail/db/a.java
|
2722670cf43fc2a2afe926d5b1452d2dbf147723
|
[] |
no_license
|
zteeed/tempmail-apks
|
040e64e07beadd8f5e48cd7bea8b47233e99611c
|
19f8da1993c2f783b8847234afb52d94b9d1aa4c
|
refs/heads/master
| 2023-01-09T06:43:40.830942
| 2020-11-04T18:55:05
| 2020-11-04T18:55:05
| 310,075,224
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,440
|
java
|
package com.tempmail.db;
import android.webkit.MimeTypeMap;
import com.tempmail.utils.m;
import java.io.Serializable;
/* compiled from: AttachmentInfoTable */
public class a implements Serializable {
/* renamed from: b reason: collision with root package name */
private Long f12279b;
/* renamed from: c reason: collision with root package name */
private String f12280c;
/* renamed from: d reason: collision with root package name */
private String f12281d;
/* renamed from: e reason: collision with root package name */
private Integer f12282e;
/* renamed from: f reason: collision with root package name */
private Long f12283f;
private String g;
private String h;
public a(String str, String str2, Integer num, Long l, String str3, String str4) {
this.f12280c = str;
this.f12281d = str2;
this.f12282e = num;
this.f12283f = l;
this.g = str3;
this.h = str4;
}
public Integer a() {
return this.f12282e;
}
public String b() {
return this.h;
}
public String c() {
return this.f12280c;
}
public String d() {
return this.f12281d;
}
public Long e() {
return this.f12279b;
}
public String f() {
return c() + " " + a();
}
public String g() {
return this.g;
}
public Long h() {
return this.f12283f;
}
public String i() {
String simpleName = a.class.getSimpleName();
m.b(simpleName, "attachmentInfoTable mime type " + g());
String extensionFromMimeType = MimeTypeMap.getSingleton().getExtensionFromMimeType(g());
String d2 = d();
m.b(simpleName, "fileName " + d2);
m.b(simpleName, "extension " + extensionFromMimeType);
if (extensionFromMimeType == null || d2.contains(extensionFromMimeType)) {
return d2;
}
String str = d2 + "." + extensionFromMimeType;
m.b(simpleName, "fileName updated" + str);
return str;
}
public void j(Long l) {
this.f12279b = l;
}
public a() {
}
public a(Long l, String str, String str2, Integer num, Long l2, String str3, String str4) {
this.f12279b = l;
this.f12280c = str;
this.f12281d = str2;
this.f12282e = num;
this.f12283f = l2;
this.g = str3;
this.h = str4;
}
}
|
[
"[email protected]"
] | |
a444a5b68d74159c5a186a2d37aef6a70b2f4a72
|
53e0056c0696b3fbdc663567937f8cfd973d48cb
|
/src/main/java/org/docksidestage/mysql/dbflute/cbean/cq/ciq/WhiteVariantRelationReferrerCIQ.java
|
50749e77e9f0ebab3416f9ca7430344397851a65
|
[
"Apache-2.0"
] |
permissive
|
dbflute-test/dbflute-test-dbms-mysql
|
cc22df45e25990f6f17b44dea38bd0888d464d48
|
096950eb304b0be8225ecebe90202ccfc27f6032
|
refs/heads/master
| 2023-08-10T23:56:02.770203
| 2023-07-19T18:43:53
| 2023-07-19T18:43:53
| 25,118,057
| 0
| 0
|
Apache-2.0
| 2022-06-21T07:16:23
| 2014-10-12T11:58:50
|
Java
|
UTF-8
|
Java
| false
| false
| 6,547
|
java
|
/*
* Copyright 2004-2013 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.docksidestage.mysql.dbflute.cbean.cq.ciq;
import java.util.Map;
import org.dbflute.cbean.*;
import org.dbflute.cbean.ckey.*;
import org.dbflute.cbean.coption.ConditionOption;
import org.dbflute.cbean.cvalue.ConditionValue;
import org.dbflute.cbean.sqlclause.SqlClause;
import org.dbflute.exception.IllegalConditionBeanOperationException;
import org.docksidestage.mysql.dbflute.cbean.*;
import org.docksidestage.mysql.dbflute.cbean.cq.bs.*;
import org.docksidestage.mysql.dbflute.cbean.cq.*;
/**
* The condition-query for in-line of white_variant_relation_referrer.
* @author DBFlute(AutoGenerator)
*/
public class WhiteVariantRelationReferrerCIQ extends AbstractBsWhiteVariantRelationReferrerCQ {
// ===================================================================================
// Attribute
// =========
protected BsWhiteVariantRelationReferrerCQ _myCQ;
// ===================================================================================
// Constructor
// ===========
public WhiteVariantRelationReferrerCIQ(ConditionQuery referrerQuery, SqlClause sqlClause
, String aliasName, int nestLevel, BsWhiteVariantRelationReferrerCQ myCQ) {
super(referrerQuery, sqlClause, aliasName, nestLevel);
_myCQ = myCQ;
_foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name
_relationPath = _myCQ.xgetRelationPath(); // accept relation path
_inline = true;
}
// ===================================================================================
// Override about Register
// =======================
protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq)
{ throw new IllegalConditionBeanOperationException("InlineView cannot use Union: " + bq + " : " + uq); }
@Override
protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col)
{ regIQ(k, v, cv, col); }
@Override
protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col, ConditionOption op)
{ regIQ(k, v, cv, col, op); }
@Override
protected void registerWhereClause(String wc)
{ registerInlineWhereClause(wc); }
@Override
protected boolean isInScopeRelationSuppressLocalAliasName() {
if (_onClause) { throw new IllegalConditionBeanOperationException("InScopeRelation on OnClause is unsupported."); }
return true;
}
// ===================================================================================
// Override about Query
// ====================
protected ConditionValue xgetCValueReferrerId() { return _myCQ.xdfgetReferrerId(); }
public String keepReferrerId_ExistsReferrer_WhiteVariantRelationReferrerRefList(WhiteVariantRelationReferrerRefCQ sq)
{ throwIICBOE("ExistsReferrer"); return null; }
public String keepReferrerId_NotExistsReferrer_WhiteVariantRelationReferrerRefList(WhiteVariantRelationReferrerRefCQ sq)
{ throwIICBOE("NotExistsReferrer"); return null; }
public String keepReferrerId_SpecifyDerivedReferrer_WhiteVariantRelationReferrerRefList(WhiteVariantRelationReferrerRefCQ sq)
{ throwIICBOE("(Specify)DerivedReferrer"); return null; }
public String keepReferrerId_QueryDerivedReferrer_WhiteVariantRelationReferrerRefList(WhiteVariantRelationReferrerRefCQ sq)
{ throwIICBOE("(Query)DerivedReferrer"); return null; }
public String keepReferrerId_QueryDerivedReferrer_WhiteVariantRelationReferrerRefListParameter(Object vl)
{ throwIICBOE("(Query)DerivedReferrer"); return null; }
protected ConditionValue xgetCValueVariantMasterId() { return _myCQ.xdfgetVariantMasterId(); }
protected ConditionValue xgetCValueMasterTypeCode() { return _myCQ.xdfgetMasterTypeCode(); }
protected Map<String, Object> xfindFixedConditionDynamicParameterMap(String pp) { return null; }
public String keepScalarCondition(WhiteVariantRelationReferrerCQ sq)
{ throwIICBOE("ScalarCondition"); return null; }
public String keepSpecifyMyselfDerived(WhiteVariantRelationReferrerCQ sq)
{ throwIICBOE("(Specify)MyselfDerived"); return null;}
public String keepQueryMyselfDerived(WhiteVariantRelationReferrerCQ sq)
{ throwIICBOE("(Query)MyselfDerived"); return null;}
public String keepQueryMyselfDerivedParameter(Object vl)
{ throwIICBOE("(Query)MyselfDerived"); return null;}
public String keepMyselfExists(WhiteVariantRelationReferrerCQ sq)
{ throwIICBOE("MyselfExists"); return null;}
protected void throwIICBOE(String name)
{ throw new IllegalConditionBeanOperationException(name + " at InlineView is unsupported."); }
// ===================================================================================
// Very Internal
// =============
// very internal (for suppressing warn about 'Not Use Import')
protected String xinCB() { return WhiteVariantRelationReferrerCB.class.getName(); }
protected String xinCQ() { return WhiteVariantRelationReferrerCQ.class.getName(); }
}
|
[
"[email protected]"
] | |
8d12555f74ac32dc1ee3148041e9af1ec288470b
|
004832e529873885f1559eb8c864384b3e1cda3f
|
/dist/gameserver/data/scripts/ai/HekatonPrime.java
|
4a3f93d5aa8c131db709dac3ac90f210b4ac5528
|
[] |
no_license
|
wks1222/mobius-source
|
02323e79316eabd4ce7e5b29f8cd5749c930d098
|
325a49fa23035f4d529e5a34b809b83c68d19cad
|
refs/heads/master
| 2021-01-10T02:22:17.746138
| 2015-01-17T20:08:13
| 2015-01-17T20:08:13
| 36,601,733
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,913
|
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 ai;
import lineage2.gameserver.ai.Fighter;
import lineage2.gameserver.model.Creature;
import lineage2.gameserver.model.instances.NpcInstance;
/**
* @author Mobius
* @version $Revision: 1.0 $
*/
public final class HekatonPrime extends Fighter
{
private long _lastTimeAttacked;
/**
* Constructor for HekatonPrime.
* @param actor NpcInstance
*/
public HekatonPrime(NpcInstance actor)
{
super(actor);
}
/**
* Method onEvtSpawn.
*/
@Override
protected void onEvtSpawn()
{
super.onEvtSpawn();
_lastTimeAttacked = System.currentTimeMillis();
}
/**
* Method thinkActive.
* @return boolean
*/
@Override
protected boolean thinkActive()
{
if ((_lastTimeAttacked + 600000) < System.currentTimeMillis())
{
if (getActor().getMinionList().hasMinions())
{
getActor().getMinionList().deleteMinions();
}
getActor().deleteMe();
return true;
}
return false;
}
/**
* Method onEvtAttacked.
* @param attacker Creature
* @param damage int
*/
@Override
protected void onEvtAttacked(Creature attacker, int damage)
{
_lastTimeAttacked = System.currentTimeMillis();
super.onEvtAttacked(attacker, damage);
}
}
|
[
"[email protected]"
] | |
c24c34d408879eb2044a6729bee41e614e5200d9
|
395db7bc1c7c166ecfdfa092434634f907001c87
|
/ma-gpro-gs/ma-gpro-gs-domaine/src/main/java/com/gpro/consulting/tiers/gs/domaine/impl/ArticleEntreeDomaineImpl.java
|
e20827b7acec90b521474aeaa38c9ef5e100359a
|
[] |
no_license
|
anouarbensaad/habillement
|
2c4aea85511bae5cef00b5b0fc200b8c1973219f
|
4d6c395300c3eff0a81b38d68d0e0873c130f7b6
|
refs/heads/master
| 2022-02-19T10:14:15.442154
| 2019-09-26T19:09:02
| 2019-09-26T19:09:02
| 204,194,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,481
|
java
|
package com.gpro.consulting.tiers.gs.domaine.impl;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.gpro.consulting.tiers.commun.coordination.value.ArticleValue;
import com.gpro.consulting.tiers.commun.coordination.value.RecherecheMulticritereArticleValue;
import com.gpro.consulting.tiers.commun.coordination.value.ResultatRechecheArticleValue;
import com.gpro.consulting.tiers.commun.service.IArticleService;
import com.gpro.consulting.tiers.gs.coordination.value.ArticleEntreeValue;
import com.gpro.consulting.tiers.gs.coordination.value.EntiteStockValue;
import com.gpro.consulting.tiers.gs.coordination.value.ResultatRechecheArticleEntreeValue;
import com.gpro.consulting.tiers.gs.domaine.IArticleEntreeDomaine;
import com.gpro.consulting.tiers.gs.persitance.IEntiteStockPersistance;
@Component
public class ArticleEntreeDomaineImpl implements IArticleEntreeDomaine{
@Autowired
IArticleService articleService;
@Autowired
IEntiteStockPersistance entiteStockPersistance;
@Override
public ResultatRechecheArticleEntreeValue rechercherArticleMultiCritere(
RecherecheMulticritereArticleValue pRechercheArticleMulitCritere,Long idMagasin) {
ResultatRechecheArticleEntreeValue vResultFinal=new ResultatRechecheArticleEntreeValue();
java.util.List <ArticleEntreeValue> list=new ArrayList<ArticleEntreeValue>();
ResultatRechecheArticleValue vResult=articleService.rechercherArticleMultiCritere(pRechercheArticleMulitCritere);
if(vResult!=null && vResult.getNombreResultaRechercher()>0)
{
for (ArticleValue art:vResult.getArticleValues()){
ArticleEntreeValue artEntree=new ArticleEntreeValue();
artEntree.setId(art.getId());
artEntree.setRef(art.getRef());
artEntree.setDesignation(art.getDesignation());
artEntree.setSousFamille(art.getSousFamilleArtEntiteDesignation());
artEntree.setFamilleArticleDesignation(art.getFamilleArticleDesignation());
artEntree.setPmp(art.getPmp());
artEntree.setPu(art.getPu());
artEntree.setCodeFournisseur(art.getCodeFournisseur());
artEntree.setCouleur(art.getCouleur());
//artEntree.setPrixTotal(prixTotal);
//TODO a changer integration de Lots
// EntiteStockValue entiteStock=entiteStockPersistance.rechercheEntiteStockByArticleMagasin(art.getId(), idMagasin);
//
// if (entiteStock!=null){
// artEntree.setQuantiteActuelle(entiteStock.getQteActuelle());
// artEntree.setNombreConeAct(entiteStock.getConesActuel());
// artEntree.setNombreFinConeAct(entiteStock.getConesActuel());
// artEntree.setNombreRouleauxAct(entiteStock.getRouleauxActuel());
// artEntree.setEmplacement(entiteStock.getEmplacement());
// artEntree.setPoidsActuel(entiteStock.getPoidsActuel());
// }
list.add(artEntree);
}
}
vResultFinal.setNombreResultaRechercher(new Long (list.size()));
vResultFinal.setArticleEntree(list);
return vResultFinal;
}
@Override
public ResultatRechecheArticleEntreeValue rechercherArticleMultiCritereFB(
RecherecheMulticritereArticleValue pRechercheArticleMulitCritere) {
ResultatRechecheArticleEntreeValue vResultFinal=new ResultatRechecheArticleEntreeValue();
java.util.List <ArticleEntreeValue> list=new ArrayList<ArticleEntreeValue>();
ResultatRechecheArticleValue vResult=articleService.rechercherArticleMultiCritere(pRechercheArticleMulitCritere);
if(vResult!=null && vResult.getNombreResultaRechercher()>0)
{
for (ArticleValue art:vResult.getArticleValues()){
ArticleEntreeValue artEntree=new ArticleEntreeValue();
artEntree.setId(art.getId());
artEntree.setRef(art.getRef());
artEntree.setCodeFournisseur(art.getCodeFournisseur());
artEntree.setDesignation(art.getDesignation());
artEntree.setSousFamille(art.getSousFamilleArtEntiteDesignation());
artEntree.setFamilleArticleDesignation(art.getFamilleArticleDesignation());
artEntree.setPmp(art.getPmp());
artEntree.setPu(art.getPu());
//artEntree.setPrixTotal(prixTotal);
//TODO a changer integration de Lots
list.add(artEntree);
}
}
vResultFinal.setNombreResultaRechercher(new Long (list.size()));
vResultFinal.setArticleEntree(list);
return vResultFinal;
}
}
|
[
"[email protected]"
] | |
9a9824c30c46b3c5278fbc9a196954a2fc61b13a
|
f99ac6c6569cf5437a7d94f539b5db1eff9335f8
|
/web-hsdb-site/src/main/java/ru/bmn/web/hsdb/site/controller/domain/form/UserSettingsForm.java
|
8cac474b2a68320df47a11e9c10284c29ed07db6
|
[
"BSD-2-Clause"
] |
permissive
|
bmn85/web-hsdb-basic
|
59ead52c89d845e6a2ea9b69d2976b54098fc840
|
3d7c2e10c7760a5b3bdd2087d1bf9bd0c7473337
|
refs/heads/master
| 2020-04-12T03:10:25.419085
| 2017-08-26T20:34:40
| 2017-08-26T20:34:40
| 61,432,801
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,157
|
java
|
package ru.bmn.web.hsdb.site.controller.domain.form;
import javax.validation.constraints.Size;
public class UserSettingsForm {
@Size(min=1, max=32)
private String currentPassword;
@Size(min=1, max=32)
private String newPassword;
@Size(min=1, max=32)
private String newPasswordConfirm;
@Size(min=3, max=32)
private String hearthpwnUserName;
public String getNewPassword() {
return newPassword;
}
public UserSettingsForm setNewPassword(String newPassword) {
this.newPassword = newPassword;
return this;
}
public String getHearthpwnUserName() {
return hearthpwnUserName;
}
public UserSettingsForm setHearthpwnUserName(String hearthpwnUserName) {
this.hearthpwnUserName = hearthpwnUserName;
return this;
}
public String getNewPasswordConfirm() {
return newPasswordConfirm;
}
public UserSettingsForm setNewPasswordConfirm(String newPasswordConfirm) {
this.newPasswordConfirm = newPasswordConfirm;
return this;
}
public String getCurrentPassword() {
return currentPassword;
}
public UserSettingsForm setCurrentPassword(String currentPassword) {
this.currentPassword = currentPassword;
return this;
}
}
|
[
"[email protected]"
] | |
943b0d28b6f88cf0e44ab7af8a1eaa12ea83b59e
|
9b2a3151a7de6271f1618a482adbe4137aca6824
|
/Coj/java/2434 - Mathematician Ana/main.java
|
dcaaabc07ef89c70a6aba71deafbe9850572d18b
|
[] |
no_license
|
LuisEnriqueSosaHernandez/Programas-coj-otros
|
4bb8f24b785144366ad4ebd65fc41571fec44f4f
|
ef24094e347e0d7b21a021cdd1e32954ff72a486
|
refs/heads/master
| 2020-04-05T14:36:04.355386
| 2017-07-19T20:34:56
| 2017-07-19T20:34:56
| 94,712,937
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
import java.util.Scanner;
import java.util.ArrayList;
import java.math.BigInteger;
public class main{
public static void main(String[]args){
Scanner l=new Scanner(System.in);
ArrayList<Integer> total=new ArrayList<Integer>();
while(true){
int n=l.nextInt();
if(n!=0)
total.add(n);
else
break;
}
for (int j=0;j<total.size();j++){
BigInteger ja=new BigInteger("1");
for(int y=0;y<=total.get(j);y++){
if(y==2 || y==3 ||y==5 || y==7)
ja = ja.multiply(new BigInteger(y +""));
else
if(y%2!=0&&y%3!=0&&y%5!=0&&y%7!=0)
ja=ja.multiply(new BigInteger(y +""));
}
System.out.println(ja);
}
}
}
|
[
"[email protected]"
] | |
a1cef46d8d0d1ff2c21249302057262997b205ec
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project59/src/main/java/org/gradle/test/performance59_3/Production59_285.java
|
2dfe0d4a74ad46e12fcdc4843aea48683861eac5
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance59_3;
public class Production59_285 extends org.gradle.test.performance15_3.Production15_285 {
private final String property;
public Production59_285() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"[email protected]"
] | |
950924430eaa335635abf48372287e9b79c1d17e
|
eda98a2f8dda4efca7fa614ccf2e1c8d6853ab82
|
/src/com/game/render/fbo/psRender/EscapyPostIterative.java
|
44875add65a02d9ef08e9712ac81a81b9f7f2bf6
|
[
"Apache-2.0"
] |
permissive
|
henryco/Escapy
|
8acc253c31f79b826594416a431df4233e3c03d1
|
6c6d65cdae20e9946df76035029b6520c7606e6c
|
refs/heads/master
| 2020-05-22T02:49:53.270042
| 2018-03-06T13:26:53
| 2018-03-06T13:26:53
| 63,279,340
| 11
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 490
|
java
|
package com.game.render.fbo.psRender;
import com.game.render.fbo.EscapyFBO;
import com.game.utils.translationVec.TransVec;
public interface EscapyPostIterative extends EscapyPostRenderer {
/**
*
* @param fbo - frameBufferObject, <b>see: {@link EscapyFBO} </b>
* @param translationVec - transtalion vector
* @param times - 3 is default for void frameBuffer
* @return fbo - same but filled fbo
*/
EscapyFBO postRender(EscapyFBO fbo, TransVec translationVec, int times);
}
|
[
"[email protected]"
] | |
8ce7e4e9e7a92bfa48e6007163962feee8619483
|
a837e5b21776e7931be1812a0b7edd06f03cf2d7
|
/bpmn-model/src/main/java/org/camunda/bpm/model/bpmn/impl/instance/SendTaskImpl.java
|
4ec0dc35897238b126022a14bbceadb85843e215
|
[
"Apache-2.0"
] |
permissive
|
meyerdan/camunda-bpmn-model
|
65bab4a8123f3dcc698a6d8991b9ca25bb6ffba7
|
7609d467da24989447e8e722ba5b0250fbee0fb5
|
refs/heads/master
| 2021-01-15T08:30:53.346132
| 2014-02-06T09:51:43
| 2014-02-06T09:51:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,294
|
java
|
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.camunda.bpm.model.bpmn.impl.instance;
import org.camunda.bpm.model.bpmn.instance.Message;
import org.camunda.bpm.model.bpmn.instance.Operation;
import org.camunda.bpm.model.bpmn.instance.SendTask;
import org.camunda.bpm.model.bpmn.instance.Task;
import org.camunda.bpm.model.xml.ModelBuilder;
import org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext;
import org.camunda.bpm.model.xml.type.ModelElementTypeBuilder;
import org.camunda.bpm.model.xml.type.attribute.Attribute;
import org.camunda.bpm.model.xml.type.reference.AttributeReference;
import static org.camunda.bpm.model.bpmn.impl.BpmnModelConstants.*;
import static org.camunda.bpm.model.xml.type.ModelElementTypeBuilder.ModelTypeInstanceProvider;
/**
* The BPMN sendTask element
*
* @author Sebastian Menski
*/
public class SendTaskImpl extends TaskImpl implements SendTask {
private static Attribute<String> implementationAttribute;
private static AttributeReference<Message> messageRefAttribute;
private static AttributeReference<Operation> operationRefAttribute;
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(SendTask.class, BPMN_ELEMENT_SEND_TASK)
.namespaceUri(BPMN20_NS)
.extendsType(Task.class)
.instanceProvider(new ModelTypeInstanceProvider<SendTask>() {
public SendTask newInstance(ModelTypeInstanceContext instanceContext) {
return new SendTaskImpl(instanceContext);
}
});
implementationAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_IMPLEMENTATION)
.defaultValue("##WebService")
.build();
messageRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_MESSAGE_REF)
.qNameAttributeReference(Message.class)
.build();
operationRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_OPERATION_REF)
.qNameAttributeReference(Operation.class)
.build();
typeBuilder.build();
}
public SendTaskImpl(ModelTypeInstanceContext context) {
super(context);
}
public String getImplementation() {
return implementationAttribute.getValue(this);
}
public void setImplementation(String implementation) {
implementationAttribute.setValue(this, implementation);
}
public Message getMessage() {
return messageRefAttribute.getReferenceTargetElement(this);
}
public void setMessage(Message message) {
messageRefAttribute.setReferenceTargetElement(this, message);
}
public Operation getOperation() {
return operationRefAttribute.getReferenceTargetElement(this);
}
public void setOperation(Operation operation) {
operationRefAttribute.setReferenceTargetElement(this, operation);
}
}
|
[
"[email protected]"
] | |
2b206ff4178cea70de8b125df1f27352e4705c3f
|
3119279587a4665213cc77cb94f1750ee8a73af2
|
/Spring/Spring-Patient/src/com/abc/service/PatientService.java
|
3466592f4a90efc8020fce3b3b7bd92a7aad00b5
|
[] |
no_license
|
Scamprotection/CTS-Fullstack-Pune
|
55d03fef1f4b2726d92ac417a5ccd4a54d9a4ad8
|
12b8ce6ba4a61a0d378442736a2fd5c4645059d9
|
refs/heads/master
| 2022-03-23T21:16:19.031862
| 2017-11-16T12:59:51
| 2017-11-16T12:59:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 167
|
java
|
package com.abc.service;
import com.abc.entitity.Patient;
public interface PatientService {
boolean savePatient(Patient patient);
Patient findById(int patId);
}
|
[
"[email protected]"
] | |
23656e94ff6ef28bd8869fc3a46b7260cfff3d11
|
7c1430c53b4d66ad0e96dd9fc7465a5826fdfb77
|
/uims-support/src/cn/edu/sdu/uims/graph/form/InfoPhotoForm.java
|
c49bfb47c745860ac02a643424defdd665409147
|
[] |
no_license
|
wang3624270/online-learning-server
|
ef97fb676485f2bfdd4b479235b05a95ad62f841
|
2d81920fef594a2d0ac482efd76669c8d95561f1
|
refs/heads/master
| 2020-03-20T04:33:38.305236
| 2019-05-22T06:31:05
| 2019-05-22T06:31:05
| 137,187,026
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
package cn.edu.sdu.uims.graph.form;
import javax.sql.rowset.serial.SerialBlob;
/**
* 人员照片信息
* InfoPhoto generated by MyEclipse - Hibernate Tools
*/
public class InfoPhotoForm extends AddedAttributeForm implements java.io.Serializable {
// Fields
private Integer id;
private String photoType;//照片类型
private String remark;//备注
private SerialBlob photo;
private String fileName;
private Integer personId;
private String perName;
private String perTypeCode;
private String perNum;
private String perAddress;
private String perTelephone;
private String exameeType;
// Constructors
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
/** default constructor */
public InfoPhotoForm() {
}
/** minimal constructor */
// Property accessors
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getPhotoType() {
return this.photoType;
}
public void setPhotoType(String photoType) {
this.photoType = photoType;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public SerialBlob getPhoto() {
return photo;
}
public void setPhoto(SerialBlob photo) {
this.photo = photo;
}
public Integer getPersonId() {
return personId;
}
public void setPersonId(Integer personId) {
this.personId = personId;
}
public String getPerName() {
return perName;
}
public void setPerName(String perName) {
this.perName = perName;
}
public String getPerNum() {
return perNum;
}
public void setPerNum(String perNum) {
this.perNum = perNum;
}
public String getPerAddress() {
return perAddress;
}
public void setPerAddress(String perAddress) {
this.perAddress = perAddress;
}
public String getPerTelephone() {
return perTelephone;
}
public void setPerTelephone(String perTelephone) {
this.perTelephone = perTelephone;
}
public String getPerTypeCode() {
return perTypeCode;
}
public void setPerTypeCode(String perTypeCode) {
this.perTypeCode = perTypeCode;
}
public String getExameeType() {
return exameeType;
}
public void setExameeType(String exameeType) {
this.exameeType = exameeType;
}
}
|
[
"[email protected]"
] | |
eed9e81b9017bab8214d61c1604f561acc2e1a08
|
0cf17f9a64755c5533437a69d29ab295467b9d83
|
/app/src/main/java/com/mdb/example/administrator/Utils/MyEditText.java
|
8880cbbd0ea08769eeb8f92ac4fa036610f4b832
|
[] |
no_license
|
as425017946/shangjiaxiche
|
57fa38c5f23a7c3580639f41e07e8d5567a9cc3c
|
7b2b05c49803f1e7fa9eaed3fe9bd196bd261aa0
|
refs/heads/master
| 2020-04-26T01:54:30.726630
| 2019-03-01T02:09:55
| 2019-03-01T02:09:55
| 173,218,756
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,284
|
java
|
package com.mdb.example.administrator.Utils;
import android.content.Context;
import android.support.v7.widget.AppCompatEditText;
import android.util.AttributeSet;
import android.view.MotionEvent;
public class MyEditText extends AppCompatEditText {
private long lastTime = 0;
public MyEditText(Context context) {
super(context);
}
public MyEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyEditText(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onSelectionChanged(int selStart, int selEnd) {
super.onSelectionChanged(selStart, selEnd);
this.setSelection(this.getText().length());
}
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
long currentTime = System.currentTimeMillis();
if (currentTime - lastTime < 500) {
lastTime = currentTime;
return true;
} else {
lastTime = currentTime;
}
break;
}
return super.onTouchEvent(event);
}
}
|
[
"[email protected]"
] | |
e61a0c3489f4ad06af2b3c96e0375e7fa5b229ea
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_2ea08ea9611585d9ea7c890f35ba03156092b28f/InternalResourceTempTopicFile/2_2ea08ea9611585d9ea7c890f35ba03156092b28f_InternalResourceTempTopicFile_t.java
|
5e2cc6ebb4be5354c5e4b2bcceb1a6f1f125df8e
|
[] |
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
| 8,048
|
java
|
package org.jboss.pressgang.ccms.restserver.webdav.resources.hierarchy.topics.topic.fields;
import net.java.dev.webdav.jaxrs.xml.elements.*;
import net.java.dev.webdav.jaxrs.xml.properties.*;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.jboss.pressgang.ccms.restserver.webdav.constants.WebDavConstants;
import org.jboss.pressgang.ccms.restserver.webdav.resources.InternalResource;
import org.jboss.pressgang.ccms.restserver.webdav.resources.MultiStatusReturnValue;
import org.jboss.pressgang.ccms.restserver.webdav.resources.ByteArrayReturnValue;
import org.jboss.pressgang.ccms.restserver.webdav.managers.DeleteManager;
import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotNull;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Calendar;
import java.util.Date;
import java.util.logging.Logger;
import static javax.ws.rs.core.Response.Status.OK;
/**
* Handles access to temporary files.
*/
public class InternalResourceTempTopicFile extends InternalResource {
private static final Logger LOGGER = Logger.getLogger(InternalResourceTempTopicFile.class.getName());
public InternalResourceTempTopicFile(@NotNull final UriInfo uriInfo, @NotNull final DeleteManager deleteManager, @Nullable final String remoteAddress, @NotNull final String path) {
super(uriInfo, deleteManager, remoteAddress, path);
}
@Override
public int write(@NotNull final byte[] contents) {
LOGGER.info("ENTER InternalResourceTempTopicFile.write() " + getStringId());
try {
final File directory = new java.io.File(WebDavConstants.TEMP_LOCATION);
final String fileLocation = buildTempFileName(getStringId());
if (!directory.exists()) {
directory.mkdirs();
} else if (!directory.isDirectory()) {
directory.delete();
directory.mkdirs();
}
final File file = new File(fileLocation);
if (!file.exists()) {
file.createNewFile();
}
FileUtils.writeByteArrayToFile(file, contents);
return Response.Status.NO_CONTENT.getStatusCode();
} catch (final IOException e) {
}
return Response.Status.INTERNAL_SERVER_ERROR.getStatusCode();
}
@Override
public ByteArrayReturnValue get() {
LOGGER.info("ENTER InternalResourceTempTopicFile.get() " + getStringId());
final String fileLocation = buildTempFileName(getStringId());
try {
if (!exists(fileLocation)) {
return new ByteArrayReturnValue(Response.Status.NOT_FOUND.getStatusCode(), null);
}
final FileInputStream inputStream = new FileInputStream(fileLocation);
try {
final byte[] fileContents = IOUtils.toByteArray(inputStream);
return new ByteArrayReturnValue(Response.Status.OK.getStatusCode(), fileContents);
} catch (final Exception ex) {
} finally {
try {
inputStream.close();
} catch (final Exception ex) {
}
}
} catch (final FileNotFoundException e) {
return new ByteArrayReturnValue(Response.Status.NOT_FOUND.getStatusCode(), null);
}
return new ByteArrayReturnValue(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), null);
}
/**
Temp files only live for a short period of time. This method determines if the
temp file should be visible.
*/
public static boolean exists(@NotNull final String fileLocation) {
return exists(new File(fileLocation));
}
/**
Temp files only live for a short period of time. This method determines if the
temp file should be visible.
*/
public static boolean exists(@NotNull final File file) {
if (file.exists()) {
final Calendar window = Calendar.getInstance();
window.add(Calendar.SECOND, -WebDavConstants.TEMP_WINDOW);
final Date lastModified = new Date(file.lastModified());
if (lastModified.before(window.getTime())) {
file.delete();
}
else {
return true;
}
}
return false;
}
@Override
public int delete() {
LOGGER.info("ENTER InternalResourceTempTopicFile.delete() " + getStringId());
final String fileLocation = buildTempFileName(getStringId());
final File file = new File(fileLocation);
if (file.exists()) {
file.delete();
return Response.Status.OK.getStatusCode();
}
return Response.Status.NOT_FOUND.getStatusCode();
}
@Override
public MultiStatusReturnValue propfind(final int depth) {
if (getUriInfo() == null) {
throw new IllegalStateException("Can not perform propfind without uriInfo");
}
try {
final String fileLocation = InternalResourceTempTopicFile.buildTempFileName(getUriInfo().getPath());
final File file = new File(fileLocation);
if (file.exists()) {
final net.java.dev.webdav.jaxrs.xml.elements.Response response = getProperties(getUriInfo(), file, true);
final MultiStatus st = new MultiStatus(response);
return new MultiStatusReturnValue(207, st);
}
} catch (final NumberFormatException ex) {
return new MultiStatusReturnValue(404);
}
return new MultiStatusReturnValue(404);
}
public static String buildTempFileName(final String path) {
return WebDavConstants.TEMP_LOCATION + "/" + path.replace("/", "_");
}
public static String buildWebDavFileName(final String path, final File file) {
return file.getName().replaceFirst(path.replace("/", "_"), "");
}
/**
* @param uriInfo The uri that was used to access this resource
* @param file The file that this content represents
* @param local true if we are building the properties for the resource at the given uri, and false if we are building
* properties for a child resource.
* @return
*/
public static net.java.dev.webdav.jaxrs.xml.elements.Response getProperties(final UriInfo uriInfo, final File file, final boolean local) {
final HRef hRef = local ? new HRef(uriInfo.getRequestUri()) : new HRef(uriInfo.getRequestUriBuilder().path(InternalResourceTempTopicFile.buildWebDavFileName(uriInfo.getPath(), file)).build());
final GetLastModified getLastModified = new GetLastModified(new Date(file.lastModified()));
final GetContentType getContentType = new GetContentType(MediaType.APPLICATION_OCTET_STREAM);
final GetContentLength getContentLength = new GetContentLength(file.length());
final DisplayName displayName = new DisplayName(file.getName());
final SupportedLock supportedLock = new SupportedLock();
final LockDiscovery lockDiscovery = new LockDiscovery();
final Prop prop = new Prop(getLastModified, getContentType, getContentLength, displayName, supportedLock, lockDiscovery);
final Status status = new Status((javax.ws.rs.core.Response.StatusType) OK);
final PropStat propStat = new PropStat(prop, status);
final net.java.dev.webdav.jaxrs.xml.elements.Response davFile = new net.java.dev.webdav.jaxrs.xml.elements.Response(hRef, null, null, null, propStat);
return davFile;
}
}
|
[
"[email protected]"
] | |
bc52b3ab8a2d2eb2920b7dcf43d3f425f20964c6
|
d60d72dc8afce46eb5125027d536bab8d43367e3
|
/module/CMSJava-core/src/shu/cms/devicemodel/lcd/PLCCModel.java
|
5d9e6f3624ce9e8da5267f5d8e8761c3571a2137
|
[] |
no_license
|
enessssimsek/cmsjava
|
556cd61f4cab3d1a31f722138d7a6a488c055eeb
|
59988c118159ba49496167b41cd0cfa9ea2e3c74
|
refs/heads/master
| 2023-03-18T12:35:16.160707
| 2018-10-29T08:22:16
| 2018-10-29T08:22:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,206
|
java
|
package shu.cms.devicemodel.lcd;
import java.util.*;
import shu.cms.*;
import shu.cms.colorspace.depend.*;
import shu.cms.colorspace.independ.*;
import shu.cms.devicemodel.*;
import shu.cms.lcd.*;
import shu.cms.util.*;
import shu.math.lut.*;
/**
* <p>Title: Colour Management System</p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author cms.shu.edu.tw
* @version 1.0
*/
public class PLCCModel
extends ChannelIndependentModel {
public PLCCModel(LCDTarget lcdTarget) {
super(lcdTarget);
}
/**
* 使用模式
* @param factor LCDModelFactor
*/
public PLCCModel(LCDModelFactor factor) {
super(factor);
}
public PLCCModel(String modelFactorFilename) {
this( (LCDModelFactor) Load.modelFactorFile(modelFactorFilename));
}
public static class Factor
extends LCDModelBase.Factor {
GammaCorrector rCorrector;
RGBBase.Channel channel;
/**
*
* @return double[]
*/
public double[] getVariables() {
return null;
}
public Factor() {
}
public Factor(GammaCorrector rCorrector, RGBBase.Channel channel) {
this.rCorrector = rCorrector;
this.channel = channel;
}
}
protected Factor[] makeFactor() {
Factor[] factors = new Factor[] {
new Factor(correct._RrCorrector, RGBBase.Channel.R),
new Factor(correct._GrCorrector, RGBBase.Channel.G),
new Factor(correct._BrCorrector, RGBBase.Channel.B)};
return factors;
}
protected Factor[] _produceFactor() {
singleChannel.produceRGBPatch();
correct.produceGammaCorrector();
Factor[] factors = makeFactor();
return factors;
}
protected static Interpolation1DLUT produceSingleChannelPLCC_LUT(Set<Patch>
singleChannelPatch, RGBBase.Channel ch) {
int size = singleChannelPatch.size();
double[][] keyValue = new double[2][size];
int index = 0;
for (Patch p : singleChannelPatch) {
keyValue[0][index] = p.getRGB().getValue(ch);
keyValue[1][index] = p.getXYZ().Y;
index++;
}
Interpolation1DLUT lut = new Interpolation1DLUT(keyValue[0], keyValue[1]);
return lut;
}
/**
*
* @param rgb RGB
* @param factor Factor[]
* @return CIEXYZ
*/
public CIEXYZ _getXYZ(RGB rgb, LCDModel.Factor[] factor) {
RGB newRGB = getLuminanceRGB(rgb, factor);
getXYZRGB = newRGB;
return matries.RGBToXYZByMaxMatrix(newRGB);
}
/**
*
* @param XYZ CIEXYZ
* @param factor Factor[]
* @return RGB
*/
protected RGB _getRGB(CIEXYZ XYZ, LCDModel.Factor[] factor) {
RGB rgb = matries.XYZToRGBByMaxMatrix(XYZ);
double[] originalRGBValues = rgb.getValues(new double[3],
RGB.MaxValue.Double1);
originalRGBValues = correct.gammaUncorrect(originalRGBValues);
RGB originalRGB = new RGB(rgb.getRGBColorSpace(), originalRGBValues);
return originalRGB;
}
public static void main(String[] args) {
LCDTarget target = LCDTarget.Instance.getFromCA210Logo("auo_T370HW02",
LCDTarget.Number.Ramp1021, "091225");
LCDTarget.Operator.gradationReverseFix(target);
PLCCModel model = new PLCCModel(target);
model.produceFactor();
List<Patch> patchList = target.filter.grayPatch(true);
int size = patchList.size();
for (int x = size - 1; x >= 0; x--) {
Patch p = patchList.get(x);
CIEXYZ XYZ = p.getXYZ();
RGB rgb = model.matries.XYZToRGBByMaxMatrix(XYZ);
rgb.changeMaxValue(RGB.MaxValue.Double100);
System.out.println(x + " " + rgb);
}
}
public String getDescription() {
return "PLCC";
}
/**
*
* @param rgb RGB
* @param factor Factor[]
* @return RGB
*/
protected RGB getLuminanceRGB(RGB rgb, LCDModel.Factor[] factor) {
// correct._RrCorrector = ( (Factor) factor[0]).rCorrector;
// correct._GrCorrector = ( (Factor) factor[1]).rCorrector;
// correct._BrCorrector = ( (Factor) factor[2]).rCorrector;
double[] correctValues = rgb.getValues(new double[3], RGB.MaxValue.Double1);
correctValues = correct.gammaCorrect(correctValues);
return new RGB(rgb.getRGBColorSpace(), correctValues);
}
}
|
[
"[email protected]"
] | |
15464f7f4ae24a3f4ecf60946d5e969b4b7e9d62
|
5d13d9329c561856f1f50305be1dd03c5f960dcf
|
/services/hrdb/src/com/auto_gmifufqtjm/hrdb/dao/DepartmentDao.java
|
7f7f7098a9314dba8b004ef2f30085f992c05381
|
[] |
no_license
|
wavemakerapps/Auto_GmIFUFQtjM
|
cc296c51a78627290923d0e3d82c758802889f89
|
1da0229f1562023c018a686611cdf25b6e85b608
|
refs/heads/master
| 2021-09-02T13:09:32.208635
| 2018-01-02T23:09:21
| 2018-01-02T23:09:21
| 116,066,006
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,203
|
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_gmifufqtjm.hrdb.dao;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;
import com.wavemaker.runtime.data.dao.WMGenericDaoImpl;
import com.auto_gmifufqtjm.hrdb.Department;
/**
* Specifies methods used to obtain and modify Department related information
* which is stored in the database.
*/
@Repository("hrdb.DepartmentDao")
public class DepartmentDao extends WMGenericDaoImpl<Department, Integer> {
@Autowired
@Qualifier("hrdbTemplate")
private HibernateTemplate template;
public HibernateTemplate getTemplate() {
return this.template;
}
}
|
[
"[email protected]"
] | |
0a50a8bc5bbcef5caae199725322b14daf9f08d5
|
3e7cfd9ba8ce893af5a864dfa089e09512d6ce53
|
/AndroidAsync/src/com/koushikdutta/async/http/server/BoundaryEmitter.java
|
8da7e0912ed556d2cae6888a9d0aff04ea8b9752
|
[
"Apache-2.0"
] |
permissive
|
nseidm1/AndroidAsync
|
f8c136638b25fdd42126ceb42622ca4da760627f
|
c0267e4e5c6ef2d28c92332b3ec3090d406035f4
|
refs/heads/master
| 2021-01-24T04:19:11.295555
| 2013-04-16T03:01:23
| 2013-04-16T03:01:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,658
|
java
|
package com.koushikdutta.async.http.server;
import java.nio.ByteBuffer;
import junit.framework.Assert;
import com.koushikdutta.async.ByteBufferList;
import com.koushikdutta.async.DataEmitter;
import com.koushikdutta.async.FilteredDataEmitter;
public class BoundaryEmitter extends FilteredDataEmitter {
private byte[] boundary;
public void setBoundary(String boundary) {
this.boundary = ("--" + boundary).getBytes();
}
public String getBoundary() {
if (boundary == null)
return null;
return new String(boundary, 2, boundary.length - 2);
}
public String getBoundaryStart() {
Assert.assertNotNull(boundary);
return new String(boundary);
}
public String getBoundaryEnd() {
Assert.assertNotNull(boundary);
return new String(boundary) + "--\r\n";
}
protected void onBoundaryStart() {
}
protected void onBoundaryEnd() {
}
// >= 0 matching
// -1 matching - (start of boundary end) or \r (boundary start)
// -2 matching - (end of boundary end)
// -3 matching \r after boundary
// -4 matching \n after boundary
// defunct: -5 matching start - MUST match the start of the first boundary
int state = 0;
@Override
public void onDataAvailable(DataEmitter emitter, ByteBufferList bb) {
// System.out.println(bb.getString());
// System.out.println("chunk: " + bb.remaining());
// System.out.println("state: " + state);
// if we were in the middle of a potential match, let's throw that
// at the beginning of the buffer and process it too.
if (state > 0) {
ByteBuffer b = ByteBuffer.wrap(boundary, 0, state).duplicate();
bb.add(0, b);
state = 0;
}
int last = 0;
byte[] buf = new byte[bb.remaining()];
bb.get(buf);
for (int i = 0; i < buf.length; i++) {
if (state >= 0) {
if (buf[i] == boundary[state]) {
state++;
if (state == boundary.length)
state = -1;
}
else if (state > 0) {
// let's try matching again one byte after the start
// of last match occurrence
i -= state;
state = 0;
}
}
else if (state == -1) {
if (buf[i] == '\r') {
state = -4;
int len = i - last - boundary.length - 2;
if (len >= 0) {
ByteBuffer b = ByteBuffer.wrap(buf, last, len);
ByteBufferList list = new ByteBufferList();
list.add(b);
super.onDataAvailable(this, list);
}
else {
// len can be -1 on the first boundary
Assert.assertEquals(-2, len);
}
// System.out.println("bstart");
onBoundaryStart();
}
else if (buf[i] == '-') {
state = -2;
}
else {
report(new Exception("Invalid multipart/form-data. Expected \r or -"));
return;
}
}
else if (state == -2) {
if (buf[i] == '-') {
state = -3;
}
else {
report(new Exception("Invalid multipart/form-data. Expected -"));
return;
}
}
else if (state == -3) {
if (buf[i] == '\r') {
state = -4;
ByteBuffer b = ByteBuffer.wrap(buf, last, i - last - boundary.length - 4);
ByteBufferList list = new ByteBufferList();
list.add(b);
super.onDataAvailable(this, list);
// System.out.println("bend");
onBoundaryEnd();
}
else {
report(new Exception("Invalid multipart/form-data. Expected \r"));
return;
}
}
else if (state == -4) {
if (buf[i] == '\n') {
last = i + 1;
state = 0;
}
else {
report(new Exception("Invalid multipart/form-data. Expected \n"));
}
}
// else if (state == -5) {
// Assert.assertEquals(i, 0);
// if (buf[i] == boundary[i]) {
// state = 1;
// }
// else {
// report(new Exception("Invalid multipart/form-data. Expected boundary start: '" + (char)boundary[i] + "'"));
// return;
// }
// }
else {
Assert.fail();
report(new Exception("Invalid multipart/form-data. Unknown state?"));
}
}
if (last < buf.length) {
// System.out.println("amount left at boundary: " + (buf.length - last));
// System.out.println(state);
int keep = Math.max(state, 0);
ByteBuffer b = ByteBuffer.wrap(buf, last, buf.length - last - keep);
ByteBufferList list = new ByteBufferList();
list.add(b);
super.onDataAvailable(this, list);
}
}
}
|
[
"[email protected]"
] | |
47ab8232f5114c2e843f28bb9128962c2a440fa2
|
db579f64fde2d538f4bce1681e0d5667e039a4f9
|
/YiBoLibrary/src/com/cattong/weibo/impl/twitter/ProxyBasicAuth.java
|
e234ad7624e82d50db5dabf7456b43937074bc55
|
[
"Apache-2.0"
] |
permissive
|
ax003d/YiBo
|
dc3a57464e8b6a878d4dc081ecab00a68f8ba23a
|
b49c25e614926aaf9bb88e33c72db79414c10b82
|
refs/heads/master
| 2021-01-18T08:50:15.549797
| 2013-03-18T09:38:02
| 2013-03-18T09:38:02
| 8,870,741
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 865
|
java
|
package com.cattong.weibo.impl.twitter;
import com.cattong.commons.ServiceProvider;
import com.cattong.commons.http.auth.Authorization;
public class ProxyBasicAuth extends Authorization {
/** serialVersionUID */
private static final long serialVersionUID = -7108008646051298533L;
private String restApiServer;
private String searchApiServer;
public ProxyBasicAuth(String authToken, String authSecret, ServiceProvider serviceProvider) {
super(serviceProvider, authToken, authSecret);
}
public String getRestApiServer() {
return restApiServer;
}
public void setRestApiServer(String restApiServer) {
this.restApiServer = restApiServer;
}
public String getSearchApiServer() {
return searchApiServer;
}
public void setSearchApiServer(String searchApiServer) {
this.searchApiServer = searchApiServer;
}
}
|
[
"cattong@cattong-THINK"
] |
cattong@cattong-THINK
|
8ebf1b16217db237e03de2b74102dec4fb9e79f0
|
245b16b9995266a813cd265b14ff4e36a4ff32a0
|
/src/com/etc/frame/ShowAdminFrame.java
|
585282dda00eea2fe5aeb10c5055eb62af3e5d43
|
[] |
no_license
|
usadu/music
|
a730c9b292ecc5ca1c3c02ebb8d9f115090fc273
|
59393f56479c36e30006945642ccab37946f0255
|
refs/heads/master
| 2020-04-26T15:36:05.010954
| 2019-03-04T01:26:27
| 2019-03-04T01:26:27
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,412
|
java
|
package com.etc.frame;
import java.awt.EventQueue;
import javax.swing.JFrame;
import com.etc.entity.Admin;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Font;
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.event.AncestorListener;
import javax.swing.event.AncestorEvent;
public class ShowAdminFrame extends JFrame {
/**
* 把管理员登录成功后的一个admin传进来
*/
// 定义图片
private ImageIcon bgImg = new ImageIcon(this.getClass().getResource("/image/Login.png"));
private JLabel imgLabel = new JLabel(bgImg);
/**
* Launch the application.
*/
/*public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
ShowAdminthis window = new ShowAdminthis();
window.this.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}*/
/**
* Create the application.
*/
public ShowAdminFrame(Admin admin) {
initialize(admin);
}
/**
* Initialize the contents of the this.
*/
private void initialize(Admin admin) {
this.getContentPane().setBackground(Color.WHITE);
this.getContentPane().setForeground(Color.BLACK);
this.setBounds(100, 100, 366, 640);
this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
this.getRootPane().setWindowDecorationStyle(0);//关闭的样式没有,所以不能关闭
// 将Jthis上自带的面板设置为透明,否则背景图片不会显示出来
((JPanel) getContentPane()).setOpaque(false);
JLabel imgLabel = new JLabel(bgImg);
this.getLayeredPane().add(imgLabel, new Integer(Integer.MIN_VALUE));
imgLabel.setBounds(0, 0, bgImg.getIconWidth(), bgImg.getIconHeight());
this.setLocationRelativeTo(null);
this.getContentPane().setLayout(null);
this.setLocationRelativeTo(null);
JLabel label = new JLabel(admin.getAdmin_name());
label.setBounds(137, 80, 97, 50);
label.setFont(new Font("宋体", Font.BOLD, 16));
this.getContentPane().add(label);
/**
* 进入管理歌曲界面
*/
JButton button = new JButton("\u8FDB\u5165\u6B4C\u66F2\u7BA1\u7406\u754C\u9762");
button.setBounds(88, 161, 176, 70);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ShowMusic showMusic=new ShowMusic();
}
});
button.setFont(new Font("宋体", Font.BOLD, 13));
button.setBackground(Color.WHITE);
this.getContentPane().add(button);
/**
* 进入用户管理界面
*/
JButton btnNewButton = new JButton("\u8FDB\u5165\u7528\u6237\u7BA1\u7406\u754C\u9762");
btnNewButton.setBounds(88, 293, 176, 70);
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ShowUserFrame showUserthis=new ShowUserFrame();
}
});
btnNewButton.setBackground(Color.WHITE);
btnNewButton.setFont(new Font("宋体", Font.BOLD, 13));
this.getContentPane().add(btnNewButton);
// JLabel lblNewLabel = new JLabel("New label");
// lblNewLabel.setIcon(new ImageIcon("C:\\Users\\Administrator\\Desktop\\Login.png"));
// lblNewLabel.setBounds(0, 0, 350, 597);
// this.getContentPane().add(lblNewLabel);
this.setVisible(true);
}
}
|
[
"[email protected]"
] | |
12027429b6c4cf1fdf52c3c9e40cf0a0cfe5720b
|
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
|
/com/jd/fridge/widget/EmptyLayout.java
|
990d6a090f6b2176349fb93b0262ddec5c0afe49
|
[] |
no_license
|
killbus/jd_decompile
|
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
|
50c521ce6a2c71c37696e5c131ec2e03661417cc
|
refs/heads/master
| 2022-01-13T03:27:02.492579
| 2018-05-14T11:21:30
| 2018-05-14T11:21:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,602
|
java
|
package com.jd.fridge.widget;
import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.jd.fridge.R;
import com.jd.fridge.base.NoNetworkActivity;
import com.jd.fridge.util.t;
/* compiled from: TbsSdkJava */
public class EmptyLayout extends FrameLayout {
public ImageView a;
private ProgressBar b;
private final Context c;
private int d;
private String e = "";
private TextView f;
private TextView g;
private View h;
private View i;
private View j;
private TextView k;
private ImageView l;
private t m;
public EmptyLayout(Context context) {
super(context);
this.c = context;
b();
}
public EmptyLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.c = context;
b();
}
private void b() {
this.m = new t(this.c);
View inflate = View.inflate(this.c, R.layout.view_error_layout, null);
this.a = (ImageView) inflate.findViewById(R.id.img_error_layout);
this.f = (TextView) inflate.findViewById(R.id.tv_error_layout);
this.g = (TextView) inflate.findViewById(R.id.refrush_btn);
this.b = (ProgressBar) inflate.findViewById(R.id.animProgress);
this.h = inflate.findViewById(R.id.layout_error);
this.i = inflate.findViewById(R.id.layout_unbind);
this.j = inflate.findViewById(R.id.layout_float);
this.k = (TextView) inflate.findViewById(R.id.tv_float_error_layout);
this.l = (ImageView) inflate.findViewById(R.id.iv_float_error_arrow);
this.j.setOnClickListener(new OnClickListener(this) {
final /* synthetic */ EmptyLayout a;
{
this.a = r1;
}
public void onClick(View view) {
this.a.c.startActivity(new Intent(this.a.c, NoNetworkActivity.class));
}
});
addView(inflate, new LayoutParams(-1, -1));
}
public int getErrorState() {
return this.d;
}
public void setErrorImg(int i) {
try {
this.a.setImageResource(i);
} catch (Exception e) {
}
}
public void setRefresh(OnClickListener onClickListener) {
if (onClickListener != null) {
this.g.setOnClickListener(onClickListener);
}
}
public void setErrorType(int i) {
switch (i) {
case 1:
this.d = 1;
setVisibility(0);
this.h.setVisibility(0);
this.i.setVisibility(8);
this.j.setVisibility(8);
this.f.setVisibility(0);
this.f.setText(R.string.error_view_app_offline_error);
this.a.setVisibility(0);
this.a.setImageResource(R.drawable.ic_no_wifi);
this.b.setVisibility(8);
this.g.setVisibility(0);
return;
case 2:
this.d = 2;
setVisibility(0);
this.h.setVisibility(0);
this.i.setVisibility(8);
this.j.setVisibility(8);
this.f.setVisibility(8);
this.a.setVisibility(8);
this.b.setVisibility(0);
this.g.setVisibility(8);
return;
case 3:
this.d = 3;
setVisibility(0);
this.h.setVisibility(0);
this.i.setVisibility(8);
this.j.setVisibility(8);
this.a.setVisibility(8);
this.b.setVisibility(8);
this.f.setVisibility(0);
a();
this.g.setVisibility(8);
return;
case 4:
setVisibility(8);
this.b.setVisibility(8);
return;
case 7:
this.d = 7;
setVisibility(0);
this.h.setVisibility(8);
this.i.setVisibility(8);
this.j.setVisibility(0);
this.k.setText(getResources().getString(R.string.error_view_pad_offline_error));
this.l.setVisibility(8);
this.j.setEnabled(false);
return;
case 8:
this.d = 8;
setVisibility(0);
this.h.setVisibility(0);
this.i.setVisibility(8);
this.j.setVisibility(8);
this.f.setVisibility(0);
this.f.setText(R.string.error_view_service_error);
this.a.setVisibility(0);
this.a.setImageResource(R.drawable.ic_server_error);
this.b.setVisibility(8);
this.g.setVisibility(8);
return;
case 9:
this.d = 9;
setVisibility(0);
this.h.setVisibility(8);
this.i.setVisibility(0);
this.j.setVisibility(8);
return;
case 10:
this.d = 10;
setVisibility(0);
this.h.setVisibility(8);
this.i.setVisibility(8);
this.j.setVisibility(0);
this.k.setText(getResources().getString(R.string.error_view_service_float_error));
this.l.setVisibility(8);
this.j.setEnabled(false);
return;
case 11:
this.d = 11;
setVisibility(8);
this.h.setVisibility(8);
this.i.setVisibility(8);
this.j.setVisibility(8);
this.k.setText(getResources().getString(R.string.error_view_app_offline_float_error));
this.l.setVisibility(0);
this.j.setEnabled(true);
return;
default:
return;
}
}
public void setNoDataContent(String str) {
this.e = str;
}
public void a() {
if (this.e.equals("")) {
this.f.setText(R.string.error_view_no_data);
} else {
this.f.setText(this.e);
}
}
public void setVisibility(int i) {
if (i == 8) {
this.d = 4;
}
super.setVisibility(i);
}
}
|
[
"[email protected]"
] | |
1ce7df916c1da55085ed28538dfd8b78773a9c8c
|
62cb0acf78d786a957b0c61e33a692e3e4a259fd
|
/src/test/java/hu/akarnokd/rxjava2/internal/operators/nbp/NbpOperatorMapNotificationTest.java
|
1c10c39f783d093fd4fa57d5069742c003828fdd
|
[
"Apache-2.0"
] |
permissive
|
josenaves/rxjava2-backport
|
4ba34e62c0ee620cfc7fcf56a0cc91cfe4f12d81
|
9cac47e86a9b48b2f021d27e3d0031132b57711e
|
refs/heads/master
| 2020-12-24T12:06:01.695465
| 2016-08-24T13:48:52
| 2016-08-24T13:48:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,940
|
java
|
/**
* Copyright 2015 David Karnok and Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/
package hu.akarnokd.rxjava2.internal.operators.nbp;
import org.junit.Test;
import hu.akarnokd.rxjava2.NbpObservable;
import hu.akarnokd.rxjava2.functions.*;
import hu.akarnokd.rxjava2.subscribers.nbp.NbpTestSubscriber;
public class NbpOperatorMapNotificationTest {
@Test
public void testJust() {
NbpTestSubscriber<Object> ts = new NbpTestSubscriber<Object>();
NbpObservable.just(1)
.flatMap(
new Function<Integer, NbpObservable<Object>>() {
@Override
public NbpObservable<Object> apply(Integer item) {
return NbpObservable.just((Object)(item + 1));
}
},
new Function<Throwable, NbpObservable<Object>>() {
@Override
public NbpObservable<Object> apply(Throwable e) {
return NbpObservable.error(e);
}
},
new Supplier<NbpObservable<Object>>() {
@Override
public NbpObservable<Object> get() {
return NbpObservable.never();
}
}
).subscribe(ts);
ts.assertNoErrors();
ts.assertNotComplete();
ts.assertValue(2);
}
}
|
[
"[email protected]"
] | |
7d974493f8f82dedc3f930e43faec80bb2f5b845
|
0907c886f81331111e4e116ff0c274f47be71805
|
/sources/com/google/android/gms/common/api/internal/BackgroundDetector.java
|
c5579ad41ec3e486916fb61d39ed4d325e4fa716
|
[
"MIT"
] |
permissive
|
Minionguyjpro/Ghostly-Skills
|
18756dcdf351032c9af31ec08fdbd02db8f3f991
|
d1a1fb2498aec461da09deb3ef8d98083542baaf
|
refs/heads/Android-OS
| 2022-07-27T19:58:16.442419
| 2022-04-15T07:49:53
| 2022-04-15T07:49:53
| 415,272,874
| 2
| 0
|
MIT
| 2021-12-21T10:23:50
| 2021-10-09T10:12:36
|
Java
|
UTF-8
|
Java
| false
| false
| 3,904
|
java
|
package com.google.android.gms.common.api.internal;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.Application;
import android.content.ComponentCallbacks2;
import android.content.res.Configuration;
import android.os.Bundle;
import com.google.android.gms.common.util.PlatformVersion;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
/* compiled from: com.google.android.gms:play-services-basement@@17.3.0 */
public final class BackgroundDetector implements Application.ActivityLifecycleCallbacks, ComponentCallbacks2 {
private static final BackgroundDetector zza = new BackgroundDetector();
private final AtomicBoolean zzb = new AtomicBoolean();
private final AtomicBoolean zzc = new AtomicBoolean();
private final ArrayList<BackgroundStateChangeListener> zzd = new ArrayList<>();
private boolean zze = false;
/* compiled from: com.google.android.gms:play-services-basement@@17.3.0 */
public interface BackgroundStateChangeListener {
void onBackgroundStateChanged(boolean z);
}
private BackgroundDetector() {
}
public final void onActivityDestroyed(Activity activity) {
}
public final void onActivityPaused(Activity activity) {
}
public final void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
}
public final void onActivityStarted(Activity activity) {
}
public final void onActivityStopped(Activity activity) {
}
public final void onConfigurationChanged(Configuration configuration) {
}
public final void onLowMemory() {
}
public static BackgroundDetector getInstance() {
return zza;
}
public static void initialize(Application application) {
synchronized (zza) {
if (!zza.zze) {
application.registerActivityLifecycleCallbacks(zza);
application.registerComponentCallbacks(zza);
zza.zze = true;
}
}
}
public final boolean readCurrentStateIfPossible(boolean z) {
if (!this.zzc.get()) {
if (!PlatformVersion.isAtLeastJellyBean()) {
return z;
}
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
ActivityManager.getMyMemoryState(runningAppProcessInfo);
if (!this.zzc.getAndSet(true) && runningAppProcessInfo.importance > 100) {
this.zzb.set(true);
}
}
return isInBackground();
}
public final boolean isInBackground() {
return this.zzb.get();
}
public final void addListener(BackgroundStateChangeListener backgroundStateChangeListener) {
synchronized (zza) {
this.zzd.add(backgroundStateChangeListener);
}
}
public final void onActivityCreated(Activity activity, Bundle bundle) {
boolean compareAndSet = this.zzb.compareAndSet(true, false);
this.zzc.set(true);
if (compareAndSet) {
zza(false);
}
}
public final void onActivityResumed(Activity activity) {
boolean compareAndSet = this.zzb.compareAndSet(true, false);
this.zzc.set(true);
if (compareAndSet) {
zza(false);
}
}
public final void onTrimMemory(int i) {
if (i == 20 && this.zzb.compareAndSet(false, true)) {
this.zzc.set(true);
zza(true);
}
}
private final void zza(boolean z) {
synchronized (zza) {
ArrayList arrayList = this.zzd;
int size = arrayList.size();
int i = 0;
while (i < size) {
Object obj = arrayList.get(i);
i++;
((BackgroundStateChangeListener) obj).onBackgroundStateChanged(z);
}
}
}
}
|
[
"[email protected]"
] | |
48542ca016efdb3bc6bc2a3b54b1ccfefa2d5e35
|
ff17aa326a62de027a014fab99a652f593c7381f
|
/module_mine/src/main/java/com/example/bean/ProvinceBean.java
|
035af183a72adb9dc63c2b7541db291288d6debf
|
[] |
no_license
|
majiaxue/jikehui
|
401aa2db1a3846bbbef9d29a29cdb934cb18b4c2
|
9b30feb8dbf058954fe59676303fd260ab5282c8
|
refs/heads/master
| 2022-08-22T18:25:08.014789
| 2020-05-23T10:40:22
| 2020-05-23T10:40:22
| 263,837,386
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,672
|
java
|
package com.example.bean;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
public class ProvinceBean implements Parcelable {
private String id; /*110101*/
private String name; /*东城区*/
private ArrayList<City2Bean> cityList;
@Override
public String toString() {
return name ;
}
public String getId() {
return id == null ? "" : id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name == null ? "" : name;
}
public void setName(String name) {
this.name = name;
}
public ArrayList<City2Bean> getCityList() {
return cityList;
}
public void setCityList(ArrayList<City2Bean> cityList) {
this.cityList = cityList;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.id);
dest.writeString(this.name);
dest.writeTypedList(this.cityList);
}
public ProvinceBean() {
}
protected ProvinceBean(Parcel in) {
this.id = in.readString();
this.name = in.readString();
this.cityList = in.createTypedArrayList(City2Bean.CREATOR);
}
public static final Creator<ProvinceBean> CREATOR = new Creator<ProvinceBean>() {
@Override
public ProvinceBean createFromParcel(Parcel source) {
return new ProvinceBean(source);
}
@Override
public ProvinceBean[] newArray(int size) {
return new ProvinceBean[size];
}
};
}
|
[
"[email protected]"
] | |
073948db69964e46beffb231205079aa25a330cd
|
456d43c584fb66f65c6a7147cdd22595facf8bd9
|
/jpa/deferred/src/main/java/example/model/Customer903.java
|
24f5ca4462c66f799b5cd8df59b2bcb6fd8086a1
|
[
"Apache-2.0"
] |
permissive
|
niushapaks/spring-data-examples
|
283eec991014e909981055f48efe67ff1e6e19e6
|
1ad228b04523e958236d58ded302246bba3c1e9b
|
refs/heads/main
| 2023-08-21T14:25:55.998574
| 2021-09-29T13:14:33
| 2021-09-29T13:14:33
| 411,679,335
| 1
| 0
|
Apache-2.0
| 2021-09-29T13:11:03
| 2021-09-29T13:11:02
| null |
UTF-8
|
Java
| false
| false
| 624
|
java
|
package example.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Customer903 {
@Id @GeneratedValue(strategy = GenerationType.AUTO) private long id;
private String firstName;
private String lastName;
protected Customer903() {}
public Customer903(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
@Override
public String toString() {
return String.format("Customer903[id=%d, firstName='%s', lastName='%s']", id, firstName, lastName);
}
}
|
[
"[email protected]"
] | |
3f4dab28ff0664b8fc26d6743ad34f73b0f3566f
|
83c016b032e1931efeade0d2c1b238002dc970bf
|
/fcf-fhir-cdshooks/src/main/java/org/fujionclinical/cdshooks/CdsHooksUtil.java
|
3d130faa453ba43c5fed7ad71c209b69c786b67e
|
[] |
no_license
|
fujionclinical/fujion-clinical-fhir
|
5a73ea84bdaa316f71872651dfe92f130a33275f
|
5a681aa6d1f49e54ab2d54327a9a650afe0b8b79
|
refs/heads/master
| 2023-07-28T03:25:06.925648
| 2023-07-05T20:00:03
| 2023-07-05T20:00:03
| 140,999,551
| 1
| 0
| null | 2022-12-14T20:55:35
| 2018-07-15T04:59:30
|
Java
|
UTF-8
|
Java
| false
| false
| 3,717
|
java
|
/*
* #%L
* Fujion Clinical Framework
* %%
* Copyright (C) 2020 fujionclinical.org
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This Source Code Form is also subject to the terms of the Health-Related
* Additional Disclaimer of Warranty and Limitation of Liability available at
*
* http://www.fujionclinical.org/licensing/disclaimer
*
* #L%
*/
package org.fujionclinical.cdshooks;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import com.google.gson.*;
import org.fujion.common.Assert;
import org.opencds.hooks.lib.json.JsonUtil;
import org.opencds.hooks.model.dstu2.util.Dstu2JsonUtil;
import org.opencds.hooks.model.r4.util.R4JsonUtil;
import org.opencds.hooks.model.r5.util.R5JsonUtil;
import org.opencds.hooks.model.response.Indicator;
import org.opencds.hooks.model.stu3.util.Stu3JsonUtil;
import java.lang.reflect.Type;
/**
* Static utility methods.
*/
public class CdsHooksUtil {
private static class IndicatorDeserializer implements JsonDeserializer<Indicator> {
@Override
public Indicator deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
String value = json.getAsString();
return Indicator.resolve(value);
}
}
public static final Gson GSON;
public static final JsonUtil JSON_DSTU2 = new Dstu2JsonUtil();
public static final JsonUtil JSON_STU3 = new Stu3JsonUtil();
public static final JsonUtil JSON_R4 = new R4JsonUtil();
public static final JsonUtil JSON_R5 = new R5JsonUtil();
static {
GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(Indicator.class, new IndicatorDeserializer());
GSON = builder.create();
}
public static JsonUtil getJsonUtil(IGenericClient fhirClient) {
return getJsonUtil(fhirClient.getFhirContext());
}
public static JsonUtil getJsonUtil(FhirContext fhirContext) {
return getJsonUtil(fhirContext.getVersion().getVersion());
}
public static JsonUtil getJsonUtil(FhirVersionEnum version) {
switch (version) {
case DSTU2:
case DSTU2_HL7ORG:
return JSON_DSTU2;
case DSTU3:
return JSON_STU3;
case R4:
return JSON_R4;
case R5:
return JSON_R5;
default:
return Assert.fail("Unsupported FHIR version: %s", version.getFhirVersionString());
}
}
/**
* Constructs a CDS Hook event name.
*
* @param eventType The event type.
* @param components Additional components to append to the event.
* @return The constructed event.
*/
public static String makeEventName(String eventType, String... components) {
StringBuilder sb = new StringBuilder("cdshook.").append(eventType);
for (String component: components) {
sb.append(".").append(component.replace(".", "_"));
}
return sb.toString();
}
private CdsHooksUtil() {
}
}
|
[
"[email protected]"
] | |
cf92a8b06dae842481342859ff5dc30eee4446c4
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/plugin/wallet_payu/remittance/ui/PayURemittanceDetailUI$3$1.java
|
bcf054eecec64622f61f656e14894ae2444225fb
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package com.tencent.mm.plugin.wallet_payu.remittance.ui;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import com.tencent.mm.plugin.wallet_payu.remittance.ui.PayURemittanceDetailUI.3;
class PayURemittanceDetailUI$3$1 implements OnClickListener {
final /* synthetic */ 3 tdD;
PayURemittanceDetailUI$3$1(3 3) {
this.tdD = 3;
}
public final void onClick(DialogInterface dialogInterface, int i) {
this.tdD.tdB.bnW();
}
}
|
[
"[email protected]"
] | |
80551b6b68a5dc117fadc55ec4f121c52f497cfa
|
c3101515ddde8a6e6ddc4294a4739256d1600df0
|
/GeneralApp__2.20_1.0(1)_source_from_JADX/sources/com/navibees/maps/MapControls.java
|
3623950a50c9c606bdfc1db64d0fe8f96ef54292
|
[] |
no_license
|
Aelshazly/Carty
|
b56fdb1be58a6d12f26d51b46f435ea4a73c8168
|
d13f3a4ad80e8a7d0ed1c6a5720efb4d1ca721ee
|
refs/heads/master
| 2022-11-14T23:29:53.547694
| 2020-07-08T19:23:39
| 2020-07-08T19:23:39
| 278,175,183
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,040
|
java
|
package com.navibees.maps;
public class MapControls {
public static boolean SHOW_BACK_BUTTON = true;
public static boolean SHOW_BUILDING_BUTTON_VIEW = true;
public static boolean SHOW_COMPASS_BUTTON = true;
public static boolean SHOW_FLOOR_BUTTON = true;
public static boolean SHOW_NAVIGATE_BUTTON = true;
public static boolean SHOW_NAVIGATION_BUTTON = true;
public static boolean SHOW_NAVIGATION_VIEW = true;
public static boolean SHOW_OUT_OF_COVERAGE_ALERT = true;
public static boolean SHOW_POI_INFO_VIEW_BUTTON = true;
public static boolean SHOW_POPUP_CANCEL_BUTTON = true;
public static boolean SHOW_POPUP_SAVE_LOCATION_BUTTON = true;
public static boolean SHOW_POPUP_SHARE_LOCATION_BUTTON = true;
public static boolean SHOW_POPUP_SHARE_USER_LOCATION_BUTTON = true;
public static boolean SHOW_POPUP_VIEW = true;
public static boolean SHOW_SAVE_LOCATION_BUTTON = true;
public static boolean SHOW_SEARCH_BAR = true;
public static boolean SHOW_TRACKER_BUTTON = true;
}
|
[
"[email protected]"
] | |
429b53248afa7e0dbe51afea4048e2b1f89cbd69
|
19809d0be46f6582a7802a773afc792868304942
|
/java9SrcStudy/src/java.corba/org/omg/IOP/CodecOperations.java
|
abc2310c64988abaf04a123e288189c40c73b8ac
|
[] |
no_license
|
jxxiangwen/JavaStudy
|
fa5194630a0c46d498d1a49acba8449fa4d447e9
|
fbf2accf3e9ec24b633ef26d2f3328e6b021d054
|
refs/heads/master
| 2022-12-21T20:46:04.447682
| 2019-09-02T09:35:27
| 2019-09-02T09:35:27
| 48,320,572
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,500
|
java
|
package org.omg.IOP;
/**
* org/omg/IOP/CodecOperations.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /scratch/HUDSON/workspace/9-2-build-linux-amd64-phase2/jdk9/6725/corba/src/java.corba/share/classes/org/omg/PortableInterceptor/IOP.idl
* Thursday, August 3, 2017 3:57:53 AM UTC
*/
/**
* The formats of IOR components and service context data used by ORB
* services are often defined as CDR encapsulations encoding instances
* of IDL defined data types. The <code>Codec</code> provides a mechanism
* to transfer these components between their IDL data types and their CDR
* encapsulation representations.
* <p>
* A <code>Codec</code> is obtained from the <code>CodecFactory</code>.
* The <code>CodecFactory</code> is obtained through a call to
* <code>ORB.resolve_initial_references( "CodecFactory" )</code>.
*/
public interface CodecOperations
{
/**
* Converts the given any into a byte array based on the encoding
* format effective for this <code>Codec</code>.
*
* @param data The data, in the form of an any, to be encoded into
* a byte array.
* @return A byte array containing the encoded Any. This byte array
* contains both the <code>TypeCode</code> and the data of the type.
* @exception InvalidTypeForEncoding thrown if the type is not valid for
* the encoding format effective for this <code>Codec</code>.
*/
byte[] encode (org.omg.CORBA.Any data) throws org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
/**
* Decodes the given byte array into an Any based on the encoding
* format effective for this <code>Codec</code>.
*
* @param data The data, in the form of a byte array, to be decoded into
* an Any.
* @return An Any containing the data from the decoded byte array.
* @exception FormatMismatch is thrown if the byte array cannot be
* decoded into an Any.
*/
org.omg.CORBA.Any decode (byte[] data) throws org.omg.IOP.CodecPackage.FormatMismatch;
/**
* Converts the given any into a byte array based on the encoding
* format effective for this Codec. Only the data from the Any is
* encoded, not the <code>TypeCode</code>.
*
* @param data The data, in the form of an Any, to be encoded into
* a byte array.
* @return A byte array containing the data from the encoded any.
* @exception InvalidTypeForEncoding thrown if the type is not valid for
* the encoding format effective for this <code>Codec</code>.
*/
byte[] encode_value (org.omg.CORBA.Any data) throws org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
/**
* Decodes the given byte array into an Any based on the given
* <code>TypeCode</code> and the encoding format effective for
* this <code>Codec</code>.
*
* @param data The data, in the form of a byte array, to be decoded
* into an Any.
* @param tc The TypeCode to be used to decode the data.
* @return An Any containing the data from the decoded byte array.
* @exception FormatMismatch thrown if the byte array cannot be
* decoded into an Any.
*/
org.omg.CORBA.Any decode_value (byte[] data, org.omg.CORBA.TypeCode tc) throws org.omg.IOP.CodecPackage.FormatMismatch, org.omg.IOP.CodecPackage.TypeMismatch;
} // interface CodecOperations
|
[
"[email protected]"
] | |
aace6c8bd1bf381f597be87b0c943d14f61be426
|
67a1b5e8dc998ce3594c1c3bb2ec89c30850dee7
|
/GooglePlay6.0.5/app/src/main/java/com/google/android/gms/people/internal/zza.java
|
0436d81bc3dee851876d8690153db00f74442fc0
|
[
"Apache-2.0"
] |
permissive
|
matrixxun/FMTech
|
4a47bd0bdd8294cc59151f1bffc6210567487bac
|
31898556baad01d66e8d87701f2e49b0de930f30
|
refs/heads/master
| 2020-12-29T01:31:53.155377
| 2016-01-07T04:39:43
| 2016-01-07T04:39:43
| 49,217,400
| 2
| 0
| null | 2016-01-07T16:51:44
| 2016-01-07T16:51:44
| null |
UTF-8
|
Java
| false
| false
| 997
|
java
|
package com.google.android.gms.people.internal;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import com.google.android.gms.common.data.DataHolder;
public class zza
extends zzf.zza
{
public void zza(int paramInt, Bundle paramBundle1, Bundle paramBundle2) {}
public final void zza(int paramInt, Bundle paramBundle, ParcelFileDescriptor paramParcelFileDescriptor)
{
throw new RuntimeException("Shouldn't be called");
}
public final void zza(int paramInt, Bundle paramBundle1, ParcelFileDescriptor paramParcelFileDescriptor, Bundle paramBundle2) {}
public void zza(int paramInt, Bundle paramBundle, DataHolder paramDataHolder) {}
public final void zza(int paramInt, Bundle paramBundle, DataHolder[] paramArrayOfDataHolder) {}
}
/* Location: F:\apktool\apktool\Google_Play_Store6.0.5\classes-dex2jar.jar
* Qualified Name: com.google.android.gms.people.internal.zza
* JD-Core Version: 0.7.0.1
*/
|
[
"[email protected]"
] | |
f28bc4354355a378ad08347c7b6b6966100ce37c
|
10d0f5cccbacd12c12e319078859368faac63787
|
/tapaal/src/dk/aau/cs/TCTL/TCTLTransitionNode.java
|
e3632739c24bc43aa42ab5fcb7b16e26112228e6
|
[] |
no_license
|
zinoviy23/tapn-to-mg
|
66c3006dc418e52997b7a9d6e70525bab191f3d5
|
f04455fcb7bb7c270cbd76f485f50430621af848
|
refs/heads/master
| 2023-02-04T06:49:42.734888
| 2020-12-16T15:27:58
| 2020-12-16T15:27:58
| 225,715,799
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,928
|
java
|
package dk.aau.cs.TCTL;
import dk.aau.cs.TCTL.visitors.ITCTLVisitor;
import dk.aau.cs.io.NamePurifier;
public class TCTLTransitionNode extends TCTLAbstractStateProperty {
String template;
String transition;
public TCTLTransitionNode(String template, String transition) {
this.template = NamePurifier.purify(template);
this.transition = NamePurifier.purify(transition);
}
public TCTLTransitionNode(String transition) {
this("", transition);
}
@Override
public TCTLAbstractStateProperty replace(TCTLAbstractProperty object1,
TCTLAbstractProperty object2) {
if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
obj2.setParent(parent);
return obj2;
} else {
return this;
}
}
@Override
public TCTLAbstractStateProperty copy() {
return new TCTLTransitionNode(template, transition);
}
@Override
public void accept(ITCTLVisitor visitor, Object context) {
visitor.visit(this, context);
}
@Override
public boolean containsAtomicPropositionWithSpecificPlaceInTemplate(
String templateName, String placeName) {
return false;
}
@Override
public boolean containsAtomicPropositionWithSpecificTransitionInTemplate(
String templateName, String transitionName) {
return transition.equals(transitionName) && template.equals(templateName);
}
@Override
public boolean containsPlaceHolder() {
return false;
}
@Override
public TCTLAbstractProperty findFirstPlaceHolder() {
return null;
}
public String getTemplate() {
return template;
}
public void setTemplate(String template) {
this.template = template;
}
public String getTransition() {
return this.transition;
}
public void setTransition(String transition) {
this.transition = transition;
}
@Override
public String toString() {
return (template == "" ? "" : template + ".") + transition;
}
}
|
[
"[email protected]"
] | |
e816536b31b8aed3149cad336e42861898158353
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/comparison_qark/de.number26.android/classes_dex2jar/com/google/android/gms/maps/internal/zzbz.java
|
cc994c29715da32b4c4b06dd0f6ec90ccef9dcb8
|
[
"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
| 4,167
|
java
|
package com.google.android.gms.maps.internal;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.IBinder;
import android.os.IInterface;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.internal.Hide;
import com.google.android.gms.common.internal.zzbq;
import com.google.android.gms.dynamic.zzn;
import com.google.android.gms.dynamite.DynamiteModule;
import com.google.android.gms.maps.model.RuntimeRemoteException;
@Hide
public class zzbz
{
private static final String zza = "zzbz";
@SuppressLint({"StaticFieldLeak"})
private static Context zzb;
private static zze zzc;
public zzbz() {}
public static zze zza(Context paramContext)
throws GooglePlayServicesNotAvailableException
{
zzbq.zza(paramContext);
if (zzc != null) {
return zzc;
}
int i = GooglePlayServicesUtil.isGooglePlayServicesAvailable(paramContext);
if (i != 0) {
throw new GooglePlayServicesNotAvailableException(i);
}
Log.i(zza, "Making Creator dynamically");
IBinder localIBinder = (IBinder)zza(zzb(paramContext).getClassLoader(), "com.google.android.gms.maps.internal.CreatorImpl");
Object localObject;
if (localIBinder == null)
{
localObject = null;
}
else
{
IInterface localIInterface = localIBinder.queryLocalInterface("com.google.android.gms.maps.internal.ICreator");
if ((localIInterface instanceof zze)) {
localObject = (zze)localIInterface;
} else {
localObject = new zzf(localIBinder);
}
}
zzc = (zze)localObject;
try
{
zzc.zza(zzn.zza(zzb(paramContext).getResources()), GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_VERSION_CODE);
return zzc;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
private static <T> T zza(Class<?> paramClass)
{
try
{
Object localObject = paramClass.newInstance();
return localObject;
}
catch (IllegalAccessException localIllegalAccessException)
{
String str3 = String.valueOf(paramClass.getName());
String str4 = "Unable to call the default constructor of ".concat(str3);
str4 = str3.length() != 0 ? localIllegalAccessException : new String("Unable to call the default constructor of ");
throw new IllegalStateException(str4);
}
catch (InstantiationException localInstantiationException)
{
String str1 = String.valueOf(paramClass.getName());
String str2 = "Unable to instantiate the dynamic class ".concat(str1);
str2 = str1.length() != 0 ? localInstantiationException : new String("Unable to instantiate the dynamic class ");
throw new IllegalStateException(str2);
}
}
private static <T> T zza(ClassLoader paramClassLoader, String paramString)
{
try
{
Object localObject = zza(((ClassLoader)zzbq.zza(paramClassLoader)).loadClass(paramString));
return localObject;
}
catch (ClassNotFoundException localClassNotFoundException)
{
String str1 = String.valueOf(paramString);
String str2 = "Unable to find dynamic class ".concat(str1);
str2 = str1.length() != 0 ? localClassNotFoundException : new String("Unable to find dynamic class ");
throw new IllegalStateException(str2);
}
}
private static Context zzb(Context paramContext)
{
if (zzb != null) {
return zzb;
}
Context localContext = zzc(paramContext);
zzb = localContext;
return localContext;
}
private static Context zzc(Context paramContext)
{
try
{
Context localContext = DynamiteModule.zza(paramContext, DynamiteModule.zza, "com.google.android.gms.maps_dynamite").zza();
return localContext;
}
catch (Throwable localThrowable)
{
Log.e(zza, "Failed to load maps module, use legacy", localThrowable);
}
return GooglePlayServicesUtil.getRemoteContext(paramContext);
}
}
|
[
"[email protected]"
] | |
9b33205e6cb4004c96aca2b0a32f7dc99d5bb685
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_a38d333047041b3538f874617e34b9c0119293d9/EulerProblem/2_a38d333047041b3538f874617e34b9c0119293d9_EulerProblem_s.java
|
b574f69295a83c2c17a0a8b730cea8a33e4099cf
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,197
|
java
|
package utils.euler;
public abstract class EulerProblem {
long answer;
int runningTime;
protected EulerTimer eulerTimer;
{
eulerTimer = new EulerTimer();
}
public static void run(EulerProblem instance) {
// Actually do the problem
instance.setAnswer(instance.doProblemSpecificStuff());
System.out.println("Answer: " + instance.getAnswer());
// See if the problem was completed in one minute
instance.setRunningTime(instance.getEulerTime());
System.out.println("--------------------------");
System.out.println("Running time: " + instance.getRunningTime() + " seconds");
}
protected abstract long doProblemSpecificStuff();
protected int getEulerTime() {
return eulerTimer.getRunningTime();
}
public long getAnswer() {
return answer;
}
protected void setAnswer(long answerIn) {
answer = answerIn;
}
public int getRunningTime() {
return runningTime;
}
protected void setRunningTime(int runningTimeIn) {
runningTime = runningTimeIn;
}
}
|
[
"[email protected]"
] | |
a47289b0d4d79038dc68427345df0a8d894daae7
|
b40591ea380eced5360cc9f30e55a766f3a66585
|
/qunaer/App/src/main/java/com/mqunar/contacts/basis/impl/common/CollectContactsError.java
|
3eec26fcc55129fb5af725fe12a5d66bdc60315a
|
[] |
no_license
|
PoseidonMRT/UserfulCodeResource
|
08935f4155ac7567fc279300a03f80337f9a5516
|
040dacc22c236fde06f650c46c5cfeb8d52171c0
|
refs/heads/master
| 2022-10-09T13:00:48.616694
| 2019-04-19T02:42:45
| 2019-04-19T02:42:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 147
|
java
|
package com.mqunar.contacts.basis.impl.common;
public class CollectContactsError {
public CollectContactsError(Exception exception) {
}
}
|
[
"[email protected]"
] | |
3f8bc835bd8a44b1dc6ccd7d6f5bd033a915e60e
|
62faa058c143b305d9eaffbec8d4da7b38e095c0
|
/src/java/fr/paris/lutece/portal/service/mailinglist/MailingListRemovalListenerService.java
|
ae0239d2d86c0ea72d21d7273fbd530a9b640b45
|
[] |
permissive
|
dominiquesalasvega/lutece-core
|
c3d4c37d3513e6773c2e248288b576577e01aa60
|
ca28d51f03a2ca65508e4d8411b6da655e31b643
|
refs/heads/master
| 2020-06-17T16:17:49.268072
| 2020-05-15T00:09:32
| 2020-05-15T00:09:32
| 195,974,016
| 1
| 0
|
BSD-3-Clause
| 2019-07-09T09:11:32
| 2019-07-09T09:11:32
| null |
UTF-8
|
Java
| false
| false
| 2,403
|
java
|
/*
* Copyright (c) 2002-2017, Mairie de Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice
* and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice
* and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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.
*
* License 1.0
*/
package fr.paris.lutece.portal.service.mailinglist;
import fr.paris.lutece.portal.service.spring.SpringContextService;
import fr.paris.lutece.portal.service.util.RemovalListenerService;
/**
* MailingListRemovalListenerService
*/
public final class MailingListRemovalListenerService
{
private static final String BEAN_MAILINGLIST_REMOVAL_SERVICE = "mailinglistRemovalService";
/**
* Private constructor
*/
private MailingListRemovalListenerService( )
{
}
/**
* Returns the removal service
*
* @return The removal service
*/
public static RemovalListenerService getService( )
{
return (RemovalListenerService) SpringContextService.getBean( BEAN_MAILINGLIST_REMOVAL_SERVICE );
}
}
|
[
"[email protected]"
] | |
1d8e6326580f6272af266585214018eb532f657e
|
930c207e245c320b108e9699bbbb036260a36d6a
|
/BRICK-RDF4J/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/Cooling_Discharge_Air_Temperature_Proportional_Band_Setpoint.java
|
a066c438ba33d4f50d31beda84de795f9212b016
|
[] |
no_license
|
InnovationSE/BRICK-Generated-By-OLGA
|
24d278f543471e1ce622f5f45d9e305790181fff
|
7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2
|
refs/heads/master
| 2021-07-01T14:13:11.302860
| 2017-09-21T12:44:17
| 2017-09-21T12:44:17
| 104,251,784
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,137
|
java
|
/**
* This file is automatically generated by OLGA
* @author OLGA
* @version 1.0
*/
package brickschema.org.schema._1_0_2.Brick;
import brick.global.util.GLOBAL;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import java.math.BigDecimal;
import javax.xml.datatype.XMLGregorianCalendar;
import java.util.Date;
import brickschema.org.schema._1_0_2.Brick.Proportional_Band_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Setpoint;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Supply_Air_Temperature_Cooling_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Discharge_Air_Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Discharge_Air;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Supply_Air;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Setpoint;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Supply_Air_Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Setpoint;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Supply_Air;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Discharge_Air;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Discharge_Air_Temperature_Cooling_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Discharge_Air_Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Discharge_Air;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Supply_Air;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Setpoint;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Supply_Air_Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Temperature_Setpoint;
import brickschema.org.schema._1_0_2.Brick.Setpoint;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Supply_Air;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Discharge_Air;
import brickschema.org.schema._1_0_2.Brick.UndefinedMeasurement;
import brickschema.org.schema._1_0_2.Brick.MeasurementProperty;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
import brickschema.org.schema._1_0_2.Brick.Air;
import brickschema.org.schema._1_0_2.Brick.Resource;
import brickschema.org.schema._1_0_2.Brick.Point;
import brickschema.org.schema._1_0_2.BrickFrame.TagSet;
public class Cooling_Discharge_Air_Temperature_Proportional_Band_Setpoint implements ICooling_Discharge_Air_Temperature_Proportional_Band_Setpoint {
IRI newInstance;
public Cooling_Discharge_Air_Temperature_Proportional_Band_Setpoint(String namespace, String instanceId) {
super();
newInstance = GLOBAL.factory.createIRI(namespace, instanceId);
GLOBAL.model.add(newInstance, RDF.TYPE, GLOBAL.factory.createIRI("https://brickschema.org/schema/1.0.2/Brick#Cooling_Discharge_Air_Temperature_Proportional_Band_Setpoint"));
}
public IRI iri()
{
return newInstance;
}
}
|
[
"[email protected]"
] | |
faa956b4c1fa874e3b41225345db8add39042dda
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/5/org/jfree/chart/renderer/xy/AbstractXYItemRenderer_getBaseItemLabelGenerator_372.java
|
9ac73d8191f90b4bfef4b8fee35f22cdac28e87f
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,147
|
java
|
org jfree chart render
base creat link item render xyitemrender
implement
abstract item render abstractxyitemrender abstract render abstractrender
return base item label gener
gener possibl code code
item label gener xyitemlabelgener base item label gener getbaseitemlabelgener
base item label gener baseitemlabelgener
|
[
"[email protected]"
] | |
b58ab5dca4854f4e1d0ae732eaa5c0d7b78e65df
|
8da06d3ad989d0092d7761a81f2ec184e0989f7d
|
/d2cmall-provider/d2cmall-msg/d2cmall-msg-api/src/main/java/com/d2c/msg/service/ErrorLogService.java
|
6ecb921c631541ea11c7458cffde4df1f17a7396
|
[] |
no_license
|
RoJinnSennSei/my_mall
|
e5234c631a30b17f2ffbfd4614ef9e8dc04a9869
|
dbec98edac0e679906668be1d5f37ea13f46975b
|
refs/heads/master
| 2020-04-08T15:48:40.090961
| 2018-11-14T10:04:36
| 2018-11-14T10:04:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 376
|
java
|
package com.d2c.msg.service;
import com.d2c.common.api.page.PageModel;
import com.d2c.common.api.page.PageResult;
import com.d2c.msg.model.ErrorLog;
import com.d2c.msg.query.ErrorLogSearcher;
public interface ErrorLogService {
ErrorLog insert(ErrorLog errorLog);
PageResult<ErrorLog> findBySearcher(PageModel pager, ErrorLogSearcher searcher);
int delete(Long id);
}
|
[
"[email protected]"
] | |
87e3328c6ff6603165744db3b18d2576a54cf890
|
dcecbc089153a7bb2b96aebb1867c35474478ece
|
/app/src/main/java/com/feiyou/headstyle/presenter/NoteTypePresenter.java
|
b49bf5e3d8852b55b5a4c83cd642edab315da3d5
|
[] |
no_license
|
djp0507/newheadstyle
|
d77396af1876b617c4722cb588bca7ef43a0ca7f
|
4cccf90d2226947e39acf459c3b73ff3681251eb
|
refs/heads/master
| 2020-04-25T03:54:20.668498
| 2019-02-25T10:31:32
| 2019-02-25T10:31:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 201
|
java
|
package com.feiyou.headstyle.presenter;
/**
* Created by iflying on 2018/1/9.
*/
public interface NoteTypePresenter {
void getNoteTypeData(String topicId, int page, int type, String userId);
}
|
[
"[email protected]"
] | |
f73d43b473917276d9baf3add2334aaaff5b10a4
|
40665051fadf3fb75e5a8f655362126c1a2a3af6
|
/Bernardo-MG-dice-notation-java/22cc67bc7dcb57ef935ad76d215ef38cfd92f0ae/14/ITDefaultDiceNotationExpressionParserException.java
|
ebd90abc28a2e8580ae2056d1d552186a341db59
|
[] |
no_license
|
fermadeiral/StyleErrors
|
6f44379207e8490ba618365c54bdfef554fc4fde
|
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
|
refs/heads/master
| 2020-07-15T12:55:10.564494
| 2019-10-24T02:30:45
| 2019-10-24T02:30:45
| 205,546,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,339
|
java
|
/**
* Copyright 2014-2019 the original author or authors
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.bernardomg.tabletop.dice.test.integration.parser.exception;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
import com.bernardomg.tabletop.dice.parser.DefaultDiceNotationExpressionParser;
/**
* Integration tests for {@code DefaultDiceNotationExpressionParser}, checking
* that it throws exceptions when required.
*
* @author Bernardo Martínez Garrido
*/
@RunWith(JUnitPlatform.class)
public final class ITDefaultDiceNotationExpressionParserException {
/**
* Default constructor.
*/
public ITDefaultDiceNotationExpressionParserException() {
super();
}
/**
* Verifies that an empty text causes an exception.
*/
@Test
public final void testParse_Empty() {
final Executable closure;
closure = () -> new DefaultDiceNotationExpressionParser().parse("");
Assertions.assertThrows(Exception.class, closure);
}
/**
* Verifies that an invalid text causes an exception.
*/
@Test
public final void testParse_Invalid() {
final Executable closure;
closure = () -> new DefaultDiceNotationExpressionParser().parse("abc");
Assertions.assertThrows(Exception.class, closure);
}
/**
* Verifies that a partially valid text causes an exception.
*/
@Test
public final void testParse_PartiallyValid() {
final Executable closure;
closure = () -> new DefaultDiceNotationExpressionParser().parse("6d6y");
Assertions.assertThrows(Exception.class, closure);
}
}
|
[
"[email protected]"
] | |
ce7c3fc597365fd54dc8bc1fc9a4016d17b76fdb
|
5f82aae041ab05a5e6c3d9ddd8319506191ab055
|
/Projects/Time/26/JodaTimeContrib/gwt/src/test/gwt/org/joda/time/convert/TestReadablePartialConverter.java
|
031075d12a71da3320de30ea146d7d8f760e500d
|
[
"Apache-2.0"
] |
permissive
|
lingming/prapr_data
|
e9ddabdf971451d46f1ef2cdbee15ce342a6f9dc
|
be9ababc95df45fd66574c6af01122ed9df3db5d
|
refs/heads/master
| 2023-08-14T20:36:23.459190
| 2021-10-17T13:49:39
| 2021-10-17T13:49:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,236
|
java
|
/*
* Copyright 2001-2005 Stephen Colebourne
*
* 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.joda.time.convert;
// Removed for GWT import java.lang.reflect.Constructor;
// Removed for GWT import java.lang.reflect.Field;
// Removed for GWT import java.lang.reflect.Modifier;
import java.util.Arrays;
import org.joda.time.gwt.JodaGwtTestCase;
import static org.joda.time.gwt.TestConstants.*;
//import junit.framework.TestSuite;
import org.joda.time.Chronology;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeZone;
import org.joda.time.ReadablePartial;
import org.joda.time.TimeOfDay;
import org.joda.time.YearMonthDay;
import org.joda.time.base.BasePartial;
import org.joda.time.chrono.BuddhistChronology;
import org.joda.time.chrono.ISOChronology;
import org.joda.time.chrono.JulianChronology;
/**
* This class is a Junit unit test for ReadablePartialConverter.
*
* @author Stephen Colebourne
*/
public class TestReadablePartialConverter extends JodaGwtTestCase {
// Removed for GWT private static final DateTimeZone UTC = DateTimeZone.UTC;
// Removed for GWT private static final DateTimeZone PARIS = DateTimeZone.forID("Europe/Paris");
// Removed for GWT private static final Chronology ISO_PARIS = ISOChronology.getInstance(PARIS);
private static Chronology JULIAN;
private static Chronology ISO;
private static Chronology BUDDHIST;
private DateTimeZone zone = null;
/* Removed for GWT public static void main(String[] args) {
junit.textui.TestRunner.run(suite());
} */
/* Removed for GWT public static TestSuite suite() {
return new TestSuite(TestReadablePartialConverter.class);
} */
/* Removed for GWT public TestReadablePartialConverter(String name) {
super(name);
} */
protected void gwtSetUp() throws Exception {
super.gwtSetUp();
JULIAN = JulianChronology.getInstance();
ISO = ISOChronology.getInstance();
BUDDHIST = BuddhistChronology.getInstance();
}
//-----------------------------------------------------------------------
/* //BEGIN GWT IGNORE
public void testSingleton() throws Exception {
Class cls = ReadablePartialConverter.class;
assertEquals(false, Modifier.isPublic(cls.getModifiers()));
assertEquals(false, Modifier.isProtected(cls.getModifiers()));
assertEquals(false, Modifier.isPrivate(cls.getModifiers()));
Constructor con = cls.getDeclaredConstructor((Class[]) null);
assertEquals(1, cls.getDeclaredConstructors().length);
assertEquals(true, Modifier.isProtected(con.getModifiers()));
Field fld = cls.getDeclaredField("INSTANCE");
assertEquals(false, Modifier.isPublic(fld.getModifiers()));
assertEquals(false, Modifier.isProtected(fld.getModifiers()));
assertEquals(false, Modifier.isPrivate(fld.getModifiers()));
}
//END GWT IGNORE */
//-----------------------------------------------------------------------
public void testSupportedType() throws Exception {
assertEquals(ReadablePartial.class, ReadablePartialConverter.INSTANCE.getSupportedType());
}
//-----------------------------------------------------------------------
public void testGetChronology_Object_Zone() throws Exception {
assertEquals(ISO_PARIS, ReadablePartialConverter.INSTANCE.getChronology(new TimeOfDay(123L), PARIS));
assertEquals(ISO, ReadablePartialConverter.INSTANCE.getChronology(new TimeOfDay(123L), DateTimeZone.getDefault()));
assertEquals(ISO, ReadablePartialConverter.INSTANCE.getChronology(new TimeOfDay(123L), (DateTimeZone) null));
}
public void testGetChronology_Object_Chronology() throws Exception {
assertEquals(JULIAN, ReadablePartialConverter.INSTANCE.getChronology(new TimeOfDay(123L, BUDDHIST), JULIAN));
assertEquals(JULIAN, ReadablePartialConverter.INSTANCE.getChronology(new TimeOfDay(123L), JULIAN));
assertEquals(BUDDHIST.withUTC(), ReadablePartialConverter.INSTANCE.getChronology(new TimeOfDay(123L, BUDDHIST), (Chronology) null));
}
//-----------------------------------------------------------------------
public void testGetPartialValues() throws Exception {
TimeOfDay tod = new TimeOfDay();
int[] expected = new int[] {1, 2, 3, 4};
int[] actual = ReadablePartialConverter.INSTANCE.getPartialValues(tod, new TimeOfDay(1, 2, 3, 4), ISOChronology.getInstance(PARIS));
assertEquals(true, Arrays.equals(expected, actual));
try {
ReadablePartialConverter.INSTANCE.getPartialValues(tod, new YearMonthDay(2005, 6, 9), JULIAN);
fail();
} catch (IllegalArgumentException ex) {}
try {
ReadablePartialConverter.INSTANCE.getPartialValues(tod, new MockTOD(), JULIAN);
fail();
} catch (IllegalArgumentException ex) {}
}
static class MockTOD extends BasePartial {
protected DateTimeField getField(int index, Chronology chrono) {
switch (index) {
case 0:
return chrono.hourOfDay();
case 1:
return chrono.minuteOfHour();
case 2:
return chrono.year();
case 3:
return chrono.era();
}
return null;
}
public int size() {
return 4;
}
}
//-----------------------------------------------------------------------
public void testToString() {
assertEquals("Converter[org.joda.time.ReadablePartial]", ReadablePartialConverter.INSTANCE.toString());
}
}
|
[
"[email protected]"
] | |
bfbd23183f28b08c8ab3542e1dd072ffb1ca7383
|
27cda5e6fb5da7ae2dea91450ca1082bcaa55424
|
/Source/Java/ImagingCommon/main/src/java/gov/va/med/imaging/notifications/NotificationConfiguration.java
|
8672456a7477a5b0ec1b4e68d91eb50f807a8dee
|
[
"Apache-2.0"
] |
permissive
|
VHAINNOVATIONS/Telepathology
|
85552f179d58624e658b0b266ce83e905480acf2
|
989c06ccc602b0282c58c4af3455c5e0a33c8593
|
refs/heads/master
| 2021-01-01T19:15:40.693105
| 2015-11-16T22:39:23
| 2015-11-16T22:39:23
| 32,991,526
| 3
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,853
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gov.va.med.imaging.notifications;
import gov.va.med.imaging.facade.configuration.AbstractBaseFacadeConfiguration;
import gov.va.med.imaging.facade.configuration.FacadeConfigurationFactory;
import gov.va.med.imaging.facade.configuration.exceptions.CannotLoadConfigurationException;
/**
*
* @author Jon Louthian
*/
public class NotificationConfiguration extends AbstractBaseFacadeConfiguration
{
private static NotificationConfiguration config = null;
private static final String DEFAULT_VIX_STARTUP_SUBJECT = "VIX restarted";
private static final String DEFAULT_VIX_STARTUP_MESSAGE = "The VIX server has restarted";
private boolean notificationEnabled;
private String localSiteNumber;
private String vixStartupSubject;
private String vixStartupMessage;
/**
* @return the vixStartupSubject
*/
public String getVixStartupSubject() {
return isNullOrEmpty(vixStartupSubject) ? DEFAULT_VIX_STARTUP_SUBJECT : vixStartupSubject;
}
/**
* @param vixStartupSubject the vixStartupSubject to set
*/
public void setVixStartupSubject(String vixStartupSubject) {
this.vixStartupSubject = vixStartupSubject;
}
/**
* @return the vixStartupMessage
*/
public String getVixStartupMessage() {
return isNullOrEmpty(vixStartupMessage) ? DEFAULT_VIX_STARTUP_MESSAGE : vixStartupMessage;
}
/**
* @param vixStartupMessage the vixStartupMessage to set
*/
public void setVixStartupMessage(String vixStartupMessage) {
this.vixStartupMessage = vixStartupMessage;
}
/**
* @return the localSiteNumber
*/
public String getLocalSiteNumber() {
return localSiteNumber;
}
/**
* @param localSiteNumber the localSiteNumber to set
*/
public void setLocalSiteNumber(String localSiteNumber) {
this.localSiteNumber = localSiteNumber;
}
/**
* @return the notificationsEnabled
*/
public boolean isNotificationEnabled() {
return notificationEnabled;
}
/**
* @param notificationsEnabled the notificationsEnabled to set
*/
public void setNotificationEnabled(boolean notificationEnabled) {
this.notificationEnabled = notificationEnabled;
}
@Override
public AbstractBaseFacadeConfiguration loadDefaultConfiguration()
{
this.setVixStartupSubject(DEFAULT_VIX_STARTUP_SUBJECT);
this.setVixStartupMessage(DEFAULT_VIX_STARTUP_MESSAGE);
this.setNotificationEnabled(true);
return this;
}
public synchronized static NotificationConfiguration getConfiguration()
{
try
{
return FacadeConfigurationFactory.getConfigurationFactory().getConfiguration(
NotificationConfiguration.class);
}
catch(CannotLoadConfigurationException clcX)
{
return null;
}
}
private boolean isNullOrEmpty(String s) {
if (s == null)
return true;
if (s.equals(""))
return true;
return false;
}
public static void main(String[] args) {
if (args.length != 2)
{
printUsage();
return;
}
NotificationConfiguration defaultConfig = getConfiguration();
defaultConfig.setLocalSiteNumber(args[0]);
boolean notificationEnabled = Boolean.parseBoolean(args[1]);
defaultConfig.setNotificationEnabled(notificationEnabled);
defaultConfig.storeConfiguration();
}
private static void printUsage() {
System.out.println("This program requires two arguments: local_site_number enable_notifications.");
System.out.println("enable_notifications can be true or false.");
}
}
|
[
"[email protected]"
] | |
cddff3ef9454470220f235e6c8567cd9103a8a12
|
89991cdc5ceac6a315dc6422064eb46bebad5250
|
/com/joggle/src/main/java/com/scd/joggle/pojo/po/CommunityPo.java
|
23ae2f8215f124e01e00ba3f3994642ec95cac20
|
[] |
no_license
|
xiaoxian075/MySpringCloud
|
8350d34d565a995761f536c247d77e8b8dad666e
|
a7d00a9bdec7aa08f15cf768626bb27243b1ebf0
|
refs/heads/master
| 2020-03-07T21:48:24.121347
| 2018-04-04T09:55:09
| 2018-04-04T09:55:09
| 127,737,522
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 734
|
java
|
package com.scd.joggle.pojo.po;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class CommunityPo{
private long id;
/**
* 标题
*/
private String title;
/**
* 类型 1:学习教育 2:美食分享 3:生活健康 4:健身健美
*/
private int type;
/**
* url
*/
private String url;
/**
* 是否点赞 0:末点赞 1:已点赞
*/
private int hasPraise;
/**
* 点击量
*/
private long hitNum;
/**
* 点赞量
*/
private long praiseNum;
/**
* 创建时间
*/
private long createTime;
/**
* 更新时间
*/
private long updateTime;
}
|
[
"[email protected]"
] | |
3408b0dc7cb31ac411f08b16c0155b8713568b0f
|
16435878ec235617cce6b6422eeaeb27d3009131
|
/src/main/java/com/opencart/test/handler/OcFilterGroupDescriptionHandler.java
|
edf1eec2cd622065b498490209ec7922316a27f9
|
[] |
no_license
|
gmai2006/opencarttest
|
fa2207f35046ba636ffef8107a4a6e9ffc57b1bb
|
b73df234af5bd431b56d038c4aec7aa5383ff1ce
|
refs/heads/main
| 2023-09-02T20:01:51.767075
| 2021-10-16T07:40:18
| 2021-10-16T07:40:18
| 417,754,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,154
|
java
|
/**
* %% Copyright (C) 2021 DataScience 9 LLC %% Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>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. #L%
*
* <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or
* function or changes please update the templates then submit the template through our web
* interface.
*/
package com.opencart.test.handler;
import com.opencart.test.dao.JpaDao;
import com.opencart.test.entity.OcFilterGroupDescription;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Named;
// @Stateless
@Named("OcFilterGroupDescriptionHandler")
public class OcFilterGroupDescriptionHandler
extends DelimiterFileHandler<OcFilterGroupDescription> {
@Inject
@Named("DefaultJpaDao")
public OcFilterGroupDescriptionHandler(final JpaDao dao) {
super(dao);
}
@Override
protected OcFilterGroupDescription parseLine(List<String> headers, List<String> tokens) {
OcFilterGroupDescription record = new OcFilterGroupDescription();
for (int i = 0; i < tokens.size(); i++) {
switch (headers.get(i)) {
case "filterGroupId":
record.setFilterGroupId(java.lang.Integer.valueOf((tokens.get(i))));
break;
case "languageId":
record.setLanguageId(java.lang.Integer.valueOf((tokens.get(i))));
break;
case "name":
record.setName(tokens.get(i));
break;
default:
logger.severe("Unknown col " + headers.get(i));
}
}
return record;
}
}
|
[
"[email protected]"
] | |
70a1852612c76dcd492167649bb723a89eb8440b
|
fade0fef5ae6e9d840aaee636e7f5f761a2ebd68
|
/nagger/src/main/java/com/lubarov/daniel/nagger/model/Alert.java
|
96b6e2c580fbc7c6fb0c58dfbb84aef5f767a881
|
[] |
no_license
|
dlubarov/daniel
|
b986f9e3df87c21024bd30e00fd2adb9f3b39a84
|
7eed652995cd922b806f25391fe2000599cd3bb7
|
refs/heads/master
| 2021-01-17T09:19:50.808058
| 2019-01-09T03:36:44
| 2019-01-09T03:36:44
| 7,437,086
| 0
| 0
| null | 2013-03-06T06:49:11
| 2013-01-04T08:01:21
|
Java
|
UTF-8
|
Java
| false
| false
| 618
|
java
|
package com.lubarov.daniel.nagger.model;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
public class Alert {
private static final int MAX_CHECKS_TO_STORE = 20;
public String uuid;
public String name;
public String description;
public String command;
public String frequency;
public Set<String> tags = new HashSet<>();
public Set<String> recipientUuids = new HashSet<>();
public LinkedList<Check> checks = new LinkedList<>();
public void addCheck(Check check) {
if (checks.size() >= MAX_CHECKS_TO_STORE)
checks.removeFirst();
checks.add(check);
}
}
|
[
"[email protected]"
] | |
49259023854fb8f018cdcedfe41cd59fe2608e41
|
dec841ce431c03bcf5b1454eab34de21a35376a5
|
/slick2d/src/org/newdawn/slick/util/DefaultLogSystem.java
|
50f106f8a040edfec2e6c6f8d135228ce8b16045
|
[] |
no_license
|
guts2014/Geeksoc
|
277b74ea57964ebd177d29a3cb7eddee444dd374
|
a24d19a9e933bdbe5675b9afc5e54f35bfc3ed10
|
refs/heads/master
| 2016-09-05T11:37:55.748602
| 2014-10-17T15:57:05
| 2014-10-17T15:57:05
| 25,053,159
| 0
| 1
| null | 2014-10-11T23:06:18
| 2014-10-10T21:05:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,951
|
java
|
package org.newdawn.slick.util;
import java.io.PrintStream;
import java.util.Date;
/**
* The default implementation that just spits the messages out to stdout
*
* @author kevin
*/
public class DefaultLogSystem implements LogSystem {
/** The output stream for dumping the log out on */
public static PrintStream out = System.out;
/**
* Log an error
*
* @param message
* The message describing the error
* @param e
* The exception causing the error
*/
public void error(String message, Throwable e) {
error(message);
error(e);
}
/**
* Log an error
*
* @param e
* The exception causing the error
*/
public void error(Throwable e) {
out.println(new Date() + " ERROR:" + e.getMessage());
e.printStackTrace(out);
}
/**
* Log an error
*
* @param message
* The message describing the error
*/
public void error(String message) {
out.println(new Date() + " ERROR:" + message);
}
/**
* Log a warning
*
* @param message
* The message describing the warning
*/
public void warn(String message) {
out.println(new Date() + " WARN:" + message);
}
/**
* Log an information message
*
* @param message
* The message describing the infomation
*/
public void info(String message) {
out.println(new Date() + " INFO:" + message);
}
/**
* Log a debug message
*
* @param message
* The message describing the debug
*/
public void debug(String message) {
out.println(new Date() + " DEBUG:" + message);
}
/**
* Log a warning with an exception that caused it
*
* @param message
* The message describing the warning
* @param e
* The cause of the warning
*/
public void warn(String message, Throwable e) {
warn(message);
e.printStackTrace(out);
}
}
|
[
"[email protected]"
] | |
64c1a6f455935e6bae99084b20c1669460b76a80
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mobileqqi/classes.jar/ftq.java
|
38882ac682f475f4547c6f62859fb176f0f461b5
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.filemanager.activity.fileviewer.troopfile.TroopFileViewerActivity;
import com.tencent.mobileqq.filemanager.app.FMObserver;
import com.tencent.mobileqq.filemanager.core.FileManagerDataCenter;
import com.tencent.mobileqq.filemanager.data.FileManagerEntity;
import com.tencent.mobileqq.filemanager.util.FileManagerUtil;
import com.tencent.qphone.base.util.QLog;
public class ftq
extends FMObserver
{
public ftq(TroopFileViewerActivity paramTroopFileViewerActivity) {}
protected void a()
{
this.a.f();
}
protected void a(long paramLong1, long paramLong2, String paramString, int paramInt)
{
paramString = this.a.b.a().a(paramLong1, paramString, paramInt, paramLong2);
if (paramString == null) {}
while (paramLong2 != paramString.nSessionId) {
return;
}
QLog.i("<FileAssistant>TroopFileViewerActivity", 1, "<FileAssistant>TroopFileViewerActivity OnFileTransferStart: mEntity[" + FileManagerUtil.a(this.a.a) + "]");
this.a.f();
}
protected void a(boolean paramBoolean, long paramLong1, long paramLong2, String paramString, int paramInt)
{
if ((paramLong2 != this.a.a.nSessionId) && (paramLong2 != this.a.a.nRelatedSessionId)) {
return;
}
this.a.f();
}
protected void a(boolean paramBoolean, long paramLong1, long paramLong2, String paramString1, int paramInt1, int paramInt2, String paramString2)
{
QLog.d("<FileAssistant>TroopFileViewerActivity", 1, "<FileAssistant>TroopFileViewerActivityOnFileTransferEnd, isSuccess[" + paramBoolean + "] uniseq[" + paramLong1 + "] nSessionId[" + paramLong2 + "] errCode[" + paramInt2 + "] retMsg[" + paramString2 + "] mEntify:" + FileManagerUtil.a(this.a.a));
if (this.a.b.a().a(paramLong2) == null) {
QLog.e("<FileAssistant>TroopFileViewerActivity", 1, "queryEntity is null,nSessionId[" + paramLong2 + "]");
}
for (;;)
{
return;
if (paramBoolean) {
FileManagerUtil.a(paramLong2);
}
while (paramLong2 == this.a.a.nSessionId)
{
this.a.f();
return;
FileManagerUtil.a(paramLong2, paramInt2, paramString2);
}
}
}
protected void b()
{
this.a.f();
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes2.jar
* Qualified Name: ftq
* JD-Core Version: 0.7.0.1
*/
|
[
"[email protected]"
] | |
5bbf3a8a6e1d36dec678f948f6bf0888e57eeed3
|
b36e88ec8a7b39ea8c9d2001f3b31940387eaed5
|
/exercises/html-text-converter/java/src/test/java/katas/HtmlTextConverterTest.java
|
2c08c3354a7e00611c7a47ded3c58f53096273d3
|
[] |
no_license
|
paucls/legacy-code-refactoring-workshop
|
59499c7d2e6f43f15fed1d463d486a079b2766c6
|
de8cacd4fef9fcf03006fc698338e51734882330
|
refs/heads/master
| 2022-12-05T16:57:21.370863
| 2019-10-17T16:21:04
| 2019-10-17T16:21:04
| 213,056,676
| 0
| 1
| null | 2022-11-16T12:40:53
| 2019-10-05T19:10:20
|
Java
|
UTF-8
|
Java
| false
| false
| 289
|
java
|
package katas;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class HtmlTextConverterTest {
@Test
public void foo() {
HtmlTextConverter converter = new HtmlTextConverter("foo");
assertEquals("fixme", converter.getFilename());
}
}
|
[
"[email protected]"
] | |
e995dc1a71e246bd15ed64104ef96f8c1298fcb1
|
d352d1f57cfd741efd6559ecd4c5882d2dbd4f26
|
/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/PersistenceProducer.java
|
dabfbd4f75d4df2a7240ff78e1c93d5684c0125d
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
hshukla/vespa
|
69b154388bda4f374370883f8c50360a3ad55f0c
|
d618d1442bc1963de08e843ef14c49f12ae7e9d9
|
refs/heads/master
| 2020-05-18T09:48:45.357329
| 2019-04-30T22:17:59
| 2019-04-30T22:17:59
| 184,333,759
| 0
| 0
|
Apache-2.0
| 2019-04-30T21:26:04
| 2019-04-30T21:26:04
| null |
UTF-8
|
Java
| false
| false
| 1,815
|
java
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.content.storagecluster;
import com.yahoo.vespa.config.content.PersistenceConfig;
import com.yahoo.vespa.model.builder.xml.dom.ModelElement;
import com.yahoo.vespa.model.utils.Duration;
/**
* Serves engines config for storage clusters.
*/
public class PersistenceProducer implements PersistenceConfig.Producer {
public static class Builder {
public PersistenceProducer build(ModelElement element) {
ModelElement persistence = element.getChild("engine");
if (persistence == null) {
return new PersistenceProducer();
}
return new PersistenceProducer(
persistence.childAsBoolean("fail-partition-on-error"),
persistence.childAsDuration("recovery-time"),
persistence.childAsDuration("revert-time"));
}
}
Boolean failOnError;
Duration recoveryPeriod;
Duration revertTimePeriod;
public PersistenceProducer() {}
public PersistenceProducer(Boolean failOnError, Duration recoveryPeriod, Duration revertTimePeriod) {
this.failOnError = failOnError;
this.recoveryPeriod = recoveryPeriod;
this.revertTimePeriod = revertTimePeriod;
}
@Override
public void getConfig(PersistenceConfig.Builder builder) {
if (failOnError != null) {
builder.fail_partition_on_error(failOnError);
}
if (recoveryPeriod != null) {
builder.keep_remove_time_period((int)recoveryPeriod.getSeconds());
}
if (revertTimePeriod != null) {
builder.revert_time_period((int)revertTimePeriod.getSeconds());
}
}
}
|
[
"[email protected]"
] | |
31c81d8d381045cff050e4e5b070e780d49caeea
|
1f32d84bbcad4f6ee4555a5c911fece8fcc61fe1
|
/src/main/java/com/edao/codes/patterns/iterator/t3/PancakeHouseMenuIterator.java
|
55f02618547691d1a9d06ec27c97b07062e89bef
|
[] |
no_license
|
elevendao/jdao
|
13c946ed0641c67a5e7364dbc06388e2bff11dd4
|
ca3dce2e4786ae6ff92df933b2f6a5a594fb4831
|
refs/heads/master
| 2021-01-18T13:03:19.815552
| 2017-03-09T13:36:28
| 2017-03-09T13:36:28
| 84,333,741
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,167
|
java
|
/**
* 版权所有:elevendao
* 项目名称:demo
* 创建者: Leo
* 创建日期: 2015年10月5日
* 文件说明:
* 最近修改者:Leo
* 最近修改日期:2015年10月5日
*/
package com.edao.codes.patterns.iterator.t3;
import java.util.ArrayList;
import java.util.Iterator;
/**
* @author Leo
*
*/
public class PancakeHouseMenuIterator implements Iterator {
ArrayList items;
int position = 0;
/**
*
*/
public PancakeHouseMenuIterator(ArrayList items) {
this.items = items;
}
/* (non-Javadoc)
* @see com.edao.codes.patterns.iterator.t2.Iterator#hasNext()
*/
@Override
public boolean hasNext() {
if (position<items.size()) {
return true;
}
return false;
}
/* (non-Javadoc)
* @see com.edao.codes.patterns.iterator.t2.Iterator#next()
*/
@Override
public Object next() {
Object obj = items.get(position);
position = position + 1;
return obj;
}
/* (non-Javadoc)
* @see java.util.Iterator#remove()
*/
@Override
public void remove() {
if (position <= 0) {
throw new IllegalStateException("You can't remove an item until you've done at least one next()");
}
items.remove(position);
}
}
|
[
"[email protected]"
] | |
b120c1a719b71a48001ead55b81c582311c95dd8
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/branches/mule-3-lifecycle/tests/integration/src/test/java/org/mule/module/xml/functional/JXPathExpressionTestCase.java
|
dbacdc477fc4f942fab5c4112f84d307d2928fa9
|
[] |
no_license
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 1,298
|
java
|
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.module.xml.functional;
import java.text.MessageFormat;
import java.util.Properties;
public class JXPathExpressionTestCase extends AbstractXmlPropertyExtractorTestCase
{
public static final String MESSAGE = "<endpoint>{0}</endpoint>";
public JXPathExpressionTestCase()
{
super(true);
}
protected Properties getStartUpProperties()
{
Properties p = new Properties();
p.setProperty("selector.expression", "/endpoint");
p.setProperty("selector.evaluator", "jxpath");
return p;
}
protected Object getMatchMessage() throws Exception
{
return documentFor("matchingEndpoint1");
}
protected Object getErrorMessage() throws Exception
{
return documentFor("missingEndpoint");
}
protected String documentFor(String name) throws Exception
{
return MessageFormat.format(MESSAGE, name);
}
}
|
[
"rossmason@bf997673-6b11-0410-b953-e057580c5b09"
] |
rossmason@bf997673-6b11-0410-b953-e057580c5b09
|
9806e19e8c1536a6d9f119f8dd2942513cabbfc7
|
deb7fe94bf3ea0bbddcdb7ccec60522d23ae5a78
|
/src/main/java/question/Ch08_Recursion_and_Dynamic_Programming/Q8_12_Eight_Queens/Question.java
|
2220b0f4505f2259f6fc612e3ca3790752ffa2e6
|
[] |
no_license
|
jadefromkorea/algorithm
|
86757905ca760269d0643d618996b182fe447d46
|
51a4e3d1414d5811ef23ab4be7a1601df0f1e47c
|
refs/heads/master
| 2022-12-28T19:14:22.172849
| 2020-10-18T08:53:22
| 2020-10-18T08:53:22
| 305,060,062
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,749
|
java
|
package question.Ch08_Recursion_and_Dynamic_Programming.Q8_12_Eight_Queens;
import java.util.ArrayList;
public class Question {
public static int GRID_SIZE = 8;
/* Check if (row1, column1) is a valid spot for a queen by checking if there
* is a queen in the same column or diagonal. We don't need to check it for queens
* in the same row because the calling placeQueen only attempts to place one queen at
* a time. We know this row is empty.
*/
public static boolean checkValid(Integer[] columns, int row1, int column1) {
for (int row2 = 0; row2 < row1; row2++) {
int column2 = columns[row2];
/* Check if (row2, column2) invalidates (row1, column1) as a queen spot. */
/* Check if rows have a queen in the same column */
if (column1 == column2) {
return false;
}
/* Check diagonals: if the distance between the columns equals the distance
* between the rows, then they’re in the same diagonal. */
int columnDistance = Math.abs(column2 - column1);
int rowDistance = row1 - row2; // row1 > row2, so no need to use absolute value
if (columnDistance == rowDistance) {
return false;
}
}
return true;
}
public static void placeQueens(int row, Integer[] columns, ArrayList<Integer[]> results) {
if (row == GRID_SIZE) { // Found valid placement
results.add(columns.clone());
} else {
for (int col = 0; col < GRID_SIZE; col++) {
if (checkValid(columns, row, col)) {
columns[row] = col; // Place queen
placeQueens(row + 1, columns, results);
}
}
}
}
public static void clear(Integer[] columns) {
for (int i = 0; i < GRID_SIZE; i++) {
columns[i] = -1;
}
}
public static void printBoard(Integer[] columns) {
drawLine();
for(int i = 0; i < GRID_SIZE; i++){
System.out.print("|");
for (int j = 0; j < GRID_SIZE; j++){
if (columns[i] == j) {
System.out.print("Q|");
} else {
System.out.print(" |");
}
}
System.out.print("\n");
drawLine();
}
System.out.println("");
}
private static void drawLine() {
StringBuilder line = new StringBuilder();
for (int i=0;i<GRID_SIZE*2+1;i++)
line.append('-');
System.out.println(line.toString());
}
public static void printBoards(ArrayList<Integer[]> boards) {
for (int i = 0; i < boards.size(); i++) {
Integer[] board = boards.get(i);
printBoard(board);
}
}
public static void main(String[] args) {
ArrayList<Integer[]> results = new ArrayList<Integer[]>();
Integer[] columns = new Integer[GRID_SIZE];
clear(columns);
placeQueens(0, columns, results);
printBoards(results);
System.out.println(results.size());
}
}
|
[
"[email protected]"
] | |
38c9f806d8b080e3569691ed5b184084ce3cf25a
|
8f362e22b0bd0a3e1294df90e13791c6bceb1bef
|
/src/uk/dangrew/dinosaurs/game/actions/movement/Movement.java
|
ec811e7471d21f0f47d71f9f5bdae0c3ef268591
|
[
"Apache-2.0"
] |
permissive
|
DanGrew/Dinosaurs
|
829d1fd6371b617f3a58356d8aab10fb9e141650
|
e21ff4519ed97ae85bf2c4845150e591525d9d1e
|
refs/heads/main
| 2023-02-24T20:39:23.880864
| 2021-01-25T17:56:07
| 2021-01-25T17:56:07
| 328,762,490
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,098
|
java
|
package uk.dangrew.dinosaurs.game.actions.movement;
import java.util.function.BiFunction;
import uk.dangrew.dinosaurs.game.world.World;
import uk.dangrew.dinosaurs.game.world.WorldLocation;
/**
* Types of movement permitted by the player.
*/
public enum Movement {
UP(
"Up",
(l, w) -> l.translate(0, -1, w)
),
RIGHT(
"Right",
(l, w) -> l.translate(1, 0, w)
),
DOWN(
"Down",
(l, w) -> l.translate(0, 1, w)
),
LEFT(
"Left",
(l, w) -> l.translate(-1, 0, w)
);
private final String displayName;
private final BiFunction<WorldLocation, World, WorldLocation> rawMoverFunction;
private Movement(String displayName, BiFunction<WorldLocation, World, WorldLocation> rawMoverFunction) {
this.displayName = displayName;
this.rawMoverFunction = rawMoverFunction;
}
public WorldLocation move(WorldLocation worldLocation, World world) {
return rawMoverFunction.apply(worldLocation, world);
}
public String displayName() {
return displayName;
}
}
|
[
"[email protected]"
] | |
c0233b1fec7cbaa603046023197d0ed6b2fba7e0
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/banking_set2/com.advantage.RaiffeisenBank/source/com/thinkdesquared/banking/helpers/ui/IPagingBaseAdapter.java
|
afad914149a57c2e909a99ae141ec4a1d205aab9
|
[
"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
| 297
|
java
|
package com.thinkdesquared.banking.helpers.ui;
import java.util.List;
public abstract interface IPagingBaseAdapter<T>
{
public abstract void addMoreItems(int paramInt, List<T> paramList);
public abstract void addMoreItems(List<T> paramList);
public abstract void removeAllItems();
}
|
[
"[email protected]"
] | |
9ad511bc73bfd9ac28dd3c58ea53d94441ab5c47
|
0aece160ed556c1b97bfd2638bc99634fd35744d
|
/Spring-Data-JPA/src/main/java/br/com/fiap/springdatajpa/dto/customer/PhoneDTO.java
|
1777797f9ed9e5c058168c3d4168f57ae4983c23
|
[] |
no_license
|
ronaldoleitte1975/trabalho-final-persistencia-34scj
|
b8caef468a127beb0a1e69eb9fd31657af58668a
|
39b79113911cd86e133073ffd814d0b374f4d5d8
|
refs/heads/master
| 2022-07-09T14:02:47.041160
| 2019-07-07T19:06:56
| 2019-07-07T19:06:56
| 194,278,134
| 0
| 6
| null | 2022-06-21T01:21:51
| 2019-06-28T13:25:47
|
Java
|
UTF-8
|
Java
| false
| false
| 349
|
java
|
package br.com.fiap.springdatajpa.dto.customer;
public class PhoneDTO {
public PhoneDTO() {
}
public PhoneDTO(String number) {
this.number = number;
}
private String number;
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
}
|
[
"[email protected]"
] | |
65bd1ad1f2b68a5ac2957fafac6fe7a84424eb42
|
4d39e1bc34193629f7222f2cc03b6926eee9332b
|
/AppPilotoJ2ee6/src/br/com/topsys/dao/TipoClienteDAO.java
|
987e571a189b990eef32a1cea026c86ba6e15bb0
|
[] |
no_license
|
topazio/AppPilotoJ2ee6
|
ed8daa047f7c2caacb71592dcfe5b7fec1d1b859
|
0015ca5ece6f0445665a7f662e35bd21eb428224
|
refs/heads/master
| 2021-01-18T15:23:44.304938
| 2011-12-05T00:36:10
| 2011-12-05T00:36:10
| 2,910,394
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 656
|
java
|
package br.com.topsys.dao;
import java.util.ArrayList;
import java.util.List;
import br.com.topsys.database.TSDataBaseBrokerIf;
import br.com.topsys.database.factory.TSDataBaseBrokerFactory;
import br.com.topsys.model.TipoClienteModel;
public class TipoClienteDAO {
@SuppressWarnings("unchecked")
public List<TipoClienteModel> pesquisarTodos() {
//TSDataBaseBrokerIf broker = TSDataBaseBrokerFactory.getDataBaseBrokerIf();
// broker.setPropertySQL("tipoclientedao.pesquisarTodos");
//return broker.getCollectionBean(TipoClienteModel.class,"id","descricao");
return new ArrayList<TipoClienteModel>();
}
}
|
[
"[email protected]"
] | |
3673db31fb63ff99edd366d346256a266fe10390
|
21b736028889a32f1dcba96e8236f80cc9973df5
|
/src/com/microsoft/schemas/xrm/_2011/metadata/impl/ArrayOfStringFormatImpl.java
|
7028cfbb51e7732e40b075f876859b12af0f9401
|
[] |
no_license
|
nbuddharaju/Java2CRMCRUD
|
3cfcf487ce9fe9c8791484387f32da2e83ccef15
|
aaba26757df088dda780aa6fe873c7d8356f4d56
|
refs/heads/master
| 2021-01-19T04:07:07.528318
| 2016-05-28T08:52:28
| 2016-05-28T08:52:28
| 59,885,531
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,109
|
java
|
/*
* XML Type: ArrayOfStringFormat
* Namespace: http://schemas.microsoft.com/xrm/2011/Metadata
* Java type: com.microsoft.schemas.xrm._2011.metadata.ArrayOfStringFormat
*
* Automatically generated - do not modify.
*/
package com.microsoft.schemas.xrm._2011.metadata.impl;
/**
* An XML ArrayOfStringFormat(@http://schemas.microsoft.com/xrm/2011/Metadata).
*
* This is a complex type.
*/
public class ArrayOfStringFormatImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.xrm._2011.metadata.ArrayOfStringFormat
{
private static final long serialVersionUID = 1L;
public ArrayOfStringFormatImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName STRINGFORMAT$0 =
new javax.xml.namespace.QName("http://schemas.microsoft.com/xrm/2011/Metadata", "StringFormat");
/**
* Gets array of all "StringFormat" elements
*/
public com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[] getStringFormatArray()
{
synchronized (monitor())
{
check_orphaned();
java.util.List targetList = new java.util.ArrayList();
get_store().find_all_element_users(STRINGFORMAT$0, targetList);
com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[] result = new com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[targetList.size()];
for (int i = 0, len = targetList.size() ; i < len ; i++)
result[i] = (com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum)((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getEnumValue();
return result;
}
}
/**
* Gets ith "StringFormat" element
*/
public com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum getStringFormatArray(int i)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STRINGFORMAT$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
return (com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum)target.getEnumValue();
}
}
/**
* Gets (as xml) array of all "StringFormat" elements
*/
public com.microsoft.schemas.xrm._2011.metadata.StringFormat[] xgetStringFormatArray()
{
synchronized (monitor())
{
check_orphaned();
java.util.List targetList = new java.util.ArrayList();
get_store().find_all_element_users(STRINGFORMAT$0, targetList);
com.microsoft.schemas.xrm._2011.metadata.StringFormat[] result = new com.microsoft.schemas.xrm._2011.metadata.StringFormat[targetList.size()];
targetList.toArray(result);
return result;
}
}
/**
* Gets (as xml) ith "StringFormat" element
*/
public com.microsoft.schemas.xrm._2011.metadata.StringFormat xgetStringFormatArray(int i)
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null;
target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().find_element_user(STRINGFORMAT$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "StringFormat" element
*/
public int sizeOfStringFormatArray()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(STRINGFORMAT$0);
}
}
/**
* Sets array of all "StringFormat" element
*/
public void setStringFormatArray(com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[] stringFormatArray)
{
synchronized (monitor())
{
check_orphaned();
arraySetterHelper(stringFormatArray, STRINGFORMAT$0);
}
}
/**
* Sets ith "StringFormat" element
*/
public void setStringFormatArray(int i, com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum stringFormat)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STRINGFORMAT$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
target.setEnumValue(stringFormat);
}
}
/**
* Sets (as xml) array of all "StringFormat" element
*/
public void xsetStringFormatArray(com.microsoft.schemas.xrm._2011.metadata.StringFormat[]stringFormatArray)
{
synchronized (monitor())
{
check_orphaned();
arraySetterHelper(stringFormatArray, STRINGFORMAT$0);
}
}
/**
* Sets (as xml) ith "StringFormat" element
*/
public void xsetStringFormatArray(int i, com.microsoft.schemas.xrm._2011.metadata.StringFormat stringFormat)
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null;
target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().find_element_user(STRINGFORMAT$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
target.set(stringFormat);
}
}
/**
* Inserts the value as the ith "StringFormat" element
*/
public void insertStringFormat(int i, com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum stringFormat)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target =
(org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(STRINGFORMAT$0, i);
target.setEnumValue(stringFormat);
}
}
/**
* Appends the value as the last "StringFormat" element
*/
public void addStringFormat(com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum stringFormat)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STRINGFORMAT$0);
target.setEnumValue(stringFormat);
}
}
/**
* Inserts and returns a new empty value (as xml) as the ith "StringFormat" element
*/
public com.microsoft.schemas.xrm._2011.metadata.StringFormat insertNewStringFormat(int i)
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null;
target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().insert_element_user(STRINGFORMAT$0, i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "StringFormat" element
*/
public com.microsoft.schemas.xrm._2011.metadata.StringFormat addNewStringFormat()
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null;
target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().add_element_user(STRINGFORMAT$0);
return target;
}
}
/**
* Removes the ith "StringFormat" element
*/
public void removeStringFormat(int i)
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(STRINGFORMAT$0, i);
}
}
}
|
[
"[email protected]"
] | |
8c941d181ace801000a823e386d19527e84c1f71
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/api-vs-impl-small/app/src/main/java/org/gradle/testapp/performancenull_39/Productionnull_3883.java
|
a9078e354adce56832bc995467c20dc7d06e683a
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package org.gradle.testapp.performancenull_39;
public class Productionnull_3883 {
private final String property;
public Productionnull_3883(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
|
[
"[email protected]"
] | |
efddc7969a8ab2cffabe6522149894ee5ce72243
|
7983b2efeafb036a7dbf41a6d738996aa768e4c0
|
/src/main/java/coinsorter/textui/SetMaximumValueCommand.java
|
4863d699992704f2645076f2fd17736f3c575e60
|
[
"MIT"
] |
permissive
|
dtmo/coin-sorter
|
2ed2fbfed426f029e4a6e0faca2b9a087f6f6da4
|
dd0efc10485156001cce0e320518b0f816d4a581
|
refs/heads/main
| 2023-01-23T20:44:45.199793
| 2020-11-29T11:42:24
| 2020-11-29T11:42:24
| 316,559,510
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 832
|
java
|
package coinsorter.textui;
import java.util.List;
import coinsorter.CoinSorter;
import coinsorter.validation.MinimumValueConstraintValidator;
public class SetMaximumValueCommand implements Command {
private final CoinSorter coinSorter;
private final Console console;
public SetMaximumValueCommand(final CoinSorter coinSorter, final Console console) {
this.coinSorter = coinSorter;
this.console = console;
}
@Override
public void execute() {
console.println("Current maximum coin input is: " + coinSorter.getMaximumValue());
final int maximumValue = console.promptForValidInt("Please enter a new maximum coin input: ",
List.of(new MinimumValueConstraintValidator(coinSorter.getMinimumValue())));
coinSorter.setMaximumValue(maximumValue);
}
}
|
[
"[email protected]"
] | |
70685c4501b7b33a098d2843834905c6527bd9e6
|
dc0919c9609f03f5b239ec0799cea22ed070f411
|
/android/support/v4/widget/SearchViewCompat$SearchViewCompatHoneycombImpl$2.java
|
7ea5c5cbb9a48af18c64f059dd5fa57f77de3087
|
[] |
no_license
|
jjensn/milight-decompile
|
a8f98af475f452c18a74fd1032dce8680f23abc0
|
47c4b9eea53c279f6fab3e89091e2fef495c6159
|
refs/heads/master
| 2021-06-01T17:23:28.555123
| 2016-10-12T18:07:53
| 2016-10-12T18:07:53
| 70,721,205
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 632
|
java
|
package android.support.v4.widget;
class SearchViewCompat$SearchViewCompatHoneycombImpl$2
implements SearchViewCompatHoneycomb.OnCloseListenerCompatBridge
{
SearchViewCompat$SearchViewCompatHoneycombImpl$2(SearchViewCompat.SearchViewCompatHoneycombImpl paramSearchViewCompatHoneycombImpl, SearchViewCompat.OnCloseListenerCompat paramOnCloseListenerCompat)
{
}
public boolean onClose()
{
return this.val$listener.onClose();
}
}
/* Location:
* Qualified Name: android.support.v4.widget.SearchViewCompat.SearchViewCompatHoneycombImpl.2
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.6.1-SNAPSHOT
*/
|
[
"[email protected]"
] | |
9484a24d2bdda933eebc6b71c426c3541660a3b4
|
84fb0330cab09be61351dfd7797e4afc932a767c
|
/src/constant/Defines.java
|
ae38c94b8acbcc7488b2f791588bcded2724f242
|
[] |
no_license
|
chauvuong/OrganicStore-1
|
c14da5286202a86b9ac552c74f0c64c989eb8dd3
|
c428ae738e7f4361a52185252ca13d1c9267efcb
|
refs/heads/master
| 2020-04-17T21:15:04.232513
| 2019-01-03T11:01:07
| 2019-01-03T11:01:07
| 166,941,333
| 1
| 0
| null | 2019-01-22T06:39:45
| 2019-01-22T06:39:45
| null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package constant;
public class Defines {
public static final String DIR_UPLOAD = "files";
public static final int ROW_COUNT = 5;
public String SHOP_TEMPLATE_URL;
public String getSHOP_TEMPLATE_URL() {
return SHOP_TEMPLATE_URL;
}
public void setSHOP_TEMPLATE_URL(String sHOP_TEMPLATE_URL) {
SHOP_TEMPLATE_URL = sHOP_TEMPLATE_URL;
}
}
|
[
"[email protected]"
] | |
2d579f6a566a0e2bb48be0223789d4d1c4ae9f38
|
ba005c6729aed08554c70f284599360a5b3f1174
|
/lib/selenium-server-standalone-3.4.0/com/gargoylesoftware/htmlunit/javascript/SimpleScriptableProxy.java
|
ee867d37205a90c95feb2a89e00bb5dee8fdfe3d
|
[] |
no_license
|
Viral-patel703/Testyourbond-aut0
|
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
|
784ab7a3df33d0efbd41f3adadeda22844965a56
|
refs/heads/master
| 2020-08-09T00:27:26.261661
| 2017-11-07T10:12:05
| 2017-11-07T10:12:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,138
|
java
|
package com.gargoylesoftware.htmlunit.javascript;
import java.io.Serializable;
import net.sourceforge.htmlunit.corejs.javascript.Delegator;
import net.sourceforge.htmlunit.corejs.javascript.Scriptable;
public abstract class SimpleScriptableProxy<T extends SimpleScriptable>
extends Delegator
implements Serializable
{
public SimpleScriptableProxy() {}
public abstract T getDelegee();
public Object get(int index, Scriptable start)
{
if ((start instanceof SimpleScriptableProxy)) {
start = ((SimpleScriptableProxy)start).getDelegee();
}
return getDelegee().get(index, start);
}
public Object get(String name, Scriptable start)
{
if ((start instanceof SimpleScriptableProxy)) {
start = ((SimpleScriptableProxy)start).getDelegee();
}
return getDelegee().get(name, start);
}
public boolean has(int index, Scriptable start)
{
if ((start instanceof SimpleScriptableProxy)) {
start = ((SimpleScriptableProxy)start).getDelegee();
}
return getDelegee().has(index, start);
}
public boolean has(String name, Scriptable start)
{
if ((start instanceof SimpleScriptableProxy)) {
start = ((SimpleScriptableProxy)start).getDelegee();
}
return getDelegee().has(name, start);
}
public boolean hasInstance(Scriptable instance)
{
if ((instance instanceof SimpleScriptableProxy)) {
instance = ((SimpleScriptableProxy)instance).getDelegee();
}
return getDelegee().hasInstance(instance);
}
public void put(int index, Scriptable start, Object value)
{
if ((start instanceof SimpleScriptableProxy)) {
start = ((SimpleScriptableProxy)start).getDelegee();
}
getDelegee().put(index, start, value);
}
public void put(String name, Scriptable start, Object value)
{
if ((start instanceof SimpleScriptableProxy)) {
start = ((SimpleScriptableProxy)start).getDelegee();
}
getDelegee().put(name, start, value);
}
public Object getDefaultValue(Class<?> hint)
{
return getDelegee().getDefaultValue(hint);
}
}
|
[
"[email protected]"
] | |
a7b6cfcc119c231936f2d091d3b83bcf233beac8
|
2f5220f7126e52a939412067f08a321bb95f0010
|
/gulimall-ware/src/main/java/com/atguigu/gulimall/ware/entity/PurchaseEntity.java
|
b196e4c1d662dae9eecb514c12ccd1882d48f87f
|
[
"Apache-2.0"
] |
permissive
|
gzqnb/springcloud
|
77e5c581840ba7b4b72a86a49eb4c4a50b92a020
|
b7f1ef3e78155230502a3058195deb088904b547
|
refs/heads/master
| 2023-06-20T02:09:45.873381
| 2021-07-05T06:37:23
| 2021-07-05T06:37:23
| 360,515,806
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 912
|
java
|
package com.atguigu.gulimall.ware.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 采购信息
*
* @author guoziqian
* @email [email protected]
* @date 2021-03-17 14:58:07
*/
@Data
@TableName("wms_purchase")
public class PurchaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId
private Long id;
/**
*
*/
private Long assigneeId;
/**
*
*/
private String assigneeName;
/**
*
*/
private String phone;
/**
*
*/
private Integer priority;
/**
*
*/
private Integer status;
/**
*
*/
private Long wareId;
/**
*
*/
private BigDecimal amount;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}
|
[
"[email protected]"
] | |
6cb645e937d70cb9458e7c8322bbef0b9079f6b8
|
76875917925793ea446a1b1536606633a3272653
|
/evo-springboot-annotation/src/main/java/com/tazine/evo/annotation/conditional/spring/LinuxListService.java
|
d538a5545fdc0f84699e48769aa4fbe026758a15
|
[
"MIT"
] |
permissive
|
BookFrank/EVO-World
|
01555355c434fac65406e158ffa5f7aebf3ff7dc
|
3d27ae414f0281668024838a4c64db4bdd4a6377
|
refs/heads/master
| 2022-06-22T05:56:43.648597
| 2020-05-05T15:44:32
| 2020-05-05T15:44:32
| 147,456,884
| 1
| 1
|
MIT
| 2022-06-21T02:58:35
| 2018-09-05T03:54:10
|
Java
|
UTF-8
|
Java
| false
| false
| 276
|
java
|
package com.tazine.evo.annotation.conditional.spring;
/**
* Linux 下所要创建的 Bean 的类
*
* @author frank
* @date 2018/09/26
*/
public class LinuxListService implements ListFileService {
@Override
public String showList() {
return "ls";
}
}
|
[
"[email protected]"
] | |
233cc915b691a8a470f2a304997c57341153ecd3
|
56320ce0c5d583c3fb21a5f66381760fe24bdc90
|
/app/src/main/java/com/migue/zeus/expensesnotes/ui/add_expense_or_income_activity/AddAccountEntryContract.java
|
d138f8c6423d2e33d51fa3f0c824b5b259027816
|
[] |
no_license
|
MigueArcos/Expenses-Notes
|
b34e74dd55bfefdf67726d4e5dc559ccda25468d
|
4fb2ef538b7ba0065c00ddb5912fb3c0fbc41abd
|
refs/heads/master
| 2020-05-04T04:53:15.004318
| 2019-05-14T23:03:26
| 2019-05-14T23:03:26
| 178,975,814
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,770
|
java
|
package com.migue.zeus.expensesnotes.ui.add_expense_or_income_activity;
import com.migue.zeus.expensesnotes.data.models.Account;
import com.migue.zeus.expensesnotes.data.models.AccountEntry;
import com.migue.zeus.expensesnotes.data.models.AccountEntryCategory;
import com.migue.zeus.expensesnotes.data.models.AccountEntryDetail;
import com.migue.zeus.expensesnotes.data.models.AccountEntryWithDetails;
import java.util.List;
public class AddAccountEntryContract {
interface View{
void showCategories(List<AccountEntryCategory> accountEntryCategories);
void showAccounts(List<Account> accounts);
void showTitle(String title);
void showDate(String date);
void notifyAccountEntryCreated(long id);
}
interface Model {
List<Account> getAccounts();
List<AccountEntryCategory> getAccountEntriesCategories(boolean isExpense);
String getAccountEntryTitle(AccountEntry accountEntry);
String getAccountEntryDate(AccountEntry accountEntry);
String getAccountEntryDate();
long createAccountEntry(String name, String date, long expenseCategoryId, List<AccountEntryDetail> details, boolean isExpense);
void updateAccountEntry(AccountEntryWithDetails accountEntryWithDetails);
}
interface Presenter{
void getAccounts();
void getAccountEntryCategories(boolean isExpense);
void getAccountEntryTitle(AccountEntry accountEntry);
void getAccountEntryDate(AccountEntry accountEntry);
void getAccountEntryDate();
void createAccountEntry(String name, String date, long expenseCategoryId, List<AccountEntryDetail> details, boolean isExpense);
void updateAccountEntry(AccountEntryWithDetails accountEntryWithDetails);
}
}
|
[
"="
] |
=
|
069a9feb8d53ee56eda96c35a0cc7a35e5b14036
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/shortvideo/cover/C38637g.java
|
190dc831d49880e771b37ebe53a6385f76937962
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 480
|
java
|
package com.p280ss.android.ugc.aweme.shortvideo.cover;
import com.p280ss.android.ugc.aweme.shortvideo.mvtemplate.p1583a.C40093a;
/* renamed from: com.ss.android.ugc.aweme.shortvideo.cover.g */
final /* synthetic */ class C38637g implements C40093a {
/* renamed from: a */
private final C386262 f100369a;
C38637g(C386262 r1) {
this.f100369a = r1;
}
/* renamed from: a */
public final void mo96653a() {
this.f100369a.mo96640b();
}
}
|
[
"[email protected]"
] | |
d3255470d07bafa0d02ad4fda5e24293011a705e
|
f45d75214eee81a70768f05e85a8e3123a909b1b
|
/example-spring-boot-starter/src/main/java/com/gyoomi/example/autoconfigure/ExampleProperties.java
|
d7a9ea4b025d168cb9a6f883d8293c22a5b2ee32
|
[] |
no_license
|
gyoomi/starter
|
1bfe157f9d9ea418d9aacde21acb12506522c5d2
|
028b3573fb12829a15423a123c8a85a62bd1cd5a
|
refs/heads/master
| 2023-03-03T09:28:01.456311
| 2021-01-21T06:52:09
| 2021-01-21T06:52:09
| 331,539,473
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 878
|
java
|
/**
* Copyright © 2020-2021, Glodon Digital Supplier & Purchaser BU.
* <p>
* All Rights Reserved.
*/
package com.gyoomi.example.autoconfigure;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.List;
/**
* Example - 配置类
*
* @author Leon
* @date 2021-01-21 10:33
*/
@ConfigurationProperties(prefix = "example")
public class ExampleProperties
{
/**
* name
*/
private String name;
/**
* age
*/
private Integer age;
/**
* hobby
*/
private List<String> hobby;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public Integer getAge()
{
return age;
}
public void setAge(Integer age)
{
this.age = age;
}
public List<String> getHobby()
{
return hobby;
}
public void setHobby(List<String> hobby)
{
this.hobby = hobby;
}
}
|
[
"[email protected]"
] | |
75ebd41685f264c4280e63ab13454e83783b3999
|
34867b96d902dfd45c5a1a5767a9fccdf38c5ff6
|
/src/com/org/dp/structural/bridge/Printer.java
|
b9cac41ac226a51cd0503366ffe2e3504a1ef875
|
[] |
no_license
|
iamsubho76/CodeDesignPattern
|
08c9016524c179327d35ef13fc0687cce532dc62
|
524b683f0013e5a7d896e626a96107de31dafb55
|
refs/heads/master
| 2021-08-30T13:35:01.523074
| 2017-12-18T05:23:19
| 2017-12-18T05:23:19
| 114,598,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 290
|
java
|
package com.org.dp.structural.bridge;
import java.util.List;
public abstract class Printer {
public String print(Formatter formatter) {
return formatter.format(getHeader(), getDetails());
}
abstract protected List<Detail> getDetails();
abstract protected String getHeader();
}
|
[
"[email protected]"
] | |
bab9bcdea99f9e5337eb6c7401f97e7f2c7e303b
|
9552eeea8217e26ac5d2cdf8c197dbec231014fc
|
/src/main/java/com/selectica/Package201506161/definitions/CFR1BO/actions/ManageActivationCA3ActionScript.java
|
ec722174d4c1a35ecd5e3b965e5d29e2ba246791
|
[] |
no_license
|
epavlovskaya/rcfLenaBaseDemo
|
05db6503c494b71edb4d748a00ef866fd7768ac2
|
3675d57a0fd6c2936e62b64606ad3c0f374e327d
|
refs/heads/master
| 2021-01-25T10:00:38.924510
| 2015-06-16T09:52:21
| 2015-06-16T09:52:21
| 37,266,126
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.selectica.Package201506161.definitions.CFR1BO.actions;
import com.selectica.Package201506161.eclm.definitions.CFR1BO.actions.CreateNotificationAlertAction;
import com.selectica.rcfscripts.AbstractBOWriteScript;
/**CreateNotificationAlert*/
public class ManageActivationCA3ActionScript extends CreateNotificationAlertAction {
}
|
[
"[email protected]"
] | |
b4119ee338d11848f05217673fe6ed185f5ea6dd
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/unimkt-20181212/src/main/java/com/aliyun/unimkt20181212/models/UpdateFlowResponse.java
|
a49573fe344ea05d83d40dd08ec912a82c96a691
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,320
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.unimkt20181212.models;
import com.aliyun.tea.*;
public class UpdateFlowResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public UpdateFlowResponseBody body;
public static UpdateFlowResponse build(java.util.Map<String, ?> map) throws Exception {
UpdateFlowResponse self = new UpdateFlowResponse();
return TeaModel.build(map, self);
}
public UpdateFlowResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public UpdateFlowResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public UpdateFlowResponse setBody(UpdateFlowResponseBody body) {
this.body = body;
return this;
}
public UpdateFlowResponseBody getBody() {
return this.body;
}
}
|
[
"[email protected]"
] | |
274a8ed133357ad5b7f03326fcbf51820c772f8a
|
d1057dd7f1c0a72821e511f7587e511368f41f94
|
/AndroidProject/Park/app/src/main/java/com/fcn/park/me/module/MeCarEditorModule.java
|
d41fab33eb398e36ea5aee7d2b0a0a97ecefc465
|
[] |
no_license
|
hyb1234hi/Atom-Github
|
1c7b1800c2dcf8a12af90bf54de2a5964c6d625e
|
46bcb8cc204ef71f0d310d4bb9a3ae7cdf7b04a1
|
refs/heads/master
| 2020-08-27T16:23:50.568306
| 2018-07-06T01:26:17
| 2018-07-06T01:26:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,187
|
java
|
package com.fcn.park.me.module;
import android.content.Context;
import com.fcn.park.base.http.ApiClient;
import com.fcn.park.base.http.HttpResult;
import com.fcn.park.base.http.ProgressSubscriber;
import com.fcn.park.base.http.RequestImpl;
import com.fcn.park.base.http.RetrofitManager;
import com.fcn.park.base.interfacee.OnDataCallback;
/**
* Created by 860117073 on 2018/4/26.
*/
public class MeCarEditorModule {
/**请求编辑车辆信息
* @param context
* @param CarOwner
* @param PlateNumber
* @param Phone
* @param callback
*/
public void requestSendCarEditor(final Context context,String carId,String CarOwner,String PlateNumber,
String Phone,final OnDataCallback<String>callback){
RetrofitManager.toSubscribe(ApiClient.getApiService().carEditor(carId,CarOwner,PlateNumber,Phone),
new ProgressSubscriber<>(context, new RequestImpl<HttpResult<String>>(){
@Override
public void onNext(HttpResult<String> result) {
callback.onSuccessResult(result.getMsg());
}
}));
}
}
|
[
"[email protected]"
] | |
76a894c494a94b5fb01d597c6736d06d8cee2cd8
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/16/16_2d3b43d6c33d9cf6faed486eb4c51391055940d7/CollectionDataModel/16_2d3b43d6c33d9cf6faed486eb4c51391055940d7_CollectionDataModel_t.java
|
7ff3937ab9e9e682204bdd2e31e3a256f1f122a8
|
[] |
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,794
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package javax.faces.model;
import java.util.Collection;
/**
* <p class="changed_added_2_2"><strong>CollectionDataModel</strong> is a convenience
* implementation of {@link DataModel} that wraps an <code>Collection</code> of
* Java objects.</p>
*/
public class CollectionDataModel<E> extends DataModel<E> {
// ------------------------------------------------------------ Constructors
/**
* <p>Construct a new {@link CollectionDataModel} with no specified
* wrapped data.</p>
*/
public CollectionDataModel() {
this(null);
}
/**
* <p>Construct a new {@link CollectionDataModel} wrapping the specified
* list.</p>
*
* @param collection Collection to be wrapped.
*/
public CollectionDataModel(Collection<E> collection) {
super();
setWrappedData(collection);
}
// ------------------------------------------------------ Instance Variables
// The current row index (zero relative)
private int index = -1;
private Collection<E> inner;
private E[] arrayFromInner;
// -------------------------------------------------------------- Properties
/**
* <p>Return <code>true</code> if there is <code>wrappedData</code>
* available, and the current value of <code>rowIndex</code> is greater
* than or equal to zero, and less than the size of the list. Otherwise,
* return <code>false</code>.</p>
*
* @throws javax.faces.FacesException if an error occurs getting the row availability
*/
public boolean isRowAvailable() {
if (arrayFromInner == null) {
return (false);
} else if ((index >= 0) && (index < arrayFromInner.length)) {
return (true);
} else {
return (false);
}
}
/**
* <p>If there is <code>wrappedData</code> available, return the
* length of the list. If no <code>wrappedData</code> is available,
* return -1.</p>
*
* @throws javax.faces.FacesException if an error occurs getting the row count
*/
public int getRowCount() {
if (arrayFromInner == null) {
return (-1);
}
return (arrayFromInner.length);
}
/**
* <p>If row data is available, return the array element at the index
* specified by <code>rowIndex</code>. If no wrapped data is available,
* return <code>null</code>.</p>
*
* @throws javax.faces.FacesException if an error occurs getting the row data
* @throws IllegalArgumentException if now row data is available
* at the currently specified row index
*/
public E getRowData() {
if (arrayFromInner == null) {
return (null);
} else if (!isRowAvailable()) {
throw new NoRowAvailableException();
} else {
return (arrayFromInner[index]);
}
}
/**
* @throws javax.faces.FacesException {@inheritDoc}
*/
public int getRowIndex() {
return (index);
}
/**
* @throws javax.faces.FacesException {@inheritDoc}
* @throws IllegalArgumentException {@inheritDoc}
*/
public void setRowIndex(int rowIndex) {
if (rowIndex < -1) {
throw new IllegalArgumentException();
}
int old = index;
index = rowIndex;
if (arrayFromInner == null) {
return;
}
DataModelListener [] listeners = getDataModelListeners();
if ((old != index) && (listeners != null)) {
Object rowData = null;
if (isRowAvailable()) {
rowData = getRowData();
}
DataModelEvent event =
new DataModelEvent(this, index, rowData);
int n = listeners.length;
for (int i = 0; i < n; i++) {
if (null != listeners[i]) {
listeners[i].rowSelected(event);
}
}
}
}
public Object getWrappedData() {
return (this.inner);
}
/**
* @throws ClassCastException if <code>data</code> is
* non-<code>null</code> and is not a <code>Collection</code>
*/
public void setWrappedData(Object data) {
if (data == null) {
inner = null;
arrayFromInner = null;
setRowIndex(-1);
} else {
final Collection<E> collection = (Collection<E>) data;
arrayFromInner = (E[]) new Object[collection.size()];
collection.toArray(arrayFromInner);
setRowIndex(0);
}
}
}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.