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
69a20f150b0a4c4e3a0cae1867f0af1915a21888
7828a219eeadd49676ea5de95e66dc3c4f378180
/object-oriented/src/com/hfm/polymorphism/AirConditioner.java
4325480f0f6029a6c2abfb290c3ef121f1c13ca3
[ "MIT" ]
permissive
hfming/core-java
14ccca48941f3395bab684713a5e1623433d2532
ef5c4e53965e3ef6857e3e7ccecd2472a2524cdc
refs/heads/master
2023-08-25T21:52:01.374660
2021-10-09T11:47:08
2021-10-09T11:47:08
223,633,168
0
0
null
null
null
null
UTF-8
Java
false
false
146
java
package com.hfm.polymorphism; /** * 接口 练习 */ interface AirConditioner { public abstract void cold(); public abstract void hot(); }
[ "hfming2016@163.com" ]
hfming2016@163.com
50e006912f378522f736cc25ca11aaf349d7ed87
9fcc80b256c63f79c1d2bba5bf44923f32b95389
/mp4parser/src/main/java/com/googlecode/mp4parser/boxes/piff/PiffSampleEncryptionBox.java
c5536cf37fb01ac19b2b4c02760fd8f7b717c2ec
[]
no_license
jiyewushen/Gallery2
e0c6e1f12a9252e27951f1975b3c4c83edc9cd67
4b22b07f26d75008ab5ca34555a3bc99276aa171
refs/heads/master
2021-03-02T04:22:46.190920
2020-05-26T08:50:12
2020-05-26T08:50:12
245,837,968
0
1
null
null
null
null
UTF-8
Java
false
false
1,183
java
package com.googlecode.mp4parser.boxes.piff; import com.googlecode.mp4parser.boxes.AbstractSampleEncryptionBox; /** * <pre> * aligned(8) class SampleEncryptionBox extends FullBox('uuid', extended_type= 0xA2394F52-5A9B-4f14-A244-6C427C648DF4, version=0, flags=0) * { * if (flags & 0x000001) * { * unsigned int(24) AlgorithmID; * unsigned int(8) IV_size; * unsigned int(8)[16] KID; * } * unsigned int (32) sample_count; * { * unsigned int(IV_size) InitializationVector; * if (flags & 0x000002) * { * unsigned int(16) NumberOfEntries; * { * unsigned int(16) BytesOfClearData; * unsigned int(32) BytesOfEncryptedData; * } [ NumberOfEntries] * } * }[ sample_count ] * } * </pre> */ public class PiffSampleEncryptionBox extends AbstractSampleEncryptionBox { /** * Creates a AbstractSampleEncryptionBox for non-h264 tracks. */ public PiffSampleEncryptionBox() { super("uuid"); } @Override public byte[] getUserType() { return new byte[]{(byte) 0xA2, 0x39, 0x4F, 0x52, 0x5A, (byte) 0x9B, 0x4f, 0x14, (byte) 0xA2, 0x44, 0x6C, 0x42, 0x7C, 0x64, (byte) 0x8D, (byte) 0xF4}; } }
[ "1308370202@qq.com" ]
1308370202@qq.com
0e298619fb470752672f75ffacac50820ef1791d
53354a86ae1ab307f1f98b825d8ad1895fde550e
/cascading-core/src/main/java/cascading/flow/planner/graph/Extent.java
df3d3883a219cb8e34b3f59f45b7501fd1835324
[ "Apache-2.0" ]
permissive
rubanm/cascading
28d42da7dd2b520a29d4d663f82faef239837644
d18f0aa121707ca9619c3865e7384e7c85ba3f11
refs/heads/wip-3.0
2020-12-25T22:31:31.475656
2015-04-03T00:23:54
2015-04-03T00:23:54
33,499,286
0
0
null
2015-04-06T18:53:45
2015-04-06T18:53:45
null
UTF-8
Java
false
false
2,137
java
/* * Copyright (c) 2007-2014 Concurrent, Inc. All Rights Reserved. * * Project and contact information: http://www.cascading.org/ * * This file is part of the Cascading 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 cascading.flow.planner.graph; import java.util.Set; import cascading.flow.FlowElement; import cascading.flow.planner.Scope; import cascading.property.ConfigDef; import cascading.tuple.Fields; /** * Enum Extent provides simple markers for the head and tail of an {@link ElementGraph} {@link FlowElement} graph. */ public enum Extent implements FlowElement { head, tail; @Override public Scope outgoingScopeFor( Set<Scope> scopes ) { return new Scope(); } @Override public Fields resolveIncomingOperationArgumentFields( Scope incomingScope ) { return null; } @Override public Fields resolveIncomingOperationPassThroughFields( Scope incomingScope ) { return null; } @Override public boolean isEquivalentTo( FlowElement element ) { return false; } @Override public ConfigDef getStepConfigDef() { return null; } @Override public boolean hasStepConfigDef() { return false; } @Override public ConfigDef getNodeConfigDef() { return null; } @Override public boolean hasNodeConfigDef() { return false; } @Override public ConfigDef getConfigDef() { return null; } @Override public boolean hasConfigDef() { return false; } @Override public String toString() { return "[" + name() + "]"; } }
[ "chris@wensel.net" ]
chris@wensel.net
aec86947240e8dde44bff83d644979067bd62347
efda23057fc5472a072e4a9d454f98af33350d6f
/library/src/main/java/com/hengda/frame/fileloader/request/OkHttpRequest.java
b47b9d7487df8ef024ef5f2dda8cc7fc7431467c
[]
no_license
lliqiang/HD_GXKJG-m
32e8c49372eb96fd432ddde3cd9c8c33e045612b
372169f2c45329f01224fe4dc6151ca23aeadbe9
refs/heads/master
2021-01-25T08:01:11.698331
2017-06-08T06:08:31
2017-06-08T06:08:31
93,699,158
0
0
null
null
null
null
UTF-8
Java
false
false
1,517
java
package com.hengda.frame.fileloader.request; import com.hengda.frame.fileloader.callback.Callback; import com.hengda.frame.fileloader.exception.Exceptions; import okhttp3.Request; import okhttp3.RequestBody; /** * Created by shiwei on 2017/1/11. */ public abstract class OkHttpRequest { protected String url; protected Object tag; protected int id; protected Request.Builder builder = new Request.Builder(); protected OkHttpRequest(String url, Object tag,int id) { this.url = url; this.tag = tag; this.id = id ; if (url == null) { Exceptions.illegalArgument("url can not be null."); } initBuilder(); } /** * 初始化一些基本参数 url , tag */ private void initBuilder() { builder.url(url).tag(tag); } protected abstract RequestBody buildRequestBody(); protected RequestBody wrapRequestBody(RequestBody requestBody, final Callback callback) { return requestBody; } protected abstract Request buildRequest(RequestBody requestBody); public RequestCall build() { return new RequestCall(this); } public Request generateRequest(Callback callback) { RequestBody requestBody = buildRequestBody(); RequestBody wrappedRequestBody = wrapRequestBody(requestBody, callback); Request request = buildRequest(wrappedRequestBody); return request; } public int getId() { return id ; } }
[ "13821062095@163.com" ]
13821062095@163.com
2542dfbc6ae6278ddae77a741e53b99e910591a1
3676ca2c16308e8894a4fd6f43218330d63febaf
/Library/MultiTheme/src/main/java/com/sunfusheng/multitheme/widget/SkinCompatAutoCompleteTextView.java
4bbad0930a136c8f3434efd65729755dd48b13bc
[]
no_license
jyyxxgz/In-depthStudy
945d16abf8703ead3de914fcff0483d33580895c
9440d1a0319f7bd771543761fdc5d96d99d82ca4
refs/heads/master
2021-04-25T11:13:15.823815
2017-11-30T05:56:19
2017-11-30T05:56:19
111,894,492
0
0
null
2017-11-24T08:29:22
2017-11-24T08:29:21
null
UTF-8
Java
false
false
4,396
java
package com.sunfusheng.multitheme.widget; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation.DrawableRes; import android.support.v4.graphics.drawable.DrawableCompat; import android.support.v7.widget.AppCompatAutoCompleteTextView; import android.support.v7.widget.TintTypedArray; import android.util.AttributeSet; import com.sunfusheng.multitheme.R; import com.sunfusheng.multitheme.res.SkinCompatResources; import static com.sunfusheng.multitheme.widget.SkinCompatHelper.INVALID_ID; public class SkinCompatAutoCompleteTextView extends AppCompatAutoCompleteTextView implements SkinCompatSupportable { private static final int[] TINT_ATTRS = { android.R.attr.popupBackground }; private int mDropDownBackgroundResId = INVALID_ID; private SkinCompatTextHelper mTextHelper; private SkinCompatBackgroundHelper mBackgroundTintHelper; public SkinCompatAutoCompleteTextView(Context context) { this(context, null); } public SkinCompatAutoCompleteTextView(Context context, AttributeSet attrs) { this(context, attrs, R.attr.autoCompleteTextViewStyle); } public SkinCompatAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs, TINT_ATTRS, defStyleAttr, 0); if (a.hasValue(0)) { mDropDownBackgroundResId = a.getResourceId(0, INVALID_ID); } a.recycle(); applyDropDownBackgroundResource(); mBackgroundTintHelper = new SkinCompatBackgroundHelper(this); mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr); mTextHelper = new SkinCompatTextHelper(this); mTextHelper.loadFromAttributes(attrs, defStyleAttr); } @Override public void setDropDownBackgroundResource(@DrawableRes int resId) { super.setDropDownBackgroundResource(resId); mDropDownBackgroundResId = resId; applyDropDownBackgroundResource(); } private void applyDropDownBackgroundResource() { mDropDownBackgroundResId = SkinCompatHelper.checkResourceId(mDropDownBackgroundResId); if (mDropDownBackgroundResId != INVALID_ID) { String typeName = getResources().getResourceTypeName(mDropDownBackgroundResId); if ("color".equals(typeName)) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { int color = SkinCompatResources.getInstance().getColor(mDropDownBackgroundResId); setDrawingCacheBackgroundColor(color); } else { ColorStateList colorStateList = SkinCompatResources.getInstance().getColorStateList(mDropDownBackgroundResId); Drawable drawable = getDropDownBackground(); DrawableCompat.setTintList(drawable, colorStateList); setDropDownBackgroundDrawable(drawable); } } else if ("drawable".equals(typeName)) { Drawable drawable = SkinCompatResources.getInstance().getDrawable(mDropDownBackgroundResId); setDropDownBackgroundDrawable(drawable); } else if ("mipmap".equals(typeName)) { Drawable drawable = SkinCompatResources.getInstance().getMipmap(mDropDownBackgroundResId); setDropDownBackgroundDrawable(drawable); } } } @Override public void setBackgroundResource(@DrawableRes int resId) { super.setBackgroundResource(resId); if (mBackgroundTintHelper != null) { mBackgroundTintHelper.onSetBackgroundResource(resId); } } @Override public void setTextAppearance(Context context, int resId) { super.setTextAppearance(context, resId); if (mTextHelper != null) { mTextHelper.onSetTextAppearance(context, resId); } } @Override public void applySkin() { if (mBackgroundTintHelper != null) { mBackgroundTintHelper.applySkin(); } if (mTextHelper != null) { mTextHelper.applySkin(); } applyDropDownBackgroundResource(); } }
[ "sfsheng0322@gmail.com" ]
sfsheng0322@gmail.com
040c4c28990c8a3add2e28d17c284a981430f846
399f59832fed21e1eabc1a9181a3ffc4f991015f
/system/src/main/java/com/delmar/sys/service/impl/ModuleJavabeanServiceImpl.java
77ed25ed94ce20cf3c1e51d1ae3e523988e342c0
[]
no_license
DelmarChina/delmar_platform
bb977778cceced17f118e2b54e24923811b2ca28
8799ab3c086d0e4fed6c2f24eda1beee87ffd76f
refs/heads/master
2021-01-22T05:10:48.713184
2016-08-16T14:36:57
2016-08-16T14:36:57
42,499,265
0
1
null
null
null
null
UTF-8
Java
false
false
1,253
java
/****************************************************************************** * 德玛国际物流有限公司 2013-07-01 * * 作者:刘大磊 * * 电话:0532-66701118 * * email:liua@delmarchina.com * *****************************************************************************/ package com.delmar.sys.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.delmar.sys.dao.ModuleJavabeanDao; import com.delmar.sys.model.ModuleJavabean; import com.delmar.sys.service.ModuleJavabeanService; import com.delmar.core.dao.CoreDao; import com.delmar.core.service.impl.CoreServiceImpl; /** * @author 刘大磊 22015-01-13 09:38:52 */ @Service("moduleJavabeanService") public class ModuleJavabeanServiceImpl extends CoreServiceImpl<ModuleJavabean> implements ModuleJavabeanService { @Autowired private ModuleJavabeanDao moduleJavabeanDao; /* (non-Javadoc) * @see CoreService.CoreServiceImpl#getCoreDao() */ @Override protected CoreDao<ModuleJavabean> getCoreDao() { return moduleJavabeanDao; } }
[ "ldlqdsdcn@gmail.com" ]
ldlqdsdcn@gmail.com
cb6e79d9dbb7c070321cfda7a89988bef8030cfd
38f7da2b61f573eee1736eaaf1ae1e9ca8f808fd
/src/com/nanoware/bll/PaySchedulePaymentBo.java
2beb484f8f6c2d818ecbcfe0c1018ade1a421483
[]
no_license
molorane/College
9e5d034a3858a7810ee4bc205036c77a88aa2b24
0d9ca3a2668e984868f504a10b40d378c02d17b8
refs/heads/master
2021-01-05T06:12:14.759915
2020-02-16T14:51:16
2020-02-16T14:51:16
240,908,879
0
0
null
null
null
null
UTF-8
Java
false
false
1,072
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.nanoware.bll; import com.nanoware.model.PaySchedulePayment; import com.nanoware.model.Tuition; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * * @author Mothusi Molorane */ public interface PaySchedulePaymentBo { public abstract int AddPaySchedulePayment(PaySchedulePayment paySchedulePayment); public abstract int EditPaySchedulePayment(PaySchedulePayment paySchedulePayment); public abstract int RemovePaySchedulePayment(int pspId); public abstract PaySchedulePayment GetPaySchedulePayment(int pspId); public abstract ArrayList<PaySchedulePayment> GetStudentPaySchedulePayments(int payscheduleId); public abstract int TransactionPaySchedule(PaySchedulePayment psp,Tuition t); public abstract List<HashMap<String,Object>> PreviousUnpaidPaySchedule(long personId, int termId, int payscheduleId); }
[ "molorane.mothusi@gmail.com" ]
molorane.mothusi@gmail.com
002ce735c5a14d64c9ebdd4bcbf83a7c17068a0a
df134b422960de6fb179f36ca97ab574b0f1d69f
/net/minecraft/server/v1_16_R2/PacketPlayInEntityAction.java
8f7c77daaf6f228f82a5ad9ab3aa150d248ba9b0
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
1,832
java
/* */ package net.minecraft.server.v1_16_R2; /* */ /* */ import java.io.IOException; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class PacketPlayInEntityAction /* */ implements Packet<PacketListenerPlayIn> /* */ { /* */ private int a; /* */ private EnumPlayerAction animation; /* */ private int c; /* */ /* */ public void a(PacketDataSerializer var0) throws IOException { /* 29 */ this.a = var0.i(); /* 30 */ this.animation = var0.<EnumPlayerAction>a(EnumPlayerAction.class); /* 31 */ this.c = var0.i(); /* */ } /* */ /* */ /* */ public void b(PacketDataSerializer var0) throws IOException { /* 36 */ var0.d(this.a); /* 37 */ var0.a(this.animation); /* 38 */ var0.d(this.c); /* */ } /* */ /* */ /* */ public void a(PacketListenerPlayIn var0) { /* 43 */ var0.a(this); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public EnumPlayerAction c() { /* 51 */ return this.animation; /* */ } /* */ /* */ public int d() { /* 55 */ return this.c; /* */ } /* */ /* */ public enum EnumPlayerAction { /* 59 */ PRESS_SHIFT_KEY, /* 60 */ RELEASE_SHIFT_KEY, /* 61 */ STOP_SLEEPING, /* 62 */ START_SPRINTING, /* 63 */ STOP_SPRINTING, /* 64 */ START_RIDING_JUMP, /* 65 */ STOP_RIDING_JUMP, /* 66 */ OPEN_INVENTORY, /* 67 */ START_FALL_FLYING; /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\PacketPlayInEntityAction.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
fc048c6f9d5ed7c50e9dca958eebf963e040cda5
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v1-release_source_from_JADX/sources/com/google/android/gms/internal/ads/zzgt.java
1d9698dad4a2aced8e7b32d5a3e11785a0243518
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
1,088
java
package com.google.android.gms.internal.ads; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; /* compiled from: com.google.android.gms:play-services-ads-base@@19.4.0 */ public class zzgt extends Binder implements IInterface { private static zzgv zzaci; protected zzgt(String str) { attachInterface(this, str); } public IBinder asBinder() { return this; } /* access modifiers changed from: protected */ public boolean zza(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { return false; } public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { boolean z; if (i > 16777215) { z = super.onTransact(i, parcel, parcel2, i2); } else { parcel.enforceInterface(getInterfaceDescriptor()); z = false; } if (z) { return true; } return zza(i, parcel, parcel2, i2); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
73939813da83236a6eef0089fc9e1844925ba578
ec88ee23b77011064e9f7a1b1dc9d189ab3bc561
/ph-ubl20/src/test/java/com/helger/ubl20/CUBL20Test.java
c6f893b7e16d58afdf9004c87c685613cddbe1c5
[ "Apache-2.0" ]
permissive
mustafaguven/ph-ubl
8a87aa404b8b0318e41924a8af0e610d36227dfa
8f17bc84e5a05394f92da5161525f4068b23ac1a
refs/heads/master
2023-04-18T03:05:58.893873
2021-05-02T18:25:57
2021-05-02T18:25:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,623
java
/** * Copyright (C) 2014-2021 Philip Helger (www.helger.com) * philip[at]helger[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.helger.ubl20; import static org.junit.Assert.assertTrue; import org.junit.Test; /** * Test class for class {@link CUBL20}. * * @author Philip Helger */ public final class CUBL20Test { @Test public void testBasic () throws Exception { assertTrue (CUBL20.XSD_CODELIST_CURRENCY_CODE.exists ()); assertTrue (CUBL20.XSD_CODELIST_LANGUAGE_CODE.exists ()); assertTrue (CUBL20.XSD_CODELIST_MIME_MEDIA_TYPE_CODE.exists ()); assertTrue (CUBL20.XSD_CODELIST_UNIT_CODE.exists ()); assertTrue (CUBL20.XSD_COMMON_AGGREGATE_COMPONENTS.exists ()); assertTrue (CUBL20.XSD_COMMON_BASIC_COMPONENTS.exists ()); assertTrue (CUBL20.XSD_COMMON_EXTENSION_COMPONENTS.exists ()); assertTrue (CUBL20.XSD_CORE_COMPONENT_PARAMETERS.exists ()); assertTrue (CUBL20.XSD_EXTENSION_CONTENT_DATA_TYPE.exists ()); assertTrue (CUBL20.XSD_QUALIFIED_DATA_TYPES.exists ()); assertTrue (CUBL20.XSD_UNQUALIFIED_DATA_TYPES.exists ()); } }
[ "philip@helger.com" ]
philip@helger.com
5eea421d70004960b471e9ab9b9003a81ec5a64d
abb4d1df22ad16b7525ff7fb7d7def97daf1bcfc
/gmall-parent/gmall-api/src/main/java/cn/com/gmall/beans/OmsCartItem.java
be5a7cd1553936a3ead5c00c97ab2fb014bbbd9a
[]
no_license
aBananaWolf/gmall
c72b6aa047f8aec75d6ab6f27183798ce63308ca
d86767f0d7e2e23701adf361cc3dd9dbb070f11b
refs/heads/master
2020-12-20T06:42:27.999092
2020-02-15T05:54:33
2020-02-15T05:54:33
235,990,906
0
0
null
null
null
null
UTF-8
Java
false
false
4,708
java
package cn.com.gmall.beans; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import java.io.Serializable; public class OmsCartItem implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column private Long productId; @Column private Long productSkuId; @Column private Long memberId; @Column private Long quantity; @Column private java.math.BigDecimal price; @Column private String sp1; @Column private String sp2; @Column private String sp3; @Column private String productPic; @Column private String productName; @Column private String productSubTitle; @Column private String productSkuCode; @Column private String memberNickname; @Column private java.sql.Timestamp createDate; @Column private java.sql.Timestamp modifyDate; @Column private Long deleteStatus; @Column private Long productCategoryId; @Column private String productBrand; @Column private String productSn; @Column private String productAttr; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getProductId() { return productId; } public void setProductId(Long productId) { this.productId = productId; } public Long getProductSkuId() { return productSkuId; } public void setProductSkuId(Long productSkuId) { this.productSkuId = productSkuId; } public Long getMemberId() { return memberId; } public void setMemberId(Long memberId) { this.memberId = memberId; } public Long getQuantity() { return quantity; } public void setQuantity(Long quantity) { this.quantity = quantity; } public java.math.BigDecimal getPrice() { return price; } public void setPrice(java.math.BigDecimal price) { this.price = price; } public String getSp1() { return sp1; } public void setSp1(String sp1) { this.sp1 = sp1; } public String getSp2() { return sp2; } public void setSp2(String sp2) { this.sp2 = sp2; } public String getSp3() { return sp3; } public void setSp3(String sp3) { this.sp3 = sp3; } public String getProductPic() { return productPic; } public void setProductPic(String productPic) { this.productPic = productPic; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public String getProductSubTitle() { return productSubTitle; } public void setProductSubTitle(String productSubTitle) { this.productSubTitle = productSubTitle; } public String getProductSkuCode() { return productSkuCode; } public void setProductSkuCode(String productSkuCode) { this.productSkuCode = productSkuCode; } public String getMemberNickname() { return memberNickname; } public void setMemberNickname(String memberNickname) { this.memberNickname = memberNickname; } public java.sql.Timestamp getCreateDate() { return createDate; } public void setCreateDate(java.sql.Timestamp createDate) { this.createDate = createDate; } public java.sql.Timestamp getModifyDate() { return modifyDate; } public void setModifyDate(java.sql.Timestamp modifyDate) { this.modifyDate = modifyDate; } public Long getDeleteStatus() { return deleteStatus; } public void setDeleteStatus(Long deleteStatus) { this.deleteStatus = deleteStatus; } public Long getProductCategoryId() { return productCategoryId; } public void setProductCategoryId(Long productCategoryId) { this.productCategoryId = productCategoryId; } public String getProductBrand() { return productBrand; } public void setProductBrand(String productBrand) { this.productBrand = productBrand; } public String getProductSn() { return productSn; } public void setProductSn(String productSn) { this.productSn = productSn; } public String getProductAttr() { return productAttr; } public void setProductAttr(String productAttr) { this.productAttr = productAttr; } }
[ "xxx" ]
xxx
e7e6cc02420196e078451675d06d3e5d009878d8
b4096683b48e67a4c9b3819df77159804a3ffd3a
/app/src/main/java/com/hui2020/huihui/Payment/RequestionOrderInfo.java
78f287e1320738ff56b41db71a3d5bea9a1c84a7
[]
no_license
lurenman/huihui
88554057034c73840ac459b6a70795207b383155
13963185e10fef70c0340469af334158c28672fd
refs/heads/master
2021-01-19T22:05:28.635242
2017-08-07T01:18:47
2017-08-07T01:18:47
82,565,941
2
0
null
null
null
null
UTF-8
Java
false
false
3,822
java
package com.hui2020.huihui.Payment; import android.app.Activity; import android.content.Intent; import android.os.AsyncTask; import android.util.Log; import com.hui2020.huihui.Login.HttpUtils; import com.hui2020.huihui.Mdfive; import com.hui2020.huihui.MyApplication; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.ProtocolException; import java.net.URL; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; /** * Created by FD-GHOST on 2017/1/12. */ public class RequestionOrderInfo extends AsyncTask<Void, Void, Boolean> { private URL url = null; private JSONObject item; private Intent intent; private Activity activity; private String orderNumber, newpassword; private String orderInfo; public RequestionOrderInfo(Activity activity, String orderNumber) { this.activity = activity; this.orderNumber = orderNumber; } @Override protected Boolean doInBackground(Void... voids) { try { url = new URL("http://m.hui2020.com/server/alipaywap/signatures_url.php"); } catch (MalformedURLException e) { e.printStackTrace(); } HttpURLConnection httpURLConnection = null; try { httpURLConnection = (HttpURLConnection) url.openConnection(); } catch (IOException e) { e.printStackTrace(); } try { httpURLConnection.setRequestMethod("POST");// 提交模式 } catch (ProtocolException e) { e.printStackTrace(); } httpURLConnection.setConnectTimeout(30000);//连接超时 单位毫秒 // conn.setReadTimeout(2000);//读取超时 单位毫秒 // 发送POST请求必须设置如下两行 httpURLConnection.setDoOutput(true); httpURLConnection.setDoInput(true); httpURLConnection.setUseCaches(false);//忽略缓存 // 获取URLConnection对象对应的输出流 PrintWriter printWriter = null; try { printWriter = new PrintWriter(httpURLConnection.getOutputStream()); } catch (IOException e) { e.printStackTrace(); return false; } // 发送请求参数 //post的参数 xx=xx&yy=yy String post = "orderCode=" + orderNumber; Log.e("GetChoiceTicket,post", post); printWriter.write(post); printWriter.flush(); InputStream is = null; try { is = httpURLConnection.getInputStream(); } catch (IOException e) { e.printStackTrace(); return false; } String result = HttpUtils.readMyInputStream(is); Log.e("GetChoiceTicket.result", result); JSONObject jsonobj = null; try { jsonobj = new JSONObject(result); } catch (JSONException e) { e.printStackTrace(); Log.e("GetChoiceTicket", "Service error"); return false; } String state = jsonobj.optString("res"); if (state.equals("0")) { return false; } else { } orderInfo = jsonobj.optString("orderInfo"); if (state.equals("0")) { return false; } else { return true; } } @Override protected void onPostExecute(final Boolean success) { if (success) { Log.e("RequestOrder","success"+orderInfo); } else { Log.e("RequestOrder","false"+orderInfo); } } }
[ "1464013886@qq.com" ]
1464013886@qq.com
dfa05a7655a8e3e30de242e3fb46ad322108c668
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/java-native-access--jna/1d6fa1485196b5d5cf16a974687d313c65bfe607/before/MSOfficeDemo.java
fed18c13b12dbc3218d22819607f106c5e3d8f8c
[]
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,517
java
package com.sun.jna.platform.win32.office; import java.io.File; import com.sun.jna.platform.win32.COM.COMException; import com.sun.jna.platform.win32.WinDef.LONG; public class MSOfficeDemo { /** * @param args */ public static void main(String[] args) { new MSOfficeDemo(); } private String currentWorkingDir = new File("").getAbsolutePath() + File.separator; public MSOfficeDemo() { this.testMSWord(); // this.testMSExcel(); } public void testMSWord() { MSWord msWord = null; LONG wdFormatPDF = new LONG(17); // PDF format. LONG wdFormatRTF = new LONG(6); // Rich text format (RTF). LONG wdFormatHTML = new LONG(8); // Standard HTML format. try { msWord = new MSWord(); System.out.println("MSWord version: " + msWord.getVersion()); msWord.setVisible(true); // msWord.newDocument(); msWord.openDocument(currentWorkingDir + "jnatest.doc", true); msWord.insertText("Hello from JNA!"); // wait 10sec. before closing Thread.currentThread().sleep(10000); // save in different formats // pdf format is only supported in MSWord 2007 and above // msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.pdf", wdFormatPDF); msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.rtf", wdFormatRTF); msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.html", wdFormatHTML); // close and save the document msWord.closeActiveDocument(true); msWord.setVisible(true); msWord.newDocument(); // msWord.openDocument(currentWorkingDir + "jnatest.doc", true); msWord.insertText("Hello from JNA!"); // close and save the document msWord.closeActiveDocument(true); // wait then close word msWord.quit(); } catch(InterruptedException ie) { ie.printStackTrace(); } catch (COMException e) { if (e.getExcepInfo() != null) { System.out .println("bstrSource: " + e.getExcepInfo().bstrSource); System.out.println("bstrDescription: " + e.getExcepInfo().bstrDescription); } // print stack trace e.printStackTrace(); if (msWord != null) msWord.quit(); } } public void testMSExcel() { MSExcel msExcel = null; try { msExcel = new MSExcel(); System.out.println("MSExcel version: " + msExcel.getVersion()); msExcel.setVisible(true); // msExcel.newExcelBook(); msExcel.openExcelBook(currentWorkingDir + "jnatest.xls", true); msExcel.insertValue("A1", "Hello from JNA!"); // wait 10sec. before closing Thread.currentThread().sleep(10000); // close and save the active sheet msExcel.closeActiveWorkbook(true); msExcel.setVisible(true); // msExcel.newExcelBook(); msExcel.openExcelBook(currentWorkingDir + "jnatest.xls", true); msExcel.insertValue("A1", "Hello from JNA!"); // close and save the active sheet msExcel.closeActiveWorkbook(true); } catch (Exception e) { e.printStackTrace(); if (msExcel != null) msExcel.quit(); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
4bc95f06d5b1fe08a44f02da8e3363ce8133c618
ccc057bde5a4e7191428472d6e4188291ab5091b
/src/main/java/com/hust/weixin/json/ErrorEntity.java
86a96b222d1b06c74b11251bf76fdb32a6eb9ec1
[]
no_license
msldd/weixin
311a395ee2eb97955e2fb537992d5e766f602cc6
ce14ee20059e1ac86d8e9dd1013ffcc13dc4e299
refs/heads/master
2020-04-17T17:54:58.952702
2017-08-05T00:46:00
2017-08-05T00:46:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
691
java
package com.hust.weixin.json; /** * 微信会返回错误码等信息 * Created by Administration on 2016/5/9. */ public class ErrorEntity { private String errcode; private String errmsg; public String getErrcode() { return errcode; } public void setErrcode(String errcode) { this.errcode = errcode; } public String getErrmsg() { return errmsg; } public void setErrmsg(String errmsg) { this.errmsg = errmsg; } @Override public String toString() { return "ErrorEntity{" + "errcode='" + errcode + '\'' + ", errmsg='" + errmsg + '\'' + '}'; } }
[ "=" ]
=
6447f78514326edf98408746c92cf13705302977
324b293633735e2c0cc9dadf94407a2bde12490b
/src/org/adligo/addoc/client/controller/AddocController.java
27e589389156443e2572482a3da0719607a9996f
[ "Apache-2.0" ]
permissive
adligo/addoc.adligo.org
d21d9ba3f8f9c8106203b84d1b9c4fa7e164e7a9
07573b8d8d20188a15309f42707a55dc8891991d
refs/heads/master
2020-05-18T06:47:57.207791
2015-04-01T05:27:17
2015-04-01T05:27:17
33,228,177
0
0
null
null
null
null
UTF-8
Java
false
false
560
java
package org.adligo.addoc.client.controller; import org.adligo.addoc.client.bi.I_Browser; import org.adligo.addoc.client.presenter.MainPresenter; import org.adligo.addoc.client.presenter.content.I_ContentManager; import org.adligo.addoc.client.view.ViewFactory; import org.adligo.css.shared.models.I_StyleSheet; public class AddocController { private MainPresenter main; public AddocController(I_StyleSheet styleSheet, I_Browser browser, I_ContentManager config) { main = new MainPresenter(new ViewFactory(styleSheet), browser, config); } }
[ "scott@adligo.com" ]
scott@adligo.com
d463cd3a0dc07f172a716ee2b715c073155877ad
97e29489566dff2c2b309aebc66c91a69db234a3
/asianpaintsb2b/asianpaintsb2bstorefront/web/src/com/asianpaintsb2b/storefront/security/impl/DefaultCommerceRedirectStrategy.java
516a0736bfdf29ab6595cbe9ed884251c510681e
[]
no_license
vamshivushakola/Home_asianpaints_b2b
f8ea6568dca3e87375a100c5d9e8f801e702404c
9ea46652e699fc843f8bb55f94a826bb1a9c4fd0
refs/heads/master
2020-12-31T04:56:13.029311
2016-05-22T18:28:48
2016-05-22T18:28:48
58,956,762
0
1
null
null
null
null
UTF-8
Java
false
false
2,002
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.asianpaintsb2b.storefront.security.impl; import de.hybris.platform.acceleratorfacades.flow.CheckoutFlowFacade; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Required; import org.springframework.security.web.DefaultRedirectStrategy; /** * A redirect strategy used in * {@link com.asianpaintsb2b.storefront.security.StorefrontAuthenticationSuccessHandler} to handle express * checkout case */ public class DefaultCommerceRedirectStrategy extends DefaultRedirectStrategy { private CheckoutFlowFacade checkoutFlowFacade; private String expressTargetUrl; @Override public void sendRedirect(final HttpServletRequest request, final HttpServletResponse response, final String url) throws IOException { String redirectUrl = url; if (Boolean.valueOf(checkoutFlowFacade.isExpressCheckoutEnabledForStore()) && StringUtils.isNotEmpty(request.getParameter("expressCheckoutEnabled"))) { redirectUrl = getExpressTargetUrl(); } super.sendRedirect(request, response, redirectUrl); } protected String getExpressTargetUrl() { return expressTargetUrl; } @Required public void setExpressTargetUrl(final String expressTargetUrl) { this.expressTargetUrl = expressTargetUrl; } protected CheckoutFlowFacade getCheckoutFlowFacade() { return checkoutFlowFacade; } @Required public void setCheckoutFlowFacade(final CheckoutFlowFacade checkoutFlowFacade) { this.checkoutFlowFacade = checkoutFlowFacade; } }
[ "vamshi.vshk@gmail.com" ]
vamshi.vshk@gmail.com
94d66b47fa2f3913a1fa71622b88f3bc70fe5501
a0cd546101594e679544d24f92ae8fcc17013142
/refactorit-core/src/test/misc/jacks/jls/definite-assignment/expressions/boolean-conditional-operator/T1615daf10.java
79104d80bb863dfc6c9cf1cfe9b0f8cf33586663
[]
no_license
svn2github/RefactorIT
f65198bb64f6c11e20d35ace5f9563d781b7fe5c
4b1fc1ebd06c8e192af9ccd94eb5c2d96f79f94c
refs/heads/master
2021-01-10T03:09:28.310366
2008-09-18T10:17:56
2008-09-18T10:17:56
47,540,746
0
1
null
null
null
null
UTF-8
Java
false
false
168
java
public class T1615daf10 { public static void main(String[] args) { boolean a = true, x; if (a ? x = false : false); else a = x; } }
[ "l950637@285b47d1-db48-0410-a9c5-fb61d244d46c" ]
l950637@285b47d1-db48-0410-a9c5-fb61d244d46c
ab72b6d71ba46ea37743475c617192c83850d636
2e03099505253f3b6077cbefc4150d053061f221
/dist/StarCompiled/7QBW_TUTORIAL/SGGWT/src/star/genetics/genetic/impl/RuleImpl.java
36e95a7999716a57ee6d333f98bc816e9dfa2c93
[]
no_license
starteam/starx
de696ecf031752c2a77761aa29665302bd3fd30d
7edd85169ca93c4ba540b1ed2f68f5b65c717405
refs/heads/master
2021-01-21T21:54:38.492058
2014-12-12T20:32:24
2014-12-12T20:32:24
9,652,555
1
0
null
2014-12-12T20:32:25
2013-04-24T16:35:48
JavaScript
UTF-8
Java
false
false
7,711
java
package star.genetics.genetic.impl; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.logging.Level; import java.util.logging.Logger; import star.genetics.beans.StringTokenizer; import star.genetics.client.Helper; import star.genetics.client.JSONableList; import star.genetics.client.JSONableMap; import star.genetics.client.MessageFormat; import star.genetics.client.Messages; import star.genetics.genetic.model.Allele; import star.genetics.genetic.model.Chromosome; import star.genetics.genetic.model.Creature; import star.genetics.genetic.model.Gene; import star.genetics.genetic.model.GeneticMakeup; import star.genetics.genetic.model.Genome; import star.genetics.genetic.model.Genome.SexType; import star.genetics.genetic.model.Model; import com.google.gwt.json.client.JSONArray; import com.google.gwt.json.client.JSONObject; public class RuleImpl implements star.genetics.genetic.model.Rule, Serializable { private static final long serialVersionUID = 1L; private JSONableList<IndividualRule> compiledRules() { return new JSONableList<IndividualRule>(data.get(COMPILEDRULES).isArray()) { @Override public IndividualRule create(JSONObject data) { String kind = Helper.unwrapString(data.get(KIND)); if ("ChromosomeRuleImpl".equals(kind)) { return new ChromosomeRuleImpl(data, getModel()); } else if ("HaploidRuleImpl".equals(kind)) { return new HaploidRuleImpl(data); } else if ("SexRuleImpl".equals(kind)) { return new SexRuleImpl(data, getModel()); } else { throw new RuntimeException("Missing rule kind"); } } @Override public void add(IndividualRule element) { JSONObject data = element.getJSON(); if (element instanceof ChromosomeRuleImpl) { data.put(KIND, Helper.wrapString("ChromosomeRuleImpl")); } else if (element instanceof HaploidRuleImpl) { data.put(KIND, Helper.wrapString("HaploidRuleImpl")); } else if (element instanceof SexRuleImpl) { data.put(KIND, Helper.wrapString("SexRuleImpl")); } else { throw new RuntimeException("Unknown rule type"); } super.add(element); } }; } private final JSONObject data; private final Model model; public Model getModel() { return model; } public RuleImpl(JSONObject data, Model model) { this.data = data; this.model = model; } public RuleImpl(String rule, HashMap<String, String> properties, Genome g, Model model) { this.model = model; data = new JSONObject(); data.put(NAME, Helper.wrapString(rule)); data.put(COMPILEDRULES, new JSONArray()); data.put(PROPERTIES, new JSONObject()); addProperties(properties); if (!isDefault()) { parseRules(rule, g); } } @Override public JSONObject getJSON() { return data; } public void addProperties(Map<String, String> properties) { for (Entry<String, String> entry : properties.entrySet()) { getProperties().put(entry.getKey(), entry.getValue()); } } public JSONableMap getProperties() { return new JSONableMap(data.get(PROPERTIES).isObject()); } String getName() { return Helper.unwrapString(data.get(NAME)); } private void parseRules(String rule, Genome g) { data.put(COMPILEDRULES, new JSONArray()); StringTokenizer ruleSplit = new StringTokenizer(rule, ";"); //$NON-NLS-1$ while (ruleSplit.hasMoreTokens()) { String oneRule = ruleSplit.nextToken().trim(); boolean isRuleParsed = false; if (!isRuleParsed) { isRuleParsed = parseSexRule(oneRule, g); } if (!isRuleParsed) { isRuleParsed = parseHaploidRule(oneRule, g); } if (!isRuleParsed) { parseOneRule(oneRule, g); } } } private boolean parseHaploidRule(String oneRule, Genome g) { boolean ret = false; String s = oneRule.trim().toLowerCase(); if (SexType.Aa.equals(g.getSexType())) { if (s.startsWith("haploid")) //$NON-NLS-1$ { ret = true; compiledRules().add(new HaploidRuleImpl()); } } return ret; } private boolean parseSexRule(String oneRule, Genome g) { boolean ret = false; String s = oneRule.trim().toLowerCase(); if (SexType.XY.equals(g.getSexType()) || SexType.XO.equals(g.getSexType())) { if (s.startsWith("sex:")) //$NON-NLS-1$ { s = s.replace(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$ if (s.equals("sex:male")) //$NON-NLS-1$ { ret = true; compiledRules().add(new SexRuleImpl(Creature.Sex.MALE, getModel())); } else if (s.equals("sex:female")) //$NON-NLS-1$ { ret = true; compiledRules().add(new SexRuleImpl(Creature.Sex.FEMALE, getModel())); } } } else if (SexType.Aa.equals(g.getSexType())) { if (s.startsWith("sex:")) //$NON-NLS-1$ { s = s.replace(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$ if (s.equals("sex:mata")) //$NON-NLS-1$ { ret = true; compiledRules().add(new SexRuleImpl(Creature.Sex.MALE, getModel())); } else if (s.equals("sex:matalpha")) //$NON-NLS-1$ { ret = true; compiledRules().add(new SexRuleImpl(Creature.Sex.FEMALE, getModel())); } } } return ret; } private void parseOneRule(String oneRule, Genome g) { int chromosomeSplit = oneRule.indexOf(':'); String chromosomeName = null; Chromosome chromosome = null; if (chromosomeSplit != -1) { chromosomeName = oneRule.substring(0, chromosomeSplit).trim(); chromosome = g.getChromosomeByName(chromosomeName); } else { int indexC = oneRule.indexOf(','); int indexS = oneRule.indexOf(' '); if (indexC == -1) { indexC = oneRule.length(); } if (indexS == -1) { indexS = oneRule.length(); } int index = Math.min(indexC, indexS); String alleleName = oneRule.substring(0, index); for (Gene gene : g.getGenes()) { if (gene.getAlleleByName(alleleName) != null) { chromosome = gene.getChromosome(); chromosomeName = chromosome.getName(); break; } } } if (chromosome != null) { String alleles = oneRule.substring(chromosomeSplit + 1).trim(); ChromosomeRuleImpl cr = makeChromosomeRule(alleles, chromosome); if (cr != null) { compiledRules().add(cr); } } else { if (!"default".equalsIgnoreCase(oneRule.trim())) //$NON-NLS-1$ { throw new RuntimeException(MessageFormat.format(Messages.getString("RuleImpl.2"), oneRule)); //$NON-NLS-1$ } } } private ChromosomeRuleImpl makeChromosomeRule(String alleles, Chromosome chromosome) { ChromosomeRuleImpl cr = new ChromosomeRuleImpl(chromosome, getModel()); StringTokenizer strandSplit = new StringTokenizer(alleles, ","); //$NON-NLS-1$ boolean add = false; int strand = 0; while (strandSplit.hasMoreTokens()) { String strandRule = strandSplit.nextToken().trim(); StringTokenizer allelesSplit = new StringTokenizer(strandRule, " "); //$NON-NLS-1$ while (allelesSplit.hasMoreTokens()) { String alleleName = allelesSplit.nextToken().trim(); Allele allele = chromosome.getAlleleByName(alleleName); if (allele != null) { cr.addAllele(strand, allele); add = true; } else { throw new RuntimeException(MessageFormat.format(Messages.getString("RuleImpl.1"), alleleName, getName())); //$NON-NLS-1$ } } strand++; } return add ? cr : null; } public boolean isDefault() { return DEFAULT.equalsIgnoreCase(getName()) || "*".equalsIgnoreCase(getName()); } public boolean isMatching(GeneticMakeup makeup, Creature.Sex sex) { boolean ret = compiledRules().size() > 0; for (IndividualRule c : compiledRules()) { ret &= c.test(makeup, sex); } return ret; } }
[ "iceraj@gmail.com" ]
iceraj@gmail.com
a74c6bf965fba0b55ecef77df8ee6384b6293274
82f029c168cb298c331f4c9f724b5590cda4b633
/src/main/java/leetcode/Q00007/Solution.java
8e999dabd5388c3eefbe49aaca779309200fa91a
[]
no_license
nokchax/algorithm
a180c37bfd59b23689ec53716ca1247eeb3c2eb1
bbf827d7b497886760d767a395937fdc853ec9bd
refs/heads/master
2023-07-14T17:06:27.084119
2021-08-24T13:37:03
2021-08-24T13:37:03
187,340,401
0
0
null
null
null
null
UTF-8
Java
false
false
677
java
package leetcode.Q00007; import java.util.Arrays; public class Solution { //how about bit operation? public int reverse(int x) { char[] nums = String.valueOf(x).toCharArray(); StringBuilder sb = new StringBuilder(); if(nums[0] == '-') { sb.append('-'); nums = Arrays.copyOfRange(nums, 1, nums.length); } for(int i = nums.length - 1 ; i >= 0 ; --i) { sb.append(nums[i]); } long parsedNum = Long.parseLong(sb.toString()); if(parsedNum > (long)Integer.MAX_VALUE || parsedNum < (long)Integer.MIN_VALUE) return 0; return (int)parsedNum; } }
[ "nokchax@gmail.com" ]
nokchax@gmail.com
565fde61f3055bfca019f303ac3d7b1cb7f18516
b098dc80fedd6a269705f04cc7ab99ca4191c7da
/Chapter02/src/Thread2_2/Thread2_2_13/innerClass/PublicClass.java
3d5f3d7441285786f3543602b42f252f9bb36b94
[]
no_license
WingedCat/Multithread
ee9eaf4b277d9d309c8611b25cec07a189a1eba9
80489a5482a2f798d248d16d286d54afc793ae47
refs/heads/master
2020-04-25T21:16:44.607837
2019-03-23T09:06:23
2019-03-23T09:06:23
173,075,598
2
0
null
null
null
null
UTF-8
Java
false
false
963
java
package Thread2_2.Thread2_2_13.innerClass; public class PublicClass { private String username; private String password; class PrivateClass{ private String age; private String address; public String getAge() { return age; } public void setAge(String age) { this.age = age; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public void printPubliProperty(){ System.out.println(username + " " + password); } } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
[ "2233749193@qq.com" ]
2233749193@qq.com
48cea366e287e85de03313cc5f9cd267508cc2c5
b44f5ca57440bc00aa8a764d7c478245bdde8416
/test/selenium/com.ibm.sbt.automation.test/src/com/ibm/sbt/test/controls/activitystream/SimpleConfig.java
46d97e17d9fd028359f8c52c6b14bb118377bc1a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
markewallace/SocialSDK
be01b910c442ca481175b87ce3ba64ab03f37492
266aeaaaa01f0e2895e7a09e9224b8b8409ddc85
refs/heads/master
2021-01-16T20:06:37.982193
2013-09-28T20:24:37
2013-09-28T20:24:37
9,450,386
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,083
java
package com.ibm.sbt.test.controls.activitystream; import static org.junit.Assert.assertTrue; import org.junit.Test; import com.ibm.sbt.automation.core.test.BaseActivityStreamTest; /* * © Copyright IBM Corp. 2012 * * 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. */ /** * @author Francis * @date 26 Mar 2013 */ public class SimpleConfig extends BaseActivityStreamTest { @Test public void testActivityStream() { assertTrue("Expected the ActivityStream to generate a news node", checkActivityStream("Social_ActivityStreams_Controls_SimpleConfig")); } }
[ "LORENZOB@ie.ibm.com" ]
LORENZOB@ie.ibm.com
cf3ba817b0f0480bfa1e722e70f10bfabed286f0
dd4f84a8e9f4b719cc8204f9459c223981dc7448
/java_multithreading_3/level5/lecture16_refactoring/human/Worker.java
5e9826397ae95de2b988e4192e7977ab92daa2d0
[]
no_license
SevenLightnapper/javarush
0ab08f532813ae20f68ea01c1b84b2ee5c5a137e
d9631957d5a17f3055e6b3013073a8ed0c8db229
refs/heads/master
2020-07-02T13:33:49.565221
2019-08-09T20:59:32
2019-08-09T20:59:32
201,534,677
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package javarush.java_multithreading_3.level5.lecture16_refactoring.human; public class Worker extends Human { private double salary; private String company; private String name; private int age; public Worker(String name, int age) { super(name, age); this.name = name; this.age = age; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } public void live() { super.live(); } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } }
[ "dairenray@gmail.com" ]
dairenray@gmail.com
e497e306aef48de3af69b42018553d2d0b92add8
842a912e8b1e9eadd25c5788b8aefda8b7e06bde
/src/com/thinkgem/jeesite/modules/productintegral/dao/ProductintegralDao.java
ca44f92f33a0600cd2b8c8ca931949bc2b811a81
[ "Apache-2.0" ]
permissive
ChenXbFrank/JZManage
741b51fc1335efffb1a8901ca7f44362c42a09d2
42bce016cca1b21c2734a975d003aeeed12f4a97
refs/heads/master
2021-04-15T10:18:42.366229
2018-03-25T04:58:53
2018-03-25T04:58:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
621
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.thinkgem.jeesite.modules.productintegral.dao; import com.thinkgem.jeesite.common.persistence.CrudDao; import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao; import com.thinkgem.jeesite.modules.productintegral.entity.Productintegral; /** * 产品积分关系DAO接口 * @author cxb * @version 2017-10-30 */ @MyBatisDao public interface ProductintegralDao extends CrudDao<Productintegral> { public Productintegral findProductByCondition(Productintegral productintegral); }
[ "810464826@qq.com" ]
810464826@qq.com
e8e62bd83921dd4e454487114a871cb8a71ccad2
468efd78d210a62ecf46091566c031016482a898
/spring-web/spring-mvc/src/main/java/jhkim105/tutorials/spring/mvc/file/UploadToUrlController.java
7f469afec302f5000ced82a8cf2371221b951d17
[]
no_license
jhkim105/tutorials
f820bf871bcebe64184e5dcb4e648daf93801490
1615ccdaa9cec5e17fc96320d651789ee1390d33
refs/heads/master
2023-08-14T05:21:56.811183
2023-08-04T00:00:52
2023-08-04T00:13:12
222,575,910
3
1
null
2023-06-14T22:55:39
2019-11-19T00:55:48
Java
UTF-8
Java
false
false
3,485
java
package jhkim105.tutorials.spring.mvc.file; import java.io.File; import java.io.IOException; import java.io.InputStream; import lombok.RequiredArgsConstructor; import org.springframework.core.io.AbstractResource; import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartRequest; @RestController @RequestMapping("/uploadToUrl") @RequiredArgsConstructor public class UploadToUrlController { @PostMapping("/file") public ResponseEntity<String> uploadFile(MultipartRequest multipartRequest, String url) throws Exception { MultipartFile multipartFile = multipartRequest.getFile("file"); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.MULTIPART_FORM_DATA); MultiValueMap<String, Object> body = new LinkedMultiValueMap<>(); File uploadFile = new File("target/" + multipartFile.getOriginalFilename()); multipartFile.transferTo(uploadFile); FileSystemResource fileSystemResource = new FileSystemResource(uploadFile); body.add("file", fileSystemResource); HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers); RestTemplate restTemplate = new RestTemplate(); String result = restTemplate.postForObject(url, requestEntity, String.class); return ResponseEntity.ok(result); } @PostMapping("/stream") public ResponseEntity<String> uploadStream(MultipartRequest multipartRequest, String url) throws Exception { MultipartFile multipartFile = multipartRequest.getFile("file"); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.MULTIPART_FORM_DATA); MultiValueMap<String, Object> body = new LinkedMultiValueMap<>(); MultipartFileResource multipartFileResource = new MultipartFileResource(multipartFile); body.add("file", multipartFileResource); HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers); RestTemplate restTemplate = new RestTemplate(); String result = restTemplate.postForObject(url, requestEntity, String.class); return ResponseEntity.ok(result); } /** * org.springframework.web.multipart.MultipartFileResource */ private class MultipartFileResource extends AbstractResource { private final MultipartFile multipartFile; public MultipartFileResource(MultipartFile multipartFile) { this.multipartFile = multipartFile; } @Override public String getFilename() { return this.multipartFile.getOriginalFilename(); } @Override public String getDescription() { return "MultipartFile resource [" + this.multipartFile.getName() + "]"; } @Override public long contentLength() { return this.multipartFile.getSize(); } @Override public InputStream getInputStream() throws IOException { return this.multipartFile.getInputStream(); } } }
[ "jhkim105@gmail.com" ]
jhkim105@gmail.com
b60ae35f1c60bfa55a8f5399506017ac7241eda9
f27cb821dd601554bc8f9c112d9a55f32421b71b
/integration/jaxrs-jackson/src/main/java/com/blazebit/persistence/integration/jaxrs/jackson/jersey/EntityViewIdAwareParameterServiceProvider.java
aaad5821e634082a8febb4fbdf936d9207a83cd8
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Blazebit/blaze-persistence
94f7e75154e80ce777a61eb3d436135ad6d7a497
a9b1b6efdd7ae388e7624adc601a47d97609fdaa
refs/heads/main
2023-08-31T22:41:17.134370
2023-07-14T15:31:39
2023-07-17T14:52:26
21,765,334
1,475
92
Apache-2.0
2023-08-07T18:10:38
2014-07-12T11:08:47
Java
UTF-8
Java
false
false
3,461
java
/* * Copyright 2014 - 2023 Blazebit. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.blazebit.persistence.integration.jaxrs.jackson.jersey; import com.blazebit.persistence.integration.jaxrs.EntityViewId; import org.glassfish.jersey.model.internal.spi.ParameterServiceProvider; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.Map; import java.util.WeakHashMap; /** * @author Moritz Becker * @since 1.5.0 */ public class EntityViewIdAwareParameterServiceProvider implements ParameterServiceProvider { @Override public Map<Class, Parameter.ParamAnnotationHelper> getParameterAnnotationHelperMap() { Map<Class, org.glassfish.jersey.model.Parameter.ParamAnnotationHelper> m = new WeakHashMap<>(); m.put(EntityViewId.class, new org.glassfish.jersey.model.Parameter.ParamAnnotationHelper<EntityViewId>() { public String getValueOf(EntityViewId a) { return a.value().isEmpty() ? a.name() : a.value(); } public org.glassfish.jersey.model.Parameter.Source getSource() { return org.glassfish.jersey.model.Parameter.Source.ENTITY; } }); return m; } @Override public Parameter.ParamCreationFactory<? extends org.glassfish.jersey.model.Parameter> getParameterCreationFactory() { return new org.glassfish.jersey.model.Parameter.ParamCreationFactory<org.glassfish.jersey.model.Parameter>() { public boolean isFor(Class<?> clazz) { return clazz == org.glassfish.jersey.model.Parameter.class; } public org.glassfish.jersey.model.Parameter createParameter(Annotation[] markers, Annotation marker, org.glassfish.jersey.model.Parameter.Source source, String sourceName, Class<?> rawType, Type type, boolean encoded, String defaultValue) { return new EntityViewIdAwareParameterServiceProvider.Parameter(markers, marker, source, sourceName, rawType, type, encoded, defaultValue); } public org.glassfish.jersey.model.Parameter createBeanParameter(Annotation[] markers, Annotation marker, org.glassfish.jersey.model.Parameter.Source source, String sourceName, Class<?> rawType, Type type, boolean encoded, String defaultValue) { return this.createParameter(markers, marker, source, sourceName, rawType, type, encoded, defaultValue); } }; } /** * Custom parameter implementation required because construtor of org.glassfish.jersey.model.Parameter is protected. */ private static class Parameter extends org.glassfish.jersey.model.Parameter { Parameter(Annotation[] markers, Annotation marker, Source source, String sourceName, Class<?> rawType, Type type, boolean encoded, String defaultValue) { super(markers, marker, source, sourceName, rawType, type, encoded, defaultValue); } } }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
93e343c12fe06e9694988ddd80526f29b038e5e3
6cef7fc78cc935f733f3707fca94776effb94875
/siem/kraken-iptables/src/main/java/org/krakenapps/iptables/RulePreset.java
123ba510d3b41b56188ef84af904b888e78963c1
[]
no_license
xeraph/kraken
1a5657d837caeaa8c6c045b24cd309d7184fd5b5
a2b6fe120b5c7d7cde0309ec1d4c3335abef17a1
refs/heads/master
2021-01-20T23:36:48.613826
2013-01-15T01:03:44
2013-01-15T01:03:44
7,766,261
1
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
/* * Copyright 2011 NCHOVY * * 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.krakenapps.iptables; import org.krakenapps.iptables.target.RejectTargetOption; import org.krakenapps.iptables.target.RejectTargetOption.Type; public class RulePreset { private RulePreset() { } public static Rule createSourceBlockRule(NetworkAddress source) { Rule rule = new Rule(); rule.setSource(source); rule.setTarget("REJECT"); rule.getTargetOptions().add(new RejectTargetOption(Type.IcmpHostProhibited)); return rule; } }
[ "devnull@localhost" ]
devnull@localhost
41665ea5f774edbc34c77e378f3c6d1b14e0a343
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/learning/7560/DateFormatCallableTest.java
720449cd63b6771421c9c4c5d500e43e26aea0fb
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,147
java
/** * The MIT License * Copyright (c) 2016 Thomas Bauer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.iluwatar.tls; import java.util.ArrayList; import java.util.Arrays ; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; /** * * Test of the Callable * * In this test {@link DateFormatCallable} is tested with only one thread (i.e. without concurrency situation) * <p> * After a successful run 5 date values should be in the result object. All dates should have * the same value (15.11.2015). To avoid problems with time zone not the date instances themselves * are compared by the test. For the test the dates are converted into string format DD.MM.YYY * <p> * Additionally the number of list entries are tested for both the list with the date values * and the list with the exceptions * * @author Thomas Bauer, January 2017 * */ public class DateFormatCallableTest { // Class variables used in setup() have to be static because setup() has to be static /** * Result object given back by DateFormatCallable * -- Array with converted date values * -- Array with thrown exceptions */ static Result result; /** * The date values created by the run of of DateFormatRunnalbe. List will be filled in the setup() method */ static List<String> createdDateValues = new ArrayList<String>(); /** * Expected number of date values in the date value list created by the run of DateFormatRunnalbe */ int expectedCounterDateValues = 5; /** * Expected number of exceptions in the exception list created by the run of DateFormatRunnalbe. */ int expectedCounterExceptions = 0; /** * Expected content of the list containing the date values created by the run of DateFormatRunnalbe */ List<String> expectedDateValues = Arrays.asList("15.11.2015", "15.11.2015", "15.11.2015", "15.11.2015", "15.11.2015"); /** * Run Callable and prepare results for usage in the test methods */ @BeforeAll public static void setup() { // Create a callable DateFormatCallable callableDf = new DateFormatCallable("dd/MM/yyyy", "15/12/2015"); // start thread using the Callable instance ExecutorService executor = Executors.newCachedThreadPool(); Future<Result> futureResult = executor.submit(callableDf); try { result = futureResult.get(); createdDateValues = convertDatesToString(result); } catch (Exception e) { fail("Setup failed: " + e); } executor.shutdown(); } private static List<String> convertDatesToString(Result res) { // Format date value as DD.MM.YYYY if (res == null || res.getDateList() == null || res.getDateList().size() == 0) { return null; } List<String> returnList = new ArrayList<String>(); for (Date dt : res.getDateList()) { Calendar cal = Calendar.getInstance(); cal.setTime(dt); returnList.add(cal.get(Calendar.DAY_OF_MONTH) + "." + cal.get(Calendar.MONTH) + "." + cal.get(Calendar.YEAR)); } return returnList; } /** * Test date values after the run of DateFormatRunnalbe. A correct run should deliver 5 times 15.12.2015 */ @Test public void testDateValues() { assertEquals(expectedDateValues, createdDateValues); } /** * Test number of dates in the list after the run of DateFormatRunnalbe. A correct run should deliver 5 date values */ @Test public void testCounterDateValues() { assertEquals(expectedCounterDateValues, result.getDateList().size()); } /** * Test number of Exceptions in the list after the run of DateFormatRunnalbe. A correct run should deliver * no exceptions */ @Test public void testCounterExceptions() { assertEquals(expectedCounterExceptions, result.getExceptionList().size()); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
b743d3a82748f871f301aad79c10a8cb2c72e2f1
8834218fae697508f4b5e16e803dd0c7a620cabf
/src/main/java/com/anjz/core/controller/maintain/DictionaryController.java
06cdb1479f342339fab9f0eb32dc48fbbc87fd07
[]
no_license
xxzds/frame_DS
629efa9918d6f9b0b966ac6553458c35cd3d9e6d
a76841beff58b81e61433d27726d9fab373b427c
refs/heads/master
2020-01-23T21:55:51.703318
2017-11-15T04:26:50
2017-11-15T04:26:50
74,729,729
1
1
null
null
null
null
UTF-8
Java
false
false
496
java
package com.anjz.core.controller.maintain; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.anjz.base.controller.BaseTreeableController; import com.anjz.core.model.MaintainDictionary; /** * 数据字典 * @author ding.shuai * @date 2016年9月13日下午5:37:31 */ @Controller @RequestMapping("/maintain/dictionary") public class DictionaryController extends BaseTreeableController<MaintainDictionary, String>{ }
[ "1114332905@qq.com" ]
1114332905@qq.com
14e2cb21cf05b295faf5fe7114ca373ddc26953f
ca957060b411c88be41dfbf5dffa1fea2744f4a5
/src/org/sosy_lab/cpachecker/core/CPAchecker.java
c46b9450b8d824dcfcb19d09236788d24a774c5f
[ "Apache-2.0" ]
permissive
45258E9F/IntPTI
62f705f539038f9457c818d515c81bf4621d7c85
e5dda55aafa2da3d977a9a62ad0857746dae3fe1
refs/heads/master
2020-12-30T14:34:30.174963
2018-06-01T07:32:07
2018-06-01T07:32:07
91,068,091
4
6
null
null
null
null
UTF-8
Java
false
false
6,574
java
/* * IntPTI: integer error fixing by proper-type inference * Copyright (c) 2017. * * Open-source component: * * CPAchecker * Copyright (C) 2007-2014 Dirk Beyer * * Guava: Google Core Libraries for Java * Copyright (C) 2010-2006 Google * * */ package org.sosy_lab.cpachecker.core; import static org.sosy_lab.common.ShutdownNotifier.interruptCurrentThreadOnShutdown; import static org.sosy_lab.cpachecker.core.CPAchecker.MainStatisticsKind.CLASSICAL; import com.google.common.base.StandardSystemProperty; import com.google.common.io.Resources; import org.sosy_lab.common.ShutdownManager; import org.sosy_lab.common.ShutdownNotifier; import org.sosy_lab.common.ShutdownNotifier.ShutdownRequestListener; import org.sosy_lab.common.configuration.Configuration; import org.sosy_lab.common.configuration.InvalidConfigurationException; import org.sosy_lab.common.configuration.Option; import org.sosy_lab.common.configuration.Options; import org.sosy_lab.common.log.LogManager; import org.sosy_lab.cpachecker.cfa.Language; import org.sosy_lab.cpachecker.core.phase.util.CPAPhaseManager; import org.sosy_lab.cpachecker.exceptions.CPAException; import org.sosy_lab.cpachecker.exceptions.ParserException; import org.sosy_lab.cpachecker.util.globalinfo.GlobalInfo; import java.io.IOException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.logging.Level; @Options public class CPAchecker { public enum InitialStatesFor { /** * Function entry node of the entry function */ ENTRY, /** * Set of function entry nodes of all functions. */ FUNCTION_ENTRIES, /** * All locations that are possible targets of the analysis. */ TARGET, /** * Function exit node of the entry function. */ EXIT, /** * All function exit nodes of all functions and all loop heads of endless loops. */ FUNCTION_SINKS, /** * All function exit nodes of the entry function, and all loop heads of endless loops. */ PROGRAM_SINKS } public enum MainStatisticsKind { CLASSICAL, /** * Hierarchical statistics distinguish per-entry / global information, which is specifically * designed for multi-entry analysis. */ HIERARCHICAL } @Option(secure = true, name = "input.programs", description = "programs to be analyzed") private String programDenotations = ""; @Option(secure = true, name = "statistics.kind", description = "the type of main statistics used" + " in the analysis task") private MainStatisticsKind mainStatisticsKind = CLASSICAL; private final LogManager logger; private final Configuration config; private final ShutdownManager shutdownManager; private final ShutdownNotifier shutdownNotifier; // The content of this String is read from a file that is created by the // ant task "init". // To change the version, update the property in build.xml. private static final String version; static { String v = "(unknown version)"; try { URL url = CPAchecker.class.getClassLoader().getResource("org/sosy_lab/cpachecker/VERSION.txt"); if (url != null) { String content = Resources.toString(url, StandardCharsets.US_ASCII).trim(); if (content.matches("[a-zA-Z0-9 ._+:-]+")) { v = content; } } } catch (IOException e) { // Ignore exception, no better idea what to do here. } version = v; } public static String getVersion() { return getCPAcheckerVersion() + " (" + StandardSystemProperty.JAVA_VM_NAME.value() + " " + StandardSystemProperty.JAVA_VERSION.value() + ")"; } public static String getCPAcheckerVersion() { return version; } public CPAchecker( Configuration pConfiguration, LogManager pLogManager, ShutdownManager pShutdownManager) throws InvalidConfigurationException { config = pConfiguration; logger = pLogManager; shutdownManager = pShutdownManager; shutdownNotifier = shutdownManager.getNotifier(); config.inject(this); if (programDenotations.isEmpty()) { throw new InvalidConfigurationException("No valid input programs are specified"); } GlobalInfo.getInstance().updateInputPrograms(programDenotations); GlobalInfo.getInstance().setUpFunctionMap(config); } public void run() throws Exception { // initialize necessary data structures MainStatistics stats; CPAPhaseManager phaseManager; final ShutdownRequestListener interruptThreadOnShutdown = interruptCurrentThreadOnShutdown(); shutdownNotifier.register(interruptThreadOnShutdown); try { stats = createMainStatistics(); // create phase manager and initialize it phaseManager = new CPAPhaseManager(config, logger, shutdownManager, shutdownNotifier, stats); phaseManager.initialize(); phaseManager.execute(); } catch (IOException e) { logger.logUserException(Level.SEVERE, e, "Could not read file"); } catch (ParserException e) { logger.logUserException(Level.SEVERE, e, "Parsing failed"); StringBuilder msg = new StringBuilder(); msg.append("Please make sure that the code can be compiled by a compiler.\n"); if (e.getLanguage() == Language.C) { msg.append( "If the code was not preprocessed, please use a C preprocessor\nor specify the -preprocess command-line argument.\n"); } msg.append( "If the error still occurs, please send this error message\ntogether with the input file to cpachecker-users@googlegroups.com.\n"); logger.log(Level.INFO, msg); } catch (InvalidConfigurationException e) { logger.logUserException(Level.SEVERE, e, "Invalid configuration"); } catch (InterruptedException e) { // CPAchecker must exit because it was asked to // we return normally instead of propagating the exception // so we can return the partial result we have so far logger.logUserException(Level.WARNING, e, "Analysis interrupted"); } catch (CPAException e) { logger.logUserException(Level.SEVERE, e, null); } finally { shutdownNotifier.unregister(interruptThreadOnShutdown); } logger.log(Level.FINER, "CPAchecker finished!"); } private MainStatistics createMainStatistics() throws InvalidConfigurationException { switch (mainStatisticsKind) { case HIERARCHICAL: return new HierarchicalCPAStatistics(config, logger); default: return new MainCPAStatistics(config, logger); } } }
[ "chengxi09@gmail.com" ]
chengxi09@gmail.com
b0714dee76138f74239237360e7db9a9610d30c6
c992cc664787167313fb4d317f172e8b057b1f5b
/modules/core/src/main/java/io/jmix/core/config/type/ConstructorTypeFactory.java
a934010161740ae9ef317e202388fd0b830c1813
[ "Apache-2.0" ]
permissive
alexbudarov/jmix
42628ce00a2a67bac7f4113a7e642d5a67c38197
23272dc3d6cb1f1a9826edbe888b3c993ab22d85
refs/heads/master
2020-12-19T15:57:38.886284
2020-01-23T10:06:16
2020-01-23T10:06:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,825
java
/* * A High-Level Framework for Application Configuration * * Copyright 2007 Merlin Hughes / Learning Objects, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package io.jmix.core.config.type; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; /** * A factory that builds a type by invoking its constructor, supplying the * string value as a parameter. * */ public class ConstructorTypeFactory extends TypeFactory { /** * The type constructor. */ private Constructor constructor; /** * Create a new ConstructorTypeFactory. * * @param constructor A constructor that takes a single string argument. */ public ConstructorTypeFactory(Constructor constructor) { this.constructor = constructor; } @Override public Object build(String string) { if (string == null) { return null; } try { try { return constructor.newInstance(string); } catch (InvocationTargetException ex) { throw ex.getTargetException(); } } catch (RuntimeException ex) { throw ex; } catch (Throwable th) { throw new RuntimeException("Type construct error", th); } } }
[ "krivopustov@haulmont.com" ]
krivopustov@haulmont.com
e5d832459c1c5a1da8d70ccc1c31ac442389808a
b89148d947109e80dd63a2dc42ba04ce4662ad80
/src/main/java/course/legacy/scheduler/Event.java
03c84f47989ee550e2a653041d580bf64de5da35
[]
no_license
up1/working-legacy
51c0d8cbd8cc5e81bb7c9786b2db66b64605b5a2
f5c7a473d8efc1cd398342900f7e6ae36bed120d
refs/heads/master
2020-05-19T07:46:39.191176
2014-10-22T06:36:33
2014-10-22T06:36:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package course.legacy.scheduler; import java.util.Date; public class Event { private Date date; private int slot; public Event(Date date, int slot) { this.date = date; this.slot = slot; } public void added() { } public Date getDate() { return date; } public int getSlot() { return slot; } public String toString() { return date + " @" + slot + ":00 hours"; } }
[ "somkiat.p@gmail.com" ]
somkiat.p@gmail.com
cd27e6602012dc51f6949012f87da3a3053e5cbb
56cf34c40c5048b7b5f9a257288bba1c34b1d5e2
/src/org/xpup/hafmis/syscollection/querystatistics/chgbiz/chgorgrate/action/FindChgorgrateListAC.java
f936f263a3661c06a2fe1c800d0eb4936cca824a
[]
no_license
witnesslq/zhengxin
0a62d951dc69d8d6b1b8bcdca883ee11531fbb83
0ea9ad67aa917bd1911c917334b6b5f9ebfd563a
refs/heads/master
2020-12-30T11:16:04.359466
2012-06-27T13:43:40
2012-06-27T13:43:40
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
3,412
java
package org.xpup.hafmis.syscollection.querystatistics.chgbiz.chgorgrate.action; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.xpup.common.util.BSUtils; import org.xpup.common.util.Pagination; import org.xpup.common.util.PaginationUtils; import org.xpup.hafmis.common.util.BusiConst; import org.xpup.hafmis.common.util.BusiTools; import org.xpup.hafmis.syscollection.paymng.paysure.bsinterface.IPaymentHeadBS; import org.xpup.hafmis.syscollection.querystatistics.chgbiz.chgorgrate.bsinterface.IChgorgrateBS; import org.xpup.hafmis.syscollection.querystatistics.chgbiz.chgorgrate.form.ChgorgrateAF; /** * @author ÓÚÇì·á 2007-07-19 */ public class FindChgorgrateListAC extends Action { private HashMap criterions = null; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub ChgorgrateAF chgorgrateAF = (ChgorgrateAF) form; criterions = makeCriterionsMap(chgorgrateAF); Pagination pagination = new Pagination(0, 10, 1, "chgOrgRate.id", "ASC", criterions); String paginationKey = getPaginationKey(); request.getSession().setAttribute(paginationKey, pagination); modifyPagination(pagination); chgorgrateAF.reset(mapping, request); return mapping.findForward("to_ShowChgorgrateListAC"); } protected String getPaginationKey() { return ShowChgorgrateListAC.PAGINATION_KEY; } protected HashMap makeCriterionsMap(ChgorgrateAF form) { HashMap m = new HashMap(); String officeCode = form.getOfficeCode(); if (officeCode != null && !"".equals(officeCode)) { m.put("officeCode", officeCode); } String collectionBank = form.getCollectionBank(); if (collectionBank != null && !"".equals(collectionBank)) { m.put("collectionBank", collectionBank); } String orgId = form.getOrgId(); if (orgId != null && !"".equals(orgId)) { m.put("orgId", orgId); } String orgName = form.getOrgName(); if (orgName != null && !"".equals(orgName)) { m.put("orgName", orgName); } String chgMonthStart = form.getChgMonthStart(); if (chgMonthStart != null && !"".equals(chgMonthStart)) { m.put("chgMonthStart", chgMonthStart); } String chgMonthEnd = form.getChgMonthEnd(); if (chgMonthEnd != null && !"".equals(chgMonthEnd)) { m.put("chgMonthEnd", chgMonthEnd); } String chgDateStart = form.getChgDateStart(); if (chgDateStart != null && !"".equals(chgDateStart)) { m.put("chgDateStart", chgDateStart); } String chgDateEnd = form.getChgDateEnd(); if (chgDateEnd != null && !"".equals(chgDateEnd)) { m.put("chgDateEnd", chgDateEnd); } Integer chgStatus = form.getChgStatus(); if (chgStatus != null && chgStatus.longValue() != 0) { m.put("chgStatus", chgStatus); } return m; } protected void modifyPagination(Pagination pagination) { } }
[ "yuelaotou@gmail.com" ]
yuelaotou@gmail.com
4520e6a6c4b6a9070822278148621c885439481b
40f1949d03f2fb88af617d88915e89071b629209
/sdklib/src/com/android/sdklib/widgets/iOSProgressView.java
07243da50701b7991ab8898ec9afdf68e6441f3b
[]
no_license
multi-os-engine-community/moe-ui-designer
804ca2ee31a013ce1b39a463be6e416a688d1235
6609fefee64e51759ac9f7b716d8f04c0dad8680
refs/heads/master
2021-01-20T23:36:57.321122
2016-08-24T11:04:57
2016-08-24T11:04:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,539
java
/* Copyright 2014-2016 Intel Corporation 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.sdklib.widgets; import android.content.Context; import android.util.AttributeSet; import android.widget.ProgressBar; import com.android.sdklib.widgets.base_elements.iOSBaseElement; import com.android.sdklib.widgets.base_elements.iOSBaseProgressBar; import com.android.sdklib.widgets.base_elements.iOSProgressBar; import com.android.sdklib.widgets.base_elements.iOSView; public class iOSProgressView extends ProgressBar implements iOSProgressBar, iOSBaseElement { public iOSProgressView(Context context) { super(context); } public iOSProgressView(Context context, AttributeSet attrs) { super(context, attrs); } public iOSProgressView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } public iOSProgressView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } }
[ "alexey.suhov@intel.com" ]
alexey.suhov@intel.com
cc477035706f48b08b9cdf793867a40bebe3fac2
b77be0b0e6b3ea59e8208a5980601729a198f4d1
/app/src/main/java/com/google/android/gms/internal/aa.java
0fe98c39885b98621300ef6380558321dab7c196
[]
no_license
jotaxed/Final
72bece24fb2e59ee5d604b6aca5d90656d2a7170
f625eb81e99a23e959c9d0ec6b0419a3b795977a
refs/heads/master
2020-04-13T11:50:14.498334
2018-12-26T13:46:17
2018-12-26T13:46:17
163,185,048
1
0
null
null
null
null
UTF-8
Java
false
false
386
java
package com.google.android.gms.internal; import java.util.HashMap; import java.util.Map; @ey class aa implements ac { private gu mt; public aa(gu guVar) { this.mt = guVar; } public void a(af afVar, boolean z) { Map hashMap = new HashMap(); hashMap.put("isVisible", z ? "1" : "0"); this.mt.a("onAdVisibilityChanged", hashMap); } }
[ "jotaxed@gmail.com" ]
jotaxed@gmail.com
fb9a4d4a9074e05b56363024407bcce7dc96ab41
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-24-21-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/filter/DefaultXMLFilter_ESTest.java
5473fc30ee5e4b6c3028fcfa2c2c7370f8cce10b
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 04:57:27 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.filter; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultXMLFilter_ESTest extends DefaultXMLFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
f7ec2ad7a2a6e4cb39f7c115eb1f6e4858ef4186
d8eba63b264175d2ab82f237d324b94e95467bc8
/client/src/Class28.java
37fe4d01b3813b80760062c246cf92fad4d31f63
[]
no_license
DukeCharles/revision-718-client
9eb164611d5ced1a3d35cf7ffeebc97582b4e7e5
f3d100436bdfed1001063d0dad54aa80f0742c14
refs/heads/main
2023-06-19T08:38:17.328798
2021-07-21T02:32:47
2021-07-21T02:32:47
387,969,320
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
/* Class28 - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ import jaggl.OpenGL; public class Class28 { int anInt364; void method403() { OpenGL.glEndList(); } void method404(char c) { OpenGL.glCallList(this.anInt364 + c); } void method405(int i) { OpenGL.glNewList(this.anInt364 + i, 4864); } Class28(Class_ra_Sub2 class_ra_sub2, int i) { this.anInt364 = OpenGL.glGenLists(i); } }
[ "charles.simon.morin@gmail.com" ]
charles.simon.morin@gmail.com
7bb55cb38571c9570e40a0053106b45272f0469b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project78/src/test/java/org/gradle/test/performance78_1/Test78_70.java
24baead29946b7f9e680e0b6c94469fda47efda2
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
289
java
package org.gradle.test.performance78_1; import static org.junit.Assert.*; public class Test78_70 { private final Production78_70 production = new Production78_70("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f343b9fe2ccfbd16f7055c8304263e03571e17d5
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE129_Improper_Validation_of_Array_Index/s05/CWE129_Improper_Validation_of_Array_Index__URLConnection_array_read_check_min_67b.java
d4261c0c2494c19275631df2f02271292a79bb45
[]
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,216
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE129_Improper_Validation_of_Array_Index__URLConnection_array_read_check_min_67b.java Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml Template File: sources-sinks-67b.tmpl.java */ /* * @description * CWE: 129 Improper Validation of Array Index * BadSource: URLConnection Read data from a web server with URLConnection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: array_read_check_min * GoodSink: Read from array after verifying that data is at least 0 and less than array.length * BadSink : Read from array after verifying that data is at least 0 (but not verifying that data less than array.length) * Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package * * */ package testcases.CWE129_Improper_Validation_of_Array_Index.s05; import testcasesupport.*; import javax.servlet.http.*; public class CWE129_Improper_Validation_of_Array_Index__URLConnection_array_read_check_min_67b { public void badSink(CWE129_Improper_Validation_of_Array_Index__URLConnection_array_read_check_min_67a.Container dataContainer ) throws Throwable { int data = dataContainer.containerOne; /* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */ int array[] = { 0, 1, 2, 3, 4 }; /* POTENTIAL FLAW: Verify that data >= 0, but don't verify that data < array.length, so may be attempting to read out of the array bounds */ if (data >= 0) { IO.writeLine(array[data]); } else { IO.writeLine("Array index out of bounds"); } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(CWE129_Improper_Validation_of_Array_Index__URLConnection_array_read_check_min_67a.Container dataContainer ) throws Throwable { int data = dataContainer.containerOne; /* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */ int array[] = { 0, 1, 2, 3, 4 }; /* POTENTIAL FLAW: Verify that data >= 0, but don't verify that data < array.length, so may be attempting to read out of the array bounds */ if (data >= 0) { IO.writeLine(array[data]); } else { IO.writeLine("Array index out of bounds"); } } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(CWE129_Improper_Validation_of_Array_Index__URLConnection_array_read_check_min_67a.Container dataContainer ) throws Throwable { int data = dataContainer.containerOne; /* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */ int array[] = { 0, 1, 2, 3, 4 }; /* FIX: Fully verify data before reading from array at location data */ if (data >= 0 && data < array.length) { IO.writeLine(array[data]); } else { IO.writeLine("Array index out of bounds"); } } }
[ "you@example.com" ]
you@example.com
4fdc3634fd68271ef75b52cc1521005fff682a18
3e99519b6905b25b67a8c18ff1c38dc03e173523
/bundle/src/main/java/org/jboss/osgi/xml/internal/XMLLogger.java
595aa7f6e21a48eb0f63dea09c415b26a9185fa3
[]
no_license
jbosgi/jbosgi-xerces
34dc413c2baab40100974f1191a19670313bedc5
9dd6dbfa19c7e2475ccb25fad10d26020a340614
refs/heads/master
2021-01-25T04:01:38.379788
2012-04-30T19:55:08
2012-04-30T19:55:08
2,348,451
0
0
null
null
null
null
UTF-8
Java
false
false
1,924
java
/* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software 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.jboss.osgi.xml.internal; import static org.jboss.logging.Logger.Level.WARN; import org.jboss.logging.BasicLogger; import org.jboss.logging.LogMessage; import org.jboss.logging.Logger; import org.jboss.logging.Message; import org.jboss.logging.MessageLogger; /** * Logging Id ranges: 20600-20699 * * https://docs.jboss.org/author/display/JBOSGI/JBossOSGi+Logging * * @author Thomas.Diesler@jboss.com */ @MessageLogger(projectCode = "JBOSGI") public interface XMLLogger extends BasicLogger { XMLLogger LOGGER = Logger.getMessageLogger(XMLLogger.class, "org.jboss.osgi.xml"); @LogMessage(level = WARN) @Message(id = 20600, value = "No SAXParserFactory registered") void warnNoSAXParserFactoryRegistered(); @LogMessage(level = WARN) @Message(id = 20601, value = "No DocumentBuilderFactory registered") void warnNoDocumentBuilderFactoryRegistered(); }
[ "thomas.diesler@jboss.com" ]
thomas.diesler@jboss.com
c81b43e0c505cf88c85fbc1417ec96d5c3e028e2
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a101/A101150.java
e97792df279dcc57a68a8ca8edb0d0ceaf974573
[]
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
472
java
package irvine.oeis.a101; // Generated by gen_seq4.pl pfprime 0 690 10 21 9 at 2019-07-30 14:36 // DO NOT EDIT here! import irvine.oeis.PowerFactorPrimeSequence; /** * A101150 Indices of primes in sequence defined by <code>A(0) = 79, A(n) = 10*A(n-1) - 21</code> for <code>n &gt; 0</code>. * @author Georg Fischer */ public class A101150 extends PowerFactorPrimeSequence { /** Construct the sequence. */ public A101150() { super(1, 0, 690, 10, 21, 9); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
d54fc012a75bd8d622bedfe42f34143a76ad46c9
ec9bf57a07b7b06134ec7a21407a11f69cc644f7
/src/aq.java
40bce1f0ad3f014a94637b79cf9466441bcec9c7
[]
no_license
jzarca01/com.ubercab
f95c12cab7a28f05e8f1d1a9d8a12a5ac7fbf4b1
e6b454fb0ad547287ae4e71e59d6b9482369647a
refs/heads/master
2020-06-21T04:37:43.723581
2016-07-19T16:30:34
2016-07-19T16:30:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
import android.content.Context; public final class aq extends ip { public aq(Context paramContext, ap paramap, hz paramhz) { super(paramContext, paramap, paramhz); } public final void a(boolean paramBoolean) { super.a(paramBoolean); ((hv)u()).a(paramBoolean); } } /* Location: * Qualified Name: aq * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
79c250127b2fc9917d4ee7faf8d79f8dfebdd865
7578df88e8b6bde93253b5e111c048d45f424a00
/day1/java-8/code/Java-8_handout/AggregatingStream/src/org/example/java8/CountItems.java
154a1df26298ae8317679a39c69fce9b93300fad
[]
no_license
nagabhushanamn/lowes-java
bf914a5d980a1711ad057da6748ed9c03b5ec93b
46d41498bcdfec9acbae4d5623996bfce894cd99
refs/heads/master
2021-07-16T20:12:54.808370
2017-10-25T10:22:12
2017-10-25T10:22:12
107,933,512
0
0
null
null
null
null
UTF-8
Java
false
false
628
java
package org.example.java8; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Predicate; import java.util.stream.Stream; import org.example.java8.model.Person; public class CountItems { public static void main(String[] args) { System.out.println("Creating List"); List<String> list = new ArrayList<>(); for (int i = 0; i < 100000; i++) { list.add("Item " + i); } // list.stream() // .parallel() // .forEach(str->System.out.println(str)); long count=list.stream().parallel().count(); System.out.println(count); } }
[ "nagabhushanamn@gmail.com" ]
nagabhushanamn@gmail.com
36b5698f59dc491abdfeceeba0e32dbf4bc55e13
c96b0be86c08f639d388498851384706a3c87815
/KCX-Mapping-Convert/src/com/kewill/kcx/component/mapping/formats/uids/aes21/BodyExportDeclarationResponseUids.java
0701c6a1346ed6fafc3194facdfba1a377cddb2a
[]
no_license
joelsousa/KCX-Mapping-Convert
cf1b4b785af839f6f369bcdf539bd023d4478f72
9da4b25db31f5b1dfbefd279eb76c555f3977c0e
refs/heads/master
2020-06-07T12:06:43.517765
2014-10-03T14:14:51
2014-10-03T14:14:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,049
java
package com.kewill.kcx.component.mapping.formats.uids.aes21; import java.util.List; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import com.kewill.kcx.component.mapping.countries.de.aes.msg.MsgExpSta; import com.kewill.kcx.component.mapping.countries.de.aes.msg.common.ErrorType; import com.kewill.kcx.component.mapping.formats.uids.common.UidsMessageV21; import com.kewill.kcx.component.mapping.util.EFormat; import com.kewill.kcx.component.mapping.util.Utils; /** * Module : Export/aes.<br> * Created : 17.07.2012<br> * Description : Uids Body of ExportDeclarationResponse * : V21 - new Tags * * @author iwaniuk * @version 2.1.00 */ public class BodyExportDeclarationResponseUids extends UidsMessageV21 { private MsgExpSta message; public BodyExportDeclarationResponseUids(XMLStreamWriter writer) { this.writer = writer; } public void writeBody() { try { openElement("soap:Body"); openElement("Submit"); //EI20120917: setAttribute("xmlns", "http://www.eurtradenet.com/schemas/uids/export/body/200809"); //EI20120917: if (this.getCommonFieldsDTO() != null && !Utils.isStringEmpty(this.getCommonFieldsDTO().getNameSpaceText())) { setAttribute("xmlns", this.getCommonFieldsDTO().getNameSpaceText()); } else { setAttribute("xmlns", "http://www.eurtradenet.com/schemas/uids/export/body/200809"); } openElement("Export"); openElement("ExportDeclarationResponse"); writeFormattedDateTime("DateOfAcceptance", message.getAcceptanceTime(), message.getAcceptanceTimeFormat(), EFormat.ST_DateTimeZ); writeFormattedDateTime("DateOfCancellation", message.getCancellationTime(), message.getCancellationTimeFormat(), EFormat.ST_DateTimeZ); writeFormattedDateTime("DateOfClosing", message.getTimeOfCompletion(), message.getTimeOfCompletionFormat(), EFormat.ST_DateTimeZ); //new for V21 writeFormattedDateTime("DateOfExit", message.getExitTime(), message.getExitTimeFormat(), EFormat.ST_DateTimeZ); if (message.getLoadingTime() != null) { writeFormattedDateTime("DateOfLoadingBegin", message.getLoadingTime().getBeginTime(), message.getLoadingTime().getLoadingBeginFormat(), EFormat.ST_DateTimeZ); writeFormattedDateTime("DateOfLoadingEnd", message.getLoadingTime().getEndTime(), message.getLoadingTime().getLoadingEndFormat(), EFormat.ST_DateTimeZ); } writeFormattedDateTime("DateOfProcessing", message.getBeginTimeOfProcessing(), message.getBeginTimeOfProcessingFormat(), EFormat.ST_DateTimeZ); //writeStringToDateTime("DateOfPreAdvice", message.getTimeOfRejectionOfPreannoucement()); writeFormattedDateTime("DateOfPreAdviceRejection", message.getTimeOfRejectionOfPreannouncement(), message.getTimeOfRejectionOfPreannouncementFormat(), EFormat.ST_DateTimeZ); //new for V21 writeFormattedDateTime("DateOfReceipt", message.getReceiveTime(), message.getReceiveTimeFormat(), EFormat.ST_DateTimeZ); writeFormattedDateTime("DateOfRejection", message.getTimeOfRejection(), message.getTimeOfRejectionFormat(), EFormat.ST_DateTimeZ); writeFormattedDateTime("DateOfRelease", message.getReleaseTime(), message.getReleaseTimeFormat(), EFormat.ST_DateTimeZ); writeParty("Declarant", message.getDeclarant()); //new for V21 if (message.getReason() != null || message.getStatusOfCompletion() != null) { openElement("Justification"); writeElement("Code", message.getStatusOfCompletion()); writeElement("Description", message.getReason()); closeElement(); } writeElement("ReferenceNumber", message.getReferenceNumber()); writeElement("EPUNumber", message.getEpuNumber()); writeElement("EntryNumber", message.getEntryNumber()); List<ErrorType> errorList = message.getErrorList(); if (errorList != null) { for (ErrorType tmpError : errorList) { if (tmpError != null) { openElement("Error"); writeElement("Type", tmpError.getCode()); writeElement("Pointer", tmpError.getPointer()); writeElement("Reason", tmpError.getText()); closeElement(); } } } closeElement(); closeElement(); closeElement(); closeElement(); } catch (XMLStreamException e) { e.printStackTrace(); } } public MsgExpSta getMessage() { return message; } public void setMessage(MsgExpSta message) { this.message = message; } }
[ "joel@moredata.pt" ]
joel@moredata.pt
c4932de8f0a44c03d8528d1a52d0299a9dc95c87
4368402d5965df4e7836004574911de4f52c0ea9
/order-service/src/test/java/net/shyshkin/study/cqrs/estore/orderservice/command/rest/CompensatingTransactionsIT.java
6a28020065c1c5b03d292d52f08890f7a4532314
[]
no_license
anupamguin/art-kargopolov-cqrs-saga-axon-microservices
a25cb28f5746c2d95b04a3fda52e567349222dc4
2b6de35a6c7f037eff61783c24931eba1f2a0488
refs/heads/master
2023-05-11T22:22:38.429057
2021-06-01T12:35:23
2021-06-01T12:35:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,316
java
package net.shyshkin.study.cqrs.estore.orderservice.command.rest; import com.github.javafaker.Faker; import lombok.extern.slf4j.Slf4j; import net.shyshkin.study.cqrs.estore.core.model.ProductIdDto; import net.shyshkin.study.cqrs.estore.orderservice.command.CreateOrderCommand; import net.shyshkin.study.cqrs.estore.orderservice.core.OrderStatus; import net.shyshkin.study.cqrs.estore.orderservice.core.data.OrdersRepository; import net.shyshkin.study.cqrs.estore.orderservice.testcontainers.PaymentFailedComposeContainer; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.http.*; import org.springframework.test.context.TestPropertySource; import org.springframework.web.client.RestTemplate; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.net.URI; import java.util.UUID; import java.util.concurrent.TimeUnit; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; @Slf4j @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @TestPropertySource(properties = { "eureka.client.enabled=false", "spring.datasource.url=jdbc:h2:mem:testCompensatingTransactionsIT;DB_CLOSE_ON_EXIT=FALSE", "spring.datasource.username=sa", "spring.datasource.password=", "axon.axonserver.servers=${AXON_SERVERS}" }) @Testcontainers class CompensatingTransactionsIT { @Container public static PaymentFailedComposeContainer testComposeContainer = PaymentFailedComposeContainer.getInstance(); @Autowired TestRestTemplate testRestTemplate; @Autowired RestTemplateBuilder restTemplateBuilder; RestTemplate restTemplate; @Autowired OrdersRepository ordersRepository; @BeforeEach void setUp() { String rootUri = "http://" + testComposeContainer.getProductServiceHost() + ":" + testComposeContainer.getProductServicePort(); log.debug("Root URI: {}", rootUri); restTemplate = restTemplateBuilder.rootUri(rootUri).build(); } @Test void createOrder_compensatingTransaction() throws InterruptedException { //given UUID productId = createProduct(); CreateOrderRestModel createOrderRestModel = CreateOrderRestModel.builder() .productId(productId) .addressId(UUID.fromString("afbb5881-a872-4d13-993c-faeb8350eea5")) .quantity(1) .build(); //when ResponseEntity<CreateOrderCommand> responseEntity = testRestTemplate .postForEntity("/orders", createOrderRestModel, CreateOrderCommand.class); //then assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.CREATED); URI location = responseEntity.getHeaders().getLocation(); assertThat(location) .isNotNull(); log.debug("Response entity: {}", responseEntity); String locationString = location.toString(); String orderIdString = locationString.substring(locationString.lastIndexOf("/") + 1); UUID orderId = UUID.fromString(orderIdString); // Must have Status CREATED await() .timeout(1, TimeUnit.SECONDS) .untilAsserted(() -> assertThat(ordersRepository.findByOrderId(orderId)) .hasValueSatisfying(orderEntity -> assertThat(orderEntity) .hasNoNullFieldsOrProperties() .satisfies(entity -> log.debug("Entity: {}", entity)) .hasFieldOrPropertyWithValue("orderId", orderId) .hasFieldOrPropertyWithValue("productId", createOrderRestModel.getProductId()) .hasFieldOrPropertyWithValue("addressId", createOrderRestModel.getAddressId()) .hasFieldOrPropertyWithValue("quantity", createOrderRestModel.getQuantity()) .hasFieldOrPropertyWithValue("orderStatus", OrderStatus.CREATED) ) ); Thread.sleep(1000); log.debug("View in logs (current or another instance of `order-service`): `OrderCreatedEvent is handled`" + " followed by `ProductReservedEvent is handled` " + " followed by `Successfully fetched payment details` " + " followed by `There was an Exception: org.axonframework.commandhandling.NoHandlerForCommandException` " + " followed by `ProductReservationCancelledEvent is handled` " + " followed by `OrderRejectedEvent is handled` " + " followed by `OrderSaga is rejected for order with Id` " ); // Must have Status REJECTED await() .timeout(1, TimeUnit.SECONDS) .untilAsserted(() -> assertThat(ordersRepository.findByOrderId(orderId)) .hasValueSatisfying(orderEntity -> assertThat(orderEntity) .hasNoNullFieldsOrProperties() .satisfies(entity -> log.debug("Entity: {}", entity)) .hasFieldOrPropertyWithValue("orderId", orderId) .hasFieldOrPropertyWithValue("productId", createOrderRestModel.getProductId()) .hasFieldOrPropertyWithValue("addressId", createOrderRestModel.getAddressId()) .hasFieldOrPropertyWithValue("quantity", createOrderRestModel.getQuantity()) .hasFieldOrPropertyWithValue("orderStatus", OrderStatus.REJECTED) ) ); } private UUID createProduct() { String productName = Faker.instance().commerce().productName(); String createProductRestModelJson = "{" + " \"title\":\"" + productName + "\"," + " \"price\":12.00," + " \"quantity\":5" + "}"; HttpHeaders headers = new HttpHeaders(); headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); HttpEntity<String> requestEntity = new RequestEntity<>(createProductRestModelJson, headers, HttpMethod.POST, null, null); ResponseEntity<ProductIdDto> responseEntity = restTemplate.exchange( "/products", HttpMethod.POST, requestEntity, ProductIdDto.class); return responseEntity.getBody().getProductId(); } }
[ "d.art.shishkin@gmail.com" ]
d.art.shishkin@gmail.com
5a2456326ace9fa979678c4df2f6849db6b4b30c
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/29/1800.java
c7be0aca0d2748fc6c8ca63b12ed3a1629120efb
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
912
java
package <missing>; public class GlobalMembers { public static int Main() { int m; int s; int n; int i; float a1 = 2F; float a2 = 3F; float b1 = 1F; float b2 = 2F; float a; float b; float sum = 3.5F; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { m = Integer.parseInt(tempVar); } for (s = 0;s < m;s++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { n = Integer.parseInt(tempVar2); } if (n == 1) { System.out.print("2.000\n"); } else { if (n == 2) { System.out.print("3.500\n"); } else { for (i = 3;i <= n;i++) { a = a1 + a2; b = b1 + b2; sum = sum + a / b; a1 = a2; a2 = a; b1 = b2; b2 = b; } System.out.printf("%.3f\n",sum); } sum = 3.5F; a1 = 2F; a2 = 3F; b1 = 1F; b2 = 2F; } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
1cc4d7837084ca4d7068e9a71ab2f64b1968592e
7b0835e7cef12e5204565b48340aa01b1207badb
/src/com/lxy/service/impl/UserServiceImpl.java
0b752b9dc2aea5e855f495063c903c5eb2fe4d5d
[]
no_license
frankjunqi/CultureWebProject
862b255bbd22b2ad88b8bed97da6d9a924458878
377991e8acd3d9abf980b01fdafd3e4f58112d4e
refs/heads/master
2016-09-06T17:21:02.796518
2015-05-15T10:58:53
2015-05-15T10:58:53
33,602,592
2
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package com.lxy.service.impl; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.lxy.mapper.LxyProductDetailMapper; import com.lxy.mapper.LxyUserMapper; import com.lxy.model.LxyProductDetail; import com.lxy.model.LxyUser; import com.lxy.service.UserService; @Service("userService") public class UserServiceImpl implements UserService{ private LxyUserMapper lxyUserMapper; private LxyProductDetailMapper lxyProductDetailMapper; @Autowired public void setLxyProductDetailMapper( LxyProductDetailMapper lxyProductDetailMapper) { this.lxyProductDetailMapper = lxyProductDetailMapper; } @Autowired public void setLxyUserMapper(LxyUserMapper lxyUserMapper) { this.lxyUserMapper = lxyUserMapper; } @Override public LxyUser selectByPrimaryKey(Long id) { return lxyUserMapper.selectByPrimaryKey(id); } @Override public List<LxyUser> getUserByParam(Map<String, Object> param) { return lxyUserMapper.getUserByParam(param); } @Override public List<LxyProductDetail> getImgPaths(Map<String, Object> param) { return lxyProductDetailMapper.getImgPaths(param); } }
[ "kjh08490@ly.com" ]
kjh08490@ly.com
ebe91d7a153bd1cf04aee9e0c7bad02506d9a7de
a4110f29cc12c5e9ad3dc6d7d81cfe60b751398f
/src/com/Sts/UI/Beans/StsSpectrumFieldBean.java
01533491c19881d2e090eca5c50c283726ac16dd
[]
no_license
tlasseter/VolumePicker7
dd70320c10d4bd105fdb238df19d504ddad5ae90
3baa5d1047893690cf987f7bda27b0e2dcf87e84
refs/heads/master
2021-05-31T05:32:34.880131
2016-03-23T22:37:43
2016-03-23T22:37:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package com.Sts.UI.Beans; /** * <p>Title: S2S Development</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: S2S Systems LLC</p> * @author unascribed * @version 1.1 */ import com.Sts.DBTypes.*; import com.Sts.MVC.*; import com.Sts.UI.*; import java.awt.*; public class StsSpectrumFieldBean extends StsFieldBean { private StsSpectrum spectrum = null; private StsSpectrumPanel spectrumPanel = new StsSpectrumPanel(); public StsSpectrumFieldBean() { } public StsSpectrumFieldBean(Class c, String fieldName) { super(); initialize(c, fieldName); } public Component[] getBeanComponents() { return new Component[] { spectrumPanel }; } public Object getValueObject() { return getSpectrum(); } public StsSpectrum getSpectrum() { return (StsSpectrum)getPanelObject(); } public void doSetValueObject(Object valueObject) { if(!(valueObject instanceof StsSpectrum)) return; spectrum = (StsSpectrum)valueObject; spectrumPanel.setSpectrum(spectrum); } public String toString() {return spectrum.getName(); } public Object fromString(String string) { StsModel currentModel = StsSerialize.getCurrentModel(); if(currentModel == null) return null; return currentModel.getObjectWithName(StsSpectrum.class, string); } }
[ "t.lasseter@comcast.net" ]
t.lasseter@comcast.net
39e215cbd4030022bc3650f799335824ca97a1f2
6f23fc4fb0f6f35ae7b341e2f1b129bb1b498710
/merchant/src/java/paygate/objects/Siteuser.java
29715973536870b36b7fd629ad44848f48d2ca27
[]
no_license
menty44/paysurefred
adaa73008b7a050f938d729f759b4c9c8ec86332
f94fff5e4a0034e53bf724adc8fb3204078871e0
refs/heads/master
2020-06-18T03:42:46.900270
2016-11-28T09:18:18
2016-11-28T09:18:18
74,952,417
0
0
null
null
null
null
UTF-8
Java
false
false
5,032
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package paygate.objects; import java.io.Serializable; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author gachanja */ @Entity @Table(name = "siteuser") @NamedQueries({ @NamedQuery(name = "Siteuser.findAll", query = "SELECT s FROM Siteuser s"), @NamedQuery(name = "Siteuser.findById", query = "SELECT s FROM Siteuser s WHERE s.id = :id"), @NamedQuery(name = "Siteuser.findByFirstname", query = "SELECT s FROM Siteuser s WHERE s.firstname = :firstname"), @NamedQuery(name = "Siteuser.findByLastname", query = "SELECT s FROM Siteuser s WHERE s.lastname = :lastname"), @NamedQuery(name = "Siteuser.findByUsername", query = "SELECT s FROM Siteuser s WHERE s.username = :username"), @NamedQuery(name = "Siteuser.findByPassword", query = "SELECT s FROM Siteuser s WHERE s.password = :password"), @NamedQuery(name = "Siteuser.findByLastaccess", query = "SELECT s FROM Siteuser s WHERE s.lastaccess = :lastaccess"), @NamedQuery(name = "Siteuser.findByCreated", query = "SELECT s FROM Siteuser s WHERE s.created = :created"), @NamedQuery(name = "Siteuser.findByModified", query = "SELECT s FROM Siteuser s WHERE s.modified = :modified")}) public class Siteuser implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "id") private Integer id; @Column(name = "firstname") private String firstname; @Column(name = "lastname") private String lastname; @Column(name = "username") private String username; @Column(name = "password") private String password; @Column(name = "lastaccess") @Temporal(TemporalType.TIMESTAMP) private Date lastaccess; @Column(name = "created") @Temporal(TemporalType.TIMESTAMP) private Date created; @Column(name = "modified") @Temporal(TemporalType.TIMESTAMP) private Date modified; @JoinColumn(name = "usergroupid", referencedColumnName = "id") @ManyToOne private Usergroup usergroup; @JoinColumn(name = "merchantid", referencedColumnName = "id") @ManyToOne private Merchant merchant; public Siteuser() { } public Siteuser(Integer id) { this.id = id; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Date getLastaccess() { return lastaccess; } public void setLastaccess(Date lastaccess) { this.lastaccess = lastaccess; } public Date getCreated() { return created; } public void setCreated(Date created) { this.created = created; } public Date getModified() { return modified; } public void setModified(Date modified) { this.modified = modified; } public Usergroup getUsergroup() { return usergroup; } public void setUsergroup(Usergroup usergroup) { this.usergroup = usergroup; } public Merchant getMerchant() { return merchant; } public void setMerchant(Merchant merchant) { this.merchant = merchant; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Siteuser)) { return false; } Siteuser other = (Siteuser) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "paygate.objects.Siteuser[id=" + id + "]"; } }
[ "fred.oluoch@impalapay.com" ]
fred.oluoch@impalapay.com
db85031518b6e2ea70db85dbce39c32ee73a8de8
3c0765728d56db3247498556d9fdc1831cc20ea5
/jeevOMLibs/src/main/java/com/schooltriangle/mylibrary/model/EmailAndTokenTypeDictionary.java
edf1d651220b99c731ae18c635c8262746f68fd8
[]
no_license
shah00070/school
5b8814eb8592e9999913a1e9a800de5faeaa306e
a8b57ede5087f1b0a44e59222d9be3964f16ee4b
refs/heads/master
2021-01-20T18:52:21.398133
2016-06-03T08:49:11
2016-06-03T08:49:11
61,518,740
0
0
null
null
null
null
UTF-8
Java
false
false
2,853
java
package com.schooltriangle.mylibrary.model; public class EmailAndTokenTypeDictionary { private String Email; private String CellNumber; private int TokenType; private int ServiceRequestId; private int ServiceRequestMessageId; private String ClaimFromName; private String ClaimFromEmail; private String ClaimFromContactNumber; private String ClaimOnName; private int ClaimOnUserID; private String ClaimOnEmail; private String ClaimOnContactNumber; private String Token; public String getEmail() { return Email; } public String getClaimFromEmail() { return ClaimFromEmail; } public void setClaimFromEmail(String claimFromEmail) { ClaimFromEmail = claimFromEmail; } public String getClaimFromContactNumber() { return ClaimFromContactNumber; } public void setClaimFromContactNumber(String claimFromContactNumber) { ClaimFromContactNumber = claimFromContactNumber; } public String getClaimOnName() { return ClaimOnName; } public void setClaimOnName(String claimOnName) { ClaimOnName = claimOnName; } public int getClaimOnUserID() { return ClaimOnUserID; } public void setClaimOnUserID(int claimOnUserID) { ClaimOnUserID = claimOnUserID; } public String getClaimOnEmail() { return ClaimOnEmail; } public void setClaimOnEmail(String claimOnEmail) { ClaimOnEmail = claimOnEmail; } public String getClaimOnContactNumber() { return ClaimOnContactNumber; } public void setClaimOnContactNumber(String claimOnContactNumber) { ClaimOnContactNumber = claimOnContactNumber; } public String getToken() { return Token; } public void setToken(String token) { Token = token; } public void setEmail(String email) { Email = email; } public int getTokenType() { return TokenType; } public void setTokenType(int tokenType) { TokenType = tokenType; } public String getClaimFromName() { return ClaimFromName; } public void setClaimFromName(String claimFromName) { ClaimFromName = claimFromName; } public int getServiceRequestId() { return ServiceRequestId; } public void setServiceRequestId(int serviceRequestId) { ServiceRequestId = serviceRequestId; } public int getServiceRequestMessageId() { return ServiceRequestMessageId; } public void setServiceRequestMessageId(int serviceRequestMessageId) { ServiceRequestMessageId = serviceRequestMessageId; } public String getCellNumber() { return CellNumber; } public void setCellNumber(String cellNumber) { CellNumber = cellNumber; } }
[ "shah.h@jeevom.com" ]
shah.h@jeevom.com
627040caf8e153c0e858053197e5f9f2c4ee7717
92f10c41bad09bee05acbcb952095c31ba41c57b
/app/src/main/java/io/github/alula/ohmygod/MainActivity3245.java
1bd2b33c4398f2c92e5ba09f4e50daa0815f8584
[]
no_license
alula/10000-activities
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
f7e8de658c3684035e566788693726f250170d98
refs/heads/master
2022-07-30T05:54:54.783531
2022-01-29T19:53:04
2022-01-29T19:53:04
453,501,018
16
0
null
null
null
null
UTF-8
Java
false
false
339
java
package io.github.alula.ohmygod; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity3245 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "6276139+alula@users.noreply.github.com" ]
6276139+alula@users.noreply.github.com
d3178c472e30a81ae08bc35b03fae0220759ac15
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/domain/MybankCreditSupplychainTradeCreateModel.java
6d1c294a8826e3702d3a6878f266ef829c3b6fe0
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,914
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 交易创建 * * @author auto create * @since 1.0, 2019-06-14 22:08:12 */ public class MybankCreditSupplychainTradeCreateModel extends AlipayObject { private static final long serialVersionUID = 8872666174977112917L; /** * 买家会员信息 */ @ApiField("buyer") private Member buyer; /** * 渠道,枚举如下:TMGXBL:天猫供销保理,TYZBL:通用自保理,TMZBL:天猫自保理,DSCYFRZ:大搜车预付融资,CNBILL:菜鸟电票 */ @ApiField("channel") private String channel; /** * 账款到期支付日期 */ @ApiField("expire_date") private Date expireDate; /** * 由具体业务决定填充内容,JSON格式 */ @ApiField("ext_data") private String extData; /** * 外部订单号,格式:机构ipRoleId_外部订单号 */ @ApiField("out_order_no") private String outOrderNo; /** * 订单标题 */ @ApiField("out_order_title") private String outOrderTitle; /** * 买家付款账户信息 */ @ApiField("pay_account") private Account payAccount; /** * 卖家收款账户信息 */ @ApiField("rcv_account") private Account rcvAccount; /** * 幂等编号,用于幂等控制,格式:机构ipRoleId_yyyymmddhhmmss_8位uniqId */ @ApiField("request_id") private String requestId; /** * 销售产品码 */ @ApiField("sale_pd_code") private String salePdCode; /** * 卖家会员信息 */ @ApiField("seller") private Member seller; /** * 交易金额(单位:元),只支持两位小数点的正数 */ @ApiField("trade_amount") private String tradeAmount; /** * FACTORING:保理,PREPAYMENT:预付融资,CREDITPAY:信任付,PREPAYBILL:电票预付 */ @ApiField("trade_type") private String tradeType; public Member getBuyer() { return this.buyer; } public void setBuyer(Member buyer) { this.buyer = buyer; } public String getChannel() { return this.channel; } public void setChannel(String channel) { this.channel = channel; } public Date getExpireDate() { return this.expireDate; } public void setExpireDate(Date expireDate) { this.expireDate = expireDate; } public String getExtData() { return this.extData; } public void setExtData(String extData) { this.extData = extData; } public String getOutOrderNo() { return this.outOrderNo; } public void setOutOrderNo(String outOrderNo) { this.outOrderNo = outOrderNo; } public String getOutOrderTitle() { return this.outOrderTitle; } public void setOutOrderTitle(String outOrderTitle) { this.outOrderTitle = outOrderTitle; } public Account getPayAccount() { return this.payAccount; } public void setPayAccount(Account payAccount) { this.payAccount = payAccount; } public Account getRcvAccount() { return this.rcvAccount; } public void setRcvAccount(Account rcvAccount) { this.rcvAccount = rcvAccount; } public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getSalePdCode() { return this.salePdCode; } public void setSalePdCode(String salePdCode) { this.salePdCode = salePdCode; } public Member getSeller() { return this.seller; } public void setSeller(Member seller) { this.seller = seller; } public String getTradeAmount() { return this.tradeAmount; } public void setTradeAmount(String tradeAmount) { this.tradeAmount = tradeAmount; } public String getTradeType() { return this.tradeType; } public void setTradeType(String tradeType) { this.tradeType = tradeType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
19dc3d8c965135915576bf39981478e205c7463b
d57176af406c4acc60155baa5e141225113e172d
/src/java/com/tsp/sct/dao/factory/EmergenciaCreditoFacturaRealizadaDaoFactory.java
9bc22d1a9a60ae4cef8ce6ba3073f3ed5846e3d1
[]
no_license
njmube/SGFENS_BAFAR
8aa2bcf5312355efa46b84ab8533169df23a8cc9
4141ee825294246ca4703f7a4441f5a1b06fe0cb
refs/heads/master
2021-01-11T11:58:48.354602
2016-07-28T02:39:23
2016-07-28T02:39:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
879
java
/* * This source file was generated by FireStorm/DAO. * * If you purchase a full license for FireStorm/DAO you can customize this header file. * * For more information please visit http://www.codefutures.com/products/firestorm */ package com.tsp.sct.dao.factory; import java.sql.Connection; import com.tsp.sct.dao.dao.*; import com.tsp.sct.dao.jdbc.*; public class EmergenciaCreditoFacturaRealizadaDaoFactory { /** * Method 'create' * * @return EmergenciaCreditoFacturaRealizadaDao */ public static EmergenciaCreditoFacturaRealizadaDao create() { return new EmergenciaCreditoFacturaRealizadaDaoImpl(); } /** * Method 'create' * * @param conn * @return EmergenciaCreditoFacturaRealizadaDao */ public static EmergenciaCreditoFacturaRealizadaDao create(Connection conn) { return new EmergenciaCreditoFacturaRealizadaDaoImpl( conn ); } }
[ "nelly.gonzalez@vincoorbis.com" ]
nelly.gonzalez@vincoorbis.com
ff780b5dd31372c4a4dce12541386bc890cfc1cc
5e37161bc4eba92e02237235ad4a2dfd8b4188b7
/jinshuo-service/src/main/java/com/jinshuo/mall/service/item/mybatis/CouponLogsRepo.java
d09259336d00467b7bc4e9863060d412c57d7963
[]
no_license
dyhimos/jinshuo-mall
f4400cc41ca6a57b7512832209eea6d1a8c3b101
b1cc18c8445a46abd35796bfdad55824f0f4a5a8
refs/heads/master
2022-07-12T23:16:16.872664
2020-05-14T13:09:27
2020-05-14T13:09:27
260,648,942
0
0
null
null
null
null
UTF-8
Java
false
false
1,713
java
package com.jinshuo.mall.service.item.mybatis; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.jinshuo.mall.domain.item.couponlogs.CouponLogs; import com.jinshuo.mall.service.item.application.qry.CouponLogsQry; import com.jinshuo.mall.service.item.mybatis.mapper.CouponLogsMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import java.util.List; /** * @Classname SpuRepo * @Description TODO * @Date 2019/6/16 20:07 * @Created by dyh */ @Repository public class CouponLogsRepo { @Autowired(required = false) private CouponLogsMapper couponLogsMapper; public void save(CouponLogs couponLogs) { couponLogsMapper.create(couponLogs); } public int update(CouponLogs couponLogs) { return couponLogsMapper.update(couponLogs); } public CouponLogs queryById(Long couponLogsId) { return couponLogsMapper.queryById(couponLogsId); } public List<CouponLogs> findAll() { List<CouponLogs> list = couponLogsMapper.findAll(); return list; } public int delete(Long couponLogsId) { return couponLogsMapper.delete(couponLogsId); } public PageInfo<CouponLogs> getByPage(CouponLogsQry qry) { PageHelper.startPage(qry.getPageNum(), qry.getPageSize()); List<CouponLogs> list = couponLogsMapper.findAll(); PageInfo<CouponLogs> pageInfo = new PageInfo(list); return pageInfo; } public List<CouponLogs> queryMyLogsByCouponId(Long memId,Long couponId) { List<CouponLogs> list = couponLogsMapper.queryMyLogsByCouponId(memId,couponId); return list; } }
[ "1" ]
1
4cfa92c4905bddb38bf6f5563197a7d4c9844801
b771a60c6ec70c096f354529c49c5ceb3353063a
/microservicecloud-zuul-gateway-9527/src/main/java/com/wondertek/springcloud/Zuul_9527_StartSpringCloudApp.java
26496a384057b385d4554dcd9893d50c7050d70c
[]
no_license
zbcstudy/microservice-cloud
bb08f9ff31db8ffcacb52d538498b424a40799cb
611a9175592317778317841a24033d11604146cb
refs/heads/master
2020-04-01T03:55:12.977135
2019-05-17T08:41:39
2019-05-17T08:41:39
152,841,524
1
0
null
null
null
null
UTF-8
Java
false
false
421
java
package com.wondertek.springcloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; @SpringBootApplication @EnableZuulProxy public class Zuul_9527_StartSpringCloudApp { public static void main(String[] args) { SpringApplication.run(Zuul_9527_StartSpringCloudApp.class, args); } }
[ "1434756304@qq.com" ]
1434756304@qq.com
ad5784c0ed353f82c88f25f5b7b4c23f92cb69a5
e9124854d2bb3a40f6642858f3777e89a88b1d54
/custom/toint/tointfulfilmentprocess/testsrc/org/toint/fulfilmentprocess/test/actions/SendOrderCompletedNotification.java
eff63c3ce4d17c903a71399a4a945d2d92a2aea6
[]
no_license
Prashanth-techouts/Toint
9bcba94fd0422f20131c24cd9e0ec19e789941d6
dbd466fae6303a6c796ffd52f169119a4a7ee134
refs/heads/master
2023-09-03T02:20:49.827317
2021-10-22T10:48:30
2021-10-22T10:48:30
419,990,956
0
0
null
null
null
null
UTF-8
Java
false
false
233
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package org.toint.fulfilmentprocess.test.actions; /** * */ public class SendOrderCompletedNotification extends TestActionTemp { //empty }
[ "prashanth.g@techouts.com" ]
prashanth.g@techouts.com
4e8d82a916350e30c68c402d338c6bedd2ff2417
5145b7405f1ae107ba99a41fd28f638772165994
/Android/cloudpos_SDK/device/c/sample/APIDemo_as/src/com/cloudpos/apidemo/function/printer/PrintTag.java
6753ae98d734f48870084ad7f5a369d4af13db6a
[ "MIT" ]
permissive
ewkonzo/Projects
a55f45ff363dfc4892e57459f357d255e302d5ba
bf3efc30353086978cdeb0253680743f48d8fa86
refs/heads/master
2022-01-29T11:47:26.939493
2019-07-21T08:51:57
2019-07-21T08:51:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,939
java
package com.cloudpos.apidemo.function.printer; public class PrintTag { /** * Purchase bill tag */ static public final class PurchaseBillTag { static public final String PURCHASE_BILL_TITLE = "POS 签 购 单"; static public final String MERCHANT_NAME_TAG = "商户名称(MERCHANT NAME):"; static public final String MERCHANT_NO_TAG = "商户编号(MERCHANT NO):"; static public final String TERMINAL_NO_TAG = "终端编号(TERMINAL NO):"; static public final String OPERATOR_TAG = "操作员号(OPERATOR):"; static public final String CARD_NUMBER_TAG = "卡号(CARD NUMBER):"; static public final String ISS_NO_TAG = "发卡行号(ISS NO):"; static public final String ACQ_NO_TAG = "收单行号(ACQ NO):"; static public final String TXN_TYPE_TAG = "交易类别:"; static public final String EXP_DATE_TAG = "有效期(EXP DATE):"; static public final String BATCH_NO_TAG = "批次号(BATCH NO):"; static public final String VOUCHER_NO_TAG = "凭证号(VOUCHER NO):"; static public final String AUTH_NO_TAG = "授权码(AUTH NO):"; static public final String DATE_TIME_TAG = "日期/时间(DATE/TIME):"; static public final String REF_NO_TAG = "参考号(REF NO):"; static public final String AMOUT_TAG = "金额(AMOUT):"; static public final String TIPS_TAG = "小费(TIPS):"; static public final String TOTAL_TAG = "总计(TOTAL):"; static public final String REFERENCE_TAG = "备注(REFERENCE):"; static public final String C_CARD_HOLDER_SIGNATURE_TAG = "持卡人签名:"; static public final String E_CARD_HOLDER_SIGNATURE_TAG = "CARD HOLDER SIGNATURE"; static public final String C_AGREE_TRADE_TAG = "本人确认以上交易,同意将其记入本卡账户"; static public final String E_AGREE_TRADE_TAG = "I ACKNOWLEDGE SATISFACTORY RECEIPT OF RELATIVE GOOD"; } }
[ "mbugus2008@gmail.com" ]
mbugus2008@gmail.com
537c927bf9431a8369c5f455d81e40a0ab674ea5
dfd6dd7919e7bf4231bdb7fc1303303881cda045
/src/nbaquery/data/query/ExpressionDeriveColumnInfo.java
eb93e130fb28e51b0a0dccb287aa9765534c1700
[]
no_license
DongCanRola/NBAQuerySystem
aa704f406c6ad8b7fc791705d1ffa87a325df215
5c00a6a79fd09a301abd11a6f753d10466a657a3
refs/heads/master
2020-12-24T22:58:53.941644
2015-03-18T12:43:25
2015-03-18T12:43:25
32,455,318
0
0
null
2015-03-18T11:39:36
2015-03-18T11:39:36
null
UTF-8
Java
false
false
313
java
package nbaquery.data.query; public class ExpressionDeriveColumnInfo extends DeriveColumnInfo { public String statement; public ExpressionDeriveColumnInfo(String deriveColumns, Class<?> deriveClasses, String statement) { super(deriveColumns, deriveClasses); this.statement = statement; } }
[ "1910567646@qq.com" ]
1910567646@qq.com
4373cb2bb07054556efbf5fa19c4e0839b93ad25
5f63a60fd029b8a74d2b1b4bf6992f5e4c7b429b
/com/planet_ink/coffee_mud/Locales/CaveRoom.java
22fff8edf61cdf5217d1b1c3c3b92a7e20f96dde
[ "Apache-2.0" ]
permissive
bozimmerman/CoffeeMud
5da8b5b98c25b70554ec9a2a8c0ef97f177dc041
647864922e07572b1f6c863de8f936982f553288
refs/heads/master
2023-09-04T09:17:12.656291
2023-09-02T00:30:19
2023-09-02T00:30:19
5,267,832
179
122
Apache-2.0
2023-04-30T11:09:14
2012-08-02T03:22:12
Java
UTF-8
Java
false
false
4,653
java
package com.planet_ink.coffee_mud.Locales; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2023 Bo Zimmerman 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. */ public class CaveRoom extends StdRoom { @Override public String ID() { return "CaveRoom"; } public CaveRoom() { super(); name="the cave"; basePhyStats().setDisposition(basePhyStats().disposition()|PhyStats.IS_DARK); setMovementCost(2); setRoomSize(5); recoverPhyStats(); climask=Places.CLIMASK_NORMAL; } @Override public int domainType() { return Room.DOMAIN_INDOORS_CAVE; } @Override public void executeMsg(final Environmental myHost, final CMMsg msg) { if((msg.amITarget(this)||(msg.targetMinor()==CMMsg.TYP_ADVANCE)||(msg.targetMinor()==CMMsg.TYP_RETREAT)) &&(!msg.source().isMonster()) &&(msg.source().curState().getHitPoints()<msg.source().maxState().getHitPoints()) &&(CMLib.dice().rollPercentage()==1) &&(CMLib.dice().rollPercentage()==1) &&(isInhabitant(msg.source())) &&(!CMSecurity.isDisabled(CMSecurity.DisFlag.AUTODISEASE))) { final Ability A=CMClass.getAbility("Disease_Syphilis"); if((A!=null)&&(msg.source().fetchEffect(A.ID())==null)&&(!CMSecurity.isAbilityDisabled(A.ID()))) A.invoke(msg.source(),msg.source(),true,0); } super.executeMsg(myHost,msg); } public static final Integer[] resourceList={ Integer.valueOf(RawMaterial.RESOURCE_GRANITE), Integer.valueOf(RawMaterial.RESOURCE_OBSIDIAN), Integer.valueOf(RawMaterial.RESOURCE_MARBLE), Integer.valueOf(RawMaterial.RESOURCE_STONE), Integer.valueOf(RawMaterial.RESOURCE_ALABASTER), Integer.valueOf(RawMaterial.RESOURCE_IRON), Integer.valueOf(RawMaterial.RESOURCE_LEAD), Integer.valueOf(RawMaterial.RESOURCE_GOLD), Integer.valueOf(RawMaterial.RESOURCE_CHROMIUM), Integer.valueOf(RawMaterial.RESOURCE_SILVER), Integer.valueOf(RawMaterial.RESOURCE_ZINC), Integer.valueOf(RawMaterial.RESOURCE_COPPER), Integer.valueOf(RawMaterial.RESOURCE_TIN), Integer.valueOf(RawMaterial.RESOURCE_MITHRIL), Integer.valueOf(RawMaterial.RESOURCE_MUSHROOMS), Integer.valueOf(RawMaterial.RESOURCE_FUNGUS), Integer.valueOf(RawMaterial.RESOURCE_GEM), Integer.valueOf(RawMaterial.RESOURCE_PERIDOT), Integer.valueOf(RawMaterial.RESOURCE_DIAMOND), Integer.valueOf(RawMaterial.RESOURCE_LAPIS), Integer.valueOf(RawMaterial.RESOURCE_BLOODSTONE), Integer.valueOf(RawMaterial.RESOURCE_MOONSTONE), Integer.valueOf(RawMaterial.RESOURCE_ALEXANDRITE), Integer.valueOf(RawMaterial.RESOURCE_GEM), Integer.valueOf(RawMaterial.RESOURCE_SCALES), Integer.valueOf(RawMaterial.RESOURCE_CRYSTAL), Integer.valueOf(RawMaterial.RESOURCE_RUBY), Integer.valueOf(RawMaterial.RESOURCE_EMERALD), Integer.valueOf(RawMaterial.RESOURCE_SAPPHIRE), Integer.valueOf(RawMaterial.RESOURCE_AGATE), Integer.valueOf(RawMaterial.RESOURCE_DIRT), Integer.valueOf(RawMaterial.RESOURCE_CITRINE), Integer.valueOf(RawMaterial.RESOURCE_PLATINUM), Integer.valueOf(RawMaterial.RESOURCE_PALLADIUM), Integer.valueOf(RawMaterial.RESOURCE_NICKEL) }; public static final List<Integer> roomResources=new Vector<Integer>(Arrays.asList(resourceList)); @Override public List<Integer> resourceChoices() { return CaveRoom.roomResources; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
538f8488c55ed3851beb3dd3ce8f485de639b935
32bd25b2071c99676c8cc8c97afd0941fbceaa9c
/nan21.dnet.core.web/src/main/java/net/nan21/dnet/core/web/controller/workflow/AbstractWorkflowController.java
5e0addda92b72b5ad9e967b92ebf693cf3692dc3
[]
no_license
sugengsuprayogi/nan21.dnet.core
de3cf4e415b4b089f481d90d86e154ec6188186f
7df8454102ae0009adf4f7a11460be637e64e1f1
refs/heads/master
2021-01-14T12:35:20.163123
2013-02-19T12:58:26
2013-02-19T12:58:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,765
java
package net.nan21.dnet.core.web.controller.workflow; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.servlet.http.HttpServletRequest; import net.nan21.dnet.core.api.wf.IActivitiProcessEngineHolder; import net.nan21.dnet.core.web.controller.AbstractDnetController; import org.activiti.engine.FormService; import org.activiti.engine.HistoryService; import org.activiti.engine.ProcessEngine; import org.activiti.engine.RepositoryService; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.impl.util.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public abstract class AbstractWorkflowController extends AbstractDnetController { // private IActivitiProcessEngineHolder processEngineHolder; private ProcessEngine workflowEngine; // private JSONObject json = null; final static Logger logger = LoggerFactory .getLogger(AbstractWorkflowController.class); public void setProcessEngine(ProcessEngine processEngine) { this.workflowEngine = processEngine; } public ProcessEngine getWorkflowEngine() throws Exception { if (this.workflowEngine == null) { this.workflowEngine = (ProcessEngine) this.getApplicationContext() .getBean(IActivitiProcessEngineHolder.class) .getProcessEngine(); } return this.workflowEngine; } public RuntimeService getWorkflowRuntimeService() throws Exception { return this.getWorkflowEngine().getRuntimeService(); } public TaskService getWorkflowTaskService() throws Exception { return this.getWorkflowEngine().getTaskService(); } public RepositoryService getWorkflowRepositoryService() throws Exception { return this.getWorkflowEngine().getRepositoryService(); } public HistoryService getWorkflowHistoryService() throws Exception { return this.getWorkflowEngine().getHistoryService(); } public FormService getWorkflowFormService() throws Exception { return this.getWorkflowEngine().getFormService(); } @SuppressWarnings("unchecked") public Map<String, Object> getFormVariables(HttpServletRequest request) throws Exception { Map<String, String> params = collectParams(request, null, null); JSONObject json = null; try { json = new JSONObject(params); } catch (Throwable t) { json = new JSONObject(); } Map<String, Object> map = new HashMap<String, Object>(); Iterator<String> keys = json.keys(); String key, typeKey, type; String[] keyPair; Object value; while (keys.hasNext()) { key = (String) keys.next(); keyPair = key.split("_"); if (keyPair.length == 1) { typeKey = keyPair[0] + "_type"; if (json.has(typeKey)) { type = json.getString(typeKey); if (type.equals("Integer")) { value = json.getInt(key); } else if (type.equals("Boolean")) { value = json.getBoolean(key); } else if (type.equals("Date")) { value = json.getString(key); } else if (type.equals("User")) { value = json.getString(key); } else if (type.equals("String")) { value = json.getString(key); } else { throw new Exception( /* Status.STATUS_BAD_REQUEST, */"Parameter '" + keyPair[0] + "' is of unknown type '" + type + "'"); } } else { value = json.get(key); } map.put(key, value); } else if (keyPair.length == 2) { if (keyPair[1].equals("required")) { if (!json.has(keyPair[0]) || json.get(keyPair[0]) == null) { throw new Exception( /* Status.STATUS_BAD_REQUEST, */"Parameter '" + keyPair[0] + "' has no value"); } } } } return map; } }
[ "mathe_attila@yahoo.com" ]
mathe_attila@yahoo.com
cf4da2bac10a4d8ff5a3d07a822fe41b94940fc4
0ce9077cb06ba2dd2286d2767498892020545fab
/manager/api/es/src/main/java/io/apiman/manager/api/es/util/TermFilterBuilder.java
7599e33383220747291dfdc00ae0aab4b4777394
[ "Apache-2.0" ]
permissive
zgdkik/apiman
2d4a5fa65c0a2e5020225e5afa24bee808a63168
86e3003c484798c87d679f6c45c05c6b2caf95bf
refs/heads/master
2021-01-25T13:05:28.370079
2017-11-27T21:48:04
2018-02-28T18:09:32
123,525,349
2
0
Apache-2.0
2018-03-02T03:27:36
2018-03-02T03:27:36
null
UTF-8
Java
false
false
2,023
java
/* * Copyright 2016 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.apiman.manager.api.es.util; import java.io.IOException; /** * @author ewittman * */ public class TermFilterBuilder extends AbstractQueryBuilder { private String term; private String sValue; private Boolean bValue; private Long lValue; /** * Constructor. * @param term * @param value */ public TermFilterBuilder(String term, String value) { this.term = term; this.sValue = value; } /** * Constructor. * @param term * @param value */ public TermFilterBuilder(String term, boolean value) { this.term = term; this.bValue = value; } /** * Constructor. * @param term * @param value */ public TermFilterBuilder(String term, Long value) { this.term = term; this.lValue = value; } /** * @see io.apiman.manager.api.es.util.AbstractQueryBuilder#doXContent(io.apiman.manager.api.es.util.XContentBuilder) */ @SuppressWarnings("nls") @Override protected void doXContent(XContentBuilder builder) throws IOException { builder.startObject("term"); if (sValue != null) { builder.field(term, sValue); } else if (bValue != null) { builder.field(term, bValue); } else if (lValue != null) { builder.field(term, lValue); } builder.endObject(); } }
[ "eric.wittmann@gmail.com" ]
eric.wittmann@gmail.com
74fc4a75bcd1bce4e25b63815509da1fbb849ddc
aa2f56c3a108da41dafcf53b12e39f520032ca30
/wsclient/src/main/java/org/hpccsystems/ws/client/gen/filespray/v1_17/DFUActionResult.java
9c945fd629d3b91661f8fbc3950dd0428340f4b1
[]
no_license
drealeed/HPCC-JAPIs
459e6c0ab0bbf8d7893fafb775167197567cc573
ee652f4d5163d0f7daa7949015dc4d815b64749d
refs/heads/master
2022-06-24T13:46:14.497602
2019-05-21T18:24:47
2019-05-21T18:24:47
23,236,635
0
0
null
null
null
null
UTF-8
Java
false
false
5,765
java
/** * DFUActionResult.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package org.hpccsystems.ws.client.gen.filespray.v1_17; public class DFUActionResult implements java.io.Serializable { private java.lang.String ID; private java.lang.String action; private java.lang.String result; public DFUActionResult() { } public DFUActionResult( java.lang.String ID, java.lang.String action, java.lang.String result) { this.ID = ID; this.action = action; this.result = result; } /** * Gets the ID value for this DFUActionResult. * * @return ID */ public java.lang.String getID() { return ID; } /** * Sets the ID value for this DFUActionResult. * * @param ID */ public void setID(java.lang.String ID) { this.ID = ID; } /** * Gets the action value for this DFUActionResult. * * @return action */ public java.lang.String getAction() { return action; } /** * Sets the action value for this DFUActionResult. * * @param action */ public void setAction(java.lang.String action) { this.action = action; } /** * Gets the result value for this DFUActionResult. * * @return result */ public java.lang.String getResult() { return result; } /** * Sets the result value for this DFUActionResult. * * @param result */ public void setResult(java.lang.String result) { this.result = result; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof DFUActionResult)) return false; DFUActionResult other = (DFUActionResult) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.ID==null && other.getID()==null) || (this.ID!=null && this.ID.equals(other.getID()))) && ((this.action==null && other.getAction()==null) || (this.action!=null && this.action.equals(other.getAction()))) && ((this.result==null && other.getResult()==null) || (this.result!=null && this.result.equals(other.getResult()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getID() != null) { _hashCode += getID().hashCode(); } if (getAction() != null) { _hashCode += getAction().hashCode(); } if (getResult() != null) { _hashCode += getResult().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(DFUActionResult.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:hpccsystems:ws:filespray", "DFUActionResult")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("ID"); elemField.setXmlName(new javax.xml.namespace.QName("urn:hpccsystems:ws:filespray", "ID")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("action"); elemField.setXmlName(new javax.xml.namespace.QName("urn:hpccsystems:ws:filespray", "Action")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("result"); elemField.setXmlName(new javax.xml.namespace.QName("urn:hpccsystems:ws:filespray", "Result")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "rodrigo.pastrana@lexisnexis.com" ]
rodrigo.pastrana@lexisnexis.com
cf82066693b086f0fe9cc6838b0d76bd292985a4
9be40bd00895a4e5ee35e4e38e6c829490699b25
/src/代理/仿jdk动态代理/TimerImvocationHandle.java
67a624ce04a0941be66aaaa53411c284c14b2e0b
[]
no_license
gaohe1227/designmodle
d8b5a04ec47b6fe8189804e22f362fb55ab04875
6d858e68ebfd310f999b258bd8ee360db7062fdd
refs/heads/master
2020-12-02T07:48:52.516630
2017-09-19T08:11:02
2017-09-19T08:11:02
96,729,245
0
0
null
null
null
null
GB18030
Java
false
false
852
java
package 代理.仿jdk动态代理; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class TimerImvocationHandle implements MyImvocationHandle { private Object target; public TimerImvocationHandle(Object target) { super(); this.target = target; } @Override public void invoke(Object obj, Method method) { // TODO Auto-generated method stub try { long starttime = System.currentTimeMillis(); System.out.println("汽车开始行驶...."); method.invoke(target); long endtime = System.currentTimeMillis(); System.out.println("汽车结束行驶.... 汽车行驶时间:" + (endtime - starttime) + "毫秒!"); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "904724283@qq.com" ]
904724283@qq.com
f69da6b056594becdfd3664492001497b7966300
dd5862618cb3de4c6e8df160fca73b9cdd1c5dab
/src/main/java/basic_java_thread/thread_pool/simple_connection_pool/SimpleConnectionPool.java
fc8df65c2f0376fb828b3f9c6caa66a83b353255
[]
no_license
YifengGuo/Multi-Thread
5d2d205fbc4b9335927f9c9ca12873bbcd9b14f7
f3310d2de421ece58a955b51e118fed6dd351655
refs/heads/master
2021-06-09T18:35:07.395422
2019-10-15T07:29:20
2019-10-15T07:29:20
134,930,888
0
0
null
2021-03-31T21:39:15
2018-05-26T05:02:19
Java
UTF-8
Java
false
false
2,742
java
package basic_java_thread.thread_pool.simple_connection_pool; import com.google.common.base.Preconditions; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.ArrayDeque; import java.util.Deque; import java.util.concurrent.TimeUnit; /** * Created by guoyifeng on 10/8/19 */ public class SimpleConnectionPool { private Deque<Connection> pool = new ArrayDeque<>(); public SimpleConnectionPool(int initialSize) { Preconditions.checkArgument(initialSize > 0, "initial size must be positive"); for (int i = 0; i < initialSize; ++i) { pool.addLast(ConnectionDriver.createConnection()); } } public void releaseConnection(Connection connection) { Preconditions.checkNotNull(connection); synchronized (pool) { // return connection to deque and notify all waiting threads pool.addLast(connection); pool.notifyAll(); } } /** * timeout mechanism * @param millis waiting milliseconds before timeout * @return Connection for current ops * @throws InterruptedException */ public Connection fetchConnection(long millis) throws InterruptedException { synchronized (pool) { // do not wait if (millis <= 0) { while (pool.isEmpty()) { pool.wait(); } return pool.removeFirst(); } else { long future = System.currentTimeMillis() + millis; long remaining = millis; while (pool.isEmpty() && remaining > 0) { pool.wait(); remaining = future - System.currentTimeMillis(); } Connection result = null; if (!pool.isEmpty()) { result = pool.removeFirst(); } return result; } } } static class Connection { } static class ConnectionDriver { static class ConnectionHandler implements InvocationHandler { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals("commit")) { TimeUnit.MILLISECONDS.sleep(100); } return null; } } public static final Connection createConnection() { return (Connection) Proxy.newProxyInstance( ConnectionDriver.class.getClassLoader(), new Class[]{Connection.class}, new ConnectionHandler()); } } }
[ "gyf940517@gmail.com" ]
gyf940517@gmail.com
4f72f39cad74aa714475163936b2ab8c5960e179
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14263-31-3-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest.java
48d69bd261c1e0b208ceb9c5ae77d904b8fcbcd6
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 01:46:49 UTC 2020 */ package org.xwiki.velocity.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultVelocityEngine_ESTest extends DefaultVelocityEngine_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
cd1ee17d7f0b86b1e372ee51605a33423f4648e1
83d56024094d15f64e07650dd2b606a38d7ec5f1
/sicc_druida/fuentes/java/CccCuentContaViewConectorCreate.java
9101240becf27c7febfa22c6526121bf06079bc8
[]
no_license
cdiglesias/SICC
bdeba6af8f49e8d038ef30b61fcc6371c1083840
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
refs/heads/master
2021-01-19T19:45:14.788800
2016-04-07T16:20:51
2016-04-07T16:20:51
null
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
1,938
java
import org.w3c.dom.*; import java.util.ArrayList; public class CccCuentContaViewConectorCreate implements es.indra.druida.base.ObjetoXML { private ArrayList v = new ArrayList(); public Element getXML (Document doc){ getXML0(doc); return (Element)v.get(0); } /* Primer nodo */ private void getXML0(Document doc) { v.add(doc.createElement("CONECTOR")); ((Element)v.get(0)).setAttribute("TIPO","EJB" ); ((Element)v.get(0)).setAttribute("NOMBRE","mare.mln.BusinessFacade" ); ((Element)v.get(0)).setAttribute("METODO","execute" ); ((Element)v.get(0)).setAttribute("REVISION","3.1" ); ((Element)v.get(0)).setAttribute("OBSERVACIONES","Conector para la inserción de un nuevo elemento sobre la entidad CccCuentContaView" ); /* Empieza nodo:1 / Elemento padre: 0 */ v.add(doc.createElement("ENTRADA")); ((Element)v.get(0)).appendChild((Element)v.get(1)); /* Empieza nodo:2 / Elemento padre: 1 */ v.add(doc.createElement("CAMPO")); ((Element)v.get(2)).setAttribute("NOMBRE","MMGCccCuentContaViewCreateID" ); ((Element)v.get(2)).setAttribute("TIPO","OBJETO" ); ((Element)v.get(2)).setAttribute("LONGITUD","50" ); ((Element)v.get(1)).appendChild((Element)v.get(2)); /* Termina nodo:2 */ /* Empieza nodo:3 / Elemento padre: 1 */ v.add(doc.createElement("CAMPO")); ((Element)v.get(3)).setAttribute("NOMBRE","MMGCccCuentContaViewCreateDTO" ); ((Element)v.get(3)).setAttribute("TIPO","OBJETO" ); ((Element)v.get(3)).setAttribute("LONGITUD","50" ); ((Element)v.get(1)).appendChild((Element)v.get(3)); /* Termina nodo:3 */ /* Termina nodo:1 */ /* Empieza nodo:4 / Elemento padre: 0 */ v.add(doc.createElement("SALIDA")); ((Element)v.get(0)).appendChild((Element)v.get(4)); /* Termina nodo:4 */ } }
[ "hp.vega@hotmail.com" ]
hp.vega@hotmail.com
027268a3e63a879833a3ece5d2597182cf1ae35b
1f207999be869a53c773c4b3dc4cff3d78f60aca
/ybg_base_jar/src/main/java/com/alipay/api/domain/CardDomainVO.java
6df04d13d6808bcf3d9a5a4131dc529c3c32d97e
[]
no_license
BrendaHub/quanmin_admin
8b4f1643112910b728adc172324b8fb8a2f672dc
866548dc219a2eaee0a09efbc3b6410eb3c2beb9
refs/heads/master
2021-05-09T04:17:03.818182
2018-01-28T15:00:12
2018-01-28T15:00:12
119,267,872
1
1
null
null
null
null
UTF-8
Java
false
false
848
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 卡域模型 * * @author auto create * @since 1.0, 2015-09-22 11:07:41 */ public class CardDomainVO extends AlipayObject { private static final long serialVersionUID = 7545565359142111154L; /** * 值域域名的描述值,固定为”金融” */ @ApiField("description") private String description; /** * 值域域名,固定为“FINANCE” */ @ApiField("domain_name") private String domainName; public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } public String getDomainName() { return this.domainName; } public void setDomainName(String domainName) { this.domainName = domainName; } }
[ "13552666934@139.com" ]
13552666934@139.com
53b117fd0eef9d2e62138d339cde7fefb08d376c
b5e385237fc82481974121326d38401344026ad3
/DesignPatterns16-Memory_Database/src/pl/jaceksysiak/designpatterns/demo1/model/Log.java
a6b8bb14e9b7833ce4020b9b873dd1e613ad6a82
[]
no_license
j4sysiak/DesignPatterns16-Memory_Database
e5b1adcccd80e29a0f08f7ff7abb7cd6a009e584
6913716753f5d2b5eee13ce769862d5fed0c928e
refs/heads/master
2020-04-24T20:18:46.992730
2019-02-24T06:03:00
2019-02-24T06:03:00
172,239,323
1
0
null
null
null
null
UTF-8
Java
false
false
508
java
package pl.jaceksysiak.designpatterns.demo1.model; import java.util.Date; public class Log { private int id; private Date date; private String message; public int getId() { return id; } public void setId(int id) { this.id = id; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "j4sysiak@gmail.com" ]
j4sysiak@gmail.com
8ed03af9579207c570396eb10fe3da3c59ccb351
30aeaad268c91b5ce97a3a0a7a4def8d33651732
/src/com/anurag/final_keyword/staticfinalvariable/Final10.java
000bf1bd710e9ef7a8fb89636373429d3d875140
[]
no_license
AnuragGit/CoreJavaProjects
317d3b6687ec5858e18bdfd483ac5ffd093c52a2
ee21fad2c9306fafbf3ce88e2b501958acb2ca98
refs/heads/master
2021-01-17T09:11:25.773721
2016-05-29T07:47:10
2016-05-29T07:47:10
22,305,528
0
0
null
null
null
null
UTF-8
Java
false
false
659
java
package com.anurag.final_keyword.staticfinalvariable; /** * * @author Anurag * * Concept:- Static final variable can not survive with default value that should be explicit * assign by developer. */ public class Final10 { final static int i=10; static final int j=20; // static final int z; public static void main(String[] args) { System.out.println(i); //i=10; This line give compile time error. System.out.println(Final10.j); System.out.println(j); //j=20; This line give compile time error. //Final9.j=70; This line give compile time error. } } /* Output:- 10 20 20 */
[ "test@test.com" ]
test@test.com
a1841f4b7042a78787dfbb1933021e03dd825c18
be4d3f4e102e30a993fe19b30f3036a2c92ff5d5
/src/java/cn/miao/framework/filter/AuthenticationFilter.java
8f19ed3743b0f6f9b636d67ac30c05b9da8cb38a
[]
no_license
cabbageBob/htbus
2f02defbf0d195e9876fe370a83a7b2cf7cc0bce
6e72e9905dc7fb9c6124cd1359d8e0407e457023
refs/heads/master
2020-04-11T20:17:56.776702
2018-12-17T02:58:13
2018-12-17T02:58:13
162,065,716
0
0
null
null
null
null
UTF-8
Java
false
false
2,017
java
/* * version date author * ────────────────────────────────── * 1.0 Nov 27, 2012 Neal Miao * * Copyright(c) 2012, by HTWater. All Rights Reserved. */ package cn.miao.framework.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; /** * * * @author Neal Miao * @version * @since v 1.0 * @Date Nov 27, 2012 9:49:10 AM * * @see */ public class AuthenticationFilter implements Filter { Logger logger = Logger.getLogger(this.getClass()); protected FilterConfig filterConfig = null; /* * (non-Javadoc) * * @see javax.servlet.Filter#destroy() */ public void destroy() { this.filterConfig = null; } /* * (non-Javadoc) * * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, * javax.servlet.ServletResponse, javax.servlet.FilterChain) */ public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { logger.debug("Authentication Filter start"); HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) resp; HttpSession session = request.getSession(); if (null == session.getAttribute("token")) { response.sendRedirect(request.getContextPath() + "/login.html"); // 多个Filter会出问题 return; } logger.debug("Authentication Filter end"); chain.doFilter(request, response); } /* * (non-Javadoc) * * @see javax.servlet.Filter#init(javax.servlet.FilterConfig) */ public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; } }
[ "1041567236@qq.com" ]
1041567236@qq.com
b92f4ca038a34170dfe03f6723bf25095c11b3dd
26191a19ef099dc0710eb428262703067ba30045
/PuvS/src/assignment02/ParallelPrefix.java
a832c1a5660ab1b47fdaae69dfc9dc60cfead296
[]
no_license
Zamo3006/PuvS
9a3949cc66a36d41fdc875adb7f4072431557428
f70436c2d9c20dd5ab15fd3c083b91974b0c0162
refs/heads/master
2021-01-18T03:38:09.825812
2017-03-29T13:03:39
2017-03-29T13:03:39
85,805,773
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,364
java
package assignment02; import java.util.Arrays; public class ParallelPrefix { private int[] data; public void initializeArray(int length) { data = new int[length]; for (int i = 0; i < length; i++) { data[i] = i + 1; } } public void printArray() { for (int date : data) { System.out.print(date + " "); } System.out.println(); } public void printArray(int i) { System.out.println(data[data.length-1]); } public void seqPrefixSum() { for (int i = 1; i < data.length; i++) { data[i] += data[i - 1]; } } public void streamPrefix(){ Arrays.parallelPrefix(data,Integer::sum); } public void parPrefixSum() { for(int d = 0; d<Math.log(data.length)/Math.log(2);d++){ } data[data.length-1]=0; for(int d = (int) (Math.log(data.length)/Math.log(2)); d>0;d--){ } } // for d = 0 to log2(n) – 1 do // for all k = 0 to n – 1 by 2^(d+1) in parallel do // x[k + 2^(d+1) – 1] = x[k + 2^d – 1] + x[k + 2^(d+1) – 1] // x[n – 1] = 0 // for d = log2(n) – 1 down to 0 do // for all k = 0 to n – 1 by 2^(d+1) in parallel do // t = x[k + 2^d – 1] // x[k + 2^d – 1] = x[k + 2^(d+1) – 1] // x[k + 2^(d+1) – 1] = t + x[k + 2^(d+1) – 1] }
[ "1" ]
1
b18f697e2a2c7e4070ec63197771827e3be1152e
e8d496d0ed0d1501e4084738b86ef13a052217bb
/src/com/beike/dao/businessbackground/impl/EvaluationDaoImpl.java
39d5fec0cb56a2ff4afa54f058689d0f194c74dc
[]
no_license
fairyhawk/beiker-Deprecated
0dcb4921257f4e78de6faa41d711ae5750dcc05b
4c9fbc80ec471220550f3d5c44f4c8aad5f58cec
refs/heads/master
2021-01-19T11:02:48.214301
2014-01-25T10:28:42
2014-01-25T10:28:42
8,679,682
1
5
null
null
null
null
UTF-8
Java
false
false
5,760
java
package com.beike.dao.businessbackground.impl; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Repository; import com.beike.dao.GenericDaoImpl; import com.beike.dao.businessbackground.EvaluationDao; /** * @Title:EvaluationDaoImpl.java * @Package com.beike.dao.businessbackground.impl * @Description: * @date:2013-1-28 - 下午12:30:38 * @author:zhaojinglong@qianpin.com * @version */ @SuppressWarnings("unchecked") @Repository("evaluationDao") public class EvaluationDaoImpl extends GenericDaoImpl implements EvaluationDao { @Override public int getEvaluateCount(Map<String, Object> queryMap) { StringBuilder evaCountSql = new StringBuilder(); evaCountSql.append("SELECT COUNT(ordereva.id) "); evaCountSql.append("FROM beiker_order_evaluation ordereva "); evaCountSql.append("JOIN beiker_trxorder_goods ordergoods ON ordereva.id = ordergoods.comment_id "); evaCountSql.append("JOIN beiker_user user ON ordereva.userid = user.user_id "); evaCountSql.append("WHERE ordereva.merchantid = ? "); String goodssn = (String)queryMap.get("goodssn"); Long goodsid = (Long)queryMap.get("goodsid"); String email = (String)queryMap.get("email"); Long userid = (Long)queryMap.get("userid"); Long subguestid = (Long)queryMap.get("subguestid"); Integer score = (Integer)queryMap.get("score"); List<Object> lstArgs = new ArrayList<Object>(); lstArgs.add((Long)queryMap.get("merchantid")); //品牌ID if(StringUtils.isNotEmpty(goodssn)){ //订单编号 evaCountSql.append("AND ordergoods.trx_goods_sn = ? "); lstArgs.add(goodssn); } if(goodsid != null && goodsid > 0){ //商品编号-ID evaCountSql.append("AND ordereva.goodsid = ? "); lstArgs.add(goodsid); } if(StringUtils.isNotEmpty(email)){ //登录用户-email evaCountSql.append("AND user.email LIKE ? "); lstArgs.add(email + "%"); } if(userid != null && userid > 0){ //会员ID evaCountSql.append("AND ordereva.userid = ? "); lstArgs.add(userid); } if(subguestid != null){ //所消费分店 evaCountSql.append("AND ordergoods.sub_guest_id = ? "); lstArgs.add(subguestid); } if(score != null && score >= 0 && score <= 2){ //评价级别 evaCountSql.append("AND ordereva.score = ? "); lstArgs.add(score); } return this.getSimpleJdbcTemplate().queryForInt(evaCountSql.toString(), lstArgs.toArray()); } @Override public List<Map<String, Object>> getScrollEvaluate(Map<String, Object> queryMap, int curPage, int pageSize) { //可以查询出来的:订单编号,商品ID,登录用户,评价级别,评价时间,评价内容 //缺少的:商品名称,商品类型,所消费分店 StringBuilder evaSql = new StringBuilder(); evaSql.append("SELECT ordereva.id, ordergoods.trx_goods_sn AS goodssn, ordereva.goodsid, user.email, ordereva.score, "); evaSql.append("ordereva.addtime AS addtime, ordereva.evaluation AS evaluation, ordergoods.sub_guest_id AS subguestid, ordergoods.biz_type AS biztype "); evaSql.append("FROM beiker_order_evaluation ordereva "); evaSql.append("JOIN beiker_trxorder_goods ordergoods ON ordereva.id = ordergoods.comment_id "); evaSql.append("JOIN beiker_user user ON ordereva.userid = user.user_id "); evaSql.append("WHERE ordereva.merchantid = ? "); String goodssn = (String)queryMap.get("goodssn"); Long goodsid = (Long)queryMap.get("goodsid"); String email = (String)queryMap.get("email"); Long userid = (Long)queryMap.get("userid"); Long subguestid = (Long)queryMap.get("subguestid"); Integer score = (Integer)queryMap.get("score"); List<Object> lstArgs = new ArrayList<Object>(); lstArgs.add((Long)queryMap.get("merchantid")); //品牌ID if(StringUtils.isNotEmpty(goodssn)){ //订单编号 evaSql.append("AND ordergoods.trx_goods_sn = ? "); lstArgs.add(goodssn); } if(goodsid != null && goodsid > 0){ //商品编号-ID evaSql.append("AND ordereva.goodsid = ? "); lstArgs.add(goodsid); } if(StringUtils.isNotEmpty(email)){ //登录用户-email evaSql.append("AND user.email LIKE ? "); lstArgs.add(email + "%"); } if(userid != null && userid > 0){ //会员ID evaSql.append("AND ordereva.userid = ? "); lstArgs.add(userid); } if(subguestid != null){ //所消费分店 evaSql.append("AND ordergoods.sub_guest_id = ? "); lstArgs.add(subguestid); } if(score != null && score >= 0 && score <= 2){ //评价级别 evaSql.append("AND ordereva.score = ? "); lstArgs.add(score); } evaSql.append("ORDER BY ordereva.addtime DESC "); evaSql.append("LIMIT ?, ?"); lstArgs.add((curPage - 1) * pageSize); lstArgs.add(pageSize); return this.getJdbcTemplate().queryForList(evaSql.toString(), lstArgs.toArray()); } public List<Map<String, Object>> getGoodsByIds(Set<Long> goodsidsSet){ String goodsids = StringUtils.join(goodsidsSet, ","); if(StringUtils.isNotEmpty(goodsids)){ String sql = "SELECT goods.goodsid, goods.goodsname, goods.couponcash FROM beiker_goods goods WHERE goods.goodsid IN(" + goodsids + ")"; return this.getJdbcTemplate().queryForList(sql); } return null; } public List<Map<String, Object>> getSubGuests(Set<Long> subguestidsSet){ String subguestids = StringUtils.join(subguestidsSet, ","); if(StringUtils.isNotEmpty(subguestids)){ String sql = "SELECT merchant.merchantid, merchant.merchantname FROM beiker_merchant merchant WHERE merchant.merchantid IN(" + subguestids + ")"; return this.getJdbcTemplate().queryForList(sql); } return null; } }
[ "bis@foxmail.com" ]
bis@foxmail.com
3457f5aff15756ca10ae9f244c21543a75b53ecc
59ca721ca1b2904fbdee2350cd002e1e5f17bd54
/aliyun-java-sdk-cms/src/main/java/com/aliyuncs/cms/transform/v20180308/TaskConfigUnhealthyResponseUnmarshaller.java
036196799f027ec0cf718cf88f3b9e2b582abd71
[ "Apache-2.0" ]
permissive
longtx/aliyun-openapi-java-sdk
8fadfd08fbcf00c4c5c1d9067cfad20a14e42c9c
7a9ab9eb99566b9e335465a3358553869563e161
refs/heads/master
2020-04-26T02:00:35.360905
2019-02-28T13:47:08
2019-02-28T13:47:08
173,221,745
2
0
NOASSERTION
2019-03-01T02:33:35
2019-03-01T02:33:35
null
UTF-8
Java
false
false
2,383
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.cms.transform.v20180308; import java.util.ArrayList; import java.util.List; import com.aliyuncs.cms.model.v20180308.TaskConfigUnhealthyResponse; import com.aliyuncs.cms.model.v20180308.TaskConfigUnhealthyResponse.NodeTaskInstance; import com.aliyuncs.transform.UnmarshallerContext; public class TaskConfigUnhealthyResponseUnmarshaller { public static TaskConfigUnhealthyResponse unmarshall(TaskConfigUnhealthyResponse taskConfigUnhealthyResponse, UnmarshallerContext context) { taskConfigUnhealthyResponse.setRequestId(context.stringValue("TaskConfigUnhealthyResponse.RequestId")); taskConfigUnhealthyResponse.setErrorCode(context.integerValue("TaskConfigUnhealthyResponse.ErrorCode")); taskConfigUnhealthyResponse.setErrorMessage(context.stringValue("TaskConfigUnhealthyResponse.ErrorMessage")); taskConfigUnhealthyResponse.setSuccess(context.booleanValue("TaskConfigUnhealthyResponse.Success")); List<NodeTaskInstance> unhealthyList = new ArrayList<NodeTaskInstance>(); for (int i = 0; i < context.lengthValue("TaskConfigUnhealthyResponse.UnhealthyList.Length"); i++) { NodeTaskInstance nodeTaskInstance = new NodeTaskInstance(); nodeTaskInstance.setTaskId(context.longValue("TaskConfigUnhealthyResponse.UnhealthyList["+ i +"].TaskId")); List<String> instanceList = new ArrayList<String>(); for (int j = 0; j < context.lengthValue("TaskConfigUnhealthyResponse.UnhealthyList["+ i +"].InstanceList.Length"); j++) { instanceList.add(context.stringValue("TaskConfigUnhealthyResponse.UnhealthyList["+ i +"].InstanceList["+ j +"]")); } nodeTaskInstance.setInstanceList(instanceList); unhealthyList.add(nodeTaskInstance); } taskConfigUnhealthyResponse.setUnhealthyList(unhealthyList); return taskConfigUnhealthyResponse; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
ca06f36351ce2a06955fc1eace52756bc4bd95e8
a4bffc00df9feca2ae6baad2a724ca3662bc9fc7
/library/src/test/java/com/dslplatform/json/generated/types/Double/OneListOfOneDoublesDefaultValueTurtle.java
07ef4ea4b1db603fa4efccd877d29109b0369a72
[ "BSD-3-Clause" ]
permissive
ngs-doo/dsl-json
746db2156f4b5693b6df551aabf8e0d761caa32b
f560001ce8a0702977240f60e48aae0d6a4b70af
refs/heads/master
2023-08-04T14:07:00.271727
2023-07-23T12:12:45
2023-07-23T12:12:45
45,384,078
1,000
134
BSD-3-Clause
2023-07-23T12:09:00
2015-11-02T09:17:39
Java
UTF-8
Java
false
false
2,809
java
package com.dslplatform.json.generated.types.Double; import com.dslplatform.json.generated.types.StaticJson; import com.dslplatform.json.generated.ocd.javaasserts.DoubleAsserts; import java.io.IOException; public class OneListOfOneDoublesDefaultValueTurtle { private static StaticJson.JsonSerialization jsonSerialization; @org.junit.BeforeClass public static void initializeJsonSerialization() throws IOException { jsonSerialization = StaticJson.getSerialization(); } @org.junit.Test public void testDefaultValueEquality() throws IOException { final java.util.List<Double> defaultValue = new java.util.ArrayList<Double>(0); final StaticJson.Bytes defaultValueJsonSerialized = jsonSerialization.serialize(defaultValue); final java.util.List<Double> defaultValueJsonDeserialized = jsonSerialization.deserializeList(Double.class, defaultValueJsonSerialized.content, defaultValueJsonSerialized.length); DoubleAsserts.assertOneListOfOneEquals(defaultValue, defaultValueJsonDeserialized); } @org.junit.Test public void testBorderValue1Equality() throws IOException { final java.util.List<Double> borderValue1 = new java.util.ArrayList<Double>(java.util.Arrays.asList(0.0)); final StaticJson.Bytes borderValue1JsonSerialized = jsonSerialization.serialize(borderValue1); final java.util.List<Double> borderValue1JsonDeserialized = jsonSerialization.deserializeList(Double.class, borderValue1JsonSerialized.content, borderValue1JsonSerialized.length); DoubleAsserts.assertOneListOfOneEquals(borderValue1, borderValue1JsonDeserialized); } @org.junit.Test public void testBorderValue2Equality() throws IOException { final java.util.List<Double> borderValue2 = new java.util.ArrayList<Double>(java.util.Arrays.asList(Double.NaN)); final StaticJson.Bytes borderValue2JsonSerialized = jsonSerialization.serialize(borderValue2); final java.util.List<Double> borderValue2JsonDeserialized = jsonSerialization.deserializeList(Double.class, borderValue2JsonSerialized.content, borderValue2JsonSerialized.length); DoubleAsserts.assertOneListOfOneEquals(borderValue2, borderValue2JsonDeserialized); } @org.junit.Test public void testBorderValue3Equality() throws IOException { final java.util.List<Double> borderValue3 = new java.util.ArrayList<Double>(java.util.Arrays.asList(0.0, 1E-307, 9E307, -1.23456789012345E-10, 1.23456789012345E20, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Double.NaN)); final StaticJson.Bytes borderValue3JsonSerialized = jsonSerialization.serialize(borderValue3); final java.util.List<Double> borderValue3JsonDeserialized = jsonSerialization.deserializeList(Double.class, borderValue3JsonSerialized.content, borderValue3JsonSerialized.length); DoubleAsserts.assertOneListOfOneEquals(borderValue3, borderValue3JsonDeserialized); } }
[ "rikard@ngs.hr" ]
rikard@ngs.hr
c96e3c76342fc6771684315fbe57e298cfb70bbc
e6d5e60f7d22c62259f175be554f2e29b53810db
/decompiled_java/com/badlogic/gdx/utils/SnapshotArray.java
0764578a325488412b009749c2b07a02f09846c6
[]
no_license
khetsothea/seastory-android
cbd93480e5fbf1bb0615bbe0218ff772794c2d6b
0d6dfe206fa700b9cb43f1e88477bf6da74364ac
refs/heads/master
2020-12-30T11:02:25.748997
2016-08-14T11:21:50
2016-08-14T11:21:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,183
java
// 도박중독 예방 캠페인 // 당신 곁에 우리가 있어요! // 감당하기 힘든 어려움을 혼자 견디고 계신가요? // 무엇을 어떻게 해야 할지 막막한가요? // 당신의 이야기를 듣고 도움을 줄 수 있는 정보를 찾아 드립니다. // - 한국도박문제관리센터 (국번없이 1336, 24시간) // - KL중독관리센터 (전화상담 080-7575-535/545) // - 사행산업통합감독위원회 불법사행산업감시신고센터 (전화상담 1588-0112) // - 불법도박 등 범죄수익 신고 (지역번호 + 1301) package com.badlogic.gdx.utils; import java.util.Comparator; public class SnapshotArray extends Array { private Object[] recycled; private Object[] snapshot; private int snapshots; public SnapshotArray(boolean ordered, int capacity, Class arrayType) { super(ordered, capacity, arrayType); } public SnapshotArray() { super(); } public SnapshotArray(int capacity) { super(capacity); } public SnapshotArray(Array array) { super(array); } public SnapshotArray(Class arrayType) { super(arrayType); } public SnapshotArray(boolean ordered, int capacity) { super(ordered, capacity); } public SnapshotArray(boolean ordered, Object[] arg2, int startIndex, int count) { super(ordered, arg2, startIndex, count); } public SnapshotArray(Object[] arg1) { super(arg1); } public Object[] begin() { this.modified(); this.snapshot = this.items; ++this.snapshots; return this.items; } public void clear() { this.modified(); super.clear(); } public void end() { Object v4 = null; this.snapshots = Math.max(0, this.snapshots - 1); if(this.snapshot != null) { if(this.snapshot != this.items && this.snapshots == 0) { this.recycled = this.snapshot; int v0 = 0; int v1 = this.recycled.length; while(v0 < v1) { this.recycled[v0] = v4; ++v0; } } this.snapshot = ((Object[])v4); } } public void insert(int index, Object arg2) { this.modified(); super.insert(index, arg2); } private void modified() { if(this.snapshot != null && this.snapshot == this.items) { if(this.recycled != null && this.recycled.length >= this.size) { System.arraycopy(this.items, 0, this.recycled, 0, this.size); this.items = this.recycled; this.recycled = null; return; } this.resize(this.items.length); } } public Object pop() { this.modified(); return super.pop(); } public boolean removeAll(Array arg2, boolean identity) { this.modified(); return super.removeAll(arg2, identity); } public Object removeIndex(int index) { this.modified(); return super.removeIndex(index); } public void removeRange(int start, int end) { this.modified(); super.removeRange(start, end); } public boolean removeValue(Object arg2, boolean identity) { this.modified(); return super.removeValue(arg2, identity); } public void reverse() { this.modified(); super.reverse(); } public void set(int index, Object arg2) { this.modified(); super.set(index, arg2); } public void shuffle() { this.modified(); super.shuffle(); } public void sort() { this.modified(); super.sort(); } public void sort(Comparator arg1) { this.modified(); super.sort(arg1); } public void swap(int first, int second) { this.modified(); super.swap(first, second); } public void truncate(int newSize) { this.modified(); super.truncate(newSize); } public static SnapshotArray with(Object[] arg1) { return new SnapshotArray(arg1); } }
[ "chacanthus@gmail.com" ]
chacanthus@gmail.com
28cfe22426d069125d2df889533127ef62f930eb
1b86a75c696ceec829934622089849f136f4bc54
/lib-utils/src/main/java/com/llj/lib/utils/AInputMethodManagerUtils.java
e497cf00c91b3b73a12b6098cc63808266fa7499
[ "Apache-2.0" ]
permissive
P79N6A/ArchitectureDemo
7fee13aaa5aba9475bb169a43b291f6e930e360d
eb6a6d7c74d191e44262226f50b34a5de05fc079
refs/heads/master
2020-06-18T03:38:29.329662
2019-07-10T07:03:09
2019-07-10T07:03:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,658
java
package com.llj.lib.utils; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.view.View; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; /** * InputMethodManager.HIDE_NOT_ALWAYS:表示软键盘窗口总是隐藏,除非开始时以SHOW_FORCED显示 * InputMethodManager.HIDE_IMPLICIT_ONLY:表示如果用户未显式地显示软键盘窗口,则隐藏窗口 * InputMethodManager.SHOW_FORCED:表示用户强制打开输入法(如长按菜单键),一直保持打开直至只有显式关闭 * InputMethodManager.SHOW_IMPLICIT:表示隐式显示输入窗口,非用户直接要求。窗口可能不显示。 * <p> * <p> * imm.hideSoftInputFromInputMethod(passwdEdit.getWindowToken(), 0); android4.2会无效 * Created by llj on 16/1/25. */ public class AInputMethodManagerUtils { /** * (推荐) * * @param context * @param show */ public static void showOrHideInput(Activity context, boolean show) { if (show) { //显示 //showSoftInput这个方法也可以 toggleSoftInput(context); } else { //隐藏 if (context.getWindow() != null) { context.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); } } } public static void showOrHideInput(Dialog dialog, boolean show) { if (show) { //显示 //showSoftInput这个方法也可以 toggleSoftInput(dialog.getContext()); } else { //隐藏 if (dialog.getWindow() != null) { dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); } } } /** * 1.必须在onResume和onStart之后调用,可以在postDelayed或者post之后调用,dialog可以在show方法中通过post延时调用 * 2.EditText需要显示,且获得焦点 * * @param editText 必须先获得焦点的EditText */ public static boolean showSoftInput(EditText editText) { editText.requestFocus(); InputMethodManager inputMethodManager = (InputMethodManager) editText.getContext().getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE); return inputMethodManager.showSoftInput(editText, 0); } /** * 切换输入法的显示,如果输入法在窗口上已经显示,则隐藏(有时候隐藏可能失效,使用hideSoftInputFromWindow),如果隐藏,则显示输入法到窗口上 * 默认使用该方法显示 (推荐) * * @param context context */ public static void toggleSoftInput(Context context) { InputMethodManager im = ((InputMethodManager) context.getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE)); im.toggleSoftInput(0, 0); } /** * 如果页面刚进来可能获取不到焦点的view,因为焦点的view是在某些方法后才可以获取到 * (Activity) context).getCurrentFocus() * * @param activity activity */ public static void hideSoftInputFromWindow(Activity activity) { if (activity == null || activity.getCurrentFocus() == null) { return; } InputMethodManager inputMethodManager = ((InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE)); if (inputMethodManager == null) { return; } inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0); } public static void hideSoftInputFromWindow(Dialog dialog) { if (dialog == null || dialog.getCurrentFocus() == null) { return; } InputMethodManager inputMethodManager = ((InputMethodManager) dialog.getContext().getSystemService(Context.INPUT_METHOD_SERVICE)); if (inputMethodManager == null) { return; } inputMethodManager.hideSoftInputFromWindow(dialog.getCurrentFocus().getWindowToken(), 0); } /** * 隐藏输入法,默认使用该方法,view必须要获得焦点后 * * @param view */ public static boolean hideSoftInputFromWindow(View view) { InputMethodManager inputMethodManager = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (inputMethodManager == null) { return false; } return inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } }
[ "liulinjie1990823@gmail.com" ]
liulinjie1990823@gmail.com
c8442880c02eb8a744674dc7cc4abffda54f17aa
2f4a058ab684068be5af77fea0bf07665b675ac0
/utils/com/facebook/common/util/ExecutorWithProgressDialog$1.java
66277da2b058d831dff416f63ff90b870f2df527
[]
no_license
cengizgoren/facebook_apk_crack
ee812a57c746df3c28fb1f9263ae77190f08d8d2
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
refs/heads/master
2021-05-26T14:44:04.092474
2013-01-16T08:39:00
2013-01-16T08:39:00
8,321,708
1
0
null
null
null
null
UTF-8
Java
false
false
681
java
package com.facebook.common.util; import android.app.ProgressDialog; import com.google.common.util.concurrent.FutureCallback; class ExecutorWithProgressDialog$1 implements FutureCallback<Object> { ExecutorWithProgressDialog$1(ExecutorWithProgressDialog paramExecutorWithProgressDialog, ProgressDialog paramProgressDialog) { } public void a(Object paramObject) { this.a.dismiss(); } public void a(Throwable paramThrowable) { this.a.dismiss(); } } /* Location: /data1/software/apk2java/dex2jar-0.0.9.12/secondary-1.dex_dex2jar.jar * Qualified Name: com.facebook.common.util.ExecutorWithProgressDialog.1 * JD-Core Version: 0.6.2 */
[ "macluz@msn.com" ]
macluz@msn.com
cf8d1140cdcede55836027c9ea07c03e452e7108
c9ae5bbaf082abe43738a7f17ffab43309327977
/Source/FA-GameServer/src/gameserver/model/templates/teleport/TeleportLocation.java
ef28dcc3cfd65472ec5a306284b3bf85027878e2
[]
no_license
Ace65/emu-santiago
2071f50e83e3e4075b247e4265c15d032fc13789
ddb2a59abd9881ec95c58149c8bf27f313e3051c
refs/heads/master
2021-01-13T00:43:18.239492
2012-02-22T21:14:53
2012-02-22T21:14:53
54,834,822
0
1
null
null
null
null
UTF-8
Java
false
false
1,508
java
/* * This file is part of aion-unique <aion-unique.com>. * * aion-emu 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. * * aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package gameserver.model.templates.teleport; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; /** * @author ATracer * */ @XmlRootElement(name = "telelocation") @XmlAccessorType(XmlAccessType.FIELD) public class TeleportLocation { @XmlAttribute(name = "loc_id", required = true) private int locId; @XmlAttribute(name = "teleportid") private int teleportid = 0; @XmlAttribute(name = "price", required = true) private int price = 0; public int getLocId() { return locId; } public int getTeleportId() { return teleportid; } public int getPrice() { return price; } }
[ "mixerdj.carlos@gmail.com" ]
mixerdj.carlos@gmail.com
c04b2d741ae0b5f40a20b7d2c4ce853f778d0363
5598faaaaa6b3d1d8502cbdaca903f9037d99600
/code_changes/Apache_projects/AMQ-2512/b3c2a811aeddda89d3d6579bf5294efb61c63e64/~ProxyTopicMessageStore.java
4acb4f1dd23f355092dbfa619b45a68915ad8779
[]
no_license
SPEAR-SE/LogInBugReportsEmpirical_Data
94d1178346b4624ebe90cf515702fac86f8e2672
ab9603c66899b48b0b86bdf63ae7f7a604212b29
refs/heads/master
2022-12-18T02:07:18.084659
2020-09-09T16:49:34
2020-09-09T16:49:34
286,338,252
0
2
null
null
null
null
UTF-8
Java
false
false
4,929
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.activemq.store; import java.io.IOException; import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.Message; import org.apache.activemq.command.MessageAck; import org.apache.activemq.command.MessageId; import org.apache.activemq.command.SubscriptionInfo; import org.apache.activemq.usage.MemoryUsage; import org.apache.activemq.usage.SystemUsage; /** * A simple proxy that delegates to another MessageStore. */ public class ProxyTopicMessageStore implements TopicMessageStore { final TopicMessageStore delegate; public ProxyTopicMessageStore(TopicMessageStore delegate) { this.delegate = delegate; } public MessageStore getDelegate() { return delegate; } public void addMessage(ConnectionContext context, Message message) throws IOException { delegate.addMessage(context, message); } public Message getMessage(MessageId identity) throws IOException { return delegate.getMessage(identity); } public void recover(MessageRecoveryListener listener) throws Exception { delegate.recover(listener); } public void removeAllMessages(ConnectionContext context) throws IOException { delegate.removeAllMessages(context); } public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException { delegate.removeMessage(context, ack); } public void start() throws Exception { delegate.start(); } public void stop() throws Exception { delegate.stop(); } public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException { return delegate.lookupSubscription(clientId, subscriptionName); } public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId) throws IOException { delegate.acknowledge(context, clientId, subscriptionName, messageId); } public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException { delegate.addSubsciption(subscriptionInfo, retroactive); } public void deleteSubscription(String clientId, String subscriptionName) throws IOException { delegate.deleteSubscription(clientId, subscriptionName); } public void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception { delegate.recoverSubscription(clientId, subscriptionName, listener); } public void recoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener) throws Exception { delegate.recoverNextMessages(clientId, subscriptionName, maxReturned, listener); } public void resetBatching(String clientId, String subscriptionName) { delegate.resetBatching(clientId, subscriptionName); } public ActiveMQDestination getDestination() { return delegate.getDestination(); } public SubscriptionInfo[] getAllSubscriptions() throws IOException { return delegate.getAllSubscriptions(); } public void setMemoryUsage(MemoryUsage memoryUsage) { delegate.setMemoryUsage(memoryUsage); } public int getMessageCount(String clientId, String subscriberName) throws IOException { return delegate.getMessageCount(clientId, subscriberName); } public int getMessageCount() throws IOException { return delegate.getMessageCount(); } public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception { delegate.recoverNextMessages(maxReturned, listener); } public void dispose(ConnectionContext context) { delegate.dispose(context); } public void resetBatching() { delegate.resetBatching(); } public void setBatch(MessageId messageId) throws Exception { delegate.setBatch(messageId); } }
[ "archen94@gmail.com" ]
archen94@gmail.com
c49c0dc7e23c68ed0ba24fba992cae6b882fecd2
80403ec5838e300c53fcb96aeb84d409bdce1c0c
/externalModules/onprcEHRModules/onprc_billing/src/org/labkey/onprc_billing/button/ChargeEditButton.java
1bc9dc82c93d0a09bd15cdd3f373181b4e225d85
[]
no_license
scchess/LabKey
7e073656ea494026b0020ad7f9d9179f03d87b41
ce5f7a903c78c0d480002f738bccdbef97d6aeb9
refs/heads/master
2021-09-17T10:49:48.147439
2018-03-22T13:01:41
2018-03-22T13:01:41
126,447,224
0
1
null
null
null
null
UTF-8
Java
false
false
724
java
package org.labkey.onprc_billing.button; import org.labkey.api.ehr.security.EHRProjectEditPermission; import org.labkey.api.ldk.buttons.ShowEditUIButton; import org.labkey.api.module.Module; import org.labkey.onprc_billing.security.ONPRCBillingAdminPermission; import java.util.HashMap; import java.util.Map; /** */ public class ChargeEditButton extends ShowEditUIButton { public ChargeEditButton(Module owner, String schemaName, String queryName) { super(owner, schemaName, queryName, ONPRCBillingAdminPermission.class); Map<String, String> urlParams = new HashMap<>(); urlParams.put("chargeId", "query.chargeId~eq"); setUrlParamMap(urlParams); } }
[ "klum@labkey.com" ]
klum@labkey.com
4c0c1d781c66e339221d6331fabc34151cd653e3
cc0458b38bf6d7bac7411a9c6fec9bc3b8282d3f
/thirdParty/CSharpParser/src/csmc/javacc/generated/syntaxtree/PrimaryNoArrayCreationExpressionPrime.java
58f1f767b629b21ec8ece836e579e4472bd5bd45
[]
no_license
RinatGumarov/Code-metrics
62f99c25b072dd56e9c953d40dac7076a4376180
2005b6671c174e09e6ea06431d4711993a33ecb6
refs/heads/master
2020-07-12T04:01:47.007860
2017-08-08T07:19:26
2017-08-08T07:19:26
94,275,456
1
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
// // Generated by JTB 1.3.2 // package csmc.javacc.generated.syntaxtree; /** * Grammar production: * f0 -> Literal() * | AnonymousMethodExpression() * | SimpleName() * | ParanthesizedExpression() * | ThisAccess() * | BaseAccess() * | ObjectCreationExpression() * | DelegateCreationExpression() * | AnonymousObjectCreationExpression() * | TypeofExpression() * | CheckedExpression() * | UncheckedExpression() * | DefaultValueExpression() * | NameofExpression() */ public class PrimaryNoArrayCreationExpressionPrime implements Node { public NodeChoice f0; public PrimaryNoArrayCreationExpressionPrime(NodeChoice n0) { f0 = n0; } public void accept(csmc.javacc.generated.visitor.Visitor v) { v.visit(this); } public <R,A> R accept(csmc.javacc.generated.visitor.GJVisitor<R,A> v, A argu) { return v.visit(this,argu); } public <R> R accept(csmc.javacc.generated.visitor.GJNoArguVisitor<R> v) { return v.visit(this); } public <A> void accept(csmc.javacc.generated.visitor.GJVoidVisitor<A> v, A argu) { v.visit(this,argu); } }
[ "tiran678@icloud.com" ]
tiran678@icloud.com
0092873caa40c148ea5462e71730b88243af0c0d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/35/35_afa3403e55a4c04816a8336eb2c685ea324547ab/TmcEventBus/35_afa3403e55a4c04816a8336eb2c685ea324547ab_TmcEventBus_t.java
d842c01cc84b4b4151892166cf2c927c4147e1ef
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,256
java
package fi.helsinki.cs.tmc.events; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; public class TmcEventBus { private static final Logger log = Logger.getLogger(TmcEventBus.class.getName()); private static final TmcEventBus instance = new TmcEventBus(); public static TmcEventBus getDefault() { return instance; } // Factory method to avoid accidental creation when getDefault was meant. public static TmcEventBus createNewInstance() { return new TmcEventBus(); } private List<TmcEventListener> listeners; private TmcEventBus() { this.listeners = new ArrayList<TmcEventListener>(); } public void subscribe(TmcEventListener listener) { this.listeners.add(listener); } public void unsubscribe(TmcEventListener listener) { this.listeners.remove(listener); } public void post(TmcEvent event) { for (TmcEventListener listener : this.listeners) { try { listener.receive(event); } catch (Throwable ex) { log.log(Level.WARNING, ex.getMessage(), ex); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7ea0af893d2940b7d309aa13609cff4df468eee5
f307a09746630e0edb6b9f10f901ddd017767d89
/Chapter 11/Java/JBehave/Bmi.java
5d09a8e3045ee713b790af8fb943eb72e4df1633
[ "LicenseRef-scancode-oreilly-notice" ]
permissive
kall/selenuimCookbookExample
b44cf52f1a671a49b9623d03a6c079c30acd2f39
219d88212e382c65ece88ec287d24461bdefffc8
refs/heads/master
2021-08-07T10:12:30.217909
2017-06-29T01:56:17
2017-06-29T01:56:17
109,909,237
0
0
null
null
null
null
UTF-8
Java
false
false
1,417
java
import junit.framework.Assert; import org.jbehave.core.annotations.Then; import org.jbehave.core.annotations.When; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; public class Bmi extends StoryBase { @When("I open BMI Calculator Home Page") public void IOpen() { driver.get("http://dl.dropbox.com/u/55228056/bmicalculator.html"); } @When("I enter height as '$height'") public void IEnterHeight(String height) { WebElement heightCMS = driver.findElement(By.id("heightCMS")); heightCMS.sendKeys(height); } @When("I enter weight as '$weight'") public void IEnterWeight(String weight) { WebElement weightKg = driver.findElement(By.id("weightKg")); weightKg.sendKeys(weight); } @When("I click on the Calculate button") public void IClickOnTheButton() { WebElement button = driver.findElement(By.id("Calculate")); button.click(); } @Then("I should see bmi as '$bmi_exp' and category as '$bmi_category_exp'") public void IShouldBmiAndCategory(String bmi_exp, String bmi_category_exp) { WebElement bmi = driver.findElement(By.id("bmi")); Assert.assertEquals(bmi_exp, bmi.getAttribute("value")); WebElement bmi_category = driver.findElement(By.id("bmi_category")); Assert.assertEquals(bmi_category_exp, bmi_category.getAttribute("value")); driver.quit(); } }
[ "booktech@oreilly.com" ]
booktech@oreilly.com
f08ac5fa28d880e8fd3415f0aae7650e184a4188
91adc264eb26be39c656f054005ec740d07900bd
/tc_project/tciuforep/src/client/com/ufsoft/iufo/inputplugin/dynarea/RowNumberRender.java
e1c0e9391ea34ad225db2887106c1d6f7efaf32e
[]
no_license
xhrise/nc-workspaces
9f30caf273e932bd1b4c2d419ac6bef4ef55e1cc
d5fcbce810ba4d4b5405edabfb5a26c36a19e7f8
refs/heads/master
2020-05-19T10:43:29.058686
2013-06-20T02:40:27
2013-06-20T02:40:27
37,459,512
0
1
null
null
null
null
GB18030
Java
false
false
1,735
java
package com.ufsoft.iufo.inputplugin.dynarea; import java.awt.Component; import java.lang.reflect.Method; import javax.swing.JLabel; import com.ufida.iufo.pub.tools.AppDebug; import com.ufsoft.iufo.resource.StringResource; import com.ufsoft.report.ReportContextKey; import com.ufsoft.table.Cell; import com.ufsoft.table.CellPosition; import com.ufsoft.table.CellsModel; import com.ufsoft.table.CellsPane; import com.ufsoft.table.re.DefaultSheetCellRenderer; public class RowNumberRender extends DefaultSheetCellRenderer{ private static final long serialVersionUID = 2991000829604225131L; private JLabel label = null; public Component getCellRendererComponent(CellsPane table, Object obj,boolean isSelected, boolean hasFocus, int row, int column, Cell cell) { // @edit by ll at 2009-5-14,上午10:25:08 // @edit by zhaopq at 2009-4-22,上午10:51:41 此版暂时这样处理 if(table.getOperationState() == ReportContextKey.OPERATION_FORMAT||table.getOperationState() == ReportContextKey.OPERATION_REF){ return getPaintComponent(); } Component render = super.getCellRendererComponent(table,obj,isSelected,hasFocus,row,column, cell); CellPosition cellPos = CellPosition.getInstance(row,column); CellsModel cellsModel = table.getDataModel(); int index = RowNumber.getIndex(cellsModel, cellPos); try { Method m = render.getClass().getMethod("setText",new Class[]{String.class}); m.invoke(render,new Object[]{""+index}); } catch (Exception e) { AppDebug.debug(e); } return render; } private JLabel getPaintComponent(){ if(label==null){ new nc.ui.pub.beans.UILabel(StringResource.getStringResource("uiiufofmt00003")); } return label; } }
[ "comicme_yanghe@126.com" ]
comicme_yanghe@126.com
e103e730d2ea9d89582304713cc19d37a9f031b1
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hive/7893_1.java
f471772bb9620257d69ec097626f50d773e59a4b
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
1,608
java
//,temp,ThriftHiveMetastore.java,33423,33450,temp,TCLIService.java,2399,2422 //,3 public class xxx { public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } };
[ "SHOSHIN\\sgholamian@shoshin.uwaterloo.ca" ]
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
0190005c1d11ffa2c0ab30972f248d5e27b3c1d2
5f1bccf6c1e2a8b020d6506c1911eff1ffa51e92
/module_main/src/main/java/com/nj/baijiayun/module_main/bean/UserItemListBean.java
a45d108911df76eae01aa9fea0d426ca5c25076d
[]
no_license
expect-github/cehan
90c2a706564dd4d66a2c6abed4c2885c202769a7
1505d22b8b5f290f258b19116e179471e25e7021
refs/heads/master
2022-12-17T03:23:14.046624
2020-09-28T03:33:10
2020-09-28T03:33:10
299,177,260
0
3
null
null
null
null
UTF-8
Java
false
false
233
java
package com.nj.baijiayun.module_main.bean; import java.util.List; public class UserItemListBean { private List<UserItemBean> userItemList; public List<UserItemBean> getUserItemList() { return userItemList; } }
[ "t" ]
t
b2801c90746442a915a9c122d9f28e008c5e0a1f
b433b7f88f114cbd6d60063ab1b69a65bcaf5ee1
/9_MultiBoard/src/main/java/com/coderby/myapp/member/controller/MemberController.java
73fa509c7cd78dcbe640eca06e57d6f6bdff1d55
[]
no_license
videocalls/videocall-1
ca972aa3832e86f33960b2ccb18c820a6e0a1af0
e305309da0be80b14673a97a080b9b11e28f0a2e
refs/heads/master
2020-03-29T11:53:04.746403
2018-09-27T07:50:46
2018-09-27T07:50:46
149,875,389
0
1
null
2018-09-22T12:37:05
2018-09-22T12:37:04
null
UTF-8
Java
false
false
4,704
java
package com.coderby.myapp.member.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.coderby.myapp.member.model.Member; import com.coderby.myapp.member.service.IMemberService; @Controller public class MemberController { static final Logger logger = Logger.getLogger(MemberController.class); @Autowired IMemberService memberService; @RequestMapping(value="/member/insert", method=RequestMethod.GET) public String joinForm() { return "member/form"; } @RequestMapping(value="/member/insert", method=RequestMethod.POST) public String memberInsert(Member member, Model model, HttpSession session) { memberService.insertMember(member); session.invalidate(); return "home"; } @RequestMapping(value="/member/login", method=RequestMethod.GET) public String login() { return "member/login"; } @RequestMapping(value="/member/login", method=RequestMethod.POST) public String login(String userid, String password, HttpSession session, Model model) { Member member = memberService.selectMember(userid); if(member != null) { String dbPassword = member.getPassword(); if(dbPassword == null) { //아이디가 없음 model.addAttribute("message", "NOT_VALID_USER"); }else { //아이디 있음 if(dbPassword.equals(password)) { //비밀번호 일치 session.setAttribute("userid", userid); session.setAttribute("name", member.getName()); session.setAttribute("email", member.getEmail()); return "member/login"; }else { //비밀번호 불일치 model.addAttribute("message", "WRONG_PASSWORD"); } } }else { model.addAttribute("message", "USER_NOT_FOUND"); } session.invalidate(); return "member/login"; } @RequestMapping(value="/member/logout", method=RequestMethod.GET) public String logout(HttpSession session, HttpServletRequest request) { session.invalidate(); //로그아웃 return "home"; } @RequestMapping(value="/member/update", method=RequestMethod.GET) public String updateMember(HttpSession session, Model model) { String userid = (String)session.getAttribute("userid"); if(userid != null && !userid.equals("")) { Member member = memberService.selectMember(userid); model.addAttribute("member", member); model.addAttribute("message", "UPDATE_USER_INFO"); return "member/update"; }else { //userid가 세션에 없을 경우 (로그인 하지 않았을 경우) model.addAttribute("message", "NOT_LOGIN_USER"); return "member/login"; } } @RequestMapping(value="/member/update", method=RequestMethod.POST) public String updateMember(Member member, HttpSession session, Model model) { try{ memberService.updateMember(member); model.addAttribute("message", "UPDATED_MEMBER_INFO"); model.addAttribute("member", member); session.setAttribute("email", member.getEmail()); return "member/login"; }catch(Exception e){ model.addAttribute("message", e.getMessage()); e.printStackTrace(); return "member/error"; } } @RequestMapping(value="/member/delete", method=RequestMethod.GET) public String deleteMember(HttpSession session, Model model) { String userid = (String)session.getAttribute("userid"); if(userid != null && !userid.equals("")) { Member member = memberService.selectMember(userid); model.addAttribute("member", member); model.addAttribute("message", "MEMBER_PW_RE"); return "member/delete"; }else { //userid가 세션에 없을 경우 (로그인 하지 않았을 경우) model.addAttribute("message", "NOT_LOGIN_USER"); return "member/login"; } } @RequestMapping(value="/member/delete", method=RequestMethod.POST) public String deleteMember(String password, HttpSession session, Model model) { try { Member member = new Member(); member.setUserid((String)session.getAttribute("userid")); String dbpw = memberService.getPassword(member.getUserid()); if(password != null && password.equals(dbpw)) { member.setPassword(password); memberService.deleteMember(member) ; session.invalidate();//삭제되었으면 로그아웃 처리 return "member/login"; }else { model.addAttribute("message", "WRONG_PASSWORD"); return "member/delete"; } }catch(Exception e){ model.addAttribute("message", "DELETE_FAIL"); e.printStackTrace(); return "member/delete"; } } }
[ "dongbeom.kim@gmail.com" ]
dongbeom.kim@gmail.com
97723133350277c17be944dd0c20680540ad587c
4b13c1b4877bd9ced4352ab58b4aa890a06c2d60
/jaxws/src/main/java/com/webcohesion/enunciate/modules/jaxws/api/impl/JaxwsServiceApi.java
755988c154c7e4f4bad69842f36063a86bb44f04
[ "Apache-2.0" ]
permissive
stoicflame/enunciate
e1866a8be2e634d8c98adee853179b81df80a20e
446c86328a4eb6b7d1453fec7436c45552418d41
refs/heads/master
2023-09-04T19:24:44.788193
2023-04-28T00:36:40
2023-04-28T02:51:03
1,707,059
464
206
NOASSERTION
2023-08-15T17:40:53
2011-05-05T15:54:15
Java
UTF-8
Java
false
false
2,691
java
package com.webcohesion.enunciate.modules.jaxws.api.impl; import com.webcohesion.enunciate.api.ApiRegistrationContext; import com.webcohesion.enunciate.api.services.Operation; import com.webcohesion.enunciate.api.services.Service; import com.webcohesion.enunciate.api.services.ServiceApi; import com.webcohesion.enunciate.api.services.ServiceGroup; import com.webcohesion.enunciate.modules.jaxws.EnunciateJaxwsContext; import com.webcohesion.enunciate.modules.jaxws.WsdlInfo; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * @author Ryan Heaton */ public class JaxwsServiceApi implements ServiceApi { private final EnunciateJaxwsContext context; private ApiRegistrationContext registrationContext; public JaxwsServiceApi(EnunciateJaxwsContext context, ApiRegistrationContext registrationContext) { this.context = context; this.registrationContext = registrationContext; } @Override public String getContextPath() { return this.context.getContextPath(); } @Override public List<ServiceGroup> getServiceGroups() { Map<String, WsdlInfo> wsdls = this.context.getWsdls(); ArrayList<ServiceGroup> serviceGroups = new ArrayList<ServiceGroup>(); for (WsdlInfo wsdlInfo : wsdls.values()) { serviceGroups.add(new ServiceGroupImpl(wsdlInfo, registrationContext)); } return serviceGroups; } @Override public Operation findOperationFor(String classname, String method) { if (method.isEmpty() || classname.isEmpty()) { return null; } for (ServiceGroup serviceGroup : getServiceGroups()) { for (Service service : serviceGroup.getServices()) { for (Operation operation : service.getOperations()) { if (operation instanceof OperationImpl) { if (method.equals(((OperationImpl)operation).getWebMethod().getSimpleName().toString()) && ((OperationImpl)operation).getWebMethod().getDeclaringEndpointInterface().getQualifiedName().contentEquals(classname)) { return operation; } } } } } return null; } @Override public Service findServiceFor(String classname) { if (classname.isEmpty()) { return null; } for (ServiceGroup serviceGroup : getServiceGroups()) { for (Service service : serviceGroup.getServices()) { for (Operation operation : service.getOperations()) { if (operation instanceof OperationImpl) { if (((OperationImpl)operation).getWebMethod().getDeclaringEndpointInterface().getQualifiedName().contentEquals(classname)) { return service; } } } } } return null; } }
[ "ryan@webcohesion.com" ]
ryan@webcohesion.com
9a09051f124916481adf0e46d89b3b21fc35aa35
af2646b0cd4965bbdc1b2587f49ea1024199b69e
/tablayout/src/main/java/com/zjnu/tablayoutdemo01/Act/fragment/FragFun.java
6f51c1f2b33f418d17abb68b8442aab6f5e28288
[]
no_license
ypyta68/NewsPro
b60b91329e699e1c6a5e3c32c7102c47a3db3ca0
6b42fe35f8429fa98a632fcc1ef927fce590ce70
refs/heads/master
2020-03-12T16:39:38.491490
2018-03-18T02:30:18
2018-03-18T02:30:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
644
java
package com.zjnu.tablayoutdemo01.Act.fragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; /** * Created by cui on 2016/1/28. */ public class FragFun extends Fragment { @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { TextView textView = new TextView(getContext()); textView.setText(this.getClass().getSimpleName()); return textView; } }
[ "1134598796@qq.com" ]
1134598796@qq.com
e1993701eed5f6b13fa3b9173d96f4b3875fa7b2
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13544-42-19-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest_scaffolding.java
f5fb08e4922bb1fc9f8717f673d55fb491dacd1a
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Jan 19 01:02:49 UTC 2020 */ package org.xwiki.velocity.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultVelocityEngine_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
8f14c7d85e3e3c9407d33b0ae520177a85315b39
692a7b9325014682d72bd41ad0af2921a86cf12e
/iWiFi/src/com/umeng/socialize/view/controller/g.java
a6d66505d689125badf67f2fd13c3c0fa262b916
[]
no_license
syanle/WiFi
f76fbd9086236f8a005762c1c65001951affefb6
d58fb3d9ae4143cbe92f6f893248e7ad788d3856
refs/heads/master
2021-01-20T18:39:13.181843
2015-10-29T12:38:57
2015-10-29T12:38:57
45,156,955
0
0
null
null
null
null
UTF-8
Java
false
false
1,415
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.umeng.socialize.view.controller; import com.umeng.socialize.bean.SnsPlatform; import com.umeng.socialize.bean.SocializeEntity; // Referenced classes of package com.umeng.socialize.view.controller: // UserCenterController class g implements com.umeng.socialize.controller.listener.SocializeListeners.SocializeClientListener { final UserCenterController a; private final UserCenterController.ASYNCListener b; private final SnsPlatform c; g(UserCenterController usercentercontroller, UserCenterController.ASYNCListener asynclistener, SnsPlatform snsplatform) { a = usercentercontroller; b = asynclistener; c = snsplatform; super(); } public void onComplete(int i, SocializeEntity socializeentity) { if (b != null) { if (i == 200) { c.mOauth = false; b.a(com.umeng.socom.net.o.a.a); } else { b.a(com.umeng.socom.net.o.a.b); } } a.a(UserCenterController.a.b); } public void onStart() { a.a(UserCenterController.a.a); if (b != null) { b.a(); } } }
[ "arehigh@gmail.com" ]
arehigh@gmail.com
601ae1eb7060aa93f4eb7ef73fecbec2460f242c
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/android/generated/src/main/java/org/openapitools/client/model/ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.java
b8c5f48ee72493618adfa0cf6629e3fd73e0f506
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
4,066
java
/** * Adobe Experience Manager OSGI config (AEM) API * Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API * * OpenAPI spec version: 1.0.0-pre.0 * Contact: opensource@shinesolutions.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import org.openapitools.client.model.ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerProperties; import io.swagger.annotations.*; import com.google.gson.annotations.SerializedName; @ApiModel(description = "") public class ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo { @SerializedName("pid") private String pid = null; @SerializedName("title") private String title = null; @SerializedName("description") private String description = null; @SerializedName("properties") private ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerProperties properties = null; /** **/ @ApiModelProperty(value = "") public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } /** **/ @ApiModelProperty(value = "") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } /** **/ @ApiModelProperty(value = "") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } /** **/ @ApiModelProperty(value = "") public ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerProperties getProperties() { return properties; } public void setProperties(ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerProperties properties) { this.properties = properties; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo = (ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo) o; return (this.pid == null ? comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.pid == null : this.pid.equals(comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.pid)) && (this.title == null ? comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.title == null : this.title.equals(comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.title)) && (this.description == null ? comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.description == null : this.description.equals(comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.description)) && (this.properties == null ? comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.properties == null : this.properties.equals(comAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo.properties)); } @Override public int hashCode() { int result = 17; result = 31 * result + (this.pid == null ? 0: this.pid.hashCode()); result = 31 * result + (this.title == null ? 0: this.title.hashCode()); result = 31 * result + (this.description == null ? 0: this.description.hashCode()); result = 31 * result + (this.properties == null ? 0: this.properties.hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListenerInfo {\n"); sb.append(" pid: ").append(pid).append("\n"); sb.append(" title: ").append(title).append("\n"); sb.append(" description: ").append(description).append("\n"); sb.append(" properties: ").append(properties).append("\n"); sb.append("}\n"); return sb.toString(); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
f3c8f524417696c3c19aaf9c08bef2afe7b381a6
87bb36b03f8069f2a9ffb4025b5eb3410905f217
/stock/src/main/java/com/cvicse/stock/http/loop/YaoyueInfoRunnable.java
bff4c67223a2ffd7464d3d1ee80dee848f8f4389
[]
no_license
883111LB/app_stock
14fee33c2e4e3104a09276816efda9a38bf05406
6e89ee5809a600173e317246a56a67446b5ebe53
refs/heads/master
2022-08-28T00:48:44.988011
2020-05-27T07:29:03
2020-05-27T07:29:03
267,245,079
1
0
null
null
null
null
UTF-8
Java
false
false
619
java
package com.cvicse.stock.http.loop; import com.mitake.core.request.offer.OfferQuoteRequest; import com.mitake.core.response.offer.OfferQuoteResponse; /** * 要约 * Created by tang_hua on 2020/2/28. */ public abstract class YaoyueInfoRunnable extends RunTaskState<OfferQuoteResponse> { private String code; public YaoyueInfoRunnable() { } public YaoyueInfoRunnable(String code) { this.code = code; } @Override public void runInner() { OfferQuoteRequest request = new OfferQuoteRequest(); this.setRequest(request); request.send(code, this); } }
[ "3140704209.l" ]
3140704209.l
cb0b82ed62aa14a774d64848ef6d9ecf2744d309
4ca6751a5b5a7c3afd541c7fcf54d6773f10e4ed
/app/src/main/java/com/zgk/viewpagerf/MyAdapters/MyAdapter/CourseAdapter.java
b027d60d57cdef32fe81ff5065445609dd2c92cf
[]
no_license
zgkzgk/UPC
7c0cac3e557233c19d1bb35d41c1a9d3d2b5362d
78ddd347e7aa69930fb75f78dc166a07e51f73d2
refs/heads/master
2023-01-08T21:42:33.790903
2020-11-16T13:11:19
2020-11-16T13:11:19
313,291,549
3
0
null
null
null
null
UTF-8
Java
false
false
977
java
package com.zgk.viewpagerf.MyAdapters.MyAdapter; import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.zgk.viewpagerf.R; import java.util.List; public class CourseAdapter extends BaseQuickAdapter<CourseModel, BaseViewHolder> { public CourseAdapter(@LayoutRes int layoutResId, @Nullable List<CourseModel> data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, CourseModel item) { //可链式调用赋值 helper.setText(R.id.Course_title, item.getkcmc()) .setText(R.id.Course_place, "餐厅:"+item.getkcsj()) .setText(R.id.Course_price,"售价:"+item.getjsmc()); //获取当前条目position //int position = helper.getLayoutPosition(); } }
[ "tony@gmail.com" ]
tony@gmail.com
0cd3c2d412ae106468ae8c351eb6479b86afe046
3c18b4ab3a20dab175dc48758835fb1a854a92c8
/src-advance/framac/pdg/graph/ControlDependencyEdge.java
679903c6c4c965a87281917cfbdd7878207111a7
[ "Apache-2.0" ]
permissive
lta-disco-unimib-it/BCT
2c6bcf52894db8798d8ad14c7ebe066262dd22e4
1c7fcb52f42bae9f5169c94032ded919cb1c42c4
refs/heads/master
2020-08-24T16:32:03.904958
2019-10-22T20:30:10
2019-10-22T20:30:10
216,863,231
0
0
null
null
null
null
UTF-8
Java
false
false
958
java
/******************************************************************************* * Copyright 2019 Fabrizio Pastore, Leonardo Mariani * * 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 framac.pdg.graph; public class ControlDependencyEdge extends Edge { public ControlDependencyEdge(Node from, Node to) { super(from, to); } }
[ "fabrizio.pastore@gmail.com" ]
fabrizio.pastore@gmail.com
d49aa852ca62cc5773d8a13babb8e489197ee3c8
49c41c36d09d690adca891ed9ad0872307fea9c4
/Java/src/test/java/org/ciyam/at/MiscTests.java
9ccc5ddd7abe4ba9eeb58758b15c511fb3847680
[]
no_license
catbref/AT
af337a94ebd08fc5272c4b2f84964324031456b9
b39c0d58b8718aa671680d1e71b96d9ed1007259
refs/heads/master
2023-05-11T14:44:49.273411
2023-05-08T10:40:59
2023-05-08T10:40:59
149,878,346
1
3
null
2020-11-24T10:17:56
2018-09-22T13:15:10
Java
UTF-8
Java
false
false
3,476
java
package org.ciyam.at; import static org.junit.Assert.*; import org.ciyam.at.test.ExecutableTest; import org.ciyam.at.test.TestAPI; import org.ciyam.at.test.TestUtils; import org.junit.Test; public class MiscTests extends ExecutableTest { @Test public void testSimpleCode() throws ExecutionException { long testValue = 8888L; codeByteBuffer.put(OpCode.SET_VAL.value).putInt(0).putLong(testValue); codeByteBuffer.put(OpCode.EXT_FUN_DAT.value).putShort(FunctionCode.ECHO.value).putInt(0); codeByteBuffer.put(OpCode.FIN_IMD.value); execute(true); assertTrue(state.isFinished()); assertFalse(state.hadFatalError()); assertEquals("Data does not match", testValue, getData(0)); } @Test public void testInvalidOpCode() throws ExecutionException { codeByteBuffer.put((byte) 0xdd); execute(true); assertTrue(state.isFinished()); assertTrue(state.hadFatalError()); } @Test public void testFreeze() throws ExecutionException { // Choose initial balance so it used up before max-steps-per-round triggers long initialBalance = 5L; api.accounts.get(TestAPI.AT_ADDRESS).balance = initialBalance; // Infinite loop codeByteBuffer.put(OpCode.JMP_ADR.value).putInt(0); // Test a few rounds to make sure AT is frozen and stays frozen for (int i = 0; i < 3; ++i) { execute(true); assertTrue(state.isFrozen()); Long frozenBalance = state.getFrozenBalance(); assertNotNull(frozenBalance); } } @Test public void testUnfreeze() throws ExecutionException { // Choose initial balance so it used up before max-steps-per-round triggers long initialBalance = 5L; api.setCurrentBalance(initialBalance); // Infinite loop codeByteBuffer.put(OpCode.JMP_ADR.value).putInt(0); // Execute to make sure AT is frozen and stays frozen execute(true); assertTrue(state.isFrozen()); Long frozenBalance = state.getFrozenBalance(); assertNotNull(frozenBalance); // Send payment to AT to allow unfreezing // Payment needs to be enough to trigger max-steps-per-round so we can detect unfreezing api.setCurrentBalance(TestAPI.MAX_STEPS_PER_ROUND * api.getFeePerStep() * 2); // Execute AT execute(true); // We expect AT to be sleeping, not frozen assertFalse(state.isFrozen()); frozenBalance = state.getFrozenBalance(); assertNull(frozenBalance); assertTrue(state.isSleeping()); } @Test public void testMinActivation() throws ExecutionException { // Make sure minimum activation amount is greater than initial balance long minActivationAmount = TestAPI.DEFAULT_INITIAL_BALANCE * 2L; byte[] headerBytes = TestUtils.toHeaderBytes(TestUtils.VERSION, TestUtils.NUM_CODE_PAGES, TestUtils.NUM_DATA_PAGES, TestUtils.NUM_CALL_STACK_PAGES, TestUtils.NUM_USER_STACK_PAGES, minActivationAmount); byte[] codeBytes = codeByteBuffer.array(); byte[] dataBytes = new byte[0]; state = new MachineState(api, loggerFactory, headerBytes, codeBytes, dataBytes); assertTrue(state.isFrozen()); assertEquals((Long) (minActivationAmount - 1L), state.getFrozenBalance()); } @Test public void testDataAddressBounds() throws ExecutionException { // Last possible valid address in data segment int lastDataAddress = (dataByteBuffer.limit() / MachineState.VALUE_SIZE) - 1; codeByteBuffer.put(OpCode.SET_VAL.value).putInt(lastDataAddress).putLong(8888L); codeByteBuffer.put(OpCode.FIN_IMD.value); execute(true); assertTrue(state.isFinished()); assertFalse(state.hadFatalError()); } }
[ "misc-github@talk2dom.com" ]
misc-github@talk2dom.com
9f2448c293d9945d052a838f4619f3c218ae128d
63d319fbd88e49701d8dcc2919c8f3a6013e90d0
/Applications/CIM/plugins/es.tid.cim.diagram/src/es/tid/cim/diagram/view/factories/ComputerSystemRunningOSViewFactory.java
8328204740e22866749b205c936695aa2064d19e
[]
no_license
DevBoost/Reuseware
2e6b3626c0d434bb435fcf688e3a3c570714d980
4c2f0170df52f110c77ee8cffd2705af69b66506
refs/heads/master
2021-01-19T21:28:13.184309
2019-06-09T20:39:41
2019-06-09T20:48:34
5,324,741
1
1
null
null
null
null
UTF-8
Java
false
false
1,652
java
package es.tid.cim.diagram.view.factories; import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; import org.eclipse.gmf.runtime.notation.NotationFactory; import org.eclipse.gmf.runtime.notation.View; import es.tid.cim.diagram.edit.parts.ComputerSystemRunningOSEditPart; import es.tid.cim.diagram.edit.parts.WrappingLabel161EditPart; import es.tid.cim.diagram.part.CIMLevelZeroVisualIDRegistry; /** * @generated */ public class ComputerSystemRunningOSViewFactory extends ConnectionViewFactory { /** * @generated */ protected List createStyles(View view) { List styles = new ArrayList(); styles.add(NotationFactory.eINSTANCE.createConnectorStyle()); styles.add(NotationFactory.eINSTANCE.createFontStyle()); return styles; } /** * @generated */ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { if (semanticHint == null) { semanticHint = CIMLevelZeroVisualIDRegistry .getType(ComputerSystemRunningOSEditPart.VISUAL_ID); view.setType(semanticHint); } super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); IAdaptable eObjectAdapter = null; getViewService().createNode( eObjectAdapter, view, CIMLevelZeroVisualIDRegistry .getType(WrappingLabel161EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); } }
[ "jendrik.johannes@devboost.de" ]
jendrik.johannes@devboost.de
3eaee0920dc52beb927f2dba35e782f06e27c6f4
0a6e41da01e43562e8a5ef6d227e10159fc253b3
/common/src/main/java/com/spring/base/vo/baseinfo/menu/MenuUpdateVo.java
a4a81f4363dfc5723b9311120c2178cea67f9a5f
[]
no_license
chq347796066/base-interface
917914190be0b487929f38d2cce68f7e396c149e
356aabbdcf827c9a65083d17c3e7ade259801bfd
refs/heads/main
2023-02-26T13:53:26.205433
2021-02-08T10:24:36
2021-02-08T10:24:36
337,037,239
0
0
null
null
null
null
UTF-8
Java
false
false
2,004
java
package com.spring.base.vo.baseinfo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; /** * @author 作者:ZhaoJinHua * @date : 创建时间:2020-03-13 11:18:07 * @Desc类说明: 更新菜单vo */ @ApiModel @Data @ToString public class MenuUpdateVo { //主键 @ApiModelProperty(value = "主键") private String id; //父项 @ApiModelProperty(value = "父项") private String parent; //菜单Code,当为按钮时必传 @ApiModelProperty(value = "菜单Code,当为按钮时必传") private String menuCode; //菜单名称 @ApiModelProperty(value = "菜单名称") private String menuTitle; //当前层级 @ApiModelProperty(value = "当前层级") private Integer menuLevel; //路由名称 @ApiModelProperty(value = "路由名称") private String routeName; //路由 @ApiModelProperty(value = "路由") private String routePath; //图标 @ApiModelProperty(value = "图标") private String menuIcon; //描述 @ApiModelProperty(value = "描述") private String menuDesc; //排序 @ApiModelProperty(value = "排序") private Integer menuOrder; //功能按钮对应接口名 @ApiModelProperty(value = "功能按钮对应接口名") private String interfaceName; //菜单属性 @ApiModelProperty(value = "菜单属性") private String menuProperty; //模板路径 @ApiModelProperty(value = "模板路径") private String component; //菜单类型,1-页面,2-按钮 @ApiModelProperty(value = "菜单类型,1-页面,2-按钮") private Integer menuType; //系统代码 @ApiModelProperty(value = "系统代码(manage-管理平台,payment-收费系统,app-物业app)") private String systemCode; //状态(1启用,2禁用) @ApiModelProperty(value = "状态(1启用,2禁用)") private String status; }
[ "chq347796066@126.com" ]
chq347796066@126.com
c189cdf979cfadf5e4625327570d5fe8c8361e70
4effb019df80da8895be2aeb11afec47ef6cfbc4
/src/main/java/spring/boot/ibatis/mybatis/MyBatisController.java
be7aa5fd9254edb164817c927ab13f747967ed66
[]
no_license
tushar239/SampleIBatisProject
4fb01b0b8ff054922f08eb6ba397601c03221024
43f1deae99e945f5b6ac631b396de3958459f084
refs/heads/master
2020-05-29T08:53:41.623104
2016-09-28T06:03:26
2016-09-28T06:03:26
69,430,994
0
0
null
null
null
null
UTF-8
Java
false
false
1,334
java
package spring.boot.ibatis.mybatis; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import spring.boot.ibatis.User; import java.util.List; /** * Created by chokst on 12/2/14. */ @RestController @RequestMapping("/mybatis") public class MyBatisController { @Autowired private MyBatisDAO myBatisDAO; // http://localhost:8083/mybatis/getAllUsersUsingMyBatis @RequestMapping("/getAllUsersUsingMyBatis") public List<User> getAllUsersUsingSession() throws Exception { return myBatisDAO.getAllUsersUsingMyBatis(); } // http://localhost:8083/mybatis/getAllUsersUsingMyBatisMapperInterface @RequestMapping("/getAllUsersUsingMyBatisMapperInterface") public List<User> getAllUsersUsingMyBatisMapperInterface() throws Exception { return myBatisDAO.getAllUsersUsingMyBatisMapperInterface(); } // http://localhost:8083/mybatis/getUserUsingMapperAnnotation @RequestMapping("/getUserUsingMapperAnnotation") public User getUserUsingMapperAnnotation() throws Exception { return myBatisDAO.getUserUsingMapperAnnotation(); } @RequestMapping("/status") public String getStatus() { return "success"; } }
[ "tushar239@gmail.com" ]
tushar239@gmail.com
fed11935428b9800f7574473641edf93fd99200d
f445098db4c7a9ddcab6ae04f76b0ca05578c280
/ssido.web/src/main/java/ssido/web/util/Either.java
d7a989601925a080859842b4d4978c94d22215c5
[ "Apache-2.0" ]
permissive
UBICUA-JSSI/ssido.server
8de12b05a00c92939d494a4366c62d151086a571
04d6aae67ce250050f64969ef369e8588bc1570d
refs/heads/main
2023-06-15T23:13:28.819479
2021-07-15T13:41:39
2021-07-15T13:41:39
375,471,383
2
1
null
null
null
null
UTF-8
Java
false
false
3,026
java
// Copyright (c) 2018, Yubico AB // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package ssido.web.util; import java.util.Optional; import java.util.function.Function; public final class Either<L, R> { private final boolean isRight; private final L leftValue; private final R rightValue; private Either(R rightValue) { this.isRight = true; this.leftValue = null; this.rightValue = rightValue; } private Either(boolean dummy, L leftValue) { this.isRight = false; this.leftValue = leftValue; this.rightValue = null; } public final boolean isLeft() { return !isRight(); } public final boolean isRight() { return isRight; } public final Optional<L> left() { if (isLeft()) { return Optional.of(leftValue); } else { throw new IllegalStateException("Cannot call left() on a right value."); } } public final Optional<R> right() { if (isRight()) { return Optional.of(rightValue); } else { throw new IllegalStateException("Cannot call right() on a left value."); } } public final <RO> Either<L, RO> map(Function<R, RO> func) { return flatMap(r -> Either.right(func.apply(r))); } public final <RO> Either<L, RO> flatMap(Function<R, Either<L, RO>> func) { if (isRight()) { return func.apply(rightValue); } else { return Either.left(leftValue); } } public static <L, R> Either<L, R> left(L value) { return new Either<>(false, value); } public static <L, R> Either<L, R> right(R value) { return new Either<>(value); } }
[ "vladimir.perez.gonzalez@gmail.com" ]
vladimir.perez.gonzalez@gmail.com
1ba3aeb22ec41ad8a3126ea534497c0a3efa99ce
d3c8d03a74e97bbb1f1c4c999ee89526f3c972a0
/src/main/java/com/tryine/oa/modules/oa/entity/OaTravelapply.java
c4ce8c88bcf5b53a21469d63259584839de52c66
[]
no_license
summer0581/tryineoa
f1da69cfe0ea388d539ed7b2b4858853232eaccd
98cd5d54d76541795cf35d29630e65d7de03fcfd
refs/heads/master
2021-01-25T04:08:28.336639
2015-06-18T01:24:50
2015-06-18T01:24:50
33,820,590
0
0
null
null
null
null
UTF-8
Java
false
false
5,883
java
/** * Copyright &copy; 2012-2014 <a href="">TryineOA</a> All rights reserved. */ package com.tryine.oa.modules.oa.entity; import java.util.Date; import org.hibernate.validator.constraints.Length; import com.fasterxml.jackson.annotation.JsonFormat; import com.tryine.oa.common.persistence.FlowEntity; import com.tryine.oa.modules.sys.entity.Office; /** * 出差申请Entity * @author Summer * @version 2015-04-16 */ public class OaTravelapply extends FlowEntity<OaTravelapply> { private static final long serialVersionUID = 1L; private String name; // 姓名 private Office office; // 部门 private String post; // 岗位 private String telephone; // 联系电话 private Date outTime; // 外出时间 private Date plantobacktime; // 预计返还时间 private String outPlace; // 外出地点 private String customerInfo; // 客户姓名 private String customerTelephone; // 客户电话 private String joinPeople; // 随行人员 private String directLeaderIdea; // 直接上级意见 private String branchLeaderIdea; // 分公司总经理意见 private String generalManagerIdea; // 集团总经理意见 private String humanResourceIdea; // 人资部意见 private String chairManIdea; // 董事长意见 private String outReason; // 外出事由 private Date startOutTime; // 外出起始时间 private Date endOutTime; // 外出结束时间 private Date startPlantobacktime; // 预计返还起始时间 private Date endPlantobacktime; // 预计返还结束时间 public OaTravelapply() { super(); } public OaTravelapply(String id){ super(id); } @Length(min=0, max=64, message="姓名长度必须介于 0 和 64 之间") public String getName() { return name; } public void setName(String name) { this.name = name; } public Office getOffice() { return office; } public void setOffice(Office office) { this.office = office; } @Length(min=0, max=64, message="岗位长度必须介于 0 和 64 之间") public String getPost() { return post; } public void setPost(String post) { this.post = post; } @Length(min=0, max=64, message="联系电话长度必须介于 0 和 64 之间") public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone; } @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") public Date getOutTime() { return outTime; } public void setOutTime(Date outTime) { this.outTime = outTime; } @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") public Date getPlantobacktime() { return plantobacktime; } public void setPlantobacktime(Date plantobacktime) { this.plantobacktime = plantobacktime; } @Length(min=0, max=300, message="外出地点长度必须介于 0 和 300 之间") public String getOutPlace() { return outPlace; } public void setOutPlace(String outPlace) { this.outPlace = outPlace; } @Length(min=0, max=200, message="客户姓名长度必须介于 0 和 200 之间") public String getCustomerInfo() { return customerInfo; } public void setCustomerInfo(String customerInfo) { this.customerInfo = customerInfo; } @Length(min=0, max=64, message="客户电话长度必须介于 0 和64 之间") public String getCustomerTelephone() { return customerTelephone; } public void setCustomerTelephone(String customerTelephone) { this.customerTelephone = customerTelephone; } @Length(min=0, max=500, message="随行人员长度必须介于 0 和 500 之间") public String getJoinPeople() { return joinPeople; } public void setJoinPeople(String joinPeople) { this.joinPeople = joinPeople; } @Length(min=0, max=2000, message="集团总经理意见长度必须介于 0 和 2000 之间") public String getGeneralManagerIdea() { return generalManagerIdea; } public void setGeneralManagerIdea(String generalManagerIdea) { this.generalManagerIdea = generalManagerIdea; } @Length(min=0, max=2000, message="分公司总经理意见长度必须介于 0 和 2000 之间") public String getBranchLeaderIdea() { return branchLeaderIdea; } public void setBranchLeaderIdea(String branchLeaderIdea) { this.branchLeaderIdea = branchLeaderIdea; } @Length(min=0, max=2000, message="外出事由长度必须介于 0 和 2000 之间") public String getOutReason() { return outReason; } public void setOutReason(String outReason) { this.outReason = outReason; } public Date getStartOutTime() { return startOutTime; } public void setStartOutTime(Date startOutTime) { this.startOutTime = startOutTime; } public Date getEndOutTime() { return endOutTime; } public void setEndOutTime(Date endOutTime) { this.endOutTime = endOutTime; } public Date getStartPlantobacktime() { return startPlantobacktime; } public void setStartPlantobacktime(Date startPlantobacktime) { this.startPlantobacktime = startPlantobacktime; } public Date getEndPlantobacktime() { return endPlantobacktime; } public void setEndPlantobacktime(Date endPlantobacktime) { this.endPlantobacktime = endPlantobacktime; } @Length(min=0, max=2000, message="直接上级意见长度必须介于 0 和 2000 之间") public String getDirectLeaderIdea() { return directLeaderIdea; } public void setDirectLeaderIdea(String directLeaderIdea) { this.directLeaderIdea = directLeaderIdea; } @Length(min=0, max=2000, message="人资总监意见长度必须介于 0 和 2000 之间") public String getHumanResourceIdea() { return humanResourceIdea; } public void setHumanResourceIdea(String humanResourceIdea) { this.humanResourceIdea = humanResourceIdea; } @Length(min=0, max=2000, message="董事长意见长度必须介于 0 和 2000 之间") public String getChairManIdea() { return chairManIdea; } public void setChairManIdea(String chairManIdea) { this.chairManIdea = chairManIdea; } }
[ "sum_xiatian@163.com" ]
sum_xiatian@163.com