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
fac92b1454cfba21b695aa965eb0c06aae6067ec
e0cbb0192ad240664722d5d79a065581db747146
/Java_14_Collections/src/com/biz/collections/map/Map_02.java
9a508948da727adaf4290ac04e051e6cf12fe89d
[]
no_license
freeswoo/javaworks
82e81f25a4eab916f014b08e0ad03832e5367979
01933265387acc6965655c4f1d63d2c9b55a5b42
refs/heads/master
2020-08-04T21:39:40.413454
2019-11-04T07:43:25
2019-11-04T07:43:25
212,286,883
2
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.biz.collections.map; import java.util.HashMap; import java.util.Map; public class Map_02 { public static void main(String[] args) { Map<String,String> strAddr = new HashMap<String,String>(); strAddr.put("홍길동","서울특별시"); strAddr.put("이몽룡","익산시"); strAddr.put("성춘향","남원시"); strAddr.put("장보고","해남"); strAddr.put("임꺽정","태백산"); strAddr.put("장길산","함경도"); System.out.println("장보고의 주소 :" + strAddr.get("장보고")); } }
[ "freeswoo@naver.com" ]
freeswoo@naver.com
87ab383e6fb864938b45e9e6f4500f8e59805e15
3faa0cef4594c5a22469320acb26a5b4a8a22b94
/RestAPIPayPalFramewrk/src/test/java/com/PayPal/APITest/GetOrderTest.java
3d92b67003b74b591cd86ccdcc2a40cc5ae12a4a
[]
no_license
Ritwik44/RestAPIPayPalFramewrk
9e8fdf7fd8d34f5f12a5ffbc397c6e40ef61d23d
569be56703b87995ee11c37fd2ac2a05d5a328b1
refs/heads/master
2023-06-16T06:30:22.051033
2021-07-11T18:28:47
2021-07-11T18:28:47
384,943,030
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
package com.PayPal.APITest; import org.testng.Assert; import org.testng.annotations.Test; import com.Framework.API.OrderAPI; import io.restassured.response.Response; public class GetOrderTest { @Test public void getOrderTest() { /*Please make sure first CreateOrderTest is run which will generate Order_id and same order_id will be used to retrieve the order details */ String access_token=OrderAPI.getAccessToken(); Response response=OrderAPI.getOrder(access_token); Assert.assertEquals(response.getStatusCode(),200); } }
[ "user@user-PC" ]
user@user-PC
6ff0016f567990ec9ec66bd4484aa06dfffa48a6
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/429863/buggy-version/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/ExpressionClassBuilderInterface.java
9cd624fc6289448342cd9accf81a0b7340b7dc23
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,066
java
/* Derby - Class org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.derby.iapi.sql.compile; /** * This is a simple interface to hide the impl of ExpressionClassBuilder * from the protocol side. * RESOLVE - This interface needs to be filled in and the impl code * changed to go through the interface as much as possible. */ public interface ExpressionClassBuilderInterface { }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
476c57cbffcee73ae50cf3e96fccf74035470cfa
2d5e54e4dd6612aeb19904fcdf8757680c5bfd79
/metamodel.emfapi/src/org/modelio/metamodel/uml/behavior/interactionModel/ExecutionSpecification.java
e4a5f2674666c377bc3aa6bd58f01949364c71dd
[]
no_license
mondo-project/hawk-modelio
1ef504dde30ce4e43b5db8d7936adbc04851e058
4da0f70dfeddb0451eec8b2f361586e07ad3dab9
refs/heads/master
2021-01-10T06:09:58.281311
2015-11-06T11:08:15
2015-11-06T11:08:15
45,675,632
1
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
/* * Copyright 2013 Modeliosoft * * This file is part of Modelio. * * Modelio is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Modelio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Modelio. If not, see <http://www.gnu.org/licenses/>. * */ /* WARNING: GENERATED FILE - DO NOT EDIT */ /* Metamodel version: 9022 */ /* SemGen version : 2.0.07.9012 */ package org.modelio.metamodel.uml.behavior.interactionModel; import com.modeliosoft.modelio.javadesigner.annotations.objid; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.modelio.metamodel.uml.behavior.interactionModel.ExecutionOccurenceSpecification; @objid ("0044c988-c4bf-1fd8-97fe-001ec947cd2a") public interface ExecutionSpecification extends InteractionFragment { @objid ("e398e813-de21-4ea1-b557-1557389014c3") ExecutionOccurenceSpecification getFinish(); @objid ("90773d21-b01a-466e-9811-713f59eaa1e1") void setFinish(ExecutionOccurenceSpecification value); @objid ("36d0d960-03e6-4794-8862-1512bee8863d") ExecutionOccurenceSpecification getStart(); @objid ("078ae026-f039-4297-9ac2-9edc8942be2d") void setStart(ExecutionOccurenceSpecification value); }
[ "antonio.garcia-dominguez@york.ac.uk" ]
antonio.garcia-dominguez@york.ac.uk
3f44aa8c8f31fc53f84668c882b47d5263f5690f
29dd6058c06e7d51262318281f5f9464f43416ed
/blaze-faces/src/main/java/com/blazebit/blazefaces/component/inputfiles/InputFiles.java
3bde413b41cd76a7995d8c1509df848e83be2b69
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Blazebit/blaze-faces
1d9e019df009660ada5291fe30e925f077c93e05
96bdbfd6acd0350e2b3410118ee3484832dba8e9
refs/heads/master
2023-08-03T22:19:24.184878
2014-02-23T16:09:43
2014-02-23T16:09:43
5,099,940
1
0
Apache-2.0
2023-02-22T02:45:01
2012-07-18T18:09:48
Java
UTF-8
Java
false
false
4,084
java
/* * Copyright 2013 Blazebit. * * 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.blazebit.blazefaces.component.inputfiles; import com.blazebit.blazefaces.apt.JsfAttribute; import com.blazebit.blazefaces.apt.JsfComponent; import com.blazebit.blazefaces.apt.JsfDescription; import com.blazebit.blazefaces.component.BaseUIInput; import com.blazebit.blazefaces.component.BaseUIOutput; import com.blazebit.blazefaces.component.FileUpload; import com.blazebit.blazefaces.component.Styleable; import javax.el.MethodExpression; import javax.faces.application.ResourceDependencies; import javax.faces.application.ResourceDependency; import javax.faces.component.UIInput; import javax.faces.component.UIOutput; import javax.faces.component.behavior.ClientBehaviorHolder; import javax.faces.context.FacesContext; /** * * @author Christian */ @JsfComponent( parent = UIInput.class, renderer = InputFilesRenderer.class, description = @JsfDescription( displayName = "InputFiles", description = "InputFiles is an input component for files." ) ) @ResourceDependencies({ @ResourceDependency(name = "css/blueimp-gallery.css", library="blueimp-gallery"), @ResourceDependency(name = "css/jquery.fileupload.css", library="blueimp-file-upload"), @ResourceDependency(name = "css/jquery.fileupload-ui.css", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.js", library = "jquery"), @ResourceDependency(name = "js/jquery-ui.js", library = "jquery-ui"), @ResourceDependency(name = "js/jquery-ui-i18n.js", library = "jquery-ui"), @ResourceDependency(name = "js/tmpl.js", library="blueimp-templates"), @ResourceDependency(name = "js/load-image.js", library="blueimp-load-image"), @ResourceDependency(name = "js/canvas-to-blob.js", library="blueimp-canvas-to-blob"), @ResourceDependency(name = "js/jquery.blueimp-gallery.js", library="blueimp-gallery"), @ResourceDependency(name = "js/jquery.iframe-transport.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload-process.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload-image.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload-audio.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload-video.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload-validate.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload-ui.js", library="blueimp-file-upload"), @ResourceDependency(name = "js/jquery.fileupload-jquery-ui.js", library="blueimp-file-upload"), @ResourceDependency(name = "core/core.js", library = "blazefaces"), @ResourceDependency(name = "inputfiles/js/inputfiles.js", library = "blazefaces"), }) public class InputFiles extends InputFilesBase implements BaseUIInput, FileUpload, Styleable, ClientBehaviorHolder{ public void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException { super.broadcast(event); // FacesContext facesContext = FacesContext.getCurrentInstance(); // MethodExpression me = getFileUploadListener(); // // if (me != null && event instanceof com.blazebit.blazefaces.event.FileUploadEvent) { // me.invoke(facesContext.getELContext(), new Object[] {event}); // } } }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
256adb277cd616bbe629ac83e8beaabce0832839
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/median/90a14c1ac8f56395389fade6f67872a9684e61f83099e634ac675eae04f391f3cc2b6f6ebe966f2488ce7e00a2cabb218f3b1372d4161b3c05d134b1b7f296d2/000/mutations/206/median_90a14c1a_000.java
48878323387121022470de45a7fb9fa3b46c6000
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,670
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class median_90a14c1a_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { median_90a14c1a_000 mainClass = new median_90a14c1a_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj n1 = new IntObj (), n2 = new IntObj (), n3 = new IntObj (); output += (String.format ("Please enter 3 numbers separated by spaces > ")); n1.value = scanner.nextInt (); n2.value = scanner.nextInt (); n3.value = scanner.nextInt (); if ((n1.value > n2.value) && (n1.value > n3.value) && (n2.value > n3.value)) { output += (String.format ("%d is the median\n", n2.value)); } else if ((n1.value > n2.value) && (n1.value > n3.value) && (n3.value > n2.value)) { output += (String.format ("%d is the median\n", n3.value)); } else if ((n2.value > n1.value) && (n2.value > n3.value) && (n3.value > n1.value)) { output += (String.format ("%d is the median\n", n3.value)); } else if ((n3.value) > (n1.value) && (n2.value > n3.value) && (n1.value > n3.value)) { output += (String.format ("%d is the median\n", n1.value)); } else if ((n3.value > n1.value) && (n3.value > n2.value) && (n1.value > n2.value)) { output += (String.format ("%d is the median\n", n1.value)); } else if ((n3.value > n1.value) && (n3.value > n2.value) && (n2.value > n1.value)) { output += (String.format ("%d is the median\n", n2.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
beebb1e6a8eae829ff375388088019650a901b06
8c35457de1a35eeb852f7490834ab0ab2059fd04
/src/interviewBit/OrderOfPeoplesHeightsWrong.java
0c2a8135d1c51c7df5c7210437047185cb7917de
[]
no_license
mrincodi/algorithmsAgain
e6aed4f799f95eada3b45fd1a65aa9d8c2f53da3
8ce5aecd2cd3b4926d5f1f6561cd591e9379662b
refs/heads/master
2021-01-12T12:41:11.660709
2018-01-16T18:49:49
2018-01-16T18:49:49
63,922,461
1
1
null
null
null
null
UTF-8
Java
false
false
2,864
java
package interviewBit; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; /** * You are given the following : A positive number N Heights : A list of heights of N persons standing in a queue Infronts : A list of numbers corresponding to each person (P) that gives the number of persons who are taller than P and standing in front of P You need to return list of actual order of persons’s height Consider that heights will be unique Example Input : Heights: 5 3 2 6 1 4 InFronts: 0 1 2 0 3 2 Output : actual order is: 5 3 2 1 6 4 So, you can see that for the person with height 5, there is no one taller than him who is in front of him, and hence Infronts has 0 for him. For person with height 3, there is 1 person ( Height : 5 ) in front of him who is taller than him. You can do similar inference for other people in the list. * @author mrincodi * 2016-08-09 * Comment: Sheesh... I took like 2 hours on this simple problem because I * misunderstood that the heights were linked to the infronts. I thought that * the positions of the queue where linked to the infronts!! :( So dismiss this one, * mmmkay? */ public class OrderOfPeoplesHeightsWrong { public ArrayList<Integer> order(ArrayList<Integer> heights, ArrayList<Integer> infronts) { //We create a hash of keys,values for the heights and positions. HashMap <Integer, Integer> h = new HashMap <Integer, Integer> (); for ( int i = 0 ; i < heights.size(); i++){ h.put(heights.get(i), infronts.get(i)); } Collections.sort(heights); //Create array of empty values, where we'll put the results. ArrayList <Integer> current = new ArrayList <Integer> (); for ( int i = 0; i < heights.size(); i++){ current.add (0); } for ( int pos = 0; pos < heights.size(); pos++){ //Get the height we'll be working with. int thisHeight = heights.get(pos); //How many free positions should be before this person? int howManyFreePositions = h.get(thisHeight); //Look for the right position. boolean gotPosition = false; int i = 0; int counter = 0; while (i < current.size() && !gotPosition){ int val = current.get(i); if (val == 0){ if ( counter == howManyFreePositions) gotPosition = true; else { counter++; i++; } } else i++; } //Put the value there! That's it. current.set(i, thisHeight); } return current; } public static void main(String[] args) { // TODO Auto-generated method stub ArrayList<Integer> heights = new ArrayList<Integer> (Arrays.asList(1,6,2,3,5,4)); ArrayList<Integer> infronts = new ArrayList<Integer> (Arrays.asList(1,0,2,2,1,0)); ArrayList<Integer> result = new OrderOfPeoplesHeightsWrong().order(heights, infronts); for (int x: result){ System.out.println(x); } } }
[ "mrincodi@gmail.com" ]
mrincodi@gmail.com
2e09bceee81d77e56f8a9025293ece42f0465669
cc1be073c83663de004c909cea8f39b7ed01ee05
/security/src/main/java/org/xipki/security/pkcs11/P11Params.java
c15f624a92d1ffac9b3a11330c08a2f413ed61d8
[ "Apache-2.0" ]
permissive
adisheshsm/xipki
42333deb2a07d8bb1d458ba06fa1281bae63f14d
c676e86ddf17450ceda4353b954238e05457e1a0
refs/heads/master
2020-04-22T11:02:58.183085
2019-02-01T01:09:07
2019-02-01T01:09:07
170,326,033
1
0
Apache-2.0
2019-02-12T13:49:29
2019-02-12T13:49:29
null
UTF-8
Java
false
false
5,579
java
/* * * Copyright (c) 2013 - 2018 Lijun Liao * * 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.xipki.security.pkcs11; import java.math.BigInteger; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import org.bouncycastle.asn1.pkcs.RSASSAPSSparams; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.xipki.security.HashAlgo; import iaik.pkcs.pkcs11.constants.PKCS11Constants; /** * TODO. * @author Lijun Liao * @since 2.0.0 */ public interface P11Params { public static class P11ByteArrayParams implements P11Params { private final byte[] bytes; public P11ByteArrayParams(byte[] bytes) { this.bytes = bytes; } public byte[] getBytes() { return bytes; } } // CHECKSTYLE:SKIP public class P11IVParams implements P11Params { private final byte[] iv; public P11IVParams(byte[] iv) { this.iv = iv; } // CHECKSTYLE:SKIP public byte[] getIV() { return iv; } } //CHECKSTYLE:SKIP public class P11RSAPkcsPssParams implements P11Params { private final long hashAlgorithm; private final long maskGenerationFunction; private final long saltLength; public P11RSAPkcsPssParams(long hashAlgorithm, long maskGenerationFunction, long saltLength) { this.hashAlgorithm = hashAlgorithm; this.maskGenerationFunction = maskGenerationFunction; this.saltLength = saltLength; } public P11RSAPkcsPssParams(RSASSAPSSparams asn1Params) { ASN1ObjectIdentifier asn1Oid = asn1Params.getHashAlgorithm().getAlgorithm(); HashAlgo contentHashAlgo = HashAlgo.getInstance(asn1Oid); if (contentHashAlgo == null) { throw new IllegalArgumentException("unsupported hash algorithm " + asn1Oid.getId()); } AlgorithmIdentifier mga = asn1Params.getMaskGenAlgorithm(); asn1Oid = mga.getAlgorithm(); if (!PKCSObjectIdentifiers.id_mgf1.equals(asn1Oid)) { throw new IllegalArgumentException("unsupported MGF algorithm " + asn1Oid.getId()); } asn1Oid = AlgorithmIdentifier.getInstance(mga.getParameters()).getAlgorithm(); HashAlgo mgfHashAlgo = HashAlgo.getInstance(asn1Oid); if (mgfHashAlgo == null) { throw new IllegalArgumentException("unsupported MGF hash algorithm " + asn1Oid.getId()); } this.saltLength = asn1Params.getSaltLength().longValue(); BigInteger trailerField = asn1Params.getTrailerField(); if (!RSASSAPSSparams.DEFAULT_TRAILER_FIELD.getValue().equals(trailerField)) { throw new IllegalArgumentException("unsupported trailerField " + trailerField); } switch (contentHashAlgo) { case SHA1: this.hashAlgorithm = PKCS11Constants.CKM_SHA_1; break; case SHA224: this.hashAlgorithm = PKCS11Constants.CKM_SHA224; break; case SHA256: this.hashAlgorithm = PKCS11Constants.CKM_SHA256; break; case SHA384: this.hashAlgorithm = PKCS11Constants.CKM_SHA384; break; case SHA512: this.hashAlgorithm = PKCS11Constants.CKM_SHA512; break; case SHA3_224: this.hashAlgorithm = PKCS11Constants.CKM_SHA3_224; break; case SHA3_256: this.hashAlgorithm = PKCS11Constants.CKM_SHA3_256; break; case SHA3_384: this.hashAlgorithm = PKCS11Constants.CKM_SHA3_384; break; case SHA3_512: this.hashAlgorithm = PKCS11Constants.CKM_SHA3_512; break; default: throw new IllegalStateException("should not reach here"); } switch (mgfHashAlgo) { case SHA1: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA1; break; case SHA224: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA224; break; case SHA256: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA256; break; case SHA384: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA384; break; case SHA512: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA512; break; case SHA3_224: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA3_224; break; case SHA3_256: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA3_256; break; case SHA3_384: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA3_384; break; case SHA3_512: this.maskGenerationFunction = PKCS11Constants.CKG_MGF1_SHA3_512; break; default: throw new IllegalStateException("should not reach here"); } } public long getHashAlgorithm() { return hashAlgorithm; } public long getMaskGenerationFunction() { return maskGenerationFunction; } public long getSaltLength() { return saltLength; } } }
[ "lijun.liao@gmail.com" ]
lijun.liao@gmail.com
cf161eeb337bfa6ae6fc363b71ae4573ced8faac
a19c3cda72f9c674ddbf659c99b787f3eaf60ab3
/src/main/java/com/panda/jh/aop/logging/LoggingAspect.java
016607e58cf1c9fb12e47bc8db83bd0ed76f491c
[]
no_license
angrypandahu/jhipsterSampleApplication
aa356acf051ce305453bb6c2d01bd0ac638ff764
58ffda55ec61eff80173b28ffc8705c88b956fd6
refs/heads/master
2021-01-21T12:16:38.945584
2017-09-01T01:18:05
2017-09-01T01:18:05
102,059,960
0
0
null
null
null
null
UTF-8
Java
false
false
3,798
java
package com.panda.jh.aop.logging; import io.github.jhipster.config.JHipsterConstants; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; import java.util.Arrays; /** * Aspect for logging execution of service and repository Spring components. * * By default, it only runs with the "dev" profile. */ @Aspect public class LoggingAspect { private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Environment env; public LoggingAspect(Environment env) { this.env = env; } /** * Pointcut that matches all repositories, services and Web REST endpoints. */ @Pointcut("within(@org.springframework.stereotype.Repository *)" + " || within(@org.springframework.stereotype.Service *)" + " || within(@org.springframework.web.bind.annotation.RestController *)") public void springBeanPointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Pointcut that matches all Spring beans in the application's main packages. */ @Pointcut("within(com.panda.jh.repository..*)"+ " || within(com.panda.jh.service..*)"+ " || within(com.panda.jh.web.rest..*)") public void applicationPackagePointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Advice that logs methods throwing exceptions. * * @param joinPoint join point for advice * @param e exception */ @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e); } else { log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); } } /** * Advice that logs when a method is entered and exited. * * @param joinPoint join point for advice * @return result * @throws Throwable throws IllegalArgumentException */ @Around("applicationPackagePointcut() && springBeanPointcut()") public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { if (log.isDebugEnabled()) { log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); } try { Object result = joinPoint.proceed(); if (log.isDebugEnabled()) { log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), result); } return result; } catch (IllegalArgumentException e) { log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName()); throw e; } } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
4a0dafb9369bba268a529cc8f0724870bd5874c6
5a076617e29016fe75d6421d235f22cc79f8f157
/Bbth/src/bbth/engine/collision/CompoundShape.java
e1e268f64574ded3d66f67b2ffb6609cb5afbd5b
[]
no_license
dddddttttt/androidsourcecodes
516b8c79cae7f4fa71b97a2a470eab52844e1334
3d13ab72163bbeed2ef226a476e29ca79766ea0b
refs/heads/master
2020-08-17T01:38:54.095515
2018-04-08T15:17:24
2018-04-08T15:17:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,779
java
package bbth.engine.collision; import android.graphics.Canvas; import android.graphics.Paint; public class CompoundShape extends Shape { public Shape[] shapes; public CompoundShape(int count) { shapes = new Shape[count]; } @Override public void updateWorldTransform(Transform parentTransform) { super.updateWorldTransform(parentTransform); for (Shape shape : shapes) { shape.updateWorldTransform(worldTransform); } } @Override public void draw(Canvas canvas, Paint paint) { for (Shape shape : shapes) { shape.draw(canvas, paint); } } @Override public boolean isCrossingLineSegment(float originX, float originY, float rayX, float rayY) { for (Shape shape : shapes) { if (shape.isCrossingLineSegment(originX, originY, rayX, rayY)) { return true; } } return false; } @Override public void recordPoints(SeparatingAxisTheorem theorem) { throw new UnsupportedOperationException(); } @Override public void applyTheorem(SeparatingAxisTheorem theorem, Shape other) { theorem.flipRole(); other.applyTheorem(theorem, this); theorem.flipRole(); } @Override public void applyTheorem(SeparatingAxisTheorem theorem, CircleShape other) { for (Shape shape : shapes) { shape.applyTheorem(theorem, other); theorem.prepareForNewShapePair(); } } @Override public void applyTheorem(SeparatingAxisTheorem theorem, PolygonShape other) { for (Shape shape : shapes) { shape.applyTheorem(theorem, other); theorem.prepareForNewShapePair(); } } @Override public void applyTheorem(SeparatingAxisTheorem theorem, CompoundShape other) { for (Shape shape : shapes) { for (Shape otherShape : other.shapes) { shape.applyTheorem(theorem, otherShape); theorem.prepareForNewShapePair(); } } } }
[ "harry.han@gmail.com" ]
harry.han@gmail.com
8c9c9681b3af2a992a75b3268c59211402e9cf2c
91192dc19a1c9be938144ebfa8c20946673a5cd9
/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ArtifactCachesProvider.java
01068793578d036bdf32c08ae84a8999b56d84c0
[ "BSD-3-Clause", "LGPL-2.1-or-later", "LicenseRef-scancode-mit-old-style", "EPL-2.0", "CDDL-1.0", "MIT", "LGPL-2.1-only", "Apache-2.0", "MPL-2.0", "EPL-1.0" ]
permissive
JohanWranker/gradle
6be196ba7cdc0788b042660f4d13051be45735b0
e089307757e7ee7e1a898e84841bd2100ff7ef27
refs/heads/master
2021-05-01T16:25:33.448820
2020-01-31T23:23:58
2020-01-31T23:23:58
121,043,472
2
0
Apache-2.0
2020-01-31T23:24:00
2018-02-10T18:43:49
Java
UTF-8
Java
false
false
1,736
java
/* * Copyright 2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.api.internal.artifacts.ivyservice; import org.gradle.internal.vfs.AdditiveCache; import java.io.Closeable; import java.util.Optional; import java.util.function.BiFunction; public interface ArtifactCachesProvider extends Closeable, AdditiveCache { String READONLY_CACHE_ENV_VAR = "GRADLE_RO_DEP_CACHE"; ArtifactCacheMetadata getWritableCacheMetadata(); Optional<ArtifactCacheMetadata> getReadOnlyCacheMetadata(); ArtifactCacheLockingManager getWritableCacheLockingManager(); Optional<ArtifactCacheLockingManager> getReadOnlyCacheLockingManager(); default <T> T withWritableCache(BiFunction<? super ArtifactCacheMetadata, ? super ArtifactCacheLockingManager, T> function) { return function.apply(getWritableCacheMetadata(), getWritableCacheLockingManager()); } default <T> Optional<T> withReadOnlyCache(BiFunction<? super ArtifactCacheMetadata, ? super ArtifactCacheLockingManager, T> function) { return getReadOnlyCacheMetadata().map(artifactCacheMetadata -> function.apply(artifactCacheMetadata, getReadOnlyCacheLockingManager().get())); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
1aeea483c4048f747f41ab5a1fa0c0fca21a80df
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
/src/PracticeLeetCode/_018FourSum.java
b4537011097517c43c06cc0775eb008c58f5bcf0
[ "MIT" ]
permissive
darshanhs90/Java-Coding
bfb2eb84153a8a8a9429efc2833c47f6680f03f4
da76ccd7851f102712f7d8dfa4659901c5de7a76
refs/heads/master
2023-05-27T03:17:45.055811
2021-06-16T06:18:08
2021-06-16T06:18:08
36,981,580
3
3
null
null
null
null
UTF-8
Java
false
false
141
java
package PracticeLeetCode; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class _018FourSum { psvm }
[ "hsdars@gmail.com" ]
hsdars@gmail.com
360981449eb603ac434110a9cd3b67d2495f7e5c
3f51bc6494a1910a0db9425bc67b867a8100ca4b
/RansomNote.java
e59fe83c78b094e1f76b4a509ecdf4d32d56ca90
[]
no_license
ruudhaya/leetcode
a3e0e6b3bc98bbfce4f9c6e4546d489d9af20e58
87187693fe5e48a278232233abda5ee0f4c2c76a
refs/heads/master
2021-01-22T06:22:54.859858
2017-08-28T04:58:35
2017-08-28T04:58:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
891
java
import java.util.HashMap; import java.util.Map; public class RansomNote { public boolean canConstruct(String ransomNote, String magazine) { Map<Character, Integer> ransomLetter2count = buildLetter2count(ransomNote); Map<Character, Integer> magazineLetter2count = buildLetter2count(magazine); for (char ransomLetter : ransomLetter2count.keySet()) { if (!magazineLetter2count.containsKey(ransomLetter) || magazineLetter2count.get(ransomLetter) < ransomLetter2count.get(ransomLetter)) { return false; } } return true; } Map<Character, Integer> buildLetter2count(String s) { Map<Character, Integer> letter2count = new HashMap<Character, Integer>(); for (char letter : s.toCharArray()) { if (!letter2count.containsKey(letter)) { letter2count.put(letter, 0); } letter2count.put(letter, letter2count.get(letter) + 1); } return letter2count; } }
[ "charles.wangkai@gmail.com" ]
charles.wangkai@gmail.com
85b2feb4c6c62c5c9a7459735a76cc1df9a0a502
18d3d084c4589e8141523549131a7affb4e0f71e
/src/main/java/net/avdw/gitassist/NotMergedMasterScript.java
c85e1784dc927a8bdda33c0b65b3cb20576b72ec
[]
no_license
avanderw/git-assist
719b45405ce4ee9d330c201e5a3115bf5f69a58e
2f62a9e48c4907a72098fb1c120089449cd20e75
refs/heads/master
2020-07-12T06:16:32.672663
2019-09-26T12:07:17
2019-09-26T12:07:17
204,742,017
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package net.avdw.gitassist; import com.google.inject.BindingAnnotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @BindingAnnotation @Retention(RetentionPolicy.RUNTIME) public @interface NotMergedMasterScript { }
[ "avanderw@gmail.com" ]
avanderw@gmail.com
4eed70b0a58ed4e55accdc797b17eef5135c07b7
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14227-3-29-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/plugin/activitystream/internal/RecordableEventMigrator_ESTest.java
db6e9db8f72787f71bcea1dbcbdd94e3c5a2a861
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
/* * This file was automatically generated by EvoSuite * Fri Jan 17 20:32:12 UTC 2020 */ package com.xpn.xwiki.plugin.activitystream.internal; 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 RecordableEventMigrator_ESTest extends RecordableEventMigrator_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a13201a7ccfa0c2d74c846b0f1514b617927192f
61602d4b976db2084059453edeafe63865f96ec5
/com/xunlei/downloadprovider/web/website/fragment/e.java
f03da95364c4cee663f73b3471cebee4cdb02045
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
654
java
package com.xunlei.downloadprovider.web.website.fragment; import android.view.View; import android.view.View.OnClickListener; import com.xunlei.downloadprovider.app.BrothersApplication; import com.xunlei.xllib.android.b; /* compiled from: CollectionAndHistoryFragment */ final class e implements OnClickListener { final /* synthetic */ CollectionAndHistoryFragment a; e(CollectionAndHistoryFragment collectionAndHistoryFragment) { this.a = collectionAndHistoryFragment; } public final void onClick(View view) { if (b.a(BrothersApplication.getApplicationInstance()) != null) { this.a.c(); } } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
f465412ec0f23bec941fc90c031da0491b6a350f
0f21b35272ae2527ff1ab95a258378d3fb8418eb
/Multithread-J/src/main/java/com/sh/thread/test/App2.java
ad0059bc64daec861d9471e79d7be7c62b381f6f
[]
no_license
ShuaiJunlan/java-learning
c1a92b41ba4ed1ff880e55a70330dd342dc6e8c6
ae5cbbf146e6c059b5cd613bcd095d7855a00f8e
refs/heads/master
2023-03-04T07:14:22.649266
2022-11-18T07:34:16
2022-11-18T07:34:16
162,292,537
4
0
null
2023-02-22T07:22:48
2018-12-18T13:29:13
Java
UTF-8
Java
false
false
347
java
package com.sh.thread.test; import com.sh.thread.impl.ALogin; import com.sh.thread.impl.BLogin; /** * Created by Mr SJL on 2016/11/20. * * @Author Junlan Shuai */ public class App2 { public static void main(String[] args) { Thread a = new ALogin(); a.start(); Thread b = new BLogin(); b.start(); } }
[ "shuaijunlan@gmail.com" ]
shuaijunlan@gmail.com
98ed030f406adafc0463fdcb1c0bff2982036bbd
1df9745d30ea2e21716f5080bc4759722ef6e050
/basex-core/src/main/java/org/basex/gui/dialog/DialogSort.java
48db4d7744364819f7ea1ce68cd383b9cca11b0b
[ "BSD-3-Clause" ]
permissive
james-jw/basex
e3df561823ab868675e3290524f2eb0eadfa49eb
1b96bd93c86d43118cdc9d132e901355d808393f
refs/heads/master
2020-12-29T00:41:25.326670
2016-01-20T02:48:50
2016-01-20T02:48:50
49,975,315
0
0
null
2016-01-19T18:55:41
2016-01-19T18:55:41
null
UTF-8
Java
false
false
2,021
java
package org.basex.gui.dialog; import static org.basex.core.Text.*; import java.awt.*; import javax.swing.*; import org.basex.gui.*; import org.basex.gui.layout.*; /** * Sort dialog. * * @author BaseX Team 2005-16, BSD License * @author Christian Gruen */ public final class DialogSort extends BaseXDialog { /** Case sensitive. */ private final BaseXCheckBox cs; /** Sort ascending. */ private final BaseXCheckBox asc; /** Merge duplicate lines. */ private final BaseXCheckBox merge; /** Column. */ private final BaseXTextField column; /** Collation. */ private final BaseXTextField coll; /** * Default constructor. * @param main reference to the main window */ public DialogSort(final GUI main) { super(main, SORT); final BaseXBack p = new BaseXBack(new TableLayout(5, 1)); final GUIOptions gopts = gui.gopts; asc = new BaseXCheckBox(ASCENDING_ORDER, GUIOptions.ASCSORT, gopts, this); cs = new BaseXCheckBox(CASE_SENSITIVE, GUIOptions.CASESORT, gopts, this); merge = new BaseXCheckBox(MERGE_DUPLICATES, GUIOptions.MERGEDUPL, gopts, this); column = new BaseXTextField(GUIOptions.COLUMN, gopts, this); coll = new BaseXTextField(GUIOptions.COLLATION, gopts, this).hint("lang=en;strength=primary"); column.setColumns(4); coll.setColumns(20); final BaseXBack pp = new BaseXBack(new TableLayout(2, 2, 8, 4)); pp.add(new BaseXLabel("Collation" + COLS)); pp.add(coll); pp.add(new BaseXLabel(COLUMN + COLS)); pp.add(column); p.add(pp); p.add(Box.createVerticalStrut(4)); p.add(cs); p.add(asc); p.add(merge); set(p, BorderLayout.CENTER); set(newButtons(B_OK, B_CANCEL), BorderLayout.SOUTH); action(null); finish(null); } @Override public void action(final Object source) { cs.setEnabled(coll.getText().isEmpty()); } @Override public void close() { cs.assign(); asc.assign(); merge.assign(); column.assign(); coll.assign(); super.close(); } }
[ "christian.gruen@gmail.com" ]
christian.gruen@gmail.com
4f9ef3a764a8e8d3706500856860b11b142c1ddb
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_2beea11a8a695c1cdec0055d8d80642fb13fea13/StateController/4_2beea11a8a695c1cdec0055d8d80642fb13fea13_StateController_t.java
7dc336d9c5928cac52c465ac32024e0e22e8c9ec
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,615
java
package egovframework.com.guruguru.dashboard.state.controller; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.google.common.base.Splitter; @Controller @RequestMapping("/state") public class StateController { @RequestMapping("/getStateInfo") @ResponseBody public Map<String, Object> getStateInfo() { String os = System.getProperty("os.name"); Map<String, Object> map = new HashMap<String, Object>(); if (os.equalsIgnoreCase("linux")) { getMemroyInfo(map); } // System.out.println(System.getProperty("os.name")); // // String line = ""; // // try { // ProcessBuilder pb = new ProcessBuilder("/bin/sh", "-c", "vmstat"); // Process proc = pb.start(); // // BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream())); // // while ((line = br.readLine()) != null) { // Iterator<String> it = Splitter.on(' ').omitEmptyStrings().split(line).iterator(); // // while (it.hasNext()) { // System.out.println(it.next()); // } // } // // br.close(); // // } catch (IOException ioe) { // throw new RuntimeException(ioe.getMessage()); // } return map; } private void getMemroyInfo(Map<String, Object> map) { String memoryInfo = executeProcess("/bin/sh", "-c", "free"); int i = 0; String[] memInfo = {"memTotal", "memUsed", "memFree", "memShared", "memBuffers"}; Iterator<String> it = Splitter.on(' ').omitEmptyStrings().split(memoryInfo).iterator(); while (it.hasNext()) { System.out.println(i); String value = it.next(); if (i > 10) break; if (i > 5) { System.out.println("name : " + memInfo[i - 6] + " , value : " + value); map.put(memInfo[i - 6], value); } i++; } } private String executeProcess(String... cmd) { StringBuffer sb = new StringBuffer(); try { ProcessBuilder pb = new ProcessBuilder(cmd); Process proc = pb.start(); BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream())); String line = ""; while ((line = br.readLine()) != null) { sb.append(line); } } catch (IOException ioe) { throw new RuntimeException(ioe.getMessage()); } return sb.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4a1f2eb7934a9b42262e708f278679d320069790
4991436c2b266b2892363b4e8d421247a8d29c6e
/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/InputFinalLocalVariableAssignedInsideAndOutsideSwitch.java
9f34e228635631757df17b108dd2386ae424fddc
[ "Apache-2.0" ]
permissive
spoole167/java-static-analysis-samples
d9f970104bb69abb968e0ecf09c11aa25c364ebd
880f9b394e531d8c03af425b1b4e5a95302a3359
refs/heads/main
2023-08-14T22:26:12.012352
2021-09-15T05:50:20
2021-09-15T05:50:20
406,629,824
0
0
Apache-2.0
2021-09-15T05:49:41
2021-09-15T05:49:41
null
UTF-8
Java
false
false
1,795
java
/* FinalLocalVariable validateEnhancedForLoopVariable = (default)false tokens = (default)VARIABLE_DEF */ package com.puppycrawl.tools.checkstyle.checks.coding.finallocalvariable; import java.util.ArrayList; public class InputFinalLocalVariableAssignedInsideAndOutsideSwitch { private static void foo1(final int[][] m, final int x, final int y, final int d, final int[] regionSizes) { final int a = m[y][x] & 1; int b; switch (d) { case 1: b = m[y - 1][x]; break; case 2: b = m[y][x - 1]; break; case 3: b = m[y][x + 1]; break; default: b = m[y + 1][x]; break; } b &= 5; } private static void foo2(final int[][] m, final int x, final int y, final int d, final int[] regionSizes) { final int a = m[y][x] & 1; int b; // violation switch (d) { case 1: break; case 2: b = m[y][x - 1]; break; case 3: b = m[y][x + 1]; break; default: b = m[y + 1][x]; break; } } private static void foo3(final int[][] m, final int x, final int y, final int d, final int[] regionSizes) { final int a = m[y][x] & 1; int b; switch (d) { case 1: case 2: case 3: b = m[y][x + 1]; break; default: b = m[y + 1][x]; break; } b &= 5; } }
[ "spoole167@googlemail.com" ]
spoole167@googlemail.com
a218b2afd82504f7712a240319a0cc1e0154a1f7
9ee116100f7a425059b906448c81b146fcf23767
/madridColab/microservices/clients/modeling-client/src/main/java/org/xcolab/client/modeling/pojo/AbstractModelGlobalPreference.java
552a1ca6bf471c17485e7fc14def0ad488a7c8b3
[ "MIT" ]
permissive
UPMitd/MadridColab
1668a83ae0764a4165c30237983c6939d5399976
65e50a29453d77ab67bf18a14031dd3e6305569e
refs/heads/master
2022-10-10T16:04:17.375488
2021-01-18T01:11:16
2021-01-18T01:11:16
208,265,624
0
2
null
2022-09-16T03:11:16
2019-09-13T13:01:18
Java
UTF-8
Java
false
false
6,125
java
package org.xcolab.client.modeling.pojo; import java.io.Serializable; public abstract class AbstractModelGlobalPreference implements Serializable { private static final long serialVersionUID = 1L; protected Long id; protected Long modelid; protected Boolean visible; protected Integer weight; protected Long expertevaluationpageid; protected Long modelcategoryid; protected Boolean usescustominputs; protected String custominputsdefinition; public AbstractModelGlobalPreference() { } public AbstractModelGlobalPreference(AbstractModelGlobalPreference value) { this.id = value.id; this.modelid = value.modelid; this.visible = value.visible; this.weight = value.weight; this.expertevaluationpageid = value.expertevaluationpageid; this.modelcategoryid = value.modelcategoryid; this.usescustominputs = value.usescustominputs; this.custominputsdefinition = value.custominputsdefinition; } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public Long getModelId() { return this.modelid; } public void setModelId(Long modelid) { this.modelid = modelid; } public Boolean getVisible() { return this.visible; } public void setVisible(Boolean visible) { this.visible = visible; } public Integer getWeight() { return this.weight; } public void setWeight(Integer weight) { this.weight = weight; } public Long getExpertEvaluationPageId() { return this.expertevaluationpageid; } public void setExpertEvaluationPageId(Long expertevaluationpageid) { this.expertevaluationpageid = expertevaluationpageid; } public Long getModelCategoryId() { return this.modelcategoryid; } public void setModelCategoryId(Long modelcategoryid) { this.modelcategoryid = modelcategoryid; } public Boolean getUsesCustomInputs() { return this.usescustominputs; } public void setUsesCustomInputs(Boolean usescustominputs) { this.usescustominputs = usescustominputs; } public String getCustomInputsDefinition() { return this.custominputsdefinition; } public void setCustomInputsDefinition(String custominputsdefinition) { this.custominputsdefinition = custominputsdefinition; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((modelid == null) ? 0 : modelid.hashCode()); result = prime * result + ((visible == null) ? 0 : visible.hashCode()); result = prime * result + ((weight == null) ? 0 : weight.hashCode()); result = prime * result + ((expertevaluationpageid == null) ? 0 : expertevaluationpageid.hashCode()); result = prime * result + ((modelcategoryid == null) ? 0 : modelcategoryid.hashCode()); result = prime * result + ((usescustominputs == null) ? 0 : usescustominputs.hashCode()); result = prime * result + ((custominputsdefinition == null) ? 0 : custominputsdefinition.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ModelGlobalPreference other = (ModelGlobalPreference) obj; if (id == null) { if (other.id != null) { return false; } } else if (!id.equals(other.id)) { return false; } if (modelid == null) { if (other.modelid != null) { return false; } } else if (!modelid.equals(other.modelid)) { return false; } if (visible == null) { if (other.visible != null) { return false; } } else if (!visible.equals(other.visible)) { return false; } if (weight == null) { if (other.weight != null) { return false; } } else if (!weight.equals(other.weight)) { return false; } if (expertevaluationpageid == null) { if (other.expertevaluationpageid != null) { return false; } } else if (!expertevaluationpageid.equals(other.expertevaluationpageid)) { return false; } if (modelcategoryid == null) { if (other.modelcategoryid != null) { return false; } } else if (!modelcategoryid.equals(other.modelcategoryid)) { return false; } if (usescustominputs == null) { if (other.usescustominputs != null) { return false; } } else if (!usescustominputs.equals(other.usescustominputs)) { return false; } if (custominputsdefinition == null) { if (other.custominputsdefinition != null) { return false; } } else if (!custominputsdefinition.equals(other.custominputsdefinition)) { return false; } return true; } @Override public String toString() { return "ModelGlobalPreference (" + id + ", " + modelid + ", " + visible + ", " + weight + ", " + expertevaluationpageid + ", " + modelcategoryid + ", " + usescustominputs + ", " + custominputsdefinition + ")"; } }
[ "livinglabmadrid@upm.es" ]
livinglabmadrid@upm.es
a39e85903aba78622dcdcd1cb9cb3a8639b17fa2
9acb2dcaac7c7e59c982e4a7c67118e2eccab681
/src/main/java/net/sf/l2j/gameserver/geoengine/geodata/BlockNull.java
a20dc2f1380ea4ee78475052e847fe64fa928ce1
[]
no_license
denismaster/midnight
d1356bdbb06e56d67afea2c3090fcbca5e3d6b3f
d8832e701d1ba1b8ffadab5ec8e258a34dea2340
refs/heads/develop
2020-03-23T03:46:56.864185
2018-08-26T21:29:46
2018-08-26T21:29:46
141,048,546
1
0
null
2018-08-26T21:29:58
2018-07-15T18:18:40
HTML
UTF-8
Java
false
false
2,103
java
package net.sf.l2j.gameserver.geoengine.geodata; import java.io.BufferedOutputStream; /** * @author Hasha */ public class BlockNull extends ABlock { private byte _nswe; public BlockNull() { _nswe = (byte) 0xFF; } @Override public final boolean hasGeoPos() { return false; } @Override public final short getHeightNearest(int geoX, int geoY, int worldZ) { return (short) worldZ; } @Override public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { return (short) worldZ; } @Override public final short getHeightAbove(int geoX, int geoY, int worldZ) { return (short) worldZ; } @Override public final short getHeightBelow(int geoX, int geoY, int worldZ) { return (short) worldZ; } @Override public final byte getNsweNearest(int geoX, int geoY, int worldZ) { return _nswe; } @Override public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { return _nswe; } @Override public final byte getNsweAbove(int geoX, int geoY, int worldZ) { return _nswe; } @Override public final byte getNsweBelow(int geoX, int geoY, int worldZ) { return _nswe; } @Override public final int getIndexNearest(int geoX, int geoY, int worldZ) { return 0; } @Override public final int getIndexAbove(int geoX, int geoY, int worldZ) { return 0; } @Override public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) { return 0; } @Override public final int getIndexBelow(int geoX, int geoY, int worldZ) { return 0; } @Override public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) { return 0; } @Override public final short getHeight(int index) { return 0; } @Override public final short getHeightOriginal(int index) { return 0; } @Override public final byte getNswe(int index) { return _nswe; } @Override public final byte getNsweOriginal(int index) { return _nswe; } @Override public final void setNswe(int index, byte nswe) { } @Override public final void saveBlock(BufferedOutputStream stream) { } }
[ "denismaster@outlook.com" ]
denismaster@outlook.com
ef3d447d78e80b2af1d2286905266922b8d92fef
7df62a93d307a01b1a42bb858d6b06d65b92b33b
/src/com/afunms/system/manage/PortTypeManager.java
d2300dd5317feaaaaf3df35595057fe2718d3146
[]
no_license
wu6660563/afunms_fd
79ebef9e8bca4399be338d1504faf9630c42a6e1
3fae79abad4f3eb107f1558199eab04e5e38569a
refs/heads/master
2021-01-10T01:54:38.934469
2016-01-05T09:16:38
2016-01-05T09:16:38
48,276,889
0
1
null
null
null
null
UTF-8
Java
false
false
2,470
java
package com.afunms.system.manage; import java.util.ArrayList; import java.util.List; import com.afunms.common.base.BaseManager; import com.afunms.common.base.DaoInterface; import com.afunms.common.base.ErrorMessage; import com.afunms.common.base.ManagerInterface; import com.afunms.system.dao.PortTypeDao; import com.afunms.system.vo.PortTypeVo; public class PortTypeManager extends BaseManager implements ManagerInterface { private String list() { PortTypeDao fdao = new PortTypeDao(); List list = new ArrayList(); try{ list = fdao.loadAll(); }catch(Exception e){ e.printStackTrace(); }finally{ fdao.close(); } request.setAttribute("list",list); return "/system/porttype/list.jsp"; } private String add() { PortTypeVo vo = new PortTypeVo(); vo.setTypeid(getParaIntValue("typeid")); vo.setChname(getParaValue("chname")); vo.setBak(getParaValue("bak")); PortTypeDao fdao = new PortTypeDao(); try{ fdao.save(vo); }catch(Exception e){ e.printStackTrace(); }finally{ fdao.close(); } return "/porttype.do?action=list"; } public String delete() { String[] ids = getParaArrayValue("checkbox"); if(ids != null && ids.length > 0){ PortTypeDao fdao = new PortTypeDao(); try{ fdao.delete(ids); }catch(Exception e){ e.printStackTrace(); }finally{ fdao.close(); } } return list(); } private String update() { PortTypeVo vo = new PortTypeVo(); vo.setId(getParaIntValue("id")); vo.setTypeid(getParaIntValue("typeid")); vo.setChname(getParaValue("chname")); vo.setBak(getParaValue("bak")); PortTypeDao fdao = new PortTypeDao(); try{ fdao.update(vo); }catch(Exception e){ e.printStackTrace(); }finally{ fdao.close(); } return "/porttype.do?action=list"; } public String execute(String action) { if(action.equals("list")) return list(); if(action.equals("ready_add")) return "/system/porttype/add.jsp"; if(action.equals("add")) return add(); if(action.equals("delete")) return delete(); if(action.equals("ready_edit")) { DaoInterface dao = new PortTypeDao(); setTarget("/system/porttype/edit.jsp"); return readyEdit(dao); } if(action.equals("update")) return update(); setErrorCode(ErrorMessage.ACTION_NO_FOUND); return null; } }
[ "nick@comprame.com" ]
nick@comprame.com
fd9edff20a4c793c533602a8249b533388d83516
564749fa8e0996d3f76a2c2df8fb77962830e922
/tools/GUI/Tags/V1.0.3/gui-common/src/main/java/com/gome/test/gui/model/Step.java
fa6f321f3dd2bd2e9d4a1e5fdcf6a8d77edff231
[]
no_license
wang-shun/automation
ab7fd40e42740b09f527c0a20e2a4a00e3d234f4
2e621b3a9f4890c03e63479357ec2b6e6015af21
refs/heads/master
2020-03-29T13:46:37.342288
2018-08-20T16:01:44
2018-08-20T16:01:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
367
java
package com.gome.test.gui.model; public class Step { private String key; private String value; public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "greatmrliang@126.COM" ]
greatmrliang@126.COM
adff670c7f8b5dcfb7e1406ed0c0c8d2da778413
93f315fee18f8c97f6dad2a5d693778ca19691bf
/src/tree/binartTree/AverageOfLevels.java
3a61de452b828f93f6b7ec90665ba991bd3c72da
[]
no_license
AlexhahahaDrag/arithmetic
34f8e0b135a5f747e04546f81b6365a2a7208040
92232fd1758963bc964bea0759e8f0852b3cdaa0
refs/heads/master
2023-08-31T07:13:12.184136
2023-08-22T05:56:58
2023-08-22T05:56:58
170,278,495
2
0
null
null
null
null
UTF-8
Java
false
false
2,608
java
package tree.binartTree; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** *description: * 637. 二叉树的层平均值 * 给定一个非空二叉树, 返回一个由每层节点平均值组成的数组。 * * * * 示例 1: * * 输入: * 3 * / \ * 9 20 * / \ * 15 7 * 输出:[3, 14.5, 11] * 解释: * 第 0 层的平均值是 3 , 第1层是 14.5 , 第2层是 11 。因此返回 [3, 14.5, 11] 。 * * * 提示: *author: alex *createDate: 2020/9/12 9:57 *version: 1.0.0 */ public class AverageOfLevels { Map<Integer, List<Integer>> map = new HashMap<>(); public List<Double> averageOfLevels1(TreeNode root) { getAverage(root, 0); List<Double> res = new ArrayList<>(); for(List<Integer> li : map.values()) { double sum = 0.0; for(Integer i : li) { sum += i; } res.add(sum / li.size()); } return res; } private void getAverage(TreeNode root, int level) { if(root == null) { return; } List<Integer> li; if(map.get(level) == null) { li = new ArrayList<>(); li.add(root.val); map.put(level, li); } else { li = map.get(level); li.add(root.val); } getAverage(root.left, level + 1); getAverage(root.right, level + 1); } List<Double> res; public List<Double> averageOfLevels(TreeNode root) { List<TreeNode> parents = new ArrayList<>(); parents.add(root); res = new ArrayList<>(); average(parents); return res; } private void average(List<TreeNode> parents) { if (parents == null || parents.isEmpty()) { return; } List<TreeNode> cur = new ArrayList<>(); double sum = 0; int count = 0; for (TreeNode treeNode : parents) { count++; sum += treeNode.val; if (treeNode.left != null) { cur.add(treeNode.left); } if (treeNode.right != null) { cur.add(treeNode.right); } } res.add(sum / count); average(cur); } public static void main(String[] args) { int[] arr = {3, 9, 20, 15, 7}; TreeNode root = TreeNode.getTreeNodeByArr(arr); AverageOfLevels averageOfLevels = new AverageOfLevels(); System.out.println(averageOfLevels.averageOfLevels(root)); } }
[ "734663446@qq.com" ]
734663446@qq.com
63687745fd0ce9eb5e65cdb2ab93e4b5fb04ec2f
47965ec0b1e7868f854a26184a06b54a0fc7fd28
/ruby-web/src/main/java/com/fpt/ruby/template/MovieProcess.java
3ef8e6be802a0bf4ecaf6e702023c913435ec34f
[]
no_license
NguyenAnhDuc/new-ruby
09db798eb34a339d8de170bd48081111d570e69d
1330080408e48e582e4ef689aaa96508cd4f3bec
refs/heads/master
2021-01-10T21:24:34.773996
2014-11-17T07:24:54
2014-11-17T07:24:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
package com.fpt.ruby.template; import java.util.List; import com.fpt.ruby.business.model.TimeExtract; import edu.stanford.nlp.util.Pair; public class MovieProcess extends RubyProcess { @Override String getIntent(String question) { // TODO Auto-generated method stub return ""; } @Override List<Pair<String, String>> getModifiers(String question) { // TODO Auto-generated method stub return null; } @Override TimeExtract extractTime(String question) { // TODO Auto-generated method stub return null; } @Override String getAnswer(String question) { normalize(question); // TODO Auto-generated method stub return null; } }
[ "admin@local.host" ]
admin@local.host
685398dec66a64dd600768150036ac329d3d1bb8
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/core-accelerator/acceleratorservices/src/de/hybris/platform/acceleratorservices/customer/CustomerLocationService.java
435bb94ae6ffcf26586c850634fc480265003fc7
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
1,198
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.acceleratorservices.customer; import de.hybris.platform.commerceservices.store.data.GeoPoint; import de.hybris.platform.acceleratorservices.store.data.UserLocationData; import de.hybris.platform.storelocator.model.PointOfServiceModel; /** * Defines an API to handle a user's location */ public interface CustomerLocationService { /** * Stores the information of user location. If search term is given, but gps is null it tries to determine GPS * coordinates for the given search term. * * @param userLocationData */ void setUserLocation(UserLocationData userLocationData); /** * Returns user stored location or null if no location found for current session user. * * @return stored location */ UserLocationData getUserLocation(); /** * Calculates distance between given origin point and given point of service data object * * @param origin * @param pointOfServiceModel * @return distance between given points */ double calculateDistance(GeoPoint origin, PointOfServiceModel pointOfServiceModel); }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
091b98de6b8ed17c34767feb05b8ea30517d0600
90bed98a8a9199dcb980a6203bdc398f8b7542eb
/TeedinGetESBmake/src/com/nectec/ssi/max/teedin1/C_myParcel.java
7cec1c6a10d02fd5025130332638c44462bdd9d6
[]
no_license
lionants02/teedin_Get_makeESB
95bcb05ccb98d6b1a67e728b20aba72dbd60bc50
5d0f6ed5e6676a9188bc384dee34f9652597ef8f
refs/heads/master
2021-01-24T06:12:52.043113
2015-06-03T06:18:20
2015-06-03T06:18:20
35,934,342
0
0
null
null
null
null
UTF-8
Java
false
false
1,132
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.nectec.ssi.max.teedin1; import _55._49._164._110.dolparcel2ega.Parcel; /** * * @author SSI */ public class C_myParcel extends Parcel{ public String time_stamp; public C_myParcel(Parcel parcel,String time_stamp) { this(parcel); this.time_stamp=time_stamp; } public C_myParcel(Parcel parcel) { amphurname = parcel.getAMPHURNAME(); landofficename = parcel.getLANDOFFICENAME(); landofficex = parcel.getLANDOFFICEX(); landofficey = parcel.getLANDOFFICEY(); mapx = parcel.getMAPX(); mapy = parcel.getMAPY(); parcelno = parcel.getPARCELNO(); pin = parcel.getPIN(); provincename = parcel.getPROVINCENAME(); surveyno = parcel.getSURVEYNO(); tambolname = parcel.getTAMBOLNAME(); utmlandno = parcel.getUTMLANDNO(); utmmap = parcel.getUTMMAP(); utmscale = parcel.getUTMSCALE(); } }
[ "you@example.com" ]
you@example.com
3dce6b2eba95435d4c9bb99d1cd15418f5d375c4
73f9db15a303123a12fa251ac54df162a7da24be
/app/src/main/java/beini/com/dailyapp/constant/NetConstants.java
53bd5c345900d6947747156ce72d6c355f61f0cf
[]
no_license
lvbeini/DailyApp
6697d5edde8cb2396aefe86db5b05b4619c6c22c
7e9f908a066a15d0eb3d1ba8bdb1831d8fdacfaf
refs/heads/master
2021-07-17T14:18:03.526131
2017-10-26T09:57:44
2017-10-26T09:57:44
108,417,358
2
0
null
2017-10-26T13:45:50
2017-10-26T13:45:50
null
UTF-8
Java
false
false
645
java
package beini.com.dailyapp.constant; /** * Created by beini on 2017/2/10. */ public class NetConstants { public static String ROOT_URL = "https://10.0.0.40:8443/"; //action public static String URL_ADD_DAILY = "addDaily"; public static String URL_REGISTER_USER = "register"; public static String URL_LOGIN_USER = "login"; public static String URL_UPLOAD_SINGLE_FILE = "upload"; public static String URL_UPLOAD_MULTI_FILE = "multipart_upload"; //exception public static String EXCTPTION_RESPONSE_NULL = "EXCTPTION_RESPONSE_NULL"; public static String EXCTPTION_RESPONSE_IO = "EXCTPTION_RESPONSE_IO"; }
[ "874140704@qq.com" ]
874140704@qq.com
71c36d33f4d3d982cda4457cb2e1e6e5f3a11f60
9b294c3bf262770e9bac252b018f4b6e9412e3ee
/camerazadas/source/apk/com.sonyericsson.android.camera/src-cfr/com/sonyericsson/android/camera/controller/TouchFocus.java
7af93d510beddf1e33c20c73e6f2c9e88d18d7c8
[]
no_license
h265/camera
2c00f767002fd7dbb64ef4dc15ff667e493cd937
77b986a60f99c3909638a746c0ef62cca38e4235
refs/heads/master
2020-12-30T22:09:17.331958
2015-08-25T01:22:25
2015-08-25T01:22:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,794
java
/* * Decompiled with CFR 0_100. */ package com.sonyericsson.android.camera.controller; import android.graphics.Rect; import com.sonyericsson.android.camera.controller.CameraFunctions; import com.sonyericsson.android.camera.controller.EventDispatcher; import com.sonyericsson.android.camera.device.CameraDevice; import com.sonyericsson.android.camera.view.CameraWindow; import com.sonyericsson.cameracommon.utility.PositionConverter; public class TouchFocus { private static final String TAG = TouchFocus.class.getSimpleName(); private final CameraFunctions mController; private Rect mLastPosition = new Rect(); public TouchFocus(CameraFunctions cameraFunctions) { this.mController = cameraFunctions; } /* * Enabled aggressive block sorting * Lifted jumps to return sites */ private void setFocusPosition(Rect rect, boolean bl) { if (rect == null) { return; } this.setLastPosition(rect); this.mController.mCameraWindow.updateTouchRectangle(rect); rect = PositionConverter.getInstance().convertToDevice(rect); this.mController.mCameraDevice.setFocusRect(rect); if (!bl) return; this.mController.mCameraDevice.commitParameters(); } private void setLastPosition(Rect rect) { this.mLastPosition = rect; } public void clear() { this.setFocusPosition(new Rect(), false); this.hideTouchFocusRectangle(); } public void finish(Rect rect) { this.mController.mEventDispatcher.updateTouchFocusStatus(false); this.mController.mCameraWindow.startTouchUpAnimation(rect); this.setFocusPosition(rect, true); } public Rect getLastPosition() { return this.mLastPosition; } public void hideTouchFocusRectangle() { this.mController.mEventDispatcher.updateTouchFocusStatus(false); this.mController.mCameraWindow.clearTouchRectangle(); } public void setFocusPosition(Rect rect) { this.setFocusPosition(rect, true); } public void singleTapUp(Rect rect) { if (rect == null) { return; } this.mController.mCameraWindow.startTouchDownAnimation(rect); this.setFocusPosition(rect, true); } public void start(Rect rect) { if (rect == null) { return; } this.mController.mCameraWindow.hideBalloonTips(); this.mController.mCameraWindow.startTouchDownAnimation(rect); this.setFocusPosition(rect, true); this.mController.mEventDispatcher.updateTouchFocusStatus(true); } public void updateTouchFocusRectangle(Rect rect) { this.setLastPosition(rect); this.mController.mCameraWindow.updateTouchRectangle(rect); } }
[ "jmrm@ua.pt" ]
jmrm@ua.pt
b2f3072394bc842389ae0534962a87470ddeb74e
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/14267525.java
a4a821f38f9191a296722ee9bd1e19686a3ef1ae
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
class c14267525 { public Web(String urlString) throws java.net.MalformedURLException, java.io.IOException { final java.net.URL url = new java.net.URL(urlString); final java.net.URLConnection uconn = url.openConnection(); if (!(uconn instanceof java.net.HttpURLConnection)) throw new java.lang.IllegalArgumentException("URL protocol must be HTTP."); final java.net.HttpURLConnection conn = (java.net.HttpURLConnection) uconn; conn.setConnectTimeout(100000); conn.setReadTimeout(100000); conn.setInstanceFollowRedirects(true); conn.setRequestProperty("User-agent", "spider"); conn.connect(); responseHeader = conn.getHeaderFields(); responseCode = conn.getResponseCode(); responseURL = conn.getURL(); length = conn.getContentLength(); final String type = conn.getContentType(); if (type != null) { final String[] parts = type.split(";"); MIMEtype = parts[0].trim(); for (int i = 1; i < parts.length && charset == null; i++) { final String t = parts[i].trim(); final int index = t.toLowerCase().indexOf("charset="); if (index != -1) charset = t.substring(index + 8); } } final java.io.InputStream stream = conn.getErrorStream(); if (stream != null) { content = readStream(length, stream); } else if ((inputStream = conn.getContent()) != null && inputStream instanceof java.io.InputStream) { content = readStream(length, (java.io.InputStream) inputStream); } conn.disconnect(); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
c21f6ce1df6ba564ed56126e46a084f5ef4a3667
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a014/A014785Test.java
119e691a569f27e7fb7d4b2776714676c037aab0
[]
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.a014; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A014785Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
f5e96839896ecce401894bbd9364acc6c4969d26
525888afee7102068ba12bea468cf52a1623fdd5
/core/src/main/java/org/airwirej/core/InsufficientMoneyException.java
fe99a283623b1667c19ddf8d1fccc2fe3d839f4a
[ "MIT", "Apache-2.0" ]
permissive
OldArchive/airwirej
cb0578a277607f9d5bdcbf8d019a026e9aa66cea
8bbd4791b8fb59271c6fb6c873289e899dc1307f
refs/heads/master
2022-12-26T21:57:23.848041
2019-06-08T13:47:41
2019-06-08T13:47:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,414
java
/* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.airwirej.core; import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkNotNull; /** * Thrown to indicate that you don't have enough money available to perform the requested operation. */ public class InsufficientMoneyException extends Exception { /** Contains the number of satoshis that would have been required to complete the operation. */ @Nullable public final Coin missing; protected InsufficientMoneyException() { this.missing = null; } public InsufficientMoneyException(Coin missing) { this(missing, "Insufficient money, missing " + missing.toFriendlyString()); } public InsufficientMoneyException(Coin missing, String message) { super(message); this.missing = checkNotNull(missing); } }
[ "akshaycm@hotmail.com" ]
akshaycm@hotmail.com
850f353e58b2c21e88a9ae604196d358eb025df5
422fa00f055ea371474af4d83476871c8ada2c2e
/src/main/java/nl/paulinternet/gtasaveedit/model/io/FileSystem.java
376e723a8a8e2d1701b2647489f37ae287cf2d1b
[ "MIT" ]
permissive
tuxBurner/gtasa-savegame-editor
4827efdfca864ef9b8210153f2e974d6b2f8bd6a
76e3155a6077b52685799f045cb7996f4d1496d4
refs/heads/master
2020-04-02T01:19:56.465588
2017-10-08T13:49:32
2017-10-08T13:49:32
153,850,150
0
0
MIT
2018-10-19T22:58:05
2018-10-19T22:58:05
null
UTF-8
Java
false
false
5,922
java
package nl.paulinternet.gtasaveedit.model.io; import nl.paulinternet.gtasaveedit.model.Settings; import nl.paulinternet.gtasaveedit.model.Util; import nl.paulinternet.gtasaveedit.model.steam.SteamConfigNode; import nl.paulinternet.gtasaveedit.model.steam.SteamConfigReader; import javax.swing.filechooser.FileSystemView; import java.io.File; import java.util.Objects; public class FileSystem { private static final boolean MAC = System.getProperty("os.name").toLowerCase().startsWith("mac"); public static final File activeDir = new File(System.getProperty("user.dir")); private static boolean dllLoaded; private static String EMPTYSTRING; static { try { if (System.getProperty("os.name").toLowerCase().startsWith("windows")) { try { System.loadLibrary("editor32"); } catch (Throwable t) { System.loadLibrary("editor64"); } dllLoaded = true; } } catch (Throwable ignored) { } } public static final File detectedSaDir = detectSanAndreasDirectory(); public static File getSavegameDirectory() { switch (Settings.getSavegameDirectoryType()) { case Settings.DIR_DEFAULT: return getDefaultSavegameDirectory(); case Settings.DIR_ACTIVE: return activeDir; case Settings.DIR_CUSTOM: return new File(Settings.getCustomSavegameDirectory()); default: throw new IllegalStateException(); } } public static File getSanAndreasDirectory() { switch (Settings.getSanAndreasDirectoryType()) { case Settings.DIR_DEFAULT: return detectedSaDir; case Settings.DIR_CUSTOM: return new File(Settings.getCustomSanAndreasDirectory()); default: throw new IllegalStateException(); } } public static File getSanAndreasExecutable() { File sanAndreasDirectory = getSanAndreasDirectory(); String saDir; if(sanAndreasDirectory != null) { saDir = sanAndreasDirectory.getAbsolutePath(); } else { saDir = Util.EMPTYSTRING; } if (MAC && !saDir.equals(Util.EMPTYSTRING)) { return new File(saDir.substring(0, saDir.indexOf(".app") + 4)); // new File(saDir.getAbsolutePath().split("[.]app")[0] + ".app"); slower one } File file1 = new File(saDir, "gta_sa.exe"); if (file1.exists()) return file1; File file2 = new File(saDir, "gta-sa.exe"); if (file2.exists()) return file2; return null; } public static boolean isDllLoaded() { return dllLoaded; } private static File detectSanAndreasDirectory() { // Windows if (dllLoaded) { // Try steam byte[] data = getSteamDir(); if (data != null) { File steamDir = getFile(data); SteamConfigNode node = SteamConfigReader.readSteamConfig(steamDir); if (node != null) { String installDir = node.getString("InstallConfigStore", "Software", "Valve", "Steam", "apps", "12120", "installdir"); if (installDir != null) { File f = new File(installDir); if (f.exists()) return f; } } } // Try not-steam data = getSaDir(); if (data != null) { return getFile(data).getParentFile(); } } // Mac if (MAC) { // Try steam File steamDir = new File(System.getProperty("user.home"), "Library/Application Support/Steam"); SteamConfigNode node = SteamConfigReader.readSteamConfig(steamDir); if (node != null) { String installDir = node.getString("InstallConfigStore", "Software", "Valve", "Steam", "apps", "12250", "installdir"); if (installDir != null) { File f = new File(installDir, "Grand Theft Auto - San Andreas.app"); if (f.exists()) return f; } } // Try not-steam File f = new File("/Applications/Grand Theft Auto - San Andreas.app"); if (f.exists()) return f; } return null; } public static File getPlayerImageFile() { return getPlayerImageFile(getSanAndreasDirectory()); } private static File getPlayerImageFile(File saDir) { if (saDir == null) return null; File f = new File(saDir, "models/player.img"); if (f.exists()) return f; f = new File(saDir, "Contents/Resources/transgaming/c_drive/Program Files/Rockstar Games/GTA San Andreas/models/player.img"); if (f.exists()) return f; return null; } public static File getDefaultSavegameDirectory() { if (MAC) { return new File(System.getProperty("user.home"), "/Documents/Rockstar Games/GTA San Andreas User Files"); } else { return new File(FileSystemView.getFileSystemView().getDefaultDirectory(), "GTA San Andreas User Files"); } } private static File getFile(byte[] data) { int start = 0, end = data.length; if (end > 0 && data[end - 1] == 0) end--; if (end > 0 && data[end - 1] == 34) end--; if (end > 0 && data[0] == 34) start++; return new File(new String(data, start, end - start)); } private static native byte[] getSaDir(); private static native byte[] getSteamDir(); }
[ "lukas@k40s.net" ]
lukas@k40s.net
009a0f141caf555ecdde473b4026aac839626090
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_4454c3f5ff86c693fd0829a63b7eb7f897eee7a5/CourseControllerImpl/1_4454c3f5ff86c693fd0829a63b7eb7f897eee7a5_CourseControllerImpl_s.java
7da6897cbc0729c04f1fd327ca44eb8e55e698df
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,023
java
package no.niths.application.rest; import java.util.ArrayList; import java.util.List; import no.niths.application.rest.exception.DuplicateEntryCollectionException; import no.niths.application.rest.exception.NotInCollectionException; import no.niths.application.rest.interfaces.CourseController; import no.niths.application.rest.lists.CourseList; import no.niths.application.rest.lists.ListAdapter; import no.niths.application.rest.lists.SubjectList; import no.niths.common.AppConstants; import no.niths.common.SecurityConstants; import no.niths.common.ValidationHelper; import no.niths.domain.Course; import no.niths.domain.Student; import no.niths.domain.Subject; import no.niths.services.interfaces.CourseService; import no.niths.services.interfaces.GenericService; import no.niths.services.interfaces.StudentService; import no.niths.services.interfaces.SubjectService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; /** * Controller for course * */ @Controller @RequestMapping(AppConstants.COURSES) public class CourseControllerImpl extends AbstractRESTControllerImpl<Course> implements CourseController{ private static final Logger logger = LoggerFactory .getLogger(CourseControllerImpl.class); @Autowired private CourseService courseService; @Autowired private StudentService studentService; @Autowired private SubjectService subjectService; private CourseList courseList = new CourseList(); private SubjectList subjectList = new SubjectList(); /** * {@inheritDoc} */ @Override @RequestMapping(method = RequestMethod.GET, headers = RESTConstants.ACCEPT_HEADER) @ResponseBody public ArrayList<Course> getAll(Course domain) { courseList = (CourseList) super.getAll(domain); for (int i = 0; i < courseList.size(); i++){ courseList.get(i).setSubjects(null); courseList.get(i).setStudents(null); } return courseList; } @Override public Course getById(@PathVariable Long id) { Course course = super.getById(id); for (int i = 0; i < course.getSubjects().size(); i++) { course.getSubjects().get(i).setCourses(null); course.getSubjects().get(i).setRoom(null); course.getSubjects().get(i).setTutors(null); } for (int i = 0; i < course.getCourseRepresentatives().size(); i++){ course.getCourseRepresentatives().get(i).setCommittees(null); course.getCourseRepresentatives().get(i).setCourses(null); course.getCourseRepresentatives().get(i).setFeeds(null); } return course; } /** * Returns all topics inside a course * * @param id * the course id * @return List with subject */ @Override @RequestMapping(value = "subject/{id}", method = RequestMethod.GET, headers = RESTConstants.ACCEPT_HEADER) @ResponseBody public List<Subject> getCourseSubjects(@PathVariable Long id) { Course course = courseService.getById(id); ValidationHelper.isObjectNull(course, "Course not found"); subjectList.clear(); subjectList.addAll(course.getSubjects()); subjectList.setData(course.getSubjects()); ValidationHelper.isListEmpty(subjectList); return subjectList; } /** * {@inheritDoc} */ @Override @RequestMapping( value ="addRepresentative/{courseId}/{studentId}", method = RequestMethod.PUT) @ResponseStatus(value = HttpStatus.OK, reason = "Representative added to course") public void addRepresentative( @PathVariable Long courseId, @PathVariable Long studentId) { Course c = courseService.getById(courseId); ValidationHelper.isObjectNull(c, "Course not found"); Student student = studentService.getById(studentId); ValidationHelper.isObjectNull(student, "Student not found"); if(c.getCourseRepresentatives().contains(student)){ throw new DuplicateEntryCollectionException("Student already a representative"); } c.getCourseRepresentatives().add(student); courseService.update(c); } /** * {@inheritDoc} */ @Override @RequestMapping( value ="removeRepresentative/{courseId}/{studentId}", method = RequestMethod.DELETE) @ResponseStatus(value = HttpStatus.OK, reason = "Representative removed from course") public void removeRepresentative( @PathVariable Long courseId, @PathVariable Long studentId) { Course c = courseService.getById(courseId); ValidationHelper.isObjectNull(c, "Course not found"); Student student = studentService.getById(studentId); ValidationHelper.isObjectNull(student, "Student not found"); if(!c.getCourseRepresentatives().remove(student)){ throw new NotInCollectionException("Student not a representative for that class"); } courseService.update(c); } /** * {@inheritDoc} */ @Override @PreAuthorize(SecurityConstants.ADMIN_AND_SR) public void create(@RequestBody Course domain) { super.create(domain); } /** * {@inheritDoc} */ @Override @PreAuthorize(SecurityConstants.ADMIN_AND_SR) public void update(@RequestBody Course domain) { super.update(domain); } /** * {@inheritDoc} */ @Override @PreAuthorize(SecurityConstants.ADMIN_AND_SR) public void hibernateDelete(@PathVariable long id) { super.hibernateDelete(id); } /** * Adds a topic to a course * * @param courseId * the id of the course * @param subjectId * the id of the topic to be added */ @Override @PreAuthorize(SecurityConstants.ADMIN_AND_SR) @RequestMapping(value = { "{courseId}/{subjectId}" }, method = RequestMethod.PUT) @ResponseStatus(value = HttpStatus.OK, reason = "Subject added to course") public void addSubjectToCourse(@PathVariable Long courseId, @PathVariable Long subjectId) { Course course = courseService.getById(courseId); ValidationHelper.isObjectNull(course, "Course not found"); Subject subject = subjectService.getById(subjectId); ValidationHelper.isObjectNull(subject, "Subject not found"); course.getSubjects().add(subject); courseService.update(course); } @Override public GenericService<Course> getService() { return courseService; } @Override public ListAdapter<Course> getList() { return courseList; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
70fd224ea0bb8aa8f68cba442c5fd9509f9b839f
c67283ba530c1cc91aa03dff0eea066ed6d4add5
/HBProj09-GetAndLoad-Proxool/src/com/nt/domain/InsurancePolicy.java
ead612a391d6151383a969740962c2fd2dbd464a
[]
no_license
NCENalanda/hibernate
699a18e211e234fe0b02e6131dbc99678bdae95e
a6d858a7407fcb2d90f05614aab611c9d09173a5
refs/heads/master
2022-12-05T08:25:17.400914
2019-05-28T07:14:01
2019-05-28T07:14:01
188,974,056
1
0
null
2022-11-24T07:02:22
2019-05-28T07:10:09
Java
UTF-8
Java
false
false
770
java
package com.nt.domain; public final class InsurancePolicy implements IInsurancePolicy { private int policyId; private String policyName; private int tenure; private int premium; public InsurancePolicy() { System.out.println("PolicyInsurance:0-param constructor"); } public int getPolicyId() { return policyId; } public void setPolicyId(int policyId) { this.policyId = policyId; } public String getPolicyName() { return policyName; } public void setPolicyName(String policyName) { this.policyName = policyName; } public int getTenure() { return tenure; } public void setTenure(int tenure) { this.tenure = tenure; } public int getPremium() { return premium; } public void setPremium(int premium) { this.premium = premium; } }
[ "aaush0101@gmail.com" ]
aaush0101@gmail.com
ea6ddc002abb4dbf87dee2655f43a6cfc9b13fde
fa7fe9e85e67a6af7c68b25107aac6e70f6736ee
/app/src/main/java/com/example/fadil/admininstallin/fragment/KurirFragment.java
fe03e7a0cff46635a94556c8817774361a4cc51a
[]
no_license
NikkoES/admin-installin
2ca96b834014d02b7d5f97506ff7ee97a1f05f27
f34c2d5651e4be6e84b9a28e1a8a196019974906
refs/heads/master
2020-03-18T22:38:16.990522
2018-05-29T21:40:47
2018-05-29T21:40:47
135,355,644
0
0
null
null
null
null
UTF-8
Java
false
false
3,938
java
package com.example.fadil.admininstallin.fragment; import android.app.ProgressDialog; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import com.example.fadil.admininstallin.R; import com.example.fadil.admininstallin.adapter.DaftarPesanAdapter; import com.example.fadil.admininstallin.adapter.HistoriPesanAdapter; import com.example.fadil.admininstallin.adapter.KurirAdapter; import com.example.fadil.admininstallin.api.BaseApiService; import com.example.fadil.admininstallin.model.DaftarPesanan; import com.example.fadil.admininstallin.model.HistoriPesanan; import com.example.fadil.admininstallin.model.response.ResponseKurir; import java.util.ArrayList; import java.util.List; /** * A simple {@link Fragment} subclass. */ public class KurirFragment extends Fragment { /*private SliderPagerAdapter mAdapter; private SliderIndicator mIndicator; private SliderView sliderView;*/ private LinearLayout mLinearLayout; private FragmentActivity myContext; private RecyclerView rvHome; private KurirAdapter adapter; List<ResponseKurir> listKurir = new ArrayList<>(); ProgressDialog loading; BaseApiService apiService; public KurirFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_kurir, container, false); //sliderView = (SliderView) v.findViewById(R.id.sliderView); mLinearLayout = (LinearLayout) v.findViewById(R.id.pagesContainer); //setupSlider(); rvHome = (RecyclerView) v.findViewById(R.id.rv_list_kurir); adapter = new KurirAdapter(getContext(), listKurir); // apiService = UtilsApi.getAPIService(); rvHome.setHasFixedSize(true); rvHome.setLayoutManager(new LinearLayoutManager(getContext())); rvHome.setAdapter(adapter); refresh(); return v; } public void refresh() { loading = ProgressDialog.show(getContext(), null, "Harap Tunggu...", true, false); listKurir.add(new ResponseKurir("Fiki", "323435345456", "967867867860980")); listKurir.add(new ResponseKurir("Fiki", "323435345456", "967867867860980")); listKurir.add(new ResponseKurir("Fiki", "323435345456", "967867867860980")); listKurir.add(new ResponseKurir("Fiki", "323435345456", "967867867860980")); listKurir.add(new ResponseKurir("Fiki", "323435345456", "967867867860980")); adapter.notifyDataSetChanged(); loading.dismiss(); } /*private void setupSlider() { sliderView.setDurationScroll(800); List<Fragment> fragments = new ArrayList<>(); fragments.add(FragmentSlider.newInstance("https://image.tmdb.org/t/p/w250_and_h141_bestv2/zYFQM9G5j9cRsMNMuZAX64nmUMf.jpg")); fragments.add(FragmentSlider.newInstance("https://image.tmdb.org/t/p/w250_and_h141_bestv2/rXBB8F6XpHAwci2dihBCcixIHrK.jpg")); fragments.add(FragmentSlider.newInstance("https://image.tmdb.org/t/p/w250_and_h141_bestv2/biN2sqExViEh8IYSJrXlNKjpjxx.jpg")); fragments.add(FragmentSlider.newInstance("https://image.tmdb.org/t/p/w250_and_h141_bestv2/o9OKe3M06QMLOzTl3l6GStYtnE9.jpg")); mAdapter = new SliderPagerAdapter(myContext.getSupportFragmentManager(), fragments); sliderView.setAdapter(mAdapter); mIndicator = new SliderIndicator(getContext(), mLinearLayout, sliderView, R.drawable.indicator_circle); mIndicator.setPageCount(fragments.size()); mIndicator.show(); }*/ }
[ "nikkoeka04@gmail.com" ]
nikkoeka04@gmail.com
6f15359f2dad80ebd3538627d633de6cc8b27d96
4cfd758063e34e4218204464bd5d8f44d65fe2e1
/src/main/java/com/robertx22/age_of_exile/capability/player/EntityPerks.java
5141bff503a8953ceec88d030e211250daf5f83f
[]
no_license
yiner233/Age-of-Exile
77b104bae395667b1f536131696b7759c6bea0ca
bbfe2c03653346d47f2106f9e17e2f482ae6f8ae
refs/heads/master
2023-07-10T16:50:36.369211
2021-07-29T20:29:09
2021-07-29T20:29:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,797
java
package com.robertx22.age_of_exile.capability.player; import com.robertx22.age_of_exile.capability.bases.ICommonPlayerCap; import com.robertx22.age_of_exile.database.data.perks.Perk; import com.robertx22.age_of_exile.database.data.perks.PerkStatus; import com.robertx22.age_of_exile.database.data.spell_schools.SpellSchool; import com.robertx22.age_of_exile.database.registry.ExileDB; import com.robertx22.age_of_exile.saveclasses.ExactStatData; import com.robertx22.age_of_exile.saveclasses.PointData; import com.robertx22.age_of_exile.saveclasses.gearitem.gear_bases.IApplyableStats; import com.robertx22.age_of_exile.saveclasses.perks.PlayerPerksData; import com.robertx22.age_of_exile.saveclasses.perks.SchoolData; import com.robertx22.age_of_exile.saveclasses.unit.stat_ctx.StatContext; import com.robertx22.age_of_exile.saveclasses.unit.stat_ctx.TalentStatCtx; import com.robertx22.age_of_exile.uncommon.datasaving.Load; import com.robertx22.age_of_exile.vanilla_mc.packets.sync_cap.PlayerCaps; import com.robertx22.library_of_exile.utils.LoadSave; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.nbt.NbtCompound; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class EntityPerks implements ICommonPlayerCap, IApplyableStats { PlayerEntity entity; public PlayerPerksData data = new PlayerPerksData(); public EntityPerks(PlayerEntity entity) { this.entity = entity; } @Override public PlayerCaps getCapType() { return PlayerCaps.ENTITY_PERKS; } public void clearAllTalents() { this.data.getPerks(SpellSchool.SchoolType.TALENTS) .clear(); } public HashMap<PointData, Perk> getAllAllocatedPerks() { HashMap<PointData, Perk> perks = new HashMap<>(); for (SpellSchool.SchoolType type : SpellSchool.SchoolType.values()) { for (Map.Entry<String, SchoolData> x : data.getPerks(type) .entrySet()) { if (ExileDB.SpellSchools() .isRegistered(x.getKey())) { SpellSchool school = ExileDB.SpellSchools() .get(x.getKey()); if (school != null) { for (PointData p : x.getValue() .getAllocatedPoints(school)) { perks.put(p, school.calcData.getPerk(p)); } } } } } return perks; } public PerkStatus getStatus(PlayerEntity player, SpellSchool school, PointData point) { if (isAllocated(school, point)) { return PerkStatus.CONNECTED; } Perk perk = school.calcData.getPerk(point); if (perk.isLockedToPlayer(player)) { return PerkStatus.LOCKED_UNDER_ACHIEV; } if (data.canAllocate(school, point, Load.Unit(player), player)) { return PerkStatus.POSSIBLE; } else { return PerkStatus.BLOCKED; } } public Perk.Connection getConnection(SpellSchool school, PointData one, PointData two) { if (isAllocated(school, one)) { if (isAllocated(school, two)) { return Perk.Connection.LINKED; } return Perk.Connection.POSSIBLE; } else if (isAllocated(school, two)) { return Perk.Connection.POSSIBLE; } return Perk.Connection.BLOCKED; } public boolean isAllocated(SpellSchool school, PointData point) { return data.getSchool(school) .isAllocated(point); } @Override public void fromTag(NbtCompound tag) { try { this.data = LoadSave.Load(PlayerPerksData.class, new PlayerPerksData(), tag, "data"); if (data == null) { data = new PlayerPerksData(); } } catch (Exception e) { e.printStackTrace(); } } @Override public NbtCompound toTag(NbtCompound tag) { try { LoadSave.Save(data, tag, "data"); } catch (Exception e) { e.printStackTrace(); } return tag; } @Override public List<StatContext> getStatAndContext(LivingEntity en) { List<StatContext> ctx = new ArrayList<>(); HashMap<PointData, Perk> map = getAllAllocatedPerks(); int lvl = Load.Unit(en) .getLevel(); map.forEach((key, value) -> { List<ExactStatData> stats = new ArrayList<>(); value.stats.forEach(s -> stats.add(s.toExactStat(lvl))); ctx.add(new TalentStatCtx(key, value, stats)); }); return ctx; } }
[ "treborx555@gmail.com" ]
treborx555@gmail.com
932d56aa9e86dcaf409047d8d30afc423c18d021
f908decc10bb6b5e4f41be10c032484fae239977
/src/Adapter/VlcPlayer.java
593c1ff95a7f9c75a16b72bb783da5695798627f
[]
no_license
RenjithKI/deSignPatternJava
75bbb654e6c7d399861eefad7a59cb4f124d2018
d0bd37ff301337c6c3e63abadff725b5a930b98f
refs/heads/master
2021-04-30T00:02:19.621036
2018-05-09T01:08:06
2018-05-09T01:08:06
121,567,874
1
0
null
2018-05-09T01:08:07
2018-02-14T22:18:45
Java
UTF-8
Java
false
false
289
java
package Adapter; public class VlcPlayer implements AdvancedMediaPlayer{ @Override public void playVlc(String fileName) { System.out.println("Playing vlc file. Name: "+ fileName); } @Override public void playMp4(String fileName) { //do nothing } }
[ "renjith.kachappilly@gmail.com" ]
renjith.kachappilly@gmail.com
27639c118cd2616f389ec83fb926ca78c4b782ca
85932a806dc32ec80aa5d13e7be71f34909786ac
/2018/11/20/BubbleDemo2.java
ea9a7cb78cdbe06e190c8901a368f50ed5bc8b2f
[]
no_license
renkaigis/KeepCoding
bed679e1573595b93d484fc7a9b274817fbfad7d
fce3d953da69f3469d4a92ae8e47d238bf2c70c6
refs/heads/master
2021-01-20T09:59:31.883392
2018-11-28T06:09:18
2018-11-28T06:09:18
101,612,966
1
1
null
null
null
null
UTF-8
Java
false
false
3,235
java
/** * 238:气泡图 x 轴标签(气泡图) */ import java.awt.Font; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.title.LegendTitle; import org.jfree.chart.title.TextTitle; import org.jfree.data.xy.DefaultXYZDataset; import org.jfree.data.xy.XYZDataset; import org.jfree.ui.ApplicationFrame; import org.jfree.ui.RefineryUtilities; /** * 气泡图X轴标签 * @author */ public class BubbleDemo2 extends ApplicationFrame { public BubbleDemo2(String title) { super(title); } /** * 创建数据集 * * @return */ private XYZDataset getXYZDataset() { // 系例关键字 final String series1 = "JAVA图书"; final String series2 = "VC图书"; final String series3 = "VB图书"; // 创建分类数据集 DefaultXYZDataset dataset = new DefaultXYZDataset(); double data1 [] [] = new double[][] {{600}, {10}, {600/(10*10)}}; double data2 [] [] = new double[][] {{650}, {10}, {650/(10*10)}}; double data3 [] [] = new double[][] {{800}, {16}, {800/(16*10)}}; dataset.addSeries(series1, data1); dataset.addSeries(series2, data2); dataset.addSeries(series3, data3); return dataset; } /** * 生成JFreeChart * * @return */ private JFreeChart getJFreeChart() { XYZDataset dataset = getXYZDataset(); JFreeChart chart = ChartFactory.createBubbleChart("2010年上半年销售量", // 图表标题 "页数", // x轴标签 "chapter", // y轴标签 dataset, // 数据集 PlotOrientation.VERTICAL, // 图表方向:水平、垂直 true, // 是否显示图例 false, // 是否生成工具 false // 是否生成URL链接 ); return chart; } /** * 修改字体 * * @param chart */ private void updateFont(JFreeChart chart) { // 标题 TextTitle textTitle = chart.getTitle(); textTitle.setFont(new Font("宋体", Font.PLAIN, 20)); //图示 LegendTitle legendTitle = chart.getLegend(); legendTitle.setItemFont(new Font("宋体", Font.PLAIN, 14)); XYPlot plot = chart.getXYPlot(); //设置X轴字体 NumberAxis numberAxis = (NumberAxis) plot.getDomainAxis(); numberAxis.setLabelFont(new Font("宋体", Font.PLAIN, 14)); } /** * 设置图表 * * @param chart */ public void createPlot() { JFreeChart chart = getJFreeChart(); // 修改字体 updateFont(chart); setContentPane(new ChartPanel(chart)); } public static void main(String[] args) { BubbleDemo2 demo = new BubbleDemo2("气泡图"); demo.createPlot(); demo.pack(); // 把窗体显示到显示器中央 RefineryUtilities.centerFrameOnScreen(demo); // 设置可以显示 demo.setVisible(true); } }
[ "renkaigis@163.com" ]
renkaigis@163.com
06e831d9c80e0bbcf7d7ced2d35407b2876321d4
fed41971c78ff70c701d754cfd023e3ea671ee85
/gd-task-web/src/main/java/com/gudeng/commerce/gd/task/converter/DateConverterBase.java
dd505bbba4b969754b1172898e310a13ca2a9773
[]
no_license
f3226912/gd
204647c822196b52513e5f0f8e475b9d47198d2a
882332a9da91892a38e38443541d93ddd91c7fec
refs/heads/master
2021-01-19T06:47:44.052835
2017-04-07T03:42:12
2017-04-07T03:42:12
87,498,686
0
6
null
null
null
null
UTF-8
Java
false
false
924
java
/** * */ package com.gudeng.commerce.gd.task.converter; import java.text.DateFormat; import java.text.SimpleDateFormat; /** * */ public class DateConverterBase { private String datePattern = "yyyy-MM-dd"; private String timePattern = "HH:mm:ss"; private DateFormat dateFormat = new SimpleDateFormat(datePattern); private DateFormat dateTimeFormat = new SimpleDateFormat(datePattern + " " + timePattern); public DateFormat getDateFormat() { return dateFormat; } public void setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; } /** * @return the dateTimeFormat */ public DateFormat getDateTimeFormat() { return dateTimeFormat; } /** * @param dateTimeFormat the dateTimeFormat to set */ public void setDateTimeFormat(DateFormat dateTimeFormat) { this.dateTimeFormat = dateTimeFormat; } }
[ "253332973@qq.com" ]
253332973@qq.com
d68872c076ab423a5e90e56593cb309ac7a61070
2dbbb7ff2a3f12523f5970288b5ab2eedf18bc13
/project2/src/main/java/project2/app/server/service/aaaboundedcontext/authentication/UserAccessLevelService.java
f098fac01f1a1e9f55ad02dc82c05d6daf2b8a70
[]
no_license
applifireAlgo/DefaultRepo
6582660a37c2c5f47cc9df2838fdacf21eb8693a
38ed513a1b33ed842be655b77d6c2b151d83d3e8
refs/heads/master
2020-12-22T02:49:43.475101
2016-06-03T13:29:34
2016-06-03T13:29:34
42,858,818
0
1
null
2016-03-10T18:11:36
2015-09-21T10:10:13
null
UTF-8
Java
false
false
1,978
java
package project2.app.server.service.aaaboundedcontext.authentication; import com.athena.annotation.Complexity; import com.athena.annotation.SourceCodeAuthorClass; import com.athena.framework.server.bean.ResponseBean; import com.athena.framework.server.exception.repository.SpartanPersistenceException; import org.springframework.http.HttpEntity; import com.athena.framework.server.exception.repository.SpartanTransactionException; import java.util.List; import project2.app.shared.aaaboundedcontext.authentication.UserAccessLevel; import com.athena.framework.server.bean.FindByBean; @SourceCodeAuthorClass(createdBy = "sagarjdhv2014@gmail.com", updatedBy = "", versionNumber = "1", comments = "Service for UserAccessLevel Master table Entity", complexity = Complexity.LOW) public abstract class UserAccessLevelService { public HttpEntity<ResponseBean> findAll() throws Exception, SpartanPersistenceException { return null; } public HttpEntity<ResponseBean> save(UserAccessLevel entity) throws Exception, SpartanTransactionException, SpartanPersistenceException { return null; } public HttpEntity<ResponseBean> save(List<UserAccessLevel> entity, boolean isArray) throws Exception, SpartanTransactionException, SpartanPersistenceException { return null; } public HttpEntity<ResponseBean> delete(String id) throws SpartanTransactionException, SpartanPersistenceException, Exception { return null; } public HttpEntity<ResponseBean> update(UserAccessLevel entity) throws SpartanTransactionException, SpartanPersistenceException, Exception { return null; } public HttpEntity<ResponseBean> update(List<UserAccessLevel> entity, boolean isArray) throws SpartanTransactionException, SpartanPersistenceException, Exception { return null; } public HttpEntity<ResponseBean> findById(FindByBean findByBean) throws SpartanPersistenceException, Exception { return null; } }
[ "viral.patel@algorhythm.co.in" ]
viral.patel@algorhythm.co.in
af7daf327e4a0dc6a96dfe6e4c1ac4e94262d778
c8688db388a2c5ac494447bac90d44b34fa4132c
/sources/com/google/android/gms/internal/ads/v30.java
be7d0d7b1508e74a83dfdcee3c6f7b389c255d93
[]
no_license
mred312/apk-source
98dacfda41848e508a0c9db2c395fec1ae33afa1
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
refs/heads/master
2023-03-06T05:53:50.863721
2021-02-23T13:34:20
2021-02-23T13:34:20
341,481,669
0
0
null
null
null
null
UTF-8
Java
false
false
942
java
package com.google.android.gms.internal.ads; import java.util.concurrent.Delayed; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; /* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */ final class v30<V> extends zzdyp<V> implements zzdyz<V>, ScheduledFuture<V> { /* renamed from: b */ private final ScheduledFuture<?> f11467b; public v30(zzdyz<V> zzdyz, ScheduledFuture<?> scheduledFuture) { super(zzdyz); this.f11467b = scheduledFuture; } public final boolean cancel(boolean z) { boolean cancel = super.cancel(z); if (cancel) { this.f11467b.cancel(z); } return cancel; } public final /* synthetic */ int compareTo(Object obj) { return this.f11467b.compareTo((Delayed) obj); } public final long getDelay(TimeUnit timeUnit) { return this.f11467b.getDelay(timeUnit); } }
[ "mred312@gmail.com" ]
mred312@gmail.com
72cfe9fc67980cf6c74d9f7a1055d56177b1d833
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_b3d6832c0a12f29f053ec01adc7b438cd114fb16/CheckHttpAction/1_b3d6832c0a12f29f053ec01adc7b438cd114fb16_CheckHttpAction_s.java
e350321d41fdb27e96070dea9fdc061eeb669c55
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,701
java
/* * DefaultAction.java * * Created on 09 August 2006, 15:09 * * Marin JavaTips. A set of miscellaneous source code for training * and educational purposes. * * Copyright (C) 2006 Roger Hughes * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ package com.captaindebug.statemachine.tweettohtml; import java.io.ByteArrayOutputStream; import java.io.OutputStream; import com.captaindebug.statemachine.AbstractAction; /** * This action captures a group of characters that are space terminated * * @author Roger * @Date April 2012 */ public class CheckHttpAction extends AbstractAction<TweetState> { private static final String CHECK = "ttp://"; private int pos; private final ByteArrayOutputStream tagStream; private final byte[] buf; public CheckHttpAction(OutputStream os) { super(os); tagStream = new ByteArrayOutputStream(); buf = new byte[1]; } /** * Process a byte using this action * * @param b * The byte to process * @param currentState * The current state of the state machine */ @Override public TweetState processByte(byte b, TweetState currentState) throws Exception { TweetState retVal = currentState; if (CHECK.charAt(pos++) != b) { retVal = returnToRunning(b); } else if (pos == CHECK.length()) { retVal = TweetState.URL; reset(); // fix 1 } else { buf[0] = b; tagStream.write(buf); } return retVal; } private TweetState returnToRunning(byte b) throws Exception { writeByte('h'); os.write(tagStream.toByteArray()); writeByte(b); return TweetState.RUNNING; } /** * Reset the object ready for processing */ public void reset() { pos = 0; // fix 1 tagStream.reset(); } @Override public void terminate(TweetState state) throws Exception { returnToRunning((byte) ' '); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fd335f8a4592763a4e3ec63fbec3fddef3b15386
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/e/a/hs$a.java
3aa43ec0dd92019964864f5a3f0c76b80ba1e6fa
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
205
java
package com.tencent.mm.e.a; public final class hs$a { public int position; } /* Location: * Qualified Name: com.tencent.mm.e.a.hs.a * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
4d3e707bffaddfb9e986f3915335060261e49892
8a47f57c1f0c029f1cd94a2c48c7fa68ec7d2e6a
/src/main/java/com/shimizukenta/secs/secs1/Secs1NotReceiveNextBlockEnqCircuitControlLog.java
f3bff2f850a274e6050f7afa8187fd8172688721
[ "Apache-2.0" ]
permissive
prliu/secs4java8
5caf5fe0ac03f9665420aa1c39869d5e045e9c37
aa36d26a55d1063d0c4c8f075a7dd21acc076db3
refs/heads/master
2021-07-01T06:27:37.399412
2021-06-17T13:07:16
2021-06-17T13:07:16
231,622,467
0
0
Apache-2.0
2020-01-03T16:14:45
2020-01-03T16:14:45
null
UTF-8
Java
false
false
1,593
java
package com.shimizukenta.secs.secs1; import java.time.LocalDateTime; public final class Secs1NotReceiveNextBlockEnqCircuitControlLog extends AbstractSecs1CircuitControlLog { private static final long serialVersionUID = 5993834362626837734L; private final Secs1MessageBlock prevBlock; private final byte recv; private Secs1NotReceiveNextBlockEnqCircuitControlLog(CharSequence subject, LocalDateTime timestamp, Secs1MessageBlock block, byte recv) { super(subject, timestamp, block); this.prevBlock = block; this.recv = recv; } private Secs1NotReceiveNextBlockEnqCircuitControlLog(CharSequence subject, Secs1MessageBlock block, byte recv) { super(subject, block); this.prevBlock = block; this.recv = recv; } public Secs1MessageBlock previousMessageBlock() { return this.prevBlock; } public byte receiveByte() { return this.recv; } private static final String commonSubjectHeader = "SECS1-Circuit-Control Not receive Next-Block-ENQ receive="; private static String createSubject(byte b) { return commonSubjectHeader + String.format("%02X", b); } public static Secs1NotReceiveNextBlockEnqCircuitControlLog newInstance(Secs1MessageBlock block, byte recv) { return new Secs1NotReceiveNextBlockEnqCircuitControlLog(createSubject(recv), block, recv); } public static Secs1NotReceiveNextBlockEnqCircuitControlLog newInstance(Secs1MessageBlock block, byte recv, LocalDateTime timestamp) { return new Secs1NotReceiveNextBlockEnqCircuitControlLog(createSubject(recv), timestamp, block, recv); } }
[ "shimizukentagm1@gmail.com" ]
shimizukentagm1@gmail.com
70079ccb1398bac02aa1b18cc75f9b3e3e200e77
35029f02d7573415d6fc558cfeeb19c7bfa1e3cc
/gs-accessing-data-jpa-complete/src/main/java/hello/model/Customer1333.java
acdbd49838ebd4b5f672fd1fb74f857607f1e463
[]
no_license
MirekSz/spring-boot-slow-startup
e06fe9d4f3831ee1e79cf3735f6ceb8c50340cbe
3b1e9e4ebd4a95218b142b7eb397d0eaa309e771
refs/heads/master
2021-06-25T22:50:21.329236
2017-02-19T19:08:24
2017-02-19T19:08:24
59,591,530
0
2
null
null
null
null
UTF-8
Java
false
false
711
java
package hello.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class Customer1333 { @Id @GeneratedValue(strategy=GenerationType.AUTO) private long id; private String firstName; private String lastName; protected Customer1333() {} public Customer1333(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } @Override public String toString() { return String.format( "Customer1333[id=%d, firstName='%s', lastName='%s']", id, firstName, lastName); } }
[ "miro1994" ]
miro1994
4b3cfe6c02aa3d9899838669e1c8c29139e554d9
61b761abe9084d83f7ffa0d2258ba5a626148623
/Android/replicaisland/src/com/replica/replicaisland/PlaySingleSoundComponent.java
0677f03f0a34622548a74d47fea7afa21dfe0508
[ "Apache-2.0" ]
permissive
mohd874/Projects
0503af6cf878dae3d2a2bb3a9eba4a8d49b499ba
3c94825d0a02435c098756f77a06a0d89f050c67
refs/heads/master
2020-05-02T05:51:25.009161
2013-01-17T08:28:32
2013-01-17T08:28:32
5,868,669
0
1
null
null
null
null
UTF-8
Java
false
false
1,346
java
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.replica.replicaisland; public class PlaySingleSoundComponent extends GameComponent { private SoundSystem.Sound mSound; private int mSoundHandle; public PlaySingleSoundComponent() { super(); reset(); setPhase(ComponentPhases.THINK.ordinal()); } @Override public void reset() { mSoundHandle = -1; mSound = null; } public void setSound(SoundSystem.Sound sound) { mSound = sound; } @Override public void update(float timeDelta, BaseObject parent) { if (mSoundHandle == -1 && mSound != null) { SoundSystem sound = sSystemRegistry.soundSystem; mSoundHandle = sound.play(mSound, false, SoundSystem.PRIORITY_NORMAL); } } }
[ "mohd874@gmail.com" ]
mohd874@gmail.com
ebd577f5fe6d6956b66e4757884a9912626d92dd
54ff3b57310dc76e7961b6afc156023252a310d3
/ch16/src/main/java/cn/cxy/shiro/ch16/web/controller/ResourceController.java
a660c6722d09bfc472821547254b79139ea68c50
[]
no_license
yangcxx/shiro_zkt
b6a603d66b0a2c92743cc70e66abb19171fedfb0
5df42dd4d1d5351eb65d957058023cde6d024757
refs/heads/master
2021-06-19T13:25:55.285982
2017-07-04T08:35:16
2017-07-04T08:35:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
887
java
package cn.cxy.shiro.ch16.web.controller; import cn.cxy.shiro.ch16.service.ResourceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; /** * Function: TODO * Reason: TODO ADD REASON(可选).</br> * Date: 2017/6/27 17:14 </br> * * @author: cx.yang * @since: Thinkingbar Web Project 1.0 */ @Controller @RequestMapping(value = "/resource/") public class ResourceController { @Autowired private ResourceService resourceService; @RequestMapping(value = "list",method = RequestMethod.POST) public String list(Model model){ model.addAttribute("resourceList",resourceService.findAll()); return "resource/list"; } }
[ "charlesyoung0811@gmail.com" ]
charlesyoung0811@gmail.com
e01f9fbce85a147d4e532d7912ffa6bfb74bb499
0e7f18f5c03553dac7edfb02945e4083a90cd854
/src/main/resources/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/routines/PgStatGetTuplesHotUpdated.java
c95f2bda6a8bf32ef69d0a2d450686629d7d02e1
[]
no_license
brunomathidios/PostgresqlWithDocker
13604ecb5506b947a994cbb376407ab67ba7985f
6b421c5f487f381eb79007fa8ec53da32977bed1
refs/heads/master
2020-03-22T00:54:07.750044
2018-07-02T22:20:17
2018-07-02T22:20:17
139,271,591
0
0
null
null
null
null
UTF-8
Java
false
true
1,772
java
/* * This file is generated by jOOQ. */ package com.br.sp.posgresdocker.model.jooq.pg_catalog.routines; import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.impl.AbstractRoutine; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.11.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class PgStatGetTuplesHotUpdated extends AbstractRoutine<Long> { private static final long serialVersionUID = 166208101; /** * The parameter <code>pg_catalog.pg_stat_get_tuples_hot_updated.RETURN_VALUE</code>. */ public static final Parameter<Long> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BIGINT, false, false); /** * The parameter <code>pg_catalog.pg_stat_get_tuples_hot_updated._1</code>. */ public static final Parameter<Long> _1 = createParameter("_1", org.jooq.impl.SQLDataType.BIGINT, false, true); /** * Create a new routine call instance */ public PgStatGetTuplesHotUpdated() { super("pg_stat_get_tuples_hot_updated", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.BIGINT); setReturnParameter(RETURN_VALUE); addInParameter(_1); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(Long value) { setValue(_1, value); } /** * Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__1(Field<Long> field) { setField(_1, field); } }
[ "brunomathidios@yahoo.com.br" ]
brunomathidios@yahoo.com.br
15f1d686b95fae6a1f597cc5de660ab21e9b24bf
6b038176fab4187e7d96f6aa752b1f3ad8e74de0
/messages-api/src/main/java/pl/zankowski/fixparser/messages/api/FixVersion.java
f7d956858a6f4244cf2a94ccc553f3183feb24fc
[ "Apache-2.0" ]
permissive
OpenBlazar/fix-parser-messages
e5a523818f0eed019891362e392a84fdecd31cf8
4224aa97b2312c6e7d385558443422e07526b49f
refs/heads/master
2021-06-19T10:54:24.951892
2020-08-30T13:20:53
2020-08-30T13:20:53
208,515,531
0
0
Apache-2.0
2021-04-26T19:44:35
2019-09-14T23:19:07
Java
UTF-8
Java
false
false
639
java
package pl.zankowski.fixparser.messages.api; public enum FixVersion { FIX_40("FIX.4.0"), FIX_41("FIX.4.1"), FIX_42("FIX.4.2"), FIX_43("FIX.4.3"), FIX_44("FIX.4.4"), FIX_50("FIXT.1.1"), UNKNOWN(""); private String code; FixVersion(final String code) { this.code = code; } public static FixVersion getFixVersionFromCode(String code) { for (final FixVersion version : values()) { if (version.getCode().equals(code)) { return version; } } return UNKNOWN; } public String getCode() { return code; } }
[ "info@zankowski.pl" ]
info@zankowski.pl
bf9f83df0d1013c767cb6bc6e2f72cea0a706355
17f541fcde1a485b9b80065b3a66be0bd3cfce45
/src/main/java/org/jensoft/core/plugin/stock/geom/VolumeBarGeometry.java
2be3193bcc902e8f242b7004b6ae1bfb12497ece
[]
no_license
wyrover/jensoft-core
6a3285346fd7aaa69e7ef4e99266eee581e02db6
87eba8fd035694cebcaeeb8ae2257010c4706296
refs/heads/master
2020-04-11T06:11:22.006038
2017-05-28T22:17:06
2017-05-28T22:17:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
887
java
/* * Copyright (c) JenSoft API * This source file is part of JenSoft API, All rights reserved. * JENSOFT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org.jensoft.core.plugin.stock.geom; import java.awt.geom.Rectangle2D; public class VolumeBarGeometry extends StockItemGeometry { private Rectangle2D deviceVolumeGap; public VolumeBarGeometry() { } public Rectangle2D getDeviceVolumeGap() { return deviceVolumeGap; } public void setDeviceVolumeGap(Rectangle2D deviceVolumeGap) { this.deviceVolumeGap = deviceVolumeGap; } @Override public void solveGeometry() { super.solveGeometry(); Rectangle2D deviceVolumeGap = new Rectangle2D.Double(getDeviceFixingStart(), getDeviceVolume().getY(), getDeviceFixingDuration(), Math.abs(getDeviceVolume().getY() - getDeviceVolumeBase().getY())); setDeviceVolumeGap(deviceVolumeGap); } }
[ "matthieu@sd-55273.dedibox.fr" ]
matthieu@sd-55273.dedibox.fr
fe525a36919404af5d582f816119ef8f889bb785
0e06e096a9f95ab094b8078ea2cd310759af008b
/classes11-dex2jar/com/google/android/gms/common/internal/zzk.java
63f0ca62d62c83e3e675361e88796d495da1aad7
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
954
java
// // Decompiled by Procyon v0.5.34 // package com.google.android.gms.common.internal; import android.os.RemoteException; import android.os.Parcel; import com.google.android.gms.dynamic.IObjectWrapper; import android.os.IBinder; import com.google.android.gms.internal.common.zza; public final class zzk extends zza implements zzi { zzk(final IBinder binder) { super(binder, "com.google.android.gms.common.internal.ICertData"); } @Override public final IObjectWrapper zzb() throws RemoteException { final Parcel zza = this.zza(1, this.zza()); final IObjectWrapper interface1 = IObjectWrapper.Stub.asInterface(zza.readStrongBinder()); zza.recycle(); return interface1; } @Override public final int zzc() throws RemoteException { final Parcel zza = this.zza(2, this.zza()); final int int1 = zza.readInt(); zza.recycle(); return int1; } }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
e5f51b7d3e34ab60476b77fa716ef7017b67e6be
9623f83defac3911b4780bc408634c078da73387
/powercraft/src/common/net/minecraft/src/BlockContainer.java
d7a28e2ec30428375855291bcdf89d6a9d69a6d3
[]
no_license
BlearStudio/powercraft-legacy
42b839393223494748e8b5d05acdaf59f18bd6c6
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
refs/heads/master
2021-01-21T21:18:55.774908
2015-04-06T20:45:25
2015-04-06T20:45:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,509
java
package net.minecraft.src; public abstract class BlockContainer extends Block { protected BlockContainer(int par1, Material par2Material) { super(par1, par2Material); this.isBlockContainer = true; } protected BlockContainer(int par1, int par2, Material par3Material) { super(par1, par2, par3Material); this.isBlockContainer = true; } public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); par1World.setBlockTileEntity(par2, par3, par4, this.createTileEntity(par1World, par1World.getBlockMetadata(par2, par3, par4))); } public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) { super.breakBlock(par1World, par2, par3, par4, par5, par6); par1World.removeBlockTileEntity(par2, par3, par4); } public abstract TileEntity createNewTileEntity(World var1); public TileEntity createNewTileEntity(World world, int metadata) { return createNewTileEntity(world); } public void onBlockEventReceived(World par1World, int par2, int par3, int par4, int par5, int par6) { super.onBlockEventReceived(par1World, par2, par3, par4, par5, par6); TileEntity var7 = par1World.getBlockTileEntity(par2, par3, par4); if (var7 != null) { var7.receiveClientEvent(par5, par6); } } }
[ "rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c" ]
rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
79caa59dd80155e107d01da580fbd46ab3797f67
fdd66b0a5582831cb00d114a4a0fb82f5c16db40
/src/test/java/com/vytrack/step_definitions/LoginStepDefs.java
d216bed84d17cbded2989ccec3a7fe031b78bc1b
[]
no_license
hamedjan1/summer-2019-local-cucumber-selenium
be4a959110d4c4822fbeaf7f07c9c5dc8f0fb085
ed23f51dc1107148703726b8c410faf6bddfe7e1
refs/heads/master
2020-11-27T09:10:13.008387
2019-12-20T22:05:10
2019-12-20T22:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,319
java
package com.vytrack.step_definitions; import com.vytrack.pages.LoginPage; import com.vytrack.utilities.BrowserUtils; import com.vytrack.utilities.ConfigurationReader; import com.vytrack.utilities.Driver; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; import org.junit.Assert; public class LoginStepDefs { @Then("the user should be able to login") public void the_user_should_be_able_to_login() { System.out.println("Verifying that user is logged in"); BrowserUtils.waitFor(2); String actualTitle = Driver.get().getTitle(); Assert.assertEquals("Dashboard", actualTitle); } @Given("the user is on the login page") public void the_user_is_on_the_login_page() { System.out.println("Opening the login page"); // Driver.get() --> this gets the webdriver // Driver.get() === driver String url = ConfigurationReader.get("url"); Driver.get().get(url); } @When("the users enters the driver information") public void the_users_enters_the_driver_information() { System.out.println("Entering driver login info"); String dUsername = ConfigurationReader.get("driver_username"); String dPassword = ConfigurationReader.get("driver_password"); LoginPage loginPage = new LoginPage(); loginPage.login(dUsername, dPassword); } @When("the user enters the sales manager information") public void the_user_enters_the_sales_manager_information() { System.out.println("Entering sales manager login info"); String sUsername = ConfigurationReader.get("sales_manager_username"); String sPassword = ConfigurationReader.get("sales_manager_password"); LoginPage loginPage = new LoginPage(); loginPage.login(sUsername, sPassword); } @When("the user enters the store manager information") public void the_user_enters_the_store_manager_information() { System.out.println("Entering store manager login info"); String sUsername = ConfigurationReader.get("store_manager_username"); String sPassword = ConfigurationReader.get("store_manager_password"); LoginPage loginPage = new LoginPage(); loginPage.login(sUsername, sPassword); } }
[ "github@cybertekschool.com" ]
github@cybertekschool.com
7c2c819367208aed03acf0594c860a17f9f5000c
4f4ddc396fa1dfc874780895ca9b8ee4f7714222
/src/java/gjt/StateButtonController.java
d6fc83830a69c1e35160e017827163983f336c9d
[]
no_license
UtsavChokshiCNU/GenSym-Test2
3214145186d032a6b5a7486003cef40787786ba0
a48c806df56297019cfcb22862dd64609fdd8711
refs/heads/master
2021-01-23T23:14:03.559378
2017-09-09T14:20:09
2017-09-09T14:20:09
102,960,203
3
5
null
null
null
null
UTF-8
Java
false
false
829
java
package gjt; import java.awt.Event; /** * A controller for a StateButton, that cycles through a * series of images which reside in the StateButton class. * Each time a mouse up is detected in the StateButton, the * buttons image is set to the next image in the array. * * @version 1.0, Apr 1 1996 * @author David Geary * @see StateButton * @see SpringyImageButtonController * @see gjt.test.StateButtonTest */ class StateButtonController extends SpringyImageButtonController { public StateButtonController(StateButton button) { super(button); } public boolean mouseUp(Event event, int x, int y) { StateButton button = (StateButton)getButton(); button.setImage(button.nextImage()); activateButton(event); return super.mouseUp(event, x, y); } }
[ "utsavchokshi@Utsavs-MacBook-Pro.local" ]
utsavchokshi@Utsavs-MacBook-Pro.local
479d4c13b450a3d3b556507f9662d2ca0e113a31
ca3fcb5e4e5a18cbcf85155b04aaf6820f29fd5a
/src/main/java/com/midas/business/user/web/UserController.java
441a7a8a05032a92b429beab60ce02d935d6d53d
[]
no_license
caixiaowei08/wechat-usa-overseas-shopping-exhibition
c1b4eb3bf4ed58d18546c0d8dabad1b0a81fb5b8
605d0ae2801c7fa8ead3bb1f1c272ac5d8ece516
refs/heads/master
2021-07-14T14:29:44.201439
2017-10-18T07:20:21
2017-10-18T07:20:21
103,486,798
0
0
null
null
null
null
UTF-8
Java
false
false
968
java
package com.midas.business.user.web; import com.midas.business.user.entity.UserEntity; import com.midas.business.user.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * Created by User on 2017/9/13. */ @RestController @RequestMapping("/userController") public class UserController { @Autowired private UserService userService; @GetMapping("/findUserPagingQuery") public List<UserEntity> findUserPagingQuery( UserEntity userEntity, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize ) { return userService.findAll(userEntity, pageNum, pageSize); } }
[ "caixiaowei08@163.com" ]
caixiaowei08@163.com
45d87c21a57ca0e358abfe7e84354ba9593c94ba
b03e73ff19caff0eef688ebc651de913c67592c0
/2018.2/IA/Projeto/weka_source_from_jdcore/weka/experiment/RemoteEngine_Stub.java
b87f33f965e239952d71e112d49999da76361595
[]
no_license
fiorentinogiuseppe/Projetos_UFRPE
51a577680909979c9728ff71520b497b1d8e11e8
52d5fb74648e5221d455cbb5faf3f2c8ac2c0c64
refs/heads/master
2020-12-09T05:52:39.522462
2020-01-16T10:35:28
2020-01-16T10:35:28
233,209,784
0
0
null
null
null
null
UTF-8
Java
false
false
4,546
java
package weka.experiment; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.lang.reflect.Method; import java.rmi.MarshalException; import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.UnexpectedException; import java.rmi.UnmarshalException; import java.rmi.server.Operation; import java.rmi.server.RemoteCall; import java.rmi.server.RemoteObject; import java.rmi.server.RemoteRef; import java.rmi.server.RemoteStub; public final class RemoteEngine_Stub extends RemoteStub implements Compute, Remote { private static final Operation[] operations = { new Operation("java.lang.Object checkStatus(java.lang.Object)"), new Operation("java.lang.Object executeTask(weka.experiment.Task)") }; private static final long interfaceHash = -8065814382466137525L; private static final long serialVersionUID = 2L; private static boolean useNewInvoke; private static Method $method_checkStatus_0; private static Method $method_executeTask_1; static { try { RemoteRef.class.getMethod("invoke", new Class[] { Remote.class, Method.class, new Objec[0].getClass(), Long.TYPE }); useNewInvoke = true; $method_checkStatus_0 = Compute.class.getMethod("checkStatus", new Class[] { Object.class }); $method_executeTask_1 = Compute.class.getMethod("executeTask", new Class[] { Task.class }); } catch (NoSuchMethodException localNoSuchMethodException) { useNewInvoke = false; } } public RemoteEngine_Stub() {} public RemoteEngine_Stub(RemoteRef paramRemoteRef) { super(paramRemoteRef); } public Object checkStatus(Object paramObject) throws Exception { if (useNewInvoke) { localObject1 = ref.invoke(this, $method_checkStatus_0, new Object[] { paramObject }, 8527603492100504454L); return localObject1; } Object localObject1 = ref.newCall(this, operations, 0, -8065814382466137525L); try { ObjectOutput localObjectOutput = ((RemoteCall)localObject1).getOutputStream(); localObjectOutput.writeObject(paramObject); } catch (IOException localIOException1) { throw new MarshalException("error marshalling arguments", localIOException1); } ref.invoke((RemoteCall)localObject1); Object localObject2; try { ObjectInput localObjectInput = ((RemoteCall)localObject1).getInputStream(); localObject2 = localObjectInput.readObject(); } catch (IOException localIOException2) { throw new UnmarshalException("error unmarshalling return", localIOException2); } catch (ClassNotFoundException localClassNotFoundException) { throw new UnmarshalException("error unmarshalling return", localClassNotFoundException); } finally { ref.done((RemoteCall)localObject1); } return localObject2; } public Object executeTask(Task paramTask) throws RemoteException { try { if (useNewInvoke) { localObject1 = ref.invoke(this, $method_executeTask_1, new Object[] { paramTask }, 3272821424511182813L); return localObject1; } Object localObject1 = ref.newCall(this, operations, 1, -8065814382466137525L); try { ObjectOutput localObjectOutput = ((RemoteCall)localObject1).getOutputStream(); localObjectOutput.writeObject(paramTask); } catch (IOException localIOException1) { throw new MarshalException("error marshalling arguments", localIOException1); } ref.invoke((RemoteCall)localObject1); Object localObject2; try { ObjectInput localObjectInput = ((RemoteCall)localObject1).getInputStream(); localObject2 = localObjectInput.readObject(); } catch (IOException localIOException2) { throw new UnmarshalException("error unmarshalling return", localIOException2); } catch (ClassNotFoundException localClassNotFoundException) { throw new UnmarshalException("error unmarshalling return", localClassNotFoundException); } finally { ref.done((RemoteCall)localObject1); } return localObject2; } catch (RuntimeException localRuntimeException) { throw localRuntimeException; } catch (RemoteException localRemoteException) { throw localRemoteException; } catch (Exception localException) { throw new UnexpectedException("undeclared checked exception", localException); } } }
[ "fiorentinogiuseppebcc@gmail.com" ]
fiorentinogiuseppebcc@gmail.com
68af5421aa9367d2032846d1f23f24300ae66a53
59d56ad52a7e016883b56b73761104a17833a453
/src/main/java/com/whatever/ApparatusService/SearchBySideEffectName.java
5c127424f3ca883934e7543a5900c6d0ab230063
[]
no_license
zapho/cxf-client-quarkus
3c330a3a5f370cce21c5cd1477ffbe274d1bba59
6e147d44b9ea9cc455d52f0efe234ef787b336c4
refs/heads/master
2023-01-22T03:33:27.579072
2020-12-08T14:55:27
2020-12-08T14:55:27
319,641,033
0
0
null
null
null
null
UTF-8
Java
false
false
1,486
java
package com.whatever.ApparatusService; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Classe Java pour anonymous complex type. * * <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "name" }) @XmlRootElement(name = "searchBySideEffectName") public class SearchBySideEffectName { @XmlElement(required = true, nillable = true) protected String name; /** * Obtient la valeur de la propriété name. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Définit la valeur de la propriété name. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } }
[ "fabrice.aupert@dedalus-group.com" ]
fabrice.aupert@dedalus-group.com
37c676aba214f10d5b8ddd90992ff0b82ef4e1cd
4368402d5965df4e7836004574911de4f52c0ea9
/product-service/src/main/java/net/shyshkin/study/cqrs/estore/productservice/command/rest/CreateProductRestModel.java
a7bd3a3672dc794264d94f6f2b7bb46ca43fb7aa
[]
no_license
anupamguin/art-kargopolov-cqrs-saga-axon-microservices
a25cb28f5746c2d95b04a3fda52e567349222dc4
2b6de35a6c7f037eff61783c24931eba1f2a0488
refs/heads/master
2023-05-11T22:22:38.429057
2021-06-01T12:35:23
2021-06-01T12:35:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
773
java
package net.shyshkin.study.cqrs.estore.productservice.command.rest; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; import java.math.BigDecimal; @Data @NoArgsConstructor @AllArgsConstructor @Builder public class CreateProductRestModel { @NotBlank(message = "Product title is a required field") private String title; @Min(value = 1, message = "Price can not be lower then 1") private BigDecimal price; @Min(value = 1, message = "Quantity can not lower then 1") @Max(value = 5, message = "Quantity can not larger then 5") private Integer quantity; }
[ "d.art.shishkin@gmail.com" ]
d.art.shishkin@gmail.com
b7e244a86c9b22618d16bc63186cc09df5b14de1
be3169c6835017b8979f23656b952f345bab5af6
/plover/core/plover-arch/src/main/java/com/bee32/plover/inject/util/NameQualifierPreorder.java
fc9d209f43bae5dc69142cc62988d7d7654ab831
[]
no_license
lenik/stack
5ca08d14a71e661f1d5007ba756eff264716f3a3
a69e2719d56d08a410c19cc73febf0f415d8d045
refs/heads/master
2023-07-10T10:54:14.351577
2017-07-23T00:10:15
2017-07-23T00:12:33
395,319,044
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
package com.bee32.plover.inject.util; import javax.free.IPreorder; import javax.free.PackageNamePreorder; public class NameQualifierPreorder extends QualifierPreorder<String> { private final IPreorder<String> proxy = PackageNamePreorder.getInstance(); @Override public int compare(String a, String b) { return proxy.compare(a, b); } @Override public String getPreceding(String qualifier) { return proxy.getPreceding(qualifier); } @Override public int precompare(String a, String b) { return proxy.precompare(a, b); } private static final NameQualifierPreorder instance = new NameQualifierPreorder(); public static NameQualifierPreorder getInstance() { return instance; } }
[ "xjl@99jsj.com" ]
xjl@99jsj.com
7849a64182f5229fd9c99b7b859620e0aedb6a9a
c94f888541c0c430331110818ed7f3d6b27b788a
/blockchain/java/src/main/java/com/antgroup/antchain/openapi/blockchain/models/CreateLogisticFinanceDisRequest.java
f4f9af29524b2aa48922884812768caf173fdee7
[ "Apache-2.0", "MIT" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
2,042
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.blockchain.models; import com.aliyun.tea.*; public class CreateLogisticFinanceDisRequest extends TeaModel { // OAuth模式下的授权token @NameInMap("auth_token") public String authToken; @NameInMap("product_instance_id") public String productInstanceId; // 扩展字段 @NameInMap("extend") public String extend; // 是否为他人代理申请分布式数字身份,缺省时为自己创建分布式数字身份 @NameInMap("is_agent") public Boolean isAgent; // 用户(企业)名称 @NameInMap("user_name") @Validation(required = true) public String userName; public static CreateLogisticFinanceDisRequest build(java.util.Map<String, ?> map) throws Exception { CreateLogisticFinanceDisRequest self = new CreateLogisticFinanceDisRequest(); return TeaModel.build(map, self); } public CreateLogisticFinanceDisRequest setAuthToken(String authToken) { this.authToken = authToken; return this; } public String getAuthToken() { return this.authToken; } public CreateLogisticFinanceDisRequest setProductInstanceId(String productInstanceId) { this.productInstanceId = productInstanceId; return this; } public String getProductInstanceId() { return this.productInstanceId; } public CreateLogisticFinanceDisRequest setExtend(String extend) { this.extend = extend; return this; } public String getExtend() { return this.extend; } public CreateLogisticFinanceDisRequest setIsAgent(Boolean isAgent) { this.isAgent = isAgent; return this; } public Boolean getIsAgent() { return this.isAgent; } public CreateLogisticFinanceDisRequest setUserName(String userName) { this.userName = userName; return this; } public String getUserName() { return this.userName; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
0444ed3de1217e220838c6dff28bdee3f8ff1f43
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/src/net/datenwerke/gxtdto/client/forms/layout/FormFieldLayoutConfiguration.java
17a357d566b6f2af41a2c2142ecf8fbaa9c30fb6
[]
no_license
bireports/ReportServer
da979eaf472b3e199e6fbd52b3031f0e819bff14
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
refs/heads/master
2020-04-18T10:18:56.181123
2019-01-25T00:45:14
2019-01-25T00:45:14
167,463,795
0
0
null
null
null
null
UTF-8
Java
false
false
3,824
java
/* * ReportServer * Copyright (c) 2018 InfoFabrik GmbH * http://reportserver.net/ * * * This file is part of ReportServer. * * ReportServer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.datenwerke.gxtdto.client.forms.layout; import com.google.gwt.safehtml.shared.SafeHtml; import com.sencha.gxt.widget.core.client.container.MarginData; import com.sencha.gxt.widget.core.client.form.FormPanel.LabelAlign; public class FormFieldLayoutConfiguration { private boolean hasLabel = true; private int labelWidth = 180; private LabelAlign labelAlign = LabelAlign.TOP; private String labelText; private SafeHtml labelHtml; private MarginData marginData = new MarginData(0); private double fieldWidth = 1; private double fieldHeight = -1; public FormFieldLayoutConfiguration() { } public FormFieldLayoutConfiguration(String text){ this.labelText = text; } public FormFieldLayoutConfiguration(String text, int fieldWidth){ this.labelText = text; this.fieldWidth = fieldWidth; } public FormFieldLayoutConfiguration(String text, int fieldWidth, double fieldHeight){ this.labelText = text; this.fieldWidth = fieldWidth; this.fieldHeight = fieldHeight; } public static FormFieldLayoutConfiguration from(String text, FormFieldLayoutConfiguration config){ FormFieldLayoutConfiguration newConfig = config.doClone(); newConfig.setLabelText(text); newConfig.setLabelHtml(null); return newConfig; } public int getLabelWidth() { return labelWidth; } public void setLabelWidth(int labelWidth) { this.labelWidth = labelWidth; } public LabelAlign getLabelAlign() { return labelAlign; } public void setLabelAlign(LabelAlign labelAlign) { this.labelAlign = labelAlign; } public void setFieldWidth(double fieldWidth) { this.fieldWidth = fieldWidth; } public double getFieldWidth() { return fieldWidth; } public void setLabelText(String labelText) { this.labelText = labelText; } public String getLabelText() { return labelText; } public void setLabelHtml(SafeHtml labelHtml) { this.labelHtml = labelHtml; } public SafeHtml getLabelHtml() { return labelHtml; } public void setFieldHeight(double fieldHeight) { this.fieldHeight = fieldHeight; } public double getFieldHeight() { return fieldHeight; } public void setHasLabel(boolean hasLabel) { this.hasLabel = hasLabel; } public boolean isHasLabel() { return hasLabel; } public void setMarginData(MarginData marginData) { this.marginData = marginData; } public MarginData getMarginData() { return marginData; } protected FormFieldLayoutConfiguration doClone() { FormFieldLayoutConfiguration config = new FormFieldLayoutConfiguration(); config.setFieldHeight(getFieldHeight()); config.setFieldWidth(getFieldWidth()); config.setLabelAlign(getLabelAlign()); config.setLabelHtml(getLabelHtml()); config.setLabelText(getLabelText()); config.setLabelWidth(getLabelWidth()); config.setHasLabel(isHasLabel()); config.setMarginData(getMarginData()); return config; } }
[ "srbala@gmail.com" ]
srbala@gmail.com
07cfc1891d70ae222013e01d5d196f26e7002ed8
908019e70ee5d5082818949080ec42ef24ff9230
/bdap-mgr/src/main/java/etl/flow/oozie/coord/LOGICALOR.java
5aa9b5d98365666a2deda5aea8cf082636ac7b9e
[]
no_license
harssion/log.analysis
0806ea3249889b6a3372e5c796b81447669a6a26
58f2ef4e9fe450d17df36287bf601f77d9b54218
refs/heads/master
2020-12-24T05:47:21.595131
2016-11-09T18:59:22
2016-11-09T18:59:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,927
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.10.21 at 03:56:46 PM PDT // package etl.flow.oozie.coord; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LOGICALOR complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LOGICALOR"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;choice maxOccurs="unbounded" minOccurs="0"> * &lt;element name="and" type="{uri:oozie:coordinator:0.5}LOGICALAND" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="or" type="{uri:oozie:coordinator:0.5}LOGICALOR" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="data-in" type="{uri:oozie:coordinator:0.5}LOGICALDATAIN" maxOccurs="unbounded"/> * &lt;element name="combine" type="{uri:oozie:coordinator:0.5}COMBINE" maxOccurs="unbounded" minOccurs="0"/> * &lt;/choice> * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="wait" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LOGICALOR", propOrder = { "andOrOrOrDataIn" }) public class LOGICALOR { @XmlElements({ @XmlElement(name = "and", type = LOGICALAND.class), @XmlElement(name = "or", type = LOGICALOR.class), @XmlElement(name = "data-in", type = LOGICALDATAIN.class), @XmlElement(name = "combine", type = COMBINE.class) }) protected List<Object> andOrOrOrDataIn; @XmlAttribute(name = "name") protected String name; @XmlAttribute(name = "min") protected String min; @XmlAttribute(name = "wait") protected String wait; /** * Gets the value of the andOrOrOrDataIn property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the andOrOrOrDataIn property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAndOrOrOrDataIn().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link LOGICALAND } * {@link LOGICALOR } * {@link LOGICALDATAIN } * {@link COMBINE } * * */ public List<Object> getAndOrOrOrDataIn() { if (andOrOrOrDataIn == null) { andOrOrOrDataIn = new ArrayList<Object>(); } return this.andOrOrOrDataIn; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the min property. * * @return * possible object is * {@link String } * */ public String getMin() { return min; } /** * Sets the value of the min property. * * @param value * allowed object is * {@link String } * */ public void setMin(String value) { this.min = value; } /** * Gets the value of the wait property. * * @return * possible object is * {@link String } * */ public String getWait() { return wait; } /** * Sets the value of the wait property. * * @param value * allowed object is * {@link String } * */ public void setWait(String value) { this.wait = value; } }
[ "phillipchengyi@gmail.com" ]
phillipchengyi@gmail.com
e8b8111b3abcfc8f0dc213b9a5552de9f131a780
fbf77569f8d964d274ab48e29a6028eb81b3362d
/src/main/java/com/chenshinan/designpattern/C12Flyweight/TestDB.java
3a3e2e11a9e7341c5650c7fa5cb29d9cc9ec9712
[]
no_license
chenshinan/csn-designpattern
2cb3d201b6394608d2b33cb02de5aa7da203e93d
beb6c90bff7d1c6047dedbff419a42ca39e70bd5
refs/heads/master
2020-03-27T09:01:45.482497
2018-10-18T05:57:52
2018-10-18T05:57:52
146,308,028
0
0
null
null
null
null
UTF-8
Java
false
false
777
java
package com.chenshinan.designpattern.C12Flyweight; import java.util.ArrayList; import java.util.Collection; /** * @author shinan.chen * @date 2018/9/12 */ /** * 供测试用,在内存中模拟数据库中的值 */ public class TestDB { /** * 用来存放授权数据的值 */ public static Collection<String> colDB = new ArrayList<>(); static { //通过静态块来填充模拟的数据 colDB.add("陈一,人员列表,查看"); colDB.add("陈二,人员列表,查看"); colDB.add("陈二,薪资数据,查看"); colDB.add("陈三,薪资数据,修改"); colDB.add("陈四,人员列表,查看"); colDB.add("陈五,人员列表,查看"); colDB.add("陈六,人员列表,查看"); } }
[ "shinan.chen@hand-china.com" ]
shinan.chen@hand-china.com
91de08c573d6eb8d6467ad3f69388bc9101b99e5
69caea7b1b2e2341fe0df6b13f13ab04353b689f
/practiceproject/smdemo/src/main/java/cn/itcast/smdemo/pojo/User.java
2c624282ab5965ec0b2019a1d0d358d98884d4c8
[]
no_license
jerrytao1987/234
320cc67b9efe6d973a6002124cc0032d9f0a1a6b
0d3a990690f2378d17c6789227173dfd527bfeef
refs/heads/master
2020-04-24T08:55:56.117195
2019-03-26T04:54:28
2019-03-26T04:54:28
171,846,538
0
0
null
null
null
null
UTF-8
Java
false
false
909
java
package cn.itcast.smdemo.pojo; import java.util.Date; public class User { private Integer id; private String username; private Date birthday; private String sex; private String address; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } }
[ "309505553@qq.com" ]
309505553@qq.com
f39b72b8fd02cd490d62fbffd5e80dc82821b4e2
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project53/src/main/java/org/gradle/test/performance53_4/Production53_317.java
5a82127fbd51e1adcbb954f92ca0a3937efeeaaf
[]
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.performance53_4; public class Production53_317 extends org.gradle.test.performance14_4.Production14_317 { private final String property; public Production53_317() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
e726fbddd5de0eb8e95e38e0addfb94d67e2a25e
695f166dcf184219269913f6932924096c41147b
/common/Models/src/main/java/mms/common/models/relational/SqlDataType.java
0abdede73b2a9e4da0d4824f22e39943f6863876
[]
no_license
markmo/mms
c17168cec33533a890cab2aa72f165317919a7f8
9c3fe0338dda3dfec0cbf0392d74ffc7b21f735e
refs/heads/master
2021-05-28T00:19:39.591536
2013-12-03T13:02:30
2013-12-03T13:02:30
7,142,214
0
0
null
null
null
null
UTF-8
Java
false
false
1,930
java
package mms.common.models.relational; import static utils.JPA_Helper.getSingleResult; import javax.persistence.*; import javax.persistence.Table; import org.hibernate.envers.Audited; import play.data.validation.Constraints; import play.db.jpa.JPA; import mms.common.models.AuditedModel; /** * User: markmo * Date: 26/09/12 * Time: 1:49 PM * * An SQLDataType is used to reference any datatype associated with a column. */ @Entity @Table(name = "sql_datatype") @Audited public class SqlDataType extends AuditedModel { @Id @GeneratedValue @Column(name = "sql_datatype_id") private Long id; @Column(name = "sql_datatype_name") @Constraints.Required private String name; public static SqlDataType findByName(String name) { return getSingleResult(SqlDataType.class, JPA.em().createQuery( "select t from SqlDataType t where t.name = ?1" ) .setParameter(1, name) ); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return name + "(" + id + ")"; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SqlDataType that = (SqlDataType) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; return true; } @Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); return result; } }
[ "markmo@me.com" ]
markmo@me.com
d533ec0989bdb6ce0ce92648438c7dfea2f77368
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/aosp-mirror--platform_frameworks_base/20d94749043d0851f1da10c7749fd7eb13a35081/before/TestInteractionActivity.java
abd048a4256b79098a96e251edaa5085ac9b040f
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,054
java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.test.voiceinteraction; import android.app.Activity; import android.app.VoiceInteractor; import android.os.Bundle; import android.util.Log; public class TestInteractionActivity extends Activity { static final String TAG = "TestInteractionActivity"; VoiceInteractor mInteractor; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!isVoiceInteraction()) { Log.w(TAG, "Not running as a voice interaction!"); finish(); return; } setContentView(R.layout.test_interaction); mInteractor = getVoiceInteractor(); VoiceInteractor.ConfirmationRequest req = new VoiceInteractor.ConfirmationRequest( "This is a confirmation", null) { @Override public void onCancel() { Log.i(TAG, "Canceled!"); getActivity().finish(); } @Override public void onConfirmationResult(boolean confirmed, Bundle result) { Log.i(TAG, "Confirmation result: confirmed=" + confirmed + " result=" + result); getActivity().finish(); } }; mInteractor.submitRequest(req); } @Override public void onResume() { super.onResume(); } @Override public void onDestroy() { super.onDestroy(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
d45981d80aeb4dffaee924abf5449a0ac811c39c
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE190_Integer_Overflow/s01/CWE190_Integer_Overflow__byte_max_multiply_75b.java
f7107c519a3f08631770e242ec79c9e69fb40bfb
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
7,057
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__byte_max_multiply_75b.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-75b.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: max Set data to the max value for byte * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: multiply * GoodSink: Ensure there will not be an overflow before multiplying data by 2 * BadSink : If data is positive, multiply by 2, which can cause an overflow * Flow Variant: 75 Data flow: data passed in a serialized object from one method to another in different source files in the same package * * */ package testcases.CWE190_Integer_Overflow.s01; import testcasesupport.*; import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; import java.io.IOException; import java.util.logging.Level; import javax.servlet.http.*; public class CWE190_Integer_Overflow__byte_max_multiply_75b { public void badSink(byte[] dataSerialized ) throws Throwable { /* unserialize data */ ByteArrayInputStream streamByteArrayInput = null; ObjectInputStream streamObjectInput = null; try { streamByteArrayInput = new ByteArrayInputStream(dataSerialized); streamObjectInput = new ObjectInputStream(streamByteArrayInput); byte data = (Byte)streamObjectInput.readObject(); if(data > 0) /* ensure we won't have an underflow */ { /* POTENTIAL FLAW: if (data*2) > Byte.MAX_VALUE, this will overflow */ byte result = (byte)(data * 2); IO.writeLine("result: " + result); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO); } catch (ClassNotFoundException exceptClassNotFound) { IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound); } finally { /* clean up stream reading objects */ try { if (streamObjectInput != null) { streamObjectInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO); } try { if (streamByteArrayInput != null) { streamByteArrayInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO); } } } /* goodG2B() - use GoodSource and BadSink */ public void goodG2BSink(byte[] dataSerialized ) throws Throwable { /* unserialize data */ ByteArrayInputStream streamByteArrayInput = null; ObjectInputStream streamObjectInput = null; try { streamByteArrayInput = new ByteArrayInputStream(dataSerialized); streamObjectInput = new ObjectInputStream(streamByteArrayInput); byte data = (Byte)streamObjectInput.readObject(); if(data > 0) /* ensure we won't have an underflow */ { /* POTENTIAL FLAW: if (data*2) > Byte.MAX_VALUE, this will overflow */ byte result = (byte)(data * 2); IO.writeLine("result: " + result); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO); } catch (ClassNotFoundException exceptClassNotFound) { IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound); } finally { /* clean up stream reading objects */ try { if (streamObjectInput != null) { streamObjectInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO); } try { if (streamByteArrayInput != null) { streamByteArrayInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO); } } } /* goodB2G() - use BadSource and GoodSink */ public void goodB2GSink(byte[] dataSerialized ) throws Throwable { /* unserialize data */ ByteArrayInputStream streamByteArrayInput = null; ObjectInputStream streamObjectInput = null; try { streamByteArrayInput = new ByteArrayInputStream(dataSerialized); streamObjectInput = new ObjectInputStream(streamByteArrayInput); byte data = (Byte)streamObjectInput.readObject(); if(data > 0) /* ensure we won't have an underflow */ { /* FIX: Add a check to prevent an overflow from occurring */ if (data < (Byte.MAX_VALUE/2)) { byte result = (byte)(data * 2); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to perform multiplication."); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO); } catch (ClassNotFoundException exceptClassNotFound) { IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound); } finally { /* clean up stream reading objects */ try { if (streamObjectInput != null) { streamObjectInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO); } try { if (streamByteArrayInput != null) { streamByteArrayInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO); } } } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
1a4d1854da0662f9056f3e053f764e0a3931ecc0
dcd6e3f0e3b3518785920ad3a797ce26cc1f2cec
/opencv-native/app/src/main/java/com/nex3z/examples/opencvnative/MainActivity.java
e102443589c8f84dc476c344e6b851c849b27de4
[]
no_license
nex3z/opencv-android-demo
b96d7ddf79dd2b7c48ad635edf6c6b0c11e7f8bc
b724a785873a26179326a39891947f314c5d81ff
refs/heads/master
2020-03-17T10:42:54.083877
2018-05-15T17:26:41
2018-05-16T13:02:37
133,522,673
0
0
null
null
null
null
UTF-8
Java
false
false
1,834
java
package com.nex3z.examples.opencvnative; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.ImageView; import org.opencv.android.OpenCVLoader; import org.opencv.android.Utils; import org.opencv.core.Mat; public class MainActivity extends AppCompatActivity { private static final String LOG_TAG = MainActivity.class.getSimpleName(); private ImageView mIvImage; private Button mBtnConvert; static { if(!OpenCVLoader.initDebug()) { Log.d(LOG_TAG, "OpenCV not loaded"); } else { Log.d(LOG_TAG, "OpenCV loaded"); } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mIvImage = findViewById(R.id.iv_image); mBtnConvert = findViewById(R.id.btn_convert); init(); } private void init() { mBtnConvert.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Bitmap rgbBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.lenna); Bitmap grayBitmap = Bitmap.createBitmap(rgbBitmap.getWidth(), rgbBitmap.getHeight(), Bitmap.Config.RGB_565); Mat rgbMat = new Mat(); Utils.bitmapToMat(rgbBitmap, rgbMat); Mat grayMat = new Mat(); ImageUtil.rgbToGray(rgbMat, grayMat); Utils.matToBitmap(grayMat, grayBitmap); mIvImage.setImageBitmap(grayBitmap); } }); } }
[ "litianxing9@gmail.com" ]
litianxing9@gmail.com
f1ea938e911f702ddb26f283763e767193d0d1ed
2f5269e0f00685f361e8348ed3e8ed40c8e0cc3b
/src/JVT/JVT17_Threads/GetTheMail.java
60d395b2ad7a20ee760e6d6039edbc7e20fe84c8
[]
no_license
kurkov/JavaCodeLib
7ec310a092d2adbe756ee5e6a5b025dcf83c3d66
bb34a5fd36beca3cadb3e0b63b5dc89b94b0d949
refs/heads/master
2016-09-14T07:50:57.707690
2016-05-19T09:29:35
2016-05-19T09:29:35
58,075,000
0
0
null
null
null
null
UTF-8
Java
false
false
852
java
package JVT.JVT17_Threads; // You can use the Runnable interface instead of // wasting your 1 class extension. public class GetTheMail implements Runnable { // Stores the number of seconds before the code // will be executed private int startTime; // Constructor that sets the wait time for each // new Thread public GetTheMail(int startTime) { this.startTime = startTime; } // All of the code that the thread executes must be // in the run method, or be in a method called for // from inside of the run method public void run() { try { // Don't execute until 10 seconds has passed if // startTime equals 10 Thread.sleep(startTime * 1000); } catch (InterruptedException e) { } System.out.println("Checking for Mail"); } }
[ "aleksey.kurkov@gmail.com" ]
aleksey.kurkov@gmail.com
e0bcdb75689753e7b0563db1941d78d1c143fe2b
51e7be87b1c4062a8e23b0ddee5db1efd6f10ebc
/08. Workshop - Java EE - Servlets JSP JPA/MeTube v2/src/main/java/metube/domain/models/view/TubeDetailsViewModel.java
ea168d32f752484a09559138b68f5bb5a0c27425
[]
no_license
Taewii/java-web-development-basics
9e35dbbfc1f543e05b6f4f787f4a36a8fec3d6fb
12cc582f49dc9fda2bd2ca5c2f0289720b25af5e
refs/heads/master
2022-02-22T06:00:18.132113
2019-06-21T19:35:27
2019-06-21T19:35:27
185,863,580
0
0
null
2022-02-09T23:51:35
2019-05-09T20:02:39
Java
UTF-8
Java
false
false
381
java
package metube.domain.models.view; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor @AllArgsConstructor public class TubeDetailsViewModel { private String title; private String author; private String youtubeId; private String description; private long views; }
[ "p3rfec7@abv.bg" ]
p3rfec7@abv.bg
926a0b70163704fb98a3922ae32d7d7a77552689
5719fc1a809a34d1bea3f5f0ff6e25d773382661
/src/physics/link/Constants.java
11f7663069cc0d4642907c4a0ad08ae77e913b53
[]
no_license
Brownshome/Space-Blobs
0facf9f601b1e5e4c30cb9562b38e67d7c56d38d
fe7c4912ce58a8d2d305038c91abc138883f6c73
refs/heads/master
2020-05-17T05:50:22.048281
2015-03-29T08:05:29
2015-03-29T08:05:29
32,616,126
0
0
null
null
null
null
UTF-8
Java
false
false
232
java
package physics.link; public class Constants { public static final int SHIP_BIT = 0x1; public static final int PLAYER_BIT = 0x2; public static final int PLAYER_GRAB_BIT = 0x4; public static final int SHIP_SELECTED_BIT = 0x8; }
[ "jamesphone180@gmail.com" ]
jamesphone180@gmail.com
08cc8e549d9e73d39c7219fe90b619978e96015a
85ce3a70a4bcfb824833053a2d5ab78e5870dc4d
/IdeaProjects/wms/src/main/java/cn/wolfcode/wms/mapper/EmployeeMapper.java
26f3f0699138e438cb633184d3972e7db463dc93
[]
no_license
qyl1006/Hello_World
87e4aef81874cef1ddd5cd0d7278ac56c8f8bb19
be81d9e957d4e81e3d2097ac7ab9ae7ba1a620af
refs/heads/master
2020-03-08T03:14:44.053205
2018-05-18T02:31:16
2018-05-18T02:31:16
127,881,971
0
0
null
null
null
null
UTF-8
Java
false
false
849
java
package cn.wolfcode.wms.mapper; import cn.wolfcode.wms.domain.Employee; import cn.wolfcode.wms.query.EmployeeQueryObject; import org.apache.ibatis.annotations.Param; import java.util.List; public interface EmployeeMapper { int deleteByPrimaryKey(Long id); int insert(Employee record); Employee selectByPrimaryKey(Long id); int updateByPrimaryKey(Employee record); //分页/高级查询 int queryCount(EmployeeQueryObject qo); List<Employee> queryAll(EmployeeQueryObject qo); void deleteRelation(Long id); void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId); Employee selectByInfo(@Param("username") String username, @Param("encoder") String encoder); //批量删除 void batchDeleteByIds(Long[] ids); }
[ "yuelinshi@qq.com" ]
yuelinshi@qq.com
3fc93c5e8425fbdc947600c87e2cc03a4c0e02fc
993aa3e6ad102203a9cda87a99b2b6ea1bcf6bba
/lab1/src/composite/File.java
6ade9ad12f40a20c229c415d278b0dbf268fe909
[]
no_license
cocagolau/NEXT_13-02_Java-Lab
0715a02474ef61c38d3440289bddf5aaf873678b
c241c3b43c3641b2be6d01d27cc3e0648eaeef62
refs/heads/master
2018-12-31T17:03:54.754165
2014-07-07T13:00:47
2014-07-07T13:00:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package composite; public class File extends Entry { private String name; private int size; public File(String name, int size) { this.name = name; this.size = size; } public String getName() { return name; } public int getSize() { return size; } protected void printList(String prefix) { System.out.println(prefix + "/" + this); } @Override public Entry add(Entry entry) { // TODO Auto-generated method stub return null; } }
[ "cocagolau@gmail.com" ]
cocagolau@gmail.com
a67b21b0b5ee9673a42159016d7c1c8b4fb3d689
7c7f86c62089741ac520f699c5efa33b46376435
/src/main/java/com/baidu/beidou/util/cdndriver/bo/CdnQueryRequestInfo.java
c072d776e8965cd60c80b0f9cb61d608cee23be2
[]
no_license
wang-shun/beidou-cron
35caeceddb0cc64ebe945fa181c099d0c2f5e732
d46cfa8c5bb838775ae30946d496edae76d0d34e
refs/heads/master
2020-03-29T14:05:15.550899
2017-04-04T04:03:27
2017-04-04T04:03:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
package com.baidu.beidou.util.cdndriver.bo; import com.baidu.beidou.util.cdndriver.protocol.CdnNsHead; public class CdnQueryRequestInfo extends AbstractCdnRequestInfo { private String id; public static AbstractCdnRequestInfo buildCdnReqInfo(String accessId){ if(accessId == null){ return null; } CdnQueryRequestInfo cdnReqInfo = new CdnQueryRequestInfo(); cdnReqInfo.setProvider(CdnNsHead.PROVIDER); cdnReqInfo.setId(accessId); return cdnReqInfo; } public String getId() { return id; } public void setId(String id) { this.id = id; } }
[ "berryjamcoding@gmail.com" ]
berryjamcoding@gmail.com
9fc2ec096899621e0cc94892372a038597a79dff
b327a374de29f80d9b2b3841db73f3a6a30e5f0d
/out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files/dot/junit/opcodes/iput_object/Main_testN1.java
5587e7e53d899716bcc4c47cbce2918419cbf50f
[]
no_license
nikoltu/aosp
6409c386ed6d94c15d985dd5be2c522fefea6267
f99d40c9d13bda30231fb1ac03258b6b6267c496
refs/heads/master
2021-01-22T09:26:24.152070
2011-09-27T15:10:30
2011-09-27T15:10:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
//autogenerated by util.build.BuildDalvikSuite, do not change package dot.junit.opcodes.iput_object; import dot.junit.opcodes.iput_object.d.*; import dot.junit.*; public class Main_testN1 extends DxAbstractMain { public static void main(String[] args) throws Exception { T_iput_object_1 t = new T_iput_object_1(); assertEquals(null, t.st_i1); t.run(); assertEquals(t, t.st_i1); } }
[ "fred.faust@gmail.com" ]
fred.faust@gmail.com
afe574d33e850753a9a6d70d6b16872b0fbfad02
d6e24726af19bf81c604b945225eb24f5c703db3
/.svn/pristine/e7/e7f5f39811eaeda0f36ce14b1fa449a127edf796.svn-base
b156dd34d28da90a3bc6d6a3d138a028cb0a8653
[]
no_license
wangtao12138/charge-merchant
b29d3f639d2b3c60f8cf970765adafe63598e21a
742973f5bcbfe34a73044f347e5ead388f671012
refs/heads/master
2021-10-01T15:09:50.332136
2018-11-27T06:51:36
2018-11-27T06:51:36
159,288,483
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
package cn.com.cdboost.charge.merchant.vo.dto; import lombok.Getter; import lombok.Setter; import java.io.Serializable; import java.math.BigDecimal; /** * ic卡列表返回对象 */ @Setter @Getter public class IcCardListDto implements Serializable{ private static final long serialVersionUID = 8340112494902191576L; /** * 站点guid */ private String projectGuid; /** * IC卡所属人员名称 */ private String customerName; /** * IC所属人员电话 */ private String customerContact; /** * ic卡编号 */ private String cardId; /** * IC卡内部UID */ private String cardGuid; /** * ic卡状态 0初始、1 -启用、2-停用 */ private Integer cardState; /** * 使用次数 */ private Integer useCnt; /** * 预置预留 */ private BigDecimal initAmount; /** * 账户余额 */ private BigDecimal remainAmount; /** * 创建时间 */ private String createTime; /** * 更新时间 */ private String updateTime; /** * 备注信息 */ private String remark; /** * IC 卡状态 0 欠费 1正常 */ private Integer cardOwe; }
[ "770320215@qq.com" ]
770320215@qq.com
4d72b2fe1e38f27215cc39187a42d187fb76f2d6
f07baf11199551a3f6d40507ac310f4e15291eed
/src/test/java/OperatorTest.java
9391110c8d8c3c776c6448cc880cc8c85820088f
[]
no_license
RichardInnocent/SRPN
9a91e292228c3ee8f6cb8ede5351f94ea0f459d9
77e5e0d485d49db577dedecabe07bd6420849ad4
refs/heads/master
2023-01-22T01:45:34.296847
2020-12-03T11:06:30
2020-12-03T11:06:30
318,165,314
0
0
null
null
null
null
UTF-8
Java
false
false
4,306
java
import static org.junit.Assert.*; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.Test; public class OperatorTest { private static final double DELTA = 1e-8; @Test public void testIsAboveBound() { Operator operator = createOperatorWithReadableName("Operator"); assertFalse(operator.isAboveBound(Long.MIN_VALUE)); assertFalse(operator.isAboveBound(0L)); assertFalse(operator.isAboveBound(Integer.MAX_VALUE)); assertTrue(operator.isAboveBound(Integer.MAX_VALUE + 1L)); assertTrue(operator.isAboveBound(Long.MAX_VALUE)); } @Test public void testIsBelowBound() { Operator operator = createOperatorWithReadableName("Operator"); assertTrue(operator.isBelowBound(Long.MIN_VALUE)); assertTrue(operator.isBelowBound(Integer.MIN_VALUE - 1L)); assertFalse(operator.isBelowBound(0L)); assertFalse(operator.isBelowBound(Long.MAX_VALUE)); } @Test public void testTruncateToBounds() { Operator operator = createOperatorWithReadableName("Operator"); assertEquals(Integer.MIN_VALUE, operator.truncateToBounds(Long.MIN_VALUE), DELTA); assertEquals(Integer.MIN_VALUE, operator.truncateToBounds(Integer.MIN_VALUE - 1L), DELTA); assertEquals(Integer.MIN_VALUE, operator.truncateToBounds(Integer.MIN_VALUE), DELTA); assertEquals(-50, operator.truncateToBounds(-50L), DELTA); assertEquals(0, operator.truncateToBounds(0L), DELTA); assertEquals(50, operator.truncateToBounds(50L), DELTA); assertEquals(Integer.MAX_VALUE, operator.truncateToBounds(Integer.MAX_VALUE), DELTA); assertEquals(Integer.MAX_VALUE, operator.truncateToBounds(Integer.MAX_VALUE + 1L), DELTA); assertEquals(Integer.MAX_VALUE, operator.truncateToBounds(Long.MAX_VALUE), DELTA); } @Test public void testHashCode() { String readableValue = "Operator"; Operator operator = createOperatorWithReadableName(readableValue); assertEquals(readableValue.hashCode(), operator.hashCode()); } @Test public void testEquals() { String readableValue1 = "readable value 1"; String readableValue2 = "readable value 2"; Operator operator1a = createOperatorWithReadableName(readableValue1); Operator operator1b = createOperatorWithReadableName(readableValue1); Operator operator2 = createOperatorWithReadableName(readableValue2); assertTrue(operator1a.equals(operator1b)); assertTrue(operator1b.equals(operator1a)); assertFalse(operator2.equals(operator1a)); assertFalse(operator1a.equals(operator2)); } @Test public void testCompareTo() { Operator highestPrecedence = createOperatorWithPrecedence(2); Operator middlePrecedence = createOperatorWithPrecedence(1); Operator lowestPrecedence = createOperatorWithPrecedence(0); assertTrue(highestPrecedence.compareTo(middlePrecedence) < 0); assertTrue(highestPrecedence.compareTo(lowestPrecedence) < 0); assertTrue(middlePrecedence.compareTo(highestPrecedence) > 0); assertTrue(middlePrecedence.compareTo(lowestPrecedence) < 0); assertTrue(lowestPrecedence.compareTo(highestPrecedence) > 0); assertTrue(lowestPrecedence.compareTo(middlePrecedence) > 0); List<Operator> operators = Arrays.asList(lowestPrecedence, middlePrecedence, highestPrecedence); Collections.sort(operators); assertSame(highestPrecedence, operators.get(0)); assertSame(middlePrecedence, operators.get(1)); assertSame(lowestPrecedence, operators.get(2)); } private static Operator createOperatorWithReadableName(String readableName) { return new Operator() { @Override public double calculate(double operand1, double operand2) { return 0; } @Override public int getPrecedence() { return 0; } @Override public String getReadableName() { return readableName; } }; } private static Operator createOperatorWithPrecedence(int precedence) { return new Operator() { @Override public double calculate(double operand1, double operand2) { return 0; } @Override public String getReadableName() { return "Precedence " + precedence; } @Override public int getPrecedence() { return precedence; } }; } }
[ "richardinnocent@sky.com" ]
richardinnocent@sky.com
5908a638ec998f0e3f86a6e9395b5d8fc5dc7d32
6ac7de9a9894d8e87ba28b7c9da69119ad0420e2
/src/Ugly_Number_II_p264_sol2.java
8f42012dea54dcfeef62aa19f45fcf28087d1aa0
[]
no_license
hpplayer/LeetCode_Round_3
df0fb18fdf6e6e2d98fe5d5b2b8229b9a8e46002
3ce62d0a5393f758ed127202409fa51ea5c867c9
refs/heads/master
2021-01-21T04:47:42.255567
2016-07-10T08:42:53
2016-07-10T08:42:53
45,414,977
0
1
null
null
null
null
UTF-8
Java
false
false
1,672
java
import java.util.PriorityQueue; /** * Heap solution * * We use a min heap to store all generated ugly numbers. Then we pop top value from heap, and generate three following ugly numbers and insert into * heap. We will keep doing this until we have n - 1 loops * * * Time complexity: O(NlogK) where N means our loop will go N times, logK means each loop, we will offer k elements into the heap * now k = 3, so we still get O(N) time complexity * Space complexity: O(N) * * @author hpPlayer * @date Feb 25, 2016 9:59:52 AM */ public class Ugly_Number_II_p264_sol2 { public int nthUglyNumber(int n) { //heap solution. We use a min heap to store produced ugly number. Each time we will pop the smallest ugly number, then create //three following ugly numbers by multiplying 2, 3 and 5 respectively and insert them into heap. //to prevent overflow, we use Long type PriorityQueue<Long> pq = new PriorityQueue<Long>(); //initialization pq.offer(1l); for(int i = 1; i < n; i++){ long min = pq.poll(); //we may have several duplciates of min in pq as well. To avoid generating duplicate ugly numbers, we will pop all top value //that has same value with min //use equals() to compare values since Long is object while(!pq.isEmpty() && pq.peek().equals(min)) pq.poll(); //generate three following ugly numbers from this min value pq.offer(min * 2); pq.offer(min * 3); pq.offer(min * 5); } return pq.poll().intValue(); } }
[ "hpplayer@live.cn" ]
hpplayer@live.cn
c1913664c79251f9e65dbc2c8441be342bce2c4f
095d6b787e6b0bf7fcbce7e0ede9a33723641d5e
/mall-product/src/main/java/com/grain/mall/product/vo/SpuItemAttrGroupVo.java
91627bab252f6a2c47ff9aae81bf05f0516310f4
[ "Apache-2.0" ]
permissive
liu13514/GrainMall-2.0
c17429156d271d1e428f6115196e98ef6f3e8475
49e72f29107731822e1915f73864521d090116cb
refs/heads/master
2023-04-20T00:07:47.367277
2021-03-27T07:26:18
2021-03-27T07:26:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
package com.grain.mall.product.vo; import com.grain.mall.product.vo.spusave.Attr; import lombok.Data; import lombok.ToString; import java.util.List; /** * @author:Dragon Wen * @email:18475536452@163.com * @date:Created in 2020/7/25 15:14 * @description: * @modified By: * @version: $ */ @ToString @Data public class SpuItemAttrGroupVo { private String groupName; private List<Attr> attrs; }
[ "18475536452@163.com" ]
18475536452@163.com
d2030d37fc61aeecb98dc5759c761a5c4d3c819d
f81da0511150e09d0089ce0a175d28c65da3fcd8
/environments/osgi/tests/tester/src/test/java/org/jboss/weld/environment/osgi/tests/osgi/OSGiFacilitationTest.java
c17158a6778f21de6619c7b890ce6a22471c852c
[]
no_license
alesj/core
8a3f61d13a3f6e6ac2795831c5a5d73bb122d702
14f402011b8b79af4fb55638c464ccc530702ff5
refs/heads/master
2021-01-17T23:49:21.428774
2012-10-12T12:22:49
2012-10-12T12:22:49
1,031,934
0
1
null
null
null
null
UTF-8
Java
false
false
4,690
java
/* * JBoss, Home of Professional Open Source * Copyright 2011, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * 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.jboss.weld.environment.osgi.tests.osgi; import java.io.File; import java.util.Dictionary; import java.util.Map; import javax.inject.Inject; import org.jboss.weld.environment.osgi.tests.util.Environment; import org.jboss.weld.osgi.tests.bundle1.util.BundleProvider; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.Configuration; import org.ops4j.pax.exam.junit.JUnit4TestRunner; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; import static org.jboss.weld.environment.osgi.tests.util.Environment.toMavenBundle; import static org.ops4j.pax.exam.CoreOptions.options; @RunWith(JUnit4TestRunner.class) public class OSGiFacilitationTest { @Configuration public static Option[] configure() { return options( Environment.toCDIOSGiEnvironment( toMavenBundle("org.jboss.weld.osgi.tests", "weld-osgi-bundle1"), toMavenBundle("org.jboss.weld.osgi.tests", "weld-osgi-bundle2"), toMavenBundle("org.jboss.weld.osgi.tests", "weld-osgi-bundle3") ) ); } @Inject private BundleContext context; @Test public void osgiUtilitiesTest() throws InterruptedException, InvalidSyntaxException { Environment.waitForEnvironment(context); Bundle bundle1 = null, bundle2 = null; for (Bundle b : context.getBundles()) { if (b.getSymbolicName().equals("org.jboss.weld.osgi.tests.weld-osgi-bundle1")) { bundle1 = b; break; } } ServiceReference[] bundleProviderServiceReferences = context.getServiceReferences(BundleProvider.class.getName(), null); Assert.assertNotNull("The bundle provider reference array was null", bundleProviderServiceReferences); Assert.assertEquals("The number of bundle provider implementations was wrong", 1, bundleProviderServiceReferences.length); BundleProvider bundleProvider = (BundleProvider) context.getService(bundleProviderServiceReferences[0]); Assert.assertNotNull("The bundle provider was null", bundleProvider); Bundle injectedBundle = bundleProvider.getBundle(); Assert.assertNotNull("The injected bundle was null", injectedBundle); Assert.assertEquals("The injected bundle was not the bundle1", bundle1, injectedBundle); BundleContext injectedContext = bundleProvider.getBundleContext(); Assert.assertNotNull("The injected bundle context was null", injectedBundle); Assert.assertEquals("The injected bundle context was not the bundle1 bundle context", bundle1, injectedContext.getBundle()); Map<String, String> metadata = bundleProvider.getMetadata(); Dictionary headers = bundle1.getHeaders(); Assert.assertNotNull("The injected bundle metadata was null", metadata); Assert.assertEquals("The injected bundle metadata had the wrong size", headers.size(), metadata.size()); for (String s : metadata.keySet()) { Assert.assertEquals("The injected metadata header was not the bundle1 header", headers.get(s), metadata.get(s)); } String symbolicName = bundleProvider.getSymbolicName(); Assert.assertNotNull("The injected bundle symbolic name was null", symbolicName); Assert.assertEquals("The injected symbolic name was not the bundle1 symbolic name", bundle1.getSymbolicName(), symbolicName); File file = bundleProvider.getFile(); Assert.assertNotNull("The injected bundle file was null", file); Assert.assertEquals("The injected bundle file was not the bundle1 file", injectedContext.getDataFile("test.txt"), file); } }
[ "ales.justin@gmail.com" ]
ales.justin@gmail.com
67c821c0a0ac57db9861578b9566028bd0f1724b
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/PhilJay--MPAndroidChart/c739d6271397e9979cf633453df3ea35c6052e2d/after/CandleStickChartRenderer.java
d871337c2d0127b4028a4212d0c495d2870ac0cc
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
7,822
java
package com.github.mikephil.charting.renderer; import android.graphics.Canvas; import android.graphics.Paint; import com.github.mikephil.charting.animation.ChartAnimator; import com.github.mikephil.charting.data.CandleData; import com.github.mikephil.charting.data.CandleDataSet; import com.github.mikephil.charting.data.CandleEntry; import com.github.mikephil.charting.interfaces.CandleDataProvider; import com.github.mikephil.charting.utils.Highlight; import com.github.mikephil.charting.utils.Transformer; import com.github.mikephil.charting.utils.Utils; import java.util.ArrayList; public class CandleStickChartRenderer extends DataRenderer { protected CandleDataProvider mChart; public CandleStickChartRenderer(CandleDataProvider chart, ChartAnimator animator, ViewPortHandler viewPortHandler) { super(animator, viewPortHandler); mChart = chart; } @Override public void initBuffers() { // TODO Auto-generated method stub } @Override public void drawData(Canvas c) { CandleData candleData = mChart.getCandleData(); for (CandleDataSet set : candleData.getDataSets()) { if (set.isVisible()) drawDataSet(c, set); } } protected void drawDataSet(Canvas c, CandleDataSet dataSet) { // pre allocate float[] shadowPoints = new float[4]; float[] bodyPoints = new float[4]; ArrayList<CandleEntry> entries = dataSet.getYVals(); mRenderPaint.setStrokeWidth(dataSet.getShadowWidth()); for (int j = 0; j < entries.size() * mAnimator.getPhaseX(); j++) { // get the color that is specified for this position from // the DataSet, this will reuse colors, if the index is out // of bounds mRenderPaint.setColor(dataSet.getColor(j)); // get the entry CandleEntry e = entries.get(j); Transformer trans = mChart.getTransformer(dataSet.getAxisDependency()); // transform the entries values for shadow and body transformShadow(shadowPoints, e, trans); transformBody(bodyPoints, e, dataSet.getBodySpace(), trans); float xShadow = shadowPoints[0]; float leftBody = bodyPoints[0]; float rightBody = bodyPoints[2]; float high = shadowPoints[1]; float low = shadowPoints[3]; float open = bodyPoints[1]; float close = bodyPoints[3]; if (!mViewPortHandler.isInBoundsRight(leftBody)) break; // make sure the lines don't do shitty things outside // bounds if (j != 0 && !mViewPortHandler.isInBoundsLeft(rightBody) && !mViewPortHandler.isInBoundsTop(low) && !mViewPortHandler.isInBoundsBottom(high)) continue; // draw the shadow c.drawLine(xShadow, low, xShadow, high, mRenderPaint); // decide weather the body is hollow or filled if (open > close) { mRenderPaint.setStyle(Paint.Style.FILL); // draw the body c.drawRect(leftBody, close, rightBody, open, mRenderPaint); } else { mRenderPaint.setStyle(Paint.Style.STROKE); // draw the body c.drawRect(leftBody, open, rightBody, close, mRenderPaint); } } } /** * Transforms the values of an entry in order to draw the candle-body. * * @param bodyPoints * @param e * @param bodySpace */ private void transformBody(float[] bodyPoints, CandleEntry e, float bodySpace, Transformer trans) { float phase = mAnimator.getPhaseY(); bodyPoints[0] = e.getXIndex() - 0.5f + bodySpace; bodyPoints[1] = e.getClose() * phase; bodyPoints[2] = e.getXIndex() + 0.5f - bodySpace; bodyPoints[3] = e.getOpen() * phase; trans.pointValuesToPixel(bodyPoints); } /** * Transforms the values of an entry in order to draw the candle-shadow. * * @param shadowPoints * @param e */ private void transformShadow(float[] shadowPoints, CandleEntry e, Transformer trans) { float phase = mAnimator.getPhaseY(); shadowPoints[0] = e.getXIndex(); shadowPoints[1] = e.getHigh() * phase; shadowPoints[2] = e.getXIndex(); shadowPoints[3] = e.getLow() * phase; trans.pointValuesToPixel(shadowPoints); } @Override public void drawValues(Canvas c) { // if values are drawn if (mChart.getCandleData().getYValCount() < mChart.getMaxVisibleCount() * mViewPortHandler.getScaleX()) { ArrayList<CandleDataSet> dataSets = mChart.getCandleData().getDataSets(); for (int i = 0; i < dataSets.size(); i++) { CandleDataSet dataSet = dataSets.get(i); if (!dataSet.isDrawValuesEnabled()) continue; // apply the text-styling defined by the DataSet applyValueTextStyle(dataSet); Transformer trans = mChart.getTransformer(dataSet.getAxisDependency()); ArrayList<CandleEntry> entries = dataSet.getYVals(); float[] positions = trans.generateTransformedValuesCandle( entries, mAnimator.getPhaseY()); float yOffset = Utils.convertDpToPixel(5f); for (int j = 0; j < positions.length * mAnimator.getPhaseX(); j += 2) { float x = positions[j]; float y = positions[j + 1]; if (!mViewPortHandler.isInBoundsRight(x)) break; if (!mViewPortHandler.isInBoundsLeft(x) || !mViewPortHandler.isInBoundsY(y)) continue; float val = entries.get(j / 2).getHigh(); c.drawText(dataSet.getValueFormatter().getFormattedValue(val), x, y - yOffset, mValuePaint); } } } } @Override public void drawExtras(Canvas c) { } @Override public void drawHighlighted(Canvas c, Highlight[] indices) { for (int i = 0; i < indices.length; i++) { int xIndex = indices[i].getXIndex(); // get the // x-position CandleDataSet set = mChart.getCandleData().getDataSetByIndex( indices[i].getDataSetIndex()); if (set == null) continue; mHighlightPaint.setColor(set.getHighLightColor()); CandleEntry e = set.getEntryForXIndex(xIndex); if (e == null) continue; float low = e.getLow() * mAnimator.getPhaseY(); float high = e.getHigh() * mAnimator.getPhaseY(); float min = mChart.getYChartMin(); float max = mChart.getYChartMax(); float[] vertPts = new float[] { xIndex - 0.5f, max, xIndex - 0.5f, min, xIndex + 0.5f, max, xIndex + 0.5f, min }; float[] horPts = new float[] { 0, low, mChart.getXChartMax(), low, 0, high, mChart.getXChartMax(), high }; mChart.getTransformer(set.getAxisDependency()).pointValuesToPixel(vertPts); mChart.getTransformer(set.getAxisDependency()).pointValuesToPixel(horPts); // draw the vertical highlight lines c.drawLines(vertPts, mHighlightPaint); // draw the horizontal highlight lines c.drawLines(horPts, mHighlightPaint); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
dc909be0644af509b06fdc1aa5a3dcb3dcd6790e
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-retailbot/src/main/java/com/aliyuncs/retailbot/model/v20210224/DeleteTaskRequest.java
3ee7c907becc061569ae4a4eec5d414d8bf5dc73
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
2,715
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.retailbot.model.v20210224; import com.aliyuncs.RpcAcsRequest; import com.google.gson.Gson; import com.google.gson.annotations.SerializedName; import com.aliyuncs.http.ProtocolType; import com.aliyuncs.http.MethodType; /** * @author auto create * @version */ public class DeleteTaskRequest extends RpcAcsRequest<DeleteTaskResponse> { @SerializedName("digDeleteParam") private DigDeleteParam digDeleteParam; public DeleteTaskRequest() { super("RetailBot", "2021-02-24", "DeleteTask"); setProtocol(ProtocolType.HTTPS); setMethod(MethodType.POST); } public DigDeleteParam getDigDeleteParam() { return this.digDeleteParam; } public void setDigDeleteParam(DigDeleteParam digDeleteParam) { this.digDeleteParam = digDeleteParam; if (digDeleteParam != null) { putBodyParameter("DigDeleteParam" , new Gson().toJson(digDeleteParam)); } } public static class DigDeleteParam { @SerializedName("DelMessage") private String delMessage; @SerializedName("OperatorId") private String operatorId; @SerializedName("TaskId") private Long taskId; @SerializedName("RobotCode") private String robotCode; @SerializedName("OperatorName") private String operatorName; public String getDelMessage() { return this.delMessage; } public void setDelMessage(String delMessage) { this.delMessage = delMessage; } public String getOperatorId() { return this.operatorId; } public void setOperatorId(String operatorId) { this.operatorId = operatorId; } public Long getTaskId() { return this.taskId; } public void setTaskId(Long taskId) { this.taskId = taskId; } public String getRobotCode() { return this.robotCode; } public void setRobotCode(String robotCode) { this.robotCode = robotCode; } public String getOperatorName() { return this.operatorName; } public void setOperatorName(String operatorName) { this.operatorName = operatorName; } } @Override public Class<DeleteTaskResponse> getResponseClass() { return DeleteTaskResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
b5c46cfa3a5d3230ef4e31196cd165dbc48e5534
8009fa2efff68fe23391e0002eb3bb7721518a72
/tokTales-core/tokTales-core-library/src/main/java/com/tokelon/toktales/core/engine/inject/annotation/GlobalAssetKeyRegistry.java
647bee5147ffd00c9745efe234df733308052134
[ "MIT" ]
permissive
Tokelon/tokTales
3bdf2c08d71d8a81d417971dddff404c3ea89b54
c72c67519af57cc28a0699766083559a0731ba4c
refs/heads/master
2022-07-23T20:51:02.780796
2021-03-14T16:42:10
2021-03-14T16:42:10
110,269,279
5
0
MIT
2020-12-04T18:32:22
2017-11-10T16:39:00
Java
UTF-8
Java
false
false
510
java
package com.tokelon.toktales.core.engine.inject.annotation; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.inject.Qualifier; @Qualifier @Target({FIELD, PARAMETER, METHOD}) @Retention(RUNTIME) public @interface GlobalAssetKeyRegistry { }
[ "tokelontales@gmail.com" ]
tokelontales@gmail.com
5ec43b59f6228b24718cdd633dbfd884b621bec4
bac9bea9adc019065df002152a9b2725135cde9c
/cms/leimingtech-cms/src/main/java/com/leimingtech/cms/controller/businessconsulting/BusinessFrontController.java
278ad42c0069df1ab5f309f4659a70f311bb920b
[]
no_license
344436738/cms
7301b33d847077fecc59a000b5d45b4e08201511
bb627cdd1fe715db3f0c26f787444cc6c05a3665
refs/heads/master
2020-03-25T05:07:14.943878
2018-08-04T02:01:27
2018-08-04T02:01:27
143,430,160
0
0
null
null
null
null
UTF-8
Java
false
false
7,111
java
package com.leimingtech.cms.controller.businessconsulting; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import com.leimingtech.base.entity.temp.BusinessConsultingEntity; import net.sf.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.leimingtech.common.ContextHolderUtils; import com.leimingtech.common.hibernate.SortDirection; import com.leimingtech.common.Globals; import com.leimingtech.core.controller.BaseController; import com.leimingtech.base.entity.site.SiteEntity; import com.leimingtech.base.entity.temp.TSType; import com.leimingtech.base.entity.temp.TSTypegroup; import com.leimingtech.common.hibernate.qbc.CriteriaQuery; import com.leimingtech.common.hibernate.qbc.PageList; import com.leimingtech.core.service.BusinessConsultingServiceI; import com.leimingtech.core.service.CommonService; import com.leimingtech.core.service.SystemService; import com.leimingtech.core.util.PlatFormUtil; import com.leimingtech.core.util.StringUtils; /** * @Title: Controller * @Description: 业务咨询 * @author * @date 2016-03-31 14:27:11 * @version V1.0 * */ @Controller @RequestMapping("/front/businessFrontController") public class BusinessFrontController extends BaseController { private String message; /** 业务咨询接口 */ @Autowired private BusinessConsultingServiceI businessConsultingService; /** 系统接口 */ @Autowired private SystemService systemService; @Autowired private CommonService commonService; /** * 前台 业务咨询 * * @return */ @RequestMapping(params = "businessList") public ModelAndView businessList(HttpServletRequest reqeust){ //获取留言表列表 int pageSize = StringUtils.isEmpty(reqeust.getParameter("pageSize")) ? 20 : Integer.valueOf(reqeust.getParameter("pageSize")); int pageNo = StringUtils.isEmpty(reqeust.getParameter("pageNo")) ? 1 : Integer.valueOf(reqeust.getParameter("pageNo")); CriteriaQuery cq = new CriteriaQuery(BusinessConsultingEntity.class, pageSize, pageNo, "", ""); //排序条件 cq.addOrder("createtime",SortDirection.desc); cq.eq("replyStatus", "1"); cq.eq("siteid", PlatFormUtil.getFrontSessionSiteId()); cq.add(); List<BusinessConsultingEntity> businessList = commonService .getListByCriteriaQuery(cq, false); PageList pageList = commonService.getPageList(cq, true); List<BusinessConsultingEntity> resultList = pageList.getResultList(); int pageCount = (int)Math.ceil((double)pageList.getCount() / (double)pageSize); if(pageCount <= 0){ pageCount = 1; } Map<String, Object> m = new HashMap<String, Object>(); SiteEntity site = PlatFormUtil.getFrontSessionSite(); String sitePath = site.getSitePath(); List<TSType> departList = TSTypegroup.allTypes.get("depart");// 部门列表 List<TSType> classList = TSTypegroup.allTypes.get("business_class");// 业务类别 m.put("pageList", resultList); m.put("pageNo", pageList.getCurPageNO()); m.put("pageCount", pageCount); m.put("pageSize", pageSize); m.put("sitePath", sitePath); m.put("site", site); m.put("departList", departList); m.put("classList", classList); m.put("countNum", businessList.size()); m.put("searchUrl", "businessFrontController.do?businessList"); return new ModelAndView("wwwroot/" + sitePath + "/template/hudongjiaoliu/yewuzixun", m); } /** * 业务咨询保存 * * @return */ @RequestMapping(params = "saveBusiness") @ResponseBody public String saveBusiness(BusinessConsultingEntity businessConsulting,HttpServletRequest request) { JSONObject j = new JSONObject(); HttpSession session = com.leimingtech.common.ContextHolderUtils.getSession(); String randCode = session.getAttribute("randCode").toString();// 验证码 String code = request.getParameter("valicode"); if(!randCode.equalsIgnoreCase(code)){ message = "验证码错误!"; }else{ message = "添加成功"; businessConsulting.setMessageTime(new Date()); businessConsulting.setCreatetime(new Date());//创建时间 businessConsulting.setReplyStatus("0"); SiteEntity site = PlatFormUtil.getFrontSessionSite(); businessConsulting.setSiteid(site.getId()); businessConsultingService.save(businessConsulting); systemService.addLog(message, Globals.Log_Leavel_INFO, Globals.Log_Type_INSERT); j.accumulate("isSuccess", true); } j.accumulate("msg", message); String str = j.toString(); return str; } @RequestMapping(params = "hdjlhfzx") @ResponseBody public String hdjlhfzx(HttpServletRequest request) { CriteriaQuery cq = new CriteriaQuery(BusinessConsultingEntity.class); //排序条件 cq.addOrder("createtime",SortDirection.desc); cq.eq("replyStatus", "1"); cq.eq("siteid", PlatFormUtil.getFrontSessionSiteId()); cq.add(); List<BusinessConsultingEntity> businessList = commonService .getListByCriteriaQuery(cq, false); List<String> zxtimeList = new ArrayList<String>(); String zxdate=""; for (BusinessConsultingEntity business : businessList) { SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd"); zxdate=df.format(business.getMessageTime()); zxtimeList.add(zxdate); } JSONObject j = new JSONObject(); j.accumulate("businessList", businessList); j.accumulate("zxtimeList", zxtimeList); String str = j.toString(); return str ; } /** * 前台业务咨询详情 * * @return */ @RequestMapping(params = "businessDetail") public ModelAndView businessDetail(HttpServletRequest reqeust){ //获取留言表列表 String id = reqeust.getParameter("businessId"); //留言id BusinessConsultingEntity businessconsulting = businessConsultingService.getEntity(id); Map<String, Object> m = new HashMap<String, Object>(); SiteEntity site = PlatFormUtil.getFrontSessionSite(); String sitePath = site.getSitePath(); List<TSType> departList = TSTypegroup.allTypes.get("depart");// 部门列表 List<TSType> classList = TSTypegroup.allTypes.get("business_class");// 业务类别 m.put("sitePath", sitePath); m.put("site", site); m.put("departList", departList); m.put("classList", classList); m.put("businessconsulting", businessconsulting); return new ModelAndView("wwwroot/" + sitePath + "/template/hudongjiaoliu/yewuzixun_detail", m); } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "344436738@qq.com" ]
344436738@qq.com
d7ce24ed96355080bfd9df02ded241dbcc5ee45d
67cbc9c5125df76324d78624e2281cb1fefc8a12
/acceptanceTests/src/test/java/org/mifos/test/acceptance/framework/center/CreateCenterPreviewDataPage.java
2f73c6cebecaa5c9a0f1fa2e74d494ce3e890408
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mifos/1.5.x
86e785c062cb14be4597b33d15c38670c176120e
5734370912c47973de3889db21debb3ff7f0f6db
refs/heads/master
2023-08-28T09:48:46.266018
2010-07-12T04:43:46
2010-07-12T04:43:46
2,946,757
2
2
null
null
null
null
UTF-8
Java
false
false
1,314
java
/* * Copyright (c) 2005-2010 Grameen Foundation USA * 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. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.test.acceptance.framework.center; import org.mifos.test.acceptance.framework.MifosPage; import com.thoughtworks.selenium.Selenium; public class CreateCenterPreviewDataPage extends MifosPage { public CreateCenterPreviewDataPage() { super(); } public CreateCenterPreviewDataPage(Selenium selenium) { super(selenium); } public CreateCenterConfirmationPage submit() { selenium.click("previewcenter.button.submit"); waitForPageToLoad(); return new CreateCenterConfirmationPage(selenium); } }
[ "meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4" ]
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
7902298b3932860ecf1ce483134ac2bd9961a09a
757ff0e036d1c65d99424abb5601012d525c2302
/sources/com/fimi/kernel/utils/SizeTool.java
77c4d33deba3a2a7e19edb4258d2f6a7c7b7d549
[]
no_license
pk1z/wladimir-computin-FimiX8-RE-App
32179ef6f05efab0cf5af0d4957f0319abe04ad0
70603638809853a574947b65ecfaf430250cd778
refs/heads/master
2020-11-25T21:02:17.790224
2019-12-18T13:28:48
2019-12-18T13:28:48
228,845,415
0
0
null
null
null
null
UTF-8
Java
false
false
293
java
package com.fimi.kernel.utils; import android.content.Context; import android.util.TypedValue; public class SizeTool { public static int pixToDp(float value, Context context) { return (int) TypedValue.applyDimension(1, value, context.getResources().getDisplayMetrics()); } }
[ "you@example.com" ]
you@example.com
ff8583326f51823fbd66ef3a09c612efd343ee5d
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/4/org/jfree/chart/plot/XYPlot_setDomainGridlinesVisible_1805.java
0457f3f244f463448d0d90e50eac0ce5f10529d8
[]
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
6,494
java
org jfree chart plot gener plot data form pair plot data link dataset xydataset code plot xyplot code make link item render xyitemrender draw point plot render chart type produc link org jfree chart chart factori chartfactori method creat pre configur chart plot xyplot plot axi plot valueaxisplot pannabl set flag control domain grid line visibl flag chang link plot chang event plotchangeev regist listen param visibl flag domain gridlin visibl isdomaingridlinesvis set domain gridlin visibl setdomaingridlinesvis visibl domain gridlin visibl domaingridlinesvis visibl domain gridlin visibl domaingridlinesvis visibl fire chang event firechangeev
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
42c772cb2a9f861786c803ba51733e89b640daa3
6675ae81570c84e5c5feb7d0f0f91301fe57b311
/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalEqualAreaTest.java
1d6507b401b36dc9b3f04e158000890ecc39bb20
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
GeoPlatform/sis
babf402d7239bf285f6a3c80ca1f5bbdda01b5d5
5f24c696d3f54c1dfb5b42342cda2bdb6b80783b
refs/heads/trunk
2021-01-15T14:34:34.887850
2017-01-12T06:01:13
2017-01-12T06:01:13
78,760,242
0
0
null
2017-01-12T15:41:32
2017-01-12T15:41:32
null
UTF-8
Java
false
false
7,888
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.referencing.operation.projection; import org.opengis.util.FactoryException; import org.opengis.referencing.operation.TransformException; import org.apache.sis.internal.referencing.Formulas; import org.apache.sis.internal.referencing.provider.LambertCylindricalEqualArea; import org.apache.sis.internal.referencing.provider.LambertCylindricalEqualAreaSpherical; import org.apache.sis.referencing.operation.transform.CoordinateDomain; import org.apache.sis.test.DependsOnMethod; import org.junit.Test; import static java.lang.StrictMath.*; import static java.lang.Double.NaN; /** * Tests the {@link CylindricalEqualArea} class. * * @author Martin Desruisseaux (Geomatys) * @since 0.8 * @version 0.8 * @module */ public final strictfp class CylindricalEqualAreaTest extends MapProjectionTestCase { /** * Tests the derivatives at a few points. This method compares the derivatives computed by * the projection with an estimation of derivatives computed by the finite differences method. * * @throws TransformException if an error occurred while projecting a point. */ private void testDerivative() throws TransformException { final double delta = toRadians(100.0 / 60) / 1852; // Approximatively 100 metres. derivativeDeltas = new double[] {delta, delta}; tolerance = 1E-6; // More severe than Formulas.LINEAR_TOLERANCE. verifyDerivative(toRadians(15), toRadians( 30)); verifyDerivative(toRadians(10), toRadians(-60)); } /** * Tests <cite>Lambert Cylindrical Equal Area</cite> projection of a point in the in ellipsoidal case. * * @throws FactoryException if an error occurred while creating the map projection. * @throws TransformException if an error occurred while projecting a point. */ @Test public void testEllipsoidal() throws FactoryException, TransformException { createCompleteProjection(new LambertCylindricalEqualArea(), WGS84_A, // Semi-major axis length WGS84_B, // Semi-minor axis length 0, // Central meridian NaN, // Latitude of origin 0, // Standard parallel 1 NaN, // Standard parallel 2 NaN, // Scale factor (none) 0, // False easting 0); // False northing tolerance = Formulas.LINEAR_TOLERANCE; final double λ = 2; final double φ = 1; final double x = 222638.98; // Test point from Proj.4. final double y = 110568.81; verifyTransform(new double[] {λ, φ, -λ, φ, λ, -φ, -λ, -φ}, new double[] {x, y, -x, y, x, -y, -x, -y}); testDerivative(); } /** * Tests <cite>Lambert Cylindrical Equal Area</cite> projection of a point in the in spherical case. * * @throws FactoryException if an error occurred while creating the map projection. * @throws TransformException if an error occurred while projecting a point. */ @Test @DependsOnMethod("testEllipsoidal") public void testSpherical() throws FactoryException, TransformException { createCompleteProjection(new LambertCylindricalEqualArea(), 6371007, // Semi-major axis length 6371007, // Semi-minor axis length 0, // Central meridian NaN, // Latitude of origin 0, // Standard parallel 1 NaN, // Standard parallel 2 NaN, // Scale factor (none) 0, // False easting 0); // False northing tolerance = Formulas.LINEAR_TOLERANCE; final double λ = 2; final double φ = 1; final double x = 222390.10; // Anti-regression values (not from an external source). final double y = 111189.40; verifyTransform(new double[] {λ, φ, -λ, φ, λ, -φ, -λ, -φ}, new double[] {x, y, -x, y, x, -y, -x, -y}); testDerivative(); } /** * Tests <cite>Lambert Cylindrical Equal Area (Spherical)</cite> projection. * The difference between this test and {@link #testSpherical()} is that this case shall * compute the radius of the conformal sphere instead than using the semi-major axis length. * The result near the equator are almost the same however. * * @throws FactoryException if an error occurred while creating the map projection. * @throws TransformException if an error occurred while projecting a point. */ @Test @DependsOnMethod("testSpherical") public void testSphericalWithConformalSphereRadius() throws FactoryException, TransformException { createCompleteProjection(new LambertCylindricalEqualAreaSpherical(), WGS84_A, // Semi-major axis length WGS84_B, // Semi-minor axis length 0, // Central meridian NaN, // Latitude of origin 0, // Standard parallel 1 NaN, // Standard parallel 2 NaN, // Scale factor (none) 0, // False easting 0); // False northing tolerance = Formulas.LINEAR_TOLERANCE; final double λ = 2; final double φ = 1; final double x = 222390.10; // Anti-regression values (not from an external source). final double y = 111189.40; verifyTransform(new double[] {λ, φ, -λ, φ, λ, -φ, -λ, -φ}, new double[] {x, y, -x, y, x, -y, -x, -y}); testDerivative(); } /** * Tests conversion of random points with non-zero central meridian, standard parallel * and false easting/northing. * * @throws FactoryException if an error occurred while creating the map projection. * @throws TransformException if an error occurred while projecting a point. */ @Test public void testRandomPoints() throws FactoryException, TransformException { createCompleteProjection(new LambertCylindricalEqualArea(), WGS84_A, // Semi-major axis length WGS84_B, // Semi-minor axis length 12, // Central meridian NaN, // Latitude of origin (none) 24, // Standard parallel 1 NaN, // Standard parallel 2 NaN, // Scale factor (none) 300, // False easting 200); // False northing tolerance = Formulas.LINEAR_TOLERANCE; final double delta = toRadians(100.0 / 60) / 1852; // Approximatively 100 metres. derivativeDeltas = new double[] {delta, delta}; verifyInDomain(CoordinateDomain.GEOGRAPHIC_SAFE, 0); } }
[ "desruisseaux@apache.org" ]
desruisseaux@apache.org
87dc46e368d7e25c8232b812bcb89f3f395bfc7e
1bc8af5a64c7ba9ddb552b0fd2bea63a6cf82e9f
/app/src/main/java/com/hutao/androidappdesignproject/activity/helloChartsViewFramework/AboutActivity.java
3fb5b43788a0d449cacacfb1afa103d4bc477fc4
[]
no_license
hutaodediannao/AndroidFrameworkProject
1861b20c610719e238bdcfbced9cffcf1a2dac38
f132340c995b4d822d9557a6250df4093e24dd6b
refs/heads/master
2020-04-01T07:33:10.383628
2019-07-11T17:04:58
2019-07-11T17:04:58
152,994,024
2
0
null
null
null
null
UTF-8
Java
false
false
3,675
java
package com.hutao.androidappdesignproject.activity.helloChartsViewFramework; import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.hutao.androidappdesignproject.R; import com.hutao.androidappdesignproject.activity.ToolBarActivity; public class AboutActivity extends ToolBarActivity { @Override public String getToolbarTitleContent() { return "关于helloChart统计图框架"; } public static final String TAG = AboutActivity.class.getSimpleName(); public static final String GITHUB_URL = "github.com/lecho/hellocharts-android"; public static Pair<String, Integer> getAppVersionAndBuild(Context context) { try { PackageInfo pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); return new Pair<String, Integer>(pInfo.versionName, pInfo.versionCode); } catch (Exception e) { Log.e(TAG, "Could not get version number"); return new Pair<String, Integer>("", 0); } } @SuppressLint("DefaultLocale") public static boolean launchWebBrowser(Context context, String url) { try { url = url.toLowerCase(); if (!url.startsWith("http://") || !url.startsWith("https://")) { url = "http://" + url; } Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); ResolveInfo resolveInfo = context.getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); if (null == resolveInfo) { Log.e(TAG, "No activity to handle web intent"); return false; } context.startActivity(intent); Log.i(TAG, "Launching browser with url: " + url); return true; } catch (Exception e) { Log.e(TAG, "Could not start web browser", e); return false; } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit(); } } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_about, container, false); TextView version = (TextView) rootView.findViewById(R.id.version); version.setText(getAppVersionAndBuild(getActivity()).first); TextView gotToGithub = (TextView) rootView.findViewById(R.id.go_to_github); gotToGithub.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { launchWebBrowser(getActivity(), GITHUB_URL); } }); return rootView; } } }
[ "643759269@qq.com" ]
643759269@qq.com
d97e47daa3b2c21af4ddaa2ae76c4a724e9febea
4f4afacdd5d4ca9e44f4dea9bc6be48e73b363e4
/spring/distributed-transaction/pay-service-user/src/main/java/t5750/pay/service/user/dao/impl/RpUserPayInfoDaoImpl.java
8c215c86848371adb2cb3abf50c4a9e1f1e47437
[ "Apache-2.0" ]
permissive
andymiaomiao/framework-repositories
25264467bcf4da68d041fd99a9cb94ee7be18db6
68e4972a9994e5cf576d32d1b982e7e54812ed53
refs/heads/master
2023-03-19T02:06:02.589436
2021-03-07T01:53:32
2021-03-07T01:53:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package t5750.pay.service.user.dao.impl; import java.util.HashMap; import java.util.Map; import org.springframework.stereotype.Repository; import t5750.pay.common.core.dao.impl.BaseDaoImpl; import t5750.pay.service.user.dao.RpUserPayInfoDao; import t5750.pay.service.user.entity.RpUserPayInfo; /** * @类功能说明: 用户第三方支付信息dao实现类 @版本:V1.0 */ @Repository public class RpUserPayInfoDaoImpl extends BaseDaoImpl<RpUserPayInfo> implements RpUserPayInfoDao { /** * 通过商户编号获取商户第三方支付信息 * * @param userNo * @param payWayCode * @return */ @Override public RpUserPayInfo getByUserNo(String userNo, String payWayCode) { Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("userNo", userNo); paramMap.put("payWayCode", payWayCode); return super.getBy(paramMap); } }
[ "evangel_a@sina.com" ]
evangel_a@sina.com
a71c0c5a32e4bbadd2f2e6beb40cf4836b653d3e
6c443ded584ba44306b7761549b78ca4fc02aa79
/model/src/main/java/com/jxywkj/application/pet/model/business/BusinessBalanceBuffer.java
c6297d4d61ab2332c8b3cd75cdd3e057671c3b3d
[]
no_license
huji820/pet--consign-server
4710d41a8b3792314479ee5e6220c696e6dbb226
b05eeebac79361cb358ace2068ed244efe1d3b5b
refs/heads/master
2023-01-25T02:54:25.398166
2020-12-09T11:40:57
2020-12-09T11:40:57
319,938,513
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
package com.jxywkj.application.pet.model.business; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; /** * <p> * 商家提现预扣表 * </p> * * @author LiuXiangLin * @version 1.0 * @className BusinessBalanceBuffer * @date 2019/12/6 15:49 **/ @Data @ApiModel(description = "商家余额预扣表") public class BusinessBalanceBuffer { @ApiModelProperty(value = "商家") Business business; @ApiModelProperty(value = "订单类型") String billType; @ApiModelProperty(value = "订单编号") String billNo; @ApiModelProperty(value = "金额") BigDecimal amount; }
[ "101835518@qq.com" ]
101835518@qq.com
3d42265ebbbfb748665bc8f7dacf76cb21646b10
d3a370636327480fc94f440cb2457abd77187b71
/src/test/java/com/atlassian/jira/rest/client/api/IssueCommentsApiTest.java
dba2683b023cd9d597295aaacde34b680bec7bb2
[]
no_license
rajcarthy/jira-google-api-client
ebbf31924e881a77c6b794437139db345c496dcf
ec2804422fa660d34de8dbe800b53d4e57a685c5
refs/heads/master
2023-02-14T13:56:45.824124
2021-01-01T01:48:46
2021-01-01T01:48:46
325,901,356
0
0
null
null
null
null
UTF-8
Java
false
false
6,997
java
/* * The Jira Cloud platform REST API * Jira Cloud platform REST API documentation * * The version of the OpenAPI document: 1001.0.0-SNAPSHOT * Contact: ecosystem@atlassian.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.atlassian.jira.rest.client.api; import com.atlassian.jira.rest.client.model.Comment; import com.atlassian.jira.rest.client.model.IssueCommentListRequestBean; import com.atlassian.jira.rest.client.model.PageBeanComment; import com.atlassian.jira.rest.client.model.PageOfComments; import org.junit.Test; import org.junit.Ignore; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for IssueCommentsApi */ @Ignore public class IssueCommentsApiTest { private final IssueCommentsApi api = new IssueCommentsApi(); /** * Add comment * * Adds a comment to an issue. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Add comments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue containing the comment is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * * @throws IOException * if the Api call fails */ @Test public void addCommentTest() throws IOException { String issueIdOrKey = null; Map<String, Object> requestBody = null; String expand = null; Comment response = api.addComment(issueIdOrKey, requestBody, expand); // TODO: test validations } /** * Delete comment * * Deletes a comment. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue containing the comment is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * *Delete all comments*[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any comment or *Delete own comments* to delete comment created by the user, * If the comment has visibility restrictions, the user belongs to the group or has the role visibility is restricted to. * * @throws IOException * if the Api call fails */ @Test public void deleteCommentTest() throws IOException { String issueIdOrKey = null; String id = null; api.deleteComment(issueIdOrKey, id); // TODO: test validations } /** * Get comment * * Returns a comment. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the comment. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, the user belongs to the group or has the role visibility is restricted to. * * @throws IOException * if the Api call fails */ @Test public void getCommentTest() throws IOException { String issueIdOrKey = null; String id = null; String expand = null; Comment response = api.getComment(issueIdOrKey, id, expand); // TODO: test validations } /** * Get comments * * Returns all comments for an issue. This operation can be accessed anonymously. **[Permissions](#permissions) required:** Comments are included in the response where the user has: * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the comment. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is role visibility is restricted to. * * @throws IOException * if the Api call fails */ @Test public void getCommentsTest() throws IOException { String issueIdOrKey = null; Long startAt = null; Integer maxResults = null; String orderBy = null; String expand = null; PageOfComments response = api.getComments(issueIdOrKey, startAt, maxResults, orderBy, expand); // TODO: test validations } /** * Get comments by IDs * * Returns a [paginated](#pagination) list of just the comments for a list of comments specified by comment IDs. This operation can be accessed anonymously. **[Permissions](#permissions) required:** Comments are returned where the user: * has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the comment. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. * * @throws IOException * if the Api call fails */ @Test public void getCommentsByIdsTest() throws IOException { IssueCommentListRequestBean issueCommentListRequestBean = null; String expand = null; PageBeanComment response = api.getCommentsByIds(issueCommentListRequestBean, expand); // TODO: test validations } /** * Update comment * * Updates a comment. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue containing the comment is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * *Edit all comments*[ project permission](https://confluence.atlassian.com/x/yodKLg) to update any comment or *Edit own comments* to update comment created by the user. * If the comment has visibility restrictions, the user belongs to the group or has the role visibility is restricted to. * * @throws IOException * if the Api call fails */ @Test public void updateCommentTest() throws IOException { String issueIdOrKey = null; String id = null; Map<String, Object> requestBody = null; String expand = null; Comment response = api.updateComment(issueIdOrKey, id, requestBody, expand); // TODO: test validations } }
[ "uyscuti@localhost.localdomain" ]
uyscuti@localhost.localdomain
5b9c8f310b1a5171efbd165c88ee8c4d6c57db72
4aa8f43d1d3e25075f05cd835e0d90fe6143aca4
/Plugins/org.feature.model.constraint.resource.csl.ui/src/gen/java/org/feature/model/constraint/resource/csl/ui/CslColorManager.java
02f24d271405700f008b1e487362c0e14910cc4d
[]
no_license
multi-perspectives/cluster
bb8adb5f1710eb502e1d933375e9d51da9bb2c7c
8c3f2ccfc784fb0e0cce7411f75e18e25735e9f8
refs/heads/master
2016-09-05T11:23:16.096796
2014-03-13T20:07:59
2014-03-13T20:07:59
2,890,695
0
1
null
2012-11-22T14:58:18
2011-12-01T11:41:12
Java
UTF-8
Java
false
false
1,100
java
/** * <copyright> * </copyright> * * */ package org.feature.model.constraint.resource.csl.ui; /** * A class for RGB-based color objects. */ public class CslColorManager { protected java.util.Map<org.eclipse.swt.graphics.RGB, org.eclipse.swt.graphics.Color> fColorTable = new java.util.LinkedHashMap<org.eclipse.swt.graphics.RGB, org.eclipse.swt.graphics.Color>(10); /** * Disposes all colors in the cache. */ public void dispose() { java.util.Iterator<org.eclipse.swt.graphics.Color> e = fColorTable.values().iterator(); while (e.hasNext()) { e.next().dispose(); } } /** * Constructs and caches the given color. * * @param rgb The color as org.eclipse.swt.graphics.RGB * * @return The color (from cache or newly constructed) */ public org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb) { org.eclipse.swt.graphics.Color color = fColorTable.get(rgb); if (color == null) { color = new org.eclipse.swt.graphics.Color(org.eclipse.swt.widgets.Display.getCurrent(), rgb); fColorTable.put(rgb, color); } return color; } }
[ "julia.schroeter@sap.com" ]
julia.schroeter@sap.com
a696675fb5880ff69c97827a57790df68ae892ce
41650d800965e07477d46e5161dd18b541067e5a
/src/main/java/com/dmatek/zgb/db/access/service/impl/AccessServiceImp.java
eb46b65dc3a804abeea9442de307e97b6cd94dd0
[]
no_license
287396159/ZGBWEBSSM
7a9a0a53fb8423f48bbbb80c1e5bd18cc2ba95ee
90eccec48e2fc6bf8db9254f62ac296608d7e781
refs/heads/master
2022-07-15T11:54:47.976581
2019-08-27T09:01:41
2019-08-27T09:01:41
204,664,275
0
0
null
2022-06-21T01:45:24
2019-08-27T09:08:42
JavaScript
UTF-8
Java
false
false
2,452
java
package com.dmatek.zgb.db.access.service.impl; import java.util.Date; import java.util.List; import org.apache.logging.log4j.util.Strings; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.dmatek.zgb.access.bean.TagAccessRecord; import com.dmatek.zgb.db.access.dao.AccessDao; import com.dmatek.zgb.db.access.service.AccessService; @Service("accessService") public class AccessServiceImp implements AccessService{ @Autowired private AccessDao accessDao; @Override public boolean addAccessRecord(TagAccessRecord accessRecord) throws Exception { if(null != accessRecord) { return accessDao.addAccessRecord(accessRecord); } return false; } @Override public boolean deleteAccessRecord(String uuid) throws Exception { if(!Strings.isEmpty(uuid)) { return accessDao.deleteAccessRecord(uuid); } return false; } @Override public List<TagAccessRecord> findAllRecordOneDay(String tagId, int accessType, Date accessTime) throws Exception { if(!Strings.isEmpty(tagId) && null != accessTime) { return accessDao.findAllRecordOneDay(tagId, accessType, accessTime); } return null; } @Override public TagAccessRecord findOne(String tagId, int groupId, int accessType, Date accessTime) throws Exception { if(!Strings.isEmpty(tagId) && null != accessTime) { return accessDao.findOne(tagId, groupId, accessType, accessTime); } return null; } @Override public List<TagAccessRecord> findGroupTypeTime(int groupId, int accessType, Date accessTime) throws Exception { if(null != accessTime) { return accessDao.findGroupTypeTime(groupId, accessType, accessTime); } return null; } @Override public List<TagAccessRecord> findGroupTime(int groupId, Date accessTime) throws Exception { if(null != accessTime) { return accessDao.findGroupTime(groupId, accessTime); } return null; } /** * 查询所有的记录讯息 */ @Override public List<TagAccessRecord> findAll() throws Exception { return accessDao.findAll(); } @Override public List<TagAccessRecord> searchTagAccessRecords(String name, String companyNo, String jobTypeNo, int groupId, Date start, Date end) throws Exception { return accessDao.searchTagAccessRecords(name, companyNo, jobTypeNo, groupId, start, end); } @Override public void clearRecords(int days) throws Exception { if(days > 0) { accessDao.clearRecords(days); } } }
[ "admin@qq.com" ]
admin@qq.com
82e4bee2cd8af08d990ec012fde81ff8f1a15dd2
339dc758ccb36e84c548923f4aa49e8aab43ccc7
/connectors/infinispan/translator-infinispan-hotrod/src/main/java/org/teiid/translator/infinispan/hotrod/InfinispanResponse.java
a561a829e9b0673e5eacb841950c07e48435951c
[ "Apache-2.0" ]
permissive
xiaowuustc/teiid
28b524fb2754a4665da96a9437aa7828d6d3baa2
99a3ea354c333f797c575e2ccb39fd9114039156
refs/heads/master
2021-01-23T15:30:55.634771
2017-09-06T20:44:18
2017-09-06T20:44:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,986
java
/* * Copyright Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags and * the COPYRIGHT.txt file distributed with this work. * * 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.teiid.translator.infinispan.hotrod; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Map; import org.infinispan.client.hotrod.RemoteCache; import org.infinispan.client.hotrod.Search; import org.infinispan.query.dsl.Query; import org.infinispan.query.dsl.QueryFactory; import org.teiid.infinispan.api.InfinispanDocument; import org.teiid.translator.document.DocumentNode; public class InfinispanResponse { private Query query; private int batchSize; private Integer offset; private Integer limit; private boolean lastBatch = false; private Iterator<Object> responseIter; private List<String> projected; private DocumentNode documentNode; private List<Map<String, Object>> currentDocumentRows; public InfinispanResponse(RemoteCache<Object, Object> cache, String queryStr, int batchSize, Integer limit, Integer offset, List<String> projected, DocumentNode documentNode) { this.batchSize = batchSize; this.offset = offset == null?0:offset; this.limit = limit; this.projected = projected; this.documentNode = documentNode; QueryFactory qf = Search.getQueryFactory(cache); this.query = qf.create(queryStr); } private void fetchNextBatch() { query.startOffset(offset); int nextBatch = this.batchSize; if (this.limit != null) { if (this.limit > nextBatch) { this.limit = this.limit - nextBatch; } else { nextBatch = this.limit; this.limit = 0; this.lastBatch = true; } } query.maxResults(nextBatch); List<Object> values = query.list(); if (query.getResultSize() < nextBatch) { this.lastBatch = true; } this.responseIter = values.iterator(); offset = offset + nextBatch; } public List<Object> getNextRow(){ if (this.currentDocumentRows != null && !this.currentDocumentRows.isEmpty()) { return buildRow(this.currentDocumentRows.remove(0)); } if (responseIter == null) { fetchNextBatch(); } if (responseIter != null && responseIter.hasNext()){ Object row = this.responseIter.next(); if (row instanceof Object[]) { return Arrays.asList((Object[])row); } this.currentDocumentRows = this.documentNode.tuples((InfinispanDocument)row); } else { if (lastBatch) { return null; } else { fetchNextBatch(); Object row = this.responseIter.next(); if (row instanceof Object[]) { return Arrays.asList((Object[])row); } this.currentDocumentRows = this.documentNode.tuples((InfinispanDocument)row); } } return getNextRow(); } private List<Object> buildRow(Map<String, Object> row) { ArrayList<Object> result = new ArrayList<>(); for (String attr : this.projected) { result.add(row.get(attr)); } return result; } }
[ "shawkins@redhat.com" ]
shawkins@redhat.com
d80640d56c788b98af0561cc9caa1b00c21da840
8823c96d433605e7c13679b027a697e6a647cf9c
/src/main/java/com/lzhlyle/leetcode/self/no42/TrappingRainWater_Stack.java
1e4b333ecd1e49418f71bf0db6e69d4542a58210
[ "MIT" ]
permissive
lzhlyle/leetcode
62278bf6e949f802da335e8de2d420440f578c2f
8f053128ed7917c231fd24cfe82552d9c599dc16
refs/heads/master
2022-07-14T02:28:11.082595
2020-11-16T14:28:20
2020-11-16T14:28:20
215,598,819
2
0
MIT
2022-06-17T02:55:41
2019-10-16T16:52:05
Java
UTF-8
Java
false
false
732
java
package com.lzhlyle.leetcode.self.no42; import java.util.Stack; public class TrappingRainWater_Stack { public int trap(int[] height) { int sum = 0; Stack<Integer> indexStack = new Stack<>(); // desc for (int i = 0; i < height.length; i++) { while (!indexStack.isEmpty() && height[i] >= height[indexStack.peek()]) { int h = height[indexStack.pop()]; if (indexStack.isEmpty()) break; int width = i - indexStack.peek() - 1; int min = Math.min(height[i], height[indexStack.peek()]); sum += width * (min - h); } indexStack.push(i); } return sum; } }
[ "lzhlyle@msn.cn" ]
lzhlyle@msn.cn
8f298cd1b70a85681a6dfad5fb09510816625857
ba26af1bfe70673303f39fb34bf83f5c08ed5905
/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchSchema.java
37641ebb19d3c77e0c724fdcb68ba1bde296e554
[ "MIT" ]
permissive
GinPonson/Quicksql
5a4a6671e87b3278e2d77eee497a4910ac340617
e31f65fb96ea2f2c373ba3acc43473a48dca10d1
refs/heads/master
2020-07-30T06:23:41.805009
2019-09-22T08:50:18
2019-09-22T08:50:18
210,116,844
0
0
MIT
2019-09-22T08:48:23
2019-09-22T08:48:23
null
UTF-8
Java
false
false
5,170
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.calcite.adapter.elasticsearch; import org.apache.calcite.schema.Table; import org.apache.calcite.schema.impl.AbstractSchema; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; import org.elasticsearch.client.Response; import org.elasticsearch.client.RestClient; import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.util.*; /** * Schema mapped onto an index of ELASTICSEARCH types. * * <p>Each table in the schema is an ELASTICSEARCH type in that index. */ public class ElasticsearchSchema extends AbstractSchema { private final String index; private final RestClient client; private final ObjectMapper mapper; private final Map<String, Table> tableMap; /** * Allows schema to be instantiated from existing elastic search client. * This constructor is used in tests. * @param client existing client instance * @param mapper mapper for JSON (de)serialization * @param index name of ES index */ public ElasticsearchSchema(RestClient client, ObjectMapper mapper, String index) { this(client, mapper, index, null); } //Updated by qsql-team public ElasticsearchSchema(RestClient client, String index) { this.client = Objects.requireNonNull(client, "client"); this.mapper = new ObjectMapper(); this.index = Objects.requireNonNull(index, "index"); this.tableMap = new HashMap<>(); } //Updated by qsql-team public RestClient getClient() { return client; } public void addTable(String type, Table table) { if(tableMap instanceof ImmutableMap) throw new RuntimeException("error metadata class"); tableMap.put(type, table); } public ElasticsearchSchema(RestClient client, ObjectMapper mapper, String index, String type) { super(); this.client = Objects.requireNonNull(client, "client"); this.mapper = Objects.requireNonNull(mapper, "mapper"); this.index = Objects.requireNonNull(index, "index"); if (type == null) { try { this.tableMap = createTables(listTypesFromElastic()); } catch (IOException e) { throw new UncheckedIOException("Couldn't get types for " + index, e); } } else { this.tableMap = createTables(Collections.singleton(type)); } } @Override protected Map<String, Table> getTableMap() { return tableMap; } private Map<String, Table> createTables(Iterable<String> types) { final ImmutableMap.Builder<String, Table> builder = ImmutableMap.builder(); for (String type : types) { builder.put(type, new ElasticsearchTable(client, mapper, index, type)); } return builder.build(); } /** * Queries {@code _mapping} definition to automatically detect all types for an index * * @return list of types associated with this index * @throws IOException for any IO related issues * @throws IllegalStateException if reply is not understood */ private Set<String> listTypesFromElastic() throws IOException { final String endpoint = "/" + index + "/_mapping"; final Response response = client.performRequest("GET", endpoint); try (InputStream is = response.getEntity().getContent()) { JsonNode root = mapper.readTree(is); if (!root.isObject() || root.size() != 1) { final String message = String.format(Locale.ROOT, "Invalid response for %s/%s " + "Expected object of size 1 got %s (of size %d)", response.getHost(), response.getRequestLine(), root.getNodeType(), root.size()); throw new IllegalStateException(message); } JsonNode mappings = root.iterator().next().get("mappings"); if (mappings == null || mappings.size() == 0) { final String message = String.format(Locale.ROOT, "Index %s does not have any types", index); throw new IllegalStateException(message); } Set<String> types = Sets.newHashSet(mappings.fieldNames()); types.remove("_default_"); return types; } } public String getIndex() { return index; } } // End ElasticsearchSchema.java
[ "xushengguo-xy@360.cn" ]
xushengguo-xy@360.cn