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
99c69f7b634967939162eb6d53ff02d9ecc5ce22
b06acf556b750ac1fa5b28523db7188c05ead122
/IfcModel/src/ifc2x3tc1/impl/IfcIsothermalMoistureCapacityMeasureImpl.java
19ce290fbeba6d0d1935b96240d524ecf38afa93
[]
no_license
christianharrington/MDD
3500afbe5e1b1d1a6f680254095bb8d5f63678ba
64beecdaed65ac22b0047276c616c269913afd7f
refs/heads/master
2021-01-10T21:42:53.686724
2012-12-17T03:27:05
2012-12-17T03:27:05
6,157,471
1
0
null
null
null
null
UTF-8
Java
false
false
8,120
java
/** */ package ifc2x3tc1.impl; import ifc2x3tc1.Ifc2x3tc1Package; import ifc2x3tc1.IfcIsothermalMoistureCapacityMeasure; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Ifc Isothermal Moisture Capacity Measure</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link ifc2x3tc1.impl.IfcIsothermalMoistureCapacityMeasureImpl#getWrappedValue <em>Wrapped Value</em>}</li> * <li>{@link ifc2x3tc1.impl.IfcIsothermalMoistureCapacityMeasureImpl#getWrappedValueAsString <em>Wrapped Value As String</em>}</li> * </ul> * </p> * * @generated */ public class IfcIsothermalMoistureCapacityMeasureImpl extends WrappedValueImpl implements IfcIsothermalMoistureCapacityMeasure { /** * The default value of the '{@link #getWrappedValue() <em>Wrapped Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getWrappedValue() * @generated * @ordered */ protected static final double WRAPPED_VALUE_EDEFAULT = 0.0; /** * The cached value of the '{@link #getWrappedValue() <em>Wrapped Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getWrappedValue() * @generated * @ordered */ protected double wrappedValue = WRAPPED_VALUE_EDEFAULT; /** * This is true if the Wrapped Value attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean wrappedValueESet; /** * The default value of the '{@link #getWrappedValueAsString() <em>Wrapped Value As String</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getWrappedValueAsString() * @generated * @ordered */ protected static final String WRAPPED_VALUE_AS_STRING_EDEFAULT = null; /** * The cached value of the '{@link #getWrappedValueAsString() <em>Wrapped Value As String</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getWrappedValueAsString() * @generated * @ordered */ protected String wrappedValueAsString = WRAPPED_VALUE_AS_STRING_EDEFAULT; /** * This is true if the Wrapped Value As String attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean wrappedValueAsStringESet; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IfcIsothermalMoistureCapacityMeasureImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return Ifc2x3tc1Package.eINSTANCE.getIfcIsothermalMoistureCapacityMeasure(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public double getWrappedValue() { return wrappedValue; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setWrappedValue(double newWrappedValue) { double oldWrappedValue = wrappedValue; wrappedValue = newWrappedValue; boolean oldWrappedValueESet = wrappedValueESet; wrappedValueESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE, oldWrappedValue, wrappedValue, !oldWrappedValueESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetWrappedValue() { double oldWrappedValue = wrappedValue; boolean oldWrappedValueESet = wrappedValueESet; wrappedValue = WRAPPED_VALUE_EDEFAULT; wrappedValueESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE, oldWrappedValue, WRAPPED_VALUE_EDEFAULT, oldWrappedValueESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetWrappedValue() { return wrappedValueESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getWrappedValueAsString() { return wrappedValueAsString; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setWrappedValueAsString(String newWrappedValueAsString) { String oldWrappedValueAsString = wrappedValueAsString; wrappedValueAsString = newWrappedValueAsString; boolean oldWrappedValueAsStringESet = wrappedValueAsStringESet; wrappedValueAsStringESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE_AS_STRING, oldWrappedValueAsString, wrappedValueAsString, !oldWrappedValueAsStringESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetWrappedValueAsString() { String oldWrappedValueAsString = wrappedValueAsString; boolean oldWrappedValueAsStringESet = wrappedValueAsStringESet; wrappedValueAsString = WRAPPED_VALUE_AS_STRING_EDEFAULT; wrappedValueAsStringESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE_AS_STRING, oldWrappedValueAsString, WRAPPED_VALUE_AS_STRING_EDEFAULT, oldWrappedValueAsStringESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetWrappedValueAsString() { return wrappedValueAsStringESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE: return getWrappedValue(); case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE_AS_STRING: return getWrappedValueAsString(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE: setWrappedValue((Double)newValue); return; case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE_AS_STRING: setWrappedValueAsString((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE: unsetWrappedValue(); return; case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE_AS_STRING: unsetWrappedValueAsString(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE: return isSetWrappedValue(); case Ifc2x3tc1Package.IFC_ISOTHERMAL_MOISTURE_CAPACITY_MEASURE__WRAPPED_VALUE_AS_STRING: return isSetWrappedValueAsString(); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (wrappedValue: "); if (wrappedValueESet) result.append(wrappedValue); else result.append("<unset>"); result.append(", wrappedValueAsString: "); if (wrappedValueAsStringESet) result.append(wrappedValueAsString); else result.append("<unset>"); result.append(')'); return result.toString(); } } //IfcIsothermalMoistureCapacityMeasureImpl
[ "t.didriksen@gmail.com" ]
t.didriksen@gmail.com
9f33c7abc2e0a89ff5ed80988f9d254ae56e1e5e
51aef8e206201568d04fb919bf54a3009c039dcf
/trunk/src/com/jme/scene/state/lwjgl/records/ShaderObjectsStateRecord.java
7ca89c0e0af1179d838ff712ad907193185b23e3
[]
no_license
lihak/fairytale-soulfire-svn-to-git
0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81
a85eb3fc6f4edf30fef9201902fcdc108da248e4
refs/heads/master
2021-02-11T15:25:47.199953
2015-12-28T14:48:14
2015-12-28T14:48:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,377
java
/* * Copyright (c) 2003-2008 jMonkeyEngine * All rights reserved. * * 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 'jMonkeyEngine' 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.jme.scene.state.lwjgl.records; import com.jme.scene.state.StateRecord; import com.jme.scene.state.lwjgl.LWJGLShaderObjectsState; public class ShaderObjectsStateRecord extends StateRecord{ //XXX NOTE: This is non-standard. Due to the fact that shader implementations //XXX will be changed this record simply makes use of the old reference //XXX checking system. LWJGLShaderObjectsState reference = null; public LWJGLShaderObjectsState getReference() { return reference; } public void setReference(LWJGLShaderObjectsState reference) { this.reference = reference; } @Override public void invalidate() { super.invalidate(); reference = null; } }
[ "you@example.com" ]
you@example.com
517bcb976d60a89d57d466f7fb12296e0980a1b1
ef1b72abf5554c94661c495a0bf0a6aded89e37c
/src/net/minecraft/src/ccy.java
35ebdfda301737504bc11e34f061823eed6b30e7
[]
no_license
JimmyZJX/MC1.8_source
ad459b12d0d01db28942b9af87c86393011fd626
25f56c7884a320cbf183b23010cccecb5689d707
refs/heads/master
2016-09-10T04:26:40.951576
2014-11-29T06:22:02
2014-11-29T06:22:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,528
java
package net.minecraft.src; /* 1: */ public class ccy /* 2: */ extends ccv /* 3: */ { /* 4: */ private float i; /* 5: */ /* 6: */ public ccy() /* 7: */ { /* 8:12 */ super(12, 0.0F); /* 9: */ /* 10:14 */ this.a = new cdy(this, 0, 0); /* 11:15 */ this.a.a(-3.0F, -4.0F, -6.0F, 6, 6, 8, 0.0F); /* 12:16 */ this.a.a(0.0F, 6.0F, -8.0F); /* 13: */ /* 14:18 */ this.b = new cdy(this, 28, 8); /* 15:19 */ this.b.a(-4.0F, -10.0F, -7.0F, 8, 16, 6, 0.0F); /* 16:20 */ this.b.a(0.0F, 5.0F, 2.0F); /* 17: */ } /* 18: */ /* 19: */ public void a(EntityLiving paramxm, float paramFloat1, float paramFloat2, float paramFloat3) /* 20: */ { /* 21:25 */ super.a(paramxm, paramFloat1, paramFloat2, paramFloat3); /* 22: */ /* 23:27 */ this.a.d = (6.0F + ((EntitySheep)paramxm).o(paramFloat3) * 9.0F); /* 24:28 */ this.i = ((EntitySheep)paramxm).p(paramFloat3); /* 25: */ } /* 26: */ /* 27: */ public void a(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, Entity paramwv) /* 28: */ { /* 29:33 */ super.a(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramwv); /* 30: */ /* 31:35 */ this.a.f = this.i; /* 32: */ } /* 33: */ } /* Location: C:\Minecraft1.7.5\.minecraft\versions\1.8\1.8.jar * Qualified Name: ccy * JD-Core Version: 0.7.0.1 */
[ "604590822@qq.com" ]
604590822@qq.com
57beb5ed1608441e5b78b063bf15bbca90c4fb5b
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/65/org/apache/commons/math/optimization/BaseMultivariateRealOptimizer_setMaxEvaluations_57.java
a93d5ba0fe6cc00bf37266821bcf3d06c3af11f6
[]
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
792
java
org apach common math optim optim algorithm find input point set link goal type goaltyp maxim minim object function intend enforc intern coher common math user api advis base code link multivari real optim multivariaterealoptim link differenti multivari real optim differentiablemultivariaterealoptim param type object function optim multivari real optim multivariaterealoptim differenti multivari real optim differentiablemultivariaterealoptim version revis date base multivari real optim basemultivariaterealoptim multivari real function multivariaterealfunct set maxim number function evalu param max evalu maxevalu maxim number function evalu set max evalu setmaxevalu max evalu maxevalu
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
33aed4f53d1f6521a0787a0f025380e1ffdda6a3
6d01d0b0ed45a318ca3f4eb1baa215cbe458139e
/programprocessor/experiment-dataset/TrainingData/51CTO-java1200221/MR/555/src/com/cdd/derive/LocalTableModel.java
36c6b912441d4f88d4225d11c23df1203cfdc820
[]
no_license
yangyixiaof/gitcrawler
83444de5de1e0e0eb1cb2f1e2f39309f10b52eb5
f07f0525bcb33c054820cf27e9ff73aa591ed3e0
refs/heads/master
2022-09-16T20:07:56.380308
2020-04-12T17:03:02
2020-04-12T17:03:02
46,218,938
0
1
null
2022-09-01T22:36:18
2015-11-15T13:36:48
Java
GB18030
Java
false
false
687
java
package com.cdd.derive; public class LocalTableModel extends javax.swing.table.DefaultTableModel { Class[] types = new Class[] { java.lang.Object.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class,java.lang.String.class}; boolean[] canEdit = new boolean[] { false, false, false,false,false,false }; public LocalTableModel() { super(new Object[][] {}, new String[] { "编号", "姓名", "部门","职位","入司时间","工资" }); } public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }
[ "yyx@ubuntu" ]
yyx@ubuntu
a509b8b56a65c817c7407ab4d98b55b41eae1b75
19809d0be46f6582a7802a773afc792868304942
/java7SrcStudy/src/main/java/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java
0616d3999ee36a81efa58b0315442dfee2c43b51
[]
no_license
jxxiangwen/JavaStudy
fa5194630a0c46d498d1a49acba8449fa4d447e9
fbf2accf3e9ec24b633ef26d2f3328e6b021d054
refs/heads/master
2022-12-21T20:46:04.447682
2019-09-02T09:35:27
2019-09-02T09:35:27
48,320,572
0
0
null
null
null
null
UTF-8
Java
false
false
1,676
java
package org.omg.CosNaming.NamingContextPackage; /** * org/omg/CosNaming/NamingContextPackage/NotFoundReason.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl * Friday, July 25, 2014 9:00:00 AM PDT */ /** * Indicates the reason for not able to resolve. */ public class NotFoundReason implements org.omg.CORBA.portable.IDLEntity { private int __value; private static int __size = 3; private static org.omg.CosNaming.NamingContextPackage.NotFoundReason[] __array = new org.omg.CosNaming.NamingContextPackage.NotFoundReason [__size]; public static final int _missing_node = 0; public static final org.omg.CosNaming.NamingContextPackage.NotFoundReason missing_node = new org.omg.CosNaming.NamingContextPackage.NotFoundReason(_missing_node); public static final int _not_context = 1; public static final org.omg.CosNaming.NamingContextPackage.NotFoundReason not_context = new org.omg.CosNaming.NamingContextPackage.NotFoundReason(_not_context); public static final int _not_object = 2; public static final org.omg.CosNaming.NamingContextPackage.NotFoundReason not_object = new org.omg.CosNaming.NamingContextPackage.NotFoundReason(_not_object); public int value () { return __value; } public static org.omg.CosNaming.NamingContextPackage.NotFoundReason from_int (int value) { if (value >= 0 && value < __size) return __array[value]; else throw new org.omg.CORBA.BAD_PARAM (); } protected NotFoundReason (int value) { __value = value; __array[__value] = this; } } // class NotFoundReason
[ "xiangwen.zou@ymm56.com" ]
xiangwen.zou@ymm56.com
674062fa498f286604b444de22f9d18c4f2a4237
791532db8be70e7d2aee1346e30cec3d3ae511af
/src/main/java/com/microsoft/bingads/v12/bulk/entities/BulkCallAdExtension.java
ab21ca23c18e46621d123dc0dfcd4798afef7188
[ "MIT" ]
permissive
charan1595/BingAds-Java-SDK
d5d894484391057141b146a7e0893e4c29220ee9
d981912a71fa2f5aa61a337b33ca4caca8fbc66f
refs/heads/master
2020-03-28T03:50:44.751557
2018-09-12T10:19:53
2018-09-12T10:19:53
147,675,402
0
0
null
2018-09-06T13:09:45
2018-09-06T13:09:45
null
UTF-8
Java
false
false
7,054
java
package com.microsoft.bingads.v12.bulk.entities; import com.microsoft.bingads.v12.bulk.BulkFileReader; import com.microsoft.bingads.v12.bulk.BulkFileWriter; import com.microsoft.bingads.v12.bulk.BulkServiceManager; import com.microsoft.bingads.v12.campaignmanagement.CallAdExtension; import com.microsoft.bingads.v12.bulk.BulkOperation; import com.microsoft.bingads.v12.internal.bulk.StringExtensions; import com.microsoft.bingads.v12.internal.bulk.StringTable; import com.microsoft.bingads.v12.internal.bulk.BulkMapping; import com.microsoft.bingads.v12.internal.bulk.MappingHelpers; import com.microsoft.bingads.v12.internal.bulk.RowValues; import com.microsoft.bingads.v12.internal.bulk.SimpleBulkMapping; import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; import com.microsoft.bingads.internal.functionalinterfaces.Function; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Represents a call ad extension. This class exposes {@link #setCallAdExtension} and {@link #getCallAdExtension} * that can be used to read and write fields of the Call Ad Extension record in a bulk file. * * For more information, see Call Ad Extension at * <a href="https://go.microsoft.com/fwlink/?linkid=846127">https://go.microsoft.com/fwlink/?linkid=846127</a> * * @see BulkServiceManager * @see BulkOperation * @see BulkFileReader * @see BulkFileWriter */ public class BulkCallAdExtension extends BulkAdExtension<CallAdExtension> { /** * Gets the call ad extension. */ public CallAdExtension getCallAdExtension() { return this.getAdExtension(); } /** * Sets the call ad extension. */ public void setCallAdExtension(CallAdExtension value) { this.setAdExtension(value); } private static List<BulkMapping<BulkCallAdExtension>> MAPPINGS; static { List<BulkMapping<BulkCallAdExtension>> m = new ArrayList<BulkMapping<BulkCallAdExtension>>(); m.add(new SimpleBulkMapping<BulkCallAdExtension, String>(StringTable.PhoneNumber, new Function<BulkCallAdExtension, String>() { @Override public String apply(BulkCallAdExtension c) { return c.getCallAdExtension().getPhoneNumber(); } }, new BiConsumer<String, BulkCallAdExtension>() { @Override public void accept(String v, BulkCallAdExtension c) { c.getCallAdExtension().setPhoneNumber(v); } } )); m.add(new SimpleBulkMapping<BulkCallAdExtension, String>(StringTable.CountryCode, new Function<BulkCallAdExtension, String>() { @Override public String apply(BulkCallAdExtension c) { return c.getCallAdExtension().getCountryCode(); } }, new BiConsumer<String, BulkCallAdExtension>() { @Override public void accept(String v, BulkCallAdExtension c) { c.getCallAdExtension().setCountryCode(v); } } )); m.add(new SimpleBulkMapping<BulkCallAdExtension, String>(StringTable.IsCallOnly, new Function<BulkCallAdExtension, String>() { @Override public String apply(BulkCallAdExtension c) { return StringExtensions.toBooleanBulkString(c.getCallAdExtension().getIsCallOnly()); } }, new BiConsumer<String, BulkCallAdExtension>() { @Override public void accept(String v, BulkCallAdExtension c) { c.getCallAdExtension().setIsCallOnly(StringExtensions.<Boolean>parseOptional(v, new Function<String, Boolean>() { @Override public Boolean apply(String value) { return Boolean.parseBoolean(value); } })); } } )); m.add(new SimpleBulkMapping<BulkCallAdExtension, String>(StringTable.IsCallTrackingEnabled, new Function<BulkCallAdExtension, String>() { @Override public String apply(BulkCallAdExtension c) { return StringExtensions.toBooleanBulkString(c.getCallAdExtension().getIsCallTrackingEnabled()); } }, new BiConsumer<String, BulkCallAdExtension>() { @Override public void accept(String v, BulkCallAdExtension c) { c.getCallAdExtension().setIsCallTrackingEnabled(StringExtensions.<Boolean>parseOptional(v, new Function<String, Boolean>() { @Override public Boolean apply(String value) { return Boolean.parseBoolean(value); } })); } } )); m.add(new SimpleBulkMapping<BulkCallAdExtension, String>(StringTable.RequireTollFreeTrackingNumber, new Function<BulkCallAdExtension, String>() { @Override public String apply(BulkCallAdExtension c) { return StringExtensions.toBooleanBulkString(c.getCallAdExtension().getRequireTollFreeTrackingNumber()); } }, new BiConsumer<String, BulkCallAdExtension>() { @Override public void accept(String v, BulkCallAdExtension c) { c.getCallAdExtension().setRequireTollFreeTrackingNumber(StringExtensions.<Boolean>parseOptional(v, new Function<String, Boolean>() { @Override public Boolean apply(String value) { return Boolean.parseBoolean(value); } })); } } )); MAPPINGS = Collections.unmodifiableList(m); } @Override public void processMappingsFromRowValues(RowValues values) { CallAdExtension extension = new CallAdExtension(); extension.setType("CallAdExtension"); this.setAdExtension(extension); super.processMappingsFromRowValues(values); MappingHelpers.convertToEntity(values, MAPPINGS, this); } @Override public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { this.validatePropertyNotNull(this.getCallAdExtension(), "CallAdExtension"); super.processMappingsToRowValues(values, excludeReadonlyData); MappingHelpers.convertToValues(this, values, MAPPINGS); } }
[ "qitia@microsoft.com" ]
qitia@microsoft.com
7008b57ea94c28da446fbd9e3b40f0c70c0f3d68
13cbb329807224bd736ff0ac38fd731eb6739389
/sun/applet/AppletResourceLoader.java
1d6a6b578b0272b45c58be825095b8dc270c05c0
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
package sun.applet; import java.awt.Image; import java.net.URL; import sun.misc.Ref; public class AppletResourceLoader { public static Image getImage(URL paramURL) { return AppletViewer.getCachedImage(paramURL); } public static Ref getImageRef(URL paramURL) { return AppletViewer.getCachedImageRef(paramURL); } public static void flushImages() { AppletViewer.flushImageCache(); } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\sun\applet\AppletResourceLoader.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
0cfd9606fcc3f6717076c40f97de487b0904714b
4e30f9135c46db613bd3ceea938be843610842dc
/src/main/java/com/fisc/decldoccomptable/ApplicationWebXml.java
601c46ca68bed34fff6c2c8222c07730c92e367a
[]
no_license
sandalothier/jhipster-decldoccomptable
ed3b2fc5e18b49a7679d4bdcadb0184d421d6008
b251f192a3c278b1cb7810e0ef43e977334184d4
refs/heads/master
2022-12-23T18:13:10.417492
2019-12-19T13:18:07
2019-12-19T13:18:07
229,058,379
0
0
null
2022-12-16T06:07:19
2019-12-19T13:17:58
Java
UTF-8
Java
false
false
858
java
package com.fisc.decldoccomptable; import com.fisc.decldoccomptable.config.DefaultProfileUtil; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; /** * This is a helper Java class that provides an alternative to creating a {@code web.xml}. * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc. */ public class ApplicationWebXml extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { /** * set a default to use when no profile is configured. */ DefaultProfileUtil.addDefaultProfile(application.application()); return application.sources(DecldoccomptableApp.class); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
503c4db61ad2c5caa2b9fb465d6dcc44b5b0723f
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_53108.java
cd76477bec81f25a2cbe14063f8eebdd10006388
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
private void collectEntities(JSONObject json) throws JSONException, TwitterException { if (!json.isNull("entities")) { JSONObject entities=json.getJSONObject("entities"); userMentionEntities=EntitiesParseUtil.getUserMentions(entities); urlEntities=EntitiesParseUtil.getUrls(entities); hashtagEntities=EntitiesParseUtil.getHashtags(entities); symbolEntities=EntitiesParseUtil.getSymbols(entities); mediaEntities=EntitiesParseUtil.getMedia(entities); } if (!json.isNull("quoted_status")) { quotedStatus=new StatusJSONImpl(json.getJSONObject("quoted_status")); } if (!json.isNull("quoted_status_id")) { quotedStatusId=ParseUtil.getLong("quoted_status_id",json); } if (!json.isNull("quoted_status_permalink")) { quotedStatusPermalink=new QuotedStatusPermalinkJSONImpl(json.getJSONObject("quoted_status_permalink")); } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
72f12797b0cc63ef4edc23d0f5a176f8420678ba
a2440dbe95b034784aa940ddc0ee0faae7869e76
/modules/lwjgl/opengl/src/generated/java/org/lwjgl/opengl/ARBVertexArrayBGRA.java
06b9cb6df8a6b4a119fd953fde30c42d87e24a0f
[ "LicenseRef-scancode-khronos", "LGPL-2.0-or-later", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
LWJGL/lwjgl3
8972338303520c5880d4a705ddeef60472a3d8e5
67b64ad33bdeece7c09b0f533effffb278c3ecf7
refs/heads/master
2023-08-26T16:21:38.090410
2023-08-26T16:05:52
2023-08-26T16:05:52
7,296,244
4,835
1,004
BSD-3-Clause
2023-09-10T12:03:24
2012-12-23T15:40:04
Java
UTF-8
Java
false
false
3,433
java
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license * MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.opengl; /** * Native bindings to the <a href="https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_vertex_array_bgra.txt">ARB_vertex_array_bgra</a> extension. * * <p>This extension provides a single new component format for vertex arrays to read 4-component unsigned byte vertex attributes with a BGRA component * ordering.</p> * * <p>OpenGL expects vertex arrays containing 4 unsigned bytes per element to be in the RGBA, STRQ, or XYZW order (reading components left-to-right in their * lower address to higher address order). Essentially the order the components appear in memory is the order the components appear in the resulting vertex * attribute vector.</p> * * <p>However Direct3D has color (diffuse and specular) vertex arrays containing 4 unsigned bytes per element that are in a BGRA order (again reading * components left-to-right in their lower address to higher address order). Direct3D calls this "ARGB" reading the components in the opposite order * (reading components left-to-right in their higher address to lower address order). This ordering is generalized in the DirectX 10 by the * DXGI_FORMAT_B8G8R8A8_UNORM format.</p> * * <p>For an OpenGL application to source color data from a vertex buffer formatted for Direct3D's color array format conventions, the application is forced * to either:</p> * * <ol> * <li>Rely on a vertex program or shader to swizzle the color components from the BGRA to conventional RGBA order.</li> * <li>Re-order the color data components in the vertex buffer from Direct3D's native BGRA order to OpenGL's native RGBA order.</li> * </ol> * * <p>Neither option is entirely satisfactory.</p> * * <p>Option 1 means vertex shaders have to be re-written to source colors differently. If the same vertex shader is used with vertex arrays configured to * source the color as 4 floating-point color components, the swizzle for BGRA colors stored as 4 unsigned bytes is no longer appropriate. The shader's * swizzling of colors becomes dependent on the type and number of color components. Ideally the vertex shader should be independent from the format and * component ordering of the data it sources.</p> * * <p>Option 2 is expensive because vertex buffers may have to be reformatted prior to use. OpenGL treats the memory for vertex arrays (whether client-side * memory or buffer objects) as essentially untyped memory and vertex arrays can be stored separately, interleaved, or even interwoven (where multiple * arrays overlap with differing strides and formats).</p> * * <p>Rather than force a re-ordering of either vertex array components in memory or a vertex array format-dependent re-ordering of vertex shader inputs, * OpenGL can simply provide a vertex array format that matches the Direct3D color component ordering.</p> * * <p>This approach mimics that of the {@link EXTBGRA EXT_bgra} extension for pixel and texel formats except for vertex instead of image data.</p> * * <p>Promoted to core in {@link GL32 OpenGL 3.2}.</p> */ public final class ARBVertexArrayBGRA { /** Accepted by the {@code size} parameter of ColorPointer, SecondaryColorPointer, and VertexAttribPointer. */ public static final int GL_BGRA = 0x80E1; private ARBVertexArrayBGRA() {} }
[ "iotsakp@gmail.com" ]
iotsakp@gmail.com
5cce26caaaeee58f63989403159f9047fc2383cc
56345647827f1c27d4c8aa5e5c9d75fdfae487d9
/src/com/jrtcms/web/service/PhraseLibraryService.java
3d07552caa6e25aeb3159e104f1bdecb2ae487e9
[]
no_license
omusico/jrtcms
acfebffaaec4a7ab3f0b4156bd3adaea024d3d4f
f713a200f9913412d7f395f543df831bbde4245f
refs/heads/master
2020-12-25T10:14:11.737687
2013-04-19T08:44:24
2013-04-19T08:44:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.jrtcms.web.service; import java.util.List; import com.jrtcms.web.model.PhraseLibraryMD; import com.jrtcms.web.pojo.PhraseLibrary; public interface PhraseLibraryService { /** * 添加词组 * @param pl */ String add (PhraseLibrary pl); /** * 修改词组信息 * @param pl * @return */ String updatePhraseLibrary(PhraseLibrary pl) ; /** * 查询所有的词组 * @return */ List<PhraseLibrary> selectAll(); /** * 分页查询所有的词组 * @return */ List<PhraseLibrary> selectAllFY(PhraseLibraryMD plMd ); }
[ "xiongdecai@ruyicai.com" ]
xiongdecai@ruyicai.com
09460843313cabf4531d5d59c78035843760a87d
8a98577c5995449677ede2cbe1cc408c324efacc
/Big_Clone_Bench_files_used/bcb_reduced/3/selected/825410.java
66551165b0c4831ca9f63c34101ac73d0c41bfe3
[ "MIT" ]
permissive
pombredanne/lsh-for-source-code
9363cc0c9a8ddf16550ae4764859fa60186351dd
fac9adfbd98a4d73122a8fc1a0e0cc4f45e9dcd4
refs/heads/master
2020-08-05T02:28:55.370949
2017-10-18T23:57:08
2017-10-18T23:57:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,847
java
package com.handy.util; import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * 加密工具封装. CryptTool 封装了一些加密工具方法, 包括 3DES, MD5 等. * * @author rocken.zeng@gmail.com(整理) * @version 1.0 */ public class CryptTool { /** * 构造函数. * */ public CryptTool() { } /** * 生成3DES密钥. * * @param key_byte * seed key * @throws Exception * @return javax.crypto.SecretKey Generated DES key */ public static javax.crypto.SecretKey genDESKey(byte[] key_byte) { SecretKey k = null; k = new SecretKeySpec(key_byte, "DESede"); return k; } /** * 3DES 解密(byte[]). * * @param key * SecretKey * @param crypt * byte[] * @throws Exception * @return byte[] */ public static byte[] desDecrypt(javax.crypto.SecretKey key, byte[] crypt) { byte[] bytes = null; try { javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance("DESede"); cipher.init(javax.crypto.Cipher.DECRYPT_MODE, key); bytes = cipher.doFinal(crypt); } catch (NoSuchAlgorithmException e) { log.error(e.getMessage()); } catch (NoSuchPaddingException e) { log.error(e.getMessage()); } catch (InvalidKeyException e) { log.error(e.getMessage()); } catch (IllegalBlockSizeException e) { log.error(e.getMessage()); } catch (BadPaddingException e) { log.error(e.getMessage()); } return bytes; } /** * 3DES 解密(String). * * @param key * SecretKey * @param crypt * byte[] * @throws Exception * @return byte[] */ public static String desDecrypt(javax.crypto.SecretKey key, String crypt) { return new String(desDecrypt(key, crypt.getBytes())); } /** * 3DES加密(byte[]). * * @param key * SecretKey * @param src * byte[] * @throws Exception * @return byte[] */ public static byte[] desEncrypt(javax.crypto.SecretKey key, byte[] src) { byte[] bytes = null; try { javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance("DESede"); cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, key); bytes = cipher.doFinal(src); } catch (NoSuchAlgorithmException e) { log.error(e.getMessage()); } catch (NoSuchPaddingException e) { log.error(e.getMessage()); } catch (InvalidKeyException e) { log.error(e.getMessage()); } catch (IllegalBlockSizeException e) { log.error(e.getMessage()); } catch (BadPaddingException e) { log.error(e.getMessage()); } return bytes; } /** * 3DES加密(String). * * @param key * SecretKey * @param src * byte[] * @throws Exception * @return byte[] */ public static String desEncrypt(javax.crypto.SecretKey key, String src) { return new String(desEncrypt(key, src.getBytes())); } /** * MD5 摘要计算(byte[]). * * @param src * byte[] * @throws Exception * @return byte[] 16 bit digest */ public static byte[] md5Digest(byte[] src) { byte[] bytes = null; try { java.security.MessageDigest alg = java.security.MessageDigest.getInstance("MD5"); bytes = alg.digest(src); } catch (NoSuchAlgorithmException e) { log.error(e.getMessage()); } return bytes; } /** * MD5 摘要计算(String). * * @param src * String * @throws Exception * @return String */ public static String md5Digest(String src) { return new String(md5Digest(src.getBytes())); } /** * md5加密 * @return */ public static String md5(String str) { byte[] byteArray = null; try { byteArray = md5Digest(str.getBytes("utf-8")); } catch (UnsupportedEncodingException e) { log.error(e.getMessage()); } StringBuffer md5StrBuff = new StringBuffer(); for (int i = 0; i < byteArray.length; i++) { if (Integer.toHexString(0xFF & byteArray[i]).length() == 1) md5StrBuff.append("0").append(Integer.toHexString(0xFF & byteArray[i])); else md5StrBuff.append(Integer.toHexString(0xFF & byteArray[i])); } return md5StrBuff.toString(); } /** * 对给定字符进行 URL 编码. * * @param src * String * @return String */ public static String urlEncode(String src, String charset) { try { src = java.net.URLEncoder.encode(src, charset); return src; } catch (Exception e) { log.error(e.getMessage()); } return src; } /** * 对给定字符进行 URL 解码 * * @param value * 解码前的字符串 * @return 解码后的字符串 */ public static String urlDecode(String value, String charset) { try { return java.net.URLDecoder.decode(value, charset); } catch (Exception e) { log.error(e.getMessage()); } return value; } private static Log log = LogFactory.getLog(CryptTool.class); public static void main(String[] args) { System.out.println(CryptTool.md5("123")); } }
[ "nishima@mymail.vcu.edu" ]
nishima@mymail.vcu.edu
e691b51139372db81a5086fda03b4eb9a2c74fe2
c7d2f0c03a17973ddfee2f91ed0fcc08b63e1a45
/src/server/maps/MapleMapEffect.java
3377e100391fe089e2d2aceacc6977c167d5c2f6
[]
no_license
Rabbit-Guo/TWMS_134
1ff26104efcfe4973c9ba803ebedb8ab6ea989b5
ffe96a957c216fba23c5361c89c3817ce44e4b90
refs/heads/master
2023-05-18T18:38:08.794937
2019-01-09T18:12:22
2019-01-09T18:12:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
742
java
package server.maps; import client.MapleClient; import tools.MaplePacketCreator; import handling.MaplePacket; public class MapleMapEffect { private String msg; private int itemId; private boolean active = true; public MapleMapEffect(String msg, int itemId) { this.msg = msg; this.itemId = itemId; } public void setActive(boolean active) { this.active = active; } public MaplePacket makeDestroyData() { return MaplePacketCreator.removeMapEffect(); } public MaplePacket makeStartData() { return MaplePacketCreator.startMapEffect(msg, itemId, active); } public void sendStartData(MapleClient c) { c.getSession().write(MaplePacketCreator.startMapEffect(msg, itemId, active)); } }
[ "s884812@gmail.com" ]
s884812@gmail.com
d170fdb67cebafe5a623e546d9dd5150a8d9db5a
dba1f9f3d53f1b8e4b040b9b8974f6ac60d97b01
/src/main/java/com/hyman/demo/QueryTest.java
1153fd7a7b97575c34cc823335e3624a25c49f69
[]
no_license
hymanlew/springhibernate
bd39d48babe9ed91fdf33bf91558fd785a9721f7
d3cb78621ed4efedd0767e3ee009cb13c24bdd12
refs/heads/master
2022-11-24T14:22:09.171936
2019-06-02T10:56:50
2019-06-02T10:56:50
177,436,904
0
0
null
2022-11-16T06:54:26
2019-03-24T16:00:41
Java
UTF-8
Java
false
false
6,232
java
package com.hyman.demo; import com.hyman.entity.Role; import com.hyman.entity.User; import com.hyman.util.HibernateUtil; import javafx.scene.transform.Rotate; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import org.hibernate.query.Query; import javax.persistence.criteria.*; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.concurrent.LinkedTransferQueue; /** * HQL(Hibernate query language),它是面向对象的查询语言(而 sql 是面向表的查询)。HQL中的对象名是区分大小写的(除了 * java类和属性不区分大小写),它查的是对象而不是表,并且支持多态。它主要通过 query 来实现复杂的操作。 */ public class QueryTest { // hql 多条件查询(推荐)。 public static void test1(){ Session session = null; try { session = HibernateUtil.getSession(); /** * createSQLQuery 是指用原生的 sql 语句来执行,hibernate不会自动生成。并且如果需要自动封装到对象的话,还必 * 须 addEntity(Obj.class),否则不会自动封装。 */ //String sql = "SELECT * FROM user WHERE name LIKE ?"; //Query query = session.createSQLQuery(sql).addEntity(User.class); // createSQLQuery 参数下标与 JDBC 一样都是从 1 开始的。 //query.setParameter(1,"hyman"); // HQL(Hibernate query language),是面向对象的,所以这里必须使用 User 对象。并且参数占位符不能直接是?, // 因为高版本的 hibernate已不再支持。?后面需要加上下标位置。 //String sql = "from User as user where user.name=?0"; //Query query = session.createQuery(sql); // createQuery 参数下标是从 0 开始的,而 JDBC 是从 1 开始的 //query.setParameter(0,"hyman"); String sql = "from User as user where user.name=:name"; Query query = session.createQuery(sql); query.setParameter("name","hyman"); // 实现分页的功能,从第几条数据开始,要拿到多少条。它是 hibernate封装的方法,所以可用于任何数据库分页。 // 并且是基于方言的,即连接 mysql 就用于 mysql。连接 oracle 就用于 oracle。 query.setFirstResult(0); query.setMaxResults(10); // 如果确定查询的结果只有一条时,也可以使用这个方法。 //query.uniqueResult(); List list = query.list(); for(Iterator ite = list.iterator(); ite.hasNext();){ System.out.println("1 === "+ite.next()); } } catch (Exception e) { // 如果此代码是在 DAO 层执行时,通常要把异常抛出给调用层 e.printStackTrace(); System.out.println("======== "+e.getMessage()); }finally { // 关闭连接 if(session != null){ session.close(); } } } // CriteriaQuery 多条件动态查询,它比 hql 更面向对象,更加灵活(可以实现动态查询)。 public static void test2(){ Session session = null; try { session = HibernateUtil.getSession(); // 动态的离线查询,该对象的创建不与 session 发生关联,它是可以在任何地方都能创建 DetachedCriteria dc = DetachedCriteria.forClass(User.class); dc.add(Restrictions.eq("name","lili")); dc.add(Restrictions.gt("age",20)); Criteria c = dc.getExecutableCriteria(session); List ulist = c.list(); // 注意导入的包是 import javax.persistence.criteria.CriteriaQuery; CriteriaBuilder cBuilder = session.getCriteriaBuilder(); CriteriaQuery<User> ciquery = cBuilder.createQuery(User.class); // 指定根条件 Root<User> root = ciquery.from(User.class); ciquery.where(cBuilder.like(root.<String>get("name"),"hyman")); // 条件查询:"name"是实体类的属性名称。Predicate 是条件对象。 // isNull 为空,isNotNull 非空 Predicate p1 = cBuilder.isNull(root.get("password")); // Equal 相等,notEqual 不相等 Predicate p2 = cBuilder.notEqual(root.get("password"),"123"); // in 查询,not in 查询 CriteriaBuilder.In in = cBuilder.in(root.get("password")); cBuilder.not(in); // 日期区间比较 cBuilder.between(root.<Date>get("date"),new Date(),new Date()); // lessThan 小于某个日期,greaterThan 大于某个日期 cBuilder.lessThan(root.<Comparable>get("date"),new Date()); // le 小于等于, lt 小于 cBuilder.le(root.<Number>get("id"),10); // ge 大于等于, gt 大于 cBuilder.ge(root.<Number>get("id"),10); // asc 升序, desc 降序 cBuilder.asc(root.get("id")); // and,or 条件查询 cBuilder.and(p1,p2); cBuilder.or(p1,p2); Path<Date> datePath=root.get("workDay"); ciquery.where(p1); Query query = session.createQuery(ciquery); List<User> list = query.getResultList(); for(User user : list){ System.out.println(user); } } catch (Exception e) { e.printStackTrace(); } } // 命名查询 public static void test3(){ Session session = HibernateUtil.getSession(); Query query = session.getNamedQuery("com.hyman.entity.Role.queryByName"); Query query2 = session.getNamedQuery("queryByNameOut"); query.setParameter("name","%h%"); List<Role> list = query.list(); System.out.println(list); } public static void main(String[] args) { test1(); //test2(); } }
[ "hyman@163.com" ]
hyman@163.com
5e94b2907747d0216cee14b312d1c8e373399db6
3ea8347047b7452b546b7e34ee775bb00395204c
/src/main/java/como/dipassio/com/config/CloudDatabaseConfiguration.java
d484dbe383587e330ea53eaae1eb56fabcc42c0b
[]
no_license
dipass-io/Dasher
62981272253c0a59c774ad72075edda76076ff9c
5581bf38fb6da3e8fff0294459fbea2a9f2aa229
refs/heads/main
2023-02-25T01:59:51.027829
2021-02-04T11:04:19
2021-02-04T11:04:19
335,927,347
0
0
null
null
null
null
UTF-8
Java
false
false
926
java
package como.dipassio.com.config; import io.github.jhipster.config.JHipsterConstants; import javax.sql.DataSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.cloud.config.java.AbstractCloudConfig; import org.springframework.context.annotation.*; @Configuration @Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) public class CloudDatabaseConfiguration extends AbstractCloudConfig { private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); private static final String CLOUD_CONFIGURATION_HIKARI_PREFIX = "spring.datasource.hikari"; @Bean @ConfigurationProperties(CLOUD_CONFIGURATION_HIKARI_PREFIX) public DataSource dataSource() { log.info("Configuring JDBC datasource from a cloud provider"); return connectionFactory().dataSource(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0af5fb75e365d894ca0eb4f8a177970e1e1746cb
abe16d0ba344a67354718c7324e1ddac43efd373
/dahua-design/src/main/java/ch18/CashRebate.java
d7d4ab6857458036805fea47b69c93a175a193d7
[]
no_license
gerrywen/java-learn
9888ccdf04aff50e4d8e5902c03e13c64dbf65b8
a3ed4ab50af0c2bf305eda04730f7f2db326a141
refs/heads/master
2022-12-24T18:14:07.724295
2020-06-15T08:30:49
2020-06-15T08:30:49
203,317,957
0
0
null
2022-12-15T23:58:26
2019-08-20T06:56:17
Java
UTF-8
Java
false
false
416
java
package ch18; /** * program: java-learn->CashRebate * description: 打折收费子类 * author: gerry * created: 2020-03-16 20:57 **/ public class CashRebate extends CashSuper { private double moneyRebate = 1d; public CashRebate(double moneyRebate) { this.moneyRebate = moneyRebate; } @Override public double acceptCash(double money) { return money * moneyRebate; } }
[ "blog@gerrywen.com" ]
blog@gerrywen.com
b3cf4279493a5d1f0d78b801b3edb9c6d02821f5
307eb242838781f17a5e9d2f4922ec3786ff408d
/smsn-server/src/main/java/net/fortytwo/smsn/server/actions/RootedViewAction.java
fcbfd6a5e487fb5be4e36271eb7f55e8eb094537
[ "MIT" ]
permissive
hoijui/smsn
29802f4c19fbbea5563df08d3cb3b09ba603e9cb
859c19fe4dbc5a10eedf59749417a0fe0f85636c
refs/heads/master
2020-04-24T08:55:12.495363
2019-02-21T09:54:41
2019-02-21T09:54:41
171,845,970
0
0
null
2019-02-21T09:55:36
2019-02-21T09:55:36
null
UTF-8
Java
false
false
827
java
package net.fortytwo.smsn.server.actions; import net.fortytwo.smsn.brain.model.entities.Atom; import net.fortytwo.smsn.server.ActionContext; import javax.validation.constraints.NotNull; public abstract class RootedViewAction extends BasicViewAction { @NotNull private String root; private Atom rootAtom; public Atom getRoot() { return notNull(rootAtom); } public void setRoot(String root) { // work around for a Brain-mode quirk if (null != root && root.equals("null")) root = null; this.root = root; } @Override protected void performTransaction(final ActionContext context) { super.performTransaction(context); setFilterParams(context); if (null != root) { rootAtom = getRoot(root, context); } } }
[ "josh@fortytwo.net" ]
josh@fortytwo.net
fb5e71a9eb64705b2578fc6ec88f4e40a8a3ac5a
e543a345b8d6c62720b8ff584eba53b833202711
/twinkle-baseplatform/twinkle-auth-server/src/main/java/com/twinkle/cloud/authserver/template/ClientServiceMyBatisTemplate.java
be40d195f06baad12fd618bcf2370186d479d215
[]
no_license
cxj110/twinkle-cloud
d565d573a644d1ce03f66c1926834ab5a07e533c
0c8a263ebebbc7b1c0e244cd10abd91e68cae0c6
refs/heads/master
2022-06-30T05:12:54.452003
2019-07-04T10:13:03
2019-07-04T10:13:03
137,180,030
0
1
null
2022-06-17T02:16:29
2018-06-13T07:37:47
Java
UTF-8
Java
false
false
633
java
package com.twinkle.cloud.authserver.template; import com.twinkle.cloud.authserver.data.domain.ClientService; import com.twinkle.cloud.authserver.mapper.ClientServiceMapper; import com.twinkle.cloud.common.mybatis.template.AbstractMapperTemplate; import org.springframework.stereotype.Service; /** * ClassName: ClientServiceMyBatisTemplate <br/> * Function: TODO ADD FUNCTION. <br/> * Reason: TODO ADD REASON. <br/> * Date: Sep 30, 2016 2:56:31 PM <br/> * * @author chenxj * @see * @since JDK 1.8 */ @Service public class ClientServiceMyBatisTemplate extends AbstractMapperTemplate<ClientServiceMapper, ClientService> { }
[ "xuejin.chen@gemii.cc" ]
xuejin.chen@gemii.cc
e46499a252f416d4dad1dcde3b15f8f43c60b3b8
b4f27e8f24929db51bef3656d3c2f573effa7884
/NetBeans/Ejemplos Antiguos/Diego/Servlet/EJB/Ejercicio1/src/ejercicio1/InfoLocalHome.java
b2d7d573c49cc9623d97c7b1a0c7147db6b8599c
[]
no_license
eugeniogarcia/netbeans
266d8c222299c107d0aace3d942efb653abe563e
c4a52a136150f9acfa481c7545b5b070a3409ab9
refs/heads/master
2021-07-08T13:39:09.156013
2019-06-22T09:59:14
2019-06-22T09:59:14
193,218,420
0
0
null
2020-10-13T14:07:00
2019-06-22T09:56:50
HTML
UTF-8
Java
false
false
198
java
package ejercicio1; import javax.ejb.CreateException; import javax.ejb.EJBLocalHome; public interface InfoLocalHome extends EJBLocalHome { InfoLocal create() throws CreateException; }
[ "egsmartin@gmail.com" ]
egsmartin@gmail.com
607cbb8daf417210f12695c4462ad1072981e518
cc0854fa6079f0e2632419af9b0191638c58b859
/app/src/main/java/com/dlwx/wisdomschool/activitys/MyRecordVideoListActivity.java
88a4ec848d4ef6664855989c6387dfad67c59528
[]
no_license
wch2219/wisdomschool
6c381b1ec95b829ce1743614dc7f56bb6a61ff80
a5be78c454dcb0acf2861bb1f27830469fe0ca7a
refs/heads/master
2021-09-06T17:55:16.684624
2018-02-09T09:21:30
2018-02-09T09:21:30
115,481,370
1
0
null
null
null
null
UTF-8
Java
false
false
2,807
java
package com.dlwx.wisdomschool.activitys; import android.content.Intent; import android.database.Cursor; import android.provider.MediaStore; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.AdapterView; import android.widget.GridView; import android.widget.TextView; import com.dlwx.baselib.base.BaseActivity; import com.dlwx.baselib.bean.Image; import com.dlwx.baselib.presenter.Presenter; import com.dlwx.wisdomschool.R; import com.dlwx.wisdomschool.adapter.AllVideoAdapter; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; public class MyRecordVideoListActivity extends BaseActivity implements AdapterView.OnItemClickListener { @BindView(R.id.tv_title) TextView tvTitle; @BindView(R.id.tool_bar) Toolbar toolBar; @BindView(R.id.gv_list) GridView gvList; private List<Image> filelist = new ArrayList<>(); @Override protected void initView() { setContentView(R.layout.activity_my_record_video_list); ButterKnife.bind(this); } @Override protected void initData() { initTabBar(toolBar); tvTitle.setText("视频列表"); Cursor cursor = getContentResolver().query( MediaStore.Video.Media.EXTERNAL_CONTENT_URI, null, null, null, null); while (cursor.moveToNext()) { Image image = new Image(); //路径 String path = cursor .getString(cursor .getColumnIndexOrThrow(MediaStore.Video.Media.DATA)); long aLong = cursor.getLong(cursor .getColumnIndexOrThrow(MediaStore.Video.Media.DATE_TAKEN)); long duration = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DURATION)); //获取图片的详细信息 String desc = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.DESCRIPTION)); image.setDate(aLong); image.setPath(path); image.setDuration(duration); filelist.add(image); } wch(filelist.size()); AllVideoAdapter allVideoAdapter = new AllVideoAdapter(ctx, filelist); gvList.setAdapter(allVideoAdapter); } @Override protected void initListener() { gvList.setOnItemClickListener(this); } @Override protected Presenter createPresenter() { return new Presenter(this); } @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { Image image = filelist.get(i); wch(image.getPath()); Intent intent = new Intent(); intent.putExtra("videofile", image.getPath()); setResult(1, intent); finish(); } }
[ "wangchonghui2219@126.com" ]
wangchonghui2219@126.com
18975a86b018e8286128c44e9411bb7a0945d7a8
60384d7047a01fb2794d4c9bf14072f2e57cad84
/app/src/main/java/com/btetop/activity/FeedBackActivity.java
fd697ef5da8ad49118b022d46e08c08fe99728d4
[ "MIT" ]
permissive
sophiemarceau/bte_Android
d88703209aa2a2d9f473938d9c6aadcad590a0f6
e950ca0bc5a7f6b6386af1e7614a5bf8d70cf66e
refs/heads/master
2020-08-27T11:03:35.250973
2019-10-25T02:05:14
2019-10-25T02:05:14
217,342,335
1
1
null
null
null
null
UTF-8
Java
false
false
6,347
java
package com.btetop.activity; import android.text.Editable; import android.text.InputFilter; import android.text.Spanned; import android.text.TextWatcher; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import com.btetop.R; import com.btetop.base.BaseActivity; import com.btetop.bean.BaseBean; import com.btetop.net.BteTopService; import com.btetop.utils.RxUtil; import com.btetop.utils.SPUtils; import com.btetop.utils.SoftInputUtil; import com.btetop.utils.ToastUtils; import java.util.regex.Matcher; import java.util.regex.Pattern; import rx.functions.Action1; public class FeedBackActivity extends BaseActivity implements View.OnClickListener { private EditText feedContent; private TextView contentAmount; private ImageView mBack; private TextView mSubmit; private int maxNum = 240; private String token; private String content; @Override public int intiLayout() { return R.layout.activity_feed_back; } @Override public void initView() { mImmersionBar.statusBarColor(R.color.base_color).statusBarDarkFont(true).init(); feedContent = findViewById(R.id.feed_content_ed); feedContent.setFilters(new InputFilter[]{inputFilter, new InputFilter.LengthFilter(240)}); feedContent.addTextChangedListener(new myTextWatcher()); contentAmount = findViewById(R.id.feed_account); mBack = findViewById(R.id.feed_fan_hui); mBack.setOnClickListener(this); mSubmit = findViewById(R.id.feed_submit); mSubmit.setOnClickListener(this); mSubmit.setEnabled(false); mSubmit.setClickable(false); } @Override public void initData() { } @Override public boolean statisticsActivity() { return true; } /** * 输入内容控制器 */ InputFilter inputFilter = new InputFilter() { Pattern pattern = Pattern.compile("[`~!@#$%^&*()+=|{}':;',\\\\[\\\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?^a-zA-Z0-9\\u4E00-\\u9FA5_]"); @Override public CharSequence filter(CharSequence charSequence, int i, int i1, Spanned spanned, int i2, int i3) { Matcher matcher = pattern.matcher(charSequence.toString().trim()); if (matcher.find()) { return null; } else { if (charSequence.equals("")) { return null; } else { return ""; } } } }; /** * 点击时间处理 * * @param v */ @Override public void onClick(View v) { switch (v.getId()) { case R.id.feed_fan_hui: SoftInputUtil.closeKeybord(feedContent, this); finish(); break; case R.id.feed_submit: SoftInputUtil.closeKeybord(feedContent, this); submitFeedContent(); break; } } /** * 提交意见反馈 */ private void submitFeedContent() { token = SPUtils.get("userToken", ""); content = feedContent.getText().toString(); if (null == content || "".equals(content)) { ToastUtils.showShortToast("请填写反馈意见"); return; } if (content.length() < 5) { ToastUtils.showShortToast("请输入不少于5个字的反馈描述"); return; } BteTopService.getFeedBack(content).compose(RxUtil.<BaseBean>mainAsync()) .subscribe(new Action1<BaseBean>() { @Override public void call(BaseBean bean) { if (null != bean && !"".equals(bean)) { String code = bean.getCode(); String message = bean.getMessage(); if (null != code && !"".equals(code)) { if ("0000".equals(code)) { ToastUtils.showShortToast("提交成功"); finish(); } else { if (null != message && !"".equals(message)) { ToastUtils.showShortToast(message); } } } else { if (null != message && !"".equals(message)) { ToastUtils.showShortToast(message); } } } else { ToastUtils.showShortToast("意见反馈提交失败了"); } } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { ToastUtils.showShortToast("意见反馈提交失败了"); } }); } class myTextWatcher implements TextWatcher { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void afterTextChanged(Editable s) { int count = s.toString().length(); contentAmount.setText(count + "/240"); if (count == 240) { ToastUtils.showShortToast("已到最大输入内容"); } if (count >= 5) { mSubmit.setBackground(getResources().getDrawable(R.drawable.bg_button_blue)); mSubmit.setTextColor(getResources().getColor(R.color.color_white)); mSubmit.setEnabled(true); mSubmit.setClickable(true); } else { mSubmit.setBackground(getResources().getDrawable(R.drawable.feed_button_gray_bg)); mSubmit.setTextColor(getResources().getColor(R.color.color_93A0B5)); mSubmit.setEnabled(false); mSubmit.setClickable(false); } } } }
[ "sophiemarceauqu@gmail.com" ]
sophiemarceauqu@gmail.com
3128612fe55a65678a99aad93e49303ed292edda
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/kotlinx/coroutines/C46847aq.java
b5a7c7e63686fd5e8096090c0a9cbfda5940e0cb
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,898
java
package kotlinx.coroutines; import com.tencent.matrix.trace.core.AppMethodBeat; import p000a.C0220l; import p000a.C37091y; import p000a.p005f.p007b.C25052j; @C0220l(dWo = {1, 1, 13}, dWp = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0013\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\bH–\u0002J\b\u0010\t\u001a\u00020\nH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X‚\u0004¢\u0006\u0002\n\u0000¨\u0006\u000b"}, dWq = {"Lkotlinx/coroutines/DisposeOnCancel;", "Lkotlinx/coroutines/CancelHandler;", "handle", "Lkotlinx/coroutines/DisposableHandle;", "(Lkotlinx/coroutines/DisposableHandle;)V", "invoke", "", "cause", "", "toString", "", "kotlinx-coroutines-core"}) /* renamed from: kotlinx.coroutines.aq */ final class C46847aq extends C25030g { private final C41155ap BQi; public C46847aq(C41155ap c41155ap) { C25052j.m39376p(c41155ap, "handle"); AppMethodBeat.m2504i(118370); this.BQi = c41155ap; AppMethodBeat.m2505o(118370); } /* renamed from: am */ public final /* synthetic */ Object mo50am(Object obj) { AppMethodBeat.m2504i(118368); mo41930v((Throwable) obj); C37091y c37091y = C37091y.AUy; AppMethodBeat.m2505o(118368); return c37091y; } /* renamed from: v */ public final void mo41930v(Throwable th) { AppMethodBeat.m2504i(118367); this.BQi.dispose(); AppMethodBeat.m2505o(118367); } public final String toString() { AppMethodBeat.m2504i(118369); String str = "DisposeOnCancel[" + this.BQi + ']'; AppMethodBeat.m2505o(118369); return str; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
84ec86b3103f33870875d7907c41c302b280a7d9
c99b0bd4513c401ec184c574af1f11991fa3fe56
/exam/src/p08/Lotto.java
5fba5693880fd1dd2ed9e1754b475aa7b5e6302b
[]
no_license
mhsong91/exam
28caa6d74dc661671797c1802d8d9fc1a06e217d
d72ed1433dcea2c3f95e78ad6028da52a58b1c3a
refs/heads/master
2021-05-11T08:45:30.342807
2018-01-19T01:51:40
2018-01-19T01:51:40
118,060,627
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package p08; import java.util.Random; public class Lotto { public static void main(String[] args) { Random r = new Random(); int[] num = new int[6]; for (int i = 0; i < 6; i++) { num[i] = r.nextInt(45) + 1; for (int j = 0; j < i; j++) { if (num[i] == num[j]) { num[i] = 0; i--; } } } for (int i = 0; i < 6; i++) { System.out.println(num[i]); } } }
[ "DJA@DJA-PC" ]
DJA@DJA-PC
48f5d39333b687a9112c2afb71d38660db3ea831
a5721d03524d9094f344bdc12746ca3b5579bc04
/hy-lyjc-industrial-operation-monitoring/src/main/java/net/cdsunrise/hy/lyjc/industrialoperationmonitoring/vo/DataResourceVO.java
f7c84e9101eb2aa282ca9a45c0e8b0952c9aed34
[]
no_license
yesewenrou/test
2aeaa0ea09842eeed2b0e589895b4f00319bf13b
992a70bed383f5574e4cc0db539dd764d984e5c6
refs/heads/master
2023-02-16T21:02:59.801518
2021-01-20T02:31:17
2021-01-20T02:31:17
327,574,246
0
0
null
null
null
null
UTF-8
Java
false
false
676
java
package net.cdsunrise.hy.lyjc.industrialoperationmonitoring.vo; import lombok.Data; import java.sql.Timestamp; /** * @author LHY * 用于分页搜索条件 */ @Data public class DataResourceVO { /**游客接待数**/ private Integer count; private String scenicName; private String countryName; private String provName; private String cityName; /**统计时间**/ private String statisticsTime; public DataResourceVO() { } public DataResourceVO(String scenicName, Integer count, String statisticsTime) { this.count = count; this.scenicName = scenicName; this.statisticsTime = statisticsTime; } }
[ "896586757@qq.com" ]
896586757@qq.com
162ccfea2ad4fcc56971449afe31fd6736c3c70c
9254e7279570ac8ef687c416a79bb472146e9b35
/sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/QueryHasDiagnosisShelltaskResponse.java
d4ac8be4e426b74340350d98ef86af4d3307df9b
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,161
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sofa20190815.models; import com.aliyun.tea.*; public class QueryHasDiagnosisShelltaskResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public QueryHasDiagnosisShelltaskResponseBody body; public static QueryHasDiagnosisShelltaskResponse build(java.util.Map<String, ?> map) throws Exception { QueryHasDiagnosisShelltaskResponse self = new QueryHasDiagnosisShelltaskResponse(); return TeaModel.build(map, self); } public QueryHasDiagnosisShelltaskResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public QueryHasDiagnosisShelltaskResponse setBody(QueryHasDiagnosisShelltaskResponseBody body) { this.body = body; return this; } public QueryHasDiagnosisShelltaskResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
9421a4f05d08bbb0e68d9301e7663cc5c36c9305
e1af7696101f8f9eb12c0791c211e27b4310ecbc
/MCP/temp/src/minecraft/net/minecraft/client/shader/ShaderLoader.java
40f3e1a7f75c770660a02d6698e275df872150ec
[]
no_license
VinmaniaTV/Mania-Client
e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce
7a12b8bad1a8199151b3f913581775f50cc4c39c
refs/heads/main
2023-02-12T10:31:29.076263
2021-01-13T02:29:35
2021-01-13T02:29:35
329,156,099
0
0
null
null
null
null
UTF-8
Java
false
false
4,248
java
package net.minecraft.client.shader; import com.google.common.collect.Maps; import java.io.BufferedInputStream; import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Map; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.resources.IResource; import net.minecraft.client.resources.IResourceManager; import net.minecraft.client.util.JsonException; import net.minecraft.util.ResourceLocation; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.lwjgl.BufferUtils; public class ShaderLoader { private final ShaderLoader.ShaderType field_148061_a; private final String field_148059_b; private final int field_148060_c; private int field_148058_d; private ShaderLoader(ShaderLoader.ShaderType p_i45091_1_, int p_i45091_2_, String p_i45091_3_) { this.field_148061_a = p_i45091_1_; this.field_148060_c = p_i45091_2_; this.field_148059_b = p_i45091_3_; } public void func_148056_a(ShaderManager p_148056_1_) { ++this.field_148058_d; OpenGlHelper.func_153178_b(p_148056_1_.func_147986_h(), this.field_148060_c); } public void func_148054_b(ShaderManager p_148054_1_) { --this.field_148058_d; if (this.field_148058_d <= 0) { OpenGlHelper.func_153180_a(this.field_148060_c); this.field_148061_a.func_148064_d().remove(this.field_148059_b); } } public String func_148055_a() { return this.field_148059_b; } public static ShaderLoader func_148057_a(IResourceManager p_148057_0_, ShaderLoader.ShaderType p_148057_1_, String p_148057_2_) throws IOException { ShaderLoader shaderloader = (ShaderLoader)p_148057_1_.func_148064_d().get(p_148057_2_); if (shaderloader == null) { ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + p_148057_2_ + p_148057_1_.func_148063_b()); IResource iresource = p_148057_0_.func_110536_a(resourcelocation); try { byte[] abyte = IOUtils.toByteArray(new BufferedInputStream(iresource.func_110527_b())); ByteBuffer bytebuffer = BufferUtils.createByteBuffer(abyte.length); bytebuffer.put(abyte); bytebuffer.position(0); int i = OpenGlHelper.func_153195_b(p_148057_1_.func_148065_c()); OpenGlHelper.func_153169_a(i, bytebuffer); OpenGlHelper.func_153170_c(i); if (OpenGlHelper.func_153157_c(i, OpenGlHelper.field_153208_p) == 0) { String s = StringUtils.trim(OpenGlHelper.func_153158_d(i, 32768)); JsonException jsonexception = new JsonException("Couldn't compile " + p_148057_1_.func_148062_a() + " program: " + s); jsonexception.func_151381_b(resourcelocation.func_110623_a()); throw jsonexception; } shaderloader = new ShaderLoader(p_148057_1_, i, p_148057_2_); p_148057_1_.func_148064_d().put(p_148057_2_, shaderloader); } finally { IOUtils.closeQuietly((Closeable)iresource); } } return shaderloader; } public static enum ShaderType { VERTEX("vertex", ".vsh", OpenGlHelper.field_153209_q), FRAGMENT("fragment", ".fsh", OpenGlHelper.field_153210_r); private final String field_148072_c; private final String field_148069_d; private final int field_148070_e; private final Map<String, ShaderLoader> field_148067_f = Maps.<String, ShaderLoader>newHashMap(); private ShaderType(String p_i45090_3_, String p_i45090_4_, int p_i45090_5_) { this.field_148072_c = p_i45090_3_; this.field_148069_d = p_i45090_4_; this.field_148070_e = p_i45090_5_; } public String func_148062_a() { return this.field_148072_c; } private String func_148063_b() { return this.field_148069_d; } private int func_148065_c() { return this.field_148070_e; } private Map<String, ShaderLoader> func_148064_d() { return this.field_148067_f; } } }
[ "vinmaniamc@gmail.com" ]
vinmaniamc@gmail.com
a27e009aeddda2b6514f0908a62f5b81d1b43b49
2b4124bf6175dc2aaca5ab77519f4e7f55279357
/door/src/main/java/com/dnk/smart/door/service/UnitService.java
7a74d9a432d500b69fd56718dbeb36ff19088b2b
[]
no_license
zhsyk34/smart
eba860e41d0f81d23a8113dc6ce56aa331677ca2
54821990190ffa1038a6aa189c287a0aa2517b53
refs/heads/master
2021-01-20T18:08:26.362265
2016-08-25T09:04:20
2016-08-25T09:04:20
65,285,292
0
0
null
null
null
null
UTF-8
Java
false
false
585
java
package com.dnk.smart.door.service; import com.dnk.smart.door.entity.Unit; import java.util.List; import java.util.Map; public interface UnitService { int save(Unit unit); int update(Unit unit); int delete(long[] ids); Unit find(long code); List<Unit> findList(Long buildId, String name, int pageNo, int pageSize); List<Map<String, Object>> findList(String build, String unit, int pageNo, int pageSize); int count(String build, String unit); boolean exist(long id, long code); boolean relate(long id); boolean relate(long[] ids); }
[ "zhsy1985@sina.com" ]
zhsy1985@sina.com
8c84efbb34c91ee62fc7bdbb23b0dd418968c65e
61799205deb604dafe5cef98e9f7520cecf6f269
/src/test/java/com/tvd12/reflections/testing/Collections2.java
5f54f5800421870658b198df9ed47b6d7f5fe665
[ "WTFPL" ]
permissive
tvd12/reflections
c9fd641bb56959780e6e2887c9a8d767c1f65255
f945140c5e6484da18ea084bedbe437fa96e0c6f
refs/heads/master
2022-07-27T00:48:27.482357
2022-07-10T16:31:05
2022-07-10T16:31:05
157,584,190
1
0
WTFPL
2022-07-10T16:31:05
2018-11-14T17:15:36
Java
UTF-8
Java
false
false
1,844
java
package com.tvd12.reflections.testing; import java.util.AbstractCollection; import java.util.Collection; import java.util.Iterator; import java.util.Spliterator; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; import com.tvd12.reflections.util.Iterators; public class Collections2 { public static <F, T> Collection<T> transform(Collection<F> fromCollection, Function<? super F, T> function) { return new TransformedCollection<>(fromCollection, function); } static boolean safeContains(Collection<?> collection, Object object) { try { return collection.contains(object); } catch (ClassCastException | NullPointerException e) { return false; } } static class TransformedCollection<F, T> extends AbstractCollection<T> { final Collection<F> fromCollection; final Function<? super F, ? extends T> function; TransformedCollection(Collection<F> fromCollection, Function<? super F, ? extends T> function) { this.fromCollection = fromCollection; this.function = function; } @Override public void clear() { fromCollection.clear(); } @Override public boolean isEmpty() { return fromCollection.isEmpty(); } @Override public Iterator<T> iterator() { return Iterators.transform(fromCollection.iterator(), function); } @Override public Spliterator<T> spliterator() { return TsCollectSpliterators.map(fromCollection.spliterator(), function); } @Override public void forEach(Consumer<? super T> action) { fromCollection.forEach((F f) -> action.accept(function.apply(f))); } @Override public boolean removeIf(Predicate<? super T> filter) { return fromCollection.removeIf(element -> filter.test(function.apply(element))); } @Override public int size() { return fromCollection.size(); } } }
[ "itprono3@gmail.com" ]
itprono3@gmail.com
a96119a4830b2c845aae22bb5ba4f45f57b78131
db77908c40c076bb713c1b00fd633457658964a3
/common/ifs-rest-api-service/src/main/java/org/innovateuk/ifs/publiccontent/service/ContentGroupRestServiceImpl.java
419dc16151c3f62d3d4bff6bbd01ee8a7f78f4da
[ "MIT" ]
permissive
InnovateUKGitHub/innovation-funding-service
e3807613fd3c398931918c6cc773d13874331cdc
964969b6dc9c78750738ef683076558cc897c1c8
refs/heads/development
2023-08-04T04:04:05.501037
2022-11-11T14:48:30
2022-11-11T14:48:30
87,336,871
30
20
MIT
2023-07-19T21:23:46
2017-04-05T17:20:38
Java
UTF-8
Java
false
false
2,032
java
package org.innovateuk.ifs.publiccontent.service; import org.innovateuk.ifs.commons.rest.RestResult; import org.innovateuk.ifs.commons.service.BaseRestService; import org.innovateuk.ifs.file.resource.FileEntryResource; import org.springframework.core.io.ByteArrayResource; import org.springframework.stereotype.Service; /** * Implementation for public content rest calls. */ @Service public class ContentGroupRestServiceImpl extends BaseRestService implements ContentGroupRestService { private static final String CONTENT_GROUP_REST_URL = "/content-group/"; @Override public RestResult<Void> uploadFile(Long groupId, String contentType, long contentLength, String originalFilename, byte[] file) { return postWithRestResult(CONTENT_GROUP_REST_URL + "upload-file?contentGroupId=" + groupId + "&filename=" + originalFilename, file, createFileUploadHeader(contentType, contentLength), Void.class); } @Override public RestResult<Void> removeFile(Long groupId) { return postWithRestResult(CONTENT_GROUP_REST_URL + "remove-file/" + groupId, Void.class); } @Override public RestResult<ByteArrayResource> getFile(Long contentGroupId) { return getWithRestResult(CONTENT_GROUP_REST_URL + "get-file-contents/" + contentGroupId, ByteArrayResource.class); } @Override public RestResult<FileEntryResource> getFileDetails(Long contentGroupId) { return getWithRestResult(CONTENT_GROUP_REST_URL + "get-file-details/" + contentGroupId, FileEntryResource.class); } @Override public RestResult<ByteArrayResource> getFileAnonymous(Long contentGroupId) { return getWithRestResultAnonymous(CONTENT_GROUP_REST_URL + "get-file-contents/" + contentGroupId, ByteArrayResource.class); } @Override public RestResult<FileEntryResource> getFileDetailsAnonymous(Long contentGroupId) { return getWithRestResultAnonymous(CONTENT_GROUP_REST_URL + "get-file-details/" + contentGroupId, FileEntryResource.class); } }
[ "markd@iuk.ukri.org" ]
markd@iuk.ukri.org
8c1a8f148cc5009ff65bbf2ead6a62e0d9371464
2651639b15dc315a91d7becbec53812cf03e9160
/src/vietj/intellij/asciidoc/file/AsciidocFileType.java
87f4c96337c2c176c0bcb14d06264c3351a2c265
[]
no_license
bleskes/idea-asciidoc
c5bb1c7a3dbd225745e1a11439955574712e17de
b021321d78ad66e6792b6b6d3c05e1d1f5a3f563
refs/heads/master
2020-07-11T00:51:45.152287
2013-07-24T13:41:45
2013-07-24T14:53:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,613
java
/* * Copyright 2013 Julien Viet * * 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 vietj.intellij.asciidoc.file; import com.intellij.openapi.fileTypes.LanguageFileType; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import vietj.intellij.asciidoc.AsciidocIcons; import vietj.intellij.asciidoc.AsciidocLanguage; import javax.swing.*; /** @author Julien Viet */ public class AsciidocFileType extends LanguageFileType { /** The {@link AsciidocFileType} instance. */ public static final AsciidocFileType INSTANCE = new AsciidocFileType(); /** . */ public static final String[] DEFAULT_ASSOCIATED_EXTENSIONS = {"asciidoc", "adoc", "ad"}; public AsciidocFileType() { super(new AsciidocLanguage()); } @NotNull public String getName() { return "Asciidoc"; } @NotNull public String getDescription() { return "The asciidoc language"; } @NotNull public String getDefaultExtension() { return DEFAULT_ASSOCIATED_EXTENSIONS[0]; } @Nullable public Icon getIcon() { return AsciidocIcons.ASCIIDOC_ICON; } }
[ "julien@julienviet.com" ]
julien@julienviet.com
f5cbaf979e74cbb36df0c6fb898bf70b80642bde
7c56c1a84fd207a00e70c784df0e79b837075837
/AlarmManagerExam/src/main/java/com/example/alarmmanagerexam/TimePickerFragment.java
e2e9a582091085cfa474fe101385443e57baa80d
[]
no_license
mingi502/android-first-book
00e3859bd1a5c561c38240c430df1d3c6fe5a73e
8e3f4ead202ab7b6b878749f9cc7ed0c279cdd83
refs/heads/master
2023-08-24T08:24:20.879357
2021-10-19T16:29:29
2021-10-19T16:29:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,037
java
package com.example.alarmmanagerexam; import android.app.AlarmManager; import android.app.Dialog; import android.app.PendingIntent; import android.app.TimePickerDialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.DialogFragment; import android.text.format.DateFormat; import android.widget.TimePicker; import java.util.Calendar; public class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener { private AlarmManager mAlarmManager; @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { // 알람 매니저 인스턴스 얻기 mAlarmManager = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE); // 현재 시간으로 타임 피커를 설정 final Calendar c = Calendar.getInstance(); int hour = c.get(Calendar.HOUR_OF_DAY); int minute = c.get(Calendar.MINUTE); // 타임 피커 다이얼로그를 현재 시간 설정으로 생성하고 반환 return new TimePickerDialog(getContext(), this, hour, minute, DateFormat.is24HourFormat(getContext())); } @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { // 설정된 시간 Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, hourOfDay); calendar.set(Calendar.MINUTE, minute); // 알람이 동작되면 MainActivity를 실행하도록 동작 정의 // 여기서 브로드캐스트나 서비스를 실행할 수도 있음 Intent intent = new Intent(getContext(), MainActivity.class); PendingIntent operation = PendingIntent.getActivity(getContext(), 0, intent, 0); // 설정된 시간에 기기가 슬립상태에서도 알람이 동작되도록 설정 mAlarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), operation); } }
[ "a811219@gmail.com" ]
a811219@gmail.com
6e675661b06ce9161acc0d7dc73fc33868f748bb
899d1c53f33378e3f6354bbc3b64f675b1bdfd4d
/Chapter5IOArrays/src/com/test/Test4.java
5a351a3587201ad09cb07ce082a611c9af6248b7
[]
no_license
coolshree4u/testpythonlantesting
f43ce058b1405e47174a6d85460345090adf81d2
e81ddcb342133bf59bd2a6157df12802da2730ed
refs/heads/master
2021-01-01T18:18:53.972321
2017-07-25T11:17:53
2017-07-25T11:17:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package com.test; import java.io.PrintStream; public class Test4 { public static void main(String[] args) { PrintStream pw=new PrintStream(System.out); pw.format("%2$d is bigger than %1$d", 10, 5); pw.close(); } }
[ "spatil1@parkar.consulting" ]
spatil1@parkar.consulting
f1d332df605b807fbb68510bb79c433769411550
3d05a2c234dba1bbb68fc3c43435cddd3752bd46
/src/main/java/com/atguigu/proxy/cglib/ProxyFactory.java
412ceb170f483a04b389b2430e9300bac95e7a06
[ "Apache-2.0" ]
permissive
junglegodlion/design_pattern
5f139b10f2496e0db5acc9c5db60dcad64616555
3b0100b79f0170dc18dce21fbb40a12fa4428c4b
refs/heads/master
2022-12-23T11:14:11.218111
2020-02-12T04:53:59
2020-02-12T04:53:59
239,928,124
0
0
Apache-2.0
2022-12-16T03:47:47
2020-02-12T04:38:23
Java
GB18030
Java
false
false
1,177
java
package com.atguigu.proxy.cglib; import java.lang.reflect.Method; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; import net.sf.cglib.proxy.MethodProxy; public class ProxyFactory implements MethodInterceptor { //维护一个目标对象 private Object target; //构造器,传入一个被代理的对象 public ProxyFactory(Object target) { this.target = target; } //返回一个代理对象: 是 target 对象的代理对象 public Object getProxyInstance() { //1. 创建一个工具类 Enhancer enhancer = new Enhancer(); //2. 设置父类 enhancer.setSuperclass(target.getClass()); //3. 设置回调函数 enhancer.setCallback(this); //4. 创建子类对象,即代理对象 return enhancer.create(); } //重写 intercept 方法,会调用目标对象的方法 @Override public Object intercept(Object arg0, Method method, Object[] args, MethodProxy arg3) throws Throwable { // TODO Auto-generated method stub System.out.println("Cglib代理模式 ~~ 开始"); Object returnVal = method.invoke(target, args); System.out.println("Cglib代理模式 ~~ 提交"); return returnVal; } }
[ "1037044430@qq.com" ]
1037044430@qq.com
380a8490adda9736ad83791397c3449e29dfcd9c
49db13f12b24ff7a38fe801a779111433a28e331
/Repair_all_124.232.137.136/src-kq/com/repair/kq/dao/AnomalouDao.java
67d7afd093171320f8442860ef2b5c1dd86e747b
[]
no_license
radtek/Repair_all_124.232.137.136
58c857fd4a52f455cb66f0f79ff938faf66320ea
c15a47bd29c456db6d846d7c2ba1d32748125a8e
refs/heads/master
2023-03-15T21:50:20.243948
2016-02-25T09:52:33
2016-02-25T09:52:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
512
java
package com.repair.kq.dao; import java.util.List; public interface AnomalouDao { /** * 查询早退出勤次数 * @param eachDateStr * @param proteamId * @param userName * @return */ List<Object> countAnomalousEarly(String month, String proteamId, String userName); /** * 查询迟到出勤次数 * @param eachDateStr * @param proteamId * @param userName * @return */ List<Object> countAnomalousLate(String month, String proteamId, String userName); }
[ "lookskystar@163.com" ]
lookskystar@163.com
4c9102fe3347944dfea17be635d7ec9d32510d49
225011bbc304c541f0170ef5b7ba09b967885e95
/cz/msebera/android/httpclient/impl/conn/DefaultProxyRoutePlanner.java
05d37ff400bfcf72daf6219803fefce969d04280
[]
no_license
sebaudracco/bubble
66536da5367f945ca3318fecc4a5f2e68c1df7ee
e282cda009dfc9422594b05c63e15f443ef093dc
refs/heads/master
2023-08-25T09:32:04.599322
2018-08-14T15:27:23
2018-08-14T15:27:23
140,444,001
1
1
null
null
null
null
UTF-8
Java
false
false
987
java
package cz.msebera.android.httpclient.impl.conn; import cz.msebera.android.httpclient.HttpException; import cz.msebera.android.httpclient.HttpHost; import cz.msebera.android.httpclient.HttpRequest; import cz.msebera.android.httpclient.annotation.Immutable; import cz.msebera.android.httpclient.conn.SchemePortResolver; import cz.msebera.android.httpclient.protocol.HttpContext; import cz.msebera.android.httpclient.util.Args; @Immutable public class DefaultProxyRoutePlanner extends DefaultRoutePlanner { private final HttpHost proxy; public DefaultProxyRoutePlanner(HttpHost proxy, SchemePortResolver schemePortResolver) { super(schemePortResolver); this.proxy = (HttpHost) Args.notNull(proxy, "Proxy host"); } public DefaultProxyRoutePlanner(HttpHost proxy) { this(proxy, null); } protected HttpHost determineProxy(HttpHost target, HttpRequest request, HttpContext context) throws HttpException { return this.proxy; } }
[ "sebaudracco@gmail.com" ]
sebaudracco@gmail.com
b9b36c0f6d0984a9255e28d91c4d80c669838037
4d2968fc6a5d7c13ce1912aac1b1d2b2f6011194
/IOT-Guide-RuleEngine-Introduce/src/main/java/iot/technology/ruleengine/introduce/actions/WindowsPhone.java
c40a277ff0bb8857ee52f61c574dbf99d398ff0a
[ "Apache-2.0" ]
permissive
GYW/IOT-Technical-Guide
833c408e2d8b5b52960d03abb041872721b47c21
787314d5b6aafd0179e9bc7f5ab39a34dfff9972
refs/heads/master
2023-05-08T23:40:01.945867
2022-02-08T14:17:05
2022-02-08T14:17:05
290,918,694
0
0
Apache-2.0
2020-08-28T01:13:48
2020-08-28T01:13:47
null
UTF-8
Java
false
false
584
java
package iot.technology.ruleengine.introduce.actions; import iot.technology.ruleengine.introduce.RuleI; import iot.technology.ruleengine.introduce.model.OSType; import iot.technology.ruleengine.introduce.model.Phone; /** * @author jamesmsw * @date 2021/1/26 10:20 上午 */ public class WindowsPhone implements RuleI<Phone, Phone> { @Override public boolean matches(Phone input) { return input.getOsType().equals(OSType.WINDOWS); } @Override public Phone process(Phone input) { input.setModel("诺基亚 1100"); return input; } }
[ "lovewsic@gmail.com" ]
lovewsic@gmail.com
c8fb70a27831aed4e015c5e7f0c8b7608975ca1f
32cd70512c7a661aeefee440586339211fbc9efd
/aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/transform/GetHealthCheckLastFailureReasonRequestMarshaller.java
d910837e8fa8030ec822bf96b8bb792f596f51ac
[ "Apache-2.0" ]
permissive
twigkit/aws-sdk-java
7409d949ce0b0fbd061e787a5b39a93db7247d3d
0b8dd8cf5e52ad7ae57acd2ce7a584fd83a998be
refs/heads/master
2020-04-03T16:40:16.625651
2018-05-04T12:05:14
2018-05-04T12:05:14
60,255,938
0
1
Apache-2.0
2018-05-04T12:48:26
2016-06-02T10:40:53
Java
UTF-8
Java
false
false
2,876
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights * Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.route53.model.transform; import static com.amazonaws.util.StringUtils.UTF8; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.List; import java.util.Map; import com.amazonaws.AmazonClientException; import com.amazonaws.Request; import com.amazonaws.DefaultRequest; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.route53.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.BinaryUtils; import com.amazonaws.util.StringInputStream; import com.amazonaws.util.StringUtils; import com.amazonaws.util.IdempotentUtils; import com.amazonaws.util.XMLWriter; import com.amazonaws.util.SdkHttpUtils; /** * GetHealthCheckLastFailureReasonRequest Marshaller */ public class GetHealthCheckLastFailureReasonRequestMarshaller implements Marshaller<Request<GetHealthCheckLastFailureReasonRequest>, GetHealthCheckLastFailureReasonRequest> { public Request<GetHealthCheckLastFailureReasonRequest> marshall( GetHealthCheckLastFailureReasonRequest getHealthCheckLastFailureReasonRequest) { if (getHealthCheckLastFailureReasonRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(...)"); } Request<GetHealthCheckLastFailureReasonRequest> request = new DefaultRequest<GetHealthCheckLastFailureReasonRequest>( getHealthCheckLastFailureReasonRequest, "AmazonRoute53"); request.setHttpMethod(HttpMethodName.GET); String uriResourcePath = "/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"; uriResourcePath = uriResourcePath .replace( "{HealthCheckId}", (getHealthCheckLastFailureReasonRequest .getHealthCheckId() != null) ? SdkHttpUtils.urlEncode( StringUtils .fromString(getHealthCheckLastFailureReasonRequest .getHealthCheckId()), false) : ""); request.setResourcePath(uriResourcePath); return request; } }
[ "aws@amazon.com" ]
aws@amazon.com
8550bf0236a4f9e8cba26d0ef4d778cc452e04f7
af606a04ed291e8c9b1e500739106a926e205ee2
/aliyun-java-sdk-savingplan/src/main/java/com/aliyuncs/savingplan/transform/v20200715/QuerySavingPlanInstanceInnerResponseUnmarshaller.java
2ce26c3c41af072aafbe39acbb1ce86ba380c659
[ "Apache-2.0" ]
permissive
xtlGitHub/aliyun-openapi-java-sdk
a733f0a16c8cc493cc28062751290f563ab73ace
f60c71de2c9277932b6549c79631b0f03b11cc36
refs/heads/master
2023-09-03T13:56:50.071024
2021-11-10T11:53:25
2021-11-10T11:53:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,360
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.savingplan.transform.v20200715; import java.util.ArrayList; import java.util.List; import com.aliyuncs.savingplan.model.v20200715.QuerySavingPlanInstanceInnerResponse; import com.aliyuncs.savingplan.model.v20200715.QuerySavingPlanInstanceInnerResponse.Code; import com.aliyuncs.savingplan.model.v20200715.QuerySavingPlanInstanceInnerResponse.Code.SpnInstanceDetailDTO; import com.aliyuncs.transform.UnmarshallerContext; public class QuerySavingPlanInstanceInnerResponseUnmarshaller { public static QuerySavingPlanInstanceInnerResponse unmarshall(QuerySavingPlanInstanceInnerResponse querySavingPlanInstanceInnerResponse, UnmarshallerContext _ctx) { querySavingPlanInstanceInnerResponse.setRequestId(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.RequestId")); querySavingPlanInstanceInnerResponse.setMessage(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Message")); querySavingPlanInstanceInnerResponse.setData(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Data")); querySavingPlanInstanceInnerResponse.setSuccess(_ctx.booleanValue("QuerySavingPlanInstanceInnerResponse.Success")); Code code = new Code(); code.setTotalCount(_ctx.integerValue("QuerySavingPlanInstanceInnerResponse.Code.TotalCount")); code.setPageSize(_ctx.integerValue("QuerySavingPlanInstanceInnerResponse.Code.PageSize")); code.setCurrentPage(_ctx.integerValue("QuerySavingPlanInstanceInnerResponse.Code.CurrentPage")); List<SpnInstanceDetailDTO> datas = new ArrayList<SpnInstanceDetailDTO>(); for (int i = 0; i < _ctx.lengthValue("QuerySavingPlanInstanceInnerResponse.Code.Datas.Length"); i++) { SpnInstanceDetailDTO spnInstanceDetailDTO = new SpnInstanceDetailDTO(); spnInstanceDetailDTO.setSpnInstanceId(_ctx.longValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].SpnInstanceId")); spnInstanceDetailDTO.setSpnInstanceCode(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].SpnInstanceCode")); spnInstanceDetailDTO.setPayMode(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].PayMode")); spnInstanceDetailDTO.setSpnType(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].SpnType")); spnInstanceDetailDTO.setInstanceFamily(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].InstanceFamily")); spnInstanceDetailDTO.setRegion(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].Region")); spnInstanceDetailDTO.setCycle(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].Cycle")); spnInstanceDetailDTO.setStartTime(_ctx.longValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].StartTime")); spnInstanceDetailDTO.setEndTime(_ctx.longValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].EndTime")); spnInstanceDetailDTO.setPoolValue(_ctx.floatValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].PoolValue")); spnInstanceDetailDTO.setUserId(_ctx.longValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].UserId")); spnInstanceDetailDTO.setSite(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].Site")); spnInstanceDetailDTO.setCurrency(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].Currency")); spnInstanceDetailDTO.setCommodityCode(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].CommodityCode")); spnInstanceDetailDTO.setStatus(_ctx.stringValue("QuerySavingPlanInstanceInnerResponse.Code.Datas["+ i +"].Status")); datas.add(spnInstanceDetailDTO); } code.setDatas(datas); querySavingPlanInstanceInnerResponse.setCode(code); return querySavingPlanInstanceInnerResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
3324d6b09b59097b6379987cd8b21b05db41a3ca
980c88e75dabfdd26ecbaa3229b17e22b7728799
/src/main/java/com/bdlz/LP/ReverseNum.java
5c34d25254124d44f9cff6293655c687dc4ad50a
[]
no_license
ramakrishnavelisetti/Logical-Problems
7e6e5233b2a15b8c5e42f85e7d7a59202455527d
3047c7a36622f5e448724b3a4a15f574dd2f356e
refs/heads/master
2023-07-16T01:15:02.179796
2021-09-02T18:05:06
2021-09-02T18:05:06
402,512,830
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
package com.bdlz.LP; import java.util.Scanner; public class ReverseNum { public static void main(String[] args) { int remainder, reverse = 0; System.out.println("Enter the number"); Scanner sc = new Scanner(System.in); int num = sc.nextInt(); sc.close(); while (num != 0) { remainder = num % 10; reverse = reverse * 10 + remainder; num = num / 10; } System.out.println(reverse); } }
[ "ramakrishna96.velisetti@gmail.com" ]
ramakrishna96.velisetti@gmail.com
91a1f7d82cdc0403062ce474bdea18c1c05f7092
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_3/src/f/c/j/Calc_1_3_5291.java
5e4a4cfe3438c2c9f7083fd976943ea20e7c2759
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package f.c.j; public class Calc_1_3_5291 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
b22fc8e5f32141a9d85de6b346d1355670e26992
14fec7d48aa2bd28ecbeb87e4e1d8aeb23e20635
/src/main/java/com/mht/controller/GoodsClassController.java
264113a02dca1c258ef2716d1e2213f9a678adb6
[]
no_license
haoqiunie/api1
352a2d75ee77b98ff09f7e5a43bfc4f6cab98294
37bf9c55edda5e9b7a70a85f0851472dd8306280
refs/heads/master
2022-06-27T18:22:03.203863
2019-08-12T03:02:11
2019-08-12T03:02:11
201,601,048
0
0
null
2022-06-17T02:25:39
2019-08-10T08:17:18
Java
UTF-8
Java
false
false
329
java
package com.mht.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * <p> * 前端控制器 * </p> * * @author jobob * @since 2019-07-29 */ @RestController @RequestMapping("/goods-class") public class GoodsClassController { }
[ "1778715299@qq.com" ]
1778715299@qq.com
3f584f132312c9e089fb0c46f88cf0fee0c352ac
37515a0a63e3e6e62ba5104567201d2f14360f13
/com.fudanmed.platform.core/src/main/java/com/fudanmed/platform/core/entityextension/proxy/RCCompositeTypeProxy.java
122b35a920c5281ebafb1a857e1384903986a80b
[]
no_license
rockguo2015/newmed
9d95e161ba7cb9c59b24c4fb0bec2eb328214831
b4818912e5bbc6e0147d47e8ba475c0ac5c80c2e
refs/heads/master
2021-01-10T05:16:25.491087
2015-05-29T10:03:23
2015-05-29T10:03:23
36,384,873
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package com.fudanmed.platform.core.entityextension.proxy; import com.fudanmed.platform.core.entityextension.proxy.RCTypeProxy; import edu.fudan.mylang.pf.ProxyTarget; @ProxyTarget("com.fudanmed.platform.core.entityextension.RCCompositeType") public class RCCompositeTypeProxy extends RCTypeProxy { public RCCompositeTypeProxy() { this.setClazzName("com.fudanmed.platform.core.entityextension.RCCompositeType"); } }
[ "rock.guo@me.com" ]
rock.guo@me.com
bd884af479d78f34c1f23e61b23f96329732da76
776f7a8bbd6aac23678aa99b72c14e8dd332e146
/src/com/fasterxml/jackson/databind/module/SimpleAbstractTypeResolver.java
bb34de4fa02b02ed847bbec02ce8636588e15930
[]
no_license
arvinthrak/com.nianticlabs.pokemongo
aea656acdc6aa419904f02b7331f431e9a8bba39
bcf8617bafd27e64f165e107fdc820d85bedbc3a
refs/heads/master
2020-05-17T15:14:22.431395
2016-07-21T03:36:14
2016-07-21T03:36:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,114
java
package com.fasterxml.jackson.databind.module; import com.fasterxml.jackson.databind.AbstractTypeResolver; import com.fasterxml.jackson.databind.DeserializationConfig; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.type.ClassKey; import com.fasterxml.jackson.databind.type.TypeFactory; import java.io.Serializable; import java.lang.reflect.Modifier; import java.util.HashMap; public class SimpleAbstractTypeResolver extends AbstractTypeResolver implements Serializable { private static final long serialVersionUID = 8635483102371490919L; protected final HashMap<ClassKey, Class<?>> _mappings = new HashMap(); public <T> SimpleAbstractTypeResolver addMapping(Class<T> paramClass, Class<? extends T> paramClass1) { if (paramClass == paramClass1) { throw new IllegalArgumentException("Can not add mapping from class to itself"); } if (!paramClass.isAssignableFrom(paramClass1)) { throw new IllegalArgumentException("Can not add mapping from class " + paramClass.getName() + " to " + paramClass1.getName() + ", as latter is not a subtype of former"); } if (!Modifier.isAbstract(paramClass.getModifiers())) { throw new IllegalArgumentException("Can not add mapping from class " + paramClass.getName() + " since it is not abstract"); } _mappings.put(new ClassKey(paramClass), paramClass1); return this; } public JavaType findTypeMapping(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType) { Class localClass = paramJavaType.getRawClass(); localClass = (Class)_mappings.get(new ClassKey(localClass)); if (localClass == null) { return null; } return paramDeserializationConfig.getTypeFactory().constructSpecializedType(paramJavaType, localClass); } public JavaType resolveAbstractType(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType) { return null; } } /* Location: * Qualified Name: com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
884293286672a2d1421d6ad48437472b827e49ed
52859037cc0a9f2cb55c79616199de2097adda25
/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToStringConverter.java
f4a62386414c8c15bafae6fbe72345e431cf5b53
[]
no_license
diqichengshi/zhao_framework
5b01823a05b48d7b5803f66d1905af1e2967facb
52179d116996d5dcac13032bffa04b20bfd30ead
refs/heads/master
2022-12-24T12:27:04.681694
2019-12-30T09:47:00
2019-12-30T09:47:00
216,310,405
0
0
null
2022-12-14T20:30:35
2019-10-20T05:06:14
Java
UTF-8
Java
false
false
2,541
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.springframework.core.convert.support; import java.util.Collection; import java.util.Collections; import java.util.Set; import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.converter.ConditionalGenericConverter; /** * Converts a Collection to a comma-delimited String. * * @author Keith Donald * @since 3.0 */ final class CollectionToStringConverter implements ConditionalGenericConverter { private static final String DELIMITER = ","; private final ConversionService conversionService; public CollectionToStringConverter(ConversionService conversionService) { this.conversionService = conversionService; } @Override public Set<ConvertiblePair> getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Collection.class, String.class)); } @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements(sourceType.getElementTypeDescriptor(), targetType, this.conversionService); } @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; if (sourceCollection.size() == 0) { return ""; } StringBuilder sb = new StringBuilder(); int i = 0; for (Object sourceElement : sourceCollection) { if (i > 0) { sb.append(DELIMITER); } Object targetElement = this.conversionService.convert(sourceElement, sourceType.elementTypeDescriptor(sourceElement), targetType); sb.append(targetElement); i++; } return sb.toString(); } }
[ "1209829998@qq.com" ]
1209829998@qq.com
fe3d9ede582741120f687af787900905a7140463
0b90c8d863f81cac34e9ec84037e8c441cae94aa
/spring-boot-shiro-dynamic-permission-sample/src/main/java/com/example/springboot/shiro/mapper/UserMapper.java
33d1e9955d9d42f3619e21e1c00b7097cb3728a7
[ "Apache-2.0" ]
permissive
yiminyangguang520/shiro-sample
754a4ab15fab06533be6cce4640cfddb8571a6d7
2309424461d213764c84a39454d1397cf1e97015
refs/heads/master
2022-12-28T00:58:36.645575
2020-04-17T00:59:17
2020-04-17T00:59:52
140,244,097
1
1
Apache-2.0
2022-11-24T10:17:58
2018-07-09T06:58:54
Java
UTF-8
Java
false
false
360
java
package com.example.springboot.shiro.mapper; import com.example.springboot.shiro.entity.User; import java.util.List; import org.springframework.stereotype.Repository; /** * @author min */ @Repository public interface UserMapper { User findUserByUserName(String username); List<User> findAllUsers(); List<User> findUsersByRoleId(Integer roleId); }
[ "litz-a@glodon.com" ]
litz-a@glodon.com
3e5fa2e900f2a90effb77c928672d1541ab236bb
d105e39161ffabc46d529abf7184a5e383cddbfb
/outbox/order-service/src/main/java/io/debezium/examples/outbox/order/model/EntityNotFoundException.java
ad9b2ce0e6d373292834ced111602544b5633ea9
[ "Apache-2.0" ]
permissive
debezium/debezium-examples
d4758b0bcaa95a6415a10b8901634a726792c69e
c84eb5a852ab48e695a2fad4a3b8ad932ea70dc1
refs/heads/main
2023-09-03T15:12:45.198421
2023-08-10T14:01:23
2023-08-10T14:01:23
98,498,455
1,316
859
Apache-2.0
2023-09-14T13:15:07
2017-07-27T05:48:19
JavaScript
UTF-8
Java
false
false
480
java
/* * Copyright Debezium Authors. * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package io.debezium.examples.outbox.order.model; /** * An exception that indicates an entity could not be found. */ public class EntityNotFoundException extends RuntimeException { private static final long serialVersionUID = -1L; public EntityNotFoundException(String message) { super(message); } }
[ "gunnar.morling@googlemail.com" ]
gunnar.morling@googlemail.com
ff704f9f86ef51d82c01492850c26ce4e621ec37
55b93ddeb025281f1e5bdfa165cb5074ec622544
/graphsdk/src/main/java/com/microsoft/graph/generated/BaseReportRootGetOneDriveUsageStorageRequestBuilder.java
9909649aa7bbf972ee764274137ad30a3e9cb26a
[ "MIT" ]
permissive
Glennmen/msgraph-sdk-android
7c13e8367fb6cb7bb9a655860a4c14036601296b
cb774abbaa1abde0c63229a70256b3d97f212a3e
refs/heads/master
2020-03-30T15:56:29.622277
2018-10-03T09:07:00
2018-10-03T09:07:00
151,386,422
1
0
NOASSERTION
2018-10-03T09:03:00
2018-10-03T09:02:59
null
UTF-8
Java
false
false
2,519
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.generated; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.extensions.*; import com.microsoft.graph.http.*; import com.microsoft.graph.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.EnumSet; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The class for the Base Report Root Get One Drive Usage Storage Request Builder. */ public class BaseReportRootGetOneDriveUsageStorageRequestBuilder extends BaseFunctionRequestBuilder { /** * The request builder for this ReportRootGetOneDriveUsageStorage * * @param requestUrl The request url * @param client The service client * @param requestOptions The options for this request */ public BaseReportRootGetOneDriveUsageStorageRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<Option> requestOptions, final String period) { super(requestUrl, client, requestOptions); mFunctionOptions.add(new FunctionOption("period", period)); } /** * Creates the IReportRootGetOneDriveUsageStorageRequest * * @return The IReportRootGetOneDriveUsageStorageRequest instance */ public IReportRootGetOneDriveUsageStorageRequest buildRequest() { return buildRequest(getOptions()); } /** * Creates the IReportRootGetOneDriveUsageStorageRequest with specific requestOptions instead of the existing requestOptions * * @param requestOptions the options for the request * @return The IReportRootGetOneDriveUsageStorageRequest instance */ public IReportRootGetOneDriveUsageStorageRequest buildRequest(final java.util.List<Option> requestOptions) { ReportRootGetOneDriveUsageStorageRequest request = new ReportRootGetOneDriveUsageStorageRequest( getRequestUrl(), getClient(), requestOptions ); for (FunctionOption option : mFunctionOptions) { request.addFunctionOption(option); } return request; } }
[ "caitbal@microsoft.com" ]
caitbal@microsoft.com
331be1c3acdddcd837cbf6b3a493b4d12b04d360
610ae0a8be6b9e0a8371dcbbc20f76896b53d3e3
/src/main/java/com/tencent/ads/model/OrderByStruct.java
4693d009cc458afdcaf66adbcb3de6f961365ee3
[ "Apache-2.0" ]
permissive
TencentAd/marketing-api-java-sdk
d106c6e4cd6e47857a0c63f23fd95e97a34666f3
f9c7e5d06202e05f8f7317e5bf69b61080829de9
refs/heads/master
2023-07-23T10:01:28.748383
2023-07-13T03:07:34
2023-07-13T03:07:34
266,974,939
31
14
Apache-2.0
2022-05-20T21:54:42
2020-05-26T07:32:11
Java
UTF-8
Java
false
false
2,221
java
/* * Marketing API * Marketing API * * OpenAPI spec version: 1.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.tencent.ads.model; import com.google.gson.Gson; import com.google.gson.annotations.SerializedName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Objects; /** 排序字段结构 */ @ApiModel(description = "排序字段结构") public class OrderByStruct { @SerializedName("sort_field") private String sortField = null; @SerializedName("sort_type") private Sortord sortType = null; public OrderByStruct sortField(String sortField) { this.sortField = sortField; return this; } /** * Get sortField * * @return sortField */ @ApiModelProperty(value = "") public String getSortField() { return sortField; } public void setSortField(String sortField) { this.sortField = sortField; } public OrderByStruct sortType(Sortord sortType) { this.sortType = sortType; return this; } /** * Get sortType * * @return sortType */ @ApiModelProperty(value = "") public Sortord getSortType() { return sortType; } public void setSortType(Sortord sortType) { this.sortType = sortType; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderByStruct orderByStruct = (OrderByStruct) o; return Objects.equals(this.sortField, orderByStruct.sortField) && Objects.equals(this.sortType, orderByStruct.sortType); } @Override public int hashCode() { return Objects.hash(sortField, sortType); } @Override public String toString() { Gson gson = new Gson(); return gson.toJson(this); } /** * Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "dennyqian@tencent.com" ]
dennyqian@tencent.com
cfa7964a47c36c2eca02f91cfe5bb4fd978b9864
51fa3cc281eee60058563920c3c9059e8a142e66
/Java/src/testcases/CWE400_Resource_Exhaustion/s02/CWE400_Resource_Exhaustion__listen_tcp_write_81_goodB2G.java
d075cdbef7f2d6ecf635d2452babbcc8a6d22ae9
[]
no_license
CU-0xff/CWE-Juliet-TestSuite-Java
0b4846d6b283d91214fed2ab96dd78e0b68c945c
f616822e8cb65e4e5a321529aa28b79451702d30
refs/heads/master
2020-09-14T10:41:33.545462
2019-11-21T07:34:54
2019-11-21T07:34:54
223,105,798
1
4
null
null
null
null
UTF-8
Java
false
false
3,004
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE400_Resource_Exhaustion__listen_tcp_write_81_goodB2G.java Label Definition File: CWE400_Resource_Exhaustion.label.xml Template File: sources-sinks-81_goodB2G.tmpl.java */ /* * @description * CWE: 400 Resource Exhaustion * BadSource: listen_tcp Read count using a listening tcp connection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: write * GoodSink: Write to a file count number of times, but first validate count * BadSink : Write to a file count number of times * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ package testcases.CWE400_Resource_Exhaustion.s02; import testcasesupport.*; import javax.servlet.http.*; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.BufferedWriter; import java.io.IOException; import java.util.logging.Level; public class CWE400_Resource_Exhaustion__listen_tcp_write_81_goodB2G extends CWE400_Resource_Exhaustion__listen_tcp_write_81_base { public void action(int count ) throws Throwable { /* FIX: Validate count before using it as the for loop variant to write to a file */ if (count > 0 && count <= 20) { File file = new File("goodSink.txt"); FileOutputStream streamFileOutput = new FileOutputStream(file); OutputStreamWriter writerOutputStream = new OutputStreamWriter(streamFileOutput, "UTF-8"); BufferedWriter writerBuffered = new BufferedWriter(writerOutputStream); int i; for (i = 0; i < count; i++) { try { writerBuffered.write("Hello"); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream writing", exceptIO); } } /* Close stream reading objects */ try { if (writerBuffered != null) { writerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedWriter", exceptIO); } try { if (writerOutputStream != null) { writerOutputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing OutputStreamWriter", exceptIO); } try { if (streamFileOutput != null) { streamFileOutput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileOutputStream", exceptIO); } } } }
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
ab68d19f4a790a7699c95ce224edc8f1da468e10
92e7a62c54bcf24de97b5d4c1bb15b99f775bed2
/OpenConcerto/src/org/openconcerto/sql/ui/IPolyCombo.java
cbb988c58e6d76e6d6d033e3ce333c3a314cf7b5
[]
no_license
trespe/openconcerto
4a9c294006187987f64dbf936f167d666e6c5d52
6ccd5a7b56cd75350877842998c94434083fb62f
refs/heads/master
2021-01-13T02:06:29.609413
2015-04-10T08:35:31
2015-04-10T08:35:31
33,717,537
3
0
null
null
null
null
UTF-8
Java
false
false
8,119
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved. * * The contents of this file are subject to the terms of the GNU General Public License Version 3 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html 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. */ package org.openconcerto.sql.ui; import org.openconcerto.sql.Configuration; import org.openconcerto.sql.element.SQLElement; import org.openconcerto.sql.model.DBRoot; import org.openconcerto.sql.model.PolymorphFK; import org.openconcerto.sql.model.SQLField; import org.openconcerto.sql.model.SQLRow; import org.openconcerto.sql.request.SQLRowItemView; import org.openconcerto.sql.sqlobject.ElementComboBox; import org.openconcerto.sql.sqlobject.SQLRequestComboBox; import org.openconcerto.sql.sqlobject.itemview.RowItemViewComponent; import org.openconcerto.utils.checks.MutableValueObject; import org.openconcerto.utils.model.ListComboBoxModel; import java.awt.Component; import java.awt.GridLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.MutableComboBoxModel; import javax.swing.plaf.basic.BasicComboBoxRenderer; /** * A class to edit a PolymorphFK. * * @author Sylvain CUAZ */ public class IPolyCombo extends JPanel implements MutableValueObject<SQLRow>, RowItemViewComponent { /** * Creates a new instance from a list of tablenames using the default Configuration to find the * SQLElement. * * @param root the context from which <code>tables</code> are found. * @param tables a list of tablenames, comma separated with no spaces, eg "RECEPTEUR,SOURCE". * @return the corresponding IPolyCombo. */ public static final IPolyCombo create(DBRoot root, String tables) { final List<String> tablesL = SQLRow.toList(tables); final List<SQLElement> elements = new ArrayList<SQLElement>(tablesL.size()); for (final String tableName : tablesL) { elements.add(Configuration.getInstance().getDirectory().getElement(root.getTableDesc(tableName))); } return new IPolyCombo(elements); } private PolymorphFK field; private final PropertyChangeSupport supp; private final JComboBox tableCombo; // <SQLElement, TableRowCombo> private final Map<SQLElement, ElementComboBox> idCombos; // <String, SQLElement> // necessary when reading the table name from DB to find the corresponding element private final Map<String, SQLElement> name2elem; /** * Creates a IPolyCombo to edit the passed list of SQLElement. No 2 elements can share the same * SQLTable. * * @param elements a list of SQLElement. */ public IPolyCombo(final List<SQLElement> elements) { this.supp = new PropertyChangeSupport(this); this.idCombos = new HashMap<SQLElement, ElementComboBox>(); this.name2elem = new HashMap<String, SQLElement>(); for (final SQLElement element : elements) { final ElementComboBox c = new ElementComboBox(); c.addValueListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { fireValueChange(); } }); this.idCombos.put(element, c); this.name2elem.put(element.getTable().getName(), element); } if (this.name2elem.size() != this.idCombos.size()) throw new IllegalArgumentException("size mismatch: " + this.idCombos.keySet() + " / " + this.name2elem.keySet()); this.tableCombo = new JComboBox(new ListComboBoxModel(elements)); // put the empty element at the top ((MutableComboBoxModel) this.tableCombo.getModel()).insertElementAt(null, 0); this.tableCombo.setRenderer(new BasicComboBoxRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { final JLabel c = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); final SQLElement element = (SQLElement) value; c.setText(element == null ? SQLRequestComboBox.UNDEFINED_STRING : element.getSingularName()); return c; } }); // each time we change the table combo, we must change the second combo. this.tableCombo.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { updateIdCombo(); } }); } protected final void fireValueChange() { this.supp.firePropertyChange("value", null, this.getValue()); } protected void updateIdCombo() { if (this.getComponentCount() > 1) this.remove(1); if (this.getIdCombo() != null) this.add(this.getIdCombo()); this.revalidate(); this.fireValueChange(); } /** * The currently selected SQLElement, eg a RecepteurElement. * * @return the selected SQLElement or <code>null</code>. */ private final SQLElement getSelectedElement() { return (SQLElement) this.tableCombo.getSelectedItem(); } /** * The combo needed to edit the selected element. * * @return a TableRowCombo containing rows of the selected element or <code>null</code>. */ private final ElementComboBox getIdCombo() { return this.idCombos.get(this.getSelectedElement()); } public void init(SQLRowItemView v) { final SQLField f = v.getField(); this.field = new PolymorphFK(f.getTable(), PolymorphFK.tableField2propName(f)); this.setLayout(new GridLayout(1, 2)); this.add(this.tableCombo); // no need to add idCombo it's done by updateIdCombo() for (final SQLElement element : this.idCombos.keySet()) { final ElementComboBox c = this.idCombos.get(element); c.init(element); } this.resetValue(); } public final void resetValue() { this.setValue(null); } public void setValue(SQLRow foreignRow) { final String tableName = foreignRow == null ? null : foreignRow.getTable().getName(); this.tableCombo.setSelectedItem(this.name2elem.get(tableName)); if (this.getIdCombo() != null) this.getIdCombo().setValue(foreignRow.getID()); } public SQLRow getValue() { if (this.getIdCombo() == null) return null; else return this.getIdCombo().getSelectedRow(); } public void addValueListener(PropertyChangeListener l) { this.supp.addPropertyChangeListener(l); } public void rmValueListener(PropertyChangeListener l) { this.supp.removePropertyChangeListener(l); } public final PolymorphFK getPolymorphFK() { return this.field; } public void setEnabled(boolean b) { this.tableCombo.setEnabled(b); for (final JComponent idCombo : this.idCombos.values()) idCombo.setEnabled(b); } @Override public String toString() { return this.getClass().getSimpleName() + " for " + this.field; } }
[ "guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b" ]
guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b
9b12ee4509a6c3fec86ae85328e0d1120aeeebc3
395db7bc1c7c166ecfdfa092434634f907001c87
/ma-gpro-gpao/ma-gpro-gpao-persistance/src/main/java/com/gpro/consulting/tiers/gpao/persitance/fichecolisage/entity/FicheColisageEntity.java
899169cf035fd7eb26486c78b0e5bc3575ce162a
[]
no_license
anouarbensaad/habillement
2c4aea85511bae5cef00b5b0fc200b8c1973219f
4d6c395300c3eff0a81b38d68d0e0873c130f7b6
refs/heads/master
2022-02-19T10:14:15.442154
2019-09-26T19:09:02
2019-09-26T19:09:02
204,194,945
0
0
null
null
null
null
UTF-8
Java
false
false
6,869
java
package com.gpro.consulting.tiers.gpao.persitance.fichecolisage.entity; import java.io.Serializable; import java.util.Calendar; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import com.gpro.consulting.tiers.gpao.coordination.IConstante; @Entity @Table(name=IConstante.TABLE_GP_FICHECOLISAGE) public class FicheColisageEntity implements Serializable{ private static final long serialVersionUID = -3004815224021179635L; @Id @SequenceGenerator(name="FICHECOLISAGE_ID_GENERATOR", sequenceName=IConstante.SEQUENCE_GP_FICHECOLISAGE, allocationSize=1) @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="FICHECOLISAGE_ID_GENERATOR") private Long id; @Column(name = "DATE_LANCEMENT") private Calendar dateLancement; @Column(name = "OBSERVATIONS") private String observations; @Column(name = "GP_OF_ID") private Long ordreFabricationId; @Column(name = "NOMBRE_COLIS") private Long nombreColis; @Column(name = "QUANTITE_COLIS") private Long quantiteColis; @OneToMany(mappedBy = "ficheColisage", cascade = CascadeType.ALL, orphanRemoval=true) private Set<ColisEntity> listColis; @OneToMany(mappedBy = "ficheColisage", cascade = CascadeType.ALL, orphanRemoval=true) private Set<DetailsColisageEntity> listDetails; @Column(name = "BL_SUPPRESSION") private Boolean blSuppression; @Column(name = "DATE_SUPPRESSION") private Calendar dateSuppression; @Column(name = "DATE_CREATION") private Calendar dateCreation; @Column(name = "DATE_MODIFICATION") private Calendar dateModification; @Column(name = "VERSION") private String version; @Column(name = "NUMERO_OF") private String numeroOf ; @Column(name = "SEMAINE") private String semaine; // @Column(name = "REFERENCE") // private String reference ; // // @Column(name = "DESIGNATON") // private String designation ; // @Column(name = "QUANTITE_TOTALE") private Long quantiteTotale ; @Column(name = "PRODUIT_ID") private Long produitId; @Column(name = "PRODUIT_REFERENCE") private String produitReference; @Column(name = "PRODUIT_DESIGNATION") private String produitDesignation; @Column(name = "CLIENT_ID") private Long clientId; @Column(name = "CLIENT_ABREVIATION") private String clientAbreviation; @Column(name = "CLIENT_REFERENCE") private String clientReference; @Column(name = "COULEUR") private String couleur ; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Calendar getDateLancement() { return dateLancement; } public void setDateLancement(Calendar dateLancement) { this.dateLancement = dateLancement; } public String getObservations() { return observations; } public void setObservations(String observations) { this.observations = observations; } public Long getOrdreFabricationId() { return ordreFabricationId; } public void setOrdreFabricationId(Long ordreFabricationId) { this.ordreFabricationId = ordreFabricationId; } public Boolean getBlSuppression() { return blSuppression; } public void setBlSuppression(Boolean blSuppression) { this.blSuppression = blSuppression; } public Calendar getDateSuppression() { return dateSuppression; } public void setDateSuppression(Calendar dateSuppression) { this.dateSuppression = dateSuppression; } public Calendar getDateCreation() { return dateCreation; } public void setDateCreation(Calendar dateCreation) { this.dateCreation = dateCreation; } public Calendar getDateModification() { return dateModification; } public void setDateModification(Calendar dateModification) { this.dateModification = dateModification; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public Long getNombreColis() { return nombreColis; } public void setNombreColis(Long nombreColis) { this.nombreColis = nombreColis; } public Long getQuantiteColis() { return quantiteColis; } public void setQuantiteColis(Long quantiteColis) { this.quantiteColis = quantiteColis; } public Set<ColisEntity> getListColis() { return listColis; } public void setListColis(Set<ColisEntity> listColis) { this.listColis = listColis; } public Set<DetailsColisageEntity> getListDetails() { return listDetails; } public void setListDetails(Set<DetailsColisageEntity> listDetails) { this.listDetails = listDetails; } public String getNumeroOf() { return numeroOf; } public void setNumeroOf(String numeroOf) { this.numeroOf = numeroOf; } // public String getReference() { // return reference; // } // // public void setReference(String reference) { // this.reference = reference; // } // // public String getDesignation() { // return designation; // } // // public void setDesignation(String designation) { // this.designation = designation; // } public Long getQuantiteTotale() { return quantiteTotale; } public void setQuantiteTotale(Long quantiteTotale) { this.quantiteTotale = quantiteTotale; } public Long getProduitId() { return produitId; } public void setProduitId(Long produitId) { this.produitId = produitId; } public String getProduitReference() { return produitReference; } public void setProduitReference(String produitReference) { this.produitReference = produitReference; } public String getProduitDesignation() { return produitDesignation; } public void setProduitDesignation(String produitDesignation) { this.produitDesignation = produitDesignation; } public Long getClientId() { return clientId; } public void setClientId(Long clientId) { this.clientId = clientId; } public String getClientAbreviation() { return clientAbreviation; } public void setClientAbreviation(String clientAbreviation) { this.clientAbreviation = clientAbreviation; } public String getClientReference() { return clientReference; } public void setClientReference(String clientReference) { this.clientReference = clientReference; } public String getCouleur() { return couleur; } public void setCouleur(String couleur) { this.couleur = couleur; } public String getSemaine() { return semaine; } public void setSemaine(String semaine) { this.semaine = semaine; } }
[ "bensaad.tig@gmail.com" ]
bensaad.tig@gmail.com
3df8f990d1bd74f3b7088468679a14655f988b65
0b595e7c8f74928fc81e464019da331412e4eac0
/services/hrdb/src/com/auto_wopjoasedt/hrdb/service/UserService.java
e893e8ec3372fdf2cef2f94dabc4a744de0382dd
[]
no_license
wavemakerapps/Auto_WoPjoaSEdt
8ac5038120d19e2ef9a4832d112a9a8109b5f033
4c543e733c5687fee86d875aeab3772a54762de6
refs/heads/master
2021-01-24T16:29:52.443291
2018-02-27T23:20:22
2018-02-27T23:20:22
123,199,962
0
0
null
null
null
null
UTF-8
Java
false
false
5,788
java
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ package com.auto_wopjoasedt.hrdb.service; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ import java.util.Map; import javax.validation.Valid; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import com.wavemaker.runtime.data.exception.EntityNotFoundException; import com.wavemaker.runtime.data.export.ExportType; import com.wavemaker.runtime.data.expression.QueryFilter; import com.wavemaker.runtime.data.model.AggregationInfo; import com.wavemaker.runtime.file.model.Downloadable; import com.auto_wopjoasedt.hrdb.User; /** * Service object for domain model class {@link User}. */ public interface UserService { /** * Creates a new User. It does cascade insert for all the children in a single transaction. * * This method overrides the input field values using Server side or database managed properties defined on User if any. * * @param user Details of the User to be created; value cannot be null. * @return The newly created User. */ User create(@Valid User user); /** * Returns User by given id if exists. * * @param userIdInstance The id of the User to get; value cannot be null. * @return User associated with the given userIdInstance. * @throws EntityNotFoundException If no User is found. */ User getById(Integer userIdInstance) throws EntityNotFoundException; /** * Find and return the User by given id if exists, returns null otherwise. * * @param userIdInstance The id of the User to get; value cannot be null. * @return User associated with the given userIdInstance. */ User findById(Integer userIdInstance); /** * Updates the details of an existing User. It replaces all fields of the existing User with the given user. * * This method overrides the input field values using Server side or database managed properties defined on User if any. * * @param user The details of the User to be updated; value cannot be null. * @return The updated User. * @throws EntityNotFoundException if no User is found with given input. */ User update(@Valid User user) throws EntityNotFoundException; /** * Deletes an existing User with the given id. * * @param userIdInstance The id of the User to be deleted; value cannot be null. * @return The deleted User. * @throws EntityNotFoundException if no User found with the given id. */ User delete(Integer userIdInstance) throws EntityNotFoundException; /** * Deletes an existing User with the given object. * * @param user The instance of the User to be deleted; value cannot be null. */ void delete(User user); /** * Find all Users matching the given QueryFilter(s). * All the QueryFilter(s) are ANDed to filter the results. * This method returns Paginated results. * * @deprecated Use {@link #findAll(String, Pageable)} instead. * * @param queryFilters Array of queryFilters to filter the results; No filters applied if the input is null/empty. * @param pageable Details of the pagination information along with the sorting options. If null returns all matching records. * @return Paginated list of matching Users. * * @see QueryFilter * @see Pageable * @see Page */ @Deprecated Page<User> findAll(QueryFilter[] queryFilters, Pageable pageable); /** * Find all Users matching the given input query. This method returns Paginated results. * Note: Go through the documentation for <u>query</u> syntax. * * @param query The query to filter the results; No filters applied if the input is null/empty. * @param pageable Details of the pagination information along with the sorting options. If null returns all matching records. * @return Paginated list of matching Users. * * @see Pageable * @see Page */ Page<User> findAll(String query, Pageable pageable); /** * Exports all Users matching the given input query to the given exportType format. * Note: Go through the documentation for <u>query</u> syntax. * * @param exportType The format in which to export the data; value cannot be null. * @param query The query to filter the results; No filters applied if the input is null/empty. * @param pageable Details of the pagination information along with the sorting options. If null exports all matching records. * @return The Downloadable file in given export type. * * @see Pageable * @see ExportType * @see Downloadable */ Downloadable export(ExportType exportType, String query, Pageable pageable); /** * Retrieve the count of the Users in the repository with matching query. * Note: Go through the documentation for <u>query</u> syntax. * * @param query query to filter results. No filters applied if the input is null/empty. * @return The count of the User. */ long count(String query); /** * Retrieve aggregated values with matching aggregation info. * * @param aggregationInfo info related to aggregations. * @param pageable Details of the pagination information along with the sorting options. If null exports all matching records. * @return Paginated data with included fields. * @see AggregationInfo * @see Pageable * @see Page */ Page<Map<String, Object>> getAggregatedValues(AggregationInfo aggregationInfo, Pageable pageable); }
[ "automate1@wavemaker.com" ]
automate1@wavemaker.com
9efca09660837388d576a81fa44fbbf6770e3a0c
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/LANG-54b-1-29-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/apache/commons/lang/LocaleUtils_ESTest_scaffolding.java
2165a96cc5f5a185f6d868e45db37b3775ff356e
[ "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
1,917
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon May 18 01:58:00 UTC 2020 */ package org.apache.commons.lang; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class LocaleUtils_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.apache.commons.lang.LocaleUtils"; 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(LocaleUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.lang.LocaleUtils" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
fa179c9b605e34524de86f30d5a1a3b5b9692160
3634eded90370ff24ee8f47ccfa19e388d3784ad
/src/main/java/com/igexin/push/core/a/q.java
549dcd77c21da0c53919bf60cf2457a97d06bc02
[]
no_license
xiaofans/ResStudyPro
8bc3c929ef7199c269c6250b390d80739aaf50b9
ac3204b27a65e006ebeb5b522762848ea82d960b
refs/heads/master
2021-01-25T05:09:52.461974
2017-06-06T12:12:41
2017-06-06T12:12:41
93,514,258
0
0
null
null
null
null
UTF-8
Java
false
false
1,055
java
package com.igexin.push.core.a; import com.igexin.a.a.c.a; import com.igexin.push.config.k; import com.igexin.push.core.c.f; import com.igexin.push.core.g; import org.json.JSONObject; public class q extends b { private static final String a = k.a; public boolean a(Object obj, JSONObject jSONObject) { try { if (jSONObject.has("action") && jSONObject.getString("action").equals("response_deviceid")) { String string = jSONObject.getString("deviceid"); a.b(a + " get devid resp, devid : " + string + ", save 2db and file"); f.a().b(string); if (g.av != null) { a.b(a + " deviceid arrived cancel addPhoneInfoTimerTask..."); g.av.t(); g.av = null; } if (g.z != null) { com.igexin.push.core.f.a().i().i(); } a.b("deviceidRsp|" + g.z); } } catch (Exception e) { } return true; } }
[ "zhaoyu@neoteched.com" ]
zhaoyu@neoteched.com
f46e8bc0aba69ea4ecc78d61e34134410445a958
dd76d0b680549acb07278b2ecd387cb05ec84d64
/divestory-CFR/androidx/transition/CanvasUtils.java
cbaa705b9b9ed7fb2fafc67b7b87e8cf001e99f9
[]
no_license
ryangardner/excursion-decompiling
43c99a799ce75a417e636da85bddd5d1d9a9109c
4b6d11d6f118cdab31328c877c268f3d56b95c58
refs/heads/master
2023-07-02T13:32:30.872241
2021-08-09T19:33:37
2021-08-09T19:33:37
299,657,052
0
0
null
null
null
null
UTF-8
Java
false
false
2,498
java
/* * Decompiled with CFR <Could not determine version>. * * Could not load the following classes: * android.graphics.Canvas * android.os.Build * android.os.Build$VERSION */ package androidx.transition; import android.graphics.Canvas; import android.os.Build; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; class CanvasUtils { private static Method sInorderBarrierMethod; private static boolean sOrderMethodsFetched; private static Method sReorderBarrierMethod; private CanvasUtils() { } /* * Unable to fully structure code * Enabled unnecessary exception pruning */ static void enableZ(Canvas var0, boolean var1_3) { if (Build.VERSION.SDK_INT < 21) { return; } if (Build.VERSION.SDK_INT >= 29) { if (var1_3) { var0.enableZ(); return; } var0.disableZ(); return; } if (Build.VERSION.SDK_INT == 28) throw new IllegalStateException("This method doesn't work on Pie!"); if (CanvasUtils.sOrderMethodsFetched) ** GOTO lbl-1000 try { CanvasUtils.sReorderBarrierMethod = var2_4 = Canvas.class.getDeclaredMethod("insertReorderBarrier", new Class[0]); var2_4.setAccessible(true); CanvasUtils.sInorderBarrierMethod = var2_4 = Canvas.class.getDeclaredMethod("insertInorderBarrier", new Class[0]); var2_4.setAccessible(true); lbl16: // 2 sources: do { CanvasUtils.sOrderMethodsFetched = true; break; } while (true); } catch (NoSuchMethodException var2_5) { ** continue; } lbl-1000: // 2 sources: { if (!var1_3) ** GOTO lbl25 try { if (CanvasUtils.sReorderBarrierMethod != null) { CanvasUtils.sReorderBarrierMethod.invoke((Object)var0, new Object[0]); } lbl25: // 4 sources: if (var1_3 != false) return; if (CanvasUtils.sInorderBarrierMethod == null) return; CanvasUtils.sInorderBarrierMethod.invoke((Object)var0, new Object[0]); return; } catch (InvocationTargetException var0_1) { throw new RuntimeException(var0_1.getCause()); } } catch (IllegalAccessException var0_2) { return; } } }
[ "ryan.gardner@coxautoinc.com" ]
ryan.gardner@coxautoinc.com
5dbb0be2d272022bbd31245588c47265e4d1d567
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a188/A188510Test.java
ddac836fec05a8fd7808c16619ec3b958bd217db
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a188; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A188510Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
3a6fae89da6ccf47ec2cf3a518201a63ffab58c6
02cbc33bb33663ac450460e5522c50b60d51515e
/src/main/java/iot/jdbc/JDBCMeasurements.java
6d13587ee9325c4bab935632a58fb505605bdbeb
[]
no_license
kwlee0220/sensorthings
e8e9a9c9f7982a926f2d677095459daf7ee63c26
6b4841184929cc7d59a1f1822b35f25ad6a7d248
refs/heads/master
2021-01-17T22:21:12.590043
2019-07-29T14:03:17
2019-07-29T14:03:17
84,194,772
0
0
null
null
null
null
UTF-8
Java
false
false
2,333
java
package iot.jdbc; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Map; import java.util.function.Function; import java.util.stream.Stream; /** * * @author Kang-Woo Lee (ETRI) */ public class JDBCMeasurements { private static final String SQL_PREFIX = "SELECT id, urn, unit FROM MEASUREMENTS "; private final IoTPlatformImpl m_platform; private final Connection m_conn; private final PreparedStatement m_pstmtGet; private final PreparedStatement m_pstmtGetAll; public JDBCMeasurements(IoTPlatformImpl platform, Connection conn) throws SQLException { m_platform = platform; m_conn = conn; // prepare all necessary SQL statements m_pstmtGet = conn.prepareStatement(SQL_PREFIX + "WHERE id=?"); m_pstmtGetAll = conn.prepareStatement(SQL_PREFIX); } MeasurementImpl get(long id) throws SQLException { m_pstmtGet.setLong(1, id); return ResultSetStream.getFirst(m_pstmtGet, m_mapper); } Stream<MeasurementImpl> stream() throws SQLException { return ResultSetStream.create(m_pstmtGetAll, m_mapper); } long create(String urn, String unit) throws SQLException { PreparedStatement pstmt =null; try { pstmt = m_conn.prepareStatement("INSERT INTO MEASUREMENTS VALUES (default, ?, ?)"); pstmt.setString(1, urn); pstmt.setString(2, unit); pstmt.executeUpdate(); return JdbcUtils.getGeneratedKey(pstmt); } finally { JdbcUtils.closeQuietly(pstmt); } } void delete(long id) throws SQLException { Statement stmt = null; try { stmt = m_conn.createStatement(); stmt.executeUpdate("DELETE FROM MEASUREMENTS WHERE id=" + id); } finally { JdbcUtils.closeQuietly(stmt); } } void update(long id, Map<String, Object> udata) throws SQLException { JdbcUtils.updateTable(m_conn, "MEASUREMENTS", id, udata); } private Function<ResultSet,MeasurementImpl> m_mapper = new Function<ResultSet,MeasurementImpl>() { @Override public MeasurementImpl apply(ResultSet rs) { try { return new MeasurementImpl(m_platform, rs.getLong(1), rs.getString(2), rs.getString(3)); } catch ( SQLException e ) { return null; } } }; }
[ "kwlee@etri.re.kr" ]
kwlee@etri.re.kr
8c11df3b3bd12eb460059500d4d9bef1fea8a66d
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/com/flurry/sdk/C7508dc.java
3e1a675af098b8cbe61ea9ed88825a3f0b797bfe
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
2,169
java
package com.flurry.sdk; /* renamed from: com.flurry.sdk.dc */ public final class C7508dc { /* renamed from: a */ public static final String f14798a = C7508dc.class.getSimpleName(); /* renamed from: b */ private static C7508dc f14799b = null; /* renamed from: c */ public boolean f14800c = false; private C7508dc() { } /* renamed from: a */ public static synchronized C7508dc m16634a() { C7508dc dcVar; synchronized (C7508dc.class) { if (f14799b == null) { f14799b = new C7508dc(); } dcVar = f14799b; } return dcVar; } /* JADX WARNING: Code restructure failed: missing block: B:12:0x0014, code lost: return p019d.p020e.p021a.C7294e.m15872d() != null ? p019d.p020e.p021a.C7294e.m15872d() : com.flurry.sdk.C7412Lb.m16398a().mo23854c(); */ /* renamed from: b */ /* Code decompiled incorrectly, please refer to instructions dump. */ public final synchronized java.lang.String mo23946b() { /* r1 = this; monitor-enter(r1) boolean r0 = r1.f14800c // Catch:{ all -> 0x001e } if (r0 != 0) goto L_0x0009 r0 = 0 monitor-exit(r1) return r0 L_0x0009: java.lang.String r0 = p019d.p020e.p021a.C7294e.m15872d() // Catch:{ all -> 0x001e } if (r0 == 0) goto L_0x0015 java.lang.String r0 = p019d.p020e.p021a.C7294e.m15872d() // Catch:{ all -> 0x001e } L_0x0013: monitor-exit(r1) return r0 L_0x0015: com.flurry.sdk.Lb r0 = com.flurry.sdk.C7412Lb.m16398a() // Catch:{ all -> 0x001e } java.lang.String r0 = r0.mo23854c() // Catch:{ all -> 0x001e } goto L_0x0013 L_0x001e: r0 = move-exception monitor-exit(r1) goto L_0x0022 L_0x0021: throw r0 L_0x0022: goto L_0x0021 */ throw new UnsupportedOperationException("Method not decompiled: com.flurry.sdk.C7508dc.mo23946b():java.lang.String"); } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
22fd79afd785f8ec70429f786fee939955e195c2
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mobileqqi/classes.jar/cwh.java
191c01c69e223240f90bbabb8317a54ef6597497
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,307
java
import android.widget.TextView; import com.tencent.mobileqq.activity.ModifyFriendInfoActivity; import com.tencent.mobileqq.app.FriendListObserver; import com.tencent.mobileqq.app.QQAppInterface; import com.tencent.mobileqq.model.FriendManager; public class cwh extends FriendListObserver { public cwh(ModifyFriendInfoActivity paramModifyFriendInfoActivity) {} protected void a(String paramString, byte paramByte1, byte paramByte2) { if ((paramString != null) && (paramString.equals(this.a.jdField_a_of_type_JavaLangString))) { this.a.jdField_a_of_type_Int = paramByte1; return; } this.a.c(); } protected void a(boolean paramBoolean, String paramString1, String paramString2, byte paramByte) { if (paramBoolean) { this.a.c = paramString2; paramString1 = (FriendManager)this.a.jdField_b_of_type_ComTencentMobileqqAppQQAppInterface.getManager(8); this.a.jdField_b_of_type_JavaLangString = paramString1.a(this.a.jdField_a_of_type_JavaLangString); return; } this.a.jdField_b_of_type_AndroidWidgetTextView.setText(this.a.c); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes2.jar * Qualified Name: cwh * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
9e6770a47f831bf2ad10f6524036c80bd691a238
514414459119502f223a01bb7d7cb7732591b089
/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidApplicationResourceInfoApi.java
7a0441d2a380818aed704dc86177bc5b43ceef7e
[ "Apache-2.0" ]
permissive
mgp/bazel
abdd2dd88050be3bca10f68abbb2c58606a5f6ab
d3ff5734d14a4afcfd4cd7fac48b183f77722ea0
refs/heads/master
2022-07-02T10:10:01.984572
2020-05-08T22:03:40
2020-05-08T22:04:43
262,443,498
1
0
Apache-2.0
2020-05-08T22:44:13
2020-05-08T22:44:12
null
UTF-8
Java
false
false
5,316
java
// Copyright 2019 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.devtools.build.lib.skylarkbuildapi.android; import com.google.devtools.build.lib.skylarkbuildapi.FileApi; import com.google.devtools.build.lib.skylarkbuildapi.core.ProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.core.StructApi; import com.google.devtools.build.lib.skylarkinterface.Param; import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable; import com.google.devtools.build.lib.skylarkinterface.SkylarkConstructor; import com.google.devtools.build.lib.skylarkinterface.StarlarkBuiltin; import com.google.devtools.build.lib.syntax.EvalException; /** Supplies a resource apk file (".ap_") and related info. */ @StarlarkBuiltin( name = "AndroidApplicationResourceInfo", doc = "Do not use this module. It is intended for migration purposes only. If you depend on it, " + "you will be broken when it is removed.", documented = false) public interface AndroidApplicationResourceInfoApi<FileT extends FileApi> extends StructApi { /** Name of this info object. */ String NAME = "AndroidApplicationResourceInfo"; /** Returns the ap_ artifact to be merged into the final apk. */ @SkylarkCallable( name = "resource_apk", doc = "The resource apk file ('.ap_')", documented = false, allowReturnNones = true, structField = true) FileT getResourceApk(); /** The jar containing the R java source files. */ @SkylarkCallable( name = "resource_java_src_jar", doc = "The jar containing the R java source files.", documented = false, allowReturnNones = true, structField = true) FileT getResourceJavaSrcJar(); /** The jar containing the R java class files. */ @SkylarkCallable( name = "resource_java_class_jar", doc = "The jar containing the R java class files.", documented = false, allowReturnNones = true, structField = true) FileT getResourceJavaClassJar(); /** The final proessed manifest. */ @SkylarkCallable( name = "manifest", doc = "The final processed manifest.", documented = false, structField = true) FileT getManifest(); /** The proguard config for Android resources. */ @SkylarkCallable( name = "resource_proguard_config", doc = "The resource proguard config file.", documented = false, allowReturnNones = true, structField = true) FileT getResourceProguardConfig(); /** The main dex proguard config file. */ @SkylarkCallable( name = "main_dex_proguard_config", doc = "The main dex proguard config file.", documented = false, allowReturnNones = true, structField = true) FileT getMainDexProguardConfig(); /** Provider for {@link AndroidApplicationResourceInfoApi}. */ @StarlarkBuiltin( name = "Provider", doc = "Do not use this module. It is intended for migration purposes only. If you depend on " + "it, you will be broken when it is removed.", documented = false) interface AndroidApplicationResourceInfoApiProvider<FileT extends FileApi> extends ProviderApi { @SkylarkCallable( name = NAME, doc = "The <code>AndroidApplicationResourceInfo</code> constructor.", documented = false, parameters = { @Param( name = "resource_apk", type = FileApi.class, noneable = true, named = true, doc = ""), @Param( name = "resource_java_src_jar", type = FileApi.class, noneable = true, named = true, doc = ""), @Param( name = "resource_java_class_jar", type = FileApi.class, noneable = true, named = true, doc = ""), @Param(name = "manifest", type = FileApi.class, named = true, doc = ""), @Param( name = "resource_proguard_config", type = FileApi.class, noneable = true, named = true, doc = ""), @Param( name = "main_dex_proguard_config", type = FileApi.class, noneable = true, named = true, doc = ""), }, selfCall = true) @SkylarkConstructor(objectType = AndroidApplicationResourceInfoApi.class) AndroidApplicationResourceInfoApi<FileT> createInfo( Object resourceApk, Object resourceJavaSrcJar, Object resourceJavaClassJar, FileT manifest, Object resourceProguardConfig, Object mainDexProguardConfig) throws EvalException; } }
[ "copybara-worker@google.com" ]
copybara-worker@google.com
2b261ddb2e3bbdadd0133e93c1853906b0c6d5c3
bc266f399ca5046efa2a8f8246b81a6301e71be1
/src/test/java/com/muditasoft/artofwritingunittest/sample03/AssertTest.java
51ec3a8928e0364d869518ed47bf6ed464d6e4c0
[]
no_license
tutkuince/art-of-writing-unit-test
52b60d4b07e86d611d8ec1dc12d0e79f98760b4f
45c667877b1359218a9319b54ff0a845647acfca
refs/heads/master
2022-12-15T22:37:19.603291
2020-09-09T19:52:10
2020-09-09T19:52:10
293,084,688
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
package com.muditasoft.artofwritingunittest.sample03; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; public class AssertTest { @Test void test_assertions() { Dummy d1 = new Dummy(5); Dummy d2 = new Dummy(5); Dummy d3 = d2; Dummy d4 = null; assertEquals(d1, d2); assertSame(d2, d3); assertNull(d4); assertTrue(d2 == d3); assertFalse(d1 == d4); } private static class Dummy { private int id; public Dummy(int id) { this.id = id; } public int getId() { return id; } @Override public boolean equals(Object obj) { return this.id == ((Dummy) obj).getId(); } } }
[ "tutku.ince@outlook.com" ]
tutku.ince@outlook.com
3ab0aff98867c9d7e5c8321d364ce13611e0ff5e
9c7ce5b2af7e3c7f23eb8800e862560876dfa45d
/Spark/ParameterCombos.java
3546aa43f4fe3c09bc7984e06bf0080791fafe97
[]
no_license
jeffyjahfar/NeuralNetworks_MASS
3242a458e62fde7be0ed693a39c3eb83eea3e45c
ea5a393afa0abc920126f096d10500a7fdbbebcb
refs/heads/master
2021-01-08T09:17:43.335854
2020-02-20T20:47:30
2020-02-20T20:47:30
241,983,031
1
0
null
null
null
null
UTF-8
Java
false
false
4,491
java
import java.io.Serializable; import java.util.ArrayList; public class ParameterCombos implements Serializable { /** * Neural Network Parameters: * -------------------------- * 1) Learning rate * 2) Number of iterations * 3) Number of hidden layers * 4) Size of hidden layers (all are the same size for simplicity) */ public class Combo implements Serializable { Double learningRate; Integer numIterations; Integer numHiddenLayers; Integer hiddenLayerSize; public Combo ( Double learningRate, Integer numIterations, Integer numHiddenLayers, Integer hiddenLayerSize ) { this.learningRate = learningRate; this.numIterations = numIterations; this.numHiddenLayers = numHiddenLayers; this.hiddenLayerSize = hiddenLayerSize; } public void print(){ System.out.println("******* MAX ACCURACY PARAMETERS ********"); System.out.println("learningRate = "+ learningRate); System.out.println("numIterations = "+ numIterations); System.out.println("numHiddenLayers = "+ numHiddenLayers); System.out.println("hiddenLayerSize = "+ hiddenLayerSize); } } ArrayList<Combo> combos; public ParameterCombos() { this( // Learning Rate related params: 0.01, // learningRateMin 0.5, // learningRateMax 0.1, // learningRateStep // Number of iterations related params: 3, // numIterationsMin 3, // numIterationsMax 1, //numIterationStep // Number of hidden layer related params: 2, // numHiddenLayersMin 6, //numHiddenLayersMax 2, // numHiddenLayersStep // Hidden layer 50, // hiddenLayerSizeMin 200, // hiddenLayerSizeMax 50 // hiddenLayerSizeStep ); } public ParameterCombos( // Learning Rate related params: double learningRateMin, double learningRateMax, double learningRateStep, // Number of iterations related params: int numIterationsMin, int numIterationsMax, int numIterationStep, // Number of hidden layer related params: int numHiddenLayersMin, int numHiddenLayersMax, int numHiddenLayersStep, // Hidden layer int hiddenLayerSizeMin, int hiddenLayerSizeMax, int hiddenLayerSizeStep ) { combos = new ArrayList<Combo>(); ArrayList<Integer> numIterationOptions = new ArrayList<Integer>(); for ( double learningRate = learningRateMin; learningRate <= learningRateMax; learningRate += learningRateStep ) { for ( int numIterations = numIterationsMin; numIterations <= numIterationsMax; numIterations += numIterationStep ) { for ( int numHiddenLayers = numHiddenLayersMin; numHiddenLayers <= numIterationsMax; numHiddenLayers += numHiddenLayersStep ) { for ( int hiddenLayerSize = hiddenLayerSizeMin; hiddenLayerSize <= hiddenLayerSizeMax; hiddenLayerSize += hiddenLayerSizeStep ) { // Combo combo = new Combo( learningRate, numIterations, numHiddenLayers, hiddenLayerSize ); combos.add(combo); } } } } } public static void main(String[] args) { ParameterCombos paramCombos = new ParameterCombos(); // System.out.println(paramCombos.combos.size()); // System.out.println(paramCombos.combos.get(0).numIterations); // System.out.println(paramCombos.combos.get(10).numIterations); } }
[ "jeffyjahfar@gmail.com" ]
jeffyjahfar@gmail.com
7ae624788695bf6c496c09255da2352a080eb0d2
e26a8434566b1de6ea6cbed56a49fdb2abcba88b
/model-seev-types/src/generated/java/com/prowidesoftware/swift/model/mx/dic/CorporateActionInstructionCancellationRequest002V04.java
2df5e5e935c3c22c8df64462fc296255d7dad581
[ "Apache-2.0" ]
permissive
adilkangerey/prowide-iso20022
6476c9eb8fafc1b1c18c330f606b5aca7b8b0368
3bbbd6804eb9dc4e1440680e5f9f7a1726df5a61
refs/heads/master
2023-09-05T21:41:47.480238
2021-10-03T20:15:26
2021-10-03T20:15:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,465
java
package com.prowidesoftware.swift.model.mx.dic; 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; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * Scope * An account owner sends the CorporateActionInstructionCancellationRequest message to an account servicer to request cancellation of a previously sent corporate action election instruction. * Usage * The message may also be used to: * - re-send a message previously sent (the sub-function of the message is Duplicate), * - provide a third party with a copy of a message for information (the sub-function of the message is Copy), * - re-send to a third party a copy of a message for information (the sub-function of the message is Copy Duplicate), * using the relevant elements in the business application header (BAH). * ISO 15022 - 20022 COEXISTENCE SUBSET * This message definition is a subset of an ISO 20022 message that was reversed engineered from ISO 15022. A subset is a message definition that is compatible with another definition, but is more restrictive * The ISO 15022 and ISO 20022 standards will coexist for a number of years. Until this coexistence period ends, the usage of certain data types is restricted to ensure interoperability between ISO 15022 and 20022 users. These restrictions, which are described by textual usage rules in the ISO 20022 message, have been made mandatory in this subset. * NOTE: The ISO 20022 message coexistence textual rules have been kept in the subset to explain why specific data types have been restricted. These textual rules are identified as follows: CoexistenceXxxxRule. * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CorporateActionInstructionCancellationRequest002V04", propOrder = { "chngInstrInd", "instrId", "corpActnGnlInf", "acctDtls", "corpActnInstr", "splmtryData" }) public class CorporateActionInstructionCancellationRequest002V04 { @XmlElement(name = "ChngInstrInd") protected Boolean chngInstrInd; @XmlElement(name = "InstrId", required = true) protected DocumentIdentification19 instrId; @XmlElement(name = "CorpActnGnlInf", required = true) protected CorporateActionGeneralInformation68 corpActnGnlInf; @XmlElement(name = "AcctDtls", required = true) protected AccountIdentification19 acctDtls; @XmlElement(name = "CorpActnInstr", required = true) protected CorporateActionOption43 corpActnInstr; @XmlElement(name = "SplmtryData") protected List<SupplementaryData1> splmtryData; /** * Gets the value of the chngInstrInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isChngInstrInd() { return chngInstrInd; } /** * Sets the value of the chngInstrInd property. * * @param value * allowed object is * {@link Boolean } * */ public CorporateActionInstructionCancellationRequest002V04 setChngInstrInd(Boolean value) { this.chngInstrInd = value; return this; } /** * Gets the value of the instrId property. * * @return * possible object is * {@link DocumentIdentification19 } * */ public DocumentIdentification19 getInstrId() { return instrId; } /** * Sets the value of the instrId property. * * @param value * allowed object is * {@link DocumentIdentification19 } * */ public CorporateActionInstructionCancellationRequest002V04 setInstrId(DocumentIdentification19 value) { this.instrId = value; return this; } /** * Gets the value of the corpActnGnlInf property. * * @return * possible object is * {@link CorporateActionGeneralInformation68 } * */ public CorporateActionGeneralInformation68 getCorpActnGnlInf() { return corpActnGnlInf; } /** * Sets the value of the corpActnGnlInf property. * * @param value * allowed object is * {@link CorporateActionGeneralInformation68 } * */ public CorporateActionInstructionCancellationRequest002V04 setCorpActnGnlInf(CorporateActionGeneralInformation68 value) { this.corpActnGnlInf = value; return this; } /** * Gets the value of the acctDtls property. * * @return * possible object is * {@link AccountIdentification19 } * */ public AccountIdentification19 getAcctDtls() { return acctDtls; } /** * Sets the value of the acctDtls property. * * @param value * allowed object is * {@link AccountIdentification19 } * */ public CorporateActionInstructionCancellationRequest002V04 setAcctDtls(AccountIdentification19 value) { this.acctDtls = value; return this; } /** * Gets the value of the corpActnInstr property. * * @return * possible object is * {@link CorporateActionOption43 } * */ public CorporateActionOption43 getCorpActnInstr() { return corpActnInstr; } /** * Sets the value of the corpActnInstr property. * * @param value * allowed object is * {@link CorporateActionOption43 } * */ public CorporateActionInstructionCancellationRequest002V04 setCorpActnInstr(CorporateActionOption43 value) { this.corpActnInstr = value; return this; } /** * Gets the value of the splmtryData 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 splmtryData property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSplmtryData().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SupplementaryData1 } * * */ public List<SupplementaryData1> getSplmtryData() { if (splmtryData == null) { splmtryData = new ArrayList<SupplementaryData1>(); } return this.splmtryData; } @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } @Override public boolean equals(Object that) { return EqualsBuilder.reflectionEquals(this, that); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } /** * Adds a new item to the splmtryData list. * @see #getSplmtryData() * */ public CorporateActionInstructionCancellationRequest002V04 addSplmtryData(SupplementaryData1 splmtryData) { getSplmtryData().add(splmtryData); return this; } }
[ "sebastian@prowidesoftware.com" ]
sebastian@prowidesoftware.com
a8f79291e25cd126a78f0427f59831affbda9255
850c6f3b61e23229249b145a8421edb58edd5205
/application/src/main/java/com/changhong/system/web/event/AbstractActionEvent.java
bf353574d394fb0e43dde871159f2401ed4d969c
[]
no_license
kunkun39/UPDATE
f42003a8ef0d39fda2692c90ef68e9bbdcb342ce
25d86495ec0b6a2662a2f4e0151312fe09cacc17
refs/heads/master
2021-01-17T09:27:20.314280
2016-04-13T01:39:08
2016-04-13T01:39:08
23,613,118
0
0
null
null
null
null
UTF-8
Java
false
false
877
java
package com.changhong.system.web.event; import com.changhong.system.domain.SystemActionLog; import org.springframework.context.ApplicationEvent; /** * User: Jack Wang * Date: 14-5-5 * Time: 上午11:27 */ public class AbstractActionEvent extends ApplicationEvent { private SystemActionLog.ActionType type; private String userName; private String userNumber; public AbstractActionEvent(Object source, SystemActionLog.ActionType type, String userName, String userNumber) { super(source); this.userName = userName; this.userNumber = userNumber; this.type = type; } public SystemActionLog.ActionType getType() { return type; } public String getUserName() { return userName; } public String getUserNumber() { return userNumber; } }
[ "34445282@qq.com" ]
34445282@qq.com
e592a18d3770e2a67fa1e2a5fc353128de4157f6
9b04c5a90b31776a17c254d218abb63f59889f5d
/gsb/gsb-api/src/main/java/com/gongsibao/api/dto/GoodsDTO.java
6adee6fd524fb3df53b03d15fd5f9f3e2b2361ff
[]
no_license
damogui/testtt
de80c460e878c22553dabe965a7dfe21181d83cf
ae486b93370db3b3153239a25aecd1caeea8d248
refs/heads/master
2021-09-14T19:46:43.345265
2018-05-18T08:29:08
2018-05-18T08:29:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,006
java
package com.gongsibao.api.dto; import java.math.BigDecimal; /** * @author hw * 服务项 */ public class GoodsDTO extends BaseDTO{ /** * */ private static final long serialVersionUID = -1931988684440679949L; /** * 名称 */ private String name = ""; /** * 价格 */ private BigDecimal price; /** * 工时 */ private Integer duration = 0; /** * 描述 */ private String description = ""; public String getName() { return name; } public void setName(String name) { this.name = name; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public Integer getDuration() { return duration; } public void setDuration(Integer duration) { this.duration = duration; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }
[ "hwhping@163.com" ]
hwhping@163.com
138f17bbd74dfafbbe7045f57edd55e78a44d883
29b6a856a81a47ebab7bfdba7fe8a7b845123c9e
/dingtalk/java/src/main/java/com/aliyun/dingtalkdoc_2_0/models/CreateSpaceHeaders.java
e04423c5c43cd6987495a7518b02353601b16fc2
[ "Apache-2.0" ]
permissive
aliyun/dingtalk-sdk
f2362b6963c4dbacd82a83eeebc223c21f143beb
586874df48466d968adf0441b3086a2841892935
refs/heads/master
2023-08-31T08:21:14.042410
2023-08-30T08:18:22
2023-08-30T08:18:22
290,671,707
22
9
null
2021-08-12T09:55:44
2020-08-27T04:05:39
PHP
UTF-8
Java
false
false
1,110
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dingtalkdoc_2_0.models; import com.aliyun.tea.*; public class CreateSpaceHeaders extends TeaModel { @NameInMap("commonHeaders") public java.util.Map<String, String> commonHeaders; @NameInMap("x-acs-dingtalk-access-token") public String xAcsDingtalkAccessToken; public static CreateSpaceHeaders build(java.util.Map<String, ?> map) throws Exception { CreateSpaceHeaders self = new CreateSpaceHeaders(); return TeaModel.build(map, self); } public CreateSpaceHeaders setCommonHeaders(java.util.Map<String, String> commonHeaders) { this.commonHeaders = commonHeaders; return this; } public java.util.Map<String, String> getCommonHeaders() { return this.commonHeaders; } public CreateSpaceHeaders setXAcsDingtalkAccessToken(String xAcsDingtalkAccessToken) { this.xAcsDingtalkAccessToken = xAcsDingtalkAccessToken; return this; } public String getXAcsDingtalkAccessToken() { return this.xAcsDingtalkAccessToken; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
3e5d09f69fc149a222f6e58fc458e40111717bba
4ec3bf36837420a2cb84bec4adb772d2664f6e92
/FrameworkDartesESP_alunosSDIS/brokerOM2M/org.eclipse.om2m/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainerAnnc.java
1997aaa571fb2d4639c25da448aa906e75d2f5f7
[]
no_license
BaltasarAroso/SDIS_OM2M
1f2ce310b3c1bf64c2a95ad9d236c64bf672abb0
618fdb4da1aba5621a85e49dae0442cafef5ca31
refs/heads/master
2020-04-08T19:08:22.073674
2019-01-20T15:42:48
2019-01-20T15:42:48
159,641,777
0
2
null
2020-03-06T15:49:51
2018-11-29T09:35:02
C
UTF-8
Java
false
false
4,338
java
/* ******************************************************************************** * Copyright (c) 2014, 2017 Orange. * 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 ******************************************************************************** Device : DeviceTemperatureDetectorAnnc A SwitchButton is a device that provides button. Created: 2017-09-28 17:26:40 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = DeviceTemperatureDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceTemperatureDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") public class DeviceTemperatureDetectorFlexContainerAnnc extends AbstractFlexContainerAnnc { public static final String LONG_NAME = "deviceTemperatureDetectorAnnc"; public static final String SHORT_NAME = "deTDrAnnc"; public DeviceTemperatureDetectorFlexContainerAnnc () { setContainerDefinition("org.onem2m.home.device." + DeviceTemperatureDetectorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); } public void finalizeSerialization() { getAlarmSensor(); getAlarmSensorAnnc(); getTemperature(); getTemperatureAnnc(); } public void finalizeDeserialization() { if (this.alarmSensor != null) { setAlarmSensor(this.alarmSensor); } if (this.alarmSensorAnnc != null) { setAlarmSensorAnnc(this.alarmSensorAnnc); } if (this.temperature != null) { setTemperature(this.temperature); } if (this.temperatureAnnc != null) { setTemperatureAnnc(this.temperatureAnnc); } } @XmlElement(name="alSer", required=true, type=AlarmSensorFlexContainerAnnc.class) private AlarmSensorFlexContainer alarmSensor; public void setAlarmSensor(AlarmSensorFlexContainer alarmSensor) { this.alarmSensor = alarmSensor; getFlexContainerOrContainerOrSubscription().add(alarmSensor); } public AlarmSensorFlexContainer getAlarmSensor() { this.alarmSensor = (AlarmSensorFlexContainer) getResourceByName(AlarmSensorFlexContainer.SHORT_NAME); return alarmSensor; } @XmlElement(name="alSerAnnc", required=true, type=AlarmSensorFlexContainerAnnc.class) private AlarmSensorFlexContainerAnnc alarmSensorAnnc; public void setAlarmSensorAnnc(AlarmSensorFlexContainerAnnc alarmSensorAnnc) { this.alarmSensorAnnc = alarmSensorAnnc; getFlexContainerOrContainerOrSubscription().add(alarmSensorAnnc); } public AlarmSensorFlexContainerAnnc getAlarmSensorAnnc() { this.alarmSensorAnnc = (AlarmSensorFlexContainerAnnc) getResourceByName(AlarmSensorFlexContainerAnnc.SHORT_NAME); return alarmSensorAnnc; } @XmlElement(name="tempe", required=true, type=TemperatureFlexContainerAnnc.class) private TemperatureFlexContainer temperature; public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); } public TemperatureFlexContainer getTemperature() { this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); return temperature; } @XmlElement(name="tempeAnnc", required=true, type=TemperatureFlexContainerAnnc.class) private TemperatureFlexContainerAnnc temperatureAnnc; public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { this.temperatureAnnc = temperatureAnnc; getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); } public TemperatureFlexContainerAnnc getTemperatureAnnc() { this.temperatureAnnc = (TemperatureFlexContainerAnnc) getResourceByName(TemperatureFlexContainerAnnc.SHORT_NAME); return temperatureAnnc; } }
[ "ba_aroso@icloud.com" ]
ba_aroso@icloud.com
8b700ccb2007d75aea02701e8104d4c905f235a7
4991436c2b266b2892363b4e8d421247a8d29c6e
/checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/separatorwrap/InputSeparatorWrapForArrayDeclarator.java
591d543fcc7fc624cebe48f3c687d2adc14adee4
[ "Apache-2.0" ]
permissive
spoole167/java-static-analysis-samples
d9f970104bb69abb968e0ecf09c11aa25c364ebd
880f9b394e531d8c03af425b1b4e5a95302a3359
refs/heads/main
2023-08-14T22:26:12.012352
2021-09-15T05:50:20
2021-09-15T05:50:20
406,629,824
0
0
Apache-2.0
2021-09-15T05:49:41
2021-09-15T05:49:41
null
UTF-8
Java
false
false
380
java
/* SeparatorWrap option = (default)EOL tokens = ARRAY_DECLARATOR */ package com.puppycrawl.tools.checkstyle.checks.whitespace.separatorwrap; class InputSeparatorWrapForArrayDeclarator { protected int[] arrayDeclarationWithGoodWrapping = new int[ ] {1, 2}; protected int[] arrayDeclarationWithBadWrapping = new int [] {1, 2}; // violation }
[ "spoole167@googlemail.com" ]
spoole167@googlemail.com
5c4282575b28ebd7580c779bc6ee7f35f646d704
0ebb638b03f4f66431e34d54382b5982a025e773
/modeshape-jcr/src/main/java/org/modeshape/jcr/query/parse/JcrSql2QueryParser.java
123288c97ae1f440ae55a7b6b6dc31bb6a8c79c5
[]
no_license
bwallis42/modeshape
1d2d5e80466e91afe97dd60e300e649c9ff23765
4de334f9b1615d1111e1dd7ab3e38c4b66a544e4
refs/heads/master
2020-12-25T00:27:56.729606
2012-05-14T17:48:55
2012-05-14T17:49:36
4,353,179
1
0
null
null
null
null
UTF-8
Java
false
false
4,313
java
/* * ModeShape (http://www.modeshape.org) * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * * ModeShape is free software. Unless otherwise indicated, all code in ModeShape * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * ModeShape is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.modeshape.jcr.query.parse; import java.io.InputStream; import java.math.BigDecimal; import java.util.Calendar; import javax.jcr.Binary; import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.ValueFactory; import javax.jcr.query.Query; import org.modeshape.jcr.api.value.DateTime; import org.modeshape.jcr.query.JcrTypeSystem; import org.modeshape.jcr.query.model.LiteralValue; import org.modeshape.jcr.query.model.TypeSystem; import org.modeshape.jcr.value.PropertyType; import org.modeshape.jcr.value.ValueFormatException; /** * An specialization of the {@link BasicSqlQueryParser} that uses a different language name that matches the JCR 2.0 * specification. */ public class JcrSql2QueryParser extends BasicSqlQueryParser { public static final String LANGUAGE = Query.JCR_SQL2; public JcrSql2QueryParser() { super(); } /** * {@inheritDoc} * * @see org.modeshape.jcr.query.parse.QueryParser#getLanguage() */ @Override public String getLanguage() { return LANGUAGE; } /** * {@inheritDoc} * * @see org.modeshape.jcr.query.parse.BasicSqlQueryParser#literal(TypeSystem, Object) */ @Override protected LiteralValue literal( TypeSystem typeSystem, Object value ) throws ValueFormatException { ValueFactory factory = ((JcrTypeSystem)typeSystem).getValueFactory(); Value jcrValue = null; if (value instanceof String) { jcrValue = factory.createValue((String)value); } else if (value instanceof Boolean) { jcrValue = factory.createValue(((Boolean)value).booleanValue()); } else if (value instanceof Binary) { jcrValue = factory.createValue((Binary)value); } else if (value instanceof DateTime) { jcrValue = factory.createValue(((DateTime)value).toCalendar()); } else if (value instanceof Calendar) { jcrValue = factory.createValue((Calendar)value); } else if (value instanceof BigDecimal) { jcrValue = factory.createValue((BigDecimal)value); } else if (value instanceof Double) { jcrValue = factory.createValue((Double)value); } else if (value instanceof Long) { jcrValue = factory.createValue((Long)value); } else if (value instanceof InputStream) { try { Binary binary = factory.createBinary((InputStream)value); jcrValue = factory.createValue(binary); } catch (RepositoryException e) { throw new ValueFormatException(value, PropertyType.BINARY, e.getMessage()); } } else if (value instanceof Node) { try { jcrValue = factory.createValue((Node)value); } catch (RepositoryException e) { throw new ValueFormatException(value, PropertyType.REFERENCE, e.getMessage()); } } else { jcrValue = factory.createValue(value.toString()); } return new LiteralValue(jcrValue, value); } }
[ "rhauch@gmail.com" ]
rhauch@gmail.com
b60b1d1d8e94577c7c43d14b02f04687fa3d7fcf
11fa8dcb980983e49877c52ed7e5713e0dca4aad
/trunk/src/net/sourceforge/service/business/po/impl/PurchaseOrderItemReceiptManagerImpl.java
8d9c8eaf7e079febcc9c8c672c59ca43260b24ab
[]
no_license
Novthirteen/oa-system
0262a6538aa023ededa1254c26c42bc19a70357c
c698a0c09bbd6b902700e9ccab7018470c538e70
refs/heads/master
2021-01-15T16:29:18.465902
2009-03-20T12:41:16
2009-03-20T12:41:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,125
java
/* ===================================================================== * * Copyright (c) Sourceforge INFORMATION TECHNOLOGY All rights reserved. * * ===================================================================== */ package net.sourceforge.service.business.po.impl; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import net.sourceforge.dao.business.po.PurchaseOrderDAO; import net.sourceforge.dao.business.po.PurchaseOrderItemReceiptDAO; import net.sourceforge.model.admin.User; import net.sourceforge.model.business.po.PurchaseOrder; import net.sourceforge.model.business.po.PurchaseOrderItem; import net.sourceforge.model.business.po.PurchaseOrderItemReceipt; import net.sourceforge.model.business.po.query.PurchaseOrderItemReceiptQueryCondition; import net.sourceforge.model.business.po.query.PurchaseOrderItemReceiptQueryOrder; import net.sourceforge.model.metadata.ExportStatus; import net.sourceforge.model.metadata.PurchaseOrderStatus; import net.sourceforge.service.BaseManager; import net.sourceforge.service.admin.EmailManager; import net.sourceforge.service.admin.SystemLogManager; import net.sourceforge.service.business.po.PurchaseOrderItemReceiptManager; /** * service manager implement for domain model PurchaseOrderItemReceipt * * @author shilei * @version 1.0 (Dec 27, 2005) */ public class PurchaseOrderItemReceiptManagerImpl extends BaseManager implements PurchaseOrderItemReceiptManager { private PurchaseOrderItemReceiptDAO dao; private PurchaseOrderDAO purchaseOrderDAO; private SystemLogManager systemLogManager; private EmailManager emailManager; public void setEmailManager(EmailManager emailManager) { this.emailManager = emailManager; } public void setSystemLogManager(SystemLogManager systemLogManager) { this.systemLogManager = systemLogManager; } public void setPurchaseOrderItemReceiptDAO(PurchaseOrderItemReceiptDAO dao) { this.dao = dao; } public void setPurchaseOrderDAO(PurchaseOrderDAO purchaseOrderDAO) { this.purchaseOrderDAO = purchaseOrderDAO; } public PurchaseOrderItemReceipt getPurchaseOrderItemReceipt(Integer id) throws Exception { return dao.getPurchaseOrderItemReceipt(id); } private void setDate(PurchaseOrderItemReceipt poir) { if (poir.getReceiveQty1() != null && poir.getReceiveDate1() == null) poir.setReceiveDate1(new Date()); if (poir.getReceiveQty2() != null && poir.getReceiveDate2() == null) poir.setReceiveDate2(new Date()); } public PurchaseOrderItemReceipt updatePurchaseOrderItemReceipt(PurchaseOrderItemReceipt oldPoir,PurchaseOrderItemReceipt poir,User user) throws Exception { if (!this.checkQty(poir)) throw new RuntimeException("qty exceeds"); this.setDate(poir); if (poir.getExportStatus().equals(ExportStatus.EXPORTED)) poir.setExportStatus(ExportStatus.NEEDREEXPORT); dao.updatePurchaseOrderItemReceipt(poir); if (poir.isFinished()) { PurchaseOrderItem poi = poir.getPurchaseOrderItem(); int qty = poir.getReceiveQty1().intValue(); poi.receive(qty); purchaseOrderDAO.updatePurchaseOrderItem(poi); if (poi.isReceived()) { setPurchaseOrderReceivedIfAllPoItemReceived(poi.getPurchaseOrder()); Map context=new HashMap(); context.put("x_poir",poir); //PurchaseOrder po = poi.getPurchaseOrder(); //User emailUser = po.getConfirmer(); //context.put("x_user", emailUser); //emailManager.insertEmail(poi.getPurchaseOrder().getSite(),emailUser.getEmail(), "POItemReceiveConfirm.vm",context); //emailUser = po.getPurchaser(); //context.put("x_user", emailUser); //emailManager.insertEmail(poi.getPurchaseOrder().getSite(),emailUser.getEmail(), "POItemReceiveConfirm.vm",context); User emailUser = poi.getPurchaseRequestItem().getPurchaseRequest().getRequestor(); context.put("x_user", emailUser); context.put("role", EmailManager.EMAIL_ROLE_REQUESTOR); emailManager.insertEmail(poi.getPurchaseOrder().getSite(),emailUser.getEmail(), "POItemReceiveConfirm.vm",context); } } systemLogManager.generateLog(oldPoir,poir,PurchaseOrderItemReceipt.LOG_ACTION_RECEIPT,user); return poir; } private void setPurchaseOrderReceivedIfAllPoItemReceived(PurchaseOrder po) { List poiList = purchaseOrderDAO.getPurchaseOrderItemList(po); boolean allReceived = true; for (Iterator iter = poiList.iterator(); iter.hasNext();) { PurchaseOrderItem poi = (PurchaseOrderItem) iter.next(); if (!poi.isReceived()) { allReceived = false; break; } } if (allReceived) { po=purchaseOrderDAO.getPurchaseOrder(po.getId()); po.setStatus(PurchaseOrderStatus.RECEIVED); purchaseOrderDAO.updatePurchaseOrder(po); } } private int intValue(Integer v) { if (v == null) return 0; return v.intValue(); } public boolean checkQty(PurchaseOrderItemReceipt poir) { PurchaseOrderItem poi = poir.getPurchaseOrderItem(); int qty1 = Math.abs(intValue(poir.getReceiveQty1())); int qty2 = Math.abs(intValue(poir.getReceiveQty2())); if (Math.max(qty1, qty2) + poi.getProcessedQty() > poi.getQuantity()) return false; return true; } public PurchaseOrderItemReceipt insertPurchaseOrderItemReceipt(PurchaseOrderItemReceipt poir,User user) throws Exception { if (!this.checkQty(poir)) throw new RuntimeException("qty exceeds"); poir.setReceiver1(poir.getPurchaseOrderItem().getRequestor()); poir.setReceiver2(poir.getPurchaseOrderItem().getInspector()); this.setDate(poir); poir.setExportStatus(ExportStatus.UNEXPORTED); systemLogManager.generateLog(null,poir,PurchaseOrderItemReceipt.LOG_ACTION_RECEIPT,user); return dao.insertPurchaseOrderItemReceipt(poir); } public int getPurchaseOrderItemReceiptListCount(Map conditions) throws Exception { return dao.getPurchaseOrderItemReceiptListCount(conditions); } public List getPurchaseOrderItemReceiptList(Map conditions, int pageNo, int pageSize, PurchaseOrderItemReceiptQueryOrder order, boolean descend) throws Exception { return dao.getPurchaseOrderItemReceiptList(conditions, pageNo, pageSize, order, descend); } public void deletePurchaseOrderItemReceipt(PurchaseOrderItemReceipt poir,User user) { dao.deletePurchaseOrderItemReceipt(poir); systemLogManager.generateLog(null,poir,PurchaseOrderItemReceipt.LOG_ACTION_DELETERECEIPT,user); } public int getRecevieSum(PurchaseOrderItem poi, User currentUser) throws Exception { Map conds=new HashMap(); conds.put(PurchaseOrderItemReceiptQueryCondition.PURCHASEORDERITEM_ID_EQ,poi.getId()); List l=this.getPurchaseOrderItemReceiptList(conds,0,-1,null,false); int sum=0; for (Iterator iter = l.iterator(); iter.hasNext();) { PurchaseOrderItemReceipt poir = (PurchaseOrderItemReceipt) iter.next(); if(poir.getReceiver1().equals(currentUser) && poir.getReceiveQty1()!=null) { sum+=poir.getReceiveQty1().intValue(); } else if(poir.getReceiver2().equals(currentUser) && poir.getReceiveQty2()!=null) { sum+=poir.getReceiveQty2().intValue(); } } return sum; } }
[ "novthirteen@1ac4a774-0534-11de-a6e9-d320b29efae0" ]
novthirteen@1ac4a774-0534-11de-a6e9-d320b29efae0
dc538dacd8affcbf96cb3e635420eee10df1e503
4376ac2bf8805d7b0846887155a0aa96440ba21f
/build/javasqlc/srcAD/org/openbravo/erpWindows/ec/com/sidesoft/projects/MultiphaseProject/MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData.java
1ade9e91f6a3d0cc509a504dccbaec1a7758b2ec
[]
no_license
rarc88/innovativa
eebb82f4137a70210be5fdd94384c482f3065019
77ab7b4ebda8be9bd02066e5c40b34c854cc49c7
refs/heads/master
2022-08-22T10:58:22.619152
2020-05-22T21:43:22
2020-05-22T21:43:22
266,206,020
0
1
null
null
null
null
UTF-8
Java
false
false
7,258
java
//Sqlc generated V1.O00-1 package org.openbravo.erpWindows.ec.com.sidesoft.projects.MultiphaseProject; import java.sql.*; import org.apache.log4j.Logger; import javax.servlet.ServletException; import org.openbravo.data.FieldProvider; import org.openbravo.database.ConnectionProvider; import org.openbravo.data.UtilSql; import org.openbravo.service.db.QueryTimeOutUtil; import org.openbravo.database.SessionInfo; import java.util.*; /** WAD Generated class */ class MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData implements FieldProvider { static Logger log4j = Logger.getLogger(MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData.class); private String InitRecordNumber="0"; public String dummy; public String getInitRecordNumber() { return InitRecordNumber; } public String getField(String fieldName) { if (fieldName.equalsIgnoreCase("dummy")) return dummy; else { log4j.debug("Field does not exist: " + fieldName); return null; } } public static MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData[] dummy(ConnectionProvider connectionProvider) throws ServletException { return dummy(connectionProvider, 0, 0); } public static MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData[] dummy(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters) throws ServletException { String strSql = ""; strSql = strSql + " SELECT '' AS dummy from DUAL"; ResultSet result; Vector<MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData> vector = new Vector<MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData>(0); PreparedStatement st = null; try { st = connectionProvider.getPreparedStatement(strSql); QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile()); result = st.executeQuery(); long countRecord = 0; long countRecordSkip = 1; boolean continueResult = true; while(countRecordSkip < firstRegister && continueResult) { continueResult = result.next(); countRecordSkip++; } while(continueResult && result.next()) { countRecord++; MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData objectMultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData = new MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData(); objectMultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData.dummy = UtilSql.getValue(result, "dummy"); objectMultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData.InitRecordNumber = Integer.toString(firstRegister); vector.addElement(objectMultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData); if (countRecord >= numberRegisters && numberRegisters != 0) { continueResult = false; } } result.close(); } catch(SQLException e){ if (log4j.isDebugEnabled()) { log4j.error("SQL error in query: " + strSql, e); } else { log4j.error("SQL error in query: " + strSql + " :" + e); } throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage()); } catch(Exception ex){ if (log4j.isDebugEnabled()) { log4j.error("Exception in query: " + strSql, ex); } else { log4j.error("Exception in query: " + strSql + " :" + ex); } throw new ServletException("@CODE=@" + ex.getMessage()); } finally { try { connectionProvider.releasePreparedStatement(st); } catch(Exception e){ log4j.error("Error during release*Statement of query: " + strSql, e); } } MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData objectMultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData[] = new MultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData[vector.size()]; vector.copyInto(objectMultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData); return(objectMultiphaseProjectF6EEF200673F471DAD8D2923B9136C9DData); } public static int updateChangeProjectStatus(ConnectionProvider connectionProvider, String changeprojectstatus, String cProjectId) throws ServletException { String strSql = ""; strSql = strSql + " UPDATE C_Project" + " SET changeprojectstatus = ? " + " WHERE C_Project.C_Project_ID = ?"; int updateCount = 0; PreparedStatement st = null; int iParameter = 0; try { st = connectionProvider.getPreparedStatement(strSql); QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile()); iParameter++; UtilSql.setValue(st, iParameter, 12, null, changeprojectstatus); iParameter++; UtilSql.setValue(st, iParameter, 12, null, cProjectId); SessionInfo.saveContextInfoIntoDB(connectionProvider.getConnection()); updateCount = st.executeUpdate(); } catch(SQLException e){ if (log4j.isDebugEnabled()) { log4j.error("SQL error in query: " + strSql, e); } else { log4j.error("SQL error in query: " + strSql + " :" + e); } throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage()); } catch(Exception ex){ if (log4j.isDebugEnabled()) { log4j.error("Exception in query: " + strSql, ex); } else { log4j.error("Exception in query: " + strSql + " :" + ex); } throw new ServletException("@CODE=@" + ex.getMessage()); } finally { try { connectionProvider.releasePreparedStatement(st); } catch(Exception e){ log4j.error("Error during release*Statement of query: " + strSql, e); } } return(updateCount); } /** Select for action search */ public static String selectActDefC_Project_ID(ConnectionProvider connectionProvider, String C_Project_ID) throws ServletException { String strSql = ""; strSql = strSql + " SELECT Value FROM C_Project WHERE isActive='Y' AND C_Project_ID = ? "; ResultSet result; String strReturn = ""; PreparedStatement st = null; int iParameter = 0; try { st = connectionProvider.getPreparedStatement(strSql); QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile()); iParameter++; UtilSql.setValue(st, iParameter, 12, null, C_Project_ID); result = st.executeQuery(); if(result.next()) { strReturn = UtilSql.getValue(result, "value"); } result.close(); } catch(SQLException e){ if (log4j.isDebugEnabled()) { log4j.error("SQL error in query: " + strSql, e); } else { log4j.error("SQL error in query: " + strSql + " :" + e); } throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage()); } catch(Exception ex){ if (log4j.isDebugEnabled()) { log4j.error("Exception in query: " + strSql, ex); } else { log4j.error("Exception in query: " + strSql + " :" + ex); } throw new ServletException("@CODE=@" + ex.getMessage()); } finally { try { connectionProvider.releasePreparedStatement(st); } catch(Exception e){ log4j.error("Error during release*Statement of query: " + strSql, e); } } return(strReturn); } }
[ "rarc88@gmail.com" ]
rarc88@gmail.com
3737bc7980421741efdd076e237abc82f2528b47
518546576c10a25cba04bacdcf43bab1285fc051
/src/com/ipsum/Game.java
40e647d665afcf524441cbd445a65451d9f82ee1
[]
no_license
Temere/ipsum
59e7562efd6b521355856768c0be73f1d5c45e86
ae241487c73a4abb3d1bc060975b13673f2e6b7e
refs/heads/master
2016-09-05T21:25:33.114392
2014-05-11T12:50:44
2014-05-11T12:50:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,620
java
package com.ipsum; import com.ipsum.audio.Sound; import com.ipsum.entity.Entity; import com.ipsum.entity.mob.Dummy; import com.ipsum.entity.mob.Mob; import com.ipsum.entity.mob.player.Player; import com.ipsum.entity.util.Hitbox; import com.ipsum.entity.projectile.Projectile; import com.ipsum.graphics.Screen; import com.ipsum.graphics.gui.Gui; import com.ipsum.input.Keyboard; import com.ipsum.input.Mouse; import com.ipsum.interfaces.ICollidable; import com.ipsum.level.FileLevel; import com.ipsum.level.Level; import com.ipsum.level.TestLevelData; import com.ipsum.menu.Menu; import com.ipsum.util.Debug; import com.ipsum.util.TileCoordinate; import javax.swing.*; import java.awt.*; import java.awt.event.KeyEvent; import java.awt.image.BufferStrategy; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; public class Game extends Canvas implements Runnable { private static int scale = 3; private static int width = 900 / scale; private static int height = width / 16 * 9; private Sound background; public static Game game; public static String title = "Ipsum"; private JFrame frame; private Screen screen; private BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); private int[] pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData(); private Level level; private Thread thread; private boolean running = false; private Keyboard keyboard; private Mouse mouse; private Gui gui; private Menu menu; private boolean showHitboxes = false; private Color hitboxColour = new Color(0xffffff); private Player player; public Game() { setPreferredSize(new Dimension(width * scale, height * scale)); keyboard = new Keyboard(); mouse = new Mouse(); initFrame(); screen = new Screen(width, height); player = new Player(new TileCoordinate(10, 10)); level = new FileLevel(new TestLevelData()); level.add(player); gui = new Gui(player); addKeyListener(keyboard); addMouseListener(mouse); addMouseMotionListener(mouse); level.add(new Dummy(12 * 16, 20 * 16)); level.add(new Dummy(14 * 16, 15 * 16)); level.add(new Dummy(16 * 16, 18 * 16)); menu = new Menu(); // background = new Sound("res/Let Em Riot - Don t Stop Running.mp3"); // background.setVolume(0.05); // background.loop(); } private void initFrame() { frame = new JFrame(); frame.setResizable(false); frame.setTitle(title); frame.add(this); frame.pack(); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.setLocationRelativeTo(null); frame.setVisible(true); } @Override public void run() { long lastTime = System.nanoTime(); long timer = System.currentTimeMillis(); final double ns = 1000000000.0 / 60.0; double delta = 0; int frames = 0; int updates = 0; requestFocus(); while (running) { long now = System.nanoTime(); delta += (now - lastTime) / ns; lastTime = now; while (delta >= 0) { update(); delta--; updates++; } render(); frames++; if(System.currentTimeMillis() - timer >= 1000) { timer = System.currentTimeMillis(); //System.out.println(updates + " ups, " + frames + " fps"); frame.setTitle(title + " " + updates + " ups, " + frames + " fps, " + level.getDebug()); frames = 0; updates = 0; } } stop(); } public synchronized void start() { running = true; thread = new Thread(this, "Display"); thread.start(); } public synchronized void stop() { running = false; try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } } public void render() { BufferStrategy bs = getBufferStrategy(); if(bs == null) { createBufferStrategy(3); return; } screen.clear(); // all rendering here int xScroll =(int) player.getX() - screen.width / 2; int yScroll =(int) player.getY() - screen.height / 2; level.render(xScroll, yScroll, screen); //render gui last gui.render(screen); if(Debug.hitboxes == Debug.Hitboxes.SHOW_ALL || Debug.hitboxes == Debug.Hitboxes.SHOW_CORNERS) { for(Entity e : level.getEntities()) { if(e instanceof ICollidable) { ICollidable c = (ICollidable) e; c.getHitbox().renderCorners(screen); } } player.getHitbox().renderCorners(screen); } if(menu.current != Menu.Current.NONE) menu.render(screen); // not after here for(int i = 0; i< pixels.length; i++) pixels[i] = screen.pixels[i]; Graphics g = bs.getDrawGraphics(); g.drawImage(image, 0, 0, getWidth(), getHeight(), null); renderHitboxes(g, xScroll, yScroll); g.dispose(); bs.show(); } public void renderHitboxes(Graphics g, int xScroll, int yScroll) { if(Debug.hitboxes != Debug.Hitboxes.SHOW_ALL && Debug.hitboxes != Debug.Hitboxes.SHOW_OUTLINE) return; //drawing hitboxes for(Entity e : level.getEntities()) { if(e instanceof Mob) { Mob mob = (Mob) e; Hitbox hitbox = mob.getHitbox(); int hx = (int) (hitbox.getXWithOffset() - xScroll) * scale; int hy = (int) (hitbox.getYWithOffset() - yScroll) * scale; int hw = (int) hitbox.getWidthWithOffset() * scale; int hh = (int) hitbox.getHeightWithOffset() * scale; g.setColor(hitboxColour); g.drawRect(hx, hy, hw, hh); } } for(Projectile p : level.getProjectiles()) { Hitbox hitbox = p.getHitbox(); int hx = (int) (hitbox.getXWithOffset() - xScroll) * scale; int hy = (int) (hitbox.getYWithOffset() - yScroll) * scale; int hw = (int) hitbox.getWidthWithOffset() * scale; int hh = (int) hitbox.getHeightWithOffset() * scale; g.setColor(hitboxColour); g.drawRect(hx, hy, hw, hh); } for(Player p : level.getPlayers()) { Hitbox hitbox = p.getHitbox(); int hx = (int) (hitbox.getXWithOffset() - xScroll) * scale; int hy = (int) (hitbox.getYWithOffset() - yScroll) * scale; int hw = (int) hitbox.getWidthWithOffset() * scale; int hh = (int) hitbox.getHeightWithOffset() * scale; g.setColor(hitboxColour); g.drawRect(hx, hy, hw, hh); } } public void update() { menu.update(); if(menu.current == Menu.Current.NONE) { level.update(); gui.update(); } keyboard.update(); } public static int getWindowHeight() { return height * scale; } public static int getWindowWidth() { return width * scale; } public static int getScreenWidth() { return width; } public static int getScreenHeight() { return height; } public static void main(String[] args) { game = new Game(); game.start(); Debug.hitboxes = Debug.Hitboxes.SHOW_ALL; } }
[ "gerbrandnijk@gmail.com" ]
gerbrandnijk@gmail.com
116f81b30f01cac35717aed75ecf2da01fd81037
3574d1f373b87cf0922d75fa72d1edc292ceb3ff
/src/test/java/com/diffplug/scriptbox/ScriptBoxNashornTest.java
e9b73b5d3044098d4b67f6dc3e8e6275f19180ef
[ "Apache-2.0" ]
permissive
gitter-badger/freshmark
1f05f2a8c98e4726021a7b1ad65c39a26bec53f2
b48030778fc2460ece0be79b0295f4e0017fe0a2
refs/heads/master
2020-12-24T20:00:25.647412
2015-09-17T03:23:42
2015-09-17T03:23:42
42,689,748
0
0
null
2015-09-18T00:18:29
2015-09-18T00:18:29
null
UTF-8
Java
false
false
5,523
java
/* * Copyright 2015 DiffPlug * * 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.diffplug.scriptbox; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import javax.script.ScriptEngine; import javax.script.ScriptException; import org.junit.Assert; import org.junit.Test; import com.diffplug.scriptbox.ScriptBox; public class ScriptBoxNashornTest { @Test public void testBasicExpressions() throws ScriptException { ScriptEngine engine = ScriptBox.create().build(Language.nashorn()); Assert.assertEquals("abc", engine.eval("'abc'")); Assert.assertEquals(123, engine.eval("123")); Assert.assertEquals(123.5, engine.eval("123.5")); } @Test public void testBasicScript() throws ScriptException { ScriptEngine engine = ScriptBox.create().build(Language.nashorn()); engine.eval("var txt = 'abc';" + "var int = 123;" + "var float = 123.5;"); Assert.assertEquals("abc", engine.eval("txt")); Assert.assertEquals(123, engine.eval("int")); Assert.assertEquals(123.5, engine.eval("float")); } ////////////////////////////// // Exhaustive test of VoidN // ////////////////////////////// @Test public void testVoid0() throws ScriptException { AtomicBoolean wasRun = new AtomicBoolean(false); ScriptEngine engine = ScriptBox.create() .set("void0").toVoid0(() -> wasRun.set(true)) .build(Language.nashorn()); engine.eval("void0()"); Assert.assertEquals(true, wasRun.get()); } @Test public void testVoid1() throws ScriptException { AtomicReference<String> arg1 = new AtomicReference<>(); ScriptEngine engine = ScriptBox.create() .set("void1").toVoid1(arg1::set) .build(Language.nashorn()); engine.eval("void1('it lives!')"); Assert.assertEquals("it lives!", arg1.get()); } @Test public void testVoid2() throws ScriptException { AtomicReference<Object> arg1 = new AtomicReference<>(); AtomicReference<Object> arg2 = new AtomicReference<>(); ScriptEngine engine = ScriptBox.create() .set("void2").toVoid2((a, b) -> { arg1.set(a); arg2.set(b); }) .build(Language.nashorn()); engine.eval("void2('a', 'b')"); Assert.assertEquals("a", arg1.get()); Assert.assertEquals("b", arg2.get()); } @Test public void testVoid3() throws ScriptException { AtomicReference<Object> arg1 = new AtomicReference<>(); AtomicReference<Object> arg2 = new AtomicReference<>(); AtomicReference<Object> arg3 = new AtomicReference<>(); ScriptEngine engine = ScriptBox.create() .set("void3").toVoid3((a, b, c) -> { arg1.set(a); arg2.set(b); arg3.set(c); }) .build(Language.nashorn()); engine.eval("void3('a', 'b', 'c')"); Assert.assertEquals("a", arg1.get()); Assert.assertEquals("b", arg2.get()); Assert.assertEquals("c", arg3.get()); } @Test public void testVoid4() throws ScriptException { AtomicReference<Object> arg1 = new AtomicReference<>(); AtomicReference<Object> arg2 = new AtomicReference<>(); AtomicReference<Object> arg3 = new AtomicReference<>(); AtomicReference<Object> arg4 = new AtomicReference<>(); ScriptEngine engine = ScriptBox.create() .set("void4").toVoid4((a, b, c, d) -> { arg1.set(a); arg2.set(b); arg3.set(c); arg4.set(d); }) .build(Language.nashorn()); engine.eval("void4('a', 'b', 'c', 'd')"); Assert.assertEquals("a", arg1.get()); Assert.assertEquals("b", arg2.get()); Assert.assertEquals("c", arg3.get()); Assert.assertEquals("d", arg4.get()); } ////////////////////////////// // Exhaustive test of FuncN // ////////////////////////////// @Test public void testFunc0() throws ScriptException { ScriptEngine engine = ScriptBox.create() .set("func0").toFunc0(() -> "wassup") .build(Language.nashorn()); Assert.assertEquals("wassup", engine.eval("func0()")); } @Test public void testFunc1() throws ScriptException { ScriptEngine engine = ScriptBox.create() .set("func1").toFunc1(a -> a) .build(Language.nashorn()); Assert.assertEquals("identity", engine.eval("func1('identity')")); Assert.assertEquals(4, engine.eval("func1(4)")); Assert.assertEquals(4.5, engine.eval("func1(4.5)")); } @Test public void testFunc2() throws ScriptException { ScriptEngine engine = ScriptBox.create() .set("func2").toFunc2((String a, String b) -> a + b) .build(Language.nashorn()); Assert.assertEquals("ab", engine.eval("func2('a', 'b')")); } @Test public void testFunc3() throws ScriptException { ScriptEngine engine = ScriptBox.create() .set("func3").toFunc3((String a, String b, String c) -> a + b + c) .build(Language.nashorn()); Assert.assertEquals("abc", engine.eval("func3('a', 'b', 'c')")); } @Test public void testFunc4() throws ScriptException { ScriptEngine engine = ScriptBox.create() .set("func4").toFunc4((String a, String b, String c, String d) -> a + b + c + d) .build(Language.nashorn()); Assert.assertEquals("abcd", engine.eval("func4('a', 'b', 'c', 'd')")); } }
[ "ned.twigg@diffplug.com" ]
ned.twigg@diffplug.com
90c1edb7a94c9b7af780055f16cdcf652152041b
7559bead0c8a6ad16f016094ea821a62df31348a
/src/com/vmware/vim25/PlatformConfigFault.java
999e3e069eb0d834e4bf26d0e4d835ffe82e0c9f
[]
no_license
ZhaoxuepengS/VsphereTest
09ba2af6f0a02d673feb9579daf14e82b7317c36
59ddb972ce666534bf58d84322d8547ad3493b6e
refs/heads/master
2021-07-21T13:03:32.346381
2017-11-01T12:30:18
2017-11-01T12:30:18
109,128,993
1
1
null
null
null
null
UTF-8
Java
false
false
1,558
java
package com.vmware.vim25; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for PlatformConfigFault complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PlatformConfigFault"> * &lt;complexContent> * &lt;extension base="{urn:vim25}HostConfigFault"> * &lt;sequence> * &lt;element name="text" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PlatformConfigFault", propOrder = { "text" }) @XmlSeeAlso({ PatchInstallFailed.class, InvalidBundle.class, PatchIntegrityError.class }) public class PlatformConfigFault extends HostConfigFault { @XmlElement(required = true) protected String text; /** * Gets the value of the text property. * * @return * possible object is * {@link String } * */ public String getText() { return text; } /** * Sets the value of the text property. * * @param value * allowed object is * {@link String } * */ public void setText(String value) { this.text = value; } }
[ "495149700@qq.com" ]
495149700@qq.com
89f53bcd9faae14866495eb880bf01980a7284c1
7956a5ca22df8dd6493ab28cdf6dfbc38422642c
/demo/demo-filter/filter-server/src/main/java/org/apache/servicecomb/demo/filter/server/ExceptionSchema.java
980681b6b967477546320dc325c341d663e747fb
[ "Apache-2.0" ]
permissive
apache/servicecomb-java-chassis
6039d162c86528d220d794e1ccb92149d93c8d4e
00317c70c17cbdd7f4ad2f2d2abf5ece60f1ca60
refs/heads/master
2023-09-01T21:46:07.284680
2023-09-01T08:22:15
2023-09-01T08:22:15
91,674,936
1,471
571
Apache-2.0
2023-09-14T08:31:08
2017-05-18T09:29:30
Java
UTF-8
Java
false
false
1,904
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.demo.filter.server; import java.util.concurrent.CompletableFuture; import jakarta.ws.rs.core.Response.Status; import org.apache.servicecomb.provider.rest.common.RestSchema; import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData; import org.apache.servicecomb.swagger.invocation.exception.InvocationException; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @RestSchema(schemaId = "ExceptionSchema") @RequestMapping(path = "/exception", produces = MediaType.APPLICATION_JSON_VALUE) public class ExceptionSchema { @GetMapping(path = "/blockingException") public boolean blockingException() { throw new InvocationException(Status.SERVICE_UNAVAILABLE, new CommonExceptionData("Blocking Exception")); } @GetMapping(path = "/reactiveException") public CompletableFuture<Boolean> reactiveException() { throw new InvocationException(Status.SERVICE_UNAVAILABLE, new CommonExceptionData("Reactive Exception")); } }
[ "bismy@qq.com" ]
bismy@qq.com
0b0c8f415948ed366b995075670dbba9f08b7ce4
eea5b7fd26d1e5345c0265ab3376f53d75e91dfa
/src/test/java/org/assertj/vavr/api/OptionAssert_contains_Test.java
d78317b3d1e414f860c2db490a226cee9930f5eb
[ "Apache-2.0" ]
permissive
frecco75/assertj-vavr
754b24bcfd7653ea430518f1d7b9dd5fab6f96ce
486fe8da2bdc9c8fab1557972cdd030ec42eab00
refs/heads/master
2020-04-26T23:54:49.883978
2019-02-23T09:52:39
2019-02-23T09:52:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,013
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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * <p> * Copyright 2012-2017 the original author or authors. */ package org.assertj.vavr.api; import io.vavr.control.Option; import org.junit.jupiter.api.Test; import static org.assertj.core.util.FailureMessages.actualIsNull; import static org.assertj.vavr.api.OptionShouldContain.shouldContain; import static org.assertj.vavr.api.VavrAssertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; class OptionAssert_contains_Test { @Test void should_fail_when_option_is_null() { assertThrows(AssertionError.class, () -> assertThat((Option<String>) null).contains("something"), actualIsNull()); } @Test void should_pass_if_option_contains_expected_value() { assertThat(Option.of("something")).contains("something"); } @Test void should_fail_if_option_does_not_contain_expected_value() { Option<String> actual = Option.of("not-expected"); String expectedValue = "something"; assertThrows(AssertionError.class, () -> assertThat(actual).contains(expectedValue), shouldContain(actual, expectedValue).create()); } @Test void should_fail_if_option_is_empty() { String expectedValue = "something"; assertThrows(AssertionError.class, () -> assertThat(Option.none()).contains(expectedValue), shouldContain(expectedValue).create()); } }
[ "gpiwowarek@gmail.com" ]
gpiwowarek@gmail.com
a7e17c44663836fbd5fd31bb27cab17a75bba9a6
ea8fb0b11aa54658068ce9d1bf7ba0a39aaa5ebe
/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SyncMessageChannelSenderParser.java
0f154b9e7d1b8c8979de6aa0ee3693c9e5185d75
[ "Apache-2.0" ]
permissive
philkom/citrus
6d67a0fba812d1a8c28e44bfaa2f7d1f1ce090e2
e6c5dda5f94279ecfffab98a2f90fe5e7f285a72
refs/heads/master
2021-01-17T23:07:07.953868
2010-09-14T13:02:43
2010-09-14T13:02:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,277
java
/* * Copyright 2006-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.consol.citrus.config.xml; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.StringUtils; import org.w3c.dom.Element; /** * Bean definition parser for sync-message-channel-sender configuration. * * @author Christoph Deppisch */ public class SyncMessageChannelSenderParser extends AbstractMessageChannelTemplateAwareParser { /** * @see com.consol.citrus.config.xml.AbstractMessageChannelTemplateAwareParser#doParseComponent(org.w3c.dom.Element, org.springframework.beans.factory.xml.ParserContext) */ @Override protected BeanDefinitionBuilder doParseComponent(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder .genericBeanDefinition("com.consol.citrus.channel.SyncMessageChannelSender"); String replyTimeout = element.getAttribute("reply-timeout"); if (StringUtils.hasText(replyTimeout)) { builder.addPropertyValue("replyTimeout", replyTimeout); } String replyHandler = element.getAttribute("reply-handler"); if (StringUtils.hasText(replyHandler)) { builder.addPropertyReference("replyMessageHandler", replyHandler); } String replyMessageCorrelator = element.getAttribute("reply-message-correlator"); if (StringUtils.hasText(replyMessageCorrelator)) { builder.addPropertyReference("correlator", replyMessageCorrelator); } return builder; } }
[ "deppisch@consol.de" ]
deppisch@consol.de
57aa415e4582d1a35696f4f6978f8ac10247d276
5760470e48d46af7ffd871ec5ec34a279b5943da
/impl/src/main/java/org/jboss/arquillian/warp/shared/RequestPayload.java
bd3bdb5320ae1830d89e5b4fb4d90e1e51fbd153
[ "Apache-2.0" ]
permissive
aslakknutsen/arquillian-extension-warp
042f3a1c90c8b9a41ecf592c8ad81b90aa0a0b30
d27654ff01262f1f5d97eb502949512c7e1120ab
refs/heads/master
2021-01-18T09:35:37.124986
2012-09-05T03:24:30
2012-09-05T03:24:30
5,873,920
0
0
null
null
null
null
UTF-8
Java
false
false
1,254
java
/** * JBoss, Home of Professional Open Source * Copyright 2012, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.arquillian.warp.shared; import java.io.Serializable; import org.jboss.arquillian.warp.ServerAssertion; public class RequestPayload implements Serializable { private static final long serialVersionUID = -5537112559937896153L; private ServerAssertion assertion; public RequestPayload(ServerAssertion assertion) { this.assertion = assertion; } public ServerAssertion getAssertion() { return assertion; } }
[ "lfryc@redhat.com" ]
lfryc@redhat.com
5469dc682910f3335ffcbd55398b3360e636f11a
61602d4b976db2084059453edeafe63865f96ec5
/mtopsdk/mtop/common/a/b.java
843ae730b1723caaa6beee6a1388415f0270d681
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
191
java
package mtopsdk.mtop.common.a; import mtopsdk.mtop.common.d; import mtopsdk.mtop.common.k; public final class b extends a implements d { public b(k kVar) { super(kVar); } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
af347a2c54f91acf8b8dfaa5a898ff2dbb2080fe
300f9a5476d80533b4cec1081a621d156cb934b2
/mmm-client/mmm-client-impl-gwt/src/main/java/net/sf/mmm/client/impl/gwt/gin/package-info.java
58c6f2784078767c2b80ce1e4fc273fd94ad43f4
[ "Apache-2.0" ]
permissive
cbonami/mmm
931157236175aa749280e71851fda1d8f5a4c5dc
cd69e59a9696ff44e87678ab1cc879d20d7188f7
refs/heads/master
2021-01-20T17:12:37.355366
2014-01-29T22:27:15
2014-01-29T22:27:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ /** * Contains the GIN configuration for this client framework. * <a name="documentation"/><h2>Client Impl GIN (GWT)</h2> * This package contains the GIN (GWT INject) configuration for this GWT based implementation of the * {@link net.sf.mmm.client.api Client API}. */ package net.sf.mmm.client.impl.gwt.gin;
[ "joerg@j-hohwiller.de" ]
joerg@j-hohwiller.de
5180dd807deb23906788b3d6e61d574fc3bd8827
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE190_Integer_Overflow/s06/CWE190_Integer_Overflow__short_max_postinc_31.java
d732cece5d62cf589dea1b8e3760641af338b6b3
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
3,235
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__short_max_postinc_31.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-31.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: max Set data to the max value for short * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: increment * GoodSink: Ensure there will not be an overflow before incrementing data * BadSink : Increment data, which can cause an overflow * Flow Variant: 31 Data flow: make a copy of data within the same method * * */ package testcases.CWE190_Integer_Overflow.s06; import testcasesupport.*; import javax.servlet.http.*; public class CWE190_Integer_Overflow__short_max_postinc_31 extends AbstractTestCase { public void bad() throws Throwable { short dataCopy; { short data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Short.MAX_VALUE; dataCopy = data; } { short data = dataCopy; /* POTENTIAL FLAW: if data == Short.MAX_VALUE, this will overflow */ data++; short result = (short)(data); IO.writeLine("result: " + result); } } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { short dataCopy; { short data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; dataCopy = data; } { short data = dataCopy; /* POTENTIAL FLAW: if data == Short.MAX_VALUE, this will overflow */ data++; short result = (short)(data); IO.writeLine("result: " + result); } } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { short dataCopy; { short data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Short.MAX_VALUE; dataCopy = data; } { short data = dataCopy; /* FIX: Add a check to prevent an overflow from occurring */ if (data < Short.MAX_VALUE) { data++; short result = (short)(data); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to increment."); } } } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "you@example.com" ]
you@example.com
4280df172b1ea256efa2bfa3f1253eebc6b1132c
1cf16764dd251339042bce475b5e6db188d162c5
/xa-controller/src/main/java/com/xinnet/xa/controller/service/MonitorService.java
1f6d0c66e3d666399f74f500f336dbaacbbb21af
[]
no_license
janck13/xinnet-analysis
d317d42dabb76e2b815376cf87477644f23fd533
227c1a152ed3719d0bf8964d39aaf6732353e17a
refs/heads/master
2020-05-23T15:43:28.024702
2015-12-10T10:08:28
2015-12-10T10:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,893
java
package com.xinnet.xa.controller.service; import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.alibaba.fastjson.JSON; import com.xinnet.xa.controller.common.ControllerConstant; import com.xinnet.xa.controller.dao.CompExceptionMessageDao; import com.xinnet.xa.controller.dao.CompMonitorDao; import com.xinnet.xa.controller.dao.ComponentDao; import com.xinnet.xa.controller.dao.RuleDao; import com.xinnet.xa.controller.dao.TomcatMonitorDao; import com.xinnet.xa.controller.model.CompExceptionMessage; import com.xinnet.xa.controller.model.CompMonitor; import com.xinnet.xa.controller.model.Component; import com.xinnet.xa.controller.model.Rule; import com.xinnet.xa.controller.model.TomcatMonitor; import com.xinnet.xa.core.utils.DateUtil; import com.xinnet.xa.core.utils.HttpClientUtil; import com.xinnet.xa.core.utils.SendMailUtil; import com.xinnet.xa.core.utils.Utils; import com.xinnet.xa.core.vo.CompMonitorData; import com.xinnet.xa.core.vo.MailParams; import com.xinnet.xa.core.vo.TomcatMonitorData; @Service public class MonitorService implements InitializingBean{ private Logger logger = Logger.getLogger(MonitorService.class); @Autowired private ComponentDao componentDao; @Autowired private RuleDao ruleDao; @Autowired private SendMailUtil sendMailUtil; @Autowired private TomcatMonitorDao tomcatMonitorDao; @Autowired private CompMonitorDao compMonitorDao; @Autowired private CompExceptionMessageDao compExceptionMessageDao; public void startMonitor() { new MonitorTomcatThread().start(); } public void sendMonitorUrl(Component component, String subUrl) { String url = component.createCompUrl() + subUrl; String result = ""; try { result = HttpClientUtil.get(url, "utf-8", null); logger.info(result); analyResult(result, component, subUrl); } catch (Exception e) { logger.error(e.getMessage(), e); setCompErrorState(component); sendErrorMessageMail(component.getId().getIp(), component.getId() .getPort(), component.getType(), e.getMessage(), Utils.getExceptionStacks(e)); } } public void analyResult(String result, Component component, String subUrl) throws IllegalAccessException, InvocationTargetException { if (StringUtils.isNotBlank(result)) { if (subUrl.equals(ControllerConstant.MONITOR_TOMCAT_URL)) { analyTomcatResult(result, component); } if (subUrl.equals(ControllerConstant.MONITOR_COMP_URL)) { analyCompResult(result, component); } } } public void analyTomcatResult(String result, Component component) throws IllegalAccessException, InvocationTargetException { TomcatMonitorData data = JSON.parseObject(result, TomcatMonitorData.class); TomcatMonitor tomcatMonitor = new TomcatMonitor(); BeanUtils.copyProperties(tomcatMonitor, data); tomcatMonitor.setIp(component.getId().getIp()); tomcatMonitor.setPort(component.getId().getPort()); tomcatMonitorDao.save(tomcatMonitor); } public void analyCompResult(String result, Component component) throws IllegalAccessException, InvocationTargetException { CompMonitorData data = JSON.parseObject(result, CompMonitorData.class); CompMonitor cm = new CompMonitor(); BeanUtils.copyProperties(cm, data); cm.setIp(component.getId().getIp()); cm.setPort(component.getId().getPort()); compMonitorDao.save(cm); } public void setCompErrorState(Component component) { component.setState(ControllerConstant.ComponentState.ERROR.getValue()); componentDao.save(component); } public void saveErrorMessage(String ip, int port, String compType, String message, String stacks) { CompExceptionMessage compExceptionMessage = new CompExceptionMessage(); compExceptionMessage.setIp(ip); compExceptionMessage.setPort(port); compExceptionMessage.setCompType(compType); compExceptionMessage.setMessage(message); compExceptionMessageDao.save(compExceptionMessage); sendErrorMessageMail(ip, port, compType, message, stacks); } public void sendErrorMessageMail(String ip, int port, String compType, String message, String stacks) { MailParams mailParams = new MailParams(); mailParams.setSubject(ControllerConstant.MAIL_ERROR_SUBJECT); Map<String, String> params = new HashMap<String, String>(); params.put("ip", ip); params.put("port", String.valueOf(port)); params.put("type", compType); params.put("errorMessage", message); params.put("errorStack", stacks); String text = sendMailUtil.getHtmlTextFromFreeMarker("errorMail.ftl", params); mailParams.setBody(text); mailParams.setHtml(true); mailParams.setTo(ControllerConstant.MAIL_TO); try { sendMailUtil.sendMail(mailParams); } catch (Exception t) { logger.error(t.getMessage(), t); } } class MonitorTomcatThread extends Thread { @Override public void run() { while (true) { monitor(); } } private void monitor() { Rule monitorRule = ruleDao.getRuleByName("monitorTime"); int time = Integer.valueOf(monitorRule.getRuleValue()); try { Thread.sleep(time * DateUtil.MILLIS_PER_MINUTE); } catch (InterruptedException e) { logger.error(e.getMessage(), e); } List<Component> components = componentDao .getComponentsByState(ControllerConstant.ComponentState.NORMAL .getValue()); for (Component component : components) { sendMonitorUrl(component, ControllerConstant.MONITOR_TOMCAT_URL); sendMonitorUrl(component, ControllerConstant.MONITOR_COMP_URL); } } } @Override public void afterPropertiesSet() throws Exception { startMonitor(); } }
[ "yanweiqi@gintong.com" ]
yanweiqi@gintong.com
976c645386907099d4e4d088f9dff459352fb692
6cbbdc9bfd93b4313bc0921fc7695c562454fc93
/Auxiliary/RainTicker.java
c3bbdeb66979f8038ce3c8acb38c9f3d12c48847
[]
no_license
Graagh/DragonAPI
3e3e5eb346c9afd5b2aa277f985727bf75096e2f
696f7ff7953578a0d517308327c9f61ea7c245bf
refs/heads/master
2021-01-01T17:25:02.117007
2017-07-18T01:33:00
2017-07-18T01:33:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,569
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2016 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.DragonAPI.Auxiliary; import java.util.EnumSet; import java.util.Random; import java.util.Set; import net.minecraft.block.Block; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.storage.ExtendedBlockStorage; import Reika.DragonAPI.Auxiliary.Trackers.TickRegistry.TickHandler; import Reika.DragonAPI.Auxiliary.Trackers.TickRegistry.TickType; import cpw.mods.fml.common.gameevent.TickEvent.Phase; public class RainTicker implements TickHandler { private int updateLCG = new Random().nextInt(); private static final int TICKS_PER_CHUNK = 2; // base vanilla is 3 public static final RainTicker instance = new RainTicker(); private RainTicker() { } @Override public void tick(TickType type, Object... tickData) { World world = (World)tickData[0]; if (world.isRaining()) { for (ChunkCoordIntPair c : ((Set<ChunkCoordIntPair>)world.activeChunkSet)) { Chunk chunk = world.getChunkFromChunkCoords(c.chunkXPos, c.chunkZPos); int cx = c.chunkXPos << 4; int cz = c.chunkZPos << 4; ExtendedBlockStorage[] ext = chunk.getBlockStorageArray(); for (int idx = 0; idx < ext.length; ++idx) { ExtendedBlockStorage extb = ext[idx]; if (extb != null && extb.getNeedsRandomTick()) { int cy = extb.getYLocation(); for (int n = 0; n < TICKS_PER_CHUNK; n++) { updateLCG = updateLCG * 3 + 1013904223; int pos = updateLCG >> 2; int dx = pos & 15; int dz = pos >> 8 & 15; BiomeGenBase b = world.getBiomeGenForCoords(dx, dz); if (b.canSpawnLightningBolt()) { int dy = pos >> 16 & 15; if (world.canBlockSeeTheSky(dx, dy + 1, dz)) { Block block = extb.getBlockByExtId(dx, dy, dz); if (block.getTickRandomly()) { block.updateTick(world, cx + dx, cy + dy, cz + dz, world.rand); } } } } } } } } } @Override public EnumSet<TickType> getType() { return EnumSet.of(TickType.WORLD); } @Override public boolean canFire(Phase p) { return p == Phase.START; } @Override public String getLabel() { return "Rain Tick"; } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
66fd097d826be908f446ee890bfcf00005be56ef
637817184196b8d73130958fc1fc0b27833d8d92
/aprint-core/src/main/java/org/barrelorgandiscovery/model/steps/scripts/ModelGroovyScript.java
f1f615e09141c96120980f4242d0a5c59c5a11c5
[]
no_license
barrelorgandiscovery/aprintproject
daad59e1e52e6e8e4187f943de95b79622827c81
ebc932c50d3116a4bbe9802910eac097151b1625
refs/heads/master
2023-06-28T03:11:25.779074
2023-05-08T12:15:27
2023-05-08T12:15:27
258,808,541
2
0
null
2023-05-08T09:50:33
2020-04-25T15:24:59
Java
UTF-8
Java
false
false
1,653
java
package org.barrelorgandiscovery.model.steps.scripts; import java.util.Collection; import java.util.Map; import org.barrelorgandiscovery.model.ModelParameter; import org.barrelorgandiscovery.model.ModelType; import org.barrelorgandiscovery.model.SinkSource; import org.barrelorgandiscovery.model.type.GenericSimpleType; import org.barrelorgandiscovery.model.type.JavaType; import org.barrelorgandiscovery.virtualbook.Hole; /** * base class for model script, provide helpers for implementing model scripts * * @author pfreydiere * */ public abstract class ModelGroovyScript { public String getLabel() { return "Script box"; } /** * configure stage parameters * * @return * @throws Exception */ public abstract ModelParameter[] configureParameters() throws Exception; /** * create a hole type * * @return */ protected ModelType newHolesType() { return new GenericSimpleType(Collection.class, new Class[] { Hole.class }); } /** * create a simple java type * @param clazz * @return */ protected ModelType newJavaType(Class clazz) { return new JavaType(clazz); } /** * create a new parameter * * @param isIn * @param name * @param type * @return */ protected ModelParameter newParameter(boolean isIn, String name, ModelType type) { ModelParameter p = new ModelParameter(); p.setName(name); p.setIn(isIn); p.setType(type); return p; } /** * execute the step * * @param parameterValues * @return output parameters values * @throws Exception */ public abstract Map<String, Object> execute(Map<String, Object> parameterValues) throws Exception; }
[ "frett27@gmail.com" ]
frett27@gmail.com
cc4babab343920d9b163e7529d6a73735290a081
969cc3e499089eafc2503ecba638673625d8f98d
/1.7.10/1/AM2-1.7.10-FakePlayers-1.4.0.009/sources/src/main/java/am2/spell/components/Light.java
fbb5375774986c67d215d4dd11f5e407eaa80e42
[]
no_license
will-git-eng/FixedMods
d33895820eb48caabbbc4dbfd82a47ea409df603
ffbea738863505cf74bccac3f02ab62cd894d99f
refs/heads/master
2020-06-06T10:52:12.121044
2019-06-19T15:08:59
2019-06-19T15:08:59
192,719,248
0
1
null
null
null
null
UTF-8
Java
false
false
6,472
java
package am2.spell.components; import java.util.EnumSet; import java.util.Random; import ru.will.git.am2.ModUtils; import ru.will.git.reflectionmedic.util.EventUtils; import am2.AMCore; import am2.RitualShapeHelper; import am2.api.blocks.MultiblockStructureDefinition; import am2.api.power.IPowerNode; import am2.api.spell.component.interfaces.IRitualInteraction; import am2.api.spell.component.interfaces.ISpellComponent; import am2.api.spell.component.interfaces.ISpellModifier; import am2.api.spell.enums.Affinity; import am2.api.spell.enums.SpellModifiers; import am2.blocks.BlocksCommonProxy; import am2.buffs.BuffEffectIllumination; import am2.items.ItemOre; import am2.items.ItemRune; import am2.items.ItemsCommonProxy; import am2.particles.AMParticle; import am2.power.PowerNodeRegistry; import am2.spell.SpellUtils; import am2.spell.modifiers.Colour; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class Light implements ISpellComponent, IRitualInteraction { @Override public boolean applyEffectBlock(ItemStack stack, World world, int x, int y, int z, int face, double impactX, double impactY, double impactZ, EntityLivingBase caster) { if (world.getBlock(x, y, z) == BlocksCommonProxy.obelisk) { ItemStack[] reagents = RitualShapeHelper.instance.checkForRitual(this, world, x, y, z); if (reagents != null) { EntityPlayer player = caster instanceof EntityPlayer ? (EntityPlayer) caster : ModUtils.getModFake(world); if (EventUtils.cantBreak(player, x, y, z)) return false; if (!world.isRemote) { RitualShapeHelper.instance.consumeRitualReagents(this, world, x, y, z); RitualShapeHelper.instance.consumeRitualShape(this, world, x, y, z); world.setBlock(x, y, z, BlocksCommonProxy.celestialPrism); PowerNodeRegistry.For(world).registerPowerNode((IPowerNode) world.getTileEntity(x, y, z)); } return true; } } if (world.getBlock(x, y, z) == Blocks.air) face = -1; if (face != -1) switch (face) { case 0: --y; break; case 1: ++y; break; case 2: --z; break; case 3: ++z; break; case 4: --x; break; case 5: ++x; } if (world.getBlock(x, y, z) != Blocks.air) return false; else { EntityPlayer player = caster instanceof EntityPlayer ? (EntityPlayer) caster : ModUtils.getModFake(world); if (EventUtils.cantBreak(player, x, y, z)) return false; if (!world.isRemote) world.setBlock(x, y, z, BlocksCommonProxy.blockMageTorch, this.getColorMeta(stack), 2); return true; } } private int getColorMeta(ItemStack spell) { int meta = 15; int color = 16777215; if (SpellUtils.instance.modifierIsPresent(SpellModifiers.COLOR, spell, 0)) { ISpellModifier[] mods = SpellUtils.instance.getModifiersForStage(spell, 0); int ordinalCount = 0; for (ISpellModifier mod : mods) if (mod instanceof Colour) { byte[] data = SpellUtils.instance.getModifierMetadataFromStack(spell, mod, 0, ordinalCount++); color = (int) mod.getModifier(SpellModifiers.COLOR, (EntityLivingBase) null, (Entity) null, (World) null, data); } } for (int i = 0; i < 16; ++i) { ItemDye var10000 = (ItemDye) Items.dye; if (ItemDye.field_150922_c[i] == color) { meta = i; break; } } return meta; } @Override public boolean applyEffectEntity(ItemStack stack, World world, EntityLivingBase caster, Entity target) { if (target instanceof EntityLivingBase) { if (target.isDead || EventUtils.cantDamage(caster, target)) return false; int duration = SpellUtils.instance.getModifiedInt_Mul(600, stack, caster, target, world, 0, SpellModifiers.DURATION); duration = SpellUtils.instance.modifyDurationBasedOnArmor(caster, duration); if (!world.isRemote) ((EntityLivingBase) target).addPotionEffect(new BuffEffectIllumination(duration, SpellUtils.instance.countModifiers(SpellModifiers.BUFF_POWER, stack, 0))); return true; } else return false; } @Override public float manaCost(EntityLivingBase caster) { return 50.0F; } @Override public float burnout(EntityLivingBase caster) { return 10.0F; } @Override public ItemStack[] reagents(EntityLivingBase caster) { return null; } @Override public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier) { for (int i = 0; i < 5; ++i) { AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "sparkle2", x, y, z); if (particle != null) { particle.addRandomOffset(1.0D, 0.5D, 1.0D); particle.addVelocity(rand.nextDouble() * 0.2D - 0.1D, rand.nextDouble() * 0.2D, rand.nextDouble() * 0.2D - 0.1D); particle.setAffectedByGravity(); particle.setDontRequireControllers(); particle.setMaxAge(5); particle.setParticleScale(0.1F); particle.setRGBColorF(0.6F, 0.2F, 0.8F); if (colorModifier > -1) particle.setRGBColorF((colorModifier >> 16 & 255) / 255.0F, (colorModifier >> 8 & 255) / 255.0F, (colorModifier & 255) / 255.0F); } } } @Override public EnumSet<Affinity> getAffinity() { return EnumSet.of(Affinity.NONE); } @Override public int getID() { return 33; } @Override public Object[] getRecipeItems() { Object[] var10000 = new Object[4]; ItemRune var10007 = ItemsCommonProxy.rune; var10000[0] = new ItemStack(ItemsCommonProxy.rune, 1, 15); var10000[1] = BlocksCommonProxy.cerublossom; var10000[2] = Blocks.torch; var10000[3] = BlocksCommonProxy.vinteumTorch; return var10000; } @Override public float getAffinityShift(Affinity affinity) { return 0.01F; } @Override public MultiblockStructureDefinition getRitualShape() { return RitualShapeHelper.instance.purification; } @Override public ItemStack[] getReagents() { ItemStack[] var10000 = new ItemStack[2]; ItemOre var10007 = ItemsCommonProxy.itemOre; var10000[0] = new ItemStack(ItemsCommonProxy.itemOre, 1, 7); var10000[1] = new ItemStack(ItemsCommonProxy.manaFocus); return var10000; } @Override public int getReagentSearchRadius() { return 3; } }
[ "lbvrf090@mail.ru" ]
lbvrf090@mail.ru
21fa15e7408d69ffc1861caea817251e954d6c16
8bc703b99f417c4e066ec7e009c3b14e2135d905
/src/test/java/pro/devlib/paribas/service/BnpParibasServiceTest.java
472118fe3c78411037894a78140b865edfea1c44
[]
no_license
CaymanJava/bnp-parser
11a697d279a13f4db4358036d00e70334739eca9
2d1ddfac151285dd464418c23869a7185fad41b1
refs/heads/master
2021-01-21T14:53:11.709787
2017-07-13T14:52:55
2017-07-13T14:52:55
95,352,480
0
0
null
null
null
null
UTF-8
Java
false
false
2,080
java
package pro.devlib.paribas.service; import org.junit.Ignore; import org.junit.Test; import pro.devlib.paribas.exception.BadCredentialsException; import pro.devlib.paribas.exception.IncorrectParameterException; import pro.devlib.paribas.model.Account; import pro.devlib.paribas.model.UserFinances; import static junit.framework.TestCase.assertTrue; public class BnpParibasServiceTest { // To run those tests fill in login and password. // Make sure that user has accounts, cards and every account has at least one transaction. @Test @Ignore public void getUserFinancesWithHttpUnit() throws Exception { getUserFinances(true); } @Test @Ignore public void getUserFinancesWithApache() throws Exception { getUserFinances(false); } @Test(expected = BadCredentialsException.class) public void badCredentialsTest() throws Exception { String login = "blabla"; String password = "blabla123!"; BnpParibasService bnpParibasService = new BnpParibasService(login, password); bnpParibasService.execute(); } @Test(expected = IncorrectParameterException.class) public void badMonthsToParseParameterTest() throws Exception { String login = "blabla"; String password = "blabla123!"; BnpParibasService bnpParibasService = new BnpParibasService(login, password); bnpParibasService.setMonthsToParse(-10); bnpParibasService.execute(); } private void getUserFinances(boolean useHttpUnit) throws Exception { String login = ""; String password = ""; BnpParibasService bnpParibasService = new BnpParibasService(login, password); bnpParibasService.setUseHttpUnit(useHttpUnit); bnpParibasService.setMonthsToParse(6); UserFinances userFinances = bnpParibasService.execute(); assertTrue(userFinances != null); assertTrue(userFinances.getAccounts() != null); assertTrue(userFinances.getAccounts().size() > 0); assertTrue(userFinances.getCards().size() > 0); for (Account account : userFinances.getAccounts()) { assertTrue(account.getTransactions().size() > 0); } } }
[ "bosenko_dmitriy@mail.ru" ]
bosenko_dmitriy@mail.ru
04ebe9b1dc014ecf9957d085358816b968bfe296
aecffb5cc456d31f938774a02de30c062fee726b
/sources/com/sec/android/app/clockpackage/worldclock/viewmodel/WorldclockListViewActionMode$$Lambda$1.java
c79b991b114c68c2422dff43429904da2e3ef32e
[]
no_license
Austin-Chow/SamsungClock10.0.04.3
6d48abd288f3b182a6520315ef526163a94b0278
5523378f7fea1bf462248fddf52a7828ff2de0a9
refs/heads/master
2020-06-29T12:44:41.353764
2019-08-04T20:47:14
2019-08-04T20:47:14
200,538,351
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
package com.sec.android.app.clockpackage.worldclock.viewmodel; import android.view.View; import android.view.View.OnClickListener; import java.lang.invoke.LambdaForm.Hidden; final /* synthetic */ class WorldclockListViewActionMode$$Lambda$1 implements OnClickListener { private final WorldclockListViewActionMode arg$1; private WorldclockListViewActionMode$$Lambda$1(WorldclockListViewActionMode worldclockListViewActionMode) { this.arg$1 = worldclockListViewActionMode; } public static OnClickListener lambdaFactory$(WorldclockListViewActionMode worldclockListViewActionMode) { return new WorldclockListViewActionMode$$Lambda$1(worldclockListViewActionMode); } @Hidden public void onClick(View view) { this.arg$1.lambda$initMultiSelectActionBar$0(view); } }
[ "myemail" ]
myemail
7d2ffc958193e8d7a346c2d8a739f460ec151d92
d8d2e5b940bfa0d2667228a32a7a2778d3d523af
/mycellar-java/mycellar-interfaces/mycellar-interface-client-web/src/main/java/fr/peralta/mycellar/interfaces/client/web/components/stock/edit/DrinkBottlesEditPanel.java
348b19605550b1f5eabf5f5a149fe80bb0646901
[]
no_license
framiere/mycellar
1143cc284c3b096d38f8c357355cc5a610de52ee
e206a8971f7b0988cf55aa70faba338b71634e99
refs/heads/master
2021-01-18T05:49:38.152662
2012-12-23T07:03:29
2012-12-23T07:03:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,632
java
/* * Copyright 2011, MyCellar * * This file is part of MyCellar. * * MyCellar is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * MyCellar is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MyCellar. If not, see <http://www.gnu.org/licenses/>. */ package fr.peralta.mycellar.interfaces.client.web.components.stock.edit; import java.util.List; import org.apache.wicket.event.IEventSource; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.FormComponentPanel; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.PropertyListView; import fr.peralta.mycellar.domain.stock.DrinkBottle; import fr.peralta.mycellar.interfaces.client.web.behaviors.NotEmptyCollectionValidator; import fr.peralta.mycellar.interfaces.client.web.components.shared.Action; import fr.peralta.mycellar.interfaces.client.web.components.shared.ActionLink; /** * @author speralta */ public class DrinkBottlesEditPanel extends FormComponentPanel<List<DrinkBottle>> { private static class DrinkBottlesView extends PropertyListView<DrinkBottle> { private static final long serialVersionUID = 201108082321L; /** * @param id */ public DrinkBottlesView(String id) { super(id); setReuseItems(true); } /** * {@inheritDoc} */ @Override protected void populateItem(ListItem<DrinkBottle> item) { item.add(new Label("bottle.wine.appellation.region.country.name")); item.add(new Label("bottle.wine.appellation.region.name")); item.add(new Label("bottle.wine.appellation.name")); item.add(new Label("bottle.wine.producer.name")); item.add(new Label("bottle.wine.name")); item.add(new Label("bottle.wine.vintage")); item.add(new Label("bottle.format.name")); item.add(new Label("quantity")); item.add(new WebMarkupContainer("remove").add(removeLink("removeBottle", item))); } } private static final long serialVersionUID = 201202231626L; private static final String NO_BOTTLES_COMPONENT_ID = "noBottles"; private final ActionLink addBottle; /** * @param id */ public DrinkBottlesEditPanel(String id) { super(id); add(new DrinkBottlesView("drinkBottles")); add(addBottle = new ActionLink("addBottle", Action.ADD)); add(new WebMarkupContainer(NO_BOTTLES_COMPONENT_ID) { private static final long serialVersionUID = 201108082329L; /** * {@inheritDoc} */ @Override public boolean isVisible() { return DrinkBottlesEditPanel.this.getModelObject().size() == 0; } }); add(new NotEmptyCollectionValidator()); } /** * {@inheritDoc} */ @Override protected void convertInput() { setConvertedInput(getModelObject()); } public boolean isAddBottle(IEventSource source) { return addBottle == source; } }
[ "sebastien@peralta.fr" ]
sebastien@peralta.fr
b66c3f94430ce66bf7f656f0e8811328d8e35be7
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/naver--pinpoint/400bc293ae1ce412e79bcae5d03d677bfdcea63b/before/GarbageCollectorFactoryTest.java
1c9d9d5132ac99442274b1f864f48f6934276ec6
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,373
java
/* * Copyright 2014 NAVER Corp. * * 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.navercorp.pinpoint.profiler.monitor.codahale.gc; import com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig; import com.navercorp.pinpoint.bootstrap.config.ProfilerConfig; import com.navercorp.pinpoint.profiler.context.DefaultTransactionCounter; import com.navercorp.pinpoint.profiler.context.IdGenerator; import com.navercorp.pinpoint.profiler.context.TransactionCounter; import com.navercorp.pinpoint.profiler.context.active.ActiveTraceRepository; import com.navercorp.pinpoint.profiler.context.monitor.DefaultPluginMonitorContext; import com.navercorp.pinpoint.profiler.context.monitor.PluginMonitorContext; import com.navercorp.pinpoint.profiler.monitor.codahale.AgentStatCollectorFactory; import com.navercorp.pinpoint.thrift.dto.TJvmGc; import org.junit.Test; import org.mockito.Mockito; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class GarbageCollectorFactoryTest { private final Logger logger = LoggerFactory.getLogger(this.getClass()); private AgentStatCollectorFactory newAgentStatCollectorFactory(boolean detailedMetrics) { ProfilerConfig profilerConfig = Mockito.mock(DefaultProfilerConfig.class); if (detailedMetrics) { Mockito.when(profilerConfig.isProfilerJvmCollectDetailedMetrics()).thenReturn(true); } ActiveTraceRepository activeTraceRepository = new ActiveTraceRepository(); IdGenerator idGenerator = new IdGenerator(); TransactionCounter transactionCounter = new DefaultTransactionCounter(idGenerator); PluginMonitorContext pluginMonitorContext = new DefaultPluginMonitorContext(); return new AgentStatCollectorFactory(profilerConfig, activeTraceRepository, transactionCounter, pluginMonitorContext); } @Test public void test() { AgentStatCollectorFactory agentStatCollectorFactory = newAgentStatCollectorFactory(false); GarbageCollector collector = agentStatCollectorFactory.getGarbageCollector(); logger.debug("collector.getType():{}", collector); TJvmGc collect1 = collector.collect(); logger.debug("collector.collect():{}", collect1); TJvmGc collect2 = collector.collect(); logger.debug("collector.collect():{}", collect2); } @Test public void testDetailedMetrics() { AgentStatCollectorFactory agentStatCollectorFactory = newAgentStatCollectorFactory(true); GarbageCollector collector = agentStatCollectorFactory.getGarbageCollector(); logger.debug("collector.getType():{}", collector); TJvmGc collect1 = collector.collect(); logger.debug("collector.collect():{}", collect1); TJvmGc collect2 = collector.collect(); logger.debug("collector.collect():{}", collect2); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
f78b9112324eb193a513edbb67321e252a2d8207
b39d7e1122ebe92759e86421bbcd0ad009eed1db
/sources/android/os/ProcrankProto.java
dc8cb94808e0a644b17039abfaa17fc5c2d15c2e
[]
no_license
AndSource/miuiframework
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
cd456214274c046663aefce4d282bea0151f1f89
refs/heads/master
2022-03-31T11:09:50.399520
2020-01-02T09:49:07
2020-01-02T09:49:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
package android.os; public final class ProcrankProto { public static final long PROCESSES = 2246267895809L; public static final long SUMMARY = 1146756268034L; public final class Process { public static final long CMDLINE = 1138166333450L; public static final long PID = 1120986464257L; public static final long PSS = 1112396529668L; public static final long PSWAP = 1112396529671L; public static final long RSS = 1112396529667L; public static final long SWAP = 1112396529670L; public static final long USS = 1112396529669L; public static final long USWAP = 1112396529672L; public static final long VSS = 1112396529666L; public static final long ZSWAP = 1112396529673L; } public final class Summary { public static final long RAM = 1146756268035L; public static final long TOTAL = 1146756268033L; public static final long ZRAM = 1146756268034L; public final class Ram { public static final long RAW_TEXT = 1138166333441L; } public final class Zram { public static final long RAW_TEXT = 1138166333441L; } } }
[ "shivatejapeddi@gmail.com" ]
shivatejapeddi@gmail.com
ffa53c17f1f41b23614c71c8fb442dcc571f76a6
4dfc9549c1be20a727fc0feb2594e36526a17ab7
/Lesson5/JAVA/Problem5/src/ru/geekbrain/Main.java
2d668901b2b74101e4624cdad1854ba271e19fcd
[]
no_license
DwarfPorter/Interview
6c5bf11b16dfc6689ecec2a6e44dbe3476154870
e8fbca2f16faa65c199fff0c36fca242d9149d97
refs/heads/master
2021-06-14T03:27:59.391556
2020-10-23T15:43:42
2020-10-23T15:43:42
100,819,393
1
23
null
2020-10-23T19:26:56
2017-08-19T20:22:56
Java
UTF-8
Java
false
false
288
java
package ru.geekbrain; public class Main { public static void main(String[] args) { Integer i1 = 64; Integer i2 = 64; Integer i3 = 256; Integer i4 = 256; System.out.println(i1 == i2); System.out.println(i3 == i4); } }
[ "mrvlmor@gmail.com" ]
mrvlmor@gmail.com
c5ea1a4a54aa2fe4250f4b8517b6d6fa1825f95e
6491c3a11f29a4fd36bd19561f8d5acae3ad981d
/module-template/module-elasticsearch/src/main/java/com/wjs/elasticsearch/elastic/index/DefaultIndexManage.java
6a48bda5717e36691fa3309aa0d8d0ebea97059d
[]
no_license
wjs1989/spring-cloud-template
89c7c760b178e2005f41801479c89081ded0a1a7
2f967c15d392d9def8732154480545fc070d8294
refs/heads/master
2023-06-18T18:02:09.066094
2021-07-13T10:32:27
2021-07-13T10:32:27
289,705,639
0
0
null
null
null
null
UTF-8
Java
false
false
3,298
java
package com.wjs.elasticsearch.elastic.index; import com.wjs.elasticsearch.elastic.annotations.EsDocument; import com.wjs.elasticsearch.elastic.index.strategy.DirectElasticSearchIndexStrategy; import com.wjs.elasticsearch.elastic.index.strategy.ElasticSearchIndexStrategy; import com.wjs.elasticsearch.elastic.index.strategy.MonthElasticSearchIndexStrategy; import org.apache.commons.lang3.StringUtils; import java.util.HashMap; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; /** * @author wenjs */ public class DefaultIndexManage implements IndexManage { public HashMap<Class, IndexDetial> indexClassMap = new HashMap<>(); public HashMap<String, IndexDetial> indexStringMap = new HashMap<>(); public HashMap<String, ElasticSearchIndexStrategy> indexStrategy = new HashMap<>(); public String wrapIndex(String index) { return index.toLowerCase(); } private IndexDetial getIndex(Class clasz) { IndexDetial index = indexClassMap.get(clasz); if (Objects.isNull(index)) { EsDocument annotation = (EsDocument) clasz.getDeclaredAnnotation(EsDocument.class); if (annotation == null) { throw new RuntimeException(String.format("class name: %s can not find Annotation [EsDocument], please check", clasz.getName())); } index = new IndexDetial(annotation.strategy(), wrapIndex(annotation.index())); indexClassMap.put(clasz, index); indexStringMap.put(index.getIndex(), index); } return index; } @Override public String getIndexForSearch(String index) { IndexDetial indexDetial = indexStringMap.get(index); return getElasticSearchIndexStrategy(indexDetial.getStrategy()) .getIndexForSearch(indexDetial.getIndex()); } @Override public String getIndexForSave(String index) { IndexDetial indexDetial = indexStringMap.get(index); return getElasticSearchIndexStrategy(indexDetial.getStrategy()) .getIndexForSave(indexDetial.getIndex()); } @Override public String getIndexForSearch(Class clasz) { IndexDetial index = getIndex(clasz); return getElasticSearchIndexStrategy(index.getStrategy()).getIndexForSearch(index.getIndex()); } @Override public String getIndexForSave(Class clasz) { IndexDetial index = getIndex(clasz); return getElasticSearchIndexStrategy(index.getStrategy()).getIndexForSave(index.getIndex()); } ElasticSearchIndexStrategy getElasticSearchIndexStrategy(String strategy) { return indexStrategy.getOrDefault(strategy, indexStrategy.get("direct")); } static class IndexDetial { private String index; private String strategy; public IndexDetial(String strategy, String index) { this.strategy = strategy; this.index = index; } public String getStrategy() { return strategy; } public String getIndex() { return index; } } public DefaultIndexManage() { indexStrategy.put("direct", new DirectElasticSearchIndexStrategy()); indexStrategy.put("month", new MonthElasticSearchIndexStrategy()); } }
[ "wenjs001@163.com" ]
wenjs001@163.com
f628c90a6d1ca0f17bd2806bbef0095b942654e5
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketImplTest.java
9f1605c5686126851f937ea6915b0df654e62563
[ "MIT", "Apache-2.0" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
4,678
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.luni.tests.java.net; import java.io.FileDescriptor; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; import java.net.SocketAddress; import java.net.SocketException; import java.net.SocketImpl; public class SocketImplTest extends junit.framework.TestCase { /** * @tests java.net.SocketImpl#SocketImpl() */ public void test_Constructor_fd() { // Regression test for HARMONY-1117 MockSocketImpl mockSocketImpl = new MockSocketImpl(); assertNull(mockSocketImpl.getFileDescriptor()); } /** * @tests java.net.SocketImpl#setPerformancePreference() */ public void test_setPerformancePreference_Int_Int_Int() { MockSocketImpl theSocket = new MockSocketImpl(); theSocket.setPerformancePreference(1, 1, 1); } /** * @tests java.net.SocketImpl#shutdownOutput() */ public void test_shutdownOutput() { MockSocketImpl s = new MockSocketImpl(); try { s.shutdownOutput(); fail("This method is still not implemented yet,It should throw IOException."); } catch (IOException e) { // expected } } /** * @tests java.net.SocketImpl#shutdownInput() */ public void test_shutdownInput() { MockSocketImpl s = new MockSocketImpl(); try { s.shutdownInput(); fail("This method is still not implemented yet,It should throw IOException."); } catch (IOException e) { // Expected } } /** * @tests java.net.SocketImpl#supportsUrgentData() */ public void test_supportsUrgentData() { MockSocketImpl s = new MockSocketImpl(); assertFalse(s.testSupportsUrgentData()); } // the mock class for test, leave all methods empty class MockSocketImpl extends SocketImpl { protected void accept(SocketImpl newSocket) throws IOException { } protected int available() throws IOException { return 0; } protected void bind(InetAddress address, int port) throws IOException { } protected void close() throws IOException { } protected void connect(String host, int port) throws IOException { } protected void connect(InetAddress address, int port) throws IOException { } protected void create(boolean isStreaming) throws IOException { } protected InputStream getInputStream() throws IOException { return null; } public Object getOption(int optID) throws SocketException { return null; } protected OutputStream getOutputStream() throws IOException { return null; } protected void listen(int backlog) throws IOException { } public void setOption(int optID, Object val) throws SocketException { } protected void connect(SocketAddress remoteAddr, int timeout) throws IOException { } protected void sendUrgentData(int value) throws IOException { } public void setPerformancePreference(int connectionTime, int latency, int bandwidth) { super.setPerformancePreferences(connectionTime, latency, bandwidth); } public FileDescriptor getFileDescriptor() { return super.getFileDescriptor(); } public void shutdownOutput() throws IOException { super.shutdownOutput(); } public void shutdownInput() throws IOException{ super.shutdownInput(); } public boolean testSupportsUrgentData() { return super.supportsUrgentData(); } } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
09c70ab91d6efd17875975d1d3db48483907403c
6b2542400a56de686a7f84978fd6df4c45fc056a
/app-vo/src/main/java/com/blackstrawai/keycontact/vendor/VendorFinanceVo.java
89e296fa7d1449399c020d333f2d98c82cb36709
[]
no_license
BhargavMaddikera-BM/erp_fintech
adb6f2bb8b9b4e555930a1714b90a57603cc055c
ea78162e490f46adb998ca8a4e935c2aa144a753
refs/heads/master
2023-03-14T15:40:04.206288
2021-02-26T09:23:48
2021-02-26T09:23:48
342,523,642
0
0
null
null
null
null
UTF-8
Java
false
false
1,626
java
package com.blackstrawai.keycontact.vendor; import java.sql.Timestamp; public class VendorFinanceVo { private Integer id; private Integer currencyId; private Integer paymentTermsid; private Integer sourceOfSupplyId; private Integer tdsId; private String openingBalance; private Timestamp createTs; private Timestamp updateTs; private Integer vendorId; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getCurrencyId() { return currencyId; } public void setCurrencyId(Integer currencyId) { this.currencyId = currencyId; } public Integer getPaymentTermsid() { return paymentTermsid; } public void setPaymentTermsid(Integer paymentTermsid) { this.paymentTermsid = paymentTermsid; } public Integer getSourceOfSupplyId() { return sourceOfSupplyId; } public void setSourceOfSupplyId(Integer sourceOfSupplyId) { this.sourceOfSupplyId = sourceOfSupplyId; } public Integer getTdsId() { return tdsId; } public void setTdsId(Integer tdsId) { this.tdsId = tdsId; } public String getOpeningBalance() { return openingBalance; } public void setOpeningBalance(String openingBalance) { this.openingBalance = openingBalance; } public Timestamp getCreateTs() { return createTs; } public void setCreateTs(Timestamp createTs) { this.createTs = createTs; } public Timestamp getUpdateTs() { return updateTs; } public void setUpdateTs(Timestamp updateTs) { this.updateTs = updateTs; } public Integer getVendorId() { return vendorId; } public void setVendorId(Integer vendorId) { this.vendorId = vendorId; } }
[ "bhargav.maddikera@blackstraw.ai" ]
bhargav.maddikera@blackstraw.ai
4f24b60bca29cfc75bbaf02592ef87fc3bd27c20
926a628796557c976c4a558a8999b3c1925f62d5
/domino-game/src/main/java/com/jule/domino/game/service/GameMaintentService.java
a8fa72502402499d3a1547f90fa527d0dbbbd71e
[]
no_license
cubemoon/domino
7f4557b04ae5730be92edbd9b19389dd180c5d89
c7c490e8f7547e13ac6cd8fa344819a4d8625667
refs/heads/master
2023-04-15T22:36:18.587446
2019-08-01T03:15:43
2019-08-01T03:15:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
785
java
package com.jule.domino.game.service; import java.util.concurrent.atomic.AtomicBoolean; /** * 游戏维护 * @author * @since 2019/2/20 13:25 */ public class GameMaintentService { public static final GameMaintentService OBJ = new GameMaintentService(); //游戏开关 - 默认是关闭的,能正常游戏,如果开启,则游戏无法正常开局 private static AtomicBoolean switched = new AtomicBoolean(false); /** * 开启维护墙 */ public void turnOn(){ switched.set(true); } /** * 关闭维护墙 */ public void turnOff(){ switched.set(false); } /** * 维护状态 * true 维护中 false 正常 */ public boolean isDefense(){ return switched.get(); } }
[ "xiaokang_0826@163.com" ]
xiaokang_0826@163.com
b7919f927ce97c65ed89b2d51ef8902026846009
e68e52d4d5eb691ba99ce9589871723777dedce4
/src/lec21/v7/Main.java
15b726f1488a6ef1914743235285b25810d16bfb
[]
no_license
Spring2019COMP401-001/Lec21
4649a6012d716a8bc4df9569b71547881ba9f862
757d9a0deb1835dc2709c9c31ea50b641a8be2d6
refs/heads/master
2020-05-07T01:23:39.987412
2018-11-19T15:48:34
2018-11-19T15:48:34
180,273,490
0
1
null
2019-04-09T02:59:04
2019-04-09T02:59:04
null
UTF-8
Java
false
false
1,010
java
package lec21.v7; public class Main { public static void main(String[] args) { CountingThread ct_a = new CountingThread("A", 5); CountingThread ct_b = new CountingThread("B", 7); CountingThread ct_c = new CountingThread("C", 10); ct_a.start(); ct_b.start(); ct_c.start(); try { ct_c.join(); System.out.println("Joined back with C"); ct_a.join(); System.out.println("Joined back with A"); ct_b.join(); System.out.println("Joined back with B"); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("Main thread done"); } } class CountingThread extends Thread { private String prefix; private int count; public CountingThread(String prefix, int count) { this.prefix = prefix; this.count = count; } public void run() { for (int i=0; i<count; i++) { System.out.println(prefix + ": " + i); try { Thread.sleep(1000); } catch (InterruptedException e) { } } } }
[ "kmp@cs.unc.edu" ]
kmp@cs.unc.edu
96e8892b31210a74818092df36453fd5647db1ad
7822eb2f86317aebf6e689da2a6708e9cc4ee1ea
/Rachio_apk/sources/com/google/android/gms/internal/zzcew.java
226b200880129b1564edfdbd52f9573f1ef19397
[ "BSD-2-Clause" ]
permissive
UCLA-ECE209AS-2018W/Haoming-Liang
9abffa33df9fc7be84c993873dac39159b05ef04
f567ae0adc327b669259c94cc49f9b29f50d1038
refs/heads/master
2021-04-06T20:29:41.296769
2018-03-21T05:39:43
2018-03-21T05:39:43
125,328,864
0
0
null
null
null
null
UTF-8
Java
false
false
1,082
java
package com.google.android.gms.internal; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; import com.google.android.gms.common.internal.safeparcel.zzd; import java.util.Iterator; public final class zzcew extends zza implements Iterable<String> { public static final Creator<zzcew> CREATOR = new zzcey(); private final Bundle zzbpJ; zzcew(Bundle bundle) { this.zzbpJ = bundle; } final Object get(String str) { return this.zzbpJ.get(str); } public final Iterator<String> iterator() { return new zzcex(this); } public final int size() { return this.zzbpJ.size(); } public final String toString() { return this.zzbpJ.toString(); } public final void writeToParcel(Parcel parcel, int i) { int zze = zzd.zze(parcel); zzd.zza$f7bef55(parcel, 2, zzyt()); zzd.zzI(parcel, zze); } public final Bundle zzyt() { return new Bundle(this.zzbpJ); } }
[ "zan@s-164-67-234-113.resnet.ucla.edu" ]
zan@s-164-67-234-113.resnet.ucla.edu
b0975a58e5bf3c99f6d5dc6c877b3339cb0c5565
dd80a584130ef1a0333429ba76c1cee0eb40df73
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/TraceFileReader.java
76b32b099c998e439c85b7b1874ed2dcaa62b178
[ "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
2,335
java
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.ide.eclipse.gltrace; import com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage; import com.google.protobuf.InvalidProtocolBufferException; import java.io.EOFException; import java.io.IOException; import java.io.RandomAccessFile; public class TraceFileReader { /** Maximum size for a protocol buffer message. * The message size is dominated by the size of the compressed framebuffer. * Currently, we assume that the maximum is for a 1080p display. Since the buffers compress * well, we should probably never get close to this. */ private static final int MAX_PROTOBUF_SIZE = 1920 * 1080 * 100; /** * Obtain the next protobuf message in this file. * @param file file to read from * @param offset offset to start reading from * @return protobuf message at given offset * @throws IOException in case of file I/O errors * @throws InvalidProtocolBufferException if protobuf is not well formed */ public GLMessage getMessageAtOffset(RandomAccessFile file, long offset) throws IOException { int len; byte[] b; try { if (offset != -1) { file.seek(offset); } len = file.readInt(); if (len > MAX_PROTOBUF_SIZE) { String msg = String.format( "Unexpectedly large (%d bytes) protocol buffer message encountered.", len); throw new InvalidProtocolBufferException(msg); } b = new byte[len]; file.readFully(b); } catch (EOFException e) { return null; } return GLMessage.parseFrom(b); } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
e809198493ed4da5e522036a2573cc6cdb92c62c
a66a4d91639836e97637790b28b0632ba8d0a4f9
/src/animal/vhdl/graphics/PTD.java
dc2842fde0feae8e430f2135642d0138a1d30235
[]
no_license
roessling/animal-av
7d0ba53dda899b052a6ed19992fbdfbbc62cf1c9
043110cadf91757b984747750aa61924a869819f
refs/heads/master
2021-07-13T05:31:42.223775
2020-02-26T14:47:31
2020-02-26T14:47:31
206,062,707
0
2
null
2020-10-13T15:46:14
2019-09-03T11:37:11
Java
UTF-8
Java
false
false
1,537
java
/** * */ package animal.vhdl.graphics; import java.awt.Graphics; /** * @author p_li * */ public class PTD extends PTFlipFlop { private static int dNr = 0; public static final String D_FLIPFLOP_TYPE_LABEL = "D"; public PTD() { this(DEFAULT_LOCATION.x, DEFAULT_LOCATION.y); } public PTD(int x, int y) { this(x, y, DEFAULT_WIDTH, DEFAULT_HEIGHT); } public PTD(int x, int y, int width, int height) { super(x, y, width, height, " D", null); this.setObjectName("d" + dNr); dNr++; } public void paint(Graphics g) { super.paint(g); // input pin inputPins.get(0).setColor(elementBody.getColor()); inputPins.get(0).paint(g); // output pin outputPins.get(0).setColor(elementBody.getColor()); outputPins.get(0).paint(g); } public Object clone() { PTD ff = new PTD(); cloneCommonFeaturesInto(ff); return ff; } protected void cloneCommonFeaturesInto(PTRS ff) { super.cloneCommonFeaturesInto(ff); ff.setObjectName(getObjectName()); } /** * @return the dNr */ public static int getDNr() { return dNr; } /** * @return the tYPE_LABEL */ public String getType() { return PTD.D_FLIPFLOP_TYPE_LABEL; } /** * returns the flip flop's object name, if the name was empty, create a new * one. * * @return the flip flop's object's name */ public String getObjectName() { if (objectName == null || objectName.length() == 0) setObjectName("d" + dNr); return objectName; } }
[ "guido@tk.informatik.tu-darmstadt.de" ]
guido@tk.informatik.tu-darmstadt.de