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
7d5881d413b0aaf0340c29494533ec7703360080
e7dd0bdcb5b447804ca90aafbccbd9bfda4c44f7
/src/kelmore5/java/dewan/Assignments/Assignment7/mp/commands/RotateLeftArm.java
5d86d67306bc91fc5cfc5bc6c7d5bc6faecb5d87
[]
no_license
kelmore5/Archives-Java
2ece6a69c8e87996e58e778c95ac51a4698d0126
5a53a23275317bfd46cfa648492ddb4148981728
refs/heads/master
2021-01-23T05:09:39.964811
2017-03-27T01:26:09
2017-03-27T01:26:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
package kelmore5.java.dewan.Assignments.Assignment7.mp.commands; import kelmore5.java.dewan.Assignments.Assignment7.mp.tokens.WordToken; import util.annotations.Tags; @Tags({"Word", "RotateLeftArm"}) public class RotateLeftArm extends WordToken { public RotateLeftArm(String input) { super(input); } }
[ "kelmore5" ]
kelmore5
6784adede26ee523cd1f62f8344608bacea3c1f6
f6899a2cf1c10a724632bbb2ccffb7283c77a5ff
/glassfish/security/core/src/main/java/com/sun/enterprise/security/auth/login/common/X509CertificateCredential.java
6e0b747d3036731939499731d370e02050b20d7e
[]
no_license
Appdynamics/OSS
a8903058e29f4783e34119a4d87639f508a63692
1e112f8854a25b3ecf337cad6eccf7c85e732525
refs/heads/master
2023-07-22T03:34:54.770481
2021-10-28T07:01:57
2021-10-28T07:01:57
19,390,624
2
13
null
2023-07-08T02:26:33
2014-05-02T22:42:20
null
UTF-8
Java
false
false
4,726
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can * obtain a copy of the License at * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html * or packager/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at packager/legal/LICENSE.txt. * * GPL Classpath Exception: * Oracle designates this particular file as subject to the "Classpath" * exception as provided by Oracle in the GPL Version 2 section of the License * file that accompanied this code. * * Modifications: * If applicable, add the following below the License Header, with the fields * enclosed by brackets [] replaced by your own identifying information: * "Portions Copyright [year] [name of copyright owner]" * * Contributor(s): * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package com.sun.enterprise.security.auth.login.common; import java.security.cert.X509Certificate; import java.util.Arrays; /** * This class holds the user certificate for the certificate realm and the * realm name. This credential is added as a public credential to the * JAAS subject. */ public class X509CertificateCredential { private X509Certificate[] certChain; private String realm; private String alias; /** * Construct a credential with the specified X509Certificate certificate * chain, realm name and alias. * @param the X509Certificate. * @param the alias for the certificate * @param the realm name. The only value supported for now is "certificate". */ public X509CertificateCredential(X509Certificate[] certChain, String alias, String realm) { this.certChain = certChain; this.alias = alias; this.realm = realm; } /** * Return the alias for the certificate. * @return the alias. */ public String getAlias() { return alias; } /** * Return the realm name. * @return the realm name. Only value supported for now is "certificate". */ public String getRealm() { return realm; } /** * Return the chain of certificates. * @return the chain of X509Certificates. */ public X509Certificate[] getX509CertificateChain() { return certChain; } /** * Compare two instances of the credential and return true if they are * the same and false otherwise. * @return true if the instances are equal, false otherwise. */ public boolean equals(Object o) { if(o instanceof X509CertificateCredential) { X509CertificateCredential pc = (X509CertificateCredential) o; if(pc.getRealm().equals(realm) && pc.getAlias().equals(alias)) { X509Certificate[] certs = pc.getX509CertificateChain(); for(int i = 0; i < certs.length; i++) { if(!certs[i].equals(certChain[i])) { return false; } } return true; } } return false; } /** * Return the hashCode computed from the certificate, realm and alias. * @return the hash code. */ public int hashCode() { return Arrays.hashCode(certChain) + realm.hashCode() + ((alias != null)?alias.hashCode():0); } /** * String representation of the credential. */ public String toString() { String s = "Realm=" + realm; s = s + " alias=" + alias; StringBuffer certChainStr = new StringBuffer(""); for (int i=0; i < certChain.length; i++) { certChainStr.append(certChain[i].toString()); certChainStr.append("\n"); } s = s + " X509Certificate=" + certChainStr.toString(); return s; } }
[ "srini@appdynamics.com" ]
srini@appdynamics.com
b8cc07af7fdbe05ac17ec633bafd1f7de1b8f1d2
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/After/after_842.java
38ac189b3c96b19ac19e5406d242da2f3cf9e726
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
297
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { String sql = "SELECT EMPLOYEE_ID, MANAGER_ID FROM EMPLOYEES WHERE MANAGER_ID > ?"; PreparedStatement stmt = conn.prepareStatement(sql); stmt.setObject(1 , val2); stmt.setObject(2 , ); stmt.executeQuery(); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
964826eac57d99beb6ef4ee0aafa42cc926c4d33
8b82369d50b41495d46f3403dc1051a7bdcb9c70
/EMFtoProlog/src/SATEL/AlgebraicExpressions/AlgEquality.java
cd3f5f10c825046fecad285af5f8a7116a844c81
[]
no_license
githubbrunob/DSLTransGIT
7dd106ffdddbd0eeda4642c931c41d2ceb4961c2
efbbb5dacc02d5cb3365422a46cf00805baab13e
refs/heads/master
2020-04-07T03:53:43.455696
2017-04-30T20:44:23
2017-04-30T20:44:23
12,057,373
1
1
null
2017-09-12T13:43:19
2013-08-12T14:08:05
Java
UTF-8
Java
false
false
2,872
java
/** * <copyright> * </copyright> * * $Id: AlgEquality.java,v 1.1 2011/09/27 18:59:52 domingues Exp $ */ package SATEL.AlgebraicExpressions; import SATEL.AlgebraicExpressions.algterms.AlgebraicTerm; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Alg Equality</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link SATEL.AlgebraicExpressions.AlgEquality#getAlgebraicTermL <em>Algebraic Term L</em>}</li> * <li>{@link SATEL.AlgebraicExpressions.AlgEquality#getAlgebraicTermR <em>Algebraic Term R</em>}</li> * </ul> * </p> * * @see SATEL.AlgebraicExpressions.AlgebraicExpressionsPackage#getAlgEquality() * @model * @generated */ public interface AlgEquality extends AlgebraicEquality { /** * Returns the value of the '<em><b>Algebraic Term L</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Algebraic Term L</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Algebraic Term L</em>' containment reference. * @see #setAlgebraicTermL(AlgebraicTerm) * @see SATEL.AlgebraicExpressions.AlgebraicExpressionsPackage#getAlgEquality_AlgebraicTermL() * @model containment="true" required="true" ordered="false" * @generated */ AlgebraicTerm getAlgebraicTermL(); /** * Sets the value of the '{@link SATEL.AlgebraicExpressions.AlgEquality#getAlgebraicTermL <em>Algebraic Term L</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Algebraic Term L</em>' containment reference. * @see #getAlgebraicTermL() * @generated */ void setAlgebraicTermL(AlgebraicTerm value); /** * Returns the value of the '<em><b>Algebraic Term R</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Algebraic Term R</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Algebraic Term R</em>' containment reference. * @see #setAlgebraicTermR(AlgebraicTerm) * @see SATEL.AlgebraicExpressions.AlgebraicExpressionsPackage#getAlgEquality_AlgebraicTermR() * @model containment="true" required="true" ordered="false" * @generated */ AlgebraicTerm getAlgebraicTermR(); /** * Sets the value of the '{@link SATEL.AlgebraicExpressions.AlgEquality#getAlgebraicTermR <em>Algebraic Term R</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Algebraic Term R</em>' containment reference. * @see #getAlgebraicTermR() * @generated */ void setAlgebraicTermR(AlgebraicTerm value); } // AlgEquality
[ "mailbrunob@gmail.com" ]
mailbrunob@gmail.com
bc0497b72a3a9a229d0af5f820bfcfea0d7b46e2
8c2e243ce8bcfce4f67c50c7ba6340e874633cda
/com/google/android/gms/internal/zzari.java
2bab29521538f2552250a5d8e2bfc194c285ef55
[]
no_license
atresumes/Tele-2
f84a095a48ccd5b423acf14268e600fc59635a36
e98d32baab40b8dfc7f2c30d165b73393a1b0dd9
refs/heads/master
2020-03-21T11:22:20.490680
2018-06-24T17:45:25
2018-06-24T17:45:25
138,503,432
0
1
null
null
null
null
UTF-8
Java
false
false
2,161
java
package com.google.android.gms.internal; import android.content.Context; import android.os.Bundle; import android.os.DeadObjectException; import android.os.IBinder; import android.os.IInterface; import android.os.Looper; import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks; import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener; import com.google.android.gms.common.internal.zzg; import com.google.android.gms.common.internal.zzl; import com.google.android.gms.internal.zzarr.zza; public class zzari extends zzl<zzarr> { private final String zzbjU; protected final zzasb<zzarr> zzbjV = new C07391(this); class C07391 implements zzasb<zzarr> { final /* synthetic */ zzari zzbjW; C07391(zzari com_google_android_gms_internal_zzari) { this.zzbjW = com_google_android_gms_internal_zzari; } public zzarr zzHz() throws DeadObjectException { return (zzarr) this.zzbjW.zzwW(); } public void zzwV() { this.zzbjW.zzwV(); } public /* synthetic */ IInterface zzwW() throws DeadObjectException { return zzHz(); } } public zzari(Context context, Looper looper, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener, String str, zzg com_google_android_gms_common_internal_zzg) { super(context, looper, 23, com_google_android_gms_common_internal_zzg, connectionCallbacks, onConnectionFailedListener); this.zzbjU = str; } protected zzarr zzdf(IBinder iBinder) { return zza.zzdi(iBinder); } protected String zzeu() { return "com.google.android.location.internal.GoogleLocationManagerService.START"; } protected String zzev() { return "com.google.android.gms.location.internal.IGoogleLocationManagerService"; } protected /* synthetic */ IInterface zzh(IBinder iBinder) { return zzdf(iBinder); } protected Bundle zzql() { Bundle bundle = new Bundle(); bundle.putString("client_name", this.zzbjU); return bundle; } }
[ "40494744+atresumes@users.noreply.github.com" ]
40494744+atresumes@users.noreply.github.com
b0c520cfc73401736b0010db25665eb88d48f69e
5011795af6079497fb17a1caf7705fde0a079231
/kdb/src/main/java/com/nahuo/kdb/mvp/RequestError.java
b8bf54a135576e707451be8024d040b4d54930de
[]
no_license
JameChen/kdb
0bac9386e5d9d80392f618bc799dc11b8e916fd7
edf97f8b340118806a625f0b2ae6e00a2abcdd20
refs/heads/master
2020-07-13T09:34:02.164473
2019-08-29T02:12:17
2019-08-29T02:12:17
205,057,004
1
1
null
null
null
null
UTF-8
Java
false
false
1,349
java
package com.nahuo.kdb.mvp; /** * Created by ZZB on 2015/6/4 14:27 */ public class RequestError { public int statusCode; public String msg; public String method; /** * 是否服务器异常,isServerExp==false:请求正常code==200但返回的result为fail; * isServerExp==true:请求异常code!=200(包括网络不通,404 500...等异常) */ public boolean isServerExp = false; public RequestError() { } public RequestError(String method) { this.method = method; } public RequestError(String method, String msg) { this.msg = msg; this.method = method; } // public RequestError(String method, int statusCode, String msg) { // this.statusCode = statusCode; // this.msg = msg; // this.method = method; // } public RequestError(String method, int statusCode, String msg, boolean isServerExp) { this.statusCode = statusCode; this.msg = msg; this.method = method; this.isServerExp = isServerExp; } @Override public String toString() { return "RequestError{" + "statusCode=" + statusCode + ", msg='" + msg + '\'' + ", method='" + method + '\'' + ", isServerExp=" + isServerExp + '}'; } }
[ "1210686304@qq.com" ]
1210686304@qq.com
f8bf64a5a1194c2abaa721ac7cb9c6ce2ac6c913
8a4f835c9f488a9f848c28c0149cf6e33f2a2b99
/locman-api/src/main/java/com/run/locman/api/timer/crud/repository/FaultOrderProcessCudRepository.java
352a7206f563b35e0a6183bbf079b238c54da159
[]
no_license
zhfly1992/locman
7b2e06ebfab18a9c602ba2ea3b0bedfbb8a3b290
aae464cfa5b25baaaa8ee4eea5659b184ea62339
refs/heads/master
2023-01-05T23:24:57.121823
2020-11-04T03:05:22
2020-11-04T03:05:22
309,865,193
0
1
null
null
null
null
UTF-8
Java
false
false
1,037
java
package com.run.locman.api.timer.crud.repository; import com.run.locman.api.crud.repository.BaseCrudRepository; import com.run.locman.api.entity.FaultOrderProcess; import java.util.Map; /** * @Description: * @author: 郭飞龙 * @version: 1.0, 2018年7月5日 */ public interface FaultOrderProcessCudRepository extends BaseCrudRepository<FaultOrderProcess, String> { /** * * @Description:新增故障工单 * @param params * @return * @throws Exception */ int addFaultOrder(Map<String, Object> params) throws Exception; /** * * @Description:修改故障工单 * @param params * @return * @throws Exception */ int updateFaultOrder(Map<String, Object> params) throws Exception; /** * * @Description:查询获取故障工单流水号 * @param accessSecret 密钥 * @return 流水号 */ String querySerialNumber(String accessSecret) ; /** * * @Description:查询故障工单的故障描述 * @param id 故障工单id * @return */ String queryMark(String id) ; }
[ "zhanghe" ]
zhanghe
2d2bb53547335a85c069a9e55cf22040e796dbd2
c9b2b1c3d34d08f1ee81d70b6307ea638c436e6e
/proxy-start/src/main/java/hello/proxy/config/v1_proxy/interface_proxy/OrderControllerInterfaceProxy.java
39d24a4cedd5d566d918c334857ffd2e711ec7c8
[]
no_license
defianz/spring-advanced
4820667d6db70b7b4d7ab13159304fc6b5fa197d
d0f51ffc1e593740f5f9c4251af33b53cbc00f93
refs/heads/master
2023-08-28T22:30:57.506862
2021-11-07T10:26:37
2021-11-07T10:26:37
424,205,194
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package hello.proxy.config.v1_proxy.interface_proxy; import hello.proxy.app.v1.OrderControllerV1; import hello.proxy.trace.TraceStatus; import hello.proxy.trace.logtrace.LogTrace; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor public class OrderControllerInterfaceProxy implements OrderControllerV1 { private final OrderControllerV1 target; private final LogTrace logTrace; @Override public String request(String itemId) { TraceStatus status = null; try{ status = logTrace.begin("OrderController.request()"); String result = target.request(itemId); logTrace.end(status); return result; } catch (Exception e){ logTrace.exception(status,e); throw e; } } @Override public String noLog() { return target.noLog(); } }
[ "iautm91@gmail.com" ]
iautm91@gmail.com
af477d314fc39347b55a7eaf21ebfa4a722c1ff2
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/com/vaadin/server/VaadinSessionTest.java
080bbfa0a21e9e2d5844a236be6b7ce5fb42eb4a
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
7,841
java
package com.vaadin.server; import com.vaadin.server.ClientConnector.DetachEvent; import com.vaadin.ui.Label; import com.vaadin.ui.UI; import com.vaadin.util.CurrentInstance; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.Lock; import javax.servlet.ServletConfig; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionBindingEvent; import org.easymock.EasyMock; import org.junit.Assert; import org.junit.Test; public class VaadinSessionTest implements Serializable { private transient VaadinSession session; private transient VaadinServlet mockServlet; private transient VaadinServletService mockService; private transient ServletConfig mockServletConfig; private transient HttpSession mockHttpSession; private transient WrappedSession mockWrappedSession; private transient VaadinServletRequest vaadinRequest; private transient UI ui; private transient Lock httpSessionLock; /** * This reproduces #14452 situation with deadlock - see diagram */ @Test public void testInvalidationDeadlock() { // this simulates servlet container's session invalidation from another // thread new Thread(() -> { try { Thread.sleep(150);// delay selected so that VaadinSession // will be already locked by the main // thread // when we get here httpSessionLock.lock();// simulating servlet container's // session lock try { mockService.fireSessionDestroy(session); } finally { httpSessionLock.unlock(); } } catch (InterruptedException e) { throw new RuntimeException(e); } }).start(); try { mockService.findVaadinSession(vaadinRequest); } catch (Exception e) { throw new RuntimeException(e); } } @Test public void threadLocalsAfterUnderlyingSessionTimeout() throws InterruptedException { final AtomicBoolean detachCalled = new AtomicBoolean(false); ui.addDetachListener((DetachEvent event) -> { detachCalled.set(true); assertEquals(ui, UI.getCurrent()); assertEquals(ui.getPage(), Page.getCurrent()); assertEquals(session, VaadinSession.getCurrent()); assertEquals(mockService, VaadinService.getCurrent()); assertEquals(mockServlet, VaadinServlet.getCurrent()); }); session.valueUnbound(EasyMock.createMock(HttpSessionBindingEvent.class)); // as soon as we changed session.accessSynchronously // to session.access in VaadinService.fireSessionDestroy, // we need to run the pending task ourselves mockService.runPendingAccessTasks(session); Assert.assertTrue(detachCalled.get()); } @Test public void threadLocalsAfterSessionDestroy() throws InterruptedException { final AtomicBoolean detachCalled = new AtomicBoolean(false); ui.addDetachListener((DetachEvent event) -> { detachCalled.set(true); assertEquals(ui, UI.getCurrent()); assertEquals(ui.getPage(), Page.getCurrent()); assertEquals(session, VaadinSession.getCurrent()); assertEquals(mockService, VaadinService.getCurrent()); assertEquals(mockServlet, VaadinServlet.getCurrent()); }); CurrentInstance.clearAll(); session.close(); mockService.cleanupSession(session); // as soon as we changed session.accessSynchronously // to session.access in VaadinService.fireSessionDestroy, // we need to run the pending task ourselves mockService.runPendingAccessTasks(session); Assert.assertTrue(detachCalled.get()); } @Test public void testValueUnbound() { MockVaadinSession vaadinSession = new MockVaadinSession(mockService); vaadinSession.valueUnbound(EasyMock.createMock(HttpSessionBindingEvent.class)); Assert.assertEquals("'valueUnbound' method doesn't call 'close' for the session", 1, vaadinSession.getCloseCount()); vaadinSession.valueUnbound(EasyMock.createMock(HttpSessionBindingEvent.class)); Assert.assertEquals(("'valueUnbound' method may not call 'close' " + "method for closing session"), 1, vaadinSession.getCloseCount()); } // Can't define as an anonymous class since it would have a reference to // VaadinSessionTest.this which isn't serializable private static class MockPageUI extends UI { Page page = new Page(this, getState(false).pageState) {}; @Override protected void init(VaadinRequest request) { } @Override public Page getPage() { return page; } } private static class SerializationTestLabel extends Label { private transient VaadinSession session = VaadinSession.getCurrent(); private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); session = VaadinSession.getCurrent(); } } @Test public void threadLocalsWhenDeserializing() throws Exception { VaadinSession.setCurrent(session); session.lock(); VaadinSessionTest.SerializationTestLabel label = new VaadinSessionTest.SerializationTestLabel(); Assert.assertEquals("Session should be set when instance is created", session, label.session); ui.setContent(label); int uiId = ui.getUIId(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); try (ObjectOutputStream out = new ObjectOutputStream(bos)) { out.writeObject(session); } session.unlock(); CurrentInstance.clearAll(); ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); VaadinSession deserializedSession = ((VaadinSession) (in.readObject())); Assert.assertNull("Current session shouldn't leak from deserialisation", VaadinSession.getCurrent()); Assert.assertNotSame("Should get a new session", session, deserializedSession); // Restore http session and service instance so the session can be // locked deserializedSession.refreshTransients(mockWrappedSession, mockService); deserializedSession.lock(); UI deserializedUi = deserializedSession.getUIById(uiId); VaadinSessionTest.SerializationTestLabel deserializedLabel = ((VaadinSessionTest.SerializationTestLabel) (deserializedUi.getContent())); Assert.assertEquals("Current session should be available in SerializationTestLabel.readObject", deserializedSession, deserializedLabel.session); deserializedSession.unlock(); } @Test public void lockedDuringSerialization() throws IOException { final AtomicBoolean lockChecked = new AtomicBoolean(false); ui.setContent(new Label() { private void writeObject(ObjectOutputStream out) throws IOException { Assert.assertTrue(session.hasLock()); lockChecked.set(true); out.defaultWriteObject(); } }); session.unlock(); Assert.assertFalse(session.hasLock()); ObjectOutputStream out = new ObjectOutputStream(new ByteArrayOutputStream()); out.writeObject(session); Assert.assertFalse(session.hasLock()); Assert.assertTrue(lockChecked.get()); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
f7d064c4bc2830644818ec62b55b40ba0ab7ec88
beffc6542dc4bf85946ceca7cca4a31ac230d376
/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/SpringJUnitTests.java
4d625b4918f0f1ed28ba88a6274ed524b25922b6
[ "Apache-2.0" ]
permissive
ZhouKaiDongGitHub/spring-boot-2.0.x
4395970b183eff7321748d4ad0155784aa94eaa6
3f443764747c4ee01085bed6381292fa44744a49
refs/heads/master
2023-01-07T07:27:51.067468
2020-09-13T07:13:04
2020-09-13T07:13:04
215,676,265
1
0
Apache-2.0
2022-12-27T14:52:46
2019-10-17T01:24:02
Java
UTF-8
Java
false
false
1,883
java
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.autoconfigure; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; /** * @author Dave Syer */ @RunWith(SpringRunner.class) @DirtiesContext @SpringBootTest public class SpringJUnitTests { @Autowired private ApplicationContext context; @Value("${foo:spam}") private String foo = "bar"; @Test public void testContextCreated() { assertThat(this.context).isNotNull(); } @Test public void testContextInitialized() { assertThat(this.foo).isEqualTo("bucket"); } @Configuration @Import({ PropertyPlaceholderAutoConfiguration.class }) public static class TestConfiguration { } }
[ "Kaidong.Zhou@eisgroup.com" ]
Kaidong.Zhou@eisgroup.com
f18a5b11c5c0081d78f3ee5ddc7e5a59e32bea87
b2b4a6bab187aaa35f5bfc324f0ef07d37c8914a
/bfs/TopoSortBFS.java
d53c5db08f7618ecd0db940b654e0099481684e1
[]
no_license
fyiyu091/Leetcode
7dd908a39bde4c019bda98038538ddcbfaf2e9c7
54c0a823cbf742f4693bb8c7824d9d67221fc5bb
refs/heads/master
2023-07-19T05:37:41.645801
2021-08-31T03:25:25
2021-08-31T03:25:25
275,048,455
0
0
null
null
null
null
UTF-8
Java
false
false
1,262
java
package bfs; import java.util.LinkedList; import java.util.List; import java.util.Queue; public class TopoSortBFS { public boolean canFinish(int numCourses, int[][] prerequisites) { if (numCourses <= 1) { return true; } int count = 0; int[] inDegrees = new int[numCourses]; List<Integer>[] graph = (LinkedList<Integer>[]) new LinkedList[numCourses]; for (int i = 0; i < graph.length; i++) { graph[i] = new LinkedList<>(); } for (int i = 0; i < prerequisites.length; i++) { int from = prerequisites[i][1]; int to = prerequisites[i][0]; graph[from].add(to); inDegrees[to]++; } Queue<Integer> queue = new LinkedList<>(); for (int i = 0; i < inDegrees.length; i++) { if (inDegrees[i] == 0) { queue.offer(i); } } while (!queue.isEmpty()) { count++; int curr = queue.poll(); for (int nei : graph[curr]) { inDegrees[nei]--; if (inDegrees[nei] == 0) { queue.offer(nei); } } } return count == numCourses; } }
[ "yiyu091@gmail.com" ]
yiyu091@gmail.com
a55d4050aa705caa0ccf589ee39e2779c9bf68a7
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/ecf/2626.java
d5df9a8bba953e531e62fbbc94b7908cd4535ebf
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
702
java
/**************************************************************************** * Copyright (c) 2010 Eugen Reiswich. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Eugen Reiswich - initial API and implementation *****************************************************************************/ package org.eclipse.ecf.tests.provider.xmpp.remoteservice; import org.eclipse.ecf.provider.xmpp.identity.XMPPID; public interface IExampleService { public XMPPID getClientID(); }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
2b2d68b766042471e30bc75a63b11718f192a74a
67d195485008b7e95cbc89bccbed1c06f8db8ec5
/src/axela/portal/Contact_Receipt.java
b0c8f92c2294310fe707722f5a60d167db551b94
[]
no_license
pramod6019/axelaauto
901c44f2de5556a5145d3267e2a6788033732f37
968350900c902ee11ca0a8d6e09a5108e7df79a4
refs/heads/master
2022-12-26T09:47:09.186898
2020-10-01T03:10:40
2020-10-01T03:10:40
300,124,896
0
0
null
null
null
null
UTF-8
Java
false
false
7,297
java
package axela.portal; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.sql.rowset.CachedRowSet; import cloudify.connect.Connect; public class Contact_Receipt extends Connect { public String customer_id = ""; public String BranchAccess; public String comp_id = "0"; public String branch_id = ""; public String emp_idsession = ""; public String StrHTML = ""; public String enquiry_id = ""; public String Strsearch = ""; public void doPost(HttpServletRequest request, HttpServletResponse response) { try { CheckSession(request, response); HttpSession session = request.getSession(true); comp_id = CNumeric(GetSession("comp_id", request)); if(!comp_id.equals("0")){ branch_id = CNumeric(GetSession("emp_branch_id", request)); BranchAccess = GetSession("BranchAccess", request); customer_id = PadQuotes(request.getParameter("customer_id")); enquiry_id = PadQuotes(request.getParameter("enquiry_id")); if (!enquiry_id.equals("")) { Strsearch = " and so_enquiry_id=" + enquiry_id; CheckPerm(comp_id, "emp_enquiry_access", request, response); } if (!customer_id.equals("")) { CheckPerm(comp_id, "emp_customer_access", request, response); StrHTML = ListData(); } } } catch (Exception ex) { SOPError("Axelaauto===" + this.getClass().getName()); SOPError("Error in " + new Exception().getStackTrace()[0].getMethodName() + ": " + ex); } } public String ListData() { StringBuilder Str = new StringBuilder(); String SqlJoin = ""; int TotalRecords = 0; String StrSql = " select receipt_id, receipt_amt, receipt_st, receipt_cst, receipt_vat, " + " receipt_total, concat(branch_code,receipt_no) as receipt_no," + " group_concat(receipttrans_balancetrack_id separator ', ') as part," + " so_id, so_active, coalesce(concat(branch_code,so_no),'') as so_no, receipt_date, " + " receipt_total,receipt_paymode_id " + " from " + compdb(comp_id) + "axela_invoice_receipt "; String CountSql = "select count(receipt_id) from " + compdb(comp_id) + "axela_invoice_receipt "; SqlJoin = " inner join " + compdb(comp_id) + "axela_invoice_receipt_trans on receipttrans_receipt_id=receipt_id" + " inner join " + compdb(comp_id) + "axela_sales_so on so_id=receipt_so_id " + " inner join " + compdb(comp_id) + "axela_branch on branch_id = receipt_branch_id " + " inner join " + compdb(comp_id) + "axela_customer on customer_id = receipt_customer_id" + " where 1=1 and receipt_active='1' and receipt_customer_id=" + customer_id + "" + " " + BranchAccess + Strsearch + " order by receipt_date desc"; StrSql = StrSql + SqlJoin; CountSql = CountSql + SqlJoin; // SOP("StrSql...from receipt details......"+StrSqlBreaker(CountSql)); TotalRecords = Integer.parseInt(ExecuteQuery(CountSql)); if (TotalRecords != 0) { CachedRowSet crs =processQuery(StrSql, 0); try { int count = 0; Str.append("<table border=1 cellspacing=0 cellpadding=0 class=\"listtable\">"); Str.append("<tr align=center>\n"); Str.append("<th width=5%>#</th>\n"); Str.append("<th>Receipt No.</th>\n"); Str.append("<th>SO No.</th>\n"); Str.append("<th>Particulars</th>\n"); Str.append("<th>Date</th>\n"); Str.append("<th>Net Total</th>\n"); Str.append("<th>ST</th>\n"); Str.append("<th>CST</th>\n"); Str.append("<th>VAT</th>\n"); Str.append("<th>Grand Total</th>\n"); Str.append("<th>Payment</th>\n"); Str.append("</tr>\n"); while (crs.next()) { if (!((crs.getString("so_id") != null && !crs.getString("so_id").equals("") && crs.getString("so_active").equals("0")))) { count++; Str.append("<tr>\n"); Str.append("<td valign=top align=center >").append(count).append("</td> "); Str.append("<td valign=top align=center ><a href=receipt-list.jsp?receipt_id=").append(crs.getString("receipt_id")).append(" target=_parent>").append(crs.getString("receipt_no")).append("</a></td> "); Str.append("<td valign=top align=center >"); if (crs.getString("so_id") != null) { Str.append("<a href=invoice-list.jsp?so_id=").append(crs.getString("so_id")).append(" target=_parent>").append(crs.getString("so_no")).append("</a>"); } Str.append("&nbsp;</td> "); Str.append("<td valign=top align=left nowrap>" + /*ReturnParticluar(crs.getString("part"))*/ "" + "</td>"); Str.append("<td valign=top align=center >").append(strToShortDate(crs.getString("receipt_date"))).append("</td>"); Str.append("<td valign=top align=right >").append(IndDecimalFormat(crs.getString("receipt_amt"))).append("</td>"); Str.append("<td valign=top align=right >").append(IndDecimalFormat(crs.getString("receipt_st"))).append("</td>"); Str.append("<td valign=top align=right >").append(IndDecimalFormat(crs.getString("receipt_cst"))).append("</td>"); Str.append("<td valign=top align=right >").append(IndDecimalFormat(crs.getString("receipt_vat"))).append("</td>"); Str.append("<td valign=top align=right >").append(IndDecimalFormat(crs.getString("receipt_total"))).append("</td>"); Str.append("<td valign=top align=center >By ").append(PaymentMode(crs.getInt("receipt_paymode_id"))).append("</td> "); Str.append("</tr>" + "\n"); } } Str.append("</table>\n"); crs.close(); } catch (Exception ex) { SOPError("Axelaauto===" + this.getClass().getName()); SOPError("Error in " + new Exception().getStackTrace()[0].getMethodName() + ": " + ex); } } else { Str.append("<br><br><font color=red><b>No Receipts(s) found!</b></font>"); } return Str.toString(); } // public String ReturnParticluar(String part) { // if (part.equals("0")) { // return "Booking Amount"; // } else if (part.contains(", 0")) { // return "Booking Amount,<br>"+Instlbl+""; // } else { // return ""+Instlbl+""; // } // } }
[ "saipramodreddy@Sais-MacBook-Pro.local" ]
saipramodreddy@Sais-MacBook-Pro.local
91ab7b28caed6e4172be6995c92cdf271fda4093
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/response/AlipayOpenMiniTemplateUsageQueryResponse.java
4171fc6b608b15d4ed45a9117973119196153fa4
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,243
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.TemplateUsageInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.mini.template.usage.query response. * * @author auto create * @since 1.0, 2019-10-31 18:03:35 */ public class AlipayOpenMiniTemplateUsageQueryResponse extends AlipayResponse { private static final long serialVersionUID = 3192393533795757577L; /** * 小程序appId列表 */ @ApiListField("app_ids") @ApiField("string") private List<String> appIds; /** * 模板使用信息 */ @ApiListField("template_usage_info_list") @ApiField("template_usage_info") private List<TemplateUsageInfo> templateUsageInfoList; public void setAppIds(List<String> appIds) { this.appIds = appIds; } public List<String> getAppIds( ) { return this.appIds; } public void setTemplateUsageInfoList(List<TemplateUsageInfo> templateUsageInfoList) { this.templateUsageInfoList = templateUsageInfoList; } public List<TemplateUsageInfo> getTemplateUsageInfoList( ) { return this.templateUsageInfoList; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
67e5583180c9203e2f03c579ace0efe9d0d7c325
183154b0421c1a5a0c820c42f2b94aa69f81fdd2
/src/test/java/com/aol/cyclops2/internal/stream/spliterators/push/filter/FilterTckPublisherTest.java
c4dee859ac994fa3f86c301a4b117cc4c35ff179
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
jbgi/cyclops-react
b8996fc741a7c9483f58e2ef67793d460b44ea98
bf1a4fe159d6e5600012ae9c3a76a30f2df78606
refs/heads/master
2021-03-16T05:07:14.062630
2017-05-17T06:23:46
2017-05-17T06:23:46
91,538,054
1
0
null
2017-05-17T05:45:05
2017-05-17T05:45:05
null
UTF-8
Java
false
false
825
java
package com.aol.cyclops2.internal.stream.spliterators.push.filter; import com.aol.cyclops2.internal.stream.spliterators.push.FilterOperator; import cyclops.stream.ReactiveSeq; import cyclops.stream.Spouts; import org.reactivestreams.Publisher; import org.reactivestreams.tck.PublisherVerification; import org.reactivestreams.tck.TestEnvironment; import org.testng.annotations.Test; @Test public class FilterTckPublisherTest extends PublisherVerification<Long>{ public FilterTckPublisherTest(){ super(new TestEnvironment(300L)); } @Override public Publisher<Long> createPublisher(long elements) { return Spouts.iterate(0l, i->i+1l).filter(i->i%2==0).limit(elements); } @Override public Publisher<Long> createFailedPublisher() { return null; //not possible to subscribeAll to failed Stream } }
[ "john.mcclean@teamaol.com" ]
john.mcclean@teamaol.com
830cfed8e826a7693cacb9a4b48df92e41e71c14
b49c332a856162b37aa4921f7aa31ba3fa5cc72e
/src/java/CapNurtac/Entidades/CapProyectos.java
edc1c1df455c44e130130967fd22c3af19b9a286
[]
no_license
Crodriguez1994/NurtacModCap
b1a58a550938e2c7727cbe3be21a9cc20978c028
63806128c0118fb4f56e4ac2784b18a7669de868
refs/heads/master
2020-12-15T06:19:30.208121
2020-01-31T12:37:57
2020-01-31T12:37:57
235,019,035
0
0
null
null
null
null
UTF-8
Java
false
false
5,949
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 CapNurtac.Entidades; import java.io.Serializable; import java.util.Date; import java.util.List; import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; /** * * @author User */ @Entity @Table(name = "cap_proyectos") @XmlRootElement @NamedQueries({ @NamedQuery(name = "CapProyectos.findAll", query = "SELECT c FROM CapProyectos c") , @NamedQuery(name = "CapProyectos.findByProyectoid", query = "SELECT c FROM CapProyectos c WHERE c.proyectoid = :proyectoid") , @NamedQuery(name = "CapProyectos.findByEstado", query = "SELECT c FROM CapProyectos c WHERE c.estado = :estado") , @NamedQuery(name = "CapProyectos.findByFecha", query = "SELECT c FROM CapProyectos c WHERE c.fecha = :fecha") , @NamedQuery(name = "CapProyectos.findByFechafin", query = "SELECT c FROM CapProyectos c WHERE c.fechafin = :fechafin") , @NamedQuery(name = "CapProyectos.findByFechainicio", query = "SELECT c FROM CapProyectos c WHERE c.fechainicio = :fechainicio") , @NamedQuery(name = "CapProyectos.findByNombre", query = "SELECT c FROM CapProyectos c WHERE c.nombre = :nombre")}) public class CapProyectos implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) @NotNull @Column(name = "proyectoid") private Integer proyectoid; @Size(max = 1) @Column(name = "estado") private String estado; @Column(name = "fecha") @Temporal(TemporalType.DATE) private Date fecha; @Column(name = "fechafin") @Temporal(TemporalType.DATE) private Date fechafin; @Column(name = "fechainicio") @Temporal(TemporalType.DATE) private Date fechainicio; @Size(max = 30) @Column(name = "nombre") private String nombre; @OneToMany(mappedBy = "proyectoid") private List<CapAsigproyectos> capAsigproyectosList; @OneToMany(mappedBy = "proyectoid") private List<CapUnidadesatencion> capUnidadesatencionList; @OneToMany(cascade = CascadeType.ALL, mappedBy = "capProyectos") private List<CapAsigproyectosector> capAsigproyectosectorList; public static int Id=0; public CapProyectos() { } public CapProyectos(Integer proyectoid) { this.proyectoid = proyectoid; } public Integer getProyectoid() { if (proyectoid ==null){ Id =Id + 1; proyectoid = Id; }else{ Id = proyectoid; } return proyectoid; } public void setProyectoid(Integer proyectoid) { this.proyectoid = proyectoid; } public String getEstado() { if (estado==null){ estado = "A"; } return estado; } public void setEstado(String estado) { this.estado = estado; } public Date getFecha() { if(fecha== null){ fecha = new Date(); } return fecha; } public void setFecha(Date fecha) { this.fecha = fecha; } public Date getFechafin() { return fechafin; } public void setFechafin(Date fechafin) { this.fechafin = fechafin; } public Date getFechainicio() { return fechainicio; } public void setFechainicio(Date fechainicio) { this.fechainicio = fechainicio; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } @XmlTransient public List<CapAsigproyectos> getCapAsigproyectosList() { return capAsigproyectosList; } public void setCapAsigproyectosList(List<CapAsigproyectos> capAsigproyectosList) { this.capAsigproyectosList = capAsigproyectosList; } @XmlTransient public List<CapUnidadesatencion> getCapUnidadesatencionList() { return capUnidadesatencionList; } public void setCapUnidadesatencionList(List<CapUnidadesatencion> capUnidadesatencionList) { this.capUnidadesatencionList = capUnidadesatencionList; } @XmlTransient public List<CapAsigproyectosector> getCapAsigproyectosectorList() { return capAsigproyectosectorList; } public void setCapAsigproyectosectorList(List<CapAsigproyectosector> capAsigproyectosectorList) { this.capAsigproyectosectorList = capAsigproyectosectorList; } @Override public int hashCode() { int hash = 0; hash += (proyectoid != null ? proyectoid.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof CapProyectos)) { return false; } CapProyectos other = (CapProyectos) object; if ((this.proyectoid == null && other.proyectoid != null) || (this.proyectoid != null && !this.proyectoid.equals(other.proyectoid))) { return false; } return true; } @Override public String toString() { return Integer.toString(this.proyectoid); } }
[ "User@User-PC" ]
User@User-PC
5d1f0d6cae432b0e654e090275572d9fb15fd13a
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a032/A032386.java
39e7b7d34ee1a2b593119c584e2c0e82278c1a72
[]
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
406
java
package irvine.oeis.a032; // Generated by gen_seq4.pl pfprime 2 73 2 +1 0 at 2019-07-30 14:36 // DO NOT EDIT here! import irvine.oeis.PowerFactorPrimeSequence; /** * A032386 Numbers k such that <code>73*2^k+1</code> is prime. * @author Georg Fischer */ public class A032386 extends PowerFactorPrimeSequence { /** Construct the sequence. */ public A032386() { super(1, 2, 73, 2, +1, 0); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
b70d5e464eb64d479c63db92928f51fb1ebe7476
456e5df877c8b7b786c8bbdee9066aa4480f92d3
/CoreNLP/src/edu/stanford/nlp/maxent/package-info.java
33ac3d717d42d0ba9650902d9f3ba538d5db37dc
[]
no_license
matthewgarber/COSI_134_Final
763882c4b25fe6fe4192c4f3986b33931b6217d1
5dbadc01af73fc7068b0a156d383f6f126dae1e5
refs/heads/master
2021-01-12T06:59:42.702118
2016-12-19T20:13:39
2016-12-19T20:13:39
76,886,459
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
/** * <body> * This package deals with defining and solving maximum entropy problems. * In the future it will have facilities for easier definition of maxent problems. * <p> * If you are new to this package, take a look at the following classes: * <ul> * <li>LinearType2Classifier * <li>Type2Datum * <li>Type2Dataset * </ul> * Possibly the simplest way to use it is to fill up a Type2Dataset with * Type2Datum objects (a Type2Datum is essentially a map from classes * into sets of feature values), and then to use * <code>LinearType2Classifier.trainClassifier()</code> on your * Type2Dataset to train a classifier. You can then use the * <code>classOf()</code>, <code>scoresOf()</code>, and * <code>justificationOf()</code> methods of the resulting * LinearType2Classifier object. * </body> */ package edu.stanford.nlp.maxent;
[ "mgarber@brandeis.edu" ]
mgarber@brandeis.edu
fbce24973762cbf677d57f231e70f45d0541a1fa
b967e4b23d006d8c238f0059ffb568a273b274d5
/src/renderEngine/Loader.java
09af10b3322b648b612f2ec0113f4a8bafae72ad
[]
no_license
MarvineGothic/GameEngine
e6ff9774fc57165163df0debeb28f6f215a23b9b
11a5796741c563c45beee61c2542d8307cbc1e9a
refs/heads/master
2020-04-21T19:53:39.650528
2019-02-11T20:04:13
2019-02-11T20:04:13
169,822,893
0
0
null
null
null
null
UTF-8
Java
false
false
5,470
java
package renderEngine; import de.matthiasmann.twl.utils.PNGDecoder; import de.matthiasmann.twl.utils.PNGDecoder.Format; import models.RawModel; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.*; import org.newdawn.slick.opengl.Texture; import org.newdawn.slick.opengl.TextureLoader; import textures.TextureData; import java.io.FileInputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.util.ArrayList; import java.util.List; public class Loader { private List<Integer> vaos = new ArrayList<>(); private List<Integer> vbos = new ArrayList<>(); private List<Integer> textures = new ArrayList<>(); public RawModel loadToVAO(float[] positions, float[] textureCoord, float[] normals, int[] indices) { int vaoID = createVAO(); bindIndicesBuffer(indices); storeDataInAttributeList(0, 3, positions); storeDataInAttributeList(1, 2, textureCoord); storeDataInAttributeList(2, 3, normals); unbindVAO(); return new RawModel(vaoID, indices.length); } public RawModel loadToVAO(float[] positions, int dimensions) { int vaoID = createVAO(); this.storeDataInAttributeList(0, dimensions, positions); unbindVAO(); return new RawModel(vaoID, positions.length / dimensions); } public int loadTexture(String fileName) { int textureID = 0; try (FileInputStream is = new FileInputStream("res/" + fileName + ".png")) { Texture texture = TextureLoader.getTexture("PNG", is); GL30.glGenerateMipmap(GL11.GL_TEXTURE_2D); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_LINEAR); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL14.GL_TEXTURE_LOD_BIAS, -0.4f); textureID = texture.getTextureID(); textures.add(textureID); } catch (IOException e) { e.printStackTrace(); } return textureID; } public int loadCubeMap(String[] textureFiles) { int texID = GL11.glGenTextures(); GL13.glActiveTexture((GL13.GL_TEXTURE0)); GL11.glBindTexture(GL13.GL_TEXTURE_CUBE_MAP, texID); for (int i = 0; i < textureFiles.length; i++) { TextureData data = decodeTextureFile("res/" + textureFiles[i] + ".png"); GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL11.GL_RGBA, data.getWidth(), data.getHeight(), 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, data.getBuffer()); } GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); textures.add(texID); return texID; } private TextureData decodeTextureFile(String fileName) { int width = 0; int height = 0; ByteBuffer buffer = null; try (FileInputStream in = new FileInputStream(fileName)) { PNGDecoder decoder = new PNGDecoder(in); width = decoder.getWidth(); height = decoder.getHeight(); buffer = ByteBuffer.allocateDirect(4 * width * height); decoder.decode(buffer, width * 4, Format.RGBA); buffer.flip(); } catch (IOException e) { e.printStackTrace(); } return new TextureData(buffer, width, height); } private int createVAO() { int vaoID = GL30.glGenVertexArrays(); vaos.add(vaoID); GL30.glBindVertexArray(vaoID); return vaoID; } private void storeDataInAttributeList(int attributeNumber, int coordinateSize, float[] data) { int vboID = GL15.glGenBuffers(); vbos.add(vboID); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID); FloatBuffer buffer = storeDataInFloatBuffer(data); GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer, GL15.GL_STATIC_DRAW); GL20.glVertexAttribPointer(attributeNumber, coordinateSize, GL11.GL_FLOAT, false, 0, 0); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0); } private void unbindVAO() { GL30.glBindVertexArray(0); } private void bindIndicesBuffer(int[] indices) { int vboID = GL15.glGenBuffers(); vbos.add(vboID); GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, vboID); IntBuffer buffer = storeDataInIntBuffer(indices); GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, buffer, GL15.GL_STATIC_DRAW); } private IntBuffer storeDataInIntBuffer(int[] data) { IntBuffer buffer = BufferUtils.createIntBuffer(data.length); buffer.put(data); buffer.flip(); return buffer; } private FloatBuffer storeDataInFloatBuffer(float[] data) { FloatBuffer buffer = BufferUtils.createFloatBuffer(data.length); buffer.put(data); buffer.flip(); return buffer; } public void cleanUp() { for (int vao : vaos) GL30.glDeleteVertexArrays(vao); for (int vbo : vbos) GL15.glDeleteBuffers(vbo); for (int texture : textures) GL11.glDeleteTextures(texture); } }
[ "seis@itu.dk" ]
seis@itu.dk
03a2cb2b80dd8ee016d7f2e3b0a12934ab0246bd
fdf6af788d9dbcf2c540221c75218e26bd38483b
/app/src/main/java/com/yuanxin/clan/core/huanxin/VoiceCallActivity.java
e6df4ad4b67801082874fd8c6c413b1aa243ebdd
[]
no_license
RobertBaggio/yuanxinclan
8b6b670d2bc818ff018c6e2bcfe77e74903ddbbd
544918ce2f80975f32aa09a4990028b955fa5f6d
refs/heads/master
2020-03-18T09:05:47.461683
2018-05-23T09:30:36
2018-05-23T09:30:36
134,544,755
0
0
null
null
null
null
UTF-8
Java
false
false
718
java
package com.yuanxin.clan.core.huanxin; import android.app.Activity; import android.os.Bundle; import com.yuanxin.clan.R; import butterknife.ButterKnife; import butterknife.Unbinder; /** * Created by lenovo1 on 2017/3/9. */ public class VoiceCallActivity extends Activity { public Unbinder unbinder; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_voice_call); unbinder = ButterKnife.bind(this); } @Override protected void onDestroy() { super.onDestroy(); unbinder.unbind(); // // unregisterReceiver(changeCityReceiver); // // home = false; } }
[ "baggiocomeback@163.com" ]
baggiocomeback@163.com
45742aba6f594578e168da488670e03ce2a6ab3b
5bc9d8f92f38967cc9ecc03000c0606dbbb38f74
/sca4j/tests/tags/0.4.0-release/test-function/src/main/java/org/sca4j/tests/function/conversation/ClientToIntermediary.java
657943c27ef7a11987b211977f1104ebb00b6bc2
[]
no_license
codehaus/service-conduit
795332fad474e12463db22c5e57ddd7cd6e2956e
4687d4cfc16f7a863ced69ce9ca81c6db3adb6d2
refs/heads/master
2023-07-20T00:35:11.240347
2011-08-24T22:13:28
2011-08-24T22:13:28
36,342,601
2
0
null
null
null
null
UTF-8
Java
false
false
2,706
java
/** * SCA4J * Copyright (c) 2009 - 2099 Service Symphony Ltd * * Licensed to you under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. A copy of the license * is included in this distrubtion or you may obtain a copy at * * http://www.opensource.org/licenses/apache2.0.php * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * This project contains code licensed from the Apache Software Foundation under * the Apache License, Version 2.0 and original code from project contributors. * * * Original Codehaus Header * * Copyright (c) 2007 - 2008 fabric3 project contributors * * Licensed to you under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. A copy of the license * is included in this distrubtion or you may obtain a copy at * * http://www.opensource.org/licenses/apache2.0.php * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * This project contains code licensed from the Apache Software Foundation under * the Apache License, Version 2.0 and original code from project contributors. * * Original Apache Header * * Copyright (c) 2005 - 2006 The Apache Software Foundation * * Apache Tuscany is an effort undergoing incubation at The Apache Software * Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is * required of all newly accepted projects until a further review indicates that * the infrastructure, communications, and decision making process have stabilized * in a manner consistent with other successful ASF projects. While incubation * status is not necessarily a reflection of the completeness or stability of the * code, it does indicate that the project has yet to be fully endorsed by the ASF. * * This product includes software developed by * The Apache Software Foundation (http://www.apache.org/). */ package org.sca4j.tests.function.conversation; import org.osoa.sca.annotations.Conversational; /** * @version $Revision$ $Date$ */ @Conversational public interface ClientToIntermediary { void propagateConversation(); }
[ "meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e" ]
meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e
6e8b0fe4aab9d66cc5c197da90e56d009a558d47
13d611b767c05261f6400a42b2a9ff461e2ec907
/src/main/java/com/raoulvdberge/refinedstorage/block/BlockNetworkReceiver.java
4a4afa215b20c637e2bf46e8b4cec41d8cf20b48
[ "MIT" ]
permissive
uwx/refinedstorage
656830f69f8ccc61737b5fa52cf495588939b6a2
c38a4206d7388e28b51436ce90f1037ca54e8c8a
refs/heads/mc1.12
2023-04-01T01:34:44.041814
2018-08-31T08:27:59
2018-08-31T08:27:59
132,574,657
0
0
MIT
2019-05-16T05:54:39
2018-05-08T07:58:07
Java
UTF-8
Java
false
false
722
java
package com.raoulvdberge.refinedstorage.block; import com.raoulvdberge.refinedstorage.tile.TileNetworkReceiver; import net.minecraft.block.state.IBlockState; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import javax.annotation.Nullable; public class BlockNetworkReceiver extends BlockNode { public BlockNetworkReceiver() { super("network_receiver"); } @Override public TileEntity createTileEntity(World world, IBlockState state) { return new TileNetworkReceiver(); } @Override @Nullable public Direction getDirection() { return null; } @Override public boolean hasConnectivityState() { return true; } }
[ "raoulvdberge@gmail.com" ]
raoulvdberge@gmail.com
50a730ff39867d09f52503820601c4986c927fc6
3c533f39b0bf81cbf7bfa12d4abc5edf2e9b0aed
/src/main/java/ru/nukkit/borders/commands/CmdRemove.java
a07ff309fa8149577d275acb93c17bc148b57918
[]
no_license
fromgate/Borders
83f242ec264a99cae1989e66df7633aa3f02f4ba
7f9ae42719aedc42e896a202286678bde88dd5bb
refs/heads/master
2021-01-10T11:07:04.111171
2016-02-01T17:02:17
2016-02-01T17:02:17
50,855,252
4
0
null
null
null
null
UTF-8
Java
false
false
681
java
package ru.nukkit.borders.commands; import cn.nukkit.Player; import cn.nukkit.command.CommandSender; import ru.nukkit.borders.Borders; import ru.nukkit.borders.util.Message; @CmdDefine(command = "border", alias = "brd", subCommands ={"(?i)remove|rmv|delete|dlt","\\S+"}, permission = "border.config", description = Message.CMD_BRD_REMOVE, allowConsole = true) public class CmdRemove extends Cmd { @Override public boolean execute(CommandSender sender, Player player, String[] args) { String id = args[1]; if (!Borders.exist(id)) Message.BRD_UNKNOWN.print(sender,id); Borders.remove (id); return Message.BRD_REMOVED.print(sender); } }
[ "fromgate@gmail.com" ]
fromgate@gmail.com
9197c7de3e9c7817ba500aea7e7b20dfda0f838f
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
/src/May2021Leetcode/_0722RemoveComments.java
576c2226596e5c9601050aa90e02983218e68897
[ "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
542
java
package May2021Leetcode; import java.util.List; public class _0722RemoveComments { public static void main(String[] args) { System.out.println(removeComments(new String[] { "/*Test program */", "int main()", "{ ", " // variable declaration ", "int a, b, c;", "/* This is a test", " multiline ", " comment for ", " testing */", "a = b + c;", "}" })); System.out.println(removeComments(new String[] { "a/*comment", "line", "more_comment*/b" })); } public static List<String> removeComments(String[] source) { } }
[ "hsdars@gmail.com" ]
hsdars@gmail.com
329da0280d891f74792e0a34878de508f55ea8c5
258de8e8d556901959831bbdc3878af2d8933997
/utopia-service/utopia-reward/utopia-reward-api/src/main/java/com/voxlearning/utopia/service/reward/api/mapper/newversion/entity/PrizeClawWinningRecordEntity.java
b14b9823bfddfc36d499563edf8032f34a89ec62
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
361
java
package com.voxlearning.utopia.service.reward.api.mapper.newversion.entity; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.io.Serializable; @Getter @Setter @ToString public class PrizeClawWinningRecordEntity implements Serializable { private String createTime; private Integer consumeNum; private String prize; }
[ "wangahai@300.cn" ]
wangahai@300.cn
fe8e5522a00ea8cb3c2d0f231f3ff718b4c42139
8228efa27043e0a236ca8003ec0126012e1fdb02
/L2JOptimus_Core/java/net/sf/l2j/gameserver/network/serverpackets/CharDeleteFail.java
c09afc563fd6b751b0ee5a12380e73b284cf4193
[]
no_license
wan202/L2JDeath
9982dfce14ae19a22392955b996b42dc0e8cede6
e0ab026bf46ac82c91bdbd048a0f50dc5213013b
refs/heads/master
2020-12-30T12:35:59.808276
2017-05-16T18:57:25
2017-05-16T18:57:25
91,397,726
0
1
null
null
null
null
UTF-8
Java
false
false
516
java
package net.sf.l2j.gameserver.network.serverpackets; public class CharDeleteFail extends L2GameServerPacket { public static final int REASON_DELETION_FAILED = 0x01; public static final int REASON_YOU_MAY_NOT_DELETE_CLAN_MEMBER = 0x02; public static final int REASON_CLAN_LEADERS_MAY_NOT_BE_DELETED = 0x03; private final int _error; public CharDeleteFail(int errorCode) { _error = errorCode; } @Override protected final void writeImpl() { writeC(0x24); writeD(_error); } }
[ "wande@DESKTOP-DM71DUV" ]
wande@DESKTOP-DM71DUV
bcea98370eeb0e6271153fe19defe8ca8f8a60dd
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/java8/util/stream/StreamSpliterators$SliceSpliterator$OfDouble$$Lambda$1.java
9163c65a95f0ae0b34d6bc93b27f2e3ca14cbd49
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
614
java
package java8.util.stream; import java8.util.function.DoubleConsumer; final /* synthetic */ class StreamSpliterators$SliceSpliterator$OfDouble$$Lambda$1 implements DoubleConsumer { /* renamed from: a */ private static final StreamSpliterators$SliceSpliterator$OfDouble$$Lambda$1 f54671a = new StreamSpliterators$SliceSpliterator$OfDouble$$Lambda$1(); private StreamSpliterators$SliceSpliterator$OfDouble$$Lambda$1() { } /* renamed from: a */ public static DoubleConsumer m64105a() { return f54671a; } public void accept(double d) { OfDouble.m67902b(d); } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
0e97489c74a6661fccd74303acf1e3aba9b7a2f9
4c051311b5ece6ff8991017e5f24c6ffdaf949fc
/src/main/java/com/wk/p3/greenmall/modules/msg/exception/TimeOutException.java
eb84134e9a98928812e1d2c2f96b7530ed642419
[]
no_license
zhp834158133/GreenMall
d956993ebb02c41a9fd052cfcbad4fc4116232dc
073fd0d04ce49ea1e15bfcbec3d8c02b2d5c1a3e
refs/heads/master
2021-01-10T01:47:52.916159
2018-10-18T01:31:42
2018-10-18T01:31:42
52,052,982
1
0
null
null
null
null
UTF-8
Java
false
false
456
java
package com.wk.p3.greenmall.modules.msg.exception; /** * Created by cc on 15-12-19. */ public class TimeOutException extends SendException { public TimeOutException() { super(); } public TimeOutException(String message) { super(message); } public TimeOutException(String message, Throwable cause) { super(message, cause); } public TimeOutException(Throwable cause) { super(cause); } }
[ "yefengmengluo@163.com" ]
yefengmengluo@163.com
903a13f7642720f4f2328529339d3e4b15eb15cc
99c7920038f551b8c16e472840c78afc3d567021
/aliyun-java-sdk-rds-v5/src/main/java/com/aliyuncs/v5/rds/model/v20140815/DescribeBackupPolicyResponse.java
350c4d6bb4660322c0a379d6e3bfb8109bb8edad
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk-v5
9fa211e248b16c36d29b1a04662153a61a51ec88
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
refs/heads/master
2023-03-13T01:32:07.260745
2021-10-18T08:07:02
2021-10-18T08:07:02
263,800,324
4
2
NOASSERTION
2022-05-20T22:01:22
2020-05-14T02:58:50
Java
UTF-8
Java
false
false
7,853
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.v5.rds.model.v20140815; import com.aliyuncs.v5.AcsResponse; import com.aliyuncs.v5.rds.transform.v20140815.DescribeBackupPolicyResponseUnmarshaller; import com.aliyuncs.v5.transform.UnmarshallerContext; /** * @author auto create * @version */ public class DescribeBackupPolicyResponse extends AcsResponse { private String requestId; private Integer backupRetentionPeriod; private String preferredNextBackupTime; private String preferredBackupTime; private String preferredBackupPeriod; private String backupLog; private Integer logBackupRetentionPeriod; private String enableBackupLog; private Integer localLogRetentionHours; private String localLogRetentionSpace; private String duplication; private String duplicationContent; private String highSpaceUsageProtection; private String logBackupFrequency; private String compressType; private String archiveBackupRetentionPeriod; private String archiveBackupKeepPolicy; private String archiveBackupKeepCount; private String releasedKeepPolicy; private Integer logBackupLocalRetentionNumber; private String category; private Integer supportReleasedKeep; private String backupInterval; private DuplicationLocation duplicationLocation; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Integer getBackupRetentionPeriod() { return this.backupRetentionPeriod; } public void setBackupRetentionPeriod(Integer backupRetentionPeriod) { this.backupRetentionPeriod = backupRetentionPeriod; } public String getPreferredNextBackupTime() { return this.preferredNextBackupTime; } public void setPreferredNextBackupTime(String preferredNextBackupTime) { this.preferredNextBackupTime = preferredNextBackupTime; } public String getPreferredBackupTime() { return this.preferredBackupTime; } public void setPreferredBackupTime(String preferredBackupTime) { this.preferredBackupTime = preferredBackupTime; } public String getPreferredBackupPeriod() { return this.preferredBackupPeriod; } public void setPreferredBackupPeriod(String preferredBackupPeriod) { this.preferredBackupPeriod = preferredBackupPeriod; } public String getBackupLog() { return this.backupLog; } public void setBackupLog(String backupLog) { this.backupLog = backupLog; } public Integer getLogBackupRetentionPeriod() { return this.logBackupRetentionPeriod; } public void setLogBackupRetentionPeriod(Integer logBackupRetentionPeriod) { this.logBackupRetentionPeriod = logBackupRetentionPeriod; } public String getEnableBackupLog() { return this.enableBackupLog; } public void setEnableBackupLog(String enableBackupLog) { this.enableBackupLog = enableBackupLog; } public Integer getLocalLogRetentionHours() { return this.localLogRetentionHours; } public void setLocalLogRetentionHours(Integer localLogRetentionHours) { this.localLogRetentionHours = localLogRetentionHours; } public String getLocalLogRetentionSpace() { return this.localLogRetentionSpace; } public void setLocalLogRetentionSpace(String localLogRetentionSpace) { this.localLogRetentionSpace = localLogRetentionSpace; } public String getDuplication() { return this.duplication; } public void setDuplication(String duplication) { this.duplication = duplication; } public String getDuplicationContent() { return this.duplicationContent; } public void setDuplicationContent(String duplicationContent) { this.duplicationContent = duplicationContent; } public String getHighSpaceUsageProtection() { return this.highSpaceUsageProtection; } public void setHighSpaceUsageProtection(String highSpaceUsageProtection) { this.highSpaceUsageProtection = highSpaceUsageProtection; } public String getLogBackupFrequency() { return this.logBackupFrequency; } public void setLogBackupFrequency(String logBackupFrequency) { this.logBackupFrequency = logBackupFrequency; } public String getCompressType() { return this.compressType; } public void setCompressType(String compressType) { this.compressType = compressType; } public String getArchiveBackupRetentionPeriod() { return this.archiveBackupRetentionPeriod; } public void setArchiveBackupRetentionPeriod(String archiveBackupRetentionPeriod) { this.archiveBackupRetentionPeriod = archiveBackupRetentionPeriod; } public String getArchiveBackupKeepPolicy() { return this.archiveBackupKeepPolicy; } public void setArchiveBackupKeepPolicy(String archiveBackupKeepPolicy) { this.archiveBackupKeepPolicy = archiveBackupKeepPolicy; } public String getArchiveBackupKeepCount() { return this.archiveBackupKeepCount; } public void setArchiveBackupKeepCount(String archiveBackupKeepCount) { this.archiveBackupKeepCount = archiveBackupKeepCount; } public String getReleasedKeepPolicy() { return this.releasedKeepPolicy; } public void setReleasedKeepPolicy(String releasedKeepPolicy) { this.releasedKeepPolicy = releasedKeepPolicy; } public Integer getLogBackupLocalRetentionNumber() { return this.logBackupLocalRetentionNumber; } public void setLogBackupLocalRetentionNumber(Integer logBackupLocalRetentionNumber) { this.logBackupLocalRetentionNumber = logBackupLocalRetentionNumber; } public String getCategory() { return this.category; } public void setCategory(String category) { this.category = category; } public Integer getSupportReleasedKeep() { return this.supportReleasedKeep; } public void setSupportReleasedKeep(Integer supportReleasedKeep) { this.supportReleasedKeep = supportReleasedKeep; } public String getBackupInterval() { return this.backupInterval; } public void setBackupInterval(String backupInterval) { this.backupInterval = backupInterval; } public DuplicationLocation getDuplicationLocation() { return this.duplicationLocation; } public void setDuplicationLocation(DuplicationLocation duplicationLocation) { this.duplicationLocation = duplicationLocation; } public static class DuplicationLocation { private String sotrage; private Location location; public String getSotrage() { return this.sotrage; } public void setSotrage(String sotrage) { this.sotrage = sotrage; } public Location getLocation() { return this.location; } public void setLocation(Location location) { this.location = location; } public static class Location { private String endpoint; private String bucket; public String getEndpoint() { return this.endpoint; } public void setEndpoint(String endpoint) { this.endpoint = endpoint; } public String getBucket() { return this.bucket; } public void setBucket(String bucket) { this.bucket = bucket; } } } @Override public DescribeBackupPolicyResponse getInstance(UnmarshallerContext context) { return DescribeBackupPolicyResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
82e8e86832098232d4d4b1cc698de6f48d1aea96
2379cbec6ed9dc2456a5012cf0945bcedec8e955
/test/com/facebook/buck/parser/targetnode/UnconfiguredTargetNodeToUnconfiguredTargetNodeWithDepsComputationTest.java
04afb9c8a187ecca238df1380eb088e47838492c
[ "Apache-2.0" ]
permissive
PhilanthroLab/buck
ba71b721b9e807b4a955eec1101a81cee29bb051
9e26f05513f9cc9357a02b610442be7dd4636149
refs/heads/master
2020-10-02T07:01:43.840802
2019-12-11T00:55:57
2019-12-11T01:39:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,343
java
/* * Copyright 2019-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.parser.targetnode; import static org.junit.Assert.assertEquals; import com.facebook.buck.core.cell.Cell; import com.facebook.buck.core.cell.TestCellBuilder; import com.facebook.buck.core.graph.transformation.impl.FakeComputationEnvironment; import com.facebook.buck.core.model.BaseName; import com.facebook.buck.core.model.RuleType; import com.facebook.buck.core.model.UnconfiguredBuildTarget; import com.facebook.buck.core.model.UnconfiguredTargetConfiguration; import com.facebook.buck.core.model.impl.MultiPlatformTargetConfigurationTransformer; import com.facebook.buck.core.model.platform.TargetPlatformResolver; import com.facebook.buck.core.model.platform.impl.UnconfiguredPlatform; import com.facebook.buck.core.model.targetgraph.impl.ImmutableUnconfiguredTargetNode; import com.facebook.buck.core.model.targetgraph.impl.TargetNodeFactory; import com.facebook.buck.core.model.targetgraph.raw.UnconfiguredTargetNode; import com.facebook.buck.core.model.targetgraph.raw.UnconfiguredTargetNodeWithDeps; import com.facebook.buck.core.plugin.impl.BuckPluginManagerFactory; import com.facebook.buck.core.rules.knowntypes.TestKnownRuleTypesProvider; import com.facebook.buck.core.select.TestSelectableResolver; import com.facebook.buck.core.select.impl.DefaultSelectorListResolver; import com.facebook.buck.parser.NoopPackageBoundaryChecker; import com.facebook.buck.parser.UnconfiguredTargetNodeToTargetNodeFactory; import com.facebook.buck.rules.coercer.DefaultConstructorArgMarshaller; import com.facebook.buck.rules.coercer.DefaultTypeCoercerFactory; import com.facebook.buck.rules.coercer.TypeCoercerFactory; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; import java.nio.file.Paths; import org.junit.Test; public class UnconfiguredTargetNodeToUnconfiguredTargetNodeWithDepsComputationTest { @Test public void canParseDeps() { Cell cell = new TestCellBuilder().build(); TypeCoercerFactory typeCoercerFactory = new DefaultTypeCoercerFactory(); TargetPlatformResolver targetPlatformResolver = (configuration, dependencyStack) -> UnconfiguredPlatform.INSTANCE; UnconfiguredTargetNodeToTargetNodeFactory unconfiguredTargetNodeToTargetNodeFactory = new UnconfiguredTargetNodeToTargetNodeFactory( typeCoercerFactory, TestKnownRuleTypesProvider.create(BuckPluginManagerFactory.createPluginManager()), new DefaultConstructorArgMarshaller(typeCoercerFactory), new TargetNodeFactory(typeCoercerFactory), new NoopPackageBoundaryChecker(), (file, targetNode) -> {}, new DefaultSelectorListResolver(new TestSelectableResolver()), targetPlatformResolver, new MultiPlatformTargetConfigurationTransformer(targetPlatformResolver), UnconfiguredTargetConfiguration.INSTANCE); ImmutableMap<String, Object> rawAttributes1 = ImmutableMap.of( "name", "target1", "buck.type", "java_library", "buck.base_path", "", "deps", ImmutableSortedSet.of(":target2")); UnconfiguredBuildTarget unconfiguredBuildTarget1 = UnconfiguredBuildTarget.of( cell.getCanonicalName(), BaseName.of("//"), "target1", UnconfiguredBuildTarget.NO_FLAVORS); UnconfiguredTargetNode unconfiguredTargetNode1 = ImmutableUnconfiguredTargetNode.of( unconfiguredBuildTarget1, RuleType.of("java_library", RuleType.Kind.BUILD), rawAttributes1, ImmutableSet.of(), ImmutableSet.of()); UnconfiguredTargetNodeToUnconfiguredTargetNodeWithDepsComputation computation = UnconfiguredTargetNodeToUnconfiguredTargetNodeWithDepsComputation.of( unconfiguredTargetNodeToTargetNodeFactory, cell); UnconfiguredTargetNodeWithDeps rawTargetNode = computation.transform( ImmutableUnconfiguredTargetNodeToUnconfiguredTargetNodeWithDepsKey.of( unconfiguredTargetNode1, Paths.get("")), new FakeComputationEnvironment( ImmutableMap.of( ImmutableBuildTargetToUnconfiguredTargetNodeKey.of( unconfiguredBuildTarget1, Paths.get("")), unconfiguredTargetNode1))); ImmutableSet<UnconfiguredBuildTarget> deps = rawTargetNode.getDeps(); assertEquals(1, deps.size()); UnconfiguredBuildTarget dep = deps.iterator().next(); assertEquals("//", dep.getBaseName().toString()); assertEquals("target2", dep.getName()); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
1411ac71d54ed475d49218aa4ea7599b46aded13
8153654b29ab5063dbd7b69aab37bbe334169565
/src/nez/main/LCndb.java
1819aaf68148d18eb5330d9fd0f6188581fc3092
[]
no_license
kensuketamura/nez-1
db8de861a2fa7b34589559d7e178e9c87c7b5fd4
87abc2a72585e76ecd63d04ed6ee7ba62158c583
refs/heads/master
2020-12-11T08:09:07.524820
2015-07-28T11:13:18
2015-07-28T11:13:18
33,966,749
0
0
null
2015-06-26T09:08:23
2015-04-15T01:42:33
Java
UTF-8
Java
false
false
471
java
package nez.main; import nez.SourceContext; import nez.lang.Grammar; public class LCndb extends Command { @Override public String getDesc() { return "Nez debugger"; } @Override public void exec(CommandContext config) { //config.setNezOption(NezOption.DebugOption); Command.displayVersion(); Grammar peg = config.getGrammar(); while (config.hasInputSource()) { SourceContext file = config.nextInputSource(); peg.debug(file); file = null; } } }
[ "kimio@konohascript.org" ]
kimio@konohascript.org
6df7f371d30e70e0b8062a5d960d2f047e346617
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module176/src/main/java/module176packageJava0/Foo162.java
3b4ea56b1741d31f89ad6aa100b6688cbc88b753
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
368
java
package module176packageJava0; import java.lang.Integer; public class Foo162 { Integer int0; Integer int1; Integer int2; public void foo0() { new module176packageJava0.Foo161().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
bd96b03ae8fac55baebbac02c36ed57e9a7a8d5b
bcb3e750e703acc65d2fcd2b18228717aebdd1af
/src/main/java/com/zkw/clone/Student0.java
1077157489ec030eb56a3ba30c66b4df8f8099b0
[]
no_license
jameszkw/demo
095879f15339411d4c02de45d207343c271f8d90
ace9b39c5498c4476483476e886a05b19104bbde
refs/heads/master
2020-05-29T20:16:38.762554
2018-04-18T01:23:18
2018-04-18T01:23:18
32,331,158
4
0
null
null
null
null
UTF-8
Java
false
false
637
java
package com.zkw.clone; /** * Created by Administrator on 2016/9/14 0014. */ public class Student0 implements Cloneable { String name;// 常量对象。 int age; Professor0 p;// 学生1和学生2的引用值都是一样的。 Student0(String name, int age, Professor0 p) { this.name = name; this.age = age; this.p = p; } public Object clone() { Student0 o = null; try { o = (Student0) super.clone(); } catch (CloneNotSupportedException e) { System.out.println(e.toString()); } return o; } }
[ "zhangkewu@paypalm.cn" ]
zhangkewu@paypalm.cn
078c2a0e24b523bc3649be537525738722b7d27b
97b5d2412a4847afa57d6f39f8b0fee6abb40b4f
/archive/2016.01/2016.01.10 - SNWS 2016, R1/TaskA.java
53e026dfb91a353651b50b4a1ccf6a2f4ecf07ac
[]
no_license
cacophonix/yaal
773d75c57f79c15ad5d30cdaf8efb1b2788cb051
cda2e2143a0c495a86c0d053a4d6150621b90bdb
refs/heads/master
2021-01-22T10:36:33.321865
2016-08-29T10:53:26
2016-08-29T10:53:29
35,441,503
0
1
null
2015-05-11T18:17:52
2015-05-11T18:17:52
null
UTF-8
Java
false
false
720
java
package net.egork; import net.egork.io.IOUtils; import net.egork.numbers.IntegerUtils; import net.egork.utils.io.InputReader; import net.egork.utils.io.OutputWriter; public class TaskA { public void solve(int testNumber, InputReader in, OutputWriter out) { int n = in.readInt(); int[] a = IOUtils.readIntArray(in, n); int[] g = new int[n + 1]; for (int i = n - 1; i >= 0; i--) { g[i] = IntegerUtils.gcd(g[i + 1], a[i]); } int gcd = 0; int answer = 0; int at = -1; for (int i = 0; i < n; i++) { int candidate = IntegerUtils.gcd(gcd, g[i + 1]); if (candidate > answer) { answer = candidate; at = i + 1; } gcd = IntegerUtils.gcd(gcd, a[i]); } out.printLine(at, answer); } }
[ "egor@egork.net" ]
egor@egork.net
9e1d0819a5425f0b104051c181df9ccdec637295
ea96ec3f86907c89a3f6dc5d32d996eaa8a5f3e0
/MeettingSports/src/com/ms/common/BaseDao.java
35bcea62732be315756e6e2f01cb08b78cd74354
[]
no_license
songp172009/MeettingSports
5474846496e62cc81f46b1248484189f88394f3c
62cbf9a6e092a71c3a88dd17bbec44585bc09b9f
refs/heads/master
2020-09-06T12:10:07.419493
2016-12-08T08:39:10
2016-12-08T08:39:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,827
java
package com.ms.common; import java.util.List; /** * Dao 接口, 定义 Dao 的基本操作, 由 BaseDao 提供实现. * @param <T>: Dao 实际操作的泛型类型 */ public interface BaseDao<T> { /** * 执行 INSERT 操作, 返回插入后的记录的 ID * @param sql: 待执行的 SQL 语句 * @param args: 填充占位符的可变参数 * @return: 插入新记录的 id */ String insert(String sql, Object ... args); /** * 执行 UPDATE 操作, 包括 INSERT(但没有返回值), UPDATE, DELETE * @param sql: 待执行的 SQL 语句 * @param args: 填充占位符的可变参数 */ void update(String sql, Object ... args); /** * 执行单条记录的查询操作, 返回与记录对应的类的一个对象 * @param sql: 待执行的 SQL 语句 * @param args: 填充占位符的可变参数 * @return: 与记录对应的类的一个对象 */ T query(String sql, Object ... args); /** * 执行多条记录的查询操作, 返回与记录对应的类的一个 List * @param sql: 待执行的 SQL 语句 * @param args: 填充占位符的可变参数 * @return: 与记录对应的类的一个 List */ List<T> queryForList(String sql, Object ... args); /** * 执行一个属性或值的查询操作, 例如查询某一条记录的一个字段, 或查询某个统计信息, 返回要查询的值 * @param sql: 待执行的 SQL 语句 * @param args: 填充占位符的可变参数 * @return: 执行一个属性或值的查询操作, 例如查询某一条记录的一个字段, 或查询某个统计信息, 返回要查询的值 */ <V> V getSingleVal(String sql, Object ... args); /** * 执行批量更新操作 * @param sql: 待执行的 SQL 语句 * @param args: 填充占位符的可变参数 */ void batch(String sql, Object[]... params); }
[ "jia_chao23@126.com" ]
jia_chao23@126.com
f5f08e7cea9773835565eba326986b6327e56f05
bd7ec3a3cee7bbfbd1ef126037d92f8cf2fbee0c
/solifeAdmin/src/com/cartmatic/estore/customer/dao/impl/CustomerDaoImpl.java
7e1bd34541bb66f2e21a17f011e176538903626a
[]
no_license
1649865412/solifeAdmin
eef96d47b0ed112470bc7c44647c816004240a8d
d45d249513379e1d93868fbcebf6eb61acd08999
refs/heads/master
2020-06-29T03:38:44.894919
2015-06-26T06:53:37
2015-06-26T06:53:37
38,095,812
2
3
null
null
null
null
UTF-8
Java
false
false
1,000
java
package com.cartmatic.estore.customer.dao.impl; import com.cartmatic.estore.common.model.customer.Customer; import com.cartmatic.estore.core.dao.impl.HibernateGenericDaoImpl; import com.cartmatic.estore.customer.dao.CustomerDao; /** * Dao implementation for AppUser. */ public class CustomerDaoImpl extends HibernateGenericDaoImpl<Customer> implements CustomerDao { public Long getCustomerCountsByMembershipId(Integer membershipId) { String hql="from Customer c where c.membershipId=? and c.deleted=0"; Long count=countByHql(hql, membershipId); return count; } @Override public Customer getCustomerByEmail(String email) { String hql="from Customer c where c.userType=0 and c.email=?"; Customer customer=(Customer) findUnique(hql, email); return customer; } @Override public Customer getCustomerByUsername(String username) { String hql="from Customer c where c.userType=0 and c.username=?"; Customer customer=(Customer) findUnique(hql, username); return customer; } }
[ "1649865412@qq.com" ]
1649865412@qq.com
032752466c11260abe5dfca16c4bce27e08fb1da
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/47/org/apache/commons/lang/StringEscapeUtils_escapeHtml_495.java
67a5d2cb745fb169afbbd69e5cfb816778ecebd0
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,237
java
org apach common lang escap unescap code string code java java script html xml sql author apach jakarta turbin author purpl technolog author href mailto alex purpletech alexand dai chaffe author antoni rilei author helg tesgaard author href sean boohai sean brown author href mailto ggregori seagullsw gari gregori author phil steitz author pete gieser version string escap util stringescapeutil escap charact code string code html entiti write code writer code code bread butter code code amp quot bread amp quot amp amp amp quot butter amp quot code support html entiti includ funki accent note commonli apostroph escap charact amp apo legal entiti support param writer writer receiv escap string param string code string code escap illeg argument except illegalargumentexcept writer except ioexcept code writer code pass except call link writer write method escap html escapehtml string unescap html unescapehtml string href http hotwir lyco webmonkei refer special charact iso entiti href http www org rec html32 latin1 html charact entiti iso latin href http www org rec html40 sgml entiti html html charact entiti refer href http www org html401 charset html html charact refer href http www org html401 charset html code posit html code posit escap html escapehtml writer writer string string except ioexcept writer illeg argument except illegalargumentexcept writer string entiti html40 escap writer string
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
1dbc3f4a3e42d112d0daa987274db8129dcd3205
e39e70ba043d868c349f420666c67bd32d733291
/eventposter/src/main/java/net/swiftos/eventposter/Impls/BroadCastReceiver/Entity/BroadCastEntity.java
863fcf09f5104ea09ac4232e135a788a13a733e3
[ "Apache-2.0" ]
permissive
ganyao114/MyEvent
7475dc1e42e459dc00518e6f54f42961fa028596
6817225e9ebd922c4c986851054480e4ad7303f1
refs/heads/master
2021-01-10T22:34:52.052864
2016-11-01T15:15:00
2016-11-01T15:15:00
69,576,286
1
1
null
null
null
null
UTF-8
Java
false
false
947
java
package net.swiftos.eventposter.Impls.BroadCastReceiver.Entity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import net.swiftos.eventposter.Exception.EventInvokeException; import net.swiftos.eventposter.Interface.IEventEntity; import java.lang.reflect.Method; /** * Created by gy939 on 2016/10/3. */ public class BroadCastEntity implements IEventEntity{ private Method method; private IntentFilter filter; public IntentFilter getFilter() { return filter; } public void setFilter(IntentFilter filter) { this.filter = filter; } public Method getMethod() { return method; } public void setMethod(Method method) { this.method = method; } @Override public Object invoke(Object invoker, Object... pars) throws EventInvokeException { return null; } }
[ "939543405@qq.com" ]
939543405@qq.com
7993701f2a5bcb431eb0b76694e53116efb7fca4
6173be9b7c8f776eaca89221935a6999df954b44
/src/test/java/com/example/demo/BdiSbApplicationTests.java
8bf458ad3f2235ffd2847eddf0af631dbb142c6b
[]
no_license
gusqls722/bdi-sb
93272d8412935295de814dd636109e23752cfd91
03213410253f49a15fabf58ed163dcb046fbd439
refs/heads/master
2020-04-08T15:48:20.972639
2018-11-28T11:40:54
2018-11-28T11:40:54
159,492,546
0
0
null
null
null
null
UTF-8
Java
false
false
673
java
package com.example.demo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import com.example.demo.util.Calc; @RunWith(SpringRunner.class) @SpringBootTest public class BdiSbApplicationTests { @Autowired private Calc calc; @Test public void contextLoads() { assertNotNull(calc); } @Test public void addTest() { int result = calc.add(4, 4); assertEquals(8, result); } }
[ "KOITT@KOITT-PC" ]
KOITT@KOITT-PC
aab62fa0aabe708aa2c746c8870225eb05aab2bc
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_f9d82e8c04127cd6968d35aeb7ee1e1116f1cb64/VictoryView/18_f9d82e8c04127cd6968d35aeb7ee1e1116f1cb64_VictoryView_t.java
08f1050348e53b0659876fac4f80071238840595
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,013
java
package se.chalmers.kangaroo.view; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; public class VictoryView extends JPanelWithBackground implements MouseListener { private Menubutton nextlevel, submit; private JTextField namefield; private String name; private GameView gameview; public VictoryView(String imagepath, int deathcount, double time, GameView gv) { super(imagepath); this.gameview = gv; nextlevel = new Menubutton("resources/images/nextlevel.png"); submit = new Menubutton("resources/images/submit.png"); namefield = new JTextField(); JPanel jp = new JPanel(); jp.add(namefield); jp.add(submit); BoxLayout layout = new BoxLayout(this, BoxLayout.Y_AXIS); this.setLayout(layout); this.setSize(1024, 576); this.add(new Menubutton("resources/images/victory_logo.png")); this.add(new Menubutton("resources/images/congratulations.png")); this.add(new JLabel("Deaths: " + deathcount)); this.add(new JLabel("Time: " + time)); this.add(jp); this.add(nextlevel); nextlevel.addMouseListener(this); submit.addMouseListener(this); } @Override public void mouseClicked(MouseEvent e) { // Empty method } @Override public void mouseEntered(MouseEvent e) { if (e.getSource() == nextlevel) nextlevel.setIcon(new ImageIcon( "resources/images/nextlevel_onHover.png")); if (e.getSource() == submit) submit.setIcon(new ImageIcon("resources/images/submit_onHover.png")); } @Override public void mouseExited(MouseEvent e) { if (e.getSource() == nextlevel) nextlevel.setIcon(new ImageIcon("resources/images/nextlevel.png")); if (e.getSource() == submit) submit.setIcon(new ImageIcon("resources/images/submit.png")); } @Override public void mousePressed(MouseEvent e) { if (e.getSource() == nextlevel) nextlevel.setIcon(new ImageIcon( "resources/images/nextlevel_onSelect.png")); if (e.getSource() == submit) submit.setIcon(new ImageIcon("resources/images/submit_onSelect.png")); } @Override public void mouseReleased(MouseEvent e) { if (e.getSource() == nextlevel) nextlevel.setIcon(new ImageIcon("resources/images/nextlevel.png")); gameview.setNewLevel(true); if (e.getSource() == submit) { submit.setIcon(new ImageIcon("resources/images/submit.png")); try { name = removeSpaces(namefield.getText()); } catch (NullPointerException exc) { }; } } public String removeSpaces(String name) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < name.length(); i++) { if (!((Character) name.charAt(i)).equals(' ') || !((Character) name.charAt(i)).equals('')) sb.append(name.charAt(i)); } return sb.toString(); } public String getName() { return name; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
cbcd9baa8100a627c7755600079b5d70ee1f2954
2dcc440fa85d07e225104f074bcf9f061fe7a7ae
/gameserver/src/main/java/org/mmocore/gameserver/network/lineage/clientpackets/BypassUserCmd.java
84fea905a451ba44fc5439996c1c24bea49f6b8c
[]
no_license
VitaliiBashta/L2Jts
a113bc719f2d97e06db3e0b028b2adb62f6e077a
ffb95b5f6e3da313c5298731abc4fcf4aea53fd5
refs/heads/master
2020-04-03T15:48:57.786720
2018-10-30T17:34:29
2018-10-30T17:35:04
155,378,710
0
3
null
null
null
null
UTF-8
Java
false
false
1,109
java
package org.mmocore.gameserver.network.lineage.clientpackets; import org.mmocore.gameserver.handler.usercommands.IUserCommandHandler; import org.mmocore.gameserver.handler.usercommands.UserCommandHandler; import org.mmocore.gameserver.network.lineage.components.CustomMessage; import org.mmocore.gameserver.object.Player; /** * format: cd * Пример пакета по команде /loc: * AA 00 00 00 00 */ public class BypassUserCmd extends L2GameClientPacket { private int _command; @Override protected void readImpl() { _command = readD(); } @Override protected void runImpl() { final Player activeChar = getClient().getActiveChar(); if (activeChar == null) { return; } final IUserCommandHandler handler = UserCommandHandler.getInstance().getUserCommandHandler(_command); if (handler == null) { activeChar.sendMessage(new CustomMessage("common.S1NotImplemented").addString(String.valueOf(_command))); } else { handler.useUserCommand(_command, activeChar); } } }
[ "Vitalii.Bashta@accenture.com" ]
Vitalii.Bashta@accenture.com
aa65234cfbe02531be12c3f7041ca6b9dfe7f5c5
f0d25d83176909b18b9989e6fe34c414590c3599
/app/src/main/java/com/google/android/gms/fitness/request/zzav.java
7dbd3b2a96766901c237a95bb86b2dc20310d5b7
[]
no_license
lycfr/lq
e8dd702263e6565486bea92f05cd93e45ef8defc
123914e7c0d45956184dc908e87f63870e46aa2e
refs/heads/master
2022-04-07T18:16:31.660038
2020-02-23T03:09:18
2020-02-23T03:09:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,559
java
package com.google.android.gms.fitness.request; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.internal.safeparcel.zzb; import com.google.android.gms.fitness.data.DataSource; import com.google.android.gms.fitness.data.DataType; import java.util.ArrayList; public final class zzav implements Parcelable.Creator<SessionReadRequest> { public final /* synthetic */ Object createFromParcel(Parcel parcel) { int zzd = zzb.zzd(parcel); int i = 0; String str = null; String str2 = null; long j = 0; long j2 = 0; ArrayList<DataType> arrayList = null; ArrayList<DataSource> arrayList2 = null; boolean z = false; boolean z2 = false; ArrayList<String> arrayList3 = null; IBinder iBinder = null; while (parcel.dataPosition() < zzd) { int readInt = parcel.readInt(); switch (65535 & readInt) { case 1: str = zzb.zzq(parcel, readInt); break; case 2: str2 = zzb.zzq(parcel, readInt); break; case 3: j = zzb.zzi(parcel, readInt); break; case 4: j2 = zzb.zzi(parcel, readInt); break; case 5: arrayList = zzb.zzc(parcel, readInt, DataType.CREATOR); break; case 6: arrayList2 = zzb.zzc(parcel, readInt, DataSource.CREATOR); break; case 7: z = zzb.zzc(parcel, readInt); break; case 8: z2 = zzb.zzc(parcel, readInt); break; case 9: arrayList3 = zzb.zzC(parcel, readInt); break; case 10: iBinder = zzb.zzr(parcel, readInt); break; case 1000: i = zzb.zzg(parcel, readInt); break; default: zzb.zzb(parcel, readInt); break; } } zzb.zzF(parcel, zzd); return new SessionReadRequest(i, str, str2, j, j2, arrayList, arrayList2, z, z2, arrayList3, iBinder); } public final /* synthetic */ Object[] newArray(int i) { return new SessionReadRequest[i]; } }
[ "quyenlm.vn@gmail.com" ]
quyenlm.vn@gmail.com
ca5ce9ef829673d148ff6a4e99027d2fac8e2d49
ee9aa986a053e32c38d443d475d364858db86edc
/src/main/java/com/springrain/erp/modules/psi/web/PsiProductPostEmailInfoController.java
6dc11c95a722885388eea245b46382e8f38c44b1
[ "Apache-2.0" ]
permissive
modelccc/springarin_erp
304db18614f69ccfd182ab90514fc1c3a678aaa8
42eeb70ee6989b4b985cfe20472240652ec49ab8
refs/heads/master
2020-05-15T13:10:21.874684
2018-05-24T15:39:20
2018-05-24T15:39:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
java
package com.springrain.erp.modules.psi.web; import java.text.ParseException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; 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.ResponseBody; import com.springrain.erp.common.persistence.Page; import com.springrain.erp.common.web.BaseController; import com.springrain.erp.modules.psi.entity.PsiProductPostMailInfo; import com.springrain.erp.modules.psi.service.PsiProductPostMailInfoService; @Controller @RequestMapping(value = "${adminPath}/psi/productPostEmailInfo") public class PsiProductPostEmailInfoController extends BaseController { @Autowired private PsiProductPostMailInfoService postMailService; @RequestMapping(value = {"list", ""}) public String list(PsiProductPostMailInfo postInfo, HttpServletRequest request, HttpServletResponse response, Model model) throws ParseException { Page<PsiProductPostMailInfo> page=new Page<PsiProductPostMailInfo>(request, response); if(StringUtils.isEmpty(postInfo.getCountry())){ postInfo.setCountry("de"); } postMailService.find(page, postInfo); model.addAttribute("page", page); return "modules/psi/psiProductPostEmailInfoList"; } @ResponseBody @RequestMapping(value = {"updateStatus"}) public String updateStatus(Integer id,String status) { return this.postMailService.updateStatus(id, status); } }
[ "601906911@qq.com" ]
601906911@qq.com
a86e093a27bdfd59b5616dd4bcfca0e7418b2d70
a437584153bd45114a870ec298145c416caf5b96
/src/main/java/com/github/edgar615/js/FunctionExample.java
79fb0e2c05a88f2668ccf044a5e5337f41d5fd64
[]
no_license
kiwimg/graaljs-example
bcf94f96421c41c17ed340e78050432e4104d9b1
b8383452a8c7d33d84b48254156e5566d785762f
refs/heads/main
2023-03-19T19:39:06.137553
2021-03-12T08:33:26
2021-03-12T08:33:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,697
java
package com.github.edgar615.js; import javax.script.Invocable; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class FunctionExample { public static void main(String[] args) throws ScriptException, NoSuchMethodException, IOException { ScriptEngine engine = new ScriptEngineManager().getEngineByName("graal.js"); String scriptPath = "D:/workspace/graaljs-example/src/main/resources/calculator.js"; Path path = new File(scriptPath).toPath(); String calculatorScript = new String(Files.readAllBytes(path)); System.out.println(calculatorScript); Invocable inv = (Invocable) engine; // Context context = Context.create(); // context.eval("js", calculatorScript); // result = inv.invokeMethod(fn, "call", fn); // System.out.println(result); engine.eval(calculatorScript); Object calculator = engine.get("calculator"); System.out.println(calculator); int x = 3; int y = 4; Object addResult = inv.invokeMethod(calculator, "add", x, y); Object subResult = inv.invokeMethod(calculator, "subtract", x, y); Object mulResult = inv.invokeMethod(calculator, "multiply", x, y); Object divResult = inv.invokeMethod(calculator, "divide", x, y); System.out.println(addResult); System.out.println(subResult); System.out.println(mulResult); System.out.println(divResult); System.out.println(inv.invokeMethod(calculator, "testFile")); } }
[ "edgar615@gmail.com" ]
edgar615@gmail.com
72cff524f6c877e5468811167debdb448d75c6f8
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava16/Foo614.java
3e047b0c29633454dba9771b9a3ca2654311672e
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package applicationModulepackageJava16; public class Foo614 { public void foo0() { new applicationModulepackageJava16.Foo613().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
a07d2e70582eeaad1fb65c4ae3665638b1e45344
2122d24de66635b64ec2b46a7c3f6f664297edc4
/sso/spring-boot-oauth2-sso/ui/src/main/java/com/juanzero/service/impl/NoteServiceImpl.java
694147639d848fe450e88d336131850ae109c0ed
[]
no_license
yiminyangguang520/Java-Learning
8cfecc1b226ca905c4ee791300e9b025db40cc6a
87ec6c09228f8ad3d154c96bd2a9e65c80fc4b25
refs/heads/master
2023-01-10T09:56:29.568765
2022-08-29T05:56:27
2022-08-29T05:56:27
92,575,777
5
1
null
2023-01-05T05:21:02
2017-05-27T06:16:40
Java
UTF-8
Java
false
false
1,062
java
package com.juanzero.service.impl; import com.juanzero.dto.NoteDTO; import com.juanzero.service.NoteService; import java.util.Collection; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.hateoas.Resources; import org.springframework.http.ResponseEntity; import org.springframework.security.oauth2.client.OAuth2RestTemplate; import org.springframework.stereotype.Service; /** * Created by jjmendoza on 18/7/2017. */ @Service public class NoteServiceImpl implements NoteService { @Autowired OAuth2RestTemplate restTemplate; @Value("${resource-server}/note") private String notesURL; @Override public Collection<NoteDTO> getAllNotes() { Resources<NoteDTO> notes = restTemplate.getForObject(notesURL, Resources.class); return notes.getContent(); } @Override public NoteDTO addNote(NoteDTO note) { ResponseEntity<NoteDTO> response = restTemplate.postForEntity(notesURL, note, NoteDTO.class); return response.getBody(); } }
[ "litz-a@glodon.com" ]
litz-a@glodon.com
fa9006c43b709d5e58f9f86cd46996ddfc20dc24
414f491820f9ca4662e8da5c02e5b07b5422fe55
/src/main/java/no/blockwork/blockwork/Blockwork.java
26119e8c359001f2b3fee182c4fbaab3dc8a192b
[]
no_license
MinecraftDotNo/Ravenholm
ad6e12d3d7a4577a7182378d5f1b436c3096db2d
f3aec0fbe15a938c30dccc1f068530fe6d0326af
refs/heads/master
2021-01-02T22:57:22.667311
2015-09-14T02:16:01
2015-09-14T02:16:01
18,131,817
0
0
null
null
null
null
UTF-8
Java
false
false
8,004
java
package no.blockwork.blockwork; import com.mysql.jdbc.jdbc2.optional.MysqlDataSource; import com.sk89q.worldedit.bukkit.WorldEditPlugin; import no.blockwork.antiafk.AntiAfk; import no.blockwork.blocklog.Blocklog; import no.blockwork.bugs.Bugs; import no.blockwork.chat.Chat; import no.blockwork.groups.Groups; import no.blockwork.irc.Irc; import no.blockwork.lumberjack.Lumberjack; import no.blockwork.mybb.MyBb; import no.blockwork.portals.Portals; import no.blockwork.protection.Protection; import no.blockwork.pvp.Pvp; import no.blockwork.railways.Railways; import no.blockwork.tools.Tools; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.event.HandlerList; import org.bukkit.plugin.RegisteredListener; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitTask; import java.sql.Connection; import java.sql.SQLException; import java.util.List; public class Blockwork extends JavaPlugin { private MysqlDataSource dataSource; private Connection db; private Integer dbTaskId; private Tools tools; private MyBb mybb; private Groups groups; private Blocklog blocklog; private Protection protection; private Irc irc; private Chat chat; private Railways railways; private Lumberjack lumberjack; private Bugs bugs; private Pvp pvp; private Portals portals; private AntiAfk antiAfk; private WorldEditPlugin worldEdit; private BlockworkListener blockworkListener; public Blockwork() { } public void onEnable() { saveDefaultConfig(); FileConfiguration config = getConfig(); config.options().copyDefaults(true); saveConfig(); reloadConfig(); dataSource = new MysqlDataSource(); dataSource.setServerName(config.getString("mysql.host")); dataSource.setPort(config.getInt("mysql.port")); dataSource.setDatabaseName(config.getString("mysql.schema")); dataSource.setUser(config.getString("mysql.user")); dataSource.setPassword(config.getString("mysql.password")); tools = config.getBoolean("tools.enabled") ? new Tools(this) : null; mybb = config.getBoolean("mybb.enabled") ? new MyBb(this) : null; groups = config.getBoolean("groups.enabled") ? new Groups(this) : null; blocklog = config.getBoolean("blocklog.enabled") ? new Blocklog(this) : null; protection = config.getBoolean("protection.enabled") ? new Protection(this) : null; irc = config.getBoolean("irc.enabled") ? new Irc(this) : null; chat = config.getBoolean("chat.enabled") ? new Chat(this) : null; railways = config.getBoolean("railways.enabled") ? new Railways(this) : null; lumberjack = config.getBoolean("lumberjack.enabled") ? new Lumberjack(this) : null; bugs = config.getBoolean("bugs.enabled") ? new Bugs(this) : null; pvp = config.getBoolean("pvp.enabled") ? new Pvp(this) : null; portals = config.getBoolean("portals.enabled") ? new Portals(this) : null; antiAfk = config.getBoolean("antiafk.enabled") ? new AntiAfk(this) : null; getDb(); dbTaskId = getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() { public void run() { try { getDb().prepareStatement("SELECT 1").execute(); } catch (SQLException exception) { getLogger().info("Server database disconnected."); } } }, 200, 200); blockworkListener = new BlockworkListener(this); worldEdit = (WorldEditPlugin) getServer().getPluginManager().getPlugin("WorldEdit"); if (tools != null) { tools.onEnable(); } if (mybb != null) { mybb.onEnable(); } if (groups != null) { groups.onEnable(); } if (blocklog != null) { blocklog.onEnable(); } if (protection != null) { protection.onEnable(); } if (irc != null) { irc.onEnable(); } if (chat != null) { chat.onEnable(); } if (railways != null) { railways.onEnable(); } if (lumberjack != null) { lumberjack.onEnable(); } if (bugs != null) { bugs.onEnable(); } if (pvp != null) { pvp.onEnable(); } if (portals != null) { portals.onEnable(); } if (antiAfk != null) { antiAfk.onEnable(); } getServer().getPluginManager().registerEvents(blockworkListener, this); } public void onDisable() { getServer().getScheduler().cancelTask(dbTaskId); HandlerList.unregisterAll(blockworkListener); if (antiAfk != null) { antiAfk.onDisable(); } if (portals != null) { portals.onDisable(); } if (pvp != null) { pvp.onDisable(); } if (bugs != null) { bugs.onDisable(); } if (lumberjack != null) { lumberjack.onDisable(); } if (railways != null) { railways.onDisable(); } if (chat != null) { chat.onDisable(); } if (irc != null) { irc.onDisable(); } if (protection != null) { protection.onDisable(); } if (blocklog != null) { blocklog.onDisable(); } if (groups != null) { groups.onDisable(); } if (mybb != null) { mybb.onDisable(); } if (tools != null) { tools.onDisable(); } List<RegisteredListener> listeners = HandlerList.getRegisteredListeners(this); if (listeners.size() != 0) { for (RegisteredListener listener : listeners) { getLogger().info(listener.getListener() + " was not unregistered by own package!"); } HandlerList.unregisterAll(this); } List<BukkitTask> tasks = getServer().getScheduler().getPendingTasks(); if (tasks.size() != 0) { for (BukkitTask task : tasks) { getLogger().info(task + " was not cancelled by own package!"); } getServer().getScheduler().cancelTasks(this); } try { if (db != null && !db.isClosed()) { db.close(); db = null; } } catch (SQLException exception) { exception.printStackTrace(); } } public Connection getDb() { try { if (db == null || db.isClosed()) { db = dataSource.getConnection(); blocklog.prepareStatements(db); protection.prepareStatements(db); } } catch (SQLException exception) { exception.printStackTrace(); } catch (NullPointerException exception) { } return db; } public Tools getTools() { return tools; } public MyBb getMyBb() { return mybb; } public Groups getGroups() { return groups; } public Blocklog getBlocklog() { return blocklog; } public Protection getProtection() { return protection; } public Irc getIrc() { return irc; } public Chat getChat() { return chat; } public Railways getRailways() { return railways; } public Lumberjack getLumberjack() { return lumberjack; } public Bugs getBugs() { return bugs; } public Pvp getPvp() { return pvp; } public Portals getPortals() { return portals; } public AntiAfk getAntiAfk() { return antiAfk; } public WorldEditPlugin getWorldEdit() { return worldEdit; } }
[ "jckf@jckf.no" ]
jckf@jckf.no
143ca8a29af12a34f9e2acd8708362d94dfcaf74
76fb910a2d7d8d5f43366a43d4fb6b5427d18325
/d2k4_source/D2K_v4_0_2/SRC_COMPILE_FAIL/basic/test/TableImplTest.java
321532e38a765cbe05e4497949264a490ea536e5
[]
no_license
EISALab/IMOGAgroundwater
2bf8342a89753c0fefa95a45809cdc376b307f4a
6bf1bd74e7fbc59082fec127b4b6b1537076c180
refs/heads/master
2016-09-06T04:49:14.305434
2013-06-12T16:22:52
2013-06-12T16:22:52
10,646,593
1
0
null
null
null
null
UTF-8
Java
false
false
2,209
java
/* * Created on May 23, 2003 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package ncsa.d2k.modules.core.datatype.table.basic.test; import junit.framework.TestCase; import ncsa.d2k.modules.core.datatype.table.*; import ncsa.d2k.modules.core.datatype.table.basic.*; /** * @author anca * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public abstract class TableImplTest extends TestCase { /** * Constructor for TableImplTest. * @param arg0 */ public TableImplTest(String arg0) { super(arg0); } public static void main(String[] args) { junit.textui.TestRunner.run(TableImplTest.class); } /* * @see TestCase#setUp() */ public abstract Table getFullTable(); public abstract Table getEmptyTable(); Column [] columns; protected void setUp() throws Exception { int numColumns = 5; columns = new Column[numColumns]; int [] vali = { 0, 1, 2, 3}; columns[0] = new IntColumn(vali); double [] vald = { 0, 1, 2, 3}; columns[1] = new DoubleColumn(vald); short [] vals = { 0, 1, 2, 3}; columns[2] = new ShortColumn(vals); float [] valf = { 0, 1, 2, 3}; columns[3] = new FloatColumn(valf); long [] vall = { 0, 1, 2, 3}; columns[4] = new LongColumn(vall); } /* * @see TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); } //don't test if setColumn is not accessible from Table Interface /*public void testSetColumn() { Table tbFull = getFullTable(); Column col; for (int i =0; i < columns.length; i ++) { tbFull.setColumn(columns[i],i); } } */ // don't test is setColumns is not accessible from Table interface public void testSetColumns() { Table tbFull = getFullTable(); //TODO Implement setColumns(). } public void testSwapRows() { //TODO Implement swapRows(). } public void testSwapColumns() { //TODO Implement swapColumns(). } public void testToExampleTable() { //TODO Implement toExampleTable(). } public void testHasMissingValues() { //TODO Implement hasMissingValues(). } }
[ "krishjadhwani@gmail.com" ]
krishjadhwani@gmail.com
7814800cf8f76dbdfdfcc0ec8565ee3067436158
46a83616af7ab04e7806bfa3e53879ef31771ec8
/keyboard/src/main/java/org/ditto/keyboard/panel/emoji/EmojiController.java
8715e547095477a899065911ed5e6aee14aa452a
[]
no_license
conanchen/hiask-android-keyboard
058ecab3dc13fcdfed05b23729a30a35b70f0b2a
2f27e6d39fb08845851bbab43af6ff62c3e3f143
refs/heads/master
2021-06-28T13:30:36.954959
2017-09-14T12:35:29
2017-09-14T12:35:29
103,512,769
0
0
null
null
null
null
UTF-8
Java
false
false
2,104
java
package org.ditto.keyboard.panel.emoji; import android.support.v7.widget.RecyclerView.RecycledViewPool; import com.airbnb.epoxy.TypedEpoxyController; import org.ditto.keyboard.dbroom.emoji.Emoji; import org.ditto.keyboard.dbroom.gift.Gift; import org.ditto.keyboard.panel.emoji.epoxymodels.ItemEmojiModel_; import java.util.List; public class EmojiController extends TypedEpoxyController<List<Emoji>> { public interface AdapterCallbacks { void onEmojiClicked(Emoji carousel, int colorPosition); } private final AdapterCallbacks callbacks; private final RecycledViewPool recycledViewPool; public EmojiController(AdapterCallbacks callbacks, RecycledViewPool recycledViewPool) { this.callbacks = callbacks; this.recycledViewPool = recycledViewPool; setDebugLoggingEnabled(true); } @Override protected void buildModels(List<Emoji> carousels) { if (carousels != null) { for (Emoji emoji:carousels) { add(new ItemEmojiModel_() .id(emoji.codepoint) .codepointu16(emoji.codepointu16) .clickListener((model, parentView, clickedView, position) -> { // A model click listener is used instead of a normal click listener so that we can get // the current position of the view. Since the view may have been moved when the colors // were shuffled we can't rely on the position of the model when it was added here to // be correct, since the model won't have been rebound when shuffled. callbacks.onEmojiClicked(emoji, position); })); } } } @Override protected void onExceptionSwallowed(RuntimeException exception) { // Best practice is to throw in debug so you are aware of any issues that Epoxy notices. // Otherwise Epoxy does its best to swallow these exceptions and continue gracefully throw exception; } }
[ "chenchunhai@changhongit.com" ]
chenchunhai@changhongit.com
7c1627cde20014e6d824004b624137e8ec898ee5
f28a8ab07505b816622c873eb1ab3abd8bdbfb91
/identity/domain/entities/src/main/java/uk/co/idv/identity/entities/alias/Alias.java
78e3502d2f81ea8abdd1fd3d986144f2c5e2b0b6
[ "MIT" ]
permissive
michaelruocco/idv-context
a15f0f7e018ed760825c70ac719ae0c889ac4077
0361db3fd2ed0320891b56db6c20a685f873a414
refs/heads/master
2022-07-23T22:31:40.626627
2021-12-07T18:46:00
2021-12-07T18:46:00
270,421,513
0
0
MIT
2021-12-07T19:38:33
2020-06-07T20:17:34
Java
UTF-8
Java
false
false
511
java
package uk.co.idv.identity.entities.alias; public interface Alias { String getType(); String getValue(); boolean isCardNumber(); default boolean isIdvId() { return isType(IdvId.TYPE); } default boolean isType(String type) { return getType().equals(type); } default boolean valueEndsWith(String suffix) { return getValue().endsWith(suffix); } default String format() { return String.format("%s|%s", getType(), getValue()); } }
[ "michael.ruocco@hotmail.com" ]
michael.ruocco@hotmail.com
0d44942e62703f5cdc13f3470e14eeae0a6493e8
07399d93a482f7565a97e69d8b9197ad25adf688
/com.astra.ses.spell.gui.language/src/com/astra/ses/spell/language/model/ast/Set.java
d6109b8b1c214980c2b39a9c424c6a8f50951b2e
[]
no_license
CalypsoCubesat/SPELL-GUI-4.0.2-SRC
1fda020fb3edc11f5ad2fd59ba1c5cea5b0c1074
a171a26ea9413c9787f0c7b4e98aeb8c2ab378ab
refs/heads/master
2020-08-29T07:26:22.789627
2019-10-28T04:34:16
2019-10-28T04:34:16
217,966,403
0
0
null
null
null
null
UTF-8
Java
false
false
2,713
java
// Autogenerated AST node package com.astra.ses.spell.language.model.ast; import com.astra.ses.spell.language.model.SimpleNode; import java.util.Arrays; public final class Set extends exprType { public exprType[] elts; public Set(exprType[] elts) { this.elts = elts; } public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Arrays.hashCode(elts); return result; } public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Set other = (Set) obj; if (!Arrays.equals(elts, other.elts)) return false; return true; } public Set createCopy() { return createCopy(true); } public Set createCopy(boolean copyComments) { exprType[] new0; if (this.elts != null) { new0 = new exprType[this.elts.length]; for (int i = 0; i < this.elts.length; i++) { new0[i] = (exprType) (this.elts[i] != null ? this.elts[i].createCopy(copyComments) : null); } } else { new0 = this.elts; } Set temp = new Set(new0); temp.beginLine = this.beginLine; temp.beginColumn = this.beginColumn; if (this.specialsBefore != null && copyComments) { for (Object o : this.specialsBefore) { if (o instanceof commentType) { commentType commentType = (commentType) o; temp.getSpecialsBefore().add(commentType.createCopy(copyComments)); } } } if (this.specialsAfter != null && copyComments) { for (Object o : this.specialsAfter) { if (o instanceof commentType) { commentType commentType = (commentType) o; temp.getSpecialsAfter().add(commentType.createCopy(copyComments)); } } } return temp; } public String toString() { StringBuffer sb = new StringBuffer("Set["); sb.append("elts="); sb.append(dumpThis(this.elts)); sb.append("]"); return sb.toString(); } public Object accept(VisitorIF visitor) throws Exception { return visitor.visitSet(this); } public void traverse(VisitorIF visitor) throws Exception { if (elts != null) { for (int i = 0; i < elts.length; i++) { if (elts[i] != null) { elts[i].accept(visitor); } } } } }
[ "matthew.travis@aresinstitute.org" ]
matthew.travis@aresinstitute.org
42c04990dc4821566a3088153cc1d6c22874b299
3a70da9963bc7d6f1d90420bedf70f42c66392f9
/ocsp-server/src/main/java/org/xipki/ocsp/server/type/OID.java
e0e40394ada6ae6487e15a4c0cd29092b9aa3f74
[ "Apache-2.0" ]
permissive
buptzyf/xipki
3a29dcf732f220ba9b8ec6613e58de496fb473e0
92e4a61cda10f975ded6331436e31e8064efff07
refs/heads/master
2023-04-03T04:27:51.120095
2021-03-28T21:34:31
2021-03-28T21:34:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,299
java
/* * * Copyright (c) 2013 - 2020 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.ocsp.server.type; import java.io.IOException; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.isismtt.ISISMTTObjectIdentifiers; import org.bouncycastle.asn1.ocsp.OCSPObjectIdentifiers; import org.bouncycastle.asn1.x509.Extension; import org.xipki.security.ObjectIdentifiers; import org.xipki.util.CompareUtil; /** * OID enums. * * @author Lijun Liao * @since 2.2.0 */ // CHECKSTYLE:SKIP public enum OID { ID_PKIX_OCSP_NONCE(OCSPObjectIdentifiers.id_pkix_ocsp_nonce), ID_PKIX_OCSP_PREFSIGALGS(ObjectIdentifiers.Extn.id_pkix_ocsp_prefSigAlgs), ID_PKIX_OCSP_EXTENDEDREVOKE(ObjectIdentifiers.Extn.id_pkix_ocsp_extendedRevoke), ID_ISISMTT_AT_CERTHASH(ISISMTTObjectIdentifiers.id_isismtt_at_certHash), ID_INVALIDITY_DATE(Extension.invalidityDate), ID_PKIX_OCSP_ARCHIVE_CUTOFF(OCSPObjectIdentifiers.id_pkix_ocsp_archive_cutoff), ID_PKIX_OCSP_RESPONSE(OCSPObjectIdentifiers.id_pkix_ocsp_response); private final String id; private final byte[] encoded; OID(ASN1ObjectIdentifier oid) { this.id = oid.getId(); try { this.encoded = oid.getEncoded(); } catch (IOException ex) { throw new IllegalStateException("should not happen", ex); } } public String getId() { return id; } public int getEncodedLength() { return encoded.length; } public int write(byte[] out, int offset) { return ASN1Type.arraycopy(encoded, out, offset); } public static OID getInstanceForEncoded(byte[] data, int offset) { for (OID m : OID.values()) { if (CompareUtil.areEqual(data, offset, m.encoded, 0, m.encoded.length)) { return m; } } return null; } }
[ "lijun.liao@gmail.com" ]
lijun.liao@gmail.com
9d10f7e5bba5fcb1c918f5712ea3a4e0cc87012b
4f2eed022edee0cdc7e5fc4ca9f428007aa8077c
/src/screenshot/Test0.java
dca5e1dc2ad24631230fac96ac56276642eb2658
[]
no_license
javaandselenium/WCSM9Sel
1d61ce6e8db897ebdf6e99d539cd0a5cc6cacfa4
aa83213979c96f526183ea3ded7f67419ba1440e
refs/heads/master
2023-08-11T12:40:44.207470
2021-10-13T04:27:47
2021-10-13T04:27:47
410,741,339
2
3
null
null
null
null
UTF-8
Java
false
false
914
java
package screenshot; import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class Test0 { public static void main(String[] args) throws IOException { WebDriver driver=new ChromeDriver(); driver.manage().window().maximize(); driver.get("https://www.amazon.com/"); driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS); //Step:1 Typcasting TakesScreenshot ts=(TakesScreenshot)driver; //step:2 access the method File src = ts.getScreenshotAs(OutputType.FILE); //step:3 specify the location File dest=new File("./photo/amazon.png"); //copy paste from src to dest FileUtils.copyFile(src, dest); driver.close(); } }
[ "QSP@QSP" ]
QSP@QSP
0b0c4a7eae00fd5f1783e282ddccefc861bcd1d8
31665642ed578801e684eb0e71526707416f6c7b
/src/a/medusa/algebra/point.java
6a1f8841e6afba4b441f4687cd98d335dc2ca1b9
[]
no_license
calint/a
79fb449e4e9baf4b19da6b1cbf925235254ba981
50c8d03e0115cd52737a0f95e86b9043e731f419
refs/heads/master
2023-02-02T14:30:44.406050
2023-01-29T04:57:04
2023-01-29T04:57:04
32,960,630
0
0
null
null
null
null
UTF-8
Java
false
false
2,251
java
package a.medusa.algebra; import java.io.Serializable; import a.medusa.medusa.autoset; import a.medusa.medusa.inline; import a.medusa.medusa.reads; import a.medusa.medusa.self; import b.xwriter; public class point implements Serializable,vector{ public float x,y,z; public point(){} public @autoset point(final float x,final float y,final float z){this.x=x;this.y=y;this.z=z;} public point(final@reads point origo,final@reads point p){ x=p.x-origo.x;y=p.y-origo.y;z=p.z-origo.z;//? 2 reads pipes bits to 1 simd op then pipes bits to 1 write } @Override public String toString(){return "|"+x+" "+y+" "+z+"|";} public boolean eq(final point p){return x==p.x&&y==p.y&&z==p.z;}//? simd final public point inc(final@reads point delta,final float scale){ x+=delta.x*scale;y+=delta.y*scale;z+=delta.z*scale;//? simd return this; } final public@self point norm(){return scale(1);} final public@self point scale(final float size){ final float len=sqrtf(x*x+y*y+z*z);//? hw const float size(const float*components,const int count)const if(len==0)return this; final float len_inv=size/len; x*=len_inv;y*=len_inv;z*=len_inv;//? simd return this; } final public float dot(final@reads point v){ return v.x*x+v.y*y+v.z*v.z;//? 1 op in hw } // stores result in this vector final public@self point cross(final@reads point v){ final float x1=x;final float y1=y;final float z1=z;//? 1 ram read final float x2=v.x;final float y2=v.y;final float z2=v.z;//? 1 ram read // result[0]=p1[1]*p2[2]-p2[1]*p1[2]; // result[1]=p1[2]*p2[0]-p2[2]*p1[0]; // result[2]=p1[0]*p2[1]-p2[0]*p1[1]; final float nx=y1*z2-y2*z1;//? 1 op in hw final float ny=z1*x2-z2*x1;//? final float nz=x1*y2-x2*y1;//? x=nx;y=ny;z=nz;//? 1 write ram op return this; } public static final@inline float sqrtf(final float f){return(float)Math.sqrt(f);} ///textilize // public void to(final xwriter x){x.p(getClass().getName()).p("{x:").p(this.x).p(",y:").p(y).p(",z:").p(z).p("}");} public void to(final xwriter x){x.p("|").p(this.x).p(" ").p(y).p(" ").p(z).p("|");} public void copy(final point p){x=p.x;y=p.y;z=p.z;} final static public@reads point origo=new point(); private static final long serialVersionUID=1; }
[ "calin.tenitchi@gmail.com" ]
calin.tenitchi@gmail.com
cd17eab0fccbc2ef7caaad8057c876d81f4edec8
a770e95028afb71f3b161d43648c347642819740
/sources/org/telegram/ui/ChatActivity$$ExternalSyntheticLambda145.java
2946933b0569257753aeda3cbfcd5662fb126631
[]
no_license
Edicksonjga/TGDecompiledBeta
d7aa48a2b39bbaefd4752299620ff7b72b515c83
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
refs/heads/master
2023-08-25T04:12:15.592281
2021-10-28T20:24:07
2021-10-28T20:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
605
java
package org.telegram.ui; import org.telegram.tgnet.RequestDelegate; import org.telegram.tgnet.TLObject; import org.telegram.tgnet.TLRPC$TL_error; public final /* synthetic */ class ChatActivity$$ExternalSyntheticLambda145 implements RequestDelegate { public final /* synthetic */ ChatActivity f$0; public /* synthetic */ ChatActivity$$ExternalSyntheticLambda145(ChatActivity chatActivity) { this.f$0 = chatActivity; } public final void run(TLObject tLObject, TLRPC$TL_error tLRPC$TL_error) { this.f$0.lambda$processSelectedOption$125(tLObject, tLRPC$TL_error); } }
[ "fabian_pastor@msn.com" ]
fabian_pastor@msn.com
d5ffeb4077dc4484d1d081a638e5da8ce9205d4d
3c4763922cda3f3a990b74cdba6f8a30b07467de
/src/main/java/students/vitaly_porsev/lesson_4/level_2/task_1/MaxNumDemo.java
c46898e979d9a1b629bc8e59163400ad6ccbeb4b
[]
no_license
VitalyPorsev/JavaGuru1
07db5a0cc122b097a20e56c9da431cd49d3c01ea
f3c25b6357309d4e9e8ac0047e51bb8031d14da8
refs/heads/main
2023-05-10T15:35:55.419713
2021-05-15T18:48:12
2021-05-15T18:48:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
199
java
package students.vitaly_porsev.lesson_4.level_2.task_1; public class MaxNumDemo { public static void main(String[] args) { MaxNum maxNum = new MaxNum(); maxNum.maxNum(); } }
[ "pointofview88@gmail.com" ]
pointofview88@gmail.com
a4e525939e1cd60441dea0e87049a68f100b84d5
c024ac5e0b74dd7e5775753294962390b45e9ae7
/src/main/java/net/mcreator/blahmod/procedures/CrystalCaveAirUpdateProcedure.java
cacd3bd9eeea4871cafffb9b9cde3abfc3a03957
[]
no_license
blahblahbal/Blah-s-Minecraft-MCreator-Mod
600f9cce717b965c51de5b15a9762c50138cfe22
a8cdf57bc5078de5e07fc233f5f3542c94b3255d
refs/heads/master
2023-05-06T11:03:33.889262
2021-06-03T02:25:09
2021-06-03T02:25:09
373,354,094
0
0
null
null
null
null
UTF-8
Java
false
false
3,014
java
package net.mcreator.blahmod.procedures; import net.minecraft.world.IWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.block.Blocks; import net.mcreator.blahmod.block.XenonCrystalClusterBlock; import net.mcreator.blahmod.block.NeonCrystalClusterBlock; import net.mcreator.blahmod.block.KryptonCrystalClusterBlock; import net.mcreator.blahmod.block.ArgonCrystalClusterBlock; import net.mcreator.blahmod.BlahmodModElements; import net.mcreator.blahmod.BlahmodMod; import java.util.Map; @BlahmodModElements.ModElement.Tag public class CrystalCaveAirUpdateProcedure extends BlahmodModElements.ModElement { public CrystalCaveAirUpdateProcedure(BlahmodModElements instance) { super(instance, 1704); } public static void executeProcedure(Map<String, Object> dependencies) { if (dependencies.get("x") == null) { if (!dependencies.containsKey("x")) BlahmodMod.LOGGER.warn("Failed to load dependency x for procedure CrystalCaveAirUpdate!"); return; } if (dependencies.get("y") == null) { if (!dependencies.containsKey("y")) BlahmodMod.LOGGER.warn("Failed to load dependency y for procedure CrystalCaveAirUpdate!"); return; } if (dependencies.get("z") == null) { if (!dependencies.containsKey("z")) BlahmodMod.LOGGER.warn("Failed to load dependency z for procedure CrystalCaveAirUpdate!"); return; } if (dependencies.get("world") == null) { if (!dependencies.containsKey("world")) BlahmodMod.LOGGER.warn("Failed to load dependency world for procedure CrystalCaveAirUpdate!"); return; } double x = dependencies.get("x") instanceof Integer ? (int) dependencies.get("x") : (double) dependencies.get("x"); double y = dependencies.get("y") instanceof Integer ? (int) dependencies.get("y") : (double) dependencies.get("y"); double z = dependencies.get("z") instanceof Integer ? (int) dependencies.get("z") : (double) dependencies.get("z"); IWorld world = (IWorld) dependencies.get("world"); double rand = 0; if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.AIR.getDefaultState().getBlock())) { if (((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.NETHERRACK.getDefaultState().getBlock())) { if ((Math.random() < 0.01)) { rand = (double) Math.random(); if (((rand) < 0.25)) { world.setBlockState(new BlockPos((int) x, (int) y, (int) z), ArgonCrystalClusterBlock.block.getDefaultState(), 3); } else if (((rand) < 0.5)) { world.setBlockState(new BlockPos((int) x, (int) y, (int) z), KryptonCrystalClusterBlock.block.getDefaultState(), 3); } else if (((rand) < 0.75)) { world.setBlockState(new BlockPos((int) x, (int) y, (int) z), NeonCrystalClusterBlock.block.getDefaultState(), 3); } else { world.setBlockState(new BlockPos((int) x, (int) y, (int) z), XenonCrystalClusterBlock.block.getDefaultState(), 3); } } } } } }
[ "jabawakijadehawk@gmail.com" ]
jabawakijadehawk@gmail.com
8158f27daa5bfffc51ce77e3e40974edfd94da1f
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/uk/gov/gchq/gaffer/data/element/IdentifierTypeTest.java
b4a6e60d3d51212309f90ee5c8406b290d617a94
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
964
java
/** * Copyright 2016-2019 Crown Copyright * * 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 uk.gov.gchq.gaffer.data.element; import org.junit.Assert; import org.junit.Test; public class IdentifierTypeTest { @Test public void shouldGetIdentifierTypeFromName() { for (final IdentifierType idType : IdentifierType.values()) { Assert.assertEquals(idType, IdentifierType.fromName(idType.name())); } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
a0a23fb7e1d2aae2cd57491714d307c8960f4b85
faf90717900212acdcf1244d12eaa7ec72689077
/src/main/java/org/lyon_yan/app/android/lib_lyon_yan_utils/refeclt/RefecltUtils.java
b1562023462ce614c51490298b19bd09e31d3135
[ "Apache-2.0" ]
permissive
Lyon1994/lib_lyon_yan_utils
5b6ab17178362efe01f65f5832e5e0b962242ffe
156ae54d7a458ab7d63634f731a97641e8dd11f7
HEAD
2016-08-12T18:12:54.421369
2016-02-29T16:03:17
2016-02-29T16:03:17
48,571,095
0
0
null
null
null
null
UTF-8
Java
false
false
2,673
java
package org.lyon_yan.app.android.lib_lyon_yan_utils.refeclt; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; /** * refelect工具包 * * @author Lyon_Yan <br> * <b>time</b>: 2015年10月31日 下午3:35:27 */ public class RefecltUtils { private static final String SET_ = "set"; private static final String GET_ = "get"; /** * 将属性的首字符大写,方便构造get,set方法 * * @param name * @return * @author Lyon_Yan <br> * <b>time</b>: 2015年10月31日 下午3:35:46 */ public static String returnSetName(String name) {// 将属性的首字符大写,方便构造get,set方法 return SET_ + returnUpperCaseFirstChar(name); } /** * 将属性的首字符大写,方便构造get,set方法 * * @param name * @return * @author Lyon_Yan <br> * <b>time</b>: 2015年10月31日 下午3:35:46 */ public static String returnGetName(String name) {// 将属性的首字符大写,方便构造get,set方法 return GET_ + returnUpperCaseFirstChar(name); } /** * 将属性的首字符大写,方便构造get,set方法 * * @param name * @return * @author Lyon_Yan <br> * <b>time</b>: 2015年11月3日 上午11:03:52 */ public static String returnUpperCaseFirstChar(String name) { return name.substring(0, 1).toUpperCase() + name.substring(1); } /** * 获取泛型 * * @param field * @return */ public static List<Class> getGenericClassesFromType(Field field) { field.setAccessible(true); String genericTypes = field.getGenericType().toString().replace(field.getType().getName(), "").replace("<", "").replace(">", ""); genericTypes = genericTypes.replace(" ", ""); List<Class> classes = new ArrayList<>(); try { if (genericTypes.contains(",")) { String[] clazzes = genericTypes.split(","); for (String clazz : clazzes) { classes.add(Class.forName(clazz)); } } else { classes.add(Class.forName(genericTypes)); } } catch (ClassNotFoundException e) { e.printStackTrace(); } return classes; } /** * 获取泛型 * * @param field * @return */ public static Class getGenericClassFromType(Field field) { List<Class> classes = getGenericClassesFromType(field); if (classes.size() > 0) { return classes.get(0); } return null; } }
[ "765211630@qq.com" ]
765211630@qq.com
4fae5dc09d36a2496416192208d6bdb5379d7352
3ea35a9d2a32a11f2c6e0fa21860f73c042ca1b3
/III курс/Trim3/Шаблони за проектиране/Упражнения/Proxy/Proxy/src/fmi/RealSound.java
0e2f95ef1b096e142d1655bdca7c4afe8e12d196
[]
no_license
angelzbg/Informatika
35be4926c16fb1eb2fd8e9459318c5ea9f5b1fd8
6c9e16087a30253e1a6d5cd9e9346a7cdd4b3e17
refs/heads/master
2021-02-08T14:50:46.438583
2020-03-01T14:18:26
2020-03-01T14:18:26
244,162,465
7
2
null
null
null
null
UTF-8
Java
false
false
373
java
package fmi; public class RealSound implements Sound{ private String fileName; public RealSound(String fileName) { this.fileName = fileName; loadFromDisk(fileName); } @Override public void play() { System.out.println("Playing: " + fileName); } private void loadFromDisk(String fileName){ System.out.println("Loading file from disk: " + fileName); } }
[ "badblo0dbg@gmail.com" ]
badblo0dbg@gmail.com
db24388f68733709bace8a6287bfbfadca5cd3de
03eff65822ba0f44686c767463f3b05b12517b69
/sentiment-dao/src/main/java/zx/soft/sent/dao/domain/WeiboOldInfo.java
916e6e2e1ea94071102859886a2a658fa21b6b0d
[]
no_license
billhongs/sentiment-search
a43fb3ff661ddfe54db48db6d50e90f71d90586e
5fa469fdba8495d12f1d75c0b9ebadd2c3a9b451
refs/heads/master
2021-01-18T10:01:02.942637
2014-06-19T08:29:41
2014-06-19T08:29:41
21,086,771
0
1
null
null
null
null
UTF-8
Java
false
false
2,403
java
package zx.soft.sent.dao.domain; /** * 旧的微博信息类 * * @author wanggang * */ public class WeiboOldInfo { private String wid; private String username; private int repostsCount; private int commentsCount; private String text; private long createat; private String owid; private String ousername; private Boolean favorited; private String geo; private double latitude; private double longitude; private String originalpic; private String source; private String visible; public String getWid() { return wid; } public void setWid(String wid) { this.wid = wid; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public int getRepostsCount() { return repostsCount; } public void setRepostsCount(int repostsCount) { this.repostsCount = repostsCount; } public int getCommentsCount() { return commentsCount; } public void setCommentsCount(int commentsCount) { this.commentsCount = commentsCount; } public String getText() { return text; } public void setText(String text) { this.text = text; } public Long getCreateat() { return createat; } public void setCreateat(Long createat) { this.createat = createat; } public String getOwid() { return owid; } public void setOwid(String owid) { this.owid = owid; } public String getOusername() { return ousername; } public void setOusername(String ousername) { this.ousername = ousername; } public Boolean getFavorited() { return favorited; } public void setFavorited(Boolean favorited) { this.favorited = favorited; } public String getGeo() { return geo; } public void setGeo(String geo) { this.geo = geo; } public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public double getLongitude() { return longitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public String getOriginalpic() { return originalpic; } public void setOriginalpic(String originalpic) { this.originalpic = originalpic; } public String getSource() { return source; } public void setSource(String source) { this.source = source; } public String getVisible() { return visible; } public void setVisible(String visible) { this.visible = visible; } }
[ "wanggang@zxisl.com" ]
wanggang@zxisl.com
9a49658cf4d69907e5650b202853adfb07bf3eae
b909195147a3c7086b93a79bab2908bed1ebb6f5
/java/core/src/main/java/com/github/os72/protobuf_3_11_1/ExtensionSchema.java
5bbfb59603152c046c4736ef842f0f8c0fc0919b
[ "LicenseRef-scancode-protobuf" ]
permissive
os72/protobuf-java-shaded-3-11-1
615e8000a9846d597917d8c250df192aa9ac3084
3d86857b390b385ab20f3937a4fbf31084e7d8ab
refs/heads/master
2023-08-26T15:27:16.301772
2019-12-10T07:35:54
2019-12-10T07:35:54
226,570,101
1
1
null
null
null
null
UTF-8
Java
false
false
4,212
java
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package com.github.os72.protobuf_3_11_1; import java.io.IOException; import java.util.Map; abstract class ExtensionSchema<T extends FieldSet.FieldDescriptorLite<T>> { /** Returns true for messages that support extensions. */ abstract boolean hasExtensions(MessageLite prototype); /** Returns the extension {@link FieldSet} for the message instance. */ abstract FieldSet<T> getExtensions(Object message); /** Replaces the extension {@link FieldSet} for the message instance. */ abstract void setExtensions(Object message, FieldSet<T> extensions); /** Returns the extension {@link FieldSet} and ensures it's mutable. */ abstract FieldSet<T> getMutableExtensions(Object message); /** Marks the extension {@link FieldSet} as immutable. */ abstract void makeImmutable(Object message); /** * Parses an extension. Returns the passed-in unknownFields parameter if no unknown enum value is * found or a modified unknownFields (a new instance if the passed-in unknownFields is null) * containing unknown enum values found while parsing. * * @param <UT> The type used to store unknown fields. It's either UnknownFieldSet in full runtime * or UnknownFieldSetLite in lite runtime. */ abstract <UT, UB> UB parseExtension( Reader reader, Object extension, ExtensionRegistryLite extensionRegistry, FieldSet<T> extensions, UB unknownFields, UnknownFieldSchema<UT, UB> unknownFieldSchema) throws IOException; /** Gets the field number of an extension entry. */ abstract int extensionNumber(Map.Entry<?, ?> extension); /** Serializes one extension entry. */ abstract void serializeExtension(Writer writer, Map.Entry<?, ?> extension) throws IOException; /** Finds an extension by field number. */ abstract Object findExtensionByNumber( ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number); /** Parses a length-prefixed MessageSet item from the reader. */ abstract void parseLengthPrefixedMessageSetItem( Reader reader, Object extension, ExtensionRegistryLite extensionRegistry, FieldSet<T> extensions) throws IOException; /** * Parses the entire content of a {@link ByteString} as one MessageSet item. Unlike {@link * #parseLengthPrefixedMessageSetItem}, there isn't a length-prefix. */ abstract void parseMessageSetItem( ByteString data, Object extension, ExtensionRegistryLite extensionRegistry, FieldSet<T> extensions) throws IOException; }
[ "osuciu@yahoo.com" ]
osuciu@yahoo.com
4f8d1ca078090278bda7845a5a8f845ea8b9799b
8647366b0d98f89fd48c41d42e955ea62acb3497
/excle-analysis/src/main/java/com/cj/analysis/vo/VoLedger.java
1a2754c4ccf2484ed99b9eab076cac8f050f051c
[]
no_license
XDFHTY/oil
0cfd381c64594695842432a81e041b2dd334e300
feddeeedd2b3532f33fcae4f88ed9c2b754a8ef1
refs/heads/master
2022-09-19T09:18:19.853899
2019-09-16T02:42:54
2019-09-16T02:42:54
208,694,761
0
0
null
2022-09-01T23:13:07
2019-09-16T02:41:01
Java
UTF-8
Java
false
false
2,208
java
package com.cj.analysis.vo; import io.swagger.annotations.ApiModelProperty; import java.util.List; public class VoLedger { @ApiModelProperty(value="taskAreaId数组",hidden=true) private Long[] factoryIds; private List<Long> factoryIdList; @ApiModelProperty(value="taskAreaId数组",hidden=true) private Long[] taskAreaIds; private List<Long> taskAreaIdList; @ApiModelProperty(name = "datetime",value = "时间",dataType = "String") private String datetime; @ApiModelProperty(name = "pageSize",value = "每页大小",dataType = "Integer") private Integer pageSize=10; @ApiModelProperty(name = "currentPage",value = "当前页",dataType = "Integer") private Integer currentPage=0; @ApiModelProperty(name = "grade",value = "0-一,1-较大,2-重大)",dataType = "Integer") private Integer grade; public Long[] getFactoryIds() { return factoryIds; } public void setFactoryIds(Long[] factoryIds) { this.factoryIds = factoryIds; } public List<Long> getFactoryIdList() { return factoryIdList; } public void setFactoryIdList(List<Long> factoryIdList) { this.factoryIdList = factoryIdList; } public Long[] getTaskAreaIds() { return taskAreaIds; } public void setTaskAreaIds(Long[] taskAreaIds) { this.taskAreaIds = taskAreaIds; } public List<Long> getTaskAreaIdList() { return taskAreaIdList; } public void setTaskAreaIdList(List<Long> taskAreaIdList) { this.taskAreaIdList = taskAreaIdList; } public String getDatetime() { return datetime; } public void setDatetime(String datetime) { this.datetime = datetime; } public Integer getPageSize() { return pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public Integer getCurrentPage() { return currentPage; } public void setCurrentPage(Integer currentPage) { this.currentPage = currentPage; } public Integer getGrade() { return grade; } public void setGrade(Integer grade) { this.grade = grade; } }
[ "a1668281642@gmail.com" ]
a1668281642@gmail.com
ff99a10d29f55f340d47e63b21096a2ce43bec93
a63d907ad63ba6705420a6fb2788196d1bd3763c
/src/dataflow/unified-computing/core/src/test/java/com/tencent/bk/base/dataflow/core/function/TestUnixtimeDiff.java
4827f0e93389d7fe817cf98f32875b3b356f7bde
[ "MIT" ]
permissive
Tencent/bk-base
a38461072811667dc2880a13a5232004fe771a4b
6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2
refs/heads/master
2022-07-30T04:24:53.370661
2022-04-02T10:30:55
2022-04-02T10:30:55
381,257,882
101
51
NOASSERTION
2022-04-02T10:30:56
2021-06-29T06:10:01
Python
UTF-8
Java
false
false
1,818
java
/* * Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. * * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. * * BK-BASE 蓝鲸基础平台 is licensed under the MIT License. * * License for BK-BASE 蓝鲸基础平台: * -------------------------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.tencent.bk.base.dataflow.core.function; import static org.junit.Assert.assertEquals; import org.junit.Test; public class TestUnixtimeDiff { @Test public void testCall() { UnixtimeDiff unixtimeDiff = new UnixtimeDiff(); Integer expected = 30; assertEquals(expected, unixtimeDiff.call(1466436000,1466434200,"minute")); } }
[ "terrencehan@tencent.com" ]
terrencehan@tencent.com
e1a93c7cc1914fe60f71c419d58287f3f5893770
941cb164c35d531de510e4aa95872711d3405e39
/app/src/main/java/sinia/com/baihangeducation/mine/activity/NewTaskActivity.java
5471fe1d91830d85c2996a0119268221b6e79c7b
[]
no_license
lenka123123/jy
f81220d6f80cca4fde5872b4e3cb992abb5171b8
2a2fc5d675ec01fd45a3950f1adeb9bcea081c7a
refs/heads/master
2020-03-28T00:50:19.854060
2018-11-30T06:15:47
2018-11-30T06:15:47
147,453,961
1
0
null
null
null
null
UTF-8
Java
false
false
3,567
java
package sinia.com.baihangeducation.mine.activity; import android.support.v4.widget.SwipeRefreshLayout; import com.example.framwork.utils.ProgressActivityUtils; import com.example.framwork.widget.ProgressActivity; import com.example.framwork.widget.superrecyclerview.recycleview.SuperRecyclerView; import java.util.ArrayList; import java.util.List; import sinia.com.baihangeducation.R; import sinia.com.baihangeducation.supplement.base.BaseActivity; import sinia.com.baihangeducation.mine.adapter.NewTaskAdapter; import com.mcxtzhang.swipemenulib.info.bean.NewTaskInfo; import sinia.com.baihangeducation.mine.presenter.NewTaskPresenter; import sinia.com.baihangeducation.mine.view.NewTaskView; /** * Created by Administrator on 2018/4/16. */ public class NewTaskActivity extends BaseActivity implements NewTaskView, SuperRecyclerView.LoadingListener, SwipeRefreshLayout.OnRefreshListener { private int countpage = 1; private int itemnum = 20; private ProgressActivityUtils progressActivityUtils; private List<NewTaskInfo> mList; private NewTaskAdapter mNewTaskAdapter; private SuperRecyclerView rvContainer; private ProgressActivity progressActivity; private SwipeRefreshLayout swipeContainer; private boolean isLoadMore; private NewTaskPresenter newTaskPresenter; @Override public int initLayoutResID() { return R.layout.newtask; } @Override protected void initData() { mList = new ArrayList<>(); mCommonTitle.setCenterText(R.string.newtask); mCommonTitle.setBackground(getResources().getDrawable(R.color.white)); newTaskPresenter = new NewTaskPresenter(context, this); newTaskPresenter.getNewTaskData(); mNewTaskAdapter = new NewTaskAdapter(context, mList); initSwipeLayout(swipeContainer, this); showSwipeRefreshLayout(swipeContainer); progressActivityUtils = new ProgressActivityUtils(context, progressActivity); initRecyclerView(rvContainer, mNewTaskAdapter, this); } @Override protected void initView() { rvContainer = $(R.id.rv_container); progressActivity = $(R.id.progressActivity); swipeContainer = $(R.id.swipe_container); } @Override public void showLoading() { } @Override public void hideLoading() { hideSwipeRefreshLayout(swipeContainer); rvContainer.completeLoadMore(); } @Override public String getPage() { return countpage + ""; } @Override public String getPerpage() { return itemnum + ""; } @Override public void getNewTaskSuccess(List<NewTaskInfo> data, int maxpage) { if (data.size() == 0) { progressActivityUtils.showEmptry("暂无数据"); } else { progressActivityUtils.showContent(); countpage++; if (maxpage == 1 || countpage > maxpage) { rvContainer.setLoadMoreEnabled(false); } else { rvContainer.setLoadMoreEnabled(true); } if (!isLoadMore) { mList.clear(); } mList.addAll(data); mNewTaskAdapter.notifyDataSetChanged(); } } @Override public void onRefresh() { isLoadMore = false; countpage = 1; getServerData(); } @Override public void onLoadMore() { isLoadMore = true; getServerData(); } public void getServerData() { newTaskPresenter.getNewTaskData(); } }
[ "13902276741@163.com" ]
13902276741@163.com
8ea6b9df2f34da590516ffe01905f66675102cd0
87f970ab8b4b504c8215f6aac2d6e98ac0e9f9d5
/src/java/com/wonders/stpt/metroExpress/service/impl/MetroExpressServiceImpl.java
84b1f9740ddf864ca6ef7c8eddc58fdcfa3bf9c6
[]
no_license
Q-jone/wd-portal
f7339fd76e89744576780b0f02761c74a77b9a13
7dd219cf23c7474d2a81f3ae61cfed6e458f8e88
refs/heads/master
2021-01-19T18:41:43.377611
2015-06-24T15:57:18
2015-06-24T15:57:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,083
java
/** * */ package com.wonders.stpt.metroExpress.service.impl; import java.sql.ResultSet; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.wonders.module.common.ExecuteSql; import com.wonders.stpt.core.code.CodeUtil; import com.wonders.stpt.metroExpress.dao.MetroExpressDao; import com.wonders.stpt.metroExpress.entity.bo.MetroExpress; import com.wonders.stpt.metroExpress.service.MetroExpressService; import com.wondersgroup.framework.core.bo.Page; /** * @ClassName: MetroExpressServiceImpl * @Description: TODO(这里用一句话描述这个类的作用) * @author zhoushun * @date 2012-2-29 下午07:44:21 * */ public class MetroExpressServiceImpl implements MetroExpressService{ private MetroExpressDao metroExpressDao; public MetroExpressDao getMetroExpressDao() { return metroExpressDao; } public void setMetroExpressDao(MetroExpressDao metroExpressDao) { this.metroExpressDao = metroExpressDao; } public MetroExpress viewMetroExpress(String id){ return (MetroExpress)metroExpressDao.load(id); } public void addMetroExpress(MetroExpress metroExpress){ metroExpressDao.save(metroExpress); } public void updateMetroExpress(MetroExpress metroExpress){ metroExpressDao.update(metroExpress); } public List<MetroExpress> findLatestMetroExpressEvents(String accidentLine, String accidentEmergency, int size){ return metroExpressDao.findLatestMetroExpressEvents(accidentLine,accidentEmergency,size); } public List<String> findMetroExpressCode(String codeType_code, String codeInfo_code){ return CodeUtil.findCodeInfoByCode(codeType_code, codeInfo_code); } public Page findMetroExpressByPage(Map<String, Object> filter,int pageNo, int pageSize){ return metroExpressDao.findMetroExpressByPage(filter, pageNo, pageSize); } public List<String> findMetroLineConfig(){ ExecuteSql dealsql= new ExecuteSql("dataSource2"); String sql="select line_id,line_name from t_metro_line order by sorting_order "; List<String> lists = new ArrayList<String>(); String name = ""; String id = ""; try{ //System.out.println("sql=:"+sql); ResultSet rs=dealsql.ExecuteDemandSql(sql); while(rs.next()){ id = rs.getString("line_id"); name = rs.getString("line_name"); lists.add(id+":"+name); } rs.close(); dealsql.close(); }catch(Exception e){ //System.out.println("getDeptNameById has an error::"+e); } return lists; } public Map<String,String> findMetroLineConfigMap(){ Map<String,String> map = new HashMap<String,String>(); ExecuteSql dealsql= new ExecuteSql("dataSource2"); String sql="select line_id,line_name from t_metro_line order by sorting_order "; String name = ""; String id = ""; try{ //System.out.println("sql=:"+sql); ResultSet rs=dealsql.ExecuteDemandSql(sql); while(rs.next()){ map.put( rs.getString("line_id"),rs.getString("line_name")); } rs.close(); dealsql.close(); }catch(Exception e){ //System.out.println("getDeptNameById has an error::"+e); } return map; } }
[ "657603429@qq.com" ]
657603429@qq.com
02a38778fcc00b8c9399edf307178f38df0d6de3
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-13546-1-18-Single_Objective_GGA-IntegrationSingleObjective-/org/xwiki/model/reference/EntityReference_ESTest_scaffolding.java
81161c7bdf83a0f3d17aebeac4e58bcdbd0afa16
[ "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
3,078
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun May 17 18:01:22 UTC 2020 */ package org.xwiki.model.reference; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class EntityReference_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.model.reference.EntityReference"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(EntityReference_ESTest_scaffolding.class.getClassLoader() , "org.xwiki.model.internal.reference.LocalizedStringEntityReferenceSerializer", "org.xwiki.model.internal.reference.StringReferenceSeparators$3", "org.xwiki.model.internal.reference.AbstractStringEntityReferenceSerializer", "org.xwiki.stability.Unstable", "org.xwiki.model.internal.reference.StringReferenceSeparators$4", "org.xwiki.component.annotation.Component", "org.xwiki.model.reference.EntityReference", "org.xwiki.model.internal.reference.StringReferenceSeparators", "org.xwiki.model.internal.reference.StringReferenceSeparators$1", "org.xwiki.text.StringUtils", "org.xwiki.model.internal.reference.StringReferenceSeparators$2", "org.apache.commons.lang3.StringUtils", "org.xwiki.model.internal.reference.DefaultStringEntityReferenceSerializer", "org.apache.commons.lang3.Validate", "org.xwiki.model.reference.DocumentReference", "org.xwiki.model.reference.LocalDocumentReference", "org.apache.commons.lang3.builder.Builder", "org.apache.commons.lang3.builder.HashCodeBuilder", "org.xwiki.model.EntityType", "org.xwiki.model.reference.EntityReferenceSerializer" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
34acd690b1d943a7f9a402e1a713fa1c53580075
0108fa9b53f447e50f760080aef71d07ea6b39a8
/app/src/main/java/com/example/parkjunghun/house_hold/Util/DatabaseManager.java
593c0fbf4c7ead909cf600b163164ef9460e27d8
[]
no_license
Junghun0/House_Hold
2e5caae12e94f40ea8ad04013146cfa96e65e41d
333031a9d42e1e70bf2b074b46c9149e0d1ef163
refs/heads/master
2020-03-24T10:34:09.594604
2018-08-12T05:35:55
2018-08-12T05:35:55
142,660,394
0
0
null
null
null
null
UTF-8
Java
false
false
4,165
java
package com.example.parkjunghun.house_hold.Util; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; import com.example.parkjunghun.house_hold.Model.DayInfoModel; import com.example.parkjunghun.house_hold.Model.TodayInfoEvent; import com.example.parkjunghun.house_hold.Model.UsingInfo; import com.example.parkjunghun.house_hold.Model.UsinglastInfoEvent; import com.google.firebase.database.ChildEventListener; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; import org.greenrobot.eventbus.EventBus; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; public class DatabaseManager { public List<DayInfoModel> dayInfoModels = new ArrayList<>(); public static ArrayList<UsingInfo> usingInfoArrayList = new ArrayList<>(); public static DatabaseManager instance = new DatabaseManager(); private FirebaseDatabase firebaseDatabase; private DatabaseReference usinginfo_databaseReference; private SimpleDateFormat simpleDateFormat_day = new SimpleDateFormat("yyyy_MM_dd"); private Date date = new Date(); public static DatabaseManager getInstance() { return instance; } public DatabaseManager() { firebaseDatabase = FirebaseDatabase.getInstance(); usinginfo_databaseReference = firebaseDatabase.getReference("using_info"); } public void setUsingInfo(UsingInfo usingInfo) { usinginfo_databaseReference.child(simpleDateFormat_day.format(date)).push().setValue(usingInfo); Util.getInstance().setUsingInfo(usingInfo); } public void gettodayInfo() { usinginfo_databaseReference.child(simpleDateFormat_day.format(date)).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { dayInfoModels.clear(); for(DataSnapshot snapshot : dataSnapshot.getChildren()){ DayInfoModel dayInfoModel = snapshot.getValue(DayInfoModel.class); dayInfoModels.add(dayInfoModel); } EventBus.getDefault().post(new TodayInfoEvent(dayInfoModels)); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } public void getUsingInfo() { usinginfo_databaseReference.child(simpleDateFormat_day.format(date)).addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) { UsingInfo usingInfo = dataSnapshot.getValue(UsingInfo.class); int bus_usingmoney = Integer.parseInt(usingInfo.getUsing_money().replaceAll(",", "")); int bus_getbalance = Integer.parseInt(usingInfo.getBalance().replaceAll(",", "")); usingInfoArrayList.add(usingInfo); EventBus.getDefault().post(new UsinglastInfoEvent(true, bus_usingmoney, bus_getbalance, usingInfo.getUsing_place())); } @Override public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) { Log.e("onchildchanged", "" + dataSnapshot.getValue()+","); } @Override public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) { Log.e("onchildremoved", "test" + dataSnapshot.getValue()); } @Override public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) { Log.e("onchildMoved", "test" + dataSnapshot.getValue()); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { Log.e("oncancelled", "test" + databaseError.toString()); } }); } }
[ "go9018@naver.com" ]
go9018@naver.com
3a24363e1bd1bad2d7b52eabac5d3c365f29601b
a6ea18a9fc034ddf21149c058c0399c6a1b0f31b
/src/fr/timothefcn/mc/loupgarou/classes/IndexedRole.java
6f25808acabe844e272e11a64318b9ed6fc39e19
[]
no_license
TimotheFCN/LoupGarou
07d65e062fe60c040cb938171b50e8899f4c4c8f
3ec76953dcd9b14d447d3680c0e4db837478d62b
refs/heads/master
2021-04-18T17:28:49.355515
2020-03-24T14:23:55
2020-03-24T14:23:55
249,566,756
0
0
null
null
null
null
UTF-8
Java
false
false
342
java
package fr.timothefcn.mc.loupgarou.classes; import fr.timothefcn.mc.loupgarou.roles.Role; import lombok.Getter; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor public class IndexedRole { @Getter private final Role role; @Getter private int number = 1; public void increase() { number++; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
965f5b3d17949aee7dfe0b041cef789574033417
f00cc7cebd863e67375bae8b28e1893575ac137c
/src/main/java/com/rks/musicx/data/loaders/PlaylistLoader.java
288142ad6f5993a6ad36a94073f9baf0c65acc13
[ "Apache-2.0" ]
permissive
agandhy25/MusicX-Music-Player
890a07c9c9b955acd24664b3a31b2862da8bb916
38ab743d86c0338b79de06926ae5c592ac34c46d
refs/heads/master
2021-01-19T02:12:15.907947
2017-01-28T16:55:09
2017-01-28T16:55:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,616
java
package com.rks.musicx.data.loaders; import android.Manifest; import android.content.Context; import android.database.Cursor; import android.provider.MediaStore; import android.support.v4.content.PermissionChecker; import com.rks.musicx.data.model.Song; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class PlaylistLoader extends BaseAsyncTaskLoader<List<Song>> { private static final String[] sProjection = { MediaStore.Audio.Playlists.Members.AUDIO_ID, MediaStore.Audio.Media.TITLE, MediaStore.Audio.Media.ARTIST, MediaStore.Audio.Media.ALBUM, MediaStore.Audio.Media.ALBUM_ID, MediaStore.Audio.Media.ARTIST_ID, MediaStore.Audio.Media.TRACK, MediaStore.Audio.Media.DATA }; private long mPlaylistId; public PlaylistLoader(Context context, long playlistId) { super(context); mPlaylistId = playlistId; } @Override public List<Song> loadInBackground() { List<Song> playlist = new ArrayList<>(); String sortorder = MediaStore.Audio.Playlists.Members.PLAY_ORDER; if (PermissionChecker.checkCallingOrSelfPermission(getContext(), Manifest.permission.READ_EXTERNAL_STORAGE) == PermissionChecker.PERMISSION_GRANTED){ Cursor cursor = getContext().getContentResolver().query(MediaStore.Audio.Playlists.Members.getContentUri("external", mPlaylistId), sProjection, null,null, sortorder); if (cursor != null && cursor.moveToFirst()) { int idCol = cursor .getColumnIndex(MediaStore.Audio.Playlists.Members.AUDIO_ID); if (idCol == -1) { idCol = cursor.getColumnIndex(MediaStore.Audio.Media._ID); } int titleCol = cursor .getColumnIndex(MediaStore.Audio.Media.TITLE); int artistCol = cursor .getColumnIndex(MediaStore.Audio.Media.ARTIST); int albumCol = cursor .getColumnIndex(MediaStore.Audio.Media.ALBUM); int albumIdCol = cursor .getColumnIndex(MediaStore.Audio.Media.ALBUM_ID); int trackCol = cursor .getColumnIndex(MediaStore.Audio.Media.TRACK); int datacol = cursor.getColumnIndex(MediaStore.Audio.Media.DATA); do { long id = cursor.getLong(idCol); String title = cursor.getString(titleCol); String artist = cursor.getString(artistCol); String album = cursor.getString(albumCol); long albumId = cursor.getLong(albumIdCol); int track = cursor.getInt(trackCol); String mSongPath = cursor.getString(datacol); Song song = new Song(); /* Setup metadata of playlist */ song.setAlbum(album); song.setmSongPath(mSongPath); song.setArtist(artist); song.setId(id); song.setAlbumId(albumId); song.setTrackNumber(track); song.setTitle(title); playlist.add(song); } while (cursor.moveToNext()); cursor.close(); } if(cursor == null){ Collections.emptyList(); } return playlist; }else { return null; } } }
[ "developerrajneeshsingh@gmail.com" ]
developerrajneeshsingh@gmail.com
5f61de7621fe9087f28b79f8e3fc742a6e1e24d0
18740e547c4f2bf234b480ec616a94e90fdfa938
/spring-annotation/src/main/java/cn/edu/cqvie/config/MainConfigOfAutowired.java
4c90a46b0950b6d1eea6447a8b55b445a718410e
[ "Apache-2.0" ]
permissive
lyc88/spring-demo
d46112e0d7b88507f48dd0ddbed35189f30f65d4
f3744404c27cd422b5f888968f82534ca6af2fe3
refs/heads/master
2021-05-20T09:16:37.904965
2020-02-27T03:23:07
2020-02-27T03:23:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
911
java
package cn.edu.cqvie.config; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import cn.edu.cqvie.bean.Car; import cn.edu.cqvie.bean.Color; import cn.edu.cqvie.dao.BookDao; @Configuration @ComponentScan({ "cn.edu.cqvie.bean", "cn.edu.cqvie.dao", "cn.edu.cqvie.service", "cn.edu.cqvie.controller" }) public class MainConfigOfAutowired { @Primary @Bean("bookDao2") public BookDao bookDao2() { BookDao bookDao = new BookDao(); bookDao.setLable("2"); return bookDao; } @Bean public Color color(@Qualifier("car") Car car) { return new Color(car); } @Bean @Primary public Car car1() { Car car = new Car(); car.setLable("BMW"); return car; } }
[ "xxx@xxx.com" ]
xxx@xxx.com
b534beb0194b681a3dec747b41c5f4dbaddb3406
814cb99cbf9cfa5107fdb7db764c0974af49c669
/src/main/java/io/github/asw/i3a/agentsWebClient/clients/IncidentsClientImpl.java
c42aebc0481800b751af856fe4915ef11248b489
[ "MIT" ]
permissive
asw-i3a/agents-web-client
926a9697772de50ecae07189be21783be017b244
e306ad08ef708811b0c471e908d6028244cb8c03
refs/heads/master
2020-03-11T21:49:51.322719
2018-05-10T20:44:05
2018-05-10T20:44:05
130,275,825
0
2
MIT
2018-05-10T20:44:06
2018-04-19T21:45:20
Java
UTF-8
Java
false
false
2,152
java
package io.github.asw.i3a.agentsWebClient.clients; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponentsBuilder; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.JsonNode; import com.mashape.unirest.http.Unirest; import com.mashape.unirest.http.exceptions.UnirestException; import io.github.asw.i3a.agentsWebClient.types.Incident; import lombok.extern.slf4j.Slf4j; @Slf4j @Service public class IncidentsClientImpl implements IncidentsClient { @Value("${incidents.url}") private String service_url; @Override public Incident findByIncidentId( String incidentId ) { UriComponentsBuilder url = UriComponentsBuilder .fromUriString( service_url + "/incidents/" + incidentId ); return new RestTemplate().getForObject( url.toUriString(), Incident.class ); } @Override public Incident[] findByAgentId( String agentId ) { UriComponentsBuilder url = UriComponentsBuilder.fromUriString( service_url + "/incidents" ); url.queryParam( "agentId", agentId ); return new RestTemplate().getForObject( url.toUriString(), Incident[].class ); } @Override public String saveIncident( Incident incident ) { try { JsonNode json = new JsonNode( new ObjectMapper().writeValueAsString( incident ) ); HttpResponse<JsonNode> response = Unirest .post( service_url + "/save" ) .header( "Content-Type", "application/json; charset=utf8;" ) .body( json ).asJson(); if (response.getStatus() == HttpStatus.OK.value()) { log.info( "Added the inident to the service" ); return response.getBody().getObject().getString( "incidentId" ); } log.error( "Not added the inident to the service" ); return ""; } catch (JsonProcessingException | UnirestException e) { log.error( "Exception while adding the incident to the service: " + e.getMessage() ); return ""; } } }
[ "colunga91@gmail.com" ]
colunga91@gmail.com
6aa4922cdb195ac1cfcb6f4587ad6c0d5ca09e1a
f532ac7e26d9a3728f5683b9530240febd68fb9a
/cloud-consumer-ribbon/src/main/java/com/hry/spring/cloud/consumer/ribbon/ribbonclient/MyDefaultRibbonConfig.java
b7577c11ac6bb31fd018b47c4870eabe7d5a7a10
[]
no_license
zengzehui/spring_cloud
0c4f80a861ca2fbe2cb10a4636713929b6e1a2c4
347aa5a24aa889cb392b70538ef05b95ac0f9a7c
refs/heads/master
2021-10-25T12:30:44.336808
2021-10-19T15:26:06
2021-10-19T15:26:06
131,021,180
0
0
null
2018-04-25T14:44:08
2018-04-25T14:44:07
null
UTF-8
Java
false
false
695
java
package com.hry.spring.cloud.consumer.ribbon.ribbonclient; import com.hry.spring.cloud.consumer.ribbon.ribbonclient.self.MyPingUrl; import com.hry.spring.cloud.consumer.ribbon.ribbonclient.self.MyRule; import com.netflix.loadbalancer.IPing; import com.netflix.loadbalancer.IRule; import com.netflix.niws.loadbalancer.NIWSDiscoveryPing; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class MyDefaultRibbonConfig { // @Bean // public IRule ribbonRule() { // return new MyRule(); // } @Bean public IPing ribbonPing() { return new MyPingUrl(new NIWSDiscoveryPing()); } }
[ "hryou0922@126.com" ]
hryou0922@126.com
bf2ee1c8567c5c22b4a54f918276f2ce8c494c68
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/14/org/apache/commons/lang3/text/StrBuilder_ensureCapacity_231.java
69f36e07b48c8cf79bec6f53ea4b2b5728c5bbf0
[]
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
4,102
java
org apach common lang3 text build string constitu part provid flexibl power api string buffer stringbuff main differ string buffer stringbuff string builder stringbuild subclass direct access charact arrai addit method append separ appendwithsepar add arrai valu separ append pad appendpad add length pad charact append fix length appendfixedlength add fix width field builder char arrai tochararrai char getchar simpler wai rang charact arrai delet delet string replac search replac string left string leftstr string rightstr mid string midstr substr except builder string size clear empti isempti collect style api method view token astoken intern buffer sourc str token strtoken reader asread intern buffer sourc reader writer aswrit writer write directli intern buffer aim provid api mimic close string buffer stringbuff addit method note edg case invalid indic input alter individu method biggest output text 'null' control properti link set null text setnulltext string prior implement cloneabl implement clone method onward longer version str builder strbuilder char sequenc charsequ append serializ check capac ensur size param capac capac ensur enabl chain str builder strbuilder ensur capac ensurecapac capac capac buffer length buffer buffer capac system arraycopi buffer size
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
7e560dafd4a283f154632f56a8a27ed157949484
1cf1c4e00c4b7b2972d8c0b32b02a17e363d31b9
/sources/com/google/android/gms/internal/ads/are.java
45106ff8dd27543edabbc4e4422ef65045a03514
[]
no_license
rootmelo92118/analysis
4a66353c77397ea4c0800527afac85e06165fd48
a9cd8bb268f54c03630de8c6bdff86b0e068f216
refs/heads/main
2023-03-16T10:59:50.933761
2021-03-05T05:36:43
2021-03-05T05:36:43
344,705,815
0
0
null
null
null
null
UTF-8
Java
false
false
315
java
package com.google.android.gms.internal.ads; import java.util.List; public interface are extends List { /* renamed from: a */ void mo11053a(apc apc); /* renamed from: b */ Object mo11054b(int i); /* renamed from: d */ List<?> mo11055d(); /* renamed from: e */ are mo11056e(); }
[ "rootmelo92118@gmail.com" ]
rootmelo92118@gmail.com
670eb5f03a6aafd809d9aabf0c661f6326e9677e
c76fda2c453cdcc9c46db2105aae1ea72d0fac8e
/redpig-api/src/main/java/com/redpigmall/dao/ComplaintSubjectMapper.java
6fb327ae3a7869445fd3915989a6c1384be2df5d
[]
no_license
18182336296/new
213ba4bf80de1955ce9fdd69f53892bb45a277a2
722c39db381733e37c80b9ac6ec1b1afba25c162
refs/heads/master
2022-11-21T20:43:03.448373
2020-07-19T08:20:23
2020-07-19T08:20:23
280,778,769
0
2
null
null
null
null
UTF-8
Java
false
false
1,046
java
package com.redpigmall.dao; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Param; import com.redpigmall.domain.ComplaintSubject; public interface ComplaintSubjectMapper extends SupperMapper { void batchDelete(List<ComplaintSubject> objs); List<ComplaintSubject> selectObjByProperty(Map<String, Object> maps); ComplaintSubject selectByPrimaryKey(Long id); List<ComplaintSubject> queryPageList(Map<String, Object> maps); Integer selectCount(Map<String, Object> maps); List<ComplaintSubject> queryByIds(List<Long> ids); List<ComplaintSubject> queryPageListByParentIsNull(Map<String, Object> params); void saveEntity(ComplaintSubject obj); void updateById(ComplaintSubject obj); void deleteById(@Param(value="id")Long id); List<ComplaintSubject> queryPages(Map<String,Object> params); void batchDeleteByIds(List<Long> ids); List<ComplaintSubject> queryPagesWithNoRelations(Map<String,Object> params); List<ComplaintSubject> queryPageListWithNoRelations(Map<String,Object> params); }
[ "15361560307@163.com" ]
15361560307@163.com
d83c192f07c5b18f0e6bbaa6d42b21d379dafe6d
c6d93152ab18b0e282960b8ff224a52c88efb747
/安慧软件资料/gitRepository/ITMS-3.0/workFlowCode/cy.its.wrokflow/ah.its.wrokflow.domain/src/main/java/ah/its/wrokflow/domain/WfMessageDomainI.java
35f62afb9c42d5cdea2f8c04086e6207dbb81963
[]
no_license
BAT6188/company-database
adfe5d8b87b66cd51efd0355e131de164b69d3f9
40d0342345cadc51ca2555840e32339ca0c83f51
refs/heads/master
2023-05-23T22:18:22.702550
2018-12-25T00:58:15
2018-12-25T00:58:15
null
0
0
null
null
null
null
GB18030
Java
false
false
725
java
package ah.its.wrokflow.domain; import java.util.List; import ah.its.wrokflow.repository.dao.WfMessage; /** * @Title: WfMessageDomainI.java * @Package ah.its.wrokflow.domain * @Description: 通知公告的领域 * @author chengj@cychina.cn * @version V1.0 */ public interface WfMessageDomainI { /** * 根据id查询 */ public WfMessage queryMessageById(String id); /** * 根据message查找 */ public List<WfMessage> queryMessagesByRecord(WfMessage message); /** * 添加 * @param message * @return */ public int addMessage(WfMessage message); /** * 修改 * @param message * @return */ public int updateMessage(WfMessage message); public int deleteMessageById(String messageId); }
[ "729235023@qq.com" ]
729235023@qq.com
514e55bcb0c993f3c97733e8cab0ca935b729dcf
70af73c95279f8dbd51e153f0f23d123e6b0689b
/hutool-http/src/test/java/com/xiaoleilu/hutool/http/test/HttpRequestTest.java
88e396dc961774f275c10826aff664c914f56542
[ "Apache-2.0" ]
permissive
imkgo/hutool
df074f2af249db63c65c12a09e03f12d4975f817
794c5d6f4ec14316dee8c5a565dedc948c5246f0
refs/heads/master
2021-09-22T14:19:48.629489
2018-09-11T03:24:28
2018-09-11T03:24:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,279
java
package com.xiaoleilu.hutool.http.test; import org.junit.Ignore; import org.junit.Test; import com.xiaoleilu.hutool.date.DateUtil; import com.xiaoleilu.hutool.date.TimeInterval; import com.xiaoleilu.hutool.http.HttpRequest; import com.xiaoleilu.hutool.http.HttpResponse; import com.xiaoleilu.hutool.lang.Console; /** * {@link HttpRequest}单元测试 * @author Looly * */ public class HttpRequestTest { final String url = "http://photo.qzone.qq.com/fcgi-bin/fcg_list_album?uin=88888&outstyle=2"; @Test @Ignore public void asyncGetTest() { TimeInterval timer = DateUtil.timer(); HttpResponse body = HttpRequest.get(url).charset("GBK").executeAsync(); long interval = timer.interval(); timer.restart(); Console.log(body.body()); long interval2 = timer.interval(); Console.log("Async response spend {}ms, body spend {}ms", interval, interval2); } @Test @Ignore public void syncGetTest() { TimeInterval timer = DateUtil.timer(); HttpResponse body = HttpRequest.get(url).charset("GBK").execute(); long interval = timer.interval(); timer.restart(); Console.log(body.body()); long interval2 = timer.interval(); Console.log("Async response spend {}ms, body spend {}ms", interval, interval2); } }
[ "loolly@gmail.com" ]
loolly@gmail.com
48c599b84eadc82d2dfe14b0b2d4d44f7a9b3cbc
3b9cf2936abe0bb4d5507853a79d98f2d91af870
/vividus-plugin-web-app/src/main/java/org/vividus/bdd/steps/ui/web/validation/HighlightingSoftAssert.java
a8225df591fceb5dccf0d2a5201722a8dfb897ae
[ "Apache-2.0" ]
permissive
ALegchilov/vividus
ef8a4906efb0c2ff68fd624fde4d2e6d743bae9b
55bce7d2a7bcf5c43f17d34eb2c190dd6142f552
refs/heads/master
2020-09-08T16:50:21.014816
2019-11-12T10:40:45
2019-11-15T10:10:52
221,188,634
0
0
Apache-2.0
2019-11-12T10:15:40
2019-11-12T10:15:39
null
UTF-8
Java
false
false
6,984
java
/* * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.vividus.bdd.steps.ui.web.validation; import java.util.List; import javax.inject.Inject; import org.hamcrest.Matcher; import org.openqa.selenium.WebElement; import org.vividus.softassert.exception.VerificationError; import org.vividus.ui.web.context.IWebUiContext; public class HighlightingSoftAssert implements IHighlightingSoftAssert { @Inject private IDescriptiveSoftAssert descriptiveSoftAssert; @Inject private IWebUiContext webUiContext; @Override public IDescriptiveSoftAssert withHighlightedElement(WebElement element) { webUiContext.putAssertingWebElements(List.of(element)); return this; } @Override public IDescriptiveSoftAssert withHighlightedElements(List<WebElement> elements) { webUiContext.putAssertingWebElements(elements); return this; } @Override public boolean assertTrue(String businessDescription, String systemDescription, boolean condition) { boolean result = descriptiveSoftAssert.assertTrue(businessDescription, systemDescription, condition); clearAssertingWebElements(); return result; } @Override public <T> boolean assertThat(String businessDescription, String systemDescription, T actual, Matcher<? super T> matcher) { boolean result = descriptiveSoftAssert.assertThat(businessDescription, systemDescription, actual, matcher); clearAssertingWebElements(); return result; } @Override public boolean assertNotNull(String businessDescription, String systemDescription, Object object) { boolean result = descriptiveSoftAssert.assertNotNull(businessDescription, systemDescription, object); clearAssertingWebElements(); return result; } @Override public boolean assertTrue(String description, boolean condition) { boolean result = descriptiveSoftAssert.assertTrue(description, condition); clearAssertingWebElements(); return result; } @Override public boolean assertFalse(String description, boolean condition) { boolean result = descriptiveSoftAssert.assertFalse(description, condition); clearAssertingWebElements(); return result; } @Override public boolean assertEquals(String description, Object expected, Object actual) { boolean result = descriptiveSoftAssert.assertEquals(description, expected, actual); clearAssertingWebElements(); return result; } @Override public boolean assertNotEquals(String description, Object expected, Object actual) { boolean result = descriptiveSoftAssert.assertNotEquals(description, expected, actual); clearAssertingWebElements(); return result; } @Override public boolean assertEquals(String description, double expected, double actual, double delta) { boolean result = descriptiveSoftAssert.assertEquals(description, expected, actual, delta); clearAssertingWebElements(); return result; } @Override public boolean assertNotEquals(String description, double expected, double actual, double delta) { boolean result = descriptiveSoftAssert.assertNotEquals(description, expected, actual, delta); clearAssertingWebElements(); return result; } @Override public boolean assertEquals(String description, long expected, long actual) { boolean result = descriptiveSoftAssert.assertEquals(description, expected, actual); clearAssertingWebElements(); return result; } @Override public boolean assertNotEquals(String description, long expected, long actual) { boolean result = descriptiveSoftAssert.assertNotEquals(description, expected, actual); clearAssertingWebElements(); return result; } @Override public boolean assertEquals(String description, boolean expected, boolean actual) { boolean result = descriptiveSoftAssert.assertEquals(description, expected, actual); clearAssertingWebElements(); return result; } @Override public boolean assertNotEquals(String description, boolean expected, boolean actual) { boolean result = descriptiveSoftAssert.assertNotEquals(description, expected, actual); clearAssertingWebElements(); return result; } @Override public boolean assertNotNull(String description, Object object) { boolean result = descriptiveSoftAssert.assertNotNull(description, object); clearAssertingWebElements(); return result; } @Override public boolean assertNull(String description, Object object) { boolean result = descriptiveSoftAssert.assertNull(description, object); clearAssertingWebElements(); return result; } @Override public <T> boolean assertThat(String description, T actual, Matcher<? super T> matcher) { boolean result = descriptiveSoftAssert.assertThat(description, actual, matcher); clearAssertingWebElements(); return result; } @Override public boolean recordPassedAssertion(String description) { boolean result = descriptiveSoftAssert.recordPassedAssertion(description); clearAssertingWebElements(); return result; } @Override public boolean recordFailedAssertion(String description) { boolean result = descriptiveSoftAssert.recordFailedAssertion(description); clearAssertingWebElements(); return result; } @Override public boolean recordFailedAssertion(Throwable exception) { boolean result = descriptiveSoftAssert.recordFailedAssertion(exception); clearAssertingWebElements(); return result; } @Override public boolean recordFailedAssertion(String description, Throwable exception) { boolean result = descriptiveSoftAssert.recordFailedAssertion(description, exception); clearAssertingWebElements(); return result; } @Override public void verify() throws VerificationError { descriptiveSoftAssert.verify(); } private void clearAssertingWebElements() { webUiContext.clearAssertingWebElements(); } }
[ "valfirst@yandex.ru" ]
valfirst@yandex.ru
192d9214355e8dc5c0e3a185745c80f88a346e26
e2e59d9bc98d970e5dc3da6dcf2a7df8adb95b60
/old_src/src/Buffs/Silent.java
c1708e2cffeb3b6551efe52c0da55881af77c55e
[]
no_license
hptruong93/ThePuck-game
aded3c0fd09ce81f68ad6374b84a622f7ba74109
2874d2a90b6a41c95422eb0161993467aedd963c
refs/heads/master
2016-09-06T19:14:30.943370
2014-05-17T03:49:03
2014-05-17T03:49:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
633
java
package Buffs; import Main.Units.Living.LivingUnit; import Main.MainScreen; import Features.Clocks; import java.util.Iterator; public class Silent extends Curse { public Silent(int duration, long startTime) { super(duration, Curse.INFINITE_STACK, startTime); } @Override protected void putEffectOn(LivingUnit affectedUnit) { affectedUnit.setSkillEnable(false); } @Override protected void removeEffectFrom(LivingUnit affectedUnit) { affectedUnit.setSkillEnable(true); } @Override public Silent clone() { return new Silent(duration, Clocks.masterClock.currentTime()); } }
[ "hptruong93@gmail.com" ]
hptruong93@gmail.com
82fbff9df1152e680c744bd333a3ad6207564c0a
f97cf61c36e03e6f0dc8aad512bebbb4af14d97b
/app/src/main/java/com/aliyun/ayland/ui/activity/ATUserCenterActivity.java
81c1470515085595772edc4ab5d4d4b47c9af62f
[]
no_license
584393321/aite_zhuoyue
be735aff9e3a1481c33752597fb34ba14dfe55be
7fc0b302f58aebfed158aea8aa2dadaa405b5ea0
refs/heads/main
2023-04-04T01:57:43.834761
2021-04-14T02:56:50
2021-04-14T02:56:50
357,750,366
0
1
null
null
null
null
UTF-8
Java
false
false
1,856
java
package com.aliyun.ayland.ui.activity; import android.content.Intent; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.aliyun.ayland.base.ATBaseActivity; import com.aliyun.ayland.global.ATGlobalApplication; import com.anthouse.wyzhuoyue.R; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.request.RequestOptions; public class ATUserCenterActivity extends ATBaseActivity { private RelativeLayout rlProfile, rlNick; private ImageView imgUserprofile; private TextView tvPhone, tvNick; private RequestOptions options = new RequestOptions() .placeholder(R.drawable.ico_touxiang_mr) .diskCacheStrategy(DiskCacheStrategy.ALL); @Override protected int getLayoutId() { return R.layout.at_activity_user_center; } @Override protected void findView() { rlProfile = findViewById(R.id.rl_profile); rlNick = findViewById(R.id.rl_nick); tvPhone = findViewById(R.id.tv_phone); tvNick = findViewById(R.id.tv_nick); imgUserprofile = findViewById(R.id.img_userprofile); init(); } @Override protected void initPresenter() { } private void init() { rlProfile.setOnClickListener(view -> startActivity(new Intent(this, ATUserProfileActivity.class))); rlNick.setOnClickListener(view -> startActivity(new Intent(this, ATUserNickActivity.class))); } @Override protected void onResume() { super.onResume(); // Glide.with(this).load(ATGlobalApplication.getATLoginBean().getAvatarUrl()).apply(options).into(imgUserprofile); tvNick.setText(ATGlobalApplication.getATLoginBean().getNickName()); tvPhone.setText(ATGlobalApplication.getAccount()); } }
[ "584393321@qq.com" ]
584393321@qq.com
4fc77d6de5f5eb8e4016e9e5346daa20933a0c6c
a9469adda77c7833452629e2b6560d4d52e6d59e
/springFrameworkDebug/src/cn/java/beannote/cglib/生成子类/FooServiceImpl.java
c57ea2834af6c0393c4c7f96eb675e921daf4e3b
[]
no_license
brunoalbrito/javacodedemo
882cee2afe742e51354ca6fd60fc3546d481244c
840e84c252967e63022197116d170b3090927591
refs/heads/master
2020-04-22T17:50:36.975840
2017-06-30T11:11:47
2017-06-30T11:11:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
192
java
package cn.java.beannote.cglib.生成子类; import java.io.Serializable; public class FooServiceImpl implements FooService,Serializable{ @Override public void method1() { } }
[ "297963025@qq.com" ]
297963025@qq.com
e404f554dad596e5efa34ccd951b0bafec0086aa
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/response/ZolozIdentificationCustomerCertifyzhubInitializeResponse.java
5dbdf364638e4919901bd5a01a2c28f372d15d9d
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: zoloz.identification.customer.certifyzhub.initialize response. * * @author auto create * @since 1.0, 2019-09-17 17:26:52 */ public class ZolozIdentificationCustomerCertifyzhubInitializeResponse extends AlipayResponse { private static final long serialVersionUID = 6897823558769546676L; /** * 业务单据号,用于核对和排查 */ @ApiField("biz_id") private String bizId; /** * 人脸服务端返回码 */ @ApiField("zim_code") private String zimCode; /** * 唯一标识一次人脸服务的id */ @ApiField("zim_id") private String zimId; /** * 人脸服务端返回信息 */ @ApiField("zim_msg") private String zimMsg; public void setBizId(String bizId) { this.bizId = bizId; } public String getBizId( ) { return this.bizId; } public void setZimCode(String zimCode) { this.zimCode = zimCode; } public String getZimCode( ) { return this.zimCode; } public void setZimId(String zimId) { this.zimId = zimId; } public String getZimId( ) { return this.zimId; } public void setZimMsg(String zimMsg) { this.zimMsg = zimMsg; } public String getZimMsg( ) { return this.zimMsg; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
12d0173e673c7482e4801a70bbafa3aea1964526
f4d6acece8d9a6136b2c19c8aa1788eb5abb6710
/guns-order/src/main/java/com/stylefeng/guns/rest/modular/order/serivce/OrderServiceImpl2018.java
4419a272740674cf0edd1313c860f668ea14d4dc
[ "Apache-2.0" ]
permissive
Jrg199287/dubbo-maoyan
49ba6dcbbe02d32fa22109e82d871237b6e7852e
026e648c00d920a4e32cbb2cc9befb18d67e1f2c
refs/heads/master
2020-05-21T18:49:38.745462
2019-05-12T03:38:31
2019-05-12T03:38:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,248
java
package com.stylefeng.guns.rest.modular.order.serivce; import com.alibaba.dubbo.config.annotation.Reference; import com.alibaba.dubbo.config.annotation.Service; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; import com.stylefeng.guns.api.user.cinema.vo.FilmInfoVO; import com.stylefeng.guns.api.user.cinema.vo.OrderQueryVO; import com.stylefeng.guns.api.user.order.vo.OrderServiceAPI; import com.stylefeng.guns.api.user.order.vo.OrderVO; import com.stylefeng.guns.core.util.UUIDUtil; import com.stylefeng.guns.rest.common.persistence.dao.MoocOrder2018TMapper; import com.stylefeng.guns.rest.common.persistence.model.MoocOrder2018T; import com.stylefeng.guns.rest.common.util.FTPUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; import java.util.List; @Slf4j @Component @Service(interfaceClass = OrderServiceAPI.class,group = "order2018") public class OrderServiceImpl2018 implements OrderServiceAPI { @Autowired private MoocOrder2018TMapper moocOrder2018TMapper; @Reference(interfaceClass = com.stylefeng.guns.api.user.cinema.cinemaServiceAPI.class,check = false) private com.stylefeng.guns.api.user.cinema.cinemaServiceAPI cinemaServiceAPI; @Autowired private FTPUtil ftpUtil; // 验证是否为真实的座位编号 @Override public boolean isTrueSeats(String fieldId, String seats) { // 根据FieldId找到对应的座位位置图 String seatPath = moocOrder2018TMapper.getSeatsByFieldId(fieldId); // 读取位置图,判断seats是否为真 String fileStrByAddress = ftpUtil.getFileStrByAddress(seatPath); // 将fileStrByAddress转换为JSON对象 JSONObject jsonObject = JSONObject.parseObject(fileStrByAddress); // seats=1,2,3 ids="1,3,4,5,6,7,88" String ids = jsonObject.get("ids").toString(); // 每一次匹配上的,都给isTrue+1 String[] seatArrs = seats.split(","); String[] idArrs = ids.split(","); int isTrue = 0; for(String id : idArrs){ for(String seat : seatArrs){ if(seat.equalsIgnoreCase(id)){ isTrue++; } } } // 如果匹配上的数量与已售座位数一致,则表示全都匹配上了 if(seatArrs.length == isTrue){ return true; }else{ return false; } } // 判断是否为已售座位 @Override public boolean isNotSoldSeats(String fieldId, String seats) { EntityWrapper entityWrapper = new EntityWrapper(); entityWrapper.eq("field_id",fieldId); List<MoocOrder2018T> list = moocOrder2018TMapper.selectList(entityWrapper); String[] seatArrs = seats.split(","); // 有任何一个编号匹配上,则直接返回失败 for(MoocOrder2018T moocOrderT : list){ String[] ids = moocOrderT.getSeatsIds().split(","); for(String id : ids){ for(String seat : seatArrs){ if(id.equalsIgnoreCase(seat)){ return false; } } } } return true; } // 创建新的订单 @Override public OrderVO saveOrderInfo( Integer fieldId, String soldSeats, String seatsName, Integer userId) { // 编号 String uuid = UUIDUtil.genUuid(); // 影片信息 FilmInfoVO filmInfoVO = cinemaServiceAPI.getFilmInfoByFieldId(fieldId); Integer filmId = Integer.parseInt(filmInfoVO.getFilmId()); // 获取影院信息 OrderQueryVO orderQueryVO = cinemaServiceAPI.getOrderNeeds(fieldId); Integer cinemaId = Integer.parseInt(orderQueryVO.getCinemaId()); double filmPrice = Double.parseDouble(orderQueryVO.getFilmPrice()); // 求订单总金额 // 1,2,3,4,5 int solds = soldSeats.split(",").length; double totalPrice = getTotalPrice(solds,filmPrice); MoocOrder2018T moocOrderT = new MoocOrder2018T(); moocOrderT.setUuid(uuid); moocOrderT.setSeatsName(seatsName); moocOrderT.setSeatsIds(soldSeats); moocOrderT.setOrderUser(userId); moocOrderT.setOrderPrice(totalPrice); moocOrderT.setFilmPrice(filmPrice); moocOrderT.setFilmId(filmId); moocOrderT.setFieldId(fieldId); moocOrderT.setCinemaId(cinemaId); Integer insert = moocOrder2018TMapper.insert(moocOrderT); if(insert>0){ // 返回查询结果 OrderVO orderVO = moocOrder2018TMapper.getOrderInfoById(uuid); if(orderVO == null || orderVO.getOrderId() == null){ log.error("订单信息查询失败,订单编号为{}",uuid); return null; }else { return orderVO; } }else{ // 插入出错 log.error("订单插入失败"); return null; } } private static double getTotalPrice(int solds,double filmPrice){ BigDecimal soldsDeci = new BigDecimal(solds); BigDecimal filmPriceDeci = new BigDecimal(filmPrice); BigDecimal result = soldsDeci.multiply(filmPriceDeci); // 四舍五入,取小数点后两位 BigDecimal bigDecimal = result.setScale(2, RoundingMode.HALF_UP); return bigDecimal.doubleValue(); } @Override public Page<OrderVO> getOrderByUserId(Integer userId,Page<OrderVO> page) { Page<OrderVO> result = new Page<>(); if(userId == null){ log.error("订单查询业务失败,用户编号未传入"); return null; }else{ List<OrderVO> ordersByUserId = moocOrder2018TMapper.getOrdersByUserId(userId,page); if(ordersByUserId==null && ordersByUserId.size()==0){ result.setTotal(0); result.setRecords(new ArrayList<>()); return result; }else{ // 获取订单总数 EntityWrapper<MoocOrder2018T> entityWrapper = new EntityWrapper<>(); entityWrapper.eq("order_user",userId); Integer counts = moocOrder2018TMapper.selectCount(entityWrapper); // 将结果放入Page result.setTotal(counts); result.setRecords(ordersByUserId); return result; } } } // 根据放映查询,获取所有的已售座位 /* 1 1,2,3,4 1 5,6,7 */ @Override public String getSoldSeatsByFieldId(Integer fieldId) { if(fieldId == null){ log.error("查询已售座位错误,未传入任何场次编号"); return ""; }else{ String soldSeatsByFieldId = moocOrder2018TMapper.getSoldSeatsByFieldId(fieldId); return soldSeatsByFieldId; } } @Override public OrderVO getOrderInfoById(String orderId) { OrderVO orderInfoById = moocOrder2018TMapper.getOrderInfoById(orderId); return orderInfoById; } @Override public boolean paySuccess(String orderId) { // String userId = RpcContext.getContext().getAttachment("userId"); // System.out.println("userId="+userId); MoocOrder2018T moocOrderT = new MoocOrder2018T(); moocOrderT.setUuid(orderId); moocOrderT.setOrderStatus(1); Integer integer = moocOrder2018TMapper.updateById(moocOrderT); if(integer>=1){ return true; }else{ return false; } } @Override public boolean payFail(String orderId) { MoocOrder2018T moocOrderT = new MoocOrder2018T(); moocOrderT.setUuid(orderId); moocOrderT.setOrderStatus(2); Integer integer = moocOrder2018TMapper.updateById(moocOrderT); if(integer>=1){ return true; }else{ return false; } } }
[ "j15264259878@163.com" ]
j15264259878@163.com
70efdc33652ab0fae345b51fadfe398276ce6b6c
0190d8a7027d361b1aac85207ee1608583610fbd
/src/main/java/io/github/yezhihao/netmc/core/handler/SimpleHandler.java
7b0c10692801266d4d2e1d56899d6ced501ebde1
[ "Apache-2.0" ]
permissive
jackyzcq/netmc
09affd625b286adeb6504fde5a7ea27934233916
ff6291cdc66eab5cef850e06cd582a0c9ebfdeb5
refs/heads/master
2023-07-12T11:06:00.148020
2021-08-06T09:57:43
2021-08-06T09:57:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package io.github.yezhihao.netmc.core.handler; import io.github.yezhihao.netmc.core.model.Message; import io.github.yezhihao.netmc.session.Session; import java.lang.reflect.Method; /** * 同步处理 * @author yezhihao * home https://gitee.com/yezhihao/jt808-server */ public class SimpleHandler extends Handler { public SimpleHandler(Object actionClass, Method actionMethod, String desc) { super(actionClass, actionMethod, desc); } public Message invoke(Message request, Session session) throws Exception { return super.invoke(request, session); } }
[ "zhihao.ye@qq.com" ]
zhihao.ye@qq.com
fb2a78de3451b4364deb3a52076c09ce752aded2
c9ae5bbaf082abe43738a7f17ffab43309327977
/Source/FA-GameServer/src/gameserver/model/account/CharacterPasskey.java
f249ceee9663e3bc45a19b9ee98af4e2f60ef2e1
[]
no_license
Ace65/emu-santiago
2071f50e83e3e4075b247e4265c15d032fc13789
ddb2a59abd9881ec95c58149c8bf27f313e3051c
refs/heads/master
2021-01-13T00:43:18.239492
2012-02-22T21:14:53
2012-02-22T21:14:53
54,834,822
0
1
null
null
null
null
UTF-8
Java
false
false
1,210
java
package gameserver.model.account; /** * @author ginho1 */ public class CharacterPasskey { private int objectId; private int wrongCount = 0; private boolean isPass = false; private ConnectType connectType; /** * @return the objectId */ public int getObjectId() { return objectId; } /** * @param objectId the objectId to set */ public void setObjectId(int objectId) { this.objectId = objectId; } /** * @return the wrongCount */ public int getWrongCount() { return wrongCount; } /** * @param count the wrongCount to set */ public void setWrongCount(int count) { this.wrongCount = count; } /** * @return the isPass */ public boolean isPass() { return isPass; } /** * @param isPass the isPass to set */ public void setIsPass(boolean isPass) { this.isPass = isPass; } /** * @return the connectType */ public ConnectType getConnectType() { return connectType; } /** * @param connectType the connectType to set */ public void setConnectType(ConnectType connectType) { this.connectType = connectType; } public enum ConnectType { ENTER, DELETE } }
[ "mixerdj.carlos@gmail.com" ]
mixerdj.carlos@gmail.com
a7f55f4bb6d5dd4a3b28609f975e2a6700a7ddfe
c583e42f22064bc5f3814b3d3c5f8bc62ee47a75
/src/main/java/com/woime/iboss/workcal/web/WorkcalRuleController.java
686c491379411f4bb8952b41f573b474cbe66385
[]
no_license
vipsql/iboss
c42ab22f553b71cb56431f1e507e25434b238ede
9329b9a9f29d1289ffc047b44baa184f6e3636ab
refs/heads/master
2020-03-07T17:21:39.373944
2017-04-03T04:19:57
2017-04-03T04:19:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,519
java
package com.woime.iboss.workcal.web; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.woime.iboss.api.tenant.TenantHolder; import com.woime.iboss.core.export.Exportor; import com.woime.iboss.core.export.TableModel; import com.woime.iboss.core.mapper.BeanMapper; import com.woime.iboss.core.page.Page; import com.woime.iboss.core.query.PropertyFilter; import com.woime.iboss.core.spring.MessageHelper; import com.woime.iboss.workcal.persistence.domain.WorkcalRule; import com.woime.iboss.workcal.persistence.manager.WorkcalRuleManager; import com.woime.iboss.workcal.persistence.manager.WorkcalTypeManager; @Controller @RequestMapping("workcal") public class WorkcalRuleController { private WorkcalRuleManager workcalRuleManager; private WorkcalTypeManager workcalTypeManager; private Exportor exportor; private BeanMapper beanMapper = new BeanMapper(); private MessageHelper messageHelper; private TenantHolder tenantHolder; @RequestMapping("workcal-rule-list") public String list(@ModelAttribute Page page, @RequestParam Map<String, Object> parameterMap, Model model) { String tenantId = tenantHolder.getTenantId(); List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap); propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId)); page = workcalRuleManager.pagedQuery(page, propertyFilters); model.addAttribute("page", page); return "workcal/workcal-rule-list"; } @RequestMapping("workcal-rule-input") public String input(@RequestParam(value = "id", required = false) Long id, Model model) { String tenantId = tenantHolder.getTenantId(); if (id != null) { WorkcalRule workcalRule = workcalRuleManager.get(id); model.addAttribute("model", workcalRule); } model.addAttribute("workcalTypes", workcalTypeManager.findBy("tenantId", tenantId)); return "workcal/workcal-rule-input"; } @RequestMapping("workcal-rule-save") public String save(@ModelAttribute WorkcalRule workcalRule, @RequestParam("workcalTypeId") Long workcalTypeId, RedirectAttributes redirectAttributes) { String tenantId = tenantHolder.getTenantId(); Long id = workcalRule.getId(); WorkcalRule dest = null; if (id != null) { dest = workcalRuleManager.get(id); beanMapper.copy(workcalRule, dest); } else { dest = workcalRule; dest.setTenantId(tenantId); } dest.setWorkcalType(workcalTypeManager.get(workcalTypeId)); workcalRuleManager.save(dest); messageHelper.addFlashMessage(redirectAttributes, "core.success.save", "保存成功"); return "redirect:/workcal/workcal-rule-list.do"; } @RequestMapping("workcal-rule-remove") public String remove(@RequestParam("selectedItem") List<Long> selectedItem, RedirectAttributes redirectAttributes) { List<WorkcalRule> workcalRules = workcalRuleManager.findByIds(selectedItem); workcalRuleManager.removeAll(workcalRules); messageHelper.addFlashMessage(redirectAttributes, "core.success.delete", "删除成功"); return "redirect:/workcal/workcal-rule-list.do"; } @RequestMapping("workcal-rule-export") public void export(@ModelAttribute Page page, @RequestParam Map<String, Object> parameterMap, HttpServletRequest request, HttpServletResponse response) throws Exception { String tenantId = tenantHolder.getTenantId(); List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap); propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId)); page = workcalRuleManager.pagedQuery(page, propertyFilters); List<WorkcalRule> workcalRules = (List<WorkcalRule>) page.getResult(); TableModel tableModel = new TableModel(); tableModel.setName("workcalRule"); tableModel.addHeaders("id", "name"); tableModel.setData(workcalRules); exportor.export(request, response, tableModel); } @RequestMapping("workcal-rule-checkName") @ResponseBody public boolean checkName(@RequestParam("name") String name, @RequestParam(value = "id", required = false) Long id) throws Exception { String hql = "from WorkcalRule where name=?"; Object[] params = { name }; if (id != null) { hql = "from WorkcalRule where name=? and id<>?"; params = new Object[] { name, id }; } WorkcalRule workcalRule = workcalRuleManager.findUnique(hql, params); boolean result = (workcalRule == null); return result; } // ~ ====================================================================== @Resource public void setWorkcalRuleManager(WorkcalRuleManager workcalRuleManager) { this.workcalRuleManager = workcalRuleManager; } @Resource public void setWorkcalTypeManager(WorkcalTypeManager workcalTypeManager) { this.workcalTypeManager = workcalTypeManager; } @Resource public void setExportor(Exportor exportor) { this.exportor = exportor; } @Resource public void setMessageHelper(MessageHelper messageHelper) { this.messageHelper = messageHelper; } @Resource public void setTenantHolder(TenantHolder tenantHolder) { this.tenantHolder = tenantHolder; } }
[ "Administrator@192.168.148.1" ]
Administrator@192.168.148.1
ce1849d4893e575327f8d44a42e27726526ab66e
aee5df69cd38887110c09d3d2bd723cb6e8987d6
/1.JavaSyntax/src/com/javarush/task/task05/task0528/Solution.java
87dde3a0876a681d6cb158db9d73b986543dc089
[]
no_license
siarheikorbut/JavaRush
5e98158ad71594b2ad1b41342b51df39517341fc
095690627248ed8cb4d2b1a3314c06333aef2235
refs/heads/master
2023-08-24T05:34:03.674176
2021-10-16T17:57:19
2021-10-16T17:57:19
306,656,990
0
0
null
null
null
null
UTF-8
Java
false
false
1,022
java
package com.javarush.task.task05.task0528; /* Вывести на экран сегодняшнюю дату */ public class Solution { public static void main(String[] args) { System.out.println("19 07 2020");//напишите тут ваш код } }
[ "siarheikorbut@gmail.com" ]
siarheikorbut@gmail.com
cc9a20eed9a96731ef681e10612e3db51979a33f
9122cf28169b2d053a26e5d5cefacda018fb95b9
/dataStructure/src/main/java/com/wellsfargo/data_structure/tree/ConstructTreeFromAncestorMatrix.java
bf4b74fda9abb8470818470d60aaa0b8f7793ee6
[]
no_license
siddhantaws/DataStructure-Algorithm
661f8ab75bcb2d5c68616b1e71a25e459b6a797a
cbd5398f24e075320eedcb7a83807954509e9467
refs/heads/master
2023-04-08T03:32:31.791195
2023-03-19T13:26:42
2023-03-19T13:26:42
88,467,251
1
1
null
2022-05-16T17:39:19
2017-04-17T04:13:41
Java
UTF-8
Java
false
false
3,030
java
package com.wellsfargo.data_structure.tree; import java.util.ArrayList; import java.util.TreeMap; public class ConstructTreeFromAncestorMatrix { private int [][]matrix; private int N ; private Node root; public ConstructTreeFromAncestorMatrix(int[][] matrix) { this.matrix = matrix; this.N =matrix.length; } static class Node { int data ; Node left, right; public Node(int data) { this.data = data; } } private Node newNode(int data) { Node node = new Node(data); return (node); } Node constructTreeFromAncestorMatrix() { // parent[i] = true means parent of i is set boolean[] parent = new boolean[N]; Node root = null; // TreeMap is used to keep the array sorted according to key TreeMap<Integer, ArrayList<Integer>> map = new TreeMap<Integer,ArrayList<Integer>>(); // get sum of all rows and put sum and corresponding list of row-numbers in the TreeMap for(int i=0;i<N;i++) { int sum = 0; for(int j=0;j<N;j++) sum += matrix[i][j]; if(map.get(sum) == null) { ArrayList<Integer> arr = new ArrayList<Integer>(); arr.add(i); map.put(sum,arr); } else map.get(sum).add(i); } // nodes[i] stores ith node Node[] nodes = new Node[N]; // iterate over TreeMap for(Integer key : map.keySet()) { ArrayList<Integer> arr = map.get(key); for(Integer row : arr) { nodes[row] = new Node(row); root = nodes[row]; // non-leaf node if(key != 0) {// traverse row "row" for(int i=0;i<N;i++) {// If parent doesn't exist and ancestor exists if(!parent[i] && matrix[row][i]==1) { if(nodes[row].left == null) nodes[row].left = nodes[i]; else nodes[row].right = nodes[i]; parent[i] = true; } } } } } printInorder(root); return root; } /* Given a binary tree, print its nodes in inorder */ void printInorder(Node node) { if (node == null) return; printInorder(node.left); System.out.println(node.data); printInorder(node.right); } public static void main(String[] args) { int mat[][] = {{ 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 1, 0 }, { 0, 0, 0, 1, 0, 0 }, { 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0 }, { 1, 1, 1, 1, 1, 0 } }; ConstructTreeFromAncestorMatrix treeFrom =new ConstructTreeFromAncestorMatrix(mat); treeFrom.constructTreeFromAncestorMatrix(); } }
[ "siddhantaws@gmail.com" ]
siddhantaws@gmail.com
55f77a19555cbeb586b26e12723a069e48605dea
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_b381f40708ed394a88d792ac85c3fe86d5159e6b/SourceFileParser/3_b381f40708ed394a88d792ac85c3fe86d5159e6b_SourceFileParser_t.java
a13a53d01d35dc01ce9bd364e47d13e123d24bb8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,112
java
package org.ita.testrefactoring.astparser; import org.eclipse.jdt.core.dom.ASTVisitor; import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration; import org.eclipse.jdt.core.dom.EnumDeclaration; import org.eclipse.jdt.core.dom.TypeDeclaration; import org.ita.testrefactoring.metacode.Type; class SourceFileParser { /** * Localiza as declarações de import e as salva. * @author Rafael Monico * */ private static class ImportVisitor extends ASTVisitor { private ASTSourceFile sourceFile; public void setSourceFile(ASTSourceFile sourceFile) { this.sourceFile = sourceFile; } @Override public boolean visit(org.eclipse.jdt.core.dom.ImportDeclaration node) { ASTImportDeclaration _import = sourceFile.createImportDeclaration(); ASTEnvironment environment = sourceFile.getPackage().getEnvironment(); Type type = environment.getTypeCache().get(node.getName()); _import.setType(type); // Nunca visita os nós filhos, isso será feito posteriormente return false; } } /** * Localiza as declarações de tipo e as lança na lista. * * @author Rafael Monico * */ public class TypeVisitor extends ASTVisitor { private ASTSourceFile sourceFile; public void setSourceFile(ASTSourceFile sourceFile) { this.sourceFile = sourceFile; } @Override public boolean visit(TypeDeclaration node) { // Nesse caso, só pode ser classe if (!node.isInterface()) { classFound(node); } else { // É interface interfaceFound(node); } return false; } private void classFound(TypeDeclaration node) { ASTClass clazz = sourceFile.createClass(node.getName().getIdentifier()); clazz.setASTObject(node); } private void interfaceFound(TypeDeclaration node) { sourceFile.createInterface(node.getName().getIdentifier()); } @Override public boolean visit(AnnotationTypeDeclaration node) { annotationFound(node); return false; } private void annotationFound(AnnotationTypeDeclaration node) { // TODO Auto-generated method stub } @Override public boolean visit(EnumDeclaration node) { enumFound(node); return false; } private void enumFound(EnumDeclaration node) { // TODO Auto-generated method stub } } private ASTSourceFile sourceFile; public void setSourceFile(ASTSourceFile sourceFile) { this.sourceFile = sourceFile; } /** * Faz o parsing do source file, baseado na compilation unit passada como parâmetro anteriormente. */ public void parse() { populateImportList(); populateTypeList(); } private void populateImportList() { ImportVisitor visitor = new ImportVisitor(); visitor.setSourceFile(sourceFile); sourceFile.getASTObject().getCompilationUnit().accept(visitor); } private void populateTypeList() { TypeVisitor visitor = new TypeVisitor(); visitor.setSourceFile(sourceFile); sourceFile.getASTObject().getCompilationUnit().accept(visitor); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d39c50081b52462759b62bdcb62e07dac4f4298c
91948dc2fba5f13358c0f9ae67aa986b5e12e811
/src/main/java/org/file/client/config/WebMVCConfig.java
5ebb1095f96106b2e95d1bcca0f7302cc5763893
[]
no_license
lifeifeixz/FileClient
42d1ddb72ea07d6c65cb98846d3e106e00cae5a3
8f94853a92d1be425c4760b6cf9eb0d0aa7870b9
refs/heads/master
2021-01-23T21:12:48.049432
2017-12-20T05:59:04
2017-12-20T05:59:04
102,884,976
1
0
null
null
null
null
UTF-8
Java
false
false
719
java
package org.file.client.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * Created by flysLi on 2017/8/29. */ @Configuration public class WebMVCConfig extends WebMvcConfigurerAdapter { public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("swagger-ui.html") .addResourceLocations("classpath:/META-INF/resources/"); registry.addResourceHandler("/webjars/**") .addResourceLocations("classpath:/META-INF/resources/webjars/"); } }
[ "lifeifeixz@sina.cn" ]
lifeifeixz@sina.cn
751aceaf688e95c4c9a3007323f01fc03a1b6d5b
a30fdb04452c6ec0d041c506f6d80505ce5717e4
/src/com/hjedu/platform/dao/IDictProvinceDAO.java
7c06b0f6c53c696aba872c1c0c3ef89eec77c110
[]
no_license
azhangge/hj-old
9b2a4361c8aaf59dbedfffb1e77a9fab93f4f80a
448a10cd4303a8009260ad961bfe405da1516c8c
refs/heads/master
2021-04-18T21:41:42.338249
2018-03-26T03:51:37
2018-03-26T03:51:37
126,580,166
0
1
null
null
null
null
UTF-8
Java
false
false
830
java
package com.hjedu.platform.dao; import java.util.List; import com.hjedu.platform.entity.DictProvince; public interface IDictProvinceDAO { public void save(DictProvince entity); public void delete(DictProvince entity); public DictProvince update(DictProvince entity); public DictProvince findById( Integer id); public List<DictProvince> findByProperty(String propertyName, Object value , int...rowStartIdxAndCount ); public List<DictProvince> findBySProvname(Object SProvname , int...rowStartIdxAndCount ); public List<DictProvince> findBySType(Object SType , int...rowStartIdxAndCount ); public List<DictProvince> findBySState(Object SState , int...rowStartIdxAndCount ); public List<DictProvince> findAll( int...rowStartIdxAndCount ); }
[ "1007009258@qq.com" ]
1007009258@qq.com
c9222be82010c954751d12753d1b543ecb406f30
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_286456faecb592b5bb1a52776cfe544e4c0e3e63/ClassNotFoundTestIntegrationTest/18_286456faecb592b5bb1a52776cfe544e4c0e3e63_ClassNotFoundTestIntegrationTest_t.java
6d096af6a7101a513b960bbb1a198bbf4f81f300
[]
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
940
java
package com.jointhegrid.ironcount; import java.util.HashMap; import java.util.Properties; import org.junit.Assert; import org.junit.Test; public class ClassNotFoundTestIntegrationTest extends IronIntegrationTest { @Test public void disableWorkload(){ Workload w = new Workload(); w.active = true; w.consumerGroup = "group1"; w.maxWorkers = 4; w.messageHandlerName = "bad.class.name"; w.name = "testworkload"; w.properties = new HashMap<String, String>(); w.topic = topic; w.zkConnect = "localhost:8888"; Properties p = new Properties(); p.put(WorkloadManager.ZK_SERVER_LIST, "localhost:8888"); WorkloadManager m = new WorkloadManager(p); m.init(); m.startWorkload(w); try { Thread.sleep(2000); } catch (InterruptedException ex) { } Assert.assertEquals(0, m.getWorkerThreads().size() ); m.shutdown(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5556fb1aa69e441451a2b9c12940036aa0737351
27e8209e5d2f1447e2bccaddbddeb3d7c870a6c6
/tasfe-uid/tasfe-uid-client/src/main/java/com/tasfe/framework/uid/zk/ZkClient.java
77d1dded8ec07b5e68d7072d2536578e1c9f71a1
[]
no_license
geeker-lait/x-framework
33c887d9b0951db1b7a5a49d9c2648a49a4eb8fe
6b16c538fecff4ebca5d8390fabd7b2641f30f7f
refs/heads/master
2021-09-07T15:43:33.101164
2018-02-25T09:59:57
2018-02-25T09:59:57
100,259,799
2
1
null
null
null
null
UTF-8
Java
false
false
1,398
java
package com.tasfe.framework.uid.zk; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZooKeeper; import java.io.IOException; import java.util.List; /** * Created by lait.zhang on 2017/8/3. */ public class ZkClient extends AbstractZkClient{ /** * 构造方法 * @param address * @throws IOException * @throws KeeperException * @throws InterruptedException */ public ZkClient(String address) throws IOException, KeeperException, InterruptedException { this.address = address; zooKeeper = new ZooKeeper(address, SESSIONTIMEOUT, null); } /** * 负载均衡算法:zk中连接数最少的节点ip * @return * @throws KeeperException * @throws InterruptedException */ public String balance() throws KeeperException, InterruptedException { List<String> nodes = zooKeeper.getChildren(ZK_ROOT_NODE, null); //若只有一台注册了服务,则直接返回这唯一的一台服务 if (nodes.size() == 1) { return nodes.get(0); } String result = null; int min = 0; for (int i = 0; i < nodes.size(); i++) { int count = getCount(nodes.get(i)); if (i == 0 || count < min) { min = count; result = nodes.get(i); } } return result; } }
[ "lait.zhang@gmail.com" ]
lait.zhang@gmail.com
f4d600e40d76eb1d908434ef27f3097ed20b0d34
c61da4bae6a9ec7a5a1bc3079d27b0ce92122aff
/onebusaway-uk-naptan-xml-2_1/src/main/java/uk/org/naptan/AnnotatedClosedDateRangeCollectionStructure.java
d40ad75fdbaa616b5e557c7c30db1970728e94a8
[ "Apache-2.0" ]
permissive
OneBusAway/onebusaway-uk
2b9650dfe381d6f226481874df0060e40a1b033c
87169b880974039d0c7e037032c72187d167acc2
refs/heads/master
2021-01-22T19:31:37.903350
2015-05-04T06:24:59
2015-05-04T06:24:59
4,605,969
2
5
NOASSERTION
2020-02-11T15:14:30
2012-06-09T08:49:18
Java
UTF-8
Java
false
false
2,505
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // 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: 2012.06.09 at 02:09:56 PM CEST // package uk.org.naptan; 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.XmlElement; import javax.xml.bind.annotation.XmlType; /** * A collection of one or more closed date ranges. * * <p>Java class for AnnotatedClosedDateRangeCollectionStructure complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="AnnotatedClosedDateRangeCollectionStructure"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="DateRange" type="{http://www.naptan.org.uk/}AnnotatedClosedDateRangeStructure" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AnnotatedClosedDateRangeCollectionStructure", propOrder = { "dateRange" }) public class AnnotatedClosedDateRangeCollectionStructure { @XmlElement(name = "DateRange", required = true) protected List<AnnotatedClosedDateRangeStructure> dateRange; /** * Gets the value of the dateRange 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 dateRange property. * * <p> * For example, to add a new item, do as follows: * <pre> * getDateRange().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AnnotatedClosedDateRangeStructure } * * */ public List<AnnotatedClosedDateRangeStructure> getDateRange() { if (dateRange == null) { dateRange = new ArrayList<AnnotatedClosedDateRangeStructure>(); } return this.dateRange; } }
[ "bdferris@google.com" ]
bdferris@google.com
e4bad3945a4e225364637ad31d079ffba604f905
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava12/Foo444.java
719b57a1510093e7f5c0d8af2e7ff5b878844328
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package applicationModulepackageJava12; public class Foo444 { public void foo0() { new applicationModulepackageJava12.Foo443().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
2bdfd54ad8cfbc4c65484871ebfc51554044bdc8
b4c47b649e6e8b5fc48eed12fbfebeead32abc08
/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java
8a15e59d3678bdf054468c9e225e569551199d07
[]
no_license
neetavarkala/miui_framework_clover
300a2b435330b928ac96714ca9efab507ef01533
2670fd5d0ddb62f5e537f3e89648d86d946bd6bc
refs/heads/master
2022-01-16T09:24:02.202222
2018-09-01T13:39:50
2018-09-01T13:39:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,296
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package android.net.wifi.p2p.nsd; import android.os.Parcel; import android.os.Parcelable; import java.util.ArrayList; import java.util.List; public class WifiP2pServiceInfo implements Parcelable { protected WifiP2pServiceInfo(List list) { if(list == null) { throw new IllegalArgumentException("query list cannot be null"); } else { mQueryList = list; return; } } static String bin2HexStr(byte abyte0[]) { StringBuffer stringbuffer = new StringBuffer(); int i = 0; int j = abyte0.length; do { if(i >= j) break; byte byte0 = abyte0[i]; String s; try { s = Integer.toHexString(byte0 & 0xff); } // Misplaced declaration of an exception variable catch(byte abyte0[]) { abyte0.printStackTrace(); return null; } if(s.length() == 1) stringbuffer.append('0'); stringbuffer.append(s); i++; } while(true); return stringbuffer.toString(); } public int describeContents() { return 0; } public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof WifiP2pServiceInfo)) { return false; } else { obj = (WifiP2pServiceInfo)obj; return mQueryList.equals(((WifiP2pServiceInfo) (obj)).mQueryList); } } public List getSupplicantQueryList() { return mQueryList; } public int hashCode() { int i; if(mQueryList == null) i = 0; else i = mQueryList.hashCode(); return i + 527; } public void writeToParcel(Parcel parcel, int i) { parcel.writeStringList(mQueryList); } public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { public WifiP2pServiceInfo createFromParcel(Parcel parcel) { ArrayList arraylist = new ArrayList(); parcel.readStringList(arraylist); return new WifiP2pServiceInfo(arraylist); } public volatile Object createFromParcel(Parcel parcel) { return createFromParcel(parcel); } public WifiP2pServiceInfo[] newArray(int i) { return new WifiP2pServiceInfo[i]; } public volatile Object[] newArray(int i) { return newArray(i); } } ; public static final int SERVICE_TYPE_ALL = 0; public static final int SERVICE_TYPE_BONJOUR = 1; public static final int SERVICE_TYPE_UPNP = 2; public static final int SERVICE_TYPE_VENDOR_SPECIFIC = 255; public static final int SERVICE_TYPE_WS_DISCOVERY = 3; private List mQueryList; }
[ "hosigumayuugi@gmail.com" ]
hosigumayuugi@gmail.com
d91d7fea247d49c31e79ae280cef3ca00a5288ab
e56c0c78a24d37e80d507fb915e66d889c58258d
/seeds-collect/src/main/java/net/tribe7/common/collect/EnumMultiset.java
2357e892e40f80a38ccfeb7e0ccfba08b332d2e8
[]
no_license
jjzazuet/seeds-libraries
d4db7f61ff3700085a36eec77eec0f5f9a921bb5
87f74a006632ca7a11bff62c89b8ec4514dc65ab
refs/heads/master
2021-01-23T20:13:04.801382
2014-03-23T21:51:46
2014-03-23T21:51:46
8,710,960
30
2
null
null
null
null
UTF-8
Java
false
false
3,932
java
/* * Copyright (C) 2007 The Guava 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 net.tribe7.common.collect; import static net.tribe7.common.base.Preconditions.checkArgument; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.EnumMap; import java.util.Iterator; import net.tribe7.common.annotations.GwtCompatible; import net.tribe7.common.annotations.GwtIncompatible; /** * Multiset implementation backed by an {@link EnumMap}. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/NewCollectionTypesExplained#Multiset"> * {@code Multiset}</a>. * * @author Jared Levy * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible(emulated = true) public final class EnumMultiset<E extends Enum<E>> extends AbstractMapBasedMultiset<E> { /** Creates an empty {@code EnumMultiset}. */ public static <E extends Enum<E>> EnumMultiset<E> create(Class<E> type) { return new EnumMultiset<E>(type); } /** * Creates a new {@code EnumMultiset} containing the specified elements. * * <p>This implementation is highly efficient when {@code elements} is itself a {@link * Multiset}. * * @param elements the elements that the multiset should contain * @throws IllegalArgumentException if {@code elements} is empty */ public static <E extends Enum<E>> EnumMultiset<E> create(Iterable<E> elements) { Iterator<E> iterator = elements.iterator(); checkArgument(iterator.hasNext(), "EnumMultiset constructor passed empty Iterable"); EnumMultiset<E> multiset = new EnumMultiset<E>(iterator.next().getDeclaringClass()); Iterables.addAll(multiset, elements); return multiset; } /** * Returns a new {@code EnumMultiset} instance containing the given elements. Unlike * {@link EnumMultiset#create(Iterable)}, this method does not produce an exception on an empty * iterable. * * @since 14.0 */ public static <E extends Enum<E>> EnumMultiset<E> create(Iterable<E> elements, Class<E> type) { EnumMultiset<E> result = create(type); Iterables.addAll(result, elements); return result; } private transient Class<E> type; /** Creates an empty {@code EnumMultiset}. */ private EnumMultiset(Class<E> type) { super(WellBehavedMap.wrap(new EnumMap<E, Count>(type))); this.type = type; } @GwtIncompatible("java.io.ObjectOutputStream") private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(type); Serialization.writeMultiset(this, stream); } /** * @serialData the {@code Class<E>} for the enum type, the number of distinct * elements, the first element, its count, the second element, its * count, and so on */ @GwtIncompatible("java.io.ObjectInputStream") private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @SuppressWarnings("unchecked") // reading data stored by writeObject Class<E> localType = (Class<E>) stream.readObject(); type = localType; setBackingMap(WellBehavedMap.wrap(new EnumMap<E, Count>(type))); Serialization.populateMultiset(this, stream); } @GwtIncompatible("Not needed in emulated source") private static final long serialVersionUID = 0; }
[ "jjzazuet@gmail.com" ]
jjzazuet@gmail.com
7fab640e1b85a1311e7a2c174697e529bc5ca6f6
dd55a5ee926a69a91494ce620dd26cb2f15ad0b8
/Trees/1. Binary Tree implementation and traversals/BinaryTreeTraversals.java
a914558f9f8be515e4b37ddaec3b06f8e4ff39eb
[]
no_license
sainandini-m/DataStructures_Algorithms
f89daa53aa0a4aea9b6d38c22d1311b30f0f8400
b98b0f3f3d677575068e8a649bb5473b484de68c
refs/heads/master
2022-10-04T22:37:43.163971
2019-11-09T04:47:27
2019-11-09T04:47:27
221,016,461
1
0
null
null
null
null
UTF-8
Java
false
false
4,090
java
import java.util.*; public class BinaryTreeTraversals { public void preOrder(BinaryTreeNode root) { if (root != null) { System.out.println(root.getData()); preOrder(root.getLeft()); preOrder(root.getRight()); } } public void inOrder(BinaryTreeNode root) { if (root != null) { inOrder(root.getLeft()); System.out.println(root.getData()); inOrder(root.getRight()); } } public void postOrder(BinaryTreeNode root) { if (root != null) { postOrder(root.getLeft()); postOrder(root.getRight()); System.out.println(root.getData()); } } public void preOrderIterative(BinaryTreeNode root) { ArrayList<Integer> result = new ArrayList<>(); if (root == null) return; Stack<BinaryTreeNode> s = new Stack<BinaryTreeNode>(); s.push(root); while(!s.isEmpty()) { BinaryTreeNode temp = s.pop(); result.add(temp.getData()); if(temp.getRight() != null) s.push(temp.getRight()); if(temp.getLeft() != null) s.push(temp.getLeft()); } for(int i : result) System.out.println(i); } public void inOrderIterative(BinaryTreeNode root) { ArrayList<Integer> result = new ArrayList<>(); Stack<BinaryTreeNode> s = new Stack<>(); BinaryTreeNode current = root; while(current != null || s.size() > 0) { while(current != null) // push the left subtree before processing any node { s.push(current); current = current.getLeft(); } current = s.pop(); result.add(current.getData()); current = current.getRight(); } for (int i: result) System.out.println(i); } public void postOrderIterative(BinaryTreeNode root) { ArrayList<Integer> result = new ArrayList<>(); Stack<BinaryTreeNode> s = new Stack<>(); if (root == null) return ; s.push(root); BinaryTreeNode prev = null; while(!s.isEmpty()) { BinaryTreeNode current = s.peek(); if (prev == null || prev.getLeft() == null || prev.getRight() == null) { if (current.getLeft() != null) s.push(current.getLeft()); else if (current.getRight() != null) { s.push(current.getRight()); } else { s.pop(); result.add(current.getData()); } } else if (current.getLeft() == prev) { if (current.getRight() != null) s.push(current.getRight()); else { s.pop(); result.add(current.getData()); } } else if (current.getRight() == prev) { s.pop(); result.add(current.getData()); } prev = current; } for(int i : result) System.out.println(i); } public void levelOrderIterative(BinaryTreeNode root) { ArrayList<Integer> result = new ArrayList<>(); Queue<BinaryTreeNode> q = new LinkedList<>(); q.offer(root); while(!q.isEmpty()) { BinaryTreeNode current = q.poll(); result.add(current.getData()); if (current.getLeft() != null) q.offer(current.getLeft()); if (current.getRight() != null) q.offer(current.getRight()); } for (int i : result) System.out.println(i); } }
[ "kals9seals@gmail.com" ]
kals9seals@gmail.com
29f00c96391e8bb343730eb32d026b14ba72ec8a
91297ffb10fb4a601cf1d261e32886e7c746c201
/csl.api/src/org/netbeans/modules/csl/editor/fold/GsfFoldScheduler.java
914babcf830ef5b5657e761111f0aa9ad60aec7b
[]
no_license
JavaQualitasCorpus/netbeans-7.3
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
60018fd982f9b0c9fa81702c49980db5a47f241e
refs/heads/master
2023-08-12T09:29:23.549956
2019-03-16T17:06:32
2019-03-16T17:06:32
167,005,013
0
0
null
null
null
null
UTF-8
Java
false
false
5,619
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2008-2011 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. * * Contributor(s): * * Portions Copyrighted 2008-2011 Sun Microsystems, Inc. */ package org.netbeans.modules.csl.editor.fold; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import javax.swing.text.Document; import javax.swing.text.JTextComponent; import org.netbeans.api.editor.EditorRegistry; import org.netbeans.modules.editor.NbEditorUtilities; import org.netbeans.modules.parsing.api.Source; import org.netbeans.modules.parsing.spi.Scheduler; import org.netbeans.modules.parsing.spi.SchedulerEvent; import org.netbeans.modules.parsing.spi.SourceModificationEvent; import org.openide.filesystems.FileObject; import org.openide.util.Lookup; import org.openide.util.lookup.ServiceProvider; /**Copied and adjusted CurrentDocumentScheduler. * * @author Jan Jancura, Jan Lahoda */ @ServiceProvider(service=Scheduler.class) public class GsfFoldScheduler extends Scheduler { private JTextComponent currentEditor; private Document currentDocument; private Source source; public GsfFoldScheduler() { setEditor (EditorRegistry.focusedComponent ()); EditorRegistry.addPropertyChangeListener (new AListener ()); } protected void setEditor (JTextComponent editor) { if (editor != null) { Document document = editor.getDocument (); if (currentDocument == document) return; currentDocument = document; source = Source.create (currentDocument); schedule (source, new SchedulerEvent (this) {}); } else { currentDocument = null; source = null; schedule(null, null); } } private class AListener implements PropertyChangeListener { public void propertyChange (PropertyChangeEvent evt) { if (evt.getPropertyName () == null || evt.getPropertyName ().equals (EditorRegistry.FOCUSED_DOCUMENT_PROPERTY) || evt.getPropertyName ().equals (EditorRegistry.FOCUS_GAINED_PROPERTY) ) { JTextComponent editor = EditorRegistry.focusedComponent (); if (editor == currentEditor) return; currentEditor = editor; if (currentEditor != null) { Document document = currentEditor.getDocument (); FileObject fileObject = NbEditorUtilities.getFileObject(document); if (fileObject == null) { // System.out.println("no file object for " + document); return; } } setEditor (currentEditor); } else if (evt.getPropertyName().equals(EditorRegistry.LAST_FOCUSED_REMOVED_PROPERTY)) { currentEditor = null; setEditor(null); } } } @Override public String toString () { return this.getClass().getSimpleName(); } @Override protected SchedulerEvent createSchedulerEvent (SourceModificationEvent event) { if (event.getModifiedSource () == source) return new SchedulerEvent (this) {}; return null; } public static void reschedule() { for (Scheduler s : Lookup.getDefault().lookupAll(Scheduler.class)) { if (s instanceof GsfFoldScheduler) { GsfFoldScheduler gsfScheduler = (GsfFoldScheduler) s; gsfScheduler.schedule(new SchedulerEvent(gsfScheduler) {}); } } } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi