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
f4bf03913123241b32b5e9e6c16b3ea80d9f3cd5
90ece9f4ae98bc9207eb80dce23fefadd7ce116d
/tags/cloud-web/first-vm-created-from-iso/src/main/java/com/gaoshin/cloud/web/xen/resource/XenResource.java
204ac9a86dd7ac0d02d0cf1fa7fb0f471a0e0de0
[]
no_license
zhangyongjiang/unfuddle
3709018baafefd16003d3666aae6808c106ee038
e07a6268f46eee7bc2b4890c44b736462ab89642
refs/heads/master
2021-01-24T06:12:21.603134
2014-07-06T16:14:18
2014-07-06T16:14:18
21,543,421
1
1
null
null
null
null
UTF-8
Java
false
false
6,117
java
package com.gaoshin.cloud.web.xen.resource; import java.io.IOException; import javax.servlet.ServletException; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.gaoshin.cloud.web.bean.GenericResponse; import com.gaoshin.cloud.web.xen.bean.CloneRequest; import com.gaoshin.cloud.web.xen.bean.ConsoleSession; import com.gaoshin.cloud.web.xen.bean.Host; import com.gaoshin.cloud.web.xen.bean.HostDetails; import com.gaoshin.cloud.web.xen.bean.HostList; import com.gaoshin.cloud.web.xen.bean.HostNetworkList; import com.gaoshin.cloud.web.xen.bean.StorageRepoDetails; import com.gaoshin.cloud.web.xen.bean.StorageRepoList; import com.gaoshin.cloud.web.xen.bean.VirtualDiskImageList; import com.gaoshin.cloud.web.xen.bean.VmDetails; import com.gaoshin.cloud.web.xen.bean.VmList; import com.gaoshin.cloud.web.xen.service.SessionManager; import com.gaoshin.cloud.web.xen.service.XenService; import common.util.web.JerseyBaseResource; @Path("/xen") @Component @Produces({ "text/html;charset=utf-8", "text/xml;charset=utf-8", "application/json" }) public class XenResource extends JerseyBaseResource { @Autowired private XenService xenService; @Autowired private SessionManager sessionManager; @GET @Path("/host/details/{id}") public HostDetails get(@PathParam("id") Long hostId) { return xenService.getHostDetails(hostId); } @POST @Path("/host/add") public Host create(Host host) { return xenService.createHost(host); } @POST @Path("/host/update") public GenericResponse update(Host host) { xenService.updateHost(host); return new GenericResponse(); } @POST @Path("/host/remove/{id}") public GenericResponse remove(@PathParam("id") Long hostId) { xenService.removeHost(hostId); return new GenericResponse(); } @GET @Path("/host/list") public HostList listHosts() { return xenService.listHosts(); } @POST @Path("/host/sr/refresh") public GenericResponse refreshStorageRepository(@QueryParam("hostId") Long hostId) throws Exception { xenService.refreshHostStorageRepository(hostId); return new GenericResponse(); } @GET @Path("/host/vm/list") public VmList listVms(@QueryParam("hostId") Long hostId) throws Exception { return xenService.listHostVms(hostId); } @GET @Path("/host/vm/details") public VmDetails getVmDetails(@QueryParam("hostId") Long hostId, @QueryParam("vmId") String vmId) throws Exception { return xenService.getVmDetails(hostId, vmId); } @POST @Path("/host/vm/start/{hostId}/{vmId}") public GenericResponse startVm(@PathParam("hostId") Long hostId, @PathParam("vmId") String vmId) throws Exception { xenService.startVm(hostId, vmId); return new GenericResponse(); } @POST @Path("/host/vm/suspend/{hostId}/{vmId}") public GenericResponse suspendVm(@PathParam("hostId") Long hostId, @PathParam("vmId") String vmId) throws Exception { xenService.suspendVm(hostId, vmId); return new GenericResponse(); } @POST @Path("/host/vm/shutdown/{hostId}/{vmId}") public GenericResponse stopVm(@PathParam("hostId") Long hostId, @PathParam("vmId") String vmId) throws Exception { xenService.shutdownVm(hostId, vmId); return new GenericResponse(); } @POST @Path("/host/vm/resume/{hostId}/{vmId}") public GenericResponse resumeVm(@PathParam("hostId") Long hostId, @PathParam("vmId") String vmId) throws Exception { xenService.resumeVm(hostId, vmId); return new GenericResponse(); } @POST @Path("/host/vm/destroy/{hostId}/{vmId}") public GenericResponse destroyVm(@PathParam("hostId") Long hostId, @PathParam("vmId") String vmId) throws Exception { xenService.destroyVm(hostId, vmId); return new GenericResponse(); } @POST @Path("/host/vm/clone") public GenericResponse cloneVm(CloneRequest cloneRequest) throws Exception { String uuid = xenService.cloneVm(cloneRequest); GenericResponse response = new GenericResponse(); response.setData(uuid); return response; } @GET @Path("/host/vm/session/console/open") public ConsoleSession getConsole(@QueryParam("hostId") Long hostId, @QueryParam("vmId") String vmId, @QueryParam("consoleId") String consoleId) throws Exception { return xenService.getConsole(hostId, vmId, consoleId); } @GET @Path("/host/vm/session/heartbeat/{sessionId}") public Response sessionHeartBeat(@PathParam("sessionId") String sessionId) throws ServletException, IOException { xenService.sessionHeartBeat(sessionId); responseInvoker.get().setContentType("images/gif"); requestInvoker.get().getRequestDispatcher("/images/1x1.gif").include(requestInvoker.get(), responseInvoker.get()); return Response.ok().build(); } @GET @Path("/host/sr/details") public StorageRepoDetails getStorageRepoDetails(@QueryParam("hostId") Long hostId, @QueryParam("srUuid") String srUuid) throws Exception { return xenService.getStorageRepoDetails(hostId, srUuid); } @GET @Path("/host/vdi-list") public VirtualDiskImageList listHostVdis(@QueryParam("hostId") Long hostId) throws Exception { return xenService.listHostVdis(hostId); } @GET @Path("/host/sr-list") public StorageRepoList listStorage(@QueryParam("hostId") Long hostId) throws Exception { return xenService.listHostStorage(hostId); } @GET @Path("/host/network-list") public HostNetworkList listNetwork(@QueryParam("hostId") Long hostId) throws Exception { return xenService.listNetwork(hostId); } }
[ "zhangyongjiang@yahoo.com" ]
zhangyongjiang@yahoo.com
0fa599dd037a87fa2b84f6f420f10a9ca0f6efcd
add66f062ba1143c97335233e346bcc33d901d98
/src/day28_JavaRecap/WarmUp2.java
2cdbd8ab0265a773f02cc3adfb0e4aa8ba61b45b
[]
no_license
hakanorak21/Summer2019JavaPractice
e42a6fbfe81abf87bd0581ad0a4d323415f4ec1b
319a959f891ff870de1e1e718b0521deb22c2753
refs/heads/master
2020-07-22T10:57:49.812355
2020-05-25T18:46:51
2020-05-25T18:46:51
207,175,176
0
0
null
null
null
null
UTF-8
Java
false
false
869
java
package day28_JavaRecap; public class WarmUp2 { public static void main(String[] args) { calculate(10, 2, "*"); } public static void calculate(int a, int b, String operator) { String result = ""; if (operator.equals("-")) result += (a - b); else if (operator.equals("+")) result += (a + b); else if (operator.equals("*")) result += (a * b); else if (operator.equals("/")) result += (a / b); else if (operator.equals("%")) result += (a % b); else result += "Invalid operator"; System.out.println(result); //Ternary operator String result2 = ""; result2 += (operator.equals("-"))? (a-b) : (operator.equals("+"))? (a+b) : (operator.equals("*"))? (a*b) : (operator.equals("/"))? (a/b) : (operator.equals("%"))? (a%b) : "Invalid operator"; System.out.println(result2); } }
[ "hakanorak21@yahoo.com" ]
hakanorak21@yahoo.com
b56ba50709a879c9d6b44cd74fd33c1e8486009f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_cc78b3ff32ef7b4b0b0250f8c2770e89da8b14e0/PairOfIntSignatureTest/16_cc78b3ff32ef7b4b0b0250f8c2770e89da8b14e0_PairOfIntSignatureTest_t.java
1b290a60d78012025de4b98c308d786c8201803e
[]
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,860
java
package ivory.lsh; import ivory.lsh.data.NBitSignature; import ivory.lsh.data.PairOfIntNBitSignature; import ivory.lsh.data.PairOfIntSignature; import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.io.Writable; import org.junit.Test; import edu.umd.cloud9.io.pair.PairOfWritables; import edu.umd.cloud9.io.SequenceFileUtils; public class PairOfIntSignatureTest { @Test public void testReadWrite() throws IOException{ SequenceFile.Writer w = SequenceFile.createWriter(FileSystem.getLocal(new Configuration()), new Configuration(), new Path("PairOfIntSignatureTest"), IntWritable.class, PairOfIntNBitSignature.class); PairOfIntNBitSignature p1 = new PairOfIntNBitSignature(1, null); PairOfIntNBitSignature p2 = new PairOfIntNBitSignature(2, new NBitSignature(100)); PairOfIntNBitSignature p3 = new PairOfIntNBitSignature(3, null); w.append(new IntWritable(1), p1); w.append(new IntWritable(2), p2); w.append(new IntWritable(3), p3); w.close(); List<PairOfWritables<Writable, Writable>> listOfKeysPairs = SequenceFileUtils.readFile(new Path("PairOfIntSignatureTest"), FileSystem.getLocal(new Configuration())); FileSystem.get(new Configuration()).delete(new Path("PairOfIntSignatureTest"), true); PairOfIntSignature a1 = (PairOfIntSignature) listOfKeysPairs.get(0).getRightElement(); PairOfIntSignature a2 = (PairOfIntSignature) listOfKeysPairs.get(1).getRightElement(); PairOfIntSignature a3 = (PairOfIntSignature) listOfKeysPairs.get(2).getRightElement(); System.out.println(a1); System.out.println(a2); System.out.println(a3); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
bc05e55a2b67bfe089f645bf84bd308ac02c08b8
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/baike/sources/cz/msebera/android/httpclient/impl/execchain/b.java
341574f417c4c6581c899f863e04bb711faa2691
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
3,858
java
package cz.msebera.android.httpclient.impl.execchain; import cz.msebera.android.httpclient.Header; import cz.msebera.android.httpclient.HeaderIterator; import cz.msebera.android.httpclient.HttpEntity; import cz.msebera.android.httpclient.HttpResponse; import cz.msebera.android.httpclient.ProtocolVersion; import cz.msebera.android.httpclient.StatusLine; import cz.msebera.android.httpclient.annotation.NotThreadSafe; import cz.msebera.android.httpclient.client.methods.CloseableHttpResponse; import cz.msebera.android.httpclient.params.HttpParams; import java.io.IOException; import java.util.Locale; @NotThreadSafe class b implements CloseableHttpResponse { private final HttpResponse a; private final a b; public b(HttpResponse httpResponse, a aVar) { this.a = httpResponse; this.b = aVar; d.enchance(httpResponse, aVar); } public void close() throws IOException { if (this.b != null) { this.b.abortConnection(); } } public StatusLine getStatusLine() { return this.a.getStatusLine(); } public void setStatusLine(StatusLine statusLine) { this.a.setStatusLine(statusLine); } public void setStatusLine(ProtocolVersion protocolVersion, int i) { this.a.setStatusLine(protocolVersion, i); } public void setStatusLine(ProtocolVersion protocolVersion, int i, String str) { this.a.setStatusLine(protocolVersion, i, str); } public void setStatusCode(int i) throws IllegalStateException { this.a.setStatusCode(i); } public void setReasonPhrase(String str) throws IllegalStateException { this.a.setReasonPhrase(str); } public HttpEntity getEntity() { return this.a.getEntity(); } public void setEntity(HttpEntity httpEntity) { this.a.setEntity(httpEntity); } public Locale getLocale() { return this.a.getLocale(); } public void setLocale(Locale locale) { this.a.setLocale(locale); } public ProtocolVersion getProtocolVersion() { return this.a.getProtocolVersion(); } public boolean containsHeader(String str) { return this.a.containsHeader(str); } public Header[] getHeaders(String str) { return this.a.getHeaders(str); } public Header getFirstHeader(String str) { return this.a.getFirstHeader(str); } public Header getLastHeader(String str) { return this.a.getLastHeader(str); } public Header[] getAllHeaders() { return this.a.getAllHeaders(); } public void addHeader(Header header) { this.a.addHeader(header); } public void addHeader(String str, String str2) { this.a.addHeader(str, str2); } public void setHeader(Header header) { this.a.setHeader(header); } public void setHeader(String str, String str2) { this.a.setHeader(str, str2); } public void setHeaders(Header[] headerArr) { this.a.setHeaders(headerArr); } public void removeHeader(Header header) { this.a.removeHeader(header); } public void removeHeaders(String str) { this.a.removeHeaders(str); } public HeaderIterator headerIterator() { return this.a.headerIterator(); } public HeaderIterator headerIterator(String str) { return this.a.headerIterator(str); } @Deprecated public HttpParams getParams() { return this.a.getParams(); } @Deprecated public void setParams(HttpParams httpParams) { this.a.setParams(httpParams); } public String toString() { StringBuilder stringBuilder = new StringBuilder("HttpResponseProxy{"); stringBuilder.append(this.a); stringBuilder.append('}'); return stringBuilder.toString(); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
99849df73591e33a07cba1036fd1989e2bae1538
57e8247a8974f1eec0516ac7e17d3d62c0cafc76
/core/common-core/src/main/java/eu/leads/processor/core/comp/DefaultFailHandler.java
36128b70ac519fad75f20f03dd1dd43fece471b8
[]
no_license
vagvaz/Leads-QueryProcessor
6c3132313ead06323a9573fc4409faaa3798291a
920d65ec55d44fbf2fde278fe17172e8eb88d002
refs/heads/master
2020-05-07T21:47:03.854677
2014-10-05T17:13:44
2014-10-05T17:13:44
24,820,445
0
1
null
null
null
null
UTF-8
Java
false
false
496
java
package eu.leads.processor.core.comp; import eu.leads.processor.core.PersistenceProxy; import eu.leads.processor.core.net.Node; import org.vertx.java.core.json.JsonObject; /** * Created by vagvaz on 7/13/14. */ public class DefaultFailHandler implements LeadsMessageHandler { public DefaultFailHandler(ComponentControlVerticle componentControlVerticle, Node com, LogProxy log) { } @Override public void handle(JsonObject jsonObject) { } }
[ "vagvaz@gmail.com" ]
vagvaz@gmail.com
74ae1ee3c40cb43c5eea2a4d9555f0e52b5d5777
5d7c8d78e72ae3ea6e61154711fdd23248c19614
/sources/android/support/v4/content/IntentCompat.java
c910578058410c2cde804773bb7665680d3e6c21
[]
no_license
activeliang/tv.taobao.android
8058497bbb45a6090313e8445107d987d676aff6
bb741de1cca9a6281f4c84a6d384333b6630113c
refs/heads/master
2022-11-28T10:12:53.137874
2020-08-06T05:43:15
2020-08-06T05:43:15
285,483,760
7
6
null
null
null
null
UTF-8
Java
false
false
3,663
java
package android.support.v4.content; import android.content.ComponentName; import android.content.Intent; import android.os.Build; public final class IntentCompat { public static final String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"; public static final String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE = "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE"; public static final String CATEGORY_LEANBACK_LAUNCHER = "android.intent.category.LEANBACK_LAUNCHER"; public static final String EXTRA_CHANGED_PACKAGE_LIST = "android.intent.extra.changed_package_list"; public static final String EXTRA_CHANGED_UID_LIST = "android.intent.extra.changed_uid_list"; public static final String EXTRA_HTML_TEXT = "android.intent.extra.HTML_TEXT"; public static final int FLAG_ACTIVITY_CLEAR_TASK = 32768; public static final int FLAG_ACTIVITY_TASK_ON_HOME = 16384; private static final IntentCompatImpl IMPL; interface IntentCompatImpl { Intent makeMainActivity(ComponentName componentName); Intent makeMainSelectorActivity(String str, String str2); Intent makeRestartActivityTask(ComponentName componentName); } static class IntentCompatImplBase implements IntentCompatImpl { IntentCompatImplBase() { } public Intent makeMainActivity(ComponentName componentName) { Intent intent = new Intent("android.intent.action.MAIN"); intent.setComponent(componentName); intent.addCategory("android.intent.category.LAUNCHER"); return intent; } public Intent makeMainSelectorActivity(String selectorAction, String selectorCategory) { Intent intent = new Intent(selectorAction); intent.addCategory(selectorCategory); return intent; } public Intent makeRestartActivityTask(ComponentName mainActivity) { Intent intent = makeMainActivity(mainActivity); intent.addFlags(268468224); return intent; } } static class IntentCompatImplHC extends IntentCompatImplBase { IntentCompatImplHC() { } public Intent makeMainActivity(ComponentName componentName) { return IntentCompatHoneycomb.makeMainActivity(componentName); } public Intent makeRestartActivityTask(ComponentName componentName) { return IntentCompatHoneycomb.makeRestartActivityTask(componentName); } } static class IntentCompatImplIcsMr1 extends IntentCompatImplHC { IntentCompatImplIcsMr1() { } public Intent makeMainSelectorActivity(String selectorAction, String selectorCategory) { return IntentCompatIcsMr1.makeMainSelectorActivity(selectorAction, selectorCategory); } } static { int version = Build.VERSION.SDK_INT; if (version >= 15) { IMPL = new IntentCompatImplIcsMr1(); } else if (version >= 11) { IMPL = new IntentCompatImplHC(); } else { IMPL = new IntentCompatImplBase(); } } private IntentCompat() { } public static Intent makeMainActivity(ComponentName mainActivity) { return IMPL.makeMainActivity(mainActivity); } public static Intent makeMainSelectorActivity(String selectorAction, String selectorCategory) { return IMPL.makeMainSelectorActivity(selectorAction, selectorCategory); } public static Intent makeRestartActivityTask(ComponentName mainActivity) { return IMPL.makeRestartActivityTask(mainActivity); } }
[ "activeliang@gmail.com" ]
activeliang@gmail.com
62432162821384d523c850649e81a1f0391fe222
c9cfc6279726394475f59800259f194d349ea8da
/src/com/scholastic/sbam/client/services/TerminateExportServiceAsync.java
49145cb459923529860e1dc923ff995e0f26fde8
[]
no_license
VijayEluri/SBAM-Dev
ce15f813da784fa764c42f8711bc565be6251580
1ba017f990e633112d2bbc94e20ac190f799dee4
refs/heads/master
2020-05-20T11:15:01.750085
2012-02-25T03:19:55
2012-02-25T03:19:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.scholastic.sbam.client.services; import com.google.gwt.user.client.rpc.AsyncCallback; import com.scholastic.sbam.shared.objects.ExportProcessReport; public interface TerminateExportServiceAsync { void terminateExport(String terminationReason, AsyncCallback<ExportProcessReport> callback); }
[ "blacatena@comcast.net" ]
blacatena@comcast.net
119e8d583c63f1971d00048e9b6e46bab066a3b3
ecfce997b3d9abdf786e50a031f0818bf089cedf
/src/main/java/com/ms/sys/interceptor/Repeat.java
b3302765d38404636077b6c57d53fd4257172ee4
[]
no_license
viewolspace/invite_ms
c6f94bed4fa29c99e7b4d4973ddd88a81ecbcfb9
9ebde64d4d79bb39d617b40630ca510b92f8f9a4
refs/heads/master
2020-05-25T06:25:08.859621
2019-06-14T01:56:04
2019-06-14T01:56:04
187,667,854
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package com.ms.sys.interceptor; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Repeat { }
[ "shileibrave@163.com" ]
shileibrave@163.com
7ac7916d1c5c2c42c34a55597bf54500090782b9
e03f2b5064430142ff142e8e9a5b8699009a28a0
/src/main/java/com/tencentcloudapi/vod/v20180717/models/VideoTemplateInfo.java
b304667eaec033de1dc2e4e0ea71883588c1ed92
[ "Apache-2.0" ]
permissive
goodchenwei90/tencentcloud-sdk-java
07228c54214b10d06a663078ec3c87b4ade7e477
4ad3bc4b7bca47321127eeeecd74a56b99290c27
refs/heads/master
2020-04-30T14:33:06.634248
2019-03-20T06:51:06
2019-03-20T06:51:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,817
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.vod.v20180717.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class VideoTemplateInfo extends AbstractModel{ /** * 视频流的编码格式,可选值: <li>libx264:H.264 编码</li> <li>libx265:H.265 编码</li> 目前 H.265 编码必须指定分辨率,并且需要在 640*480 以内。 */ @SerializedName("Codec") @Expose private String Codec; /** * 视频帧率,取值范围:[0, 60],单位:Hz。 当取值为 0,表示帧率和原始视频保持一致。 */ @SerializedName("Fps") @Expose private Long Fps; /** * 视频流的码率,取值范围:0 和 [128, 35000],单位:kbps。 当取值为 0,表示视频码率和原始视频保持一致。 */ @SerializedName("Bitrate") @Expose private Long Bitrate; /** * 分辨率自适应,可选值: <li>open:开启,此时,Width 代表视频的宽度,Height 表示视频的高度;</li> <li>close:关闭,此时,Width 代表视频的长边,Height 表示视频的短边。</li> 默认值:open。 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("ResolutionAdaptive") @Expose private String ResolutionAdaptive; /** * 视频流宽度(或长边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("Width") @Expose private Long Width; /** * 视频流高度(或短边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("Height") @Expose private Long Height; /** * 获取视频流的编码格式,可选值: <li>libx264:H.264 编码</li> <li>libx265:H.265 编码</li> 目前 H.265 编码必须指定分辨率,并且需要在 640*480 以内。 * @return Codec 视频流的编码格式,可选值: <li>libx264:H.264 编码</li> <li>libx265:H.265 编码</li> 目前 H.265 编码必须指定分辨率,并且需要在 640*480 以内。 */ public String getCodec() { return this.Codec; } /** * 设置视频流的编码格式,可选值: <li>libx264:H.264 编码</li> <li>libx265:H.265 编码</li> 目前 H.265 编码必须指定分辨率,并且需要在 640*480 以内。 * @param Codec 视频流的编码格式,可选值: <li>libx264:H.264 编码</li> <li>libx265:H.265 编码</li> 目前 H.265 编码必须指定分辨率,并且需要在 640*480 以内。 */ public void setCodec(String Codec) { this.Codec = Codec; } /** * 获取视频帧率,取值范围:[0, 60],单位:Hz。 当取值为 0,表示帧率和原始视频保持一致。 * @return Fps 视频帧率,取值范围:[0, 60],单位:Hz。 当取值为 0,表示帧率和原始视频保持一致。 */ public Long getFps() { return this.Fps; } /** * 设置视频帧率,取值范围:[0, 60],单位:Hz。 当取值为 0,表示帧率和原始视频保持一致。 * @param Fps 视频帧率,取值范围:[0, 60],单位:Hz。 当取值为 0,表示帧率和原始视频保持一致。 */ public void setFps(Long Fps) { this.Fps = Fps; } /** * 获取视频流的码率,取值范围:0 和 [128, 35000],单位:kbps。 当取值为 0,表示视频码率和原始视频保持一致。 * @return Bitrate 视频流的码率,取值范围:0 和 [128, 35000],单位:kbps。 当取值为 0,表示视频码率和原始视频保持一致。 */ public Long getBitrate() { return this.Bitrate; } /** * 设置视频流的码率,取值范围:0 和 [128, 35000],单位:kbps。 当取值为 0,表示视频码率和原始视频保持一致。 * @param Bitrate 视频流的码率,取值范围:0 和 [128, 35000],单位:kbps。 当取值为 0,表示视频码率和原始视频保持一致。 */ public void setBitrate(Long Bitrate) { this.Bitrate = Bitrate; } /** * 获取分辨率自适应,可选值: <li>open:开启,此时,Width 代表视频的宽度,Height 表示视频的高度;</li> <li>close:关闭,此时,Width 代表视频的长边,Height 表示视频的短边。</li> 默认值:open。 注意:此字段可能返回 null,表示取不到有效值。 * @return ResolutionAdaptive 分辨率自适应,可选值: <li>open:开启,此时,Width 代表视频的宽度,Height 表示视频的高度;</li> <li>close:关闭,此时,Width 代表视频的长边,Height 表示视频的短边。</li> 默认值:open。 注意:此字段可能返回 null,表示取不到有效值。 */ public String getResolutionAdaptive() { return this.ResolutionAdaptive; } /** * 设置分辨率自适应,可选值: <li>open:开启,此时,Width 代表视频的宽度,Height 表示视频的高度;</li> <li>close:关闭,此时,Width 代表视频的长边,Height 表示视频的短边。</li> 默认值:open。 注意:此字段可能返回 null,表示取不到有效值。 * @param ResolutionAdaptive 分辨率自适应,可选值: <li>open:开启,此时,Width 代表视频的宽度,Height 表示视频的高度;</li> <li>close:关闭,此时,Width 代表视频的长边,Height 表示视频的短边。</li> 默认值:open。 注意:此字段可能返回 null,表示取不到有效值。 */ public void setResolutionAdaptive(String ResolutionAdaptive) { this.ResolutionAdaptive = ResolutionAdaptive; } /** * 获取视频流宽度(或长边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 * @return Width 视频流宽度(或长边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 */ public Long getWidth() { return this.Width; } /** * 设置视频流宽度(或长边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 * @param Width 视频流宽度(或长边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 */ public void setWidth(Long Width) { this.Width = Width; } /** * 获取视频流高度(或短边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 * @return Height 视频流高度(或短边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 */ public Long getHeight() { return this.Height; } /** * 设置视频流高度(或短边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 * @param Height 视频流高度(或短边)的最大值,取值范围:0 和 [128, 4096],单位:px。 <li>当 Width、Height 均为 0,则分辨率同源;</li> <li>当 Width 为 0,Height 非 0,则 Width 按比例缩放;</li> <li>当 Width 非 0,Height 为 0,则 Height 按比例缩放;</li> <li>当 Width、Height 均非 0,则分辨率按用户指定。</li> 默认值:0。 注意:此字段可能返回 null,表示取不到有效值。 */ public void setHeight(Long Height) { this.Height = Height; } /** * 内部实现,用户禁止调用 */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "Codec", this.Codec); this.setParamSimple(map, prefix + "Fps", this.Fps); this.setParamSimple(map, prefix + "Bitrate", this.Bitrate); this.setParamSimple(map, prefix + "ResolutionAdaptive", this.ResolutionAdaptive); this.setParamSimple(map, prefix + "Width", this.Width); this.setParamSimple(map, prefix + "Height", this.Height); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
0706d942e58374e258792bbf211e5295c62e6dc6
297d94988a89455f9a9f113bfa107f3314d21f51
/trade-biz/src/main/java/com/hbc/api/trade/order/enums/third/GuideCropTypeEnum.java
67d95452eaa9e1f9c3e8e9c8dea18254a5f349e7
[]
no_license
whyoyyx/trade
408e86aba9a0d09aa5397eef194d346169ff15cc
9d3f30fafca42036385280541e31eb38d2145e03
refs/heads/master
2020-12-28T19:11:46.342249
2016-01-15T03:29:44
2016-01-15T03:29:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
767
java
package com.hbc.api.trade.order.enums.third; /** * @author colin * */ public enum GuideCropTypeEnum { CROPTYPE_RECEIVE(1, "接机"), CROPTYPE_SEND(2, "送机"), CROPTYPE_BAO_INCITY(3, "市内包车"), CROPTYPE_BYTIME(4, "次租"), CROPTYPE_ROUTE(5, "固定线路产品"), CROPTYPE_BAO_IN3(6, "三日内包车"), CARCLASS_BAO_OUT3(7, "三日外包车"); public Integer value; public String name; GuideCropTypeEnum(int value, String name) { this.value = value; this.name = name; } public static GuideCropTypeEnum getType(Integer value) { GuideCropTypeEnum[] carTypeEnums = GuideCropTypeEnum.values(); for (GuideCropTypeEnum coupStatus : carTypeEnums) { if (coupStatus.value.equals(value)) { return coupStatus; } } return null; } }
[ "fuyongtian@huangbaoche.com" ]
fuyongtian@huangbaoche.com
2e21e193609f4dfb4a5c044613304eab8f2bdc80
32ada64601dca2faf2ad0dae2dd5a080fd9ecc04
/timesheet/src/main/java/com/fastcode/timesheet/application/core/authorization/rolepermission/IRolepermissionAppService.java
f2039a88d0ef68ce771aef13997bd1b4c2766851
[]
no_license
fastcoderepos/tbuchner-sampleApplication1
d61cb323aeafd65e3cfc310c88fc371e2344847d
0880d4ef63b6aeece6f4a715e24bfa94de178664
refs/heads/master
2023-07-09T02:59:47.254443
2021-08-11T16:48:27
2021-08-11T16:48:27
395,057,379
0
0
null
null
null
null
UTF-8
Java
false
false
1,213
java
package com.fastcode.timesheet.application.core.authorization.rolepermission; import com.fastcode.timesheet.domain.core.authorization.rolepermission.RolepermissionId; import org.springframework.data.domain.Pageable; import com.fastcode.timesheet.application.core.authorization.rolepermission.dto.*; import com.fastcode.timesheet.commons.search.SearchCriteria; import java.util.*; public interface IRolepermissionAppService { //CRUD Operations CreateRolepermissionOutput create(CreateRolepermissionInput rolepermission); void delete(RolepermissionId rolepermissionId); UpdateRolepermissionOutput update(RolepermissionId rolepermissionId, UpdateRolepermissionInput input); FindRolepermissionByIdOutput findById(RolepermissionId rolepermissionId); List<FindRolepermissionByIdOutput> find(SearchCriteria search, Pageable pageable) throws Exception; void deleteUserTokens(Long roleId); //Relationship Operations //Relationship Operations GetPermissionOutput getPermission(RolepermissionId rolepermissionId); GetRoleOutput getRole(RolepermissionId rolepermissionId); //Join Column Parsers RolepermissionId parseRolepermissionKey(String keysString); }
[ "info@nfinityllc.com" ]
info@nfinityllc.com
fcb52ac3914b6c70d8aace2b90a798a5eb50cde6
b1face8b468fb70e18745a72723f9b913b4c9426
/scheduler/src/escalonador/util/Array5D.java
5949faf962b57ffa7b7f8d65c5f4b05ddffff874
[]
no_license
bernardobreder/master-gpu-scheduler
1a8dc7112ad4d526f9dd3e519c93bfeb6008052e
78abfcd67996609fb861f8ab454f3f7dd3def505
refs/heads/master
2022-02-20T10:33:40.986485
2017-09-24T14:36:25
2017-09-24T14:36:25
104,647,787
0
0
null
null
null
null
UTF-8
Java
false
false
1,233
java
package escalonador.util; import java.util.Arrays; public class Array5D { private final double[] cells; private final int as; private final int bs; private final int cs; private final int ds; private final int es; private final int size; public Array5D(int as, int bs, int cs, int ds, int es) { if ((long) as * (long) bs * cs * ds * es > Integer.MAX_VALUE) { throw new OutOfMemoryError("size: " + ((long) as * (long) bs * cs * ds)); } this.as = as; this.bs = bs; this.cs = cs; this.ds = ds; this.es = es; this.size = as * bs * cs * ds * es; this.cells = new double[size]; } public double get(int a, int b, int c, int d, int e) { int index = index(a, b, c, d, e); if (index >= size) { throw new IndexOutOfBoundsException(Arrays.toString(new int[] { a, b, c, d, e })); } return cells[index]; } public void set(int a, int b, int c, int d, int e, double value) { int index = index(a, b, c, d, e); if (index >= size) { throw new IndexOutOfBoundsException(Arrays.toString(new int[] { a, b, c, d, e })); } cells[index] = value; } protected int index(int a, int b, int c, int d, int e) { return a + as * b + as * bs * c + as * bs * cs * d + as * bs * cs * ds * e; } }
[ "bernardobreder@gmail.com" ]
bernardobreder@gmail.com
7792caa62eb4e06e32c06e8b321810c3bd535541
1fd8c900344d87d4df78a80d8bdc47e221be0c6e
/src/ch07/ex07_29/FibonacciSeries.java
dd097854bf72f0974771385e1cdf042c904d0599
[]
no_license
Bkroland19/java-how-to-program-11e
c50a68588c80ac3d4cd42d954b6c7d3bc86f77d3
3611c9a5a6868fb67fb8a6881230853e6cbd6e28
refs/heads/master
2023-03-17T21:06:16.154985
2020-07-21T00:17:58
2020-07-21T00:17:58
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,344
java
/* 7.29 (Fibonacci Series) The Fibonacci series 0, 1, 1, 2, 3, 5, 8, 13, 21, … begins with the terms 0 and 1 and has the property that each succeeding term is the sum of the two preceding terms. 1. Write a method fibonacci(n) that calculates the nth Fibonacci number. Incorporate this method into an application that enables the user to enter the value of n. 2. Determine the largest Fibonacci number that can be displayed on your system. 3. Modify the application you wrote in part (a) to use double instead of int to calculate and return Fibonacci numbers, and use this modified application to repeat part (b). */ package ch07.ex07_29; import java.util.Scanner; public class FibonacciSeries { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the value of n: "); int n = input.nextInt(); input.close(); System.out.printf("Fibonacci(%d) = %.0f%n", n, fibonacci(n)); } public static double fibonacci(int nth) { double fibonacciNumber = 0; double previous = 0; double current = 1; for (int i = 0; i < nth; i++) { if (i < 2) { fibonacciNumber = i; } else { fibonacciNumber = previous + current; previous = current; current = fibonacciNumber; } } return fibonacciNumber; } }
[ "gustavo.almeida13@fatec.sp.gov.br" ]
gustavo.almeida13@fatec.sp.gov.br
9146870a1969f85ddf03c04628fddc9bcc29e896
77d776f1d716e13dd9e40f2c885a26ad89b8f178
/0429update/src/com/boco/TONY/biz/flownode/POJO/DTO/ProcessFlowNodeDTOV2.java
ca010282ff94b46eb78c8d624fdf5aa447a35680
[]
no_license
AlessaVoid/studyCode
076dc132b7e24cb341d5a262f8f96d7fa78c848b
0b8806a537a081535992a467ad4ae7d5dcf7ab3e
refs/heads/master
2022-12-18T20:40:47.169951
2020-09-18T08:28:02
2020-09-18T08:28:02
null
0
0
null
null
null
null
GB18030
Java
false
false
3,139
java
package com.boco.TONY.biz.flownode.POJO.DTO; import java.io.Serializable; /** * 流程节点维护DTO * @author tony * @describe ProcessNodeDTO * @date 2019-09-25 */ public class ProcessFlowNodeDTOV2 implements Serializable { private static final long serialVersionUID = 3736900201600480554L; /**流程节点*/ private String fnId; /**流程节点编码*/ private String fnCode; /**流程名称*/ private String fnName; /**审批类种 需求录入*/ private String fnKind; /**审批节点数量*/ private int fnCount; /**流程节点创建人*/ private String fnCreateOper; /**流程节点创建时间*/ private String fnCreateTime; /**流程节点更新时间*/ private String fnUpdateTime; /**流程节点更新人*/ private String fnUpdateOper; public String getFnId() { return fnId; } public ProcessFlowNodeDTOV2 setFnId(String fnId) { this.fnId = fnId; return this; } public String getFnCode() { return fnCode; } public ProcessFlowNodeDTOV2 setFnCode(String fnCode) { this.fnCode = fnCode; return this; } public String getFnName() { return fnName; } public ProcessFlowNodeDTOV2 setFnName(String fnName) { this.fnName = fnName; return this; } public String getFnKind() { return fnKind; } public ProcessFlowNodeDTOV2 setFnKind(String fnKind) { this.fnKind = fnKind; return this; } public int getFnCount() { return fnCount; } public ProcessFlowNodeDTOV2 setFnCount(int fnCount) { this.fnCount = fnCount; return this; } public String getFnCreateOper() { return fnCreateOper; } public ProcessFlowNodeDTOV2 setFnCreateOper(String fnCreateOper) { this.fnCreateOper = fnCreateOper; return this; } public String getFnCreateTime() { return fnCreateTime; } public ProcessFlowNodeDTOV2 setFnCreateTime(String fnCreateTime) { this.fnCreateTime = fnCreateTime; return this; } public String getFnUpdateTime() { return fnUpdateTime; } public ProcessFlowNodeDTOV2 setFnUpdateTime(String fnUpdateTime) { this.fnUpdateTime = fnUpdateTime; return this; } public String getFnUpdateOper() { return fnUpdateOper; } public ProcessFlowNodeDTOV2 setFnUpdateOper(String fnUpdateOper) { this.fnUpdateOper = fnUpdateOper; return this; } @Override public String toString() { return "ProcessNodeDTO{" + "fnId='" + fnId + '\'' + ", fnCode='" + fnCode + '\'' + ", fnName='" + fnName + '\'' + ", fnKind='" + fnKind + '\'' + ", fnCount=" + fnCount + ", fnCreateOper='" + fnCreateOper + '\'' + ", fnCreateTime=" + fnCreateTime + ", fnUpdateTime=" + fnUpdateTime + ", fnUpdateOper='" + fnUpdateOper + '\'' + '}'; } }
[ "meiguangxue@nyintel.com" ]
meiguangxue@nyintel.com
fd5e527e42f11cc7fc3c37c40029e952684d1526
e3cc6d2f4634e9edcca23f6b41148654ae2f0f7a
/src/main/java/com/appCrawler/pagePro/Downbank.java
fd1ea21a3ea57ecf7ec805b3bcbfa852c4dff7ee
[]
no_license
buildhappy/webCrawler
c54f36caedb7e3f1418a8cc46f897f846f53b1d1
109f0d1acadf38da1985e147238c80715480ead2
refs/heads/master
2020-05-19T20:56:07.168001
2015-09-15T07:11:46
2015-09-15T07:11:46
42,501,826
0
1
null
null
null
null
UTF-8
Java
false
false
6,510
java
package com.appCrawler.pagePro; import java.net.URLEncoder; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.appCrawler.pagePro.apkDetails.Downbank_Detail; import us.codecraft.webmagic.Apk; import us.codecraft.webmagic.Page; import us.codecraft.webmagic.Site; import us.codecraft.webmagic.processor.PageProcessor; /** * 下载银行 http://www.downbank.cn * Downbank #132 * (1)下载链接有防盗链设置 * @author DMT */ public class Downbank implements PageProcessor{ private static Logger logger = LoggerFactory.getLogger(Downbank.class); Site site = Site.me().setCharset("gb2312").setRetryTimes(0).setSleepTime(3); @Override public Apk process(Page page) { logger.info("call in Downbank.process()" + page.getUrl()); //index page http://www.downbank.cn/search.asp?word=%CA%D6%BB%FA%B9%D9%BC%D2&m=2&searchbtn2=%BF%AA%CA%BC%CB%D1%CB%F7 if(page.getUrl().regex("http://www\\.downbank\\.cn/search\\.asp\\?.*").match()){ //app的具体介绍页面 [0-9]+\\.html // List<String> url1 = page.getHtml().links("//div[@id='searchmain']").regex("http://www\\.downbank\\.cn/[0-9]+\\..*").all(); List<String> url1 = page.getHtml().links("//div[@id='searchmain']").regex("http://www\\.downbank\\.cn/.*").all(); List<String> url4 = new LinkedList<String>(); for(String temp:url1){ try { if(!temp.contains("_")) url4.add(temp); } catch (Exception e) { e.printStackTrace(); } } //添加下一页url(翻页) List<String> url2 = page.getHtml().links("//p[@class='list_page']").regex("http://www\\.downbank\\.cn/search\\.asp\\?.*").all(); List<String> url3 = new LinkedList<String>(); for(String temp:url2){ try { String str = null; //获取url中的中文字符并替换为相应的url编码 str = temp.replaceAll("[^\\u4e00-\\u9fa5]", ""); //获取url中的中文字符 temp=temp.replaceFirst(str, URLEncoder.encode(str,"gb2312")); //替换 url3.add(temp); } catch (Exception e) { e.printStackTrace(); } } url4.addAll(url3); //remove the duplicate urls in list HashSet<String> urlSet = new HashSet<String>(url4); //add the urls to page Iterator<String> it = urlSet.iterator(); while(it.hasNext()){ page.addTargetRequest(it.next()); } } //the app detail page else if(page.getUrl().regex("http://www\\.downbank\\.cn/.*").match()){ // Apk apk = null; // String appName = null; //app名字 // String appDetailUrl = null; //具体页面url // String appDownloadUrl = null; //app下载地址 // String osPlatform = null ; //运行平台 // String appVersion = null; //app版本 // String appSize = null; //app大小 // String appUpdateDate = null; //更新日期 // String appType = null; //下载的文件类型 apk?zip?rar?ipa? // String appvender = null; //app开发者 APK这个类中尚未添加 // String appDownloadedTime=null; //app的下载次数 // String appDescription =null; //app的详细介绍 // osPlatform = page.getHtml().xpath("//div[@id='soft_name']/ul/li[4]/span/text()").toString(); // if(!osPlatform.contains("android")){ // logger.info("return from Downbank.process()"); // return null; // } // String nameString=page.getHtml().xpath("//div[@id='soft_name']/h1/label/b/text()").toString(); // if(nameString != null && nameString.contains("V")) // { // appName=nameString.substring(0,nameString.indexOf("V")-1); // appVersion = nameString.substring(nameString.indexOf("V")+1,nameString.length()); // } // else if(nameString != null && nameString.contains("v")) // { // appName=nameString.substring(0,nameString.indexOf("v")-1); // appVersion = nameString.substring(nameString.indexOf("v")+1,nameString.length()); // } // else if(nameString != null && nameString.contains(".")) // { // appName=nameString.substring(0,nameString.indexOf(".")-1); // appVersion = nameString.substring(nameString.indexOf(".")-1,nameString.length()); // } // else{ // appName = nameString; // appVersion = null; // } // // // appDetailUrl = page.getUrl().toString(); // // appDownloadUrl = page.getHtml().xpath("//div[@id='soft_down']/ul/a[2]/@href").toString(); // // appSize = page.getHtml().xpath("//div[@id='soft_name']/ul/li[1]/span/text()").toString(); // // appUpdateDate = page.getHtml().xpath("//div[@id='soft_name']/ul/li[8]/span/text()").toString(); // // appType = "rar"; // // String descriptionString = page.getHtml().xpath("//div[@id='soft_intro']").toString(); // String allinfoString = descriptionString; // while(allinfoString.contains("<")) // if(allinfoString.indexOf("<") == 0) allinfoString = allinfoString.substring(allinfoString.indexOf(">")+1,allinfoString.length()); // else if(allinfoString.contains("<!--")) allinfoString = allinfoString.substring(0,allinfoString.indexOf("<!--")) + allinfoString.substring(allinfoString.indexOf("-->")+3,allinfoString.length()); // else allinfoString = allinfoString.substring(0,allinfoString.indexOf("<")) + allinfoString.substring(allinfoString.indexOf(">")+1,allinfoString.length()); // // appDescription = allinfoString.replace("\n", ""); // // /* // System.out.println("appName="+appName); // System.out.println("appDetailUrl="+appDetailUrl); // System.out.println("appDownloadUrl="+appDownloadUrl); // System.out.println("osPlatform="+osPlatform); // System.out.println("appVersion="+appVersion); // System.out.println("appSize="+appSize); // System.out.println("appUpdateDate="+appUpdateDate); // System.out.println("appType="+appType); // System.out.println("appvender="+appvender); // System.out.println("appDownloadedTime="+appDownloadedTime); // System.out.println("appDescription="+appDescription); // */ // if(appName != null && appDownloadUrl != null){ // apk = new Apk(appName,appDetailUrl,appDownloadUrl,osPlatform ,appVersion,appSize,appUpdateDate,appType,null); // } logger.info("return from Downbank.process()"); return Downbank_Detail.getApkDetail(page); } logger.info("return from Downbank.process()"); return null; } @Override public Site getSite() { return site; } @Override public List<Apk> processMulti(Page page) { // TODO Auto-generated method stub return null; } }
[ "buildhappy512@163.com" ]
buildhappy512@163.com
1940bf30a8d3843113ff86d39a83a16283d1ce33
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_ea7b22c1df6dbddf15ab6c8247e6eb1d2900b016/SolrQueryBuilder/4_ea7b22c1df6dbddf15ab6c8247e6eb1d2900b016_SolrQueryBuilder_s.java
b16f775fee5518911ab76993d4b499eda8184672
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,504
java
package nz.co.searchwellington.repositories.solr; import java.util.Set; import nz.co.searchwellington.model.Tag; import nz.co.searchwellington.model.User; import nz.co.searchwellington.model.Website; import org.apache.solr.client.solrj.SolrQuery; public class SolrQueryBuilder { private StringBuilder sb; private Integer startIndex; private Integer maxItems; public SolrQueryBuilder() { this.sb = new StringBuilder(); this.startIndex = null; this.maxItems = null; } public SolrQueryBuilder tag(Tag tag) { sb.append(" +tags:" + tag.getId()); return this; } public SolrQueryBuilder showBroken(boolean showBroken) { if (!showBroken) { sb.append(" +httpStatus:200"); sb.append(" -embargoedUntil:[NOW TO *]"); sb.append(" -held:true"); } return this; } public SolrQueryBuilder isBroken() { sb.append(" -httpStatus:200"); return this; } public SolrQueryBuilder type(String type) { sb.append(" +type:" + type); return this; } public SolrQueryBuilder allContentTypes() { sb.append(" +type:[F TO W]"); return this; } public SolrQueryBuilder allPublishedTypes() { sb.append(" +type:[F TO N]"); return this; } public SolrQueryBuilder tags(Set<Tag> tags) { for (Tag tag : tags) { this.tag(tag); } return this; } public SolrQueryBuilder commented(boolean commented) { if (commented) { sb.append(" +commented:1"); } return this; } public SolrQueryBuilder dateRange(int daysAgo) { sb.append(" +date:[NOW-" + daysAgo + "DAY TO NOW]"); return this; } public SolrQueryBuilder publisher(Website publisher) { if (publisher != null) { sb.append(" +publisher:" + publisher.getId()); } return this; } public SolrQueryBuilder startIndex(int startIndex) { this.startIndex = startIndex; return this; } public SolrQueryBuilder maxItems(int maxItems) { this.maxItems = maxItems; return this; } public SolrQueryBuilder month(String monthString) { if (monthString != null) { sb.append(" +month:" + monthString); } return this; } public SolrQueryBuilder geotagged() { sb.append(" +geotagged:true"); return this; } public SolrQuery toQuery() { SolrQuery query = new SolrQuery(sb.toString().trim()); if (startIndex != null) { query.setStart(startIndex); } if (maxItems != null) { query.setRows(maxItems); } return query; } public SolrQuery toNewsitemsNearQuery(double latitude, double longitude, double radius, boolean showBroken, int startIndex, int maxItems) { SolrQuery query = new SolrQueryBuilder().type("N").showBroken(showBroken).geotagged().startIndex(startIndex).maxItems(maxItems).toQuery(); query.setFilterQueries("{!geofilt}"); query.setParam("sfield", "position"); query.setParam("pt", latitude + "," + longitude); query.setParam("d", Double.toString(radius)); return query; } public SolrQueryBuilder minTwitterCount(int count) { sb.append(" +twitterCount:[" + count + " TO *]"); return this; } public SolrQueryBuilder taggingUser(User user) { sb.append(" +handTaggingUsers:" + user.getId()); return this; } public SolrQueryBuilder pageUrl(String pageUrl) { sb.append(" +pageUrl:'" + pageUrl + "'"); return this; } public SolrQueryBuilder owningUser(User user) { sb.append(" +owner:" + user.getId()); return this; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4189352298d61e87778f66ec8bfe7224f94f6949
fee6d85bcf780d9c3352274ca10d77ea5a476a03
/chatsdk/src/main/java/com/gloiot/chatsdk/chatui/keyboard/EmoticonsKeyBoardPopWindow.java
1c38e4bfa0e5b8612336af1862d31d373c4ed621
[]
no_license
sumtk1/oldproject3
1d47c5aa32d364c4eb6969eee9c72bdfec85ccb2
dae0a7688283239e1b5189835a8d59b17addb83b
refs/heads/master
2020-04-05T18:14:43.119398
2018-11-11T15:39:13
2018-11-11T15:39:13
157,093,793
1
0
null
null
null
null
UTF-8
Java
false
false
3,775
java
package com.gloiot.chatsdk.chatui.keyboard; import android.app.Activity; import android.content.Context; import android.graphics.drawable.ColorDrawable; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.widget.PopupWindow; import com.gloiot.chatsdk.R; import com.gloiot.chatsdk.chatui.keyboard.adpater.PageSetAdapter; import com.gloiot.chatsdk.chatui.keyboard.data.PageSetEntity; import com.gloiot.chatsdk.chatui.keyboard.utils.EmoticonsKeyboardUtils; import com.gloiot.chatsdk.chatui.keyboard.widget.EmoticonsFuncView; import com.gloiot.chatsdk.chatui.keyboard.widget.EmoticonsIndicatorView; import com.gloiot.chatsdk.chatui.keyboard.widget.EmoticonsToolBarView; import java.util.ArrayList; public class EmoticonsKeyBoardPopWindow extends PopupWindow implements EmoticonsFuncView.OnEmoticonsPageViewListener, EmoticonsToolBarView.OnToolBarItemClickListener { private Context mContext; protected EmoticonsFuncView mEmoticonsFuncView; protected EmoticonsIndicatorView mEmoticonsIndicatorView; protected EmoticonsToolBarView mEmoticonsToolBarView; public EmoticonsKeyBoardPopWindow(Context context) { super(context, null); this.mContext = context; LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View mConentView = inflater.inflate(R.layout.view_func_emoticon, null); setContentView(mConentView); setWidth(EmoticonsKeyboardUtils.getDisplayWidthPixels(mContext)); setHeight(EmoticonsKeyboardUtils.getDefKeyboardHeight(mContext)); setAnimationStyle(R.style.PopupAnimation); setOutsideTouchable(true); update(); ColorDrawable dw = new ColorDrawable(0000000000); setBackgroundDrawable(dw); updateView(mConentView); } private void updateView(View view) { mEmoticonsFuncView = ((EmoticonsFuncView) view.findViewById(R.id.view_epv)); mEmoticonsIndicatorView = (EmoticonsIndicatorView) view.findViewById(R.id.view_eiv); mEmoticonsToolBarView = (EmoticonsToolBarView) view.findViewById(R.id.view_etv); mEmoticonsFuncView.setOnIndicatorListener(this); mEmoticonsToolBarView.setOnToolBarItemClickListener(this); } public void setAdapter(PageSetAdapter pageSetAdapter) { if (pageSetAdapter != null) { ArrayList<PageSetEntity> pageSetEntities = pageSetAdapter.getPageSetEntityList(); if (pageSetEntities != null) { for (PageSetEntity pageSetEntity : pageSetEntities) { mEmoticonsToolBarView.addToolItemView(pageSetEntity); } } } mEmoticonsFuncView.setAdapter(pageSetAdapter); } public void showPopupWindow() { View rootView = EmoticonsKeyboardUtils.getRootView((Activity) mContext); if (this.isShowing()) { this.dismiss(); } else { EmoticonsKeyboardUtils.closeSoftKeyboard(mContext); this.showAtLocation(rootView, Gravity.BOTTOM, 0, 0); } } @Override public void emoticonSetChanged(PageSetEntity pageSetEntity) { mEmoticonsToolBarView.setToolBtnSelect(pageSetEntity.getUuid()); } @Override public void playTo(int position, PageSetEntity pageSetEntity) { mEmoticonsIndicatorView.playTo(position, pageSetEntity); } @Override public void playBy(int oldPosition, int newPosition, PageSetEntity pageSetEntity) { mEmoticonsIndicatorView.playBy(oldPosition, newPosition, pageSetEntity); } @Override public void onToolBarItemClick(PageSetEntity pageSetEntity) { mEmoticonsFuncView.setCurrentPageSet(pageSetEntity); } }
[ "1257999094@qq.com" ]
1257999094@qq.com
9961c863660ff052e639a30e021622f916760f8d
eb5af3e0f13a059749b179c988c4c2f5815feb0f
/springboot_k15/springboot_k15_portals/src/main/java/com/woniu/springboot/portals/entity/pojo/User.java
b05a5ace868549c189be849ac994248e8e981e06
[]
no_license
xiakai007/wokniuxcode
ae686753da5ec3dd607b0246ec45fb11cf6b8968
d9918fb349bc982f0ee9d3ea3bf7537e11d062a2
refs/heads/master
2023-04-13T02:54:15.675440
2021-05-02T05:09:47
2021-05-02T05:09:47
363,570,147
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.woniu.springboot.portals.entity.pojo; import lombok.Data; import java.sql.Timestamp; @Data public class User { private Integer id; private String account; private String password; private String email; private String telphone; private String avatar; private Timestamp regtime; private String status; }
[ "980385778@qq.com" ]
980385778@qq.com
164089f810a31f20c9a190dd223ebe678b587c74
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/j2objc/2016/12/CharacterLiteral.java
5285e6398a63bc30d623e68d40bfb1ab253f77b7
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,689
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.google.devtools.j2objc.ast; import com.google.devtools.j2objc.util.TypeUtil; import javax.lang.model.type.TypeMirror; /** * Node type for character literal values. */ public class CharacterLiteral extends Expression { private char charValue = '\0'; private final TypeMirror typeMirror; public CharacterLiteral(CharacterLiteral other) { super(other); charValue = other.charValue(); typeMirror = other.getTypeMirror(); } public CharacterLiteral(char charValue, TypeUtil typeUtil) { this(charValue, typeUtil.getChar()); } public CharacterLiteral(char charValue, TypeMirror typeMirror) { this.charValue = charValue; this.typeMirror = typeMirror; } @Override public Kind getKind() { return Kind.CHARACTER_LITERAL; } @Override public TypeMirror getTypeMirror() { return typeMirror; } public char charValue() { return charValue; } @Override protected void acceptInner(TreeVisitor visitor) { visitor.visit(this); visitor.endVisit(this); } @Override public CharacterLiteral copy() { return new CharacterLiteral(this); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
fba9993a77b9199fc3fc8005ab91cc927146fc34
e0ea15a96dfb33d673a3cd0c33f416c63252dd59
/goja/goja-jfinal/src/main/java/com/jfinal/plugin/activerecord/dialect/OracleDialect.java
78c3bdba4dbf13eb231ce44214bcef7fe42188e1
[]
no_license
jerryou/goja
a746e30d1239b055544b26d6bf08d2a0b350b751
ad59925f83e7fa3f7c7ac44ecf8f7192ff0e1786
refs/heads/master
2020-05-30T13:25:48.178437
2014-08-25T03:15:57
2014-08-25T03:15:57
23,374,918
1
0
null
null
null
null
UTF-8
Java
false
false
6,608
java
/** * Copyright (c) 2011-2014, James Zhan 詹波 (jfinal@126.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.jfinal.plugin.activerecord.dialect; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import com.jfinal.plugin.activerecord.Record; import com.jfinal.plugin.activerecord.Table; /** * OracleDialect. */ public class OracleDialect extends Dialect { public String forTableBuilderDoBuild(String tableName) { return "select * from " + tableName + " where rownum = 0"; } // insert into table (id,name) values(seq.nextval, ?) public void forModelSave(Table table, Map<String, Object> attrs, StringBuilder sql, List<Object> paras) { sql.append("insert into ").append(table.getName()).append("("); StringBuilder temp = new StringBuilder(") values("); String pKey = table.getPrimaryKey(); int count = 0; for (Entry<String, Object> e: attrs.entrySet()) { String colName = e.getKey(); if (table.hasColumnLabel(colName)) { if (count++ > 0) { sql.append(", "); temp.append(", "); } sql.append(colName); Object value = e.getValue(); if(value instanceof String && colName.equalsIgnoreCase(pKey) && ((String)value).endsWith(".nextval")) { temp.append(value); }else{ temp.append("?"); paras.add(value); } } } sql.append(temp.toString()).append(")"); } public String forModelDeleteById(Table table) { String pKey = table.getPrimaryKey(); StringBuilder sql = new StringBuilder(45); sql.append("delete from "); sql.append(table.getName()); sql.append(" where ").append(pKey).append(" = ?"); return sql.toString(); } public void forModelUpdate(Table table, Map<String, Object> attrs, Set<String> modifyFlag, String pKey, Object id, StringBuilder sql, List<Object> paras) { sql.append("update ").append(table.getName()).append(" set "); for (Entry<String, Object> e : attrs.entrySet()) { String colName = e.getKey(); if (!pKey.equalsIgnoreCase(colName) && modifyFlag.contains(colName) && table.hasColumnLabel(colName)) { if (paras.size() > 0) sql.append(", "); sql.append(colName).append(" = ? "); paras.add(e.getValue()); } } sql.append(" where ").append(pKey).append(" = ?"); paras.add(id); } public String forModelFindById(Table table, String columns) { StringBuilder sql = new StringBuilder("select "); if (columns.trim().equals("*")) { sql.append(columns); } else { String[] columnsArray = columns.split(","); for (int i=0; i<columnsArray.length; i++) { if (i > 0) sql.append(", "); sql.append(columnsArray[i].trim()); } } sql.append(" from "); sql.append(table.getName()); sql.append(" where ").append(table.getPrimaryKey()).append(" = ?"); return sql.toString(); } public String forDbFindById(String tableName, String primaryKey, String columns) { StringBuilder sql = new StringBuilder("select "); if (columns.trim().equals("*")) { sql.append(columns); } else { String[] columnsArray = columns.split(","); for (int i=0; i<columnsArray.length; i++) { if (i > 0) sql.append(", "); sql.append(columnsArray[i].trim()); } } sql.append(" from "); sql.append(tableName.trim()); sql.append(" where ").append(primaryKey).append(" = ?"); return sql.toString(); } public String forDbDeleteById(String tableName, String primaryKey) { StringBuilder sql = new StringBuilder("delete from "); sql.append(tableName.trim()); sql.append(" where ").append(primaryKey).append(" = ?"); return sql.toString(); } public void forDbSave(StringBuilder sql, List<Object> paras, String tableName, Record record) { sql.append("insert into "); sql.append(tableName.trim()).append("("); StringBuilder temp = new StringBuilder(); temp.append(") values("); int count = 0; for (Entry<String, Object> e: record.getColumns().entrySet()) { if (count++ > 0) { sql.append(", "); temp.append(", "); } sql.append(e.getKey()); Object value = e.getValue(); if(value instanceof String && (((String)value).endsWith(".nextval"))) { temp.append(value); }else{ temp.append("?"); paras.add(value); } } sql.append(temp.toString()).append(")"); } public void forDbUpdate(String tableName, String primaryKey, Object id, Record record, StringBuilder sql, List<Object> paras) { sql.append("update ").append(tableName.trim()).append(" set "); for (Entry<String, Object> e: record.getColumns().entrySet()) { String colName = e.getKey(); if (!primaryKey.equalsIgnoreCase(colName)) { if (paras.size() > 0) { sql.append(", "); } sql.append(colName).append(" = ? "); paras.add(e.getValue()); } } sql.append(" where ").append(primaryKey).append(" = ?"); paras.add(id); } public void forPaginate(StringBuilder sql, int pageNumber, int pageSize, String select, String sqlExceptSelect) { int satrt = (pageNumber - 1) * pageSize + 1; int end = pageNumber * pageSize; sql.append("select * from ( select row_.*, rownum rownum_ from ( "); sql.append(select).append(" ").append(sqlExceptSelect); sql.append(" ) row_ where rownum <= ").append(end).append(") table_alias"); sql.append(" where table_alias.rownum_ >= ").append(satrt); } public boolean isOracle() { return true; } public void fillStatement(PreparedStatement pst, List<Object> paras) throws SQLException { for (int i=0, size=paras.size(); i<size; i++) { Object value = paras.get(i); if (value instanceof java.sql.Date) pst.setDate(i + 1, (java.sql.Date)value); else pst.setObject(i + 1, value); } } public void fillStatement(PreparedStatement pst, Object... paras) throws SQLException { for (int i=0; i<paras.length; i++) { Object value = paras[i]; if (value instanceof java.sql.Date) pst.setDate(i + 1, (java.sql.Date)value); else pst.setObject(i + 1, value); } } public String getDefaultPrimaryKey() { return "ID"; } }
[ "poplar1123@gmail.com" ]
poplar1123@gmail.com
d77dd29b89caaa1c14ee47f473b41a248b0fbc10
a4110f29cc12c5e9ad3dc6d7d81cfe60b751398f
/src/com/Sts/IO/StsByteFile.java
b8569571eb8e87f4e1f4f34dc9658d3c03cefe4d
[]
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
3,417
java
package com.Sts.IO; /** * <p>Title: Workflow development</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2001</p> * <p>Company: 4D Systems LLC</p> * @author unascribed * @version 1.0 */ import com.Sts.UI.*; import com.Sts.Utilities.*; import javax.swing.*; import java.awt.*; import java.io.*; public class StsByteFile { StsAbstractFile file = null; String filename = null; InputStream is = null; OutputStream os = null; public StsByteFile() { } public StsByteFile(StsAbstractFile file) { this.file = file; filename = file.getFilename(); } public boolean openRead(Component parentComponent) { try { if(is != null) close(); if(parentComponent == null) is = file.getInputStream(); else is = file.getMonitoredInputStream(parentComponent); return true; } catch(Exception e) { StsException.outputException("StsByteFile.openReadAndCheck() failed." + "Can't read: " + file.getFilename(), e, StsException.WARNING); return false; } } public boolean openWrite() { try { if(os != null) close(); os = file.getOutputStream(true); // true: append write to end of file return true; } catch(Exception e) { StsException.outputException("StsByteFile.openWrite() failed." + "Can't write: " + filename, e, StsException.WARNING); return false; } } public boolean openReadWrite() { return openRead(null) && openWrite(); } /** close this binary file */ public boolean close() { try { if (os != null) { os.flush(); os.close(); os = null; } if (is != null) { is.close(); is = null; } return true; } catch (Exception e) { StsException.outputException("StsByteFile.close() failed." + "Unable to close file " + filename, e, StsException.WARNING); return false; } } public byte[] getBytes(int size) throws IOException { byte[] bytes = new byte[size]; is.read(bytes); return bytes; } // returns number of bytes read; returns -1 if EOF public int read(byte[] bytes) throws IOException { return is.read(bytes); } public long skip(int size) throws IOException { try { return is.skip(size); } catch(Exception e) { return 0; } } public byte[] getMonitoredBytes(int size, Frame frame) throws IOException { ProgressMonitorInputStream pmis; byte[] bytes = new byte[size]; pmis = new ProgressMonitorInputStream(frame, "Reading " + file.getPathname(), is); int nRead = pmis.read(bytes); if(nRead != size) { new StsMessage(frame, StsMessage.WARNING, "For file: " + file.getPathname() + ", only " + nRead + " bytes read. Expected to read " + size); return null; } return bytes; } public void write(byte[] bytes) throws IOException { os.write(bytes); } }
[ "t.lasseter@comcast.net" ]
t.lasseter@comcast.net
63d3f1b0ca9ce68e07eae727487e916c7a7afd38
b111b77f2729c030ce78096ea2273691b9b63749
/db-example-large-multi-project/project62/src/main/java/org/gradle/test/performance/mediumjavamultiproject/project62/p313/Production6266.java
dbf8310d4416a28559d2cc57891d63b9107429ba
[]
no_license
WeilerWebServices/Gradle
a1a55bdb0dd39240787adf9241289e52f593ccc1
6ab6192439f891256a10d9b60f3073cab110b2be
refs/heads/master
2023-01-19T16:48:09.415529
2020-11-28T13:28:40
2020-11-28T13:28:40
256,249,773
1
0
null
null
null
null
UTF-8
Java
false
false
1,896
java
package org.gradle.test.performance.mediumjavamultiproject.project62.p313; public class Production6266 { private String property0; public String getProperty0() { return property0; } public void setProperty0(String value) { property0 = value; } private String property1; public String getProperty1() { return property1; } public void setProperty1(String value) { property1 = value; } private String property2; public String getProperty2() { return property2; } public void setProperty2(String value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
d96d439c25acb5fc00411d98dcaa1849f4d424a6
3e519985adc42b000f3888b9ba00e59bfe6ccee9
/mall_third_site/src/test/java/com/junit/third/grandbrand/service/GrandBrandServiceTest.java
b49b34d0360291b805ff2734fc8319c85a31f411
[]
no_license
zhenchai/mall
8475077cf7a5fe5208510a3408502143667e9f17
c6fa070691bd62c53dbaa0b467bcb389bc66a373
refs/heads/master
2020-04-13T10:10:49.514859
2018-11-18T10:45:42
2018-11-18T10:45:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,122
java
package com.junit.third.grandbrand.service; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Test; import org.unitils.UnitilsJUnit3; import org.unitils.inject.annotation.InjectIntoByType; import org.unitils.inject.annotation.TestedObject; import org.unitils.mock.Mock; import com.ningpai.goods.bean.GoodsBrand; import com.ningpai.third.grandbrand.mapper.GrandBrandMapper; import com.ningpai.third.grandbrand.service.GrandBrandService; import com.ningpai.third.grandbrand.service.impl.GrandBrandServiceImpl; import com.ningpai.util.MapUtil; import com.ningpai.util.PageBean; /** * 品牌授权管理Service测试 * @author djk * */ public class GrandBrandServiceTest extends UnitilsJUnit3 { /** * 需要测试的Service */ @TestedObject private GrandBrandService grandBrandService = new GrandBrandServiceImpl(); /** * 模拟 */ @InjectIntoByType private Mock<GrandBrandMapper> grandBrandMapperMock; /** * 商品品牌类测试 */ private GoodsBrand goodsBrand = new GoodsBrand(); /** * 分页辅助类 */ private PageBean pageBean = new PageBean(); /** * 查询该品牌商品的数量测试 */ @Test public void testCheckGoodCount() { Map<String, Object> map = new HashMap<String, Object>(); map.put("brandId", 1L); map.put("thirdId", 1L); grandBrandMapperMock.returns(1).checkGoodCount(map); assertEquals(1, grandBrandService.checkGoodCount(1L, 1L)); } /** * 分页查询测试 */ @Test public void testQueryAllGoodsGrandBrand() { Map<String, Object> map = MapUtil.getParamsMap(goodsBrand); map.put("startRowNum", pageBean.getStartRowNum()); map.put("endRowNum", pageBean.getEndRowNum()); map.put("thirdId", 1L); map.put("rateStatus", "1"); map.put("forBrand", null); grandBrandMapperMock.returns(1).searchGrandBrandCount(map); List<Object> lists = new ArrayList<>(); lists.add(new Object()); grandBrandMapperMock.returns(lists).queryAllThirdGrandBrand(map); assertEquals(1, grandBrandService.queryAllGoodsGrandBrand(pageBean, goodsBrand, "1", 1L).getList().size()); } /** * 查询全部品牌测试 */ @Test public void testQueryAllGoodsGrandBrand2() { List<Object> lists = new ArrayList<>(); lists.add(new Object()); Map<String, Object> map = new HashMap<String, Object>(); map.put("thirdId", 1L); grandBrandMapperMock.returns(lists).queryAllByThirdGoodsBrand(map); assertEquals(1, grandBrandService.queryAllGoodsGrandBrand(1L).size()); } /** * 查询为加入的品牌测试 */ @Test public void testQueryForGoodsGrandBrand() { Map<String, Object> map = MapUtil.getParamsMap(goodsBrand); map.put("startRowNum", pageBean.getStartRowNum()); map.put("endRowNum", pageBean.getEndRowNum()); map.put("thirdId", 1L); map.put("rateStatus", null); map.put("forBrand", "a"); grandBrandMapperMock.returns(1).searchGrandBrandCount(map); List<Object> lists = new ArrayList<>(); lists.add(new Object()); grandBrandMapperMock.returns(lists).forQueryAllThirdGoodsBrand(map); assertEquals(1, grandBrandService.queryForGoodsGrandBrand(pageBean, goodsBrand, 1L, "a").getList().size()); } /** * 循环申请品牌 */ @Test public void testForTheGoodsBrand() { String [] brandId = {"1"}; grandBrandService.forTheGoodsBrand(brandId, 1L); } /** * 更改品牌标记为删除测试 */ @Test public void testUpdateGrandBrand() { grandBrandService.updateGrandBrand(goodsBrand); } /** * 批量修改品牌标记为删除测试 */ @Test public void testUpdateGrandBrands() { Long[] brandIds = {1L}; grandBrandService.updateGrandBrands(brandIds, 1L); } }
[ "wdpxl@sina.com" ]
wdpxl@sina.com
4bae8f067b015cc62c5fd86303945b03fdd73707
d3e47ffaf435eef07614120147deb204fe9e1acc
/src/Replit/encapsulation/en3/Subscribe.java
d9ffdffcfd9d80eb34f5d67f93fd22db964c8e78
[]
no_license
Aykurt24/aykurtsProjects
94d08fe13d23f403e95309937db043a69d44a6c0
130e6c0adf7e6d321df7bf415947829bd8fe82a3
refs/heads/master
2022-10-24T18:20:58.562719
2020-06-16T15:00:17
2020-06-16T15:00:17
263,530,839
0
0
null
null
null
null
UTF-8
Java
false
false
1,304
java
package Replit.encapsulation.en3; public class Subscribe { private String name, whichTypeOfMember; private int memberCount, price; public void setName(String name) { this.name = name; } public void setWhichTypeOfMember(String whichTypeOfMember) { if (whichTypeOfMember.equalsIgnoreCase("Gold")) { System.out.println("Welcome to membership " + name + ". Your membership is " + memberCount * 50 + " dollar for month you can enjoy the videos , all homework and see you soon."); } if (whichTypeOfMember.equalsIgnoreCase("Silver")) { System.out.println("Welcome to membership " + name + ". Your membership is " + memberCount * 40 + " dollar for month you can enjoy the videos."); } if (whichTypeOfMember.equalsIgnoreCase("Bronze")) { System.out.println("Welcome to membership " + name + ". Your membership is " + memberCount * 30 + " dollar for month you can enjoy and all homework."); } this.whichTypeOfMember = whichTypeOfMember; } public void setMemberCount(int memberCount) { this.memberCount = memberCount; } public int getPrice() { memberCount = price; return price; } public String toString() { return ""; } }
[ "doganaykurt@gmail.com" ]
doganaykurt@gmail.com
7a01280e8caa92c856fe85ce44097ab793c34dcd
383763c5c4cefdf8d7793f35c17fdc4ca6beda54
/src/test/java/com/redhat/resource/path/ResourceLocatorRegexCapturingGroupTest.java
13ae0fb7d4153484a5f851f7d06af5780a988677
[]
no_license
mmadzin/jaxrs-integration-tests
efd1942e3d60e0383be62d4803248c42e059b62c
8b32471c025d7db4c75a7aaf5361bd3d038f1a7e
refs/heads/master
2021-11-23T14:59:40.626771
2021-10-27T08:53:18
2021-10-27T08:53:18
134,562,661
0
2
null
2019-11-14T11:13:30
2018-05-23T11:56:41
Java
UTF-8
Java
false
false
4,615
java
package com.redhat.resource.path; import com.redhat.resource.path.resource.ResourceLocatorRegexCapturingGroup; import com.redhat.resource.path.resource.ResourceLocatorRegexCapturingGroupSubResourceNoPath; import com.redhat.resource.path.resource.ResourceLocatorRegexCapturingGroupSubResourceWithPath; import com.redhat.utils.PortProviderUtil; import com.redhat.utils.TestApplication; import com.redhat.utils.TestUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.core.Response; /** * @tpSubChapter Resources * @tpChapter Integration tests * @tpTestCaseDetails @Path annotation paths can consist of Regex Capturing groups used with * Resource Locator scenarios. * @tpSince RESTEasy 3.0.22 * * User: rsearls * Date: 2/17/17 */ @RunWith(Arquillian.class) @RunAsClient public class ResourceLocatorRegexCapturingGroupTest { private static final String ERROR_MSG = "Response contain wrong content"; static Client client; @BeforeClass public static void setup() throws Exception { client = ClientBuilder.newClient(); } @Deployment public static Archive<?> deploy() { WebArchive war = TestUtil.prepareArchive(ResourceLocatorRegexCapturingGroupTest.class.getSimpleName()); war.addClasses(ResourceLocatorRegexCapturingGroupSubResourceNoPath.class, ResourceLocatorRegexCapturingGroupSubResourceWithPath.class); war.addClass(TestApplication.class); return TestUtil.finishContainerPrepare(war, null, ResourceLocatorRegexCapturingGroup.class); } private String generateURL(String path) { return PortProviderUtil.generateURL(path, ResourceLocatorRegexCapturingGroupTest.class.getSimpleName()); } @AfterClass public static void close() throws Exception { client.close(); } @AfterClass public static void after() throws Exception { } /** * @tpTestDetails Test for root resource and for subresource. * @tpSince RESTEasy 3.0.16 */ @Test public void testBasic() throws Exception { { Response response = client.target(generateURL("/capture/basic")).request().get(); Assert.assertEquals(HttpServletResponse.SC_OK, response.getStatus()); Assert.assertEquals(ERROR_MSG, "basic success", response.readEntity(String.class)); response.close(); } { Response response = client.target(generateURL("/capture/BASIC/test")).request().get(); Assert.assertEquals(HttpServletResponse.SC_OK, response.getStatus()); Assert.assertEquals(ERROR_MSG, "BASIC test", response.readEntity(String.class)); response.close(); } } @Test public void testBird() throws Exception { { Response response = client.target(generateURL("/capture/nobird")).request().get(); Assert.assertEquals(HttpServletResponse.SC_OK, response.getStatus()); Assert.assertEquals(ERROR_MSG, "nobird success", response.readEntity(String.class)); response.close(); } { Response response = client.target(generateURL("/capture/BIRD/test")).request().get(); Assert.assertEquals(HttpServletResponse.SC_OK, response.getStatus()); Assert.assertEquals(ERROR_MSG, "BIRD test", response.readEntity(String.class)); response.close(); } } @Test public void testFly() throws Exception { { Response response = client.target(generateURL("/capture/a/nofly/b")).request().get(); Assert.assertEquals(HttpServletResponse.SC_OK, response.getStatus()); Assert.assertEquals(ERROR_MSG, "a/nofly/b success", response.readEntity(String.class)); response.close(); } { Response response = client.target(generateURL("/capture/a/FLY/b/test")).request().get(); Assert.assertEquals(HttpServletResponse.SC_OK, response.getStatus()); Assert.assertEquals(ERROR_MSG, "a/FLY/b test", response.readEntity(String.class)); response.close(); } } }
[ "IP0405cns" ]
IP0405cns
7972d1a2e5e66f4224358a4e26051425d8a070df
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/30100/tar_1.java
12d49ac6a8fda70d73391b0d21da56b9e8259e47
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,951
java
package org.eclipse.jdt.internal.compiler.util; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.util.Enumeration; import org.eclipse.jdt.internal.compiler.*; /** * Set of Objects */ public final class ObjectSet implements Cloneable { private Object[] elementTable; private int elementSize; // number of elements in the table private int threshold; public ObjectSet() { this(13); } public ObjectSet(int size) { this.elementSize = 0; this.threshold = size; // size represents the expected number of elements int extraRoom = (int) (size * 1.75f); if (this.threshold == extraRoom) extraRoom++; this.elementTable = new Object[extraRoom]; } public Object clone() throws CloneNotSupportedException { ObjectSet set = (ObjectSet)super.clone(); set.elementSize = this.elementSize; set.threshold = this.threshold; int length = this.elementTable.length; set.elementTable = new Object[length]; System.arraycopy(this.elementTable, 0, set.elementTable, 0, length); return set; } public boolean contains(Object element) { int length = elementTable.length; int index = (element.hashCode() & 0x7FFFFFFF) % length; Object currentElement; while ((currentElement = elementTable[index]) != null) { if (currentElement.equals(element)) return true; index = (index + 1) % length; } return false; } public boolean add(Object element) { int length = this.elementTable.length; int index = (element.hashCode() & 0x7FFFFFFF) % length; Object currentElement; while ((currentElement = this.elementTable[index]) != null) { if (currentElement.equals(element)) return false; index = (index + 1) % length; } this.elementTable[index] = element; // assumes the threshold is never equal to the size of the table if (++elementSize > threshold) rehash(); return true; } public void addAll(Object[] elements) { for (int i = 0, length = elements.length; i < length; i++){ add(elements[i]); } } public void addAll(ObjectSet set) { for (int i = 0, length = set.elementTable.length; i < length; i++){ Object item = set.elementTable[i]; if (item != null) add(item); } } public void copyInto(Object[] targetArray){ int index = 0; for (int i = 0, length = this.elementTable.length; i < length; i++){ if (elementTable[i] != null){ targetArray[index++] = this.elementTable[i]; } } } public Enumeration elements(){ return new Enumeration(){ int index = 0; int count = 0; public boolean hasMoreElements(){ return this.count < ObjectSet.this.elementSize; } public Object nextElement(){ while (this.index < ObjectSet.this.elementTable.length){ Object current = ObjectSet.this.elementTable[this.index++]; if (current != null){ count++; return current; } } return null; } }; } public boolean isEmpty(){ return this.elementSize == 0; } public boolean remove(Object element) { int hash = element.hashCode(); int length = this.elementTable.length; int index = (hash & 0x7FFFFFFF) % length; Object currentElement; while ((currentElement = elementTable[index]) != null) { if (currentElement.equals(element)){ this.elementTable[index] = null; this.elementSize--; this.rehash(); return true; } index = (index + 1) % length; } return false; } public void removeAll() { for (int i = this.elementTable.length; --i >= 0;) this.elementTable[i] = null; this.elementSize = 0; } private void rehash() { ObjectSet newSet = new ObjectSet(elementSize * 2); // double the number of expected elements Object currentElement; for (int i = elementTable.length; --i >= 0;) if ((currentElement = elementTable[i]) != null) newSet.add(currentElement); this.elementTable = newSet.elementTable; this.threshold = newSet.threshold; } public int size() { return this.elementSize; } public String toString() { String s = "["; //$NON-NLS-1$ Object object; int count = 0; for (int i = 0, length = elementTable.length; i < length; i++) if ((object = elementTable[i]) != null){ if (count++ > 0) s += ", "; //$NON-NLS-1$ s += elementTable[i]; } return s + "]";//$NON-NLS-1$ } public String toDebugString() { String s = "#[\n"; //$NON-NLS-1$ Object object; int count = 0; for (int i = 0, length = elementTable.length; i < length; i++){ s += "\t"+i+"\t";//$NON-NLS-1$//$NON-NLS-2$ object = elementTable[i]; if (object == null){ s+= "-\n";//$NON-NLS-1$ } else { s+= object.toString()+ "\t#"+object.hashCode() +"(%" + (object.hashCode() % elementTable.length)+"\n";//$NON-NLS-1$//$NON-NLS-2$ } } return s + "]";//$NON-NLS-1$ } }
[ "375833274@qq.com" ]
375833274@qq.com
5875d1aa6c032cbc4c85462a34c7565b3d4d8e09
d6bf86106b256bb8adec39955f261bffd4f87e86
/src/main/java/com/common/model/ClickButton.java
d4ccf40fb3676522650d82d96f6739b350bbc79d
[]
no_license
gaohe1227/weixindemo
06ab19d206ba5af01c45b2044cf7d2970e13a451
ef83d57d9e513683994c5272cb44fc448143779d
refs/heads/master
2021-01-20T20:03:37.784249
2016-06-09T09:47:02
2016-06-09T09:47:02
60,400,087
0
0
null
null
null
null
UTF-8
Java
false
false
336
java
package com.common.model; /** * * @author 高鹤 * * 2016年6月5日 * * 作用:click类型菜单 */ public class ClickButton extends Button{ private String key;// 菜单KEY值,用于消息接口推送,不超过128字节 public String getKey() { return key; } public void setKey(String key) { this.key = key; } }
[ "904724283@qq.com" ]
904724283@qq.com
aeaa06827ff188c732ed05590e28a311620a0fe6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/35/35_69d3e7072524ebdd4814435c8f2ce30451b7f8c3/LaunchTerminalCommandHandler/35_69d3e7072524ebdd4814435c8f2ce30451b7f8c3_LaunchTerminalCommandHandler_s.java
9a89496547152460f9f5a77e3a62242781e16477
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,760
java
/******************************************************************************* * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Wind River Systems - initial API and implementation *******************************************************************************/ package org.eclipse.tcf.te.ui.terminals.internal.handler; import java.text.DateFormat; import java.util.Date; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.Assert; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Shell; import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; import org.eclipse.tcf.te.runtime.properties.PropertiesContainer; import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants; import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin; import org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate; import org.eclipse.tcf.te.ui.terminals.interfaces.tracing.ITraceIds; import org.eclipse.tcf.te.ui.terminals.internal.dialogs.LaunchTerminalSettingsDialog; import org.eclipse.tcf.te.ui.terminals.launcher.LauncherDelegateManager; import org.eclipse.ui.handlers.HandlerUtil; /** * Launch terminal command handler implementation. */ public class LaunchTerminalCommandHandler extends AbstractHandler { /* * (non-Javadoc) * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) */ @Override public Object execute(ExecutionEvent event) throws ExecutionException { String commandId = event.getCommand().getId(); // "org.eclipse.tcf.te.ui.terminals.command.launchToolbar" // "org.eclipse.tcf.te.ui.terminals.command.launch" long start = System.currentTimeMillis(); if (UIPlugin.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER)) { DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); String date = format.format(new Date(start)); UIPlugin.getTraceHandler().trace("Started at " + date + " (" + start + ")", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER, LaunchTerminalCommandHandler.this); } // Get the active shell Shell shell = HandlerUtil.getActiveShell(event); // Get the current selection ISelection selection = HandlerUtil.getCurrentSelection(event); if (commandId.equals("org.eclipse.tcf.te.ui.terminals.command.launchToolbar")) { //$NON-NLS-1$ if (UIPlugin.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER)) { UIPlugin.getTraceHandler().trace("(a) Attempt to open launch terminal settings dialog after " + (System.currentTimeMillis() - start) + " ms.", //$NON-NLS-1$ //$NON-NLS-2$ ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER, LaunchTerminalCommandHandler.this); } LaunchTerminalSettingsDialog dialog = new LaunchTerminalSettingsDialog(shell, start); dialog.setSelection(selection); if (dialog.open() == Window.OK) { // Get the terminal settings from the dialog IPropertiesContainer properties = dialog.getSettings(); if (properties != null) { String delegateId = properties.getStringProperty(ITerminalsConnectorConstants.PROP_DELEGATE_ID); Assert.isNotNull(delegateId); ILauncherDelegate delegate = LauncherDelegateManager.getInstance().getLauncherDelegate(delegateId, false); Assert.isNotNull(delegateId); delegate.execute(properties, null); } } } else { if (UIPlugin.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER)) { UIPlugin.getTraceHandler().trace("Getting applicable launcher delegates after " + (System.currentTimeMillis() - start) + " ms.", //$NON-NLS-1$ //$NON-NLS-2$ ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER, LaunchTerminalCommandHandler.this); } // Check if the dialog needs to be shown at all ILauncherDelegate[] delegates = LauncherDelegateManager.getInstance().getApplicableLauncherDelegates(selection); if (UIPlugin.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER)) { UIPlugin.getTraceHandler().trace("Got applicable launcher delegates after " + (System.currentTimeMillis() - start) + " ms.", //$NON-NLS-1$ //$NON-NLS-2$ ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER, LaunchTerminalCommandHandler.this); } if (delegates.length > 1 || (delegates.length == 1 && delegates[0].needsUserConfiguration())) { if (UIPlugin.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER)) { UIPlugin.getTraceHandler().trace("(b) Attempt to open launch terminal settings dialog after " + (System.currentTimeMillis() - start) + " ms.", //$NON-NLS-1$ //$NON-NLS-2$ ITraceIds.TRACE_LAUNCH_TERMINAL_COMMAND_HANDLER, LaunchTerminalCommandHandler.this); } // Create the launch terminal settings dialog LaunchTerminalSettingsDialog dialog = new LaunchTerminalSettingsDialog(shell, start); dialog.setSelection(selection); if (dialog.open() == Window.OK) { // Get the terminal settings from the dialog IPropertiesContainer properties = dialog.getSettings(); if (properties != null) { String delegateId = properties.getStringProperty(ITerminalsConnectorConstants.PROP_DELEGATE_ID); Assert.isNotNull(delegateId); ILauncherDelegate delegate = LauncherDelegateManager.getInstance().getLauncherDelegate(delegateId, false); Assert.isNotNull(delegateId); delegate.execute(properties, null); } } } else if (delegates.length == 1) { ILauncherDelegate delegate = delegates[0]; IPropertiesContainer properties = new PropertiesContainer(); // Store the id of the selected delegate properties.setProperty(ITerminalsConnectorConstants.PROP_DELEGATE_ID, delegate.getId()); // Store the selection properties.setProperty(ITerminalsConnectorConstants.PROP_SELECTION, selection); // Execute delegate.execute(properties, null); } } return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f9826bc13af16e86d0e6ac380ce35afa17766388
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/core/java/android/view/HandlerActionQueue.java
c87d26fbb90373a4f224b31dccc50fadf385b28f
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,783
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view; import android.os.Handler; import com.android.internal.util.GrowingArrayUtils; /** * Class used to enqueue pending work from Views when no Handler is attached. * * @hide Exposed for test framework only. */ public class HandlerActionQueue { private HandlerAction[] mActions; private int mCount; public void post(Runnable action) { postDelayed(action, 0); } public void postDelayed(Runnable action, long delayMillis) { final HandlerAction handlerAction = new HandlerAction(action, delayMillis); synchronized (this) { if (mActions == null) { mActions = new HandlerAction[4]; } mActions = GrowingArrayUtils.append(mActions, mCount, handlerAction); mCount++; } } public void removeCallbacks(Runnable action) { synchronized (this) { final int count = mCount; int j = 0; final HandlerAction[] actions = mActions; for (int i = 0; i < count; i++) { if (actions[i].matches(action)) { // Remove this action by overwriting it within // this loop or nulling it out later. continue; } if (j != i) { // At least one previous entry was removed, so // this one needs to move to the "new" list. actions[j] = actions[i]; } j++; } // The "new" list only has j entries. mCount = j; // Null out any remaining entries. for (; j < count; j++) { actions[j] = null; } } } public void executeActions(Handler handler) { synchronized (this) { final HandlerAction[] actions = mActions; for (int i = 0, count = mCount; i < count; i++) { final HandlerAction handlerAction = actions[i]; handler.postDelayed(handlerAction.action, handlerAction.delay); } mActions = null; mCount = 0; } } public int size() { return mCount; } public Runnable getRunnable(int index) { if (index >= mCount) { throw new IndexOutOfBoundsException(); } return mActions[index].action; } public long getDelay(int index) { if (index >= mCount) { throw new IndexOutOfBoundsException(); } return mActions[index].delay; } private static class HandlerAction { final Runnable action; final long delay; public HandlerAction(Runnable action, long delay) { this.action = action; this.delay = delay; } public boolean matches(Runnable otherAction) { return otherAction == null && action == null || action != null && action.equals(otherAction); } } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
79b665d6b3c71ed1e9d7bba831cf3454df33ab16
0deffdd02bc1a330a7f06d5366ba693b2fd10e61
/JsonParsing/src/com/schneider/solr/config/ContextListenerConfig.java
47cf2d09c49a183122ac45cb3644353d54ef695b
[]
no_license
deevanshu07/Projects
77adb903575de9563a324a294c04c88e50dfffeb
6c49672b3b1eda8b16327b56114560140b087e38
refs/heads/master
2021-04-27T21:52:13.560590
2018-04-26T15:35:21
2018-04-26T15:35:21
122,406,211
0
0
null
null
null
null
UTF-8
Java
false
false
1,009
java
package com.schneider.solr.config; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import org.apache.log4j.PropertyConfigurator; import com.schneider.solr.resourcesLoader.LoadResource; public class ContextListenerConfig implements ServletContextListener { @Override public void contextDestroyed(ServletContextEvent servletContext) { } @Override public void contextInitialized(ServletContextEvent servletContext) { try{ String ResourcePath = servletContext.getServletContext().getInitParameter("ResourcePath"); LoadResource.loadProperites(ResourcePath); System.out.println("Intialize properties"); final String path = LoadResource.logPropertiesUrl; //for invfoxapp210pv (Production) or invfoxapp213sv (Stage) System.out.println(LoadResource.jsonResponseFields); System.out.println(LoadResource.jsonHighlightFields); PropertyConfigurator.configure(path); }catch(Exception e){ e.printStackTrace(); } } }
[ "deevanshumahajan07@gmail.com" ]
deevanshumahajan07@gmail.com
fab3e3faab3f2275aa341d5a2855e1a40f662d3b
b9055efc302828edba0757fb9e15a230e2a2dab0
/Bot/src/java/main/org/cen/ui/web/VideoRecorderView.java
d7855643feb006f625b7fc5f550083b8fcaceab8
[]
no_license
svanacker/cen-info-web
d812af11a9b809e899d105302ee0efe802b83466
bb187aef18d9b99acf09c0e9670ea2fbbc1fb906
refs/heads/master
2016-09-06T23:14:53.730247
2014-05-10T22:56:46
2014-05-10T22:56:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,923
java
package org.cen.ui.web; import java.io.File; import java.text.SimpleDateFormat; import java.util.Calendar; import org.cen.robot.services.IRobotServiceProvider; import org.cen.ui.rtp.VideoRecorder; public class VideoRecorderView { private IRobotServiceProvider provider; private String status; private String destination; public VideoRecorderView() { super(); destination = getNewDestination(); } private String getNewDestination() { SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd-HHmmss"); return System.getProperty("user.home") + File.separator + "robot-" + format.format(Calendar.getInstance().getTime()) + ".mpeg"; } public void execute() { VideoRecorder recorder = provider.getService(VideoRecorder.class); if (recorder == null) { status = "video recorder service NOT present"; return; } try { if (recorder.isRecording()) { recorder.stop(); status = "stopped"; destination = getNewDestination(); } else { recorder.setDestination("file://" + destination); recorder.start(); status = "recording"; } } catch (Exception e) { status = e.toString(); e.printStackTrace(); } } public String getDestination() { return destination; } public String getStatus() { return status; } public String getText() { return isRecording() ? "Stop" : "Start"; } private boolean isRecording() { VideoRecorder recorder = provider.getService(VideoRecorder.class); return (recorder == null) ? false : recorder.isRecording(); } public void setDestination(String destination) { this.destination = destination; } public void setServicesProvider(IRobotServiceProvider provider) { this.provider = provider; VideoRecorder recorder = provider.getService(VideoRecorder.class); if (recorder == null) { status = "video recorder service NOT present"; return; } else { status = "video recorder service present"; } } }
[ "svanacker@gmail.com" ]
svanacker@gmail.com
9ca62581c578e43c32b78b1470c0f0b9bd99533b
7b99a17947eef936b018efc452e3db1d8a3fdc41
/1907-java/src/e_class/StaticExam.java
300e4faa16d313e2fe0f0d705a1d3f886008c57e
[]
no_license
choi-hakgeun/1907-java
ff9ac3c91d815d7ef1922eb9a4b648b3fd848e1b
dc7fcd736c3a624735e4235ce97dafd293320886
refs/heads/master
2022-04-10T06:36:36.777594
2020-03-13T08:15:39
2020-03-13T08:15:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package e_class; public class StaticExam { public static void main(String[] args) { Account2 p = new Account2(); p.prn(); p.withdraw(500);; Account2 m = new Account2(); m.prn(); m.withdraw(1000); p.prn(); Account2 c1 = new Account2(); c1.prn(); c1.deposit(5000); p.prn(); } }
[ "JHTA@JHTA-PC" ]
JHTA@JHTA-PC
cef063bd8efb7db343ed786f294a4d4051fcd2d1
52a61700be74ae1a5fd1a7b4d2bdfe632015ecb8
/src/test/java/org/sarge/jove/platform/desktop/WindowTest.java
476ac441d9f7ad7c5fa3cbeb9b77e473246a1a32
[]
no_license
stridecolossus/JOVE
60c248a09171827b049b599e8006a7e558f8b3ba
690f01a8a4464c967781c3d7a53a8866be00793b
refs/heads/master
2023-07-20T07:40:09.165408
2023-07-08T16:21:22
2023-07-08T16:21:22
17,083,829
1
0
null
2014-03-23T18:00:38
2014-02-22T11:51:16
Java
UTF-8
Java
false
false
5,343
java
package org.sarge.jove.platform.desktop; import static org.junit.Assert.assertNotNull; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; import java.util.*; import java.util.function.IntBinaryOperator; import org.junit.jupiter.api.*; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; import org.mockito.ArgumentCaptor; import org.sarge.jove.common.*; import org.sarge.jove.control.WindowListener; import org.sarge.jove.platform.desktop.DesktopLibraryWindow.*; import org.sarge.jove.util.*; import com.sun.jna.Pointer; class WindowTest { private Window window; private DesktopLibrary lib; private Desktop desktop; private ReferenceFactory factory; @BeforeEach void before() { lib = mock(DesktopLibrary.class); factory = new MockReferenceFactory(); desktop = new Desktop(lib, factory); window = new Window(new Handle(1), desktop); } @Test void constructor() { assertEquals(new Handle(1), window.handle()); assertEquals(desktop, window.desktop()); } @Test void devices() { assertNotNull(window.keyboard()); assertNotNull(window.mouse()); } @DisplayName("A window cannot be created if the native library returns a NULL window pointer") @Test void failed() { final var builder = new Window.Builder(); builder.title("title"); builder.size(new Dimensions(1, 2)); assertThrows(RuntimeException.class, () -> builder.build(desktop)); } @DisplayName("A window can be resized") @Test void resize() { window.size(new Dimensions(2, 3)); verify(lib).glfwSetWindowSize(window, 2, 3); } @DisplayName("The window title can be reset") @Test void title() { window.title("title"); verify(lib).glfwSetWindowTitle(window, "title"); } @DisplayName("A non-fullscreen window does not have a monitor") @Test void monitor() { assertEquals(Optional.empty(), window.monitor()); } @Nested class FullScreenTests { private Monitor monitor; @BeforeEach void before() { monitor = new Monitor(new Handle(4), "name", new Dimensions(2, 3), List.of()); } @DisplayName("A fullscreen window has a monitor") @Test void monitor() { when(lib.glfwGetWindowMonitor(window)).thenReturn(monitor); assertEquals(Optional.of(monitor), window.monitor()); } @DisplayName("A window can be made fullscreen") @Test void full() { // TODO - implement // TOOD - separate tests into windowed and full-screen? } } @Nested class ListenerTests { @ParameterizedTest @EnumSource(WindowListener.Type.class) void listener(WindowListener.Type type) { // Register state-change listener final WindowListener listener = mock(WindowListener.class); window.listener(type, listener); // Check API final var captor = ArgumentCaptor.forClass(WindowStateListener.class); switch(type) { case ENTER -> verify(lib).glfwSetCursorEnterCallback(eq(window), captor.capture()); case FOCUS -> verify(lib).glfwSetWindowFocusCallback(eq(window), captor.capture()); case ICONIFIED -> verify(lib).glfwSetWindowIconifyCallback(eq(window), captor.capture()); case CLOSED -> verify(lib).glfwSetWindowCloseCallback(eq(window), captor.capture()); } // Check listener final WindowStateListener adapter = captor.getValue(); adapter.state(null, 1); verify(listener).state(type, true); } @Test void resize() { // Register resize listener final var listener = mock(IntBinaryOperator.class); window.resize(listener); // Check API final var captor = ArgumentCaptor.forClass(WindowResizeListener.class); verify(lib).glfwSetWindowSizeCallback(eq(window), captor.capture()); // Check listener final WindowResizeListener adapter = captor.getValue(); adapter.resize(null, 1, 2); verify(listener).applyAsInt(1, 2); } @Test void remove() { final var type = WindowListener.Type.ENTER; window.listener(type, null); verify(lib).glfwSetCursorEnterCallback(window, null); } } @Test void surface() { final Handle instance = new Handle(3); assertNotNull(window.surface(instance)); verify(lib).glfwCreateWindowSurface(instance, window, null, factory.pointer()); } @Test void surfaceFailed() { final Handle instance = new Handle(3); when(lib.glfwCreateWindowSurface(instance, window, null, factory.pointer())).thenReturn(999); assertThrows(RuntimeException.class, () -> window.surface(instance)); } @Test void destroy() { window.destroy(); verify(lib).glfwDestroyWindow(window); } @Nested class BuilderTests { private Window.Builder builder; @BeforeEach void before() { builder = new Window.Builder(); } @Test void build() { // Init API final Pointer ptr = new Pointer(1); when(lib.glfwCreateWindow(640, 480, "title", null, null)).thenReturn(ptr); // Construct a window without decorations window = builder .title("title") .size(new Dimensions(640, 480)) .hint(Window.Hint.DECORATED, false) .build(desktop); // Check window assertEquals(new Handle(ptr), window.handle()); assertEquals(false, window.isDestroyed()); verify(lib).glfwWindowHint(0x00020005, 0); } } }
[ "chris.sarge@gmail.com" ]
chris.sarge@gmail.com
b91a0d18995ec4313c695f027f7f62578b24d780
4c50f39f7412125204d2514693dcfb08162d656e
/src/de/epml/TypeAND.java
c3df4ff91370d7309626ac6d0a55f7e748883ebc
[]
no_license
alex-fedorov-012088/SMD
7e956d92701835bbac3f584a2dea05690c201a94
9b2a025b9124639d8262331487ee136d56b9b93b
refs/heads/master
2023-03-15T19:15:15.273499
2015-03-30T01:31:44
2015-03-30T01:31:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,136
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2009.09.15 at 04:54:36 PM EST // package de.epml; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for typeAND complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="typeAND"> * &lt;complexContent> * &lt;extension base="{http://www.epml.de}tEpcElement"> * &lt;sequence> * &lt;choice minOccurs="0"> * &lt;element name="configurableConnector" type="{http://www.epml.de}typeCAnd"/> * &lt;/choice> * &lt;choice maxOccurs="unbounded" minOccurs="0"> * &lt;element name="attribute" type="{http://www.epml.de}typeAttribute"/> * &lt;/choice> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlRootElement(name = "and") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "typeAND", propOrder = { "configurableConnector", "attribute" }) public class TypeAND extends TEpcElement { protected TypeCAnd configurableConnector; protected List<TypeAttribute> attribute; /** * Gets the value of the configurableConnector property. * * @return * possible object is * {@link TypeCAnd } * */ public TypeCAnd getConfigurableConnector() { return configurableConnector; } /** * Sets the value of the configurableConnector property. * * @param value * allowed object is * {@link TypeCAnd } * */ public void setConfigurableConnector(TypeCAnd value) { this.configurableConnector = value; } /** * Gets the value of the attribute property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the attribute property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAttribute().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link TypeAttribute } * * */ public List<TypeAttribute> getAttribute() { if (attribute == null) { attribute = new ArrayList<TypeAttribute>(); } return this.attribute; } }
[ "apromore@gmail.com" ]
apromore@gmail.com
69ed1be3e65c7dccf4e8328ac42194b73a365d5b
f7e662dc305585d67b46b68048a76675b7241bc4
/src/main/java/com/hrban/bean/ZhRentContractRefund.java
a1bb875fcc5225a6db89d78875de8ee9f287733e
[]
no_license
hrban/family_service_platform
033a62abc60f8a3c05213123384751c350724466
631a9e503733fdeaafa5ee2f588db2f242500da5
refs/heads/master
2022-12-06T11:01:57.969453
2020-08-21T06:52:26
2020-08-21T06:52:26
288,347,622
1
1
null
null
null
null
UTF-8
Java
false
false
4,940
java
package com.hrban.bean; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import java.time.LocalDateTime; import java.io.Serializable; /** * <p> * 租赁合同退款 * </p> * * @author hrban * @since 2020-08-18 */ public class ZhRentContractRefund implements Serializable { private static final long serialVersionUID=1L; /** * 自动编号 */ @TableId(value = "id", type = IdType.AUTO) private Integer id; /** * 所属合同编号 */ private Integer contractId; /** * 所属租户id */ private Integer rentId; /** * 租户名称 */ private String rentName; /** * 退款日期 */ private LocalDateTime refundTime; /** * 退款金额 */ private Double refundMoney; /** * 退款状态 */ private String refundStatus; /** * 退款说明 */ private String refundDesc; /** * 操作人id */ private String operateId; /** * 操作人名称 */ private String operatePerson; /** * 操作时间 */ private LocalDateTime operateDate; /** * 作废人id */ private String invalidId; /** * 作废人名称 */ private String invalidPerson; /** * 作废原因 */ private LocalDateTime invalidReason; /** * 作废时间 */ private String invalidDate; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getContractId() { return contractId; } public void setContractId(Integer contractId) { this.contractId = contractId; } public Integer getRentId() { return rentId; } public void setRentId(Integer rentId) { this.rentId = rentId; } public String getRentName() { return rentName; } public void setRentName(String rentName) { this.rentName = rentName; } public LocalDateTime getRefundTime() { return refundTime; } public void setRefundTime(LocalDateTime refundTime) { this.refundTime = refundTime; } public Double getRefundMoney() { return refundMoney; } public void setRefundMoney(Double refundMoney) { this.refundMoney = refundMoney; } public String getRefundStatus() { return refundStatus; } public void setRefundStatus(String refundStatus) { this.refundStatus = refundStatus; } public String getRefundDesc() { return refundDesc; } public void setRefundDesc(String refundDesc) { this.refundDesc = refundDesc; } public String getOperateId() { return operateId; } public void setOperateId(String operateId) { this.operateId = operateId; } public String getOperatePerson() { return operatePerson; } public void setOperatePerson(String operatePerson) { this.operatePerson = operatePerson; } public LocalDateTime getOperateDate() { return operateDate; } public void setOperateDate(LocalDateTime operateDate) { this.operateDate = operateDate; } public String getInvalidId() { return invalidId; } public void setInvalidId(String invalidId) { this.invalidId = invalidId; } public String getInvalidPerson() { return invalidPerson; } public void setInvalidPerson(String invalidPerson) { this.invalidPerson = invalidPerson; } public LocalDateTime getInvalidReason() { return invalidReason; } public void setInvalidReason(LocalDateTime invalidReason) { this.invalidReason = invalidReason; } public String getInvalidDate() { return invalidDate; } public void setInvalidDate(String invalidDate) { this.invalidDate = invalidDate; } @Override public String toString() { return "ZhRentContractRefund{" + "id=" + id + ", contractId=" + contractId + ", rentId=" + rentId + ", rentName=" + rentName + ", refundTime=" + refundTime + ", refundMoney=" + refundMoney + ", refundStatus=" + refundStatus + ", refundDesc=" + refundDesc + ", operateId=" + operateId + ", operatePerson=" + operatePerson + ", operateDate=" + operateDate + ", invalidId=" + invalidId + ", invalidPerson=" + invalidPerson + ", invalidReason=" + invalidReason + ", invalidDate=" + invalidDate + "}"; } }
[ "farmar_farmer@126.com" ]
farmar_farmer@126.com
cdacc71e4fafa4ad33c950e43093f81166f6cef7
79f1f68a64c4ce4154e59f43dcc9197fdefa4a53
/GUI/GUI.java
644d03fb2f3d7033322c11a551d315d5c54a4702
[]
no_license
wonjohnchoi/elephant-hunt
40652e8a3b5c7f2d33b2259a3267da99e3749f52
7ca12183db5a26269e93321872415865b47423b3
refs/heads/master
2021-01-17T14:16:58.594190
2011-12-26T07:55:10
2011-12-26T07:55:10
3,050,765
0
0
null
null
null
null
UTF-8
Java
false
false
5,143
java
import java.awt.BorderLayout; import java.awt.Color; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.border.LineBorder; public class GUI extends JFrame implements ActionListener{ /** * */ private static final long serialVersionUID = -16783961817955017L; protected JTextArea log; //log screen protected JScrollPane logScrollBar; protected JTextArea playerInfo[]; //player information screen protected Player players[]; //objects of players //TOP BAR protected JButton startButton; protected JLabel currentPlayerName; public GUI() { //title super("Elefant Hunt designed by Tom Wham and computerized by Wonjohn Choi"); //layout setLayout(new BorderLayout()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // exit program when you close it setResizable(false); } /** * manage the top bar */ public void initTopBar(){ setVisible(false); //NORTH part controlled by a panel JPanel panel = new JPanel(new FlowLayout()); currentPlayerName = new JLabel("Current Player: "+players[0].getName()); startButton = new JButton("Start Turn"); startButton.addActionListener(this); panel.add(currentPlayerName); panel.add(startButton); add(panel, BorderLayout.NORTH); pack(); setVisible(true); } protected boolean startTurn; /** * action to be done for a new turn * @param player */ public void changeTurn(Player player){ //change label and reset button for start currentPlayerName.setText("Current Player: "+player.getName()); startButton.setEnabled(true); startTurn = false; while(!startTurn){ } } /** * when action happens... (by mouse) */ public void actionPerformed(ActionEvent e) { if(startButton == e.getSource()){ startTurn = true; startButton.setEnabled(false); } } public void initMapLog(){ setVisible(false); //CENTER part controlled by a panel JPanel panel = new JPanel(new BorderLayout()); //CENTER: West: map //Erase Bottom //JLabel x = new JLabel(new ImageIcon("img/Aubrey.gif")); //panel.add(x); //x.setLocation(100, 80); panel.add(new JLabel(new ImageIcon("img/Simple_Table_Grey.jpg")), BorderLayout.WEST); //CENTER: East: log log = new JTextArea("*************************LOG SCREEN*************************"); log.setBorder(new LineBorder(Color.getHSBColor(0, 0, 0.5f))); logScrollBar = new JScrollPane(log, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); panel.add(logScrollBar, BorderLayout.CENTER); //add the panel to the frame add(panel, BorderLayout.CENTER); pack(); //set proper size setVisible(true); } public void initPlayerInfo(Player[] newPlayers){ setVisible(true); //initializes, instantiates, ... players = newPlayers; playerInfo = new JTextArea[players.length]; //South Part controlled by a panel JPanel infoScreen = new JPanel(new GridLayout(1,3)); //basic settings of text areas for(int i=0;i<playerInfo.length;i++){ playerInfo[i] = new JTextArea(players[i].toString()+"\n\n"); playerInfo[i].setEditable(false); playerInfo[i].setBorder(new LineBorder(Color.getHSBColor(0, 0, 0.5f))); infoScreen.add(new JScrollPane(playerInfo[i], JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)); //infoScreen.add(playerInfo[i]); } //add the panel to the frame add(infoScreen, BorderLayout.SOUTH); pack(); setVisible(true); } /** * prompt screen to ask # of players playing * It covers every case * @return */ public int promptNumPlayer(){ int n = 0; boolean hasProblem = false; //cover the wrong-type input try{ writeLog("How many players are playing? (*Should be 2 or 3)"); String option = JOptionPane.showInputDialog(this, "How many players are playing? (*Should be 2 or 3)", "Question", JOptionPane.QUESTION_MESSAGE); //for cancel option if(option == null){ writeLog("Closing Program..."); System.exit(0); } n = Integer.parseInt(option.trim()); }catch(Exception e){ hasProblem = true; } //cover wrong range input if(n !=2 && n!=3) { hasProblem = true; } if(!hasProblem){ return n; } else{ writeLog("Wrong input: Input must be 2 or 3."); JOptionPane.showMessageDialog(this, "Wrong input: Input must be 2 or 3."); return promptNumPlayer(); } } /** * add new logs * @param message */ public void writeLog(String message){ log.append("\n"+message); } /** * update player's information screen */ public void updatePlayerInfo(){ //setVisible(false); for(int i=0;i<playerInfo.length;i++){ playerInfo[i].setText(players[i].toString()+"\n\n"); } //setVisible(true); } /** * update map */ public void updateMap(){ } }
[ "wonjohn.choi@gmail.com" ]
wonjohn.choi@gmail.com
fff0e101ba39bb6ed80fd1690085eaf5f185d606
6544a1e9412e4e9f9f879705ceb68f87a56c35f9
/GoalGroup_Android/src/com/goalgroup/http/GetUserIDHttp.java
984cd81c365480ed70d6773366ca92a22d800d6f
[]
no_license
caesarmarx/GoalGroup
4c8ff5d74fd448594b6704b228b7c5d2adc4228b
9944899d21a7df74e5b495c28db0751adc6764fa
refs/heads/master
2018-04-10T13:19:42.562599
2017-05-02T09:52:10
2017-05-02T09:52:10
89,854,071
0
0
null
null
null
null
UTF-8
Java
false
false
1,104
java
package com.goalgroup.http; import org.apache.http.message.BasicNameValuePair; import com.goalgroup.common.GgHttpErrors; import com.goalgroup.http.base.GoalGroupHttpPost; import com.goalgroup.utils.JSONUtil; import com.goalgroup.utils.StringUtil; public class GetUserIDHttp extends GoalGroupHttpPost { private int error; private String datas; public GetUserIDHttp() { super(); error = GgHttpErrors.HTTP_POST_FAIL; } @Override public void setParams(Object... params) { post_params.add(new BasicNameValuePair("cmd", "get_user_id")); post_params.add(new BasicNameValuePair("user_name", (String)params[0])); } @Override public boolean run() { try { postExecute(); getResult(); checkResult(); } catch (Exception e) { e.printStackTrace(); return false; } return true; } public String getData() { return datas; } public int getError() { return error; } private void checkResult() { datas = JSONUtil.getValue(result, "user_id"); if (!StringUtil.isEmpty(datas)) { error = GgHttpErrors.HTTP_POST_SUCCESS; } return; } }
[ "grigarthur@outlook.com" ]
grigarthur@outlook.com
2d168f380c5773e5857cdfbf4e62260d7703c68f
aaa9649c3e52b2bd8e472a526785f09e55a33840
/EquationCommonStubs/src/com/misys/equation/common/test/pv/SAR10R.java
a385ef05abae17bd619d48390f0cbb1c0f24a000
[]
no_license
jcmartin2889/Repo
dbfd02f000e65c96056d4e6bcc540e536516d775
259c51703a2a50061ad3c99b8849477130cde2f4
refs/heads/master
2021-01-10T19:34:17.555112
2014-04-29T06:01:01
2014-04-29T06:01:01
19,265,367
1
0
null
null
null
null
UTF-8
Java
false
false
497
java
package com.misys.equation.common.test.pv; import com.misys.equation.common.test.EquationTestCasePVMetaData; public class SAR10R extends EquationTestCasePVMetaData { // This attribute is used to store cvs version information. public static final String _revision = "$Id: SAR10R.java 7610 2010-06-01 17:10:41Z MACDONP1 $"; @Override public void setUp() throws Exception { super.setUp(); validCCN = "1000105KBSL@@CC 0000001"; invalidCCN = "xxxxxxxACC1@@DD 0000004"; decode = ""; } }
[ "jomartin@MAN-D7R8ZYY1.misys.global.ad" ]
jomartin@MAN-D7R8ZYY1.misys.global.ad
33e07a199b89f37d9c00f6c65ed53cde675f6ab6
433f6bc02a886ecdf2e1f02e2823b039c9d5a9f6
/pidome-pidome-server/src/main/java/org/pidome/server/system/dayparts/DayPartException.java
3a3ca3b7b1d6319074bc690e251a651d914b532b
[]
no_license
vendor-vandor/pidome-unofficial
58d29895cb21571c7d9a5efb4493c5a475ae5472
d1b15bf85085452a664c2892ffb26260df441007
refs/heads/master
2021-01-10T02:11:03.588741
2016-03-04T01:04:24
2016-03-04T01:04:24
53,095,614
2
0
null
null
null
null
UTF-8
Java
false
false
1,188
java
/* * Copyright 2014 John. * * 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.pidome.server.system.dayparts; import org.pidome.server.system.presence.*; /** * * @author John */ public class DayPartException extends Exception { /** * Creates a new instance of <code>PResenceException</code> without detail * message. */ public DayPartException() { } /** * Constructs an instance of <code>PResenceException</code> with the * specified detail message. * * @param msg the detail message. */ public DayPartException(String msg) { super(msg); } }
[ "vandor319@gmail.com" ]
vandor319@gmail.com
dabcd170c57164184d26637b8e5dc51d69d68cfb
ec745eb69f911ad9cb2211c947d153cd57761d8a
/src/main/java/com/example/testpatterns/factorymethod/factorymethod/FactoryB.java
fe2da31ab36a9edc34d7a8a4fe355f571569b970
[]
no_license
lindong4067/test-demo
4a831be13f966f0f238f962b532e3f33e4c7eed3
24a8f2c9e1949d8062609b8b47e82c91ab4b3d98
refs/heads/master
2021-06-03T14:50:18.305976
2019-12-26T04:19:15
2019-12-26T04:19:15
139,565,345
0
0
null
null
null
null
UTF-8
Java
false
false
193
java
package com.example.testpatterns.factorymethod.factorymethod; public class FactoryB implements Factory { @Override public Product getProduct() { return new ProductB(); } }
[ "lindong.zhao@ericsson.com" ]
lindong.zhao@ericsson.com
cbbe33308305ae007a31777b350cf56eab46d470
414eef02f9f795aef545b45d4991f974fb98787b
/Architectural-pattern/microservice/prediction-services/social-multiplication/src/test/java/com/manhpd/multiplication/controller/MultiplicationResultAttemptControllerTest.java
a20c2f62dea58a2087b897d7c3184068d49fbc42
[]
no_license
DucManhPhan/Design-Pattern
16c2252b5e9946a7f4f1bc565da23779bfc67a58
59143088e1321e9fe5d3f93b85d472452d5c16a6
refs/heads/master
2023-07-19T20:57:07.370273
2022-12-11T14:50:36
2022-12-11T14:50:36
142,884,065
1
1
null
2023-07-07T21:53:02
2018-07-30T14:06:02
Java
UTF-8
Java
false
false
4,384
java
package com.manhpd.multiplication.controller; import com.fasterxml.jackson.databind.ObjectMapper; import com.manhpd.multiplication.domain.Multiplication; import com.manhpd.multiplication.domain.MultiplicationResultAttempt; import com.manhpd.multiplication.domain.User; import com.manhpd.multiplication.service.MultiplicationService; import org.assertj.core.util.Lists; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.json.JacksonTester; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; import static org.mockito.Matchers.any; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @RunWith(SpringRunner.class) @WebMvcTest(MultiplicationResultAttemptController.class) public class MultiplicationResultAttemptControllerTest { @MockBean private MultiplicationService multiplicationService; @Autowired private MockMvc mockMvc; private JacksonTester<MultiplicationResultAttempt> jsonResultAttempt; private JacksonTester<List<MultiplicationResultAttempt>> jsonResultAttemptList; @Before public void setUp() { JacksonTester.initFields(this, new ObjectMapper()); } @Test public void postResultReturnCorrect() throws Exception { genericParameterizedTest(true); } @Test public void postResultReturnNotCorrect() throws Exception { genericParameterizedTest(false); } void genericParameterizedTest(final boolean correct) throws Exception { // given given(this.multiplicationService.checkAttempt(any(MultiplicationResultAttempt.class))) .willReturn(correct); User user = new User("john"); Multiplication multiplication = new Multiplication(50, 70); MultiplicationResultAttempt attempt = new MultiplicationResultAttempt(user, multiplication, 3500, correct); // when MockHttpServletResponse response = this.mockMvc.perform(post("/results") .contentType(MediaType.APPLICATION_JSON) .content(this.jsonResultAttempt.write(attempt).getJson())) .andReturn().getResponse(); // then assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); assertThat(response.getContentAsString()) .isEqualTo(this.jsonResultAttempt.write(new MultiplicationResultAttempt(attempt.getUser(), attempt.getMultiplication(), attempt.getResultAttempt(), correct)).getJson()); } @Test public void getUserStats() throws Exception { // given User user = new User("john_doe"); Multiplication multiplication = new Multiplication(50, 70); MultiplicationResultAttempt attempt = new MultiplicationResultAttempt(user, multiplication, 3500, true); List<MultiplicationResultAttempt> recentAttempts = Lists.newArrayList(attempt, attempt); given(this.multiplicationService.getStatsForUser("john_doe")) .willReturn(recentAttempts); // when MockHttpServletResponse response = this.mockMvc.perform(get("/results") .param("alias", "john_doe")) .andReturn().getResponse(); // then assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); assertThat(response.getContentAsString()).isEqualTo( this.jsonResultAttemptList.write(recentAttempts).getJson()); } }
[ "ducmanhphan93@gmail.com" ]
ducmanhphan93@gmail.com
0de07426dbbef5b5cd0cbd4cb5e6040448722ef3
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/readlater/floatview/ReadLaterFloatViewImpl.java
66015bb70ee4600e9d471b9e8d8007a1121f4f32
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,113
java
package com.zhihu.android.readlater.floatview; import android.app.Activity; import com.zhihu.android.base.ZHActivity; import com.zhihu.android.readlater.interfaces.IReadLaterFloatView; import com.zhihu.android.readlater.model.ReadLaterModel; import com.zhihu.android.readlater.util.FloatViewVisibilityUtil; import java.util.List; import kotlin.Metadata; import kotlin.Unit; import kotlin.p2243e.p2244a.AbstractC32521a; import kotlin.p2243e.p2245b.C32569u; @Metadata /* compiled from: ReadLaterFloatViewImpl.kt */ public final class ReadLaterFloatViewImpl implements IReadLaterFloatView { @Override // com.zhihu.android.readlater.interfaces.IReadLaterFloatView public void restrictDragArea(int i, int i2, int i3, int i4) { C24919c.f87029a.mo108391a(i, i2, i3, i4); } @Override // com.zhihu.android.readlater.interfaces.IReadLaterFloatView public void resetRestrictDragArea() { C24919c.f87029a.mo108399e(); } @Override // com.zhihu.android.readlater.interfaces.IReadLaterFloatView public void addPageToFloatView(AbstractC32521a<Unit> aVar) { C32569u.m150519b(aVar, "copyResultCallback"); C24919c.f87029a.mo108395a(aVar); } @Override // com.zhihu.android.readlater.interfaces.IReadLaterFloatView public void pauseAudioAnimation() { C24919c.f87029a.mo108403i(); } @Override // com.zhihu.android.readlater.interfaces.IReadLaterFloatView public boolean isFloatViewVisible() { return C24919c.f87029a.mo108404j(); } @Override // com.zhihu.android.readlater.interfaces.IReadLaterFloatView public void setFloatViewVisible(boolean z) { FloatViewVisibilityUtil.f87203a.mo108553a(!z); List<ReadLaterModel> b = C24919c.f87029a.mo108396b(); if (!(b == null || b.isEmpty())) { if (z) { C24919c.f87029a.mo108392a((Activity) ZHActivity.getTopActivity(), false); return; } ReadLaterFloatView a = C24919c.f87029a.mo108390a(); if (a != null) { a.mo108424c(); } } } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
9d479913b207ef4d01b6de6713d8a9c57d96e636
51fa3cc281eee60058563920c3c9059e8a142e66
/Java/src/testcases/CWE191_Integer_Underflow/s03/CWE191_Integer_Underflow__int_URLConnection_multiply_54a.java
0bfe340df8a48be62a38d16e5c3dddfedc7e130a
[]
no_license
CU-0xff/CWE-Juliet-TestSuite-Java
0b4846d6b283d91214fed2ab96dd78e0b68c945c
f616822e8cb65e4e5a321529aa28b79451702d30
refs/heads/master
2020-09-14T10:41:33.545462
2019-11-21T07:34:54
2019-11-21T07:34:54
223,105,798
1
4
null
null
null
null
UTF-8
Java
false
false
7,167
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__int_URLConnection_multiply_54a.java Label Definition File: CWE191_Integer_Underflow__int.label.xml Template File: sources-sinks-54a.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: URLConnection Read data from a web server with URLConnection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: multiply * GoodSink: Ensure there will not be an underflow before multiplying data by 2 * BadSink : If data is negative, multiply by 2, which can cause an underflow * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE191_Integer_Underflow.s03; import testcasesupport.*; import javax.servlet.http.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.URL; import java.net.URLConnection; import java.util.logging.Level; public class CWE191_Integer_Underflow__int_URLConnection_multiply_54a extends AbstractTestCase { public void bad() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* read input from URLConnection */ { URLConnection urlConnection = (new URL("http://www.example.org/")).openConnection(); BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(urlConnection.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from a web server with URLConnection */ /* This will be reading the first "line" of the response body, * which could be very long if there are no newlines in the HTML */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Integer.parseInt(stringNumber.trim()); } catch (NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } } } (new CWE191_Integer_Underflow__int_URLConnection_multiply_54b()).badSink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE191_Integer_Underflow__int_URLConnection_multiply_54b()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* read input from URLConnection */ { URLConnection urlConnection = (new URL("http://www.example.org/")).openConnection(); BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(urlConnection.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from a web server with URLConnection */ /* This will be reading the first "line" of the response body, * which could be very long if there are no newlines in the HTML */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Integer.parseInt(stringNumber.trim()); } catch (NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } } } (new CWE191_Integer_Underflow__int_URLConnection_multiply_54b()).goodB2GSink(data ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
e3c263941e8986456d027a36e397562ce656d5b1
f79556e9a4cdace2b24d68a27328a1629e085530
/汽车销售管理系统/Car/Car/src/com/svse/impl/InhandoutImpl.java
ba226ae37fd503e863d898db4cbe1926d08d49c6
[]
no_license
X-lun/Java-web
3274b5f4e1536573d70c4b515c96efcd8233cf90
f21b76d6b690d68a53366622a859551e1ebc0b40
refs/heads/master
2022-04-15T08:21:53.094414
2019-04-21T07:20:08
2019-04-21T07:20:08
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,405
java
package com.svse.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.svse.dao.InhandoutDAOI; import com.svse.entity.HandoutEntity; import com.svse.entity.InhandoutEntity; import com.svse.service.InhandoutService; @Service public class InhandoutImpl implements InhandoutService { @Autowired private InhandoutDAOI daoi; @Override public void add(InhandoutEntity inhandout) { this.daoi.add(inhandout); } @Override public List<InhandoutEntity> getAll() { return this.daoi.all(); } @Override public List<InhandoutEntity> getAll(int offset, int limit) { List<InhandoutEntity> ar=this.daoi.all1(offset, limit); for (InhandoutEntity i : ar) { if(i.getInhandoutflag()==1){ i.setFlag("¿â´æ³ä×ã"); }else{ i.setFlag("ÔÝÎÞ¿â´æ"); } } return ar; } @Override public int count() { return this.daoi.count(); } @Override public void upp(InhandoutEntity inhandout) { this.daoi.upp(inhandout); } @Override public List<HandoutEntity> allh() { return this.daoi.allh(); } @Override public InhandoutEntity getOne(int inhandoutid) { return this.daoi.one(inhandoutid); } @Override public int getID() { return this.daoi.getid(); } @Override public List<InhandoutEntity> getAlls() { return this.daoi.alls(); } }
[ "3196614820@qq.com" ]
3196614820@qq.com
a713a9b87872acb2b7a8756f3b967296a3f780bd
1c5e8605c1a4821bc2a759da670add762d0a94a2
/easrc/pm/project/app/PortProjectEditUIHandler.java
152e507d882fb0fbf1d5c2cd9ba2bb98c790d032
[]
no_license
shxr/NJG
8195cfebfbda1e000c30081399c5fbafc61bb7be
1b60a4a7458da48991de4c2d04407c26ccf2f277
refs/heads/master
2020-12-24T06:51:18.392426
2016-04-25T03:09:27
2016-04-25T03:09:27
19,804,797
0
3
null
null
null
null
UTF-8
Java
false
false
566
java
/** * output package name */ package com.kingdee.eas.port.pm.project.app; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.batchHandler.RequestContext; import com.kingdee.eas.framework.batchHandler.ResponseContext; /** * output class name */ public class PortProjectEditUIHandler extends AbstractPortProjectEditUIHandler { protected void _handleInit(RequestContext request,ResponseContext response, Context context) throws Exception { super._handleInit(request,response,context); } }
[ "shxr_code@126.com" ]
shxr_code@126.com
53743f192fad5e34734d4735ff6f7962cdcf93e5
a4ac6d6667571a50f13e2243adbbdd2237dea0ec
/TYJP/MyJava/src/com/encapsulation/MainClass.java
c907e8d37153bd0ad3288f4a08c6107306017175
[]
no_license
SHAIKTOUSIF/Test-Repository
2d70ca35c66450cc974780ca0ba343bf867a45a7
c6a7167de05aac31f083bd691b793b839145d6d3
refs/heads/master
2020-07-05T17:55:50.874800
2020-05-15T06:54:44
2020-05-15T06:54:44
202,719,646
1
0
null
null
null
null
UTF-8
Java
false
false
392
java
package com.encapsulation; public class MainClass { public static void main(String[] args) { // TODO Auto-generated method stub Employee e1=new Employee("Dingo",10000,001); System.out.println("Salary is "+e1.name+"is "+e1.getsalary()+"and Id is "+e1.id); e1.setsalary(20000); System.out.println("Salary is" +e1.name+"is "+e1.getsalary()+"and Id is "+e1.id); } }
[ "tousif@LAPTOP-P04MERIM" ]
tousif@LAPTOP-P04MERIM
e2089dc396baae9e8f0650c009f9c745fa677584
6fbcc1482880f94fd9cffaf680d963910290a1ec
/uitest/src/com/vaadin/tests/components/combobox/ComboBoxScrollingToPageDisabled.java
f94306d2fa2bb50c2236726e8933d6ebbaa6d710
[ "Apache-2.0" ]
permissive
allanim/vaadin
4cf4c6b51cd81cbcb265cdb0897aad92689aec04
b7f9b2316bff98bc7d37c959fa6913294d9608e4
refs/heads/master
2021-01-17T10:17:00.920299
2015-09-04T02:40:29
2015-09-04T02:40:29
28,844,118
2
0
Apache-2.0
2020-01-26T02:24:48
2015-01-06T03:04:44
Java
UTF-8
Java
false
false
2,139
java
package com.vaadin.tests.components.combobox; import java.util.ArrayList; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.ComponentTestCase; import com.vaadin.ui.ComboBox; import com.vaadin.ui.Notification; public class ComboBoxScrollingToPageDisabled extends ComponentTestCase<ComboBox> { private static final Object CAPTION = "caption"; @Override protected Class<ComboBox> getTestClass() { return ComboBox.class; } @Override protected void initializeComponents() { ComboBox s = createSelect(null); s.setScrollToSelectedItem(false); populate(s, 100); Object selection = new ArrayList<Object>(s.getItemIds()).get(50); s.setValue(selection); addTestComponent(s); } private void populate(ComboBox s, int nr) { for (int i = 0; i < nr; i++) { addItem(s, "Item " + i); } } @SuppressWarnings("unchecked") private void addItem(ComboBox s, String string) { Object id = s.addItem(); s.getItem(id).getItemProperty(CAPTION).setValue(string); } private ComboBox createSelect(String caption) { final ComboBox cb = new ComboBox(); cb.setImmediate(true); cb.addContainerProperty(CAPTION, String.class, ""); cb.setItemCaptionPropertyId(CAPTION); cb.setCaption(caption); cb.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { Notification.show("Value now:" + cb.getValue() + " " + cb.getItemCaption(cb.getValue())); } }); return cb; } @Override protected String getDescription() { return "Test that selected value appears on the client " + "side even though setScrollToSelectedItem(false) " + "has been called. Textbox should containe 'Item 50'."; } @Override protected Integer getTicketNumber() { return 16673; } }
[ "review@vaadin.com" ]
review@vaadin.com
c1b04a22006f257ea3f5f31e367a10083f46df46
3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8
/TRAVACC_R5/accommodationbackoffice/backoffice/src/de/hybris/platform/accommodationbackoffice/widgets/handler/CreateAccommodationFacilityValidationHandler.java
eeedb6a687554195f3bc6cb41244ef30c6977d61
[]
no_license
RabeS/model-T
3e64b2dfcbcf638bc872ae443e2cdfeef4378e29
bee93c489e3a2034b83ba331e874ccf2c5ff10a9
refs/heads/master
2021-07-01T02:13:15.818439
2020-09-05T08:33:43
2020-09-05T08:33:43
147,307,585
0
0
null
null
null
null
UTF-8
Java
false
false
3,875
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("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 SAP. */ package de.hybris.platform.accommodationbackoffice.widgets.handler; import de.hybris.platform.accommodationbackoffice.constants.AccommodationbackofficeConstants; import de.hybris.platform.servicelayer.exceptions.ModelSavingException; import de.hybris.platform.servicelayer.model.ModelService; import de.hybris.platform.travelbackoffice.constants.TravelbackofficeConstants; import de.hybris.platform.travelservices.model.facility.AccommodationFacilityModel; import java.util.Collections; import java.util.Map; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Required; import org.zkoss.util.resource.Labels; import org.zkoss.zul.Messagebox; import com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent; import com.hybris.backoffice.widgets.notificationarea.event.NotificationEventTypes; import com.hybris.backoffice.widgets.notificationarea.event.NotificationUtils; import com.hybris.cockpitng.config.jaxb.wizard.CustomType; import com.hybris.cockpitng.widgets.configurableflow.FlowActionHandler; import com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter; /** * Custom validation handler for "Create Accommodation Facility" wizard. */ public class CreateAccommodationFacilityValidationHandler extends AbstractAccommodationBackofficeValidationHandler implements FlowActionHandler { private static final Logger LOG = Logger.getLogger(CreateAccommodationFacilityValidationHandler.class); protected static final String NEW_ACCOMMODATION_FACILITY_CODE = "newAccommodationFacility"; private ModelService modelService; @Override public void perform(final CustomType customType, final FlowActionHandlerAdapter adapter, final Map<String, String> parameters) { final AccommodationFacilityModel accommodationFacilityModel = adapter.getWidgetInstanceManager().getModel() .getValue(NEW_ACCOMMODATION_FACILITY_CODE, AccommodationFacilityModel.class); if (!validateUniqueForAttributes( Collections.singletonMap(AccommodationFacilityModel.CODE, accommodationFacilityModel.getCode()), AccommodationFacilityModel._TYPECODE)) { final Object[] args = { accommodationFacilityModel.getCode(), AccommodationFacilityModel.CODE }; Messagebox.show(Labels.getLabel(AccommodationbackofficeConstants.WIZARD_DUPLICATE_CODE_ERROR_MESSAGE, args), Labels.getLabel(AccommodationbackofficeConstants.WIZARD_ERROR_TITLE), Messagebox.OK, Messagebox.EXCLAMATION); return; } try { getModelService().save(accommodationFacilityModel); NotificationUtils.notifyUser(NotificationUtils.getWidgetNotificationSource(adapter.getWidgetInstanceManager()), TravelbackofficeConstants.TRAVEL_GLOBAL_NOTIFICATION_EVENT_TYPE, NotificationEvent.Level.SUCCESS, Labels.getLabel(AccommodationbackofficeConstants.CREATE_ACCOMMODATION_FACILITY_SUCCESS_MESSAGE)); adapter.done(); } catch (final ModelSavingException mse) { LOG.debug(mse); NotificationUtils.notifyUser(NotificationUtils.getWidgetNotificationSource(adapter.getWidgetInstanceManager()), NotificationEventTypes.EVENT_TYPE_OBJECT_CREATION, NotificationEvent.Level.FAILURE, mse); } } /** * Gets model service. * * @return the model service */ protected ModelService getModelService() { return modelService; } /** * Sets model service. * * @param modelService * the model service */ @Required public void setModelService(final ModelService modelService) { this.modelService = modelService; } }
[ "sebastian.rulik@gmail.com" ]
sebastian.rulik@gmail.com
ff6a1a9d7cba619dfb52811281388c4591c8ba99
c8a4dac7827ce5dcd7946d0df7c70cb6a227ccf4
/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/PropertyHeatMetaDefinition.java
5c9083d757448d59515952eccd1c39acd46fde3c
[ "Apache-2.0" ]
permissive
601695931/sdc
b1b02cd2e78cfc93ff8a9d89b569c1b3b71304eb
610ff24fb145dc64e73a12d51901446b7b8be245
refs/heads/master
2020-06-27T01:38:46.153177
2019-07-28T12:44:36
2019-07-28T14:55:38
199,811,605
1
0
NOASSERTION
2019-07-31T08:16:31
2019-07-31T08:16:31
null
UTF-8
Java
false
false
1,512
java
/*- * ============LICENSE_START======================================================= * SDC * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= */ package org.openecomp.sdc.ci.tests.datatypes; public class PropertyHeatMetaDefinition { String name; boolean value; public PropertyHeatMetaDefinition() { super(); } public String getName() { return name; } public void setName(String name) { this.name = name; } public boolean getValue() { return value; } public void setValue(boolean value) { this.value = value; } @Override public String toString() { return "PropertyHeatMetaDefinition [name=" + name + ", value=" + value + "]"; } }
[ "ml636r@att.com" ]
ml636r@att.com
9ca2ea8c6e479cad493a8697672333fe336598de
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2_Scripts_com/L2_Scripts_Revision_20720_2268/src/l2s/gameserver/stats/conditions/ConditionPlayerEvent.java
9649533b61dd14b7be0e848a22cfda55bf8eda35
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
506
java
package l2s.gameserver.stats.conditions; import l2s.gameserver.stats.Env; public class ConditionPlayerEvent extends Condition { private final boolean _value; public ConditionPlayerEvent(boolean v) { _value = v; } @Override protected boolean testImpl(Env env) { return env.character.isInCtF() == _value || env.character.isInTvT() == _value || env.character.isInLastHero() == _value || env.character.isInZombieVsHumans() == _value || env.character.isInEventModelEvent(); } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
a2656378ba6f15f96bfa0dd0885ff7f00c92166e
d67f6450b24fb08f2f61b74dcdecce3025ee3efc
/gemp-swccg-cards/src/main/java/com/gempukku/swccgo/cards/set8/light/Card8_061.java
9cfd0284dd50958db238edacb5e3b72614a99318
[ "MIT" ]
permissive
cburyta/gemp-swccg-public
00a974d042195e69d3c104e61e9ee5bd48728f9a
05529086de91ecb03807fda820d98ec8a1465246
refs/heads/master
2023-01-09T12:45:33.347296
2020-10-26T14:39:28
2020-10-26T14:39:28
309,400,711
0
0
MIT
2020-11-07T04:57:04
2020-11-02T14:47:59
null
UTF-8
Java
false
false
4,530
java
package com.gempukku.swccgo.cards.set8.light; import com.gempukku.swccgo.cards.AbstractUsedOrLostInterrupt; import com.gempukku.swccgo.cards.GameConditions; import com.gempukku.swccgo.cards.evaluators.CardMatchesEvaluator; import com.gempukku.swccgo.common.CardSubtype; import com.gempukku.swccgo.common.Icon; import com.gempukku.swccgo.common.Side; import com.gempukku.swccgo.common.Uniqueness; import com.gempukku.swccgo.filters.Filter; import com.gempukku.swccgo.filters.Filters; import com.gempukku.swccgo.game.PhysicalCard; import com.gempukku.swccgo.game.SwccgGame; import com.gempukku.swccgo.logic.actions.PlayInterruptAction; import com.gempukku.swccgo.logic.effects.AddUntilEndOfTurnModifierEffect; import com.gempukku.swccgo.logic.effects.ModifyTotalBattleDestinyEffect; import com.gempukku.swccgo.logic.effects.RespondablePlayCardEffect; import com.gempukku.swccgo.logic.modifiers.PowerModifier; import com.gempukku.swccgo.logic.timing.Action; import java.util.LinkedList; import java.util.List; /** * Set: Endor * Type: Interrupt * Subtype: Used Or Lost * Title: Take The Initiative */ public class Card8_061 extends AbstractUsedOrLostInterrupt { public Card8_061() { super(Side.LIGHT, 3, "Take The Initiative", Uniqueness.UNIQUE); setLore("The ability to think and act independently gave the Rebels an advantage over their Imperial foes."); setGameText("USED: If all of your ability in a battle is provided by scouts and/or spies, they each add 1 to your total battle destiny (limit +6). LOST: For remainder of turn, your unique (•) scouts and unique (•) spies are each power +1 (or +2 while being attacked by a creature)."); addIcons(Icon.ENDOR); } @Override protected List<PlayInterruptAction> getGameTextTopLevelActions(final String playerId, final SwccgGame game, final PhysicalCard self) { List<PlayInterruptAction> actions = new LinkedList<PlayInterruptAction>(); // Check condition(s) if (GameConditions.isDuringBattle(game) && GameConditions.isAllAbilityInBattleProvidedBy(game, playerId, Filters.or(Filters.scout, Filters.spy))) { final Filter filter2 = Filters.and(Filters.your(self), Filters.or(Filters.scout, Filters.spy), Filters.participatingInBattle); int count = Math.min(6, Filters.countActive(game, self, filter2)); if (count > 0) { final PlayInterruptAction action = new PlayInterruptAction(game, self, CardSubtype.USED); action.setText("Add " + count + " to total battle destiny"); // Allow response(s) action.allowResponses( new RespondablePlayCardEffect(action) { @Override protected void performActionResults(Action targetingAction) { // Perform result(s) final int numToAdd = Math.min(6, Filters.countActive(game, self, filter2)); action.appendEffect( new ModifyTotalBattleDestinyEffect(action, playerId, numToAdd)); } } ); actions.add(action); } } final Filter filter = Filters.and(Filters.your(self), Filters.unique, Filters.or(Filters.scout, Filters.spy)); // Check condition(s) if (GameConditions.canSpot(game, self, filter)) { final PlayInterruptAction action = new PlayInterruptAction(game, self, CardSubtype.LOST); action.setText("Add to power of scouts and spies"); // Allow response(s) action.allowResponses( new RespondablePlayCardEffect(action) { @Override protected void performActionResults(Action targetingAction) { // Perform result(s) action.appendEffect( new AddUntilEndOfTurnModifierEffect(action, new PowerModifier(self, filter, new CardMatchesEvaluator(1, 2, Filters.beingAttackedByCreature)), "Makes unique scouts and unique spies power +1 (or +2 while being attacked by a creature)")); } } ); actions.add(action); } return actions; } }
[ "andrew@bender.io" ]
andrew@bender.io
e8c77d793b427752c1eebed5a44f6a7381846c61
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_17b3efb00ca38824f904bb687c58e74f0a995b70/CTNorthBranfordParser/11_17b3efb00ca38824f904bb687c58e74f0a995b70_CTNorthBranfordParser_s.java
53e756d3a2a37e63cf9cfb19832085c8481713b1
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,814
java
package net.anei.cadpage.parsers.CT; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.anei.cadpage.SmsMsgInfo.Data; import net.anei.cadpage.parsers.SmartAddressParser; /* North Branford & Northford, CT (in New Haven County) Contact: Jeff Green <greenjeffreya@gmail.com> Sender: paging@mail.nbpolicect.org. 1100008173 MEDICAL MEDA 00167 BRANFORD RD HUBBARD RD/TWIN LAKE RD MED4 503 110910 11:50 1100008148 MEDICAL MEDD 00009 SALEM ST CLINTONVILLE RD/VILLAGE ST MED4 R2 110909 17:55 1100008142 MUTUAL AID 00392 HOPE HILL RD WALLINGFORD MED4 110909 15:38 1100008130 AUTOMATIC FIRE ALARM 00051 CIRO RD FOXON RD/DEAD END E1 ET11 ET22 T1 R11 515 110909 10:07 1100008128 MEDICAL MEDB 00049 CAPUTO RD FOXON RD ROUTE 80/MILL RD R1 MED4 515 110909 08:38 1100007980 BRUSH FIRE TWIN LAKES RD/ LAKE RD BR1 ET11 502 110904 12:22 Wallinford Mutual aid (WLFD) 1100008057 MVA W/INJURIES N MAIN/RT68 WLFD A44 110906 17:05 1100007014 MUTUAL AID 00909 BEAVER HEAD RD , GUILFORD MED4 110811 01:16 */ public class CTNorthBranfordParser extends SmartAddressParser { private static final Properties CITY_CODES = buildCodeTable(new String[]{ "WLFD", "WALLINFORD" }); private static final Pattern MASTER = Pattern.compile("(\\d{10}) +(.*?) *\\d{6} \\d\\d:\\d\\d"); private static final Pattern UNIT_PTN = Pattern.compile("(?: +(?:\\d{3}|(?:MED|R|T|E|ET|BR)\\d{1,2}))+$"); private static final Pattern LEAD_ZERO_PTN = Pattern.compile("^0+(?=\\d)"); public CTNorthBranfordParser() { super(CITY_CODES, "NORTH BRANFORD", "CT"); } @Override public String getFilter() { return "paging@mail.nbpolicect.org."; } @Override public boolean parseMsg(String body, Data data) { Matcher match = MASTER.matcher(body); if (!match.matches()) return false; data.strCallId = match.group(1); body = match.group(2); match = UNIT_PTN.matcher(body); if (match.find()) { data.strUnit = match.group().trim(); body = body.substring(0, match.start()); } int pt = body.indexOf(','); if (pt >= 0) { String sExtra = body.substring(pt+1).trim(); body = body.substring(0,pt).trim(); Parser p = new Parser(sExtra); data.strCity = p.get(' '); data.strCross = p.get(); parseAddress(StartType.START_CALL, FLAG_ANCHOR_END | FLAG_START_FLD_REQ, body, data); } else { parseAddress(StartType.START_CALL, FLAG_START_FLD_REQ, body, data); data.strCross = getLeft(); } match = LEAD_ZERO_PTN.matcher(data.strAddress); if (match.find()) { data.strAddress = data.strAddress.substring(match.end()).trim(); } return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
0abc56e209650c951aa56abf0598debac2110170
6c061317f25c8deaa856c2a08be6dc7f1851b23a
/blog-core/src/main/java/com/houyi/blog/business/enums/QiniuUploadType.java
5d09aed6daef44c95cae0d1ed591b6cdb8666363
[ "MIT" ]
permissive
JackLuhan/blog
85430f36fbef608da3e8506aaff49cbb6839f480
24d8c102ffa509b4374d6d1d8307312cfee2fd9c
refs/heads/master
2020-04-04T13:27:26.109779
2018-11-07T05:29:08
2018-11-07T05:29:08
154,083,935
0
0
null
null
null
null
UTF-8
Java
false
false
2,344
java
/** * MIT License * * Copyright (c) 2018 houyi * * 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.houyi.blog.business.enums; import com.houyi.blog.business.consts.FileConst; /** * @author houyi * @version 1.0 * @date 2018/4/16 16:26 * @since 1.0 */ public enum QiniuUploadType { QRCODE("zhyd/qrcode/", FileConst.DEFAULT_IMG_WIDTH, FileConst.DEFAULT_IMG_HEIGHT, FileConst.DEFAULT_IMG_SIZE), SIMPLE("zhyd/article/", FileConst.DEFAULT_IMG_WIDTH, FileConst.DEFAULT_IMG_HEIGHT, FileConst.DEFAULT_IMG_SIZE), COVER_IMAGE("zhyd/cover/", FileConst.DEFAULT_IMG_WIDTH, FileConst.DEFAULT_IMG_HEIGHT, FileConst.DEFAULT_IMG_SIZE); private String path; /** * 上传图片的宽度 */ private int[] width; /** * 上传图片的高度 */ private int[] height; /** * 上传图片的大小 */ private int[] size; QiniuUploadType(String path, int[] width, int[] height, int[] size) { this.path = path; this.width = width; this.height = height; this.size = size; } public String getPath() { return path; } public int[] getWidth() { return width; } public int[] getHeight() { return height; } public int[] getSize() { return size; } }
[ "1317406121@qq.com" ]
1317406121@qq.com
dc6602d140d798ea6b4d561636878074a67714d7
85cdf4f5e6b7e20ff8b1ee33b49fb5c9c0296edf
/src/main/java/io/wurmatron/plants/client/gui/production/GuiProduction.java
63cee79f1bbb0cff5490f0b30b9ce6b5e022f5f2
[]
no_license
Wurmatron/Plants-Evolved
9fec0115e608943a5fc74bfb34ed85dd1a145646
3525d32998cb94fa287d6568642ac3f835e3c21f
refs/heads/master
2023-01-24T18:00:45.022890
2023-01-06T17:18:36
2023-01-06T17:18:36
94,481,663
0
0
null
null
null
null
UTF-8
Java
false
false
4,802
java
package io.wurmatron.plants.client.gui.production; import net.minecraft.client.gui.GuiButton; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.translation.I18n; import io.wurmatron.plants.api.PlantsEvolvedAPI; import io.wurmatron.plants.api.mutiblock.IOutput; import io.wurmatron.plants.api.mutiblock.IStructure; import io.wurmatron.plants.api.mutiblock.StorageType; import io.wurmatron.plants.client.gui.GuiHabitatBase; import io.wurmatron.plants.client.gui.utils.GuiTexturedButton; import io.wurmatron.plants.common.network.NetworkHandler; import io.wurmatron.plants.common.network.server.OutputMessage; import io.wurmatron.plants.common.reference.Local; import io.wurmatron.plants.common.reference.NBT; import io.wurmatron.plants.common.tileentity.TileHabitatCore; import io.wurmatron.plants.common.utils.DisplayHelper; import io.wurmatron.plants.common.utils.MutiBlockHelper; import java.io.IOException; import java.util.HashMap; import java.util.List; public class GuiProduction extends GuiHabitatBase { private List <IOutput> outputs = PlantsEvolvedAPI.getOutputTypes (); public GuiProduction (TileHabitatCore tile) { super (tile); } @Override public void drawScreen (int mouseX,int mouseY,float partialTicks) { super.drawScreen (mouseX,mouseY,partialTicks); for (int index = 0; index < outputs.size (); index++) if (index <= 12) displayString (outputs.get (index),mouseX,mouseY,62,31 + (16 * index),106,29 + (16 * index),6,29 + (16 * index)); } @Override public void initGui () { super.initGui (); for (int index = 0; index < outputs.size (); index++) if (index <= 12) { buttonList.add (new GuiTexturedButton (100 + index,startWidth + 106,(startHeight + 29) + (16 * index),12,12,1,"+")); buttonList.add (new GuiTexturedButton (101 + index,startWidth + 6,(startHeight + 29) + (16 * index),12,12,1,"-")); } } @Override protected void actionPerformed (GuiButton butt) throws IOException { super.actionPerformed (butt); for (int index = 0; index < outputs.size (); index++) if (index <= 12) if ((100 + index) == butt.id && butt.displayString.equalsIgnoreCase ("+")) proccessButton (outputs.get (index)); else if ((101 + index) == butt.id && butt.displayString.equalsIgnoreCase ("-")) destroyButton (outputs.get (index)); } private void proccessButton (IOutput output) { int currentTier = MutiBlockHelper.getOutputLevel (tile,output); int nextTier = currentTier + keyAmount (); int valid = 0; for (StorageType st : output.getCost ().keySet ()) if (tile.getColonyValue (MutiBlockHelper.getType (st)) >= (tile.getColonyValue (MutiBlockHelper.getType (st)) * MutiBlockHelper.getOutputLevel (tile,output))) { tile.consumeColonyValue (MutiBlockHelper.getType (st),MutiBlockHelper.getOutputLevel (tile,output) * tile.getColonyValue (MutiBlockHelper.getType (st))); valid++; } else { for (StorageType t : output.getCost ().keySet ()) { TextComponentString text = new TextComponentString (I18n.translateToLocal (Local.NEED_MINERALS).replaceAll ("'Minerals'",TextFormatting.GOLD + DisplayHelper.formatNum ((MutiBlockHelper.getOutputLevel (tile,output) * tile.getColonyValue (MutiBlockHelper.getType (st))) - tile.getColonyValue (MutiBlockHelper.getType (t))) + TextFormatting.RED)); text.getStyle ().setColor (TextFormatting.RED); mc.ingameGUI.getChatGUI ().printChatMessage (text); } } boolean hasRequiredStructures = MutiBlockHelper.isOutputRunning (output,tile); if (hasRequiredStructures && valid >= output.getCost ().keySet ().size ()) NetworkHandler.sendToServer (new OutputMessage (output,nextTier,tile,false)); if (!hasRequiredStructures) { StringBuilder requiredStructures = new StringBuilder (); HashMap <IStructure, Integer> missingStructures = MutiBlockHelper.outputRunningRequirments (output,tile); for (IStructure structure : missingStructures.keySet ()) requiredStructures.append (structure.getDisplayName ()).append (" lvl ").append (missingStructures.get (structure)).append ("; "); mc.ingameGUI.getChatGUI ().printChatMessage (new TextComponentString (TextFormatting.RED + I18n.translateToLocal (Local.MISSING_STRUCTURE).replaceAll ("'STRUCTURE'",requiredStructures.toString ()))); } } private void destroyButton (IOutput output) { int nextTier = keyAmount (); if (MutiBlockHelper.getOutputLevel (tile,output) - keyAmount () >= 0) { for (StorageType st : output.getCost ().keySet ()) tile.addColonyValue (NBT.MINERALS,MutiBlockHelper.calculateSellBack (MutiBlockHelper.getOutputLevel (tile,output) * tile.getColonyValue (MutiBlockHelper.getType (st)))); NetworkHandler.sendToServer (new OutputMessage (output,nextTier,tile,true)); } } }
[ "wurmatron@gmail.com" ]
wurmatron@gmail.com
e578723c0e7ac4b8c690c843a7ecb281234a9782
58fbcab3da8a9b791dce81bcfc988b02749dfab6
/order/order-online-web/src/main/java/com/gl/order/online/web/controller/SimpleController.java
2417df24bb11bc55f5a6023cf667135ff1f1217d
[ "Apache-2.0" ]
permissive
gavin2lee/dwss
cf39f91702ef48875ad55cf0055f31582670fb25
3b52e50d8a625e2b5ce393754bdaffc88511b6fb
refs/heads/master
2021-01-11T10:06:22.299896
2017-10-11T14:08:40
2017-10-11T14:08:40
77,515,119
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package com.gl.order.online.web.controller; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class SimpleController { @RequestMapping(value = "/infos", produces = { MediaType.APPLICATION_FORM_URLENCODED_VALUE }, consumes = { MediaType.APPLICATION_FORM_URLENCODED_VALUE }, method = { RequestMethod.GET }) public String getInfo() { return "hello Simple Controller"; } }
[ "gavin2lee@163.com" ]
gavin2lee@163.com
8485abcb717470bea5283fec0a9c89947fe9d7a5
b5578dde0f095f2879a2af29f80a86484e1daf73
/app/src/main/java/com/lwc/common/module/invoice/HistoryDetailActivity.java
13b88556dc16c4452047d46758cbabd4798046c6
[]
no_license
popularcloud/GUANXIU_COMMON
74abb14135757c3cd2cf2a70e75e4243311e0b23
2646b40519f5a219f9a8f8afd469b459951ba99d
refs/heads/master
2021-07-01T02:43:36.647793
2021-01-04T02:11:26
2021-01-04T02:11:26
209,501,379
1
0
null
null
null
null
UTF-8
Java
false
false
4,576
java
package com.lwc.common.module.invoice; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.lwc.common.R; import com.lwc.common.activity.BaseActivity; import com.lwc.common.module.bean.InvoiceHistory; import com.lwc.common.utils.IntentUtil; import com.lwc.common.utils.ToastUtil; import com.lwc.common.utils.Utils; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; /** * 开票记录详情 * * @author 何栋 * @date 2018年1月05日 */ public class HistoryDetailActivity extends BaseActivity { private InvoiceHistory invoiceHistory; @BindView(R.id.rl_name) LinearLayout rl_name; @BindView(R.id.tv_name) TextView tv_name; @BindView(R.id.rl_phone) LinearLayout rl_phone; @BindView(R.id.tv_phone) TextView tv_phone; @BindView(R.id.rl_address) LinearLayout rl_address; @BindView(R.id.tv_address) TextView tv_address; @BindView(R.id.rl_email) LinearLayout rl_email; @BindView(R.id.tv_email) TextView tv_email; @BindView(R.id.tv_head) TextView tv_head; @BindView(R.id.tv_duty) TextView tv_duty; @BindView(R.id.tv_content) TextView tv_content; @BindView(R.id.tv_money) TextView tv_money; @BindView(R.id.tv_apply_time) TextView tv_apply_time; @BindView(R.id.rl_find_invoice) RelativeLayout rl_find_invoice; @BindView(R.id.rl_duty) LinearLayout rl_duty; @BindView(R.id.tv_count) TextView tv_count; @BindView(R.id.tv_id) TextView tv_id; @Override protected int getContentViewId(Bundle savedInstanceState) { return R.layout.activity_invoice_detail; } @Override protected void findViews() { ButterKnife.bind(this); setTitle("发票详情"); } @Override protected void init() { } @Override public void onResume() { super.onResume(); } @OnClick({R.id.rl_find_invoice, R.id.rl_order_list}) public void clickView(View view) { switch (view.getId()) { case R.id.rl_find_invoice: Bundle bundle1 = new Bundle(); bundle1.putString("url", invoiceHistory.getInvoiceImages()); IntentUtil.gotoActivity(HistoryDetailActivity.this, FindInvoiceActivity.class, bundle1); break; case R.id.rl_order_list: Bundle bundle = new Bundle(); bundle.putString("invoiceHistoryIds", invoiceHistory.getInvoiceOrders()); if("1".equals( invoiceHistory.getBuyType())){ IntentUtil.gotoActivity(HistoryDetailActivity.this, InvoiceOrderActivity.class, bundle); }else if("2".equals( invoiceHistory.getBuyType())){ IntentUtil.gotoActivity(HistoryDetailActivity.this, InvoicePackageActivity.class, bundle); }else{ IntentUtil.gotoActivity(HistoryDetailActivity.this, InvoiceLeaseOrderActivity.class, bundle); } break; } } @Override protected void initGetData() { invoiceHistory = (InvoiceHistory)getIntent().getSerializableExtra("invoiceHistory"); if (invoiceHistory == null) { ToastUtil.showToast(this, "详情信息异常,请稍候重试"); onBackPressed(); } else { try { if (TextUtils.isEmpty(invoiceHistory.getInvoiceImages())) { rl_find_invoice.setVisibility(View.GONE); } else { rl_find_invoice.setVisibility(View.VISIBLE); } if (!TextUtils.isEmpty(invoiceHistory.getInvoiceType()) && invoiceHistory.getInvoiceType().equals("1")) { rl_name.setVisibility(View.GONE); rl_phone.setVisibility(View.GONE); rl_address.setVisibility(View.GONE); rl_email.setVisibility(View.VISIBLE); } else { rl_email.setVisibility(View.GONE); tv_name.setText(invoiceHistory.getAcceptName()); tv_phone.setText(invoiceHistory.getAcceptPhone()); tv_address.setText(invoiceHistory.getAcceptAddress()); } tv_email.setText(invoiceHistory.getUserEmail()); tv_head.setText(invoiceHistory.getInvoiceTitle()); if (!TextUtils.isEmpty(invoiceHistory.getInvoiceType()) && invoiceHistory.getInvoiceTitleType().equals("2")) { rl_duty.setVisibility(View.GONE); } else { tv_duty.setText(invoiceHistory.getDutyParagraph()); } tv_content.setText(invoiceHistory.getInvoiceContent()); tv_money.setText(Utils.getMoney(Utils.chu(invoiceHistory.getInvoiceAmount(), "100"))+" 元"); tv_apply_time.setText(invoiceHistory.getCreateTime()); String[] arr = invoiceHistory.getInvoiceOrders().split(","); tv_count.setText("此发票含" + arr.length + "个订单"); tv_id.setText(invoiceHistory.getInvoiceId()); } catch (Exception e){} } } @Override protected void widgetListener() { } }
[ "liushuzhiyt@163.com" ]
liushuzhiyt@163.com
25f67bdca3ffcff5f3b64403a56906587d416c11
07bf50b54050cad645f641255f336eef5210aac2
/Sources/com/microsoft/schemas/exchange/services/_2006/types/MeetingMessageType.java
d06dd5fad11ecf23148766ed8d15c4f557b98b51
[]
no_license
pascalrobert/ERGroupware
f1341d27d9ad471f89d4177ac278dc14f83575f3
d033f3591dedf32b92ae0c072fb9a169b43eb277
refs/heads/master
2016-09-05T16:58:34.669833
2013-06-29T11:25:55
2013-06-29T11:25:55
2,187,274
1
1
null
null
null
null
UTF-8
Java
false
false
7,177
java
package com.microsoft.schemas.exchange.services._2006.types; import java.util.Calendar; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.w3._2001.xmlschema.Adapter1; /** * <p>Java class for MeetingMessageType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MeetingMessageType"> * &lt;complexContent> * &lt;extension base="{http://schemas.microsoft.com/exchange/services/2006/types}MessageType"> * &lt;sequence> * &lt;element name="AssociatedCalendarItemId" type="{http://schemas.microsoft.com/exchange/services/2006/types}ItemIdType" minOccurs="0"/> * &lt;element name="IsDelegated" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="IsOutOfDate" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="HasBeenProcessed" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="ResponseType" type="{http://schemas.microsoft.com/exchange/services/2006/types}ResponseTypeType" minOccurs="0"/> * &lt;element name="UID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RecurrenceId" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="DateTimeStamp" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MeetingMessageType", propOrder = { "associatedCalendarItemId", "isDelegated", "isOutOfDate", "hasBeenProcessed", "responseType", "uid", "recurrenceId", "dateTimeStamp" }) @XmlSeeAlso({ MeetingCancellationMessageType.class, MeetingRequestMessageType.class, MeetingResponseMessageType.class }) public class MeetingMessageType extends MessageType { @XmlElement(name = "AssociatedCalendarItemId") protected ItemIdType associatedCalendarItemId; @XmlElement(name = "IsDelegated") protected Boolean isDelegated; @XmlElement(name = "IsOutOfDate") protected Boolean isOutOfDate; @XmlElement(name = "HasBeenProcessed") protected Boolean hasBeenProcessed; @XmlElement(name = "ResponseType") protected ResponseTypeType responseType; @XmlElement(name = "UID") protected String uid; @XmlElement(name = "RecurrenceId", type = String.class) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") protected Calendar recurrenceId; @XmlElement(name = "DateTimeStamp", type = String.class) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") protected Calendar dateTimeStamp; /** * Gets the value of the associatedCalendarItemId property. * * @return * possible object is * {@link ItemIdType } * */ public ItemIdType getAssociatedCalendarItemId() { return associatedCalendarItemId; } /** * Sets the value of the associatedCalendarItemId property. * * @param value * allowed object is * {@link ItemIdType } * */ public void setAssociatedCalendarItemId(ItemIdType value) { this.associatedCalendarItemId = value; } /** * Gets the value of the isDelegated property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIsDelegated() { return isDelegated; } /** * Sets the value of the isDelegated property. * * @param value * allowed object is * {@link Boolean } * */ public void setIsDelegated(Boolean value) { this.isDelegated = value; } /** * Gets the value of the isOutOfDate property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIsOutOfDate() { return isOutOfDate; } /** * Sets the value of the isOutOfDate property. * * @param value * allowed object is * {@link Boolean } * */ public void setIsOutOfDate(Boolean value) { this.isOutOfDate = value; } /** * Gets the value of the hasBeenProcessed property. * * @return * possible object is * {@link Boolean } * */ public Boolean isHasBeenProcessed() { return hasBeenProcessed; } /** * Sets the value of the hasBeenProcessed property. * * @param value * allowed object is * {@link Boolean } * */ public void setHasBeenProcessed(Boolean value) { this.hasBeenProcessed = value; } /** * Gets the value of the responseType property. * * @return * possible object is * {@link ResponseTypeType } * */ public ResponseTypeType getResponseType() { return responseType; } /** * Sets the value of the responseType property. * * @param value * allowed object is * {@link ResponseTypeType } * */ public void setResponseType(ResponseTypeType value) { this.responseType = value; } /** * Gets the value of the uid property. * * @return * possible object is * {@link String } * */ public String getUID() { return uid; } /** * Sets the value of the uid property. * * @param value * allowed object is * {@link String } * */ public void setUID(String value) { this.uid = value; } /** * Gets the value of the recurrenceId property. * * @return * possible object is * {@link String } * */ public Calendar getRecurrenceId() { return recurrenceId; } /** * Sets the value of the recurrenceId property. * * @param value * allowed object is * {@link String } * */ public void setRecurrenceId(Calendar value) { this.recurrenceId = value; } /** * Gets the value of the dateTimeStamp property. * * @return * possible object is * {@link String } * */ public Calendar getDateTimeStamp() { return dateTimeStamp; } /** * Sets the value of the dateTimeStamp property. * * @param value * allowed object is * {@link String } * */ public void setDateTimeStamp(Calendar value) { this.dateTimeStamp = value; } }
[ "probert@macti.ca" ]
probert@macti.ca
e8cf171d5d71707efb3844640441d9eee734a6e0
801f424ce1e64073e5a32c89d368aaf072211d88
/app/src/main/java/com/fjx/mg/dialog/AddShopCartDialog.java
87249e9394040db907b537546581f5d4889b5af2
[ "Apache-2.0" ]
permissive
ydmmocoo/MGM
91688de95e798f4c7746640bd3c2ef17d294fced
51d0822e9c378da1538847c6d5f01adf94524a4b
refs/heads/master
2022-11-14T16:00:28.862488
2020-07-02T03:41:05
2020-07-02T03:41:05
270,987,374
0
0
null
null
null
null
UTF-8
Java
false
false
5,414
java
package com.fjx.mg.dialog; import android.app.Dialog; import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import android.view.Display; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.Button; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.content.ContextCompat; import androidx.fragment.app.DialogFragment; import com.fjx.mg.R; import com.fjx.mg.food.adapter.LvAttributeAdapter; import com.fjx.mg.food.adapter.SpecialTagAdapter; import com.fjx.mg.view.flowlayout.FlowLayout; import com.fjx.mg.view.flowlayout.TagAdapter; import com.fjx.mg.view.flowlayout.TagFlowLayout; import com.library.common.utils.DimensionUtil; import com.library.repository.models.StoreGoodsBean; import com.tencent.qcloud.uikit.common.component.picture.listener.OnSelectedListener; import java.util.List; import java.util.Set; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class AddShopCartDialog extends Dialog { @BindView(R.id.tv_name) TextView mTvName; TextView mTvSpecifications; TagFlowLayout mFlSpecifications; @BindView(R.id.lv_attribute) ListView mLvAttribute; @BindView(R.id.tv_price) TextView mTvPrice; private String mName; private LvAttributeAdapter mAdapter; private List<StoreGoodsBean.CateListBean.GoodsListBean.AttrListBean> mAttrList; private SpecialTagAdapter mSpecialTagAdapter; private List<StoreGoodsBean.CateListBean.GoodsListBean.SpecialListBean> mSpecialList; private OnSelectedListener mOnSelectedListener; private String seId=""; private String seName=""; private String aIds=""; private String aNames=""; private String price=""; public AddShopCartDialog(Context context) { super(context, R.style.CustomDialog); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.dialog_fragment_add_shop_cart); //按空白处不能取消动画 setCanceledOnTouchOutside(false); WindowManager.LayoutParams params = getWindow().getAttributes(); params.height = WindowManager.LayoutParams.WRAP_CONTENT; params.width = (int) (DimensionUtil.getScreenWith()*0.9); getWindow().setAttributes(params); ButterKnife.bind(this); View headView = View.inflate(getContext(), R.layout.item_lv_attribute_header, null); mTvSpecifications = headView.findViewById(R.id.tv_specifications); mFlSpecifications = headView.findViewById(R.id.fl_specifications); if (mSpecialList!=null&&mSpecialList.size()>1) { mLvAttribute.addHeaderView(headView); } seId=mSpecialList.get(0).getSId(); seName=mSpecialList.get(0).getName(); price=mSpecialList.get(0).getPrice(); mTvName.setText(mName); mSpecialTagAdapter = new SpecialTagAdapter(getContext(), mSpecialList); mFlSpecifications.setAdapter(mSpecialTagAdapter); //mSpecialTagAdapter.setSelected(0,mSpecialList.get(0)); mSpecialTagAdapter.setSelectedList(0); mTvPrice.setText(getContext().getResources().getString(R.string.goods_price, mSpecialList.get(0).getPrice())); mAdapter = new LvAttributeAdapter(getContext(), mAttrList); mLvAttribute.setAdapter(mAdapter); //规格点击事件 mFlSpecifications.setOnTagClickListener((view, position, parent) -> { mSpecialTagAdapter.setSelectedList(position); mTvPrice.setText(getContext().getResources().getString(R.string.goods_price, mSpecialList.get(position).getPrice())); seId=mSpecialList.get(position).getSId(); seName=mSpecialList.get(position).getName(); price=mSpecialList.get(position).getPrice(); return true; }); } @OnClick({R.id.iv_closed, R.id.tv_confirm}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.iv_closed://关闭 dismiss(); break; case R.id.tv_confirm://选好了 aIds=mAdapter.getIds(); aNames=mAdapter.getNames(); mOnSelectedListener.selected(seId,seName,aIds,aNames,price); break; } } public void setData(String name, List<StoreGoodsBean.CateListBean.GoodsListBean.SpecialListBean> specialList, List<StoreGoodsBean.CateListBean.GoodsListBean.AttrListBean> list) { mName = name; mSpecialList = specialList; mAttrList = list; } public void setOnSelectedListener(OnSelectedListener listener) { mOnSelectedListener = listener; } public interface OnSelectedListener { void selected(String seId, String seName, String aIds, String aNames,String price); } }
[ "ydmmocoo@gmail.com" ]
ydmmocoo@gmail.com
6a2cb1c11e016883f3e13d8636f03b1699a9f231
a504cd9b6be005f9ac4decee162a02e4db0aa9ac
/common/evilcraft/api/render/AlphaItemRenderer.java
ea5d38d1c14d6dd9f2a25e1d72470e06cf1f0799
[ "CC-BY-4.0" ]
permissive
ghostagent/EvilCraft
599f8d3e8e467d7a3e71ba4c81956ffa53f0f12f
9a22164830e27f4b5d9dd74838f9eea03a3e1dff
refs/heads/master
2021-01-22T20:19:25.305661
2014-04-11T09:17:48
2014-04-11T09:17:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,237
java
package evilcraft.api.render; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.registry.RenderingRegistry; /** * Allows item to be rendered with a better (alpha) transparency blend. * @author rubensworks * */ public class AlphaItemRenderer implements IItemRenderer{ /** * The ID for this renderer. */ public static int ID = RenderingRegistry.getNextAvailableRenderId(); private static RenderItem renderItem = new RenderItem(); @Override public boolean handleRenderType(ItemStack itemStack, ItemRenderType type) { return type == ItemRenderType.INVENTORY; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack itemStack, Object... data) { GL11.glEnable(GL11.GL_BLEND); Icon icon = itemStack.getIconIndex(); renderItem.renderIcon(0, 0, icon, 16, 16); GL11.glDisable(GL11.GL_BLEND); } }
[ "rubensworks@gmail.com" ]
rubensworks@gmail.com
5d19ba2f546588cbc13e6904035e50de517c4163
1fd05b32e1858a7a5a19f1804c32cb7f797443f6
/trunk/netx-common/src/main/java/com/netx/common/vo/common/EvaluateResponseDto.java
1b86d14911068a4a7e6bd9dce1f73b5aa993691e
[]
no_license
biantaiwuzui/netx
089a81cf53768121f99cb54a3daf2f6a1ec3d4c7
56c6e07864bd199befe90f8475bf72988c647392
refs/heads/master
2020-03-26T22:57:06.970782
2018-09-13T02:25:48
2018-09-13T02:25:48
145,498,445
0
2
null
null
null
null
UTF-8
Java
false
false
2,415
java
package com.netx.common.vo.common; import java.util.Date; public class EvaluateResponseDto { private String id; /** * 分数 */ private Integer score; private String userId; /** * 是否回复 */ private Boolean isReply; /** * 内容 */ private String content; private String pId; private Date createTime; /** * 事件id */ private String typeId; /** * 事件名称 */ private String typeName; /** * 订单id */ private String orderId; /** * 评论类型 */ private String evaluateType; private String replyStr; public String getId() { return id; } public void setId(String id) { this.id = id; } public Integer getScore() { return score; } public void setScore(Integer score) { this.score = score; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public Boolean getReply() { return isReply; } public void setReply(Boolean reply) { isReply = reply; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getpId() { return pId; } public void setpId(String pId) { this.pId = pId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getTypeId() { return typeId; } public void setTypeId(String typeId) { this.typeId = typeId; } public String getTypeName() { return typeName; } public void setTypeName(String typeName) { this.typeName = typeName; } public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getEvaluateType() { return evaluateType; } public void setEvaluateType(String evaluateType) { this.evaluateType = evaluateType; } public String getReplyStr() { return replyStr; } public void setReplyStr(String replyStr) { this.replyStr = replyStr; } }
[ "3043168786@qq.com" ]
3043168786@qq.com
7707583bfe5e6315b542581eb35e45596760cc6e
318f01d9c7d6d5615c32eaf3a48b38e72c89dec6
/thirdpp-trust-channel/src/main/java/com/zendaimoney/trust/channel/entity/OpenBound.java
983b3da37a929b2ca2a4e0b09a83a5cb68a767d9
[]
no_license
ichoukou/thirdapp
dce52f5df2834f79a51895475b995a3e758be8c0
aae0a1596e06992b600a1a442723b833736240e3
refs/heads/master
2020-05-03T03:12:33.064089
2018-04-18T06:00:14
2018-04-18T06:00:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,917
java
package com.zendaimoney.trust.channel.entity; import java.io.Serializable; public class OpenBound implements Serializable { private static final long serialVersionUID = -2964620450002313871L; //操作流水号(主键,3位业务类型编码 + 13位随机数) private String tradeFlow; //交易类型(USRA-开户,USRB-用户绑定银行卡) private String tradeType; //业务系统编号 private String bizSysNo; //支付渠道编码 private String paySysNo; //状态(0处理中,1操作成功,2操作失败) private int status; //更新时间 private String updateTime; //客户编号 private String clientNo; //客户账户号(第三方账户号) private String accountNo; //用户姓名 private String userName; //用户类型(P:个人,C:公司,O:合作机构,T:团账户,G:团备付金账户,S:平台自有,F:平台风险金,W:(部分平台)) private String userType; //证件类型(证件类型0=身份证 1=户口簿2=护照 3=军官证 4=士兵证 5=港澳居民来往内地通行证 6=台湾同胞来往内地通行证 7=临时身份证 8=外国人居留证 9=警官证 X=其他证件) private String idType; //证件号码 private String idNo; //手机号码 private String mobile; //银行账户类型(P:个人账户 C:对公账户) private String bankAccountType; //银行账户号 private String bankCardNo; //银行账户名 private String bankAccoutName; //账户开户银行 private String openBankCode; //账户开户分支行 private String openSubBank; //请求IP private String ip; //创建人 private String creater; //创建时间 private String createTime; //业务系统流水号 private String bizFlow; //返回操作流水号 private String respFlow; //返回时间 private String respTime; //返回信息 private String respInfo; //移动设备信息或者PC机MAC地址 private String mac; //信息类别编码 private String infoCategoryCode; //返回时间,外部系统时间 private String respTimeExt; //摘要 private String note; //是否批量操作(0-否,1-是) private String isBatch; //批次号(对应TPP_TRUST_OPER_BATCH表中的BATCH_NO) private String batchNo; //备用字段1 private String spare1; //备用字段2 private String spare2; public OpenBound(String tradeFlow, int status, String accountNo, String respInfo, String respTime, String respTimeExt) { this.tradeFlow = tradeFlow; this.status = status; this.accountNo = accountNo; this.respInfo = respInfo; this.respTime = respTime; this.respTimeExt = respTimeExt; } public String getTradeFlow() { return tradeFlow; } public void setTradeFlow(String tradeFlow) { this.tradeFlow = tradeFlow; } public String getTradeType() { return tradeType; } public void setTradeType(String tradeType) { this.tradeType = tradeType; } public String getBizSysNo() { return bizSysNo; } public void setBizSysNo(String bizSysNo) { this.bizSysNo = bizSysNo; } public String getPaySysNo() { return paySysNo; } public void setPaySysNo(String paySysNo) { this.paySysNo = paySysNo; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public String getUpdateTime() { return updateTime; } public void setUpdateTime(String updateTime) { this.updateTime = updateTime; } public String getClientNo() { return clientNo; } public void setClientNo(String clientNo) { this.clientNo = clientNo; } public String getAccountNo() { return accountNo; } public void setAccountNo(String accountNo) { this.accountNo = accountNo; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getUserType() { return userType; } public void setUserType(String userType) { this.userType = userType; } public String getIdType() { return idType; } public void setIdType(String idType) { this.idType = idType; } public String getIdNo() { return idNo; } public void setIdNo(String idNo) { this.idNo = idNo; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getBankAccountType() { return bankAccountType; } public void setBankAccountType(String bankAccountType) { this.bankAccountType = bankAccountType; } public String getBankCardNo() { return bankCardNo; } public void setBankCardNo(String bankCardNo) { this.bankCardNo = bankCardNo; } public String getBankAccoutName() { return bankAccoutName; } public void setBankAccoutName(String bankAccoutName) { this.bankAccoutName = bankAccoutName; } public String getOpenBankCode() { return openBankCode; } public void setOpenBankCode(String openBankCode) { this.openBankCode = openBankCode; } public String getOpenSubBank() { return openSubBank; } public void setOpenSubBank(String openSubBank) { this.openSubBank = openSubBank; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getCreater() { return creater; } public void setCreater(String creater) { this.creater = creater; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public String getBizFlow() { return bizFlow; } public void setBizFlow(String bizFlow) { this.bizFlow = bizFlow; } public String getRespFlow() { return respFlow; } public void setRespFlow(String respFlow) { this.respFlow = respFlow; } public String getRespTime() { return respTime; } public void setRespTime(String respTime) { this.respTime = respTime; } public String getRespInfo() { return respInfo; } public void setRespInfo(String respInfo) { this.respInfo = respInfo; } public String getMac() { return mac; } public void setMac(String mac) { this.mac = mac; } public String getInfoCategoryCode() { return infoCategoryCode; } public void setInfoCategoryCode(String infoCategoryCode) { this.infoCategoryCode = infoCategoryCode; } public String getRespTimeExt() { return respTimeExt; } public void setRespTimeExt(String respTimeExt) { this.respTimeExt = respTimeExt; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public String getIsBatch() { return isBatch; } public void setIsBatch(String isBatch) { this.isBatch = isBatch; } public String getBatchNo() { return batchNo; } public void setBatchNo(String batchNo) { this.batchNo = batchNo; } public String getSpare1() { return spare1; } public void setSpare1(String spare1) { this.spare1 = spare1; } public String getSpare2() { return spare2; } public void setSpare2(String spare2) { this.spare2 = spare2; } }
[ "gaohongxuhappy@163.com" ]
gaohongxuhappy@163.com
2e2f950116c75d891641cd9bde0fde3786f15c36
7a2c91813117a8d949571521510895ee53daad49
/src/main/java/com/alipay/api/response/AlipayInsAutoAutoinsprodUserCertifyResponse.java
7456547b6decc0a1fd8a0ebeb420281ea876bc7e
[ "Apache-2.0" ]
permissive
dut3062796s/alipay-sdk-java-all
eb5afb5b570fb0deb40d8c960b85a01d13506568
559180f4c370f7fcfef67a1c559768d11475c745
refs/heads/master
2020-07-03T21:00:06.124387
2019-06-23T01:13:43
2019-06-23T01:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
714
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ins.auto.autoinsprod.user.certify response. * * @author auto create * @since 1.0, 2019-03-26 15:32:33 */ public class AlipayInsAutoAutoinsprodUserCertifyResponse extends AlipayResponse { private static final long serialVersionUID = 1145943342733883776L; /** * 验证结果 */ @ApiField("agent_cert_result") private String agentCertResult; public void setAgentCertResult(String agentCertResult) { this.agentCertResult = agentCertResult; } public String getAgentCertResult( ) { return this.agentCertResult; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
262ac69ad263e43104987d13f90c465c805a5c8e
3a5985651d77a31437cfdac25e594087c27e93d6
/ojc-core/component-common/crl/src/com/sun/jbi/crl/mep/proc/ProcessorFactory.java
38553d936b4e55d22ab3beabe3f99829eaa5330e
[]
no_license
vitalif/openesb-components
a37d62133d81edb3fdc091abd5c1d72dbe2fc736
560910d2a1fdf31879e3d76825edf079f76812c7
refs/heads/master
2023-09-04T14:40:55.665415
2016-01-25T13:12:22
2016-01-25T13:12:33
48,222,841
0
5
null
null
null
null
UTF-8
Java
false
false
1,618
java
/* * BEGIN_HEADER - DO NOT EDIT * * The contents of this file are subject to the terms * of the Common Development and Distribution License * (the "License"). You may not use this file except * in compliance with the License. * * You can obtain a copy of the license at * https://open-jbi-components.dev.java.net/public/CDDLv1.0.html. * See the License for the specific language governing * permissions and limitations under the License. * * When distributing Covered Code, include this CDDL * HEADER in each file and include the License file at * https://open-jbi-components.dev.java.net/public/CDDLv1.0.html. * If applicable add the following below this CDDL HEADER, * with the fields enclosed by brackets "[]" replaced with * your own identifying information: Portions Copyright * [year] [name of copyright owner] */ /* * @(#)ProcessorFactory.java * * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved. * * END_HEADER - DO NOT EDIT */ package com.sun.jbi.crl.mep.proc; import javax.jbi.JBIException; import com.sun.jbi.crl.mep.Callback; /** * Lightweight factory for {@link Processor} instances. * * @author Kevan Simpson */ public interface ProcessorFactory { // TODO there should be some ConfigurationException class, don't use JBIException /** * Fetches (or creates) a {@link Processor}, which may <b>NOT</b> be null. */ public Processor getProcessor() throws JBIException; /** * Fetches (or creates) a {@link Callback}, which may be <code>null</code>. */ public Callback getCallback() throws JBIException; }
[ "bitbucket@bitbucket02.private.bitbucket.org" ]
bitbucket@bitbucket02.private.bitbucket.org
630e14faf63cffa3b6bb7923d8132e7b880df8ea
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/ali/user/mobile/util/RsaUtils.java
079530974777491569a6c971bc4897a5ee9ccfe9
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
242
java
package com.ali.user.mobile.util; import com.ali.user.mobile.AliUserInit; import com.ali.user.mobile.rsa.Rsa; public class RsaUtils { public static String a(String str) { return Rsa.a(str, Rsa.a(AliUserInit.b()).rsaPK); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
e55bd7b453686da1e5f539a59f5ee1d09194dd24
6792be6bd1d37efef43e89f3e86e2495f07ae15e
/src/main/java/coding/ninjas/recurcion_2/ReplaceCharacter.java
ebd28082436dd27bfec8cd0bf4910744c88376a9
[]
no_license
mayank-17/codingninja
9c5db1d6be52f29ab9e068b8bf7a6f8d61c497b5
90401e9b28225199d840598db7248e3bbaf6a00a
refs/heads/master
2020-06-16T19:08:00.577426
2018-09-16T04:19:18
2018-09-16T04:19:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
484
java
package coding.ninjas.recurcion_2; public class ReplaceCharacter { public static void main(String[] args) { String str="rajgdja"; char c1='a'; char c2='g'; System.out.println(replaceCharacter(str,c1,c2)); } public static String replaceCharacter(String input, char c1, char c2) { int l = input.length(); char arr[] = input.toCharArray(); for (int i = 0; i < l; i++) { if (arr[i] == c1) { arr[i] = c2; } } String ss = String.valueOf(arr); return ss; } }
[ "rajesh.kumar.raj.mca@gmail.com" ]
rajesh.kumar.raj.mca@gmail.com
dddfd1c6eca8837dc927c83c62474a97a1d7ead4
3c6fd96e2f29906c88055d3f2825534d0b3a1dc0
/src/lessons16/Drink/BarWithExecutorService.java
326860a4abe61aaabe7590a59451e295d3aca985
[]
no_license
Artemiy555/oop
baa2b804fa8affb0bd1980dc7a5a4ee885e1c8f9
21c1a11cf407c4b719ea25e3360ea33682413d49
refs/heads/master
2020-08-01T05:55:41.988497
2020-07-16T08:28:59
2020-07-16T08:28:59
210,889,941
0
0
null
null
null
null
UTF-8
Java
false
false
475
java
package lessons16.Drink; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class BarWithExecutorService { public static void main(String[] args) { ExecutorService executorService = Executors.newCachedThreadPool(); for (int drinker = 1; drinker <= 50; drinker++) { executorService.execute(new Drinker()); } executorService.shutdown(); ThreadUtils.println("Goodbye"); } }
[ "test" ]
test
4b1d24d8959f9385922fb3f966cc7904e0e22013
4dc211d1adaa8518a76d6cf7d57d70357d9183ff
/employeemvc_final/src/com/controller/EmployeeController.java
1494fa6d5e4e4b5a79155c22651ce2183bf39856
[]
no_license
JeonEunmi/ServletMVC-JSTL-EL
b2bfc91b44685d076a5e6ad3eadc35eab4688ae1
be9f5aa143dad97867ba954856a9fdddc08ba95b
refs/heads/master
2020-04-11T11:42:06.016300
2018-12-14T08:50:58
2018-12-14T08:50:58
161,756,750
0
0
null
null
null
null
UHC
Java
false
false
4,615
java
package com.controller; import java.io.FileReader; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.handler.*; public class EmployeeController extends HttpServlet { private static final long serialVersionUID = 1514600191056946354L; //Map 객체 준비 //<url, method_name> 매핑 정보 저장 private Map<String, String> commandMethodMap = new HashMap<>(); //서블릿 초기화 담당 메소드 //자동 호출 메소드 -> 최초 요청시 한 번만 호출된다 @Override public void init() throws ServletException { //사용자 요청주소 분석을 위한 환경 설정 파일을 메모리에 로딩 //로딩후 미리 준비된 Map객체에 정보 저장 예정 /* web.xml의 <init-param> 정보 확인 */ String configFile = getInitParameter("configFile"); //빈 프로퍼티(Map 컬렉션 한 형태) 객체 준비 //물리적 파일인 .properties 파일에 키, 값 저장 가능 Properties prop = new Properties(); //파일의 물리적 주소 확인 String configFilePath = getServletContext().getRealPath(configFile); try (FileReader fis = new FileReader(configFilePath)) { //물리적 파일인 .properties 파일을 읽어들여서 //프로퍼티(Map 컬렉션 한 형태) 객체로 등록 prop.load(fis); } catch (IOException e) { throw new ServletException(e); } //Iterator에 의한 키 탐색 Iterator<Object> keySet = prop.keySet().iterator(); while (keySet.hasNext()) { String key = (String) keySet.next(); //특정 키를 가지고 값 확인 String value = prop.getProperty(key); //System.out.printf("%s -> %s%n", key, value); //"hello" -> "메소드이름" //미리 준비된 Map 컬렉션에 메소드이름 저장 //사용자 요청주소와 맞는 메소드 정보 탐색을 위한 준비 과정 //->멤버변수(필드)에 저장된 상태이므로 다른 메소드에서 사용 가능 this.commandMethodMap.put(key, value); //"hello" -> "메소드이름" } } //자동 호출 메소드 -> GET 방식 호출 @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.processRequest(req, resp); } //자동 호출 메소드 -> POST 방식 호출 @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.processRequest(req, resp); } //통합 처리 메소드 protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //사용자 요청주소 분석 및 처리 //사용자 요청주소를 위한 환경 설정 파일 준비 //-> 프로퍼티(.properties) 파일 //-> 메모리에 로딩해서 Map 객체에 저장하는 과정 필요 //-> init() 메소드 //2단계. 요청 분석 -> URL 패턴 //-> 서브주소(/employee/*) 지정 필요 String url = request.getRequestURI(); //->/프로젝트주소/메인주소/서브주소 url = url.substring(request.getContextPath().length()); //->/메인주소/서브주소 //준비된 Handler 클래스의 특정 메소드 호출 //->서브주소와 매핑되는 메소드 호출 //->employee.properties 파일에 등록된 메소드 //->invoke("메소드이름") 메소드 필요 String method = this.commandMethodMap.get(url); Method m = null; String uri = ""; try { m = EmployeeHandler.class.getMethod(method, HttpServletRequest.class, HttpServletResponse.class); uri = (String)m.invoke(new EmployeeHandler(), request, response); } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { e.printStackTrace(); } //4단계. 알맞은 뷰(.jsp)로 포워딩 or 알맞은 서블릿으로 리다이렉트 //->if문 처리 필요 if (uri.contains(".jsp")) { RequestDispatcher dispatcher = request.getRequestDispatcher(uri); dispatcher.forward(request, response); } else { response.sendRedirect(uri); } } }
[ "bunny648@hanmail.net" ]
bunny648@hanmail.net
6c40c175d5528befafcf3c29456a00a11f310442
88af7fc5a813315df2732f938910b19aaa111ec0
/src/microbiosima/Individual.java
6c7d17ea130044c96d766d720849a9bbc480f32c
[]
no_license
RodrigoLab/Jmicrobiosima
3ea318b45aeed7f55b9b5ddecdc2a11d7c86d56e
ebfacfe903d7fc795b8d661ec967684e10208cdb
refs/heads/master
2021-01-10T15:28:20.022255
2015-05-20T19:49:37
2015-05-20T19:49:37
35,968,233
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
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 microbiosima; /** * * @author John */ public class Individual { private double[] microbiome;//NOTE: is that possible to use int[] private int numberEnvironmentalSpecies; private int numberMicrobePerHost; public Individual(String[] initial_microbiome, int nomph, int noes) { numberEnvironmentalSpecies = noes; microbiome = new double[numberEnvironmentalSpecies]; for (int i = 0; i < numberEnvironmentalSpecies; i++) { microbiome[i] = Double.parseDouble(initial_microbiome[i]); } numberMicrobePerHost = nomph; } public String microbial_sequences() { char[] microbiome_sequence = new char[numberEnvironmentalSpecies]; for (int i = 0; i < numberEnvironmentalSpecies; i++) { if (microbiome[i] > 0) { microbiome_sequence[i] = '1'; } else { microbiome_sequence[i] = '0'; } } return new String(microbiome_sequence); } /** * @return the microbiome */ public double[] getMicrobiome() { return microbiome; } // public double getMicrobiome(int i) { // return microbiome[i]; // } }
[ "stevenhwu@gmail.com" ]
stevenhwu@gmail.com
c4366af831a00430769b708eb446e6a77b730a5c
1121b7554594e6a130470e264523a16544ca3ec4
/CODE/035_Reading-user-input/src/Main.java
523f266478ed455fc123af3a5b8c7309fde6f176
[]
no_license
Ashleshk/Java-Programming-MasterClass
47e39ec6bfe82dd247c2e34d9139cef6702a34b3
3e642b84145db3ef65b13036651a171033d93d11
refs/heads/master
2022-09-03T10:39:28.063189
2020-05-23T10:26:26
2020-05-23T10:26:26
256,518,920
3
2
null
null
null
null
UTF-8
Java
false
false
220
java
public class Main { public static void main(String[] args) { //ReadingUserInput.readUserInput(); //ReadingUserInputChallenge.readUserInput(); MinAndMaxInputChallenge.minAndMaxInput(); } }
[ "ashleshuk@gmail.com" ]
ashleshuk@gmail.com
84ca4bad43bfaa78230f33ff6ce9244866fa7ab2
671daf60cdb46250214da19132bb7f21dbc29612
/designer/testSrc/com/android/tools/idea/uibuilder/scene/SceneComplexBaselineConnectionTest.java
18ef7f6f1d74e5fbfe652d1a40caaf3f63cd4a2a
[ "Apache-2.0" ]
permissive
JetBrains/android
3732f6fe3ae742182c2684a13ea8a1e6a996c9a1
9aa80ad909cf4b993389510e2c1efb09b8cdb5a0
refs/heads/master
2023-09-01T14:11:56.555718
2023-08-31T16:50:03
2023-08-31T16:53:27
60,701,247
947
255
Apache-2.0
2023-09-05T12:44:24
2016-06-08T13:46:48
Kotlin
UTF-8
Java
false
false
3,918
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tools.idea.uibuilder.scene; import static com.android.AndroidXConstants.CONSTRAINT_LAYOUT; import static com.android.SdkConstants.BUTTON; import com.android.tools.idea.common.fixtures.ModelBuilder; import com.android.tools.idea.common.scene.target.AnchorTarget; import com.android.tools.idea.uibuilder.handlers.constraint.targets.BaseLineToggleViewAction; import org.jetbrains.annotations.NotNull; /** * Test complex baseline connection interactions */ public class SceneComplexBaselineConnectionTest extends SceneTest { public void testConnectBaseline() { myInteraction.select("button1", true); myInteraction.performViewAction("button1", target -> target instanceof BaseLineToggleViewAction); myInteraction.mouseDown("button1", AnchorTarget.Type.BASELINE); myInteraction.mouseRelease("button2", AnchorTarget.Type.BASELINE); myScreen.get("@id/button1") .expectXml("<Button\n" + " android:id=\"@id/button1\"\n" + " android:layout_width=\"100dp\"\n" + " android:layout_height=\"50dp\"\n" + " android:text=\"Button\"\n" + " app:layout_constraintBaseline_toBaselineOf=\"@+id/button2\"\n" + " tools:layout_editor_absoluteX=\"56dp\" />"); } @Override @NotNull public ModelBuilder createModel() { ModelBuilder builder = model("constraint.xml", component(CONSTRAINT_LAYOUT.defaultName()) .id("@id/root") .withBounds(0, 0, 1000, 1000) .width("1000dp") .height("1000dp") .children( component(BUTTON) .id("@id/button1") .withBounds(56, 295, 100, 50) .width("100dp") .height("50dp") .withAttribute("android:text", "Button") .withAttribute("tools:layout_editor_absoluteX", "56dp") .withAttribute("android:layout_marginBottom", "46dp") .withAttribute("app:layout_constraintBottom_toBottomOf", "parent") .withAttribute("app:layout_constraintTop_toTopOf", "parent") .withAttribute("android:layout_marginTop", "8dp") .withAttribute("app:layout_constraintVertical_bias", "0.704"), component(BUTTON) .id("@id/button2") .withBounds(250, 170, 100, 50) .width("100dp") .height("50dp") .withAttribute("tools:layout_editor_absoluteX", "250dp") .withAttribute("tools:layout_editor_absoluteY", "170dp") )); return builder; } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
befc3e9dee70b76fd927b04e9d66e136a062957f
5fa9fec8eb6d7e15f903d798c1d9092176a0d019
/src/main/java/playground/agarwalamit/analysis/toll/TollInfoHandler.java
ac56433205e86323deff21a72757d0fcdb190b06
[]
no_license
hvss007/matsim-iitr
4acd52d8a293716e8a4667bc77b68d0696b2707f
e6d9bf32c178687b476d2180718d17e17ec2efde
refs/heads/master
2022-06-08T17:16:36.153891
2020-05-05T07:30:48
2020-05-05T07:30:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,452
java
/* *********************************************************************** * * project: org.matsim.* * * * *********************************************************************** * * * * copyright : (C) 2014 by the members listed in the COPYING, * * LICENSE and WARRANTY file. * * email : info at matsim dot org * * * * *********************************************************************** * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * See also COPYING, LICENSE and WARRANTY file * * * * *********************************************************************** */ package playground.agarwalamit.analysis.toll; import java.util.HashMap; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; import java.util.stream.Collectors; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.events.PersonMoneyEvent; import org.matsim.api.core.v01.events.handler.PersonMoneyEventHandler; import org.matsim.api.core.v01.population.Person; import playground.agarwalamit.utils.MapUtils; /** * @author amit */ public class TollInfoHandler implements PersonMoneyEventHandler { private final SortedMap<Double, Map<Id<Person>,Double> > timeBin2Person2Toll = new TreeMap<>(); private final double timeBinSize; public TollInfoHandler (final double simulationEndTime, final int numberOfTimeBins) { this.timeBinSize = simulationEndTime/numberOfTimeBins; } @Override public void reset(int iteration) { timeBin2Person2Toll.clear(); } @Override public void handleEvent(PersonMoneyEvent event) { double endOfTimeInterval = Math.max(1, Math.ceil( event.getTime()/this.timeBinSize) ) * this.timeBinSize; if( timeBin2Person2Toll.containsKey(endOfTimeInterval) ) { Map<Id<Person>,Double> person2Toll = timeBin2Person2Toll.get(endOfTimeInterval); if( person2Toll.containsKey(event.getPersonId()) ) { person2Toll.put(event.getPersonId(), event.getAmount() + person2Toll.get(event.getPersonId()) ); } else { person2Toll.put(event.getPersonId(), event.getAmount()); } } else { Map<Id<Person>,Double> person2Toll = new HashMap<>(); person2Toll.put(event.getPersonId(), event.getAmount()); timeBin2Person2Toll.put(endOfTimeInterval, person2Toll); } } /** * @return time bin to person id to toll value */ public SortedMap<Double,Map<Id<Person>,Double>> getTimeBin2Person2Toll() { return timeBin2Person2Toll; } /** * @return timeBin to toll values for whole population */ public SortedMap<Double,Double> getTimeBin2Toll(){ return new TreeMap<>(this.timeBin2Person2Toll .entrySet() .stream() .collect(Collectors.toMap(e -> e.getKey(), e -> MapUtils.doubleValueSum(e.getValue())))); } }
[ "amit.agarwal@campus.tu-berlin.de" ]
amit.agarwal@campus.tu-berlin.de
56b257ed47231aec9181329cec882d3434fc92cd
602edba2b6df30a9c4b59225e89f1caac52e31ca
/AMT-Services/src/main/java/am/infrastructure/am/impl/ASE.java
a6139821e0a2c6108f0cca5d2abe72849fa661ae
[]
no_license
AhmedMater/AMT
56c21158dd2fa147d4a509bfab190008a7ebf5de
1dd983702a8ca647c4b69084473aa76cfbb64835
refs/heads/master
2021-09-06T22:57:15.605967
2018-02-13T01:10:35
2018-02-13T01:10:35
104,482,818
0
0
null
null
null
null
UTF-8
Java
false
false
1,848
java
package am.infrastructure.am.impl; import am.main.data.enums.CodeTypes; import am.main.spi.AMCode; /** * Created by ahmed.motair on 1/27/2018. */ public class ASE extends AMCode { private static final String COURSE = "COR"; private static final String USER = "USR"; public static final ASE E_USR_1 = new ASE(1, USER), E_USR_2 = new ASE(2, USER), E_USR_3 = new ASE(3, USER), E_USR_4 = new ASE(4, USER), E_USR_5 = new ASE(5, USER), E_USR_6 = new ASE(6, USER), E_USR_7 = new ASE(7, USER), E_USR_8 = new ASE(8, USER), E_USR_9 = new ASE(9, USER), E_USR_10 = new ASE(10, USER), E_USR_11 = new ASE(11, USER), E_USR_12 = new ASE(12, USER), E_USR_13 = new ASE(13, USER), E_USR_14 = new ASE(14, USER), E_USR_15 = new ASE(15, USER), E_USR_16 = new ASE(16, USER), E_USR_17 = new ASE(17, USER), E_USR_18 = new ASE(18, USER), E_USR_19 = new ASE(19, USER), E_USR_20 = new ASE(20, USER), E_USR_21 = new ASE(21, USER), E_USR_22 = new ASE(22, USER), E_USR_23 = new ASE(23, USER), E_USR_24 = new ASE(24, USER), E_USR_25 = new ASE(25, USER), E_USR_26 = new ASE(26, USER), E_USR_27 = new ASE(27, USER), E_USR_28 = new ASE(28, USER), E_USR_29 = new ASE(29, USER), E_USR_30 = new ASE(30, USER); public static final ASE E_COR_1 = new ASE(1, COURSE), E_COR_2 = new ASE(2, COURSE), E_COR_3 = new ASE(3, COURSE), E_COR_4 = new ASE(4, COURSE), E_COR_5 = new ASE(5, COURSE), E_COR_6 = new ASE(6, COURSE), E_COR_7 = new ASE(7, COURSE), E_COR_8 = new ASE(8, COURSE), E_COR_9 = new ASE(9, COURSE); private ASE(Integer CODE_ID, String CODE_NAME) { super(CodeTypes.ERROR, false, CODE_ID, CODE_NAME, null, "AMT"); } }
[ "ahmedmotair@gmail.com" ]
ahmedmotair@gmail.com
8e29096231f388b5ece1939511a0056802a8f5b7
19d22609913e7b6b38c8d3a1491a0cd9b0c2e10e
/fish-service/src/main/java/com/ff/shop/service/NewsMediaServiceImpl.java
098d48960bd5228c0318550112a62859b6bcc93f
[]
no_license
id-jinxiaoming/guanwang
f97ea5270ad2481b48585ed2bd236bf5e4a79ae9
0060e7b555e099be5689d53fabea9afa1f1e847f
refs/heads/master
2023-02-04T13:22:57.337457
2020-12-28T02:26:15
2020-12-28T02:26:15
324,892,025
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.ff.shop.service; import com.alibaba.dubbo.config.annotation.Service; import com.ff.common.base.BaseServiceImpl; import com.ff.shop.model.NewsMedia; @Service public class NewsMediaServiceImpl extends BaseServiceImpl<NewsMedia> implements NewsMediaService { @Override public Integer setDefault(Integer id) { NewsMedia map=new NewsMedia(); map.setIsRoofPlacement(0); mapper.update(map,null); map.setIsRoofPlacement(1); map.setId(id); return mapper.updateById(map); } }
[ "1031257666@qq.com" ]
1031257666@qq.com
a6f8888831bf145fa30989ff7b9de9dc2ecbe8dd
d67756b173be5c999f127722b1e0276f2eea7ac3
/WhileLoop/src/MinNumber.java
90897eb4d9df659e44bb41ddfde5b759b2a5a83a
[]
no_license
Polina-MD80/Basics-SoftUni
e5f6b7c70dc69db9405a01fe75eba7228fe339e1
6898ec29bd8713cb3f4ec488506032a073fb8d87
refs/heads/master
2023-01-28T00:10:55.041183
2020-12-05T08:22:00
2020-12-05T08:22:00
318,737,770
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
import java.util.Scanner; public class MinNumber { public static void main (String[] args) { Scanner scanner = new Scanner (System.in); String number = scanner.nextLine (); int minNum = Integer.MAX_VALUE; while (!(number.equals ("Stop"))){ int num = Integer.parseInt (number); if (num<=minNum){ minNum=num; } number= scanner.nextLine (); } System.out.println (minNum); } }
[ "poli.paskaleva@gmail.com" ]
poli.paskaleva@gmail.com
faa8edc5a7d42e5b7e9ba88a90804dabd01b0220
e9b20028c6ec19e03173e920e702b3fbe93ee3b3
/ExampleProject/xalan-j_2_7_0/src/org/apache/xml/serializer/Serializer.java
00d4b87ac6efbebabf95baa7ebfd014d7e6755ab
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
pysherlock/Antipatterns
65706a523b65a4158e10d6d32dd11cbc8168f8af
8e78bd49f4c89a3f0bae83bb1634ebcd69505b20
refs/heads/master
2021-01-01T06:10:35.179453
2015-04-30T13:12:16
2015-04-30T13:12:16
33,727,668
0
0
null
null
null
null
UTF-8
Java
false
false
8,176
java
/* * Copyright 1999-2004 The Apache Software Foundation. * * 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. */ /* * $Id: Serializer.java,v 1.5 2005/04/07 04:29:03 minchau Exp $ */ package org.apache.xml.serializer; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.util.Properties; import org.xml.sax.ContentHandler; /** * The Serializer interface is implemented by a serializer to enable users to: * <ul> * <li>get and set streams or writers * <li>configure the serializer with key/value properties * <li>get an org.xml.sax.ContentHandler or a DOMSerializer to provide input to * </ul> * * <p> * Here is an example using the asContentHandler() method: * <pre> * java.util.Properties props = * OutputPropertiesFactory.getDefaultMethodProperties(Method.TEXT); * Serializer ser = SerializerFactory.getSerializer(props); * java.io.PrintStream ostream = System.out; * ser.setOutputStream(ostream); * * // Provide the SAX input events * ContentHandler handler = ser.asContentHandler(); * handler.startDocument(); * char[] chars = { 'a', 'b', 'c' }; * handler.characters(chars, 0, chars.length); * handler.endDocument(); * * ser.reset(); // get ready to use the serializer for another document * // of the same output method (TEXT). * </pre> * * <p> * As an alternate to supplying a series of SAX events as input through the * ContentHandler interface, the input to serialize may be given as a DOM. * <p> * For example: * <pre> * org.w3c.dom.Document inputDoc; * org.apache.xml.serializer.Serializer ser; * java.io.Writer owriter; * * java.util.Properties props = * OutputPropertiesFactory.getDefaultMethodProperties(Method.XML); * Serializer ser = SerializerFactory.getSerializer(props); * owriter = ...; // create a writer to serialize the document to * ser.setWriter( owriter ); * * inputDoc = ...; // create the DOM document to be serialized * DOMSerializer dser = ser.asDOMSerializer(); // a DOM will be serialized * dser.serialize(inputDoc); // serialize the DOM, sending output to owriter * * ser.reset(); // get ready to use the serializer for another document * // of the same output method. * </pre> * * This interface is a public API. * * @see Method * @see OutputPropertiesFactory * @see SerializerFactory * @see DOMSerializer * @see ContentHandler * * @xsl.usage general */ public interface Serializer { /** * Specifies an output stream to which the document should be * serialized. This method should not be called while the * serializer is in the process of serializing a document. * <p> * The encoding specified in the output {@link Properties} is used, or * if no encoding was specified, the default for the selected * output method. * <p> * Only one of setWriter() or setOutputStream() should be called. * * @param output The output stream */ public void setOutputStream(OutputStream output); /** * Get the output stream where the events will be serialized to. * * @return reference to the result stream, or null if only a writer was * set. */ public OutputStream getOutputStream(); /** * Specifies a writer to which the document should be serialized. * This method should not be called while the serializer is in * the process of serializing a document. * <p> * The encoding specified for the output {@link Properties} must be * identical to the output format used with the writer. * * <p> * Only one of setWriter() or setOutputStream() should be called. * * @param writer The output writer stream */ public void setWriter(Writer writer); /** * Get the character stream where the events will be serialized to. * * @return Reference to the result Writer, or null. */ public Writer getWriter(); /** * Specifies an output format for this serializer. It the * serializer has already been associated with an output format, * it will switch to the new format. This method should not be * called while the serializer is in the process of serializing * a document. * <p> * The standard property keys supported are: "method", "version", "encoding", * "omit-xml-declaration", "standalone", doctype-public", * "doctype-system", "cdata-section-elements", "indent", "media-type". * These property keys and their values are described in the XSLT recommendation, * see {@link <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a>} * <p> * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}. * * <p> * This method can be called multiple times before a document is serialized. Each * time it is called more, or over-riding property values, can be specified. One * property value that can not be changed is that of the "method" property key. * <p> * The value of the "cdata-section-elements" property key is a whitespace * separated list of elements. If the element is in a namespace then * value is passed in this format: {uri}localName * <p> * If the "cdata-section-elements" key is specified on multiple calls * to this method the set of elements specified in the value * is not replaced from one call to the * next, but it is cumulative across the calls. * * @param format The output format to use, as a set of key/value pairs. */ public void setOutputFormat(Properties format); /** * Returns the output format properties for this serializer. * * @return The output format key/value pairs in use. */ public Properties getOutputFormat(); /** * Return a {@link ContentHandler} interface to provide SAX input to. * Through the returned object the document to be serailized, * as a series of SAX events, can be provided to the serialzier. * If the serializer does not support the {@link ContentHandler} * interface, it will return null. * <p> * In principle only one of asDOMSerializer() or asContentHander() * should be called. * * @return A {@link ContentHandler} interface into this serializer, * or null if the serializer is not SAX 2 capable * @throws IOException An I/O exception occured */ public ContentHandler asContentHandler() throws IOException; /** * Return a {@link DOMSerializer} interface into this serializer. * Through the returned object the document to be serialized, * a DOM, can be provided to the serializer. * If the serializer does not support the {@link DOMSerializer} * interface, it should return null. * <p> * In principle only one of asDOMSerializer() or asContentHander() * should be called. * * @return A {@link DOMSerializer} interface into this serializer, * or null if the serializer is not DOM capable * @throws IOException An I/O exception occured */ public DOMSerializer asDOMSerializer() throws IOException; /** * This method resets the serializer. * If this method returns true, the * serializer may be used for subsequent serialization of new * documents. It is possible to change the output format and * output stream prior to serializing, or to reuse the existing * output format and output stream or writer. * * @return True if serializer has been reset and can be reused */ public boolean reset(); }
[ "pu_yang@outlook.com" ]
pu_yang@outlook.com
4f4ffbb990f56826ef81b665bbcbd646b562f917
deb2bdb3777b94672a95cf9178e1c1ac035b0a33
/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/management/ThreadDumpEndpointWebExtension.java
76a1f38a301d1293177525eeb2067d3dd48a0ce6
[ "Apache-2.0" ]
permissive
marcingrzejszczak/spring-boot
fd21b7705b2189022be9a989c28de0ecc5c881bd
64f4da80cb65e39214910cea93de03584922177d
refs/heads/main
2023-02-10T08:56:59.318554
2022-09-20T14:39:56
2022-09-20T14:42:52
45,314,951
1
0
Apache-2.0
2022-09-09T09:21:48
2015-10-31T19:20:04
Java
UTF-8
Java
false
false
2,141
java
/* * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.actuate.management; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse; import org.springframework.boot.actuate.endpoint.web.annotation.EndpointWebExtension; import org.springframework.boot.actuate.management.ThreadDumpEndpoint.ThreadDumpDescriptor; import org.springframework.boot.actuate.management.ThreadDumpEndpoint.ThreadDumperUnavailableException; /** * {@link EndpointWebExtension @EndpointWebExtension} for the {@link ThreadDumpEndpoint}. * * @author Moritz Halbritter * @since 3.0.0 */ @EndpointWebExtension(endpoint = ThreadDumpEndpoint.class) public class ThreadDumpEndpointWebExtension { private final ThreadDumpEndpoint delegate; public ThreadDumpEndpointWebExtension(ThreadDumpEndpoint delegate) { this.delegate = delegate; } @ReadOperation public WebEndpointResponse<ThreadDumpDescriptor> threadDump() { try { return new WebEndpointResponse<>(this.delegate.threadDump()); } catch (ThreadDumperUnavailableException ex) { return new WebEndpointResponse<>(WebEndpointResponse.STATUS_SERVICE_UNAVAILABLE); } } @ReadOperation(produces = "text/plain;charset=UTF-8") public WebEndpointResponse<String> textThreadDump() { try { return new WebEndpointResponse<>(this.delegate.textThreadDump()); } catch (ThreadDumperUnavailableException ex) { return new WebEndpointResponse<>(WebEndpointResponse.STATUS_SERVICE_UNAVAILABLE); } } }
[ "snicoll@vmware.com" ]
snicoll@vmware.com
c8102edf1f0b7827878bb3e683a792b6bb195617
7bf9512e1cc49641ad80e55d43bfbd41b6903e03
/Rabbitmq-java/src/main/java/com/bing/rabbitmq/DeclareExchangeQueue.java
3ad1c446bd715660b90370b74a65894b5393ff67
[]
no_license
lanboys/RabbitMQDemo
26a86b636a98b4f79abb4364a5667b331c4296ea
2ffac87b677f460bc2d4bc1d11cd5c1c54bffa55
refs/heads/master
2022-12-22T14:52:38.383591
2020-04-14T07:56:01
2020-04-14T07:56:01
177,506,753
0
0
null
2022-12-16T06:52:15
2019-03-25T03:20:17
Java
UTF-8
Java
false
false
1,287
java
package com.bing.rabbitmq; import com.rabbitmq.client.BuiltinExchangeType; /** * Created by lb on 2020/4/14. */ public class DeclareExchangeQueue { public final static String queue_direct = "queue_direct"; public final static String exchange_direct = "exchange_direct"; public final static String routing_key_direct = "routing_key_direct"; public final static String queue_fanout_1 = "queue_fanout_1"; public final static String queue_fanout_2 = "queue_fanout_2"; public final static String exchange_fanout = "exchange_fanout"; public final static String routing_key_fanout = ""; public static void main(String[] args) { declare(); } public static void declare() { try { RabbitMQUtil.createDeclareChannel(queue_direct, exchange_direct, BuiltinExchangeType.DIRECT, routing_key_direct, true).close(); RabbitMQUtil.createDeclareChannel(queue_fanout_1, exchange_fanout, BuiltinExchangeType.FANOUT, routing_key_fanout, true).close(); RabbitMQUtil.createDeclareChannel(queue_fanout_2, exchange_fanout, BuiltinExchangeType.FANOUT, routing_key_fanout, true).close(); RabbitMQUtil.closeConnection(); } catch (Exception e) { e.printStackTrace(); } } }
[ "lan_bing2013@163.com" ]
lan_bing2013@163.com
491da8a22504fbe31a810bb93e90ddd71d146a1c
329307375d5308bed2311c178b5c245233ac6ff1
/src/com/tencent/mm/d/a/em.java
2322a9a5f085e5f9eccffdfaa61bc07589e4fb35
[]
no_license
ZoneMo/com.tencent.mm
6529ac4c31b14efa84c2877824fa3a1f72185c20
dc4f28aadc4afc27be8b099e08a7a06cee1960fe
refs/heads/master
2021-01-18T12:12:12.843406
2015-07-05T03:21:46
2015-07-05T03:21:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
831
java
package com.tencent.mm.d.a; import com.tencent.mm.sdk.c.d; import java.util.List; public final class em extends d { public static boolean atN = false; public static boolean atO = false; public a aAU = new a(); public b aAV = new b(); public em() { id = "NetSceneLbsFind"; hXT = atO; } public static final class a { public boolean aAC = false; public float aAW = 0.0F; public float aAX = 0.0F; public int aAY = 0; public int aAZ = 0; public String aBa; public String aBb; public int axw = 0; } public static final class b { public boolean aBc = false; public List aBd; public int aBe = -1; public int axw = 0; } } /* Location: * Qualified Name: com.tencent.mm.d.a.em * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
b1dcaa711722e3cd1294f4142e0d7c56b088db88
e2df03554a0bdcb32ce30b8c657375d9cb36a626
/arc-core/src/io/anuke/arc/graphics/TextureArrayData.java
4f2a4cf33d40a5ec1dbd6e4d8476ce883c7ce742
[]
no_license
todun/Arc-2
4dbd5b2efb616b13cfedebba875bb45b7715fad0
c7f3d8125c8d13c0a31c5f14fdabdb3d0efbd676
refs/heads/master
2020-09-21T10:07:44.440002
2019-11-26T04:48:28
2019-11-26T04:48:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,418
java
package io.anuke.arc.graphics; import io.anuke.arc.files.FileHandle; import io.anuke.arc.graphics.glutils.FileTextureArrayData; /** * Used by a {@link TextureArray} to load the pixel data. The TextureArray will request the TextureArrayData to prepare itself through * {@link #prepare()} and upload its data using {@link #consumeTextureArrayData()}. These are the first methods to be called by TextureArray. * After that the TextureArray will invoke the other methods to find out about the size of the image data, the format, whether the * TextureArrayData is able to manage the pixel data if the OpenGL ES context is lost.</p> * <p> * Before a call to either {@link #consumeTextureArrayData()}, TextureArray will bind the OpenGL ES texture.</p> * <p> * Look at {@link FileTextureArrayData} for example implementation of this interface. * @author Tomski */ public interface TextureArrayData{ /** @return whether the TextureArrayData is prepared or not. */ boolean isPrepared(); /** * Prepares the TextureArrayData for a call to {@link #consumeTextureArrayData()}. This method can be called from a non OpenGL thread and * should thus not interact with OpenGL. */ void prepare(); /** * Uploads the pixel data of the TextureArray layers of the TextureArray to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A * call to {@link #prepare()} must preceed a call to this method. Any internal data structures created in {@link #prepare()} * should be disposed of here. */ void consumeTextureArrayData(); /** @return the width of this TextureArray */ int getWidth(); /** @return the height of this TextureArray */ int getHeight(); /** @return the layer count of this TextureArray */ int getDepth(); /** @return whether this implementation can cope with a EGL context loss. */ boolean isManaged(); /** @return the internal format of this TextureArray */ int getInternalFormat(); /** @return the GL type of this TextureArray */ int getGLType(); /** * Provides static method to instantiate the right implementation. * @author Tomski */ class Factory{ public static TextureArrayData loadFromFiles(Pixmap.Format format, boolean useMipMaps, FileHandle... files){ return new FileTextureArrayData(format, useMipMaps, files); } } }
[ "arnukren@gmail.com" ]
arnukren@gmail.com
69e096cd19c2edfda13edb1b900aee432e2344f8
df134b422960de6fb179f36ca97ab574b0f1d69f
/it/unimi/dsi/fastutil/floats/AbstractFloat2ObjectSortedMap.java
642377eca20ecdf85c311e27852d0f37b2f8381b
[]
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
6,075
java
/* */ package it.unimi.dsi.fastutil.floats; /* */ /* */ import it.unimi.dsi.fastutil.objects.AbstractObjectCollection; /* */ import it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator; /* */ import it.unimi.dsi.fastutil.objects.ObjectCollection; /* */ import it.unimi.dsi.fastutil.objects.ObjectIterator; /* */ import java.util.Collection; /* */ import java.util.Comparator; /* */ import java.util.Iterator; /* */ import java.util.Set; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public abstract class AbstractFloat2ObjectSortedMap<V> /* */ extends AbstractFloat2ObjectMap<V> /* */ implements Float2ObjectSortedMap<V> /* */ { /* */ private static final long serialVersionUID = -1773560792952436569L; /* */ /* */ public FloatSortedSet keySet() { /* 47 */ return new KeySet(); /* */ } /* */ /* */ protected class KeySet /* */ extends AbstractFloatSortedSet { /* */ public boolean contains(float k) { /* 53 */ return AbstractFloat2ObjectSortedMap.this.containsKey(k); /* */ } /* */ /* */ public int size() { /* 57 */ return AbstractFloat2ObjectSortedMap.this.size(); /* */ } /* */ /* */ public void clear() { /* 61 */ AbstractFloat2ObjectSortedMap.this.clear(); /* */ } /* */ /* */ public FloatComparator comparator() { /* 65 */ return AbstractFloat2ObjectSortedMap.this.comparator(); /* */ } /* */ /* */ public float firstFloat() { /* 69 */ return AbstractFloat2ObjectSortedMap.this.firstFloatKey(); /* */ } /* */ /* */ public float lastFloat() { /* 73 */ return AbstractFloat2ObjectSortedMap.this.lastFloatKey(); /* */ } /* */ /* */ public FloatSortedSet headSet(float to) { /* 77 */ return AbstractFloat2ObjectSortedMap.this.headMap(to).keySet(); /* */ } /* */ /* */ public FloatSortedSet tailSet(float from) { /* 81 */ return AbstractFloat2ObjectSortedMap.this.tailMap(from).keySet(); /* */ } /* */ /* */ public FloatSortedSet subSet(float from, float to) { /* 85 */ return AbstractFloat2ObjectSortedMap.this.subMap(from, to).keySet(); /* */ } /* */ /* */ public FloatBidirectionalIterator iterator(float from) { /* 89 */ return new AbstractFloat2ObjectSortedMap.KeySetIterator(AbstractFloat2ObjectSortedMap.this.float2ObjectEntrySet().iterator(new AbstractFloat2ObjectMap.BasicEntry(from, null))); /* */ } /* */ /* */ public FloatBidirectionalIterator iterator() { /* 93 */ return new AbstractFloat2ObjectSortedMap.KeySetIterator(Float2ObjectSortedMaps.fastIterator(AbstractFloat2ObjectSortedMap.this)); /* */ } /* */ } /* */ /* */ /* */ /* */ protected static class KeySetIterator<V> /* */ implements FloatBidirectionalIterator /* */ { /* */ protected final ObjectBidirectionalIterator<Float2ObjectMap.Entry<V>> i; /* */ /* */ /* */ public KeySetIterator(ObjectBidirectionalIterator<Float2ObjectMap.Entry<V>> i) { /* 106 */ this.i = i; /* */ } /* */ /* */ public float nextFloat() { /* 110 */ return ((Float2ObjectMap.Entry)this.i.next()).getFloatKey(); /* */ } /* */ /* */ public float previousFloat() { /* 114 */ return ((Float2ObjectMap.Entry)this.i.previous()).getFloatKey(); /* */ } /* */ /* */ public boolean hasNext() { /* 118 */ return this.i.hasNext(); /* */ } /* */ /* */ public boolean hasPrevious() { /* 122 */ return this.i.hasPrevious(); /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public ObjectCollection<V> values() { /* 140 */ return (ObjectCollection<V>)new ValuesCollection(); /* */ } /* */ /* */ protected class ValuesCollection /* */ extends AbstractObjectCollection<V> { /* */ public ObjectIterator<V> iterator() { /* 146 */ return new AbstractFloat2ObjectSortedMap.ValuesIterator<>(Float2ObjectSortedMaps.fastIterator(AbstractFloat2ObjectSortedMap.this)); /* */ } /* */ /* */ public boolean contains(Object k) { /* 150 */ return AbstractFloat2ObjectSortedMap.this.containsValue(k); /* */ } /* */ /* */ public int size() { /* 154 */ return AbstractFloat2ObjectSortedMap.this.size(); /* */ } /* */ /* */ public void clear() { /* 158 */ AbstractFloat2ObjectSortedMap.this.clear(); /* */ } /* */ } /* */ /* */ /* */ /* */ protected static class ValuesIterator<V> /* */ implements ObjectIterator<V> /* */ { /* */ protected final ObjectBidirectionalIterator<Float2ObjectMap.Entry<V>> i; /* */ /* */ /* */ public ValuesIterator(ObjectBidirectionalIterator<Float2ObjectMap.Entry<V>> i) { /* 171 */ this.i = i; /* */ } /* */ /* */ public V next() { /* 175 */ return ((Float2ObjectMap.Entry<V>)this.i.next()).getValue(); /* */ } /* */ /* */ public boolean hasNext() { /* 179 */ return this.i.hasNext(); /* */ } /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\i\\unimi\dsi\fastutil\floats\AbstractFloat2ObjectSortedMap.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
612dbb814698c8f0ee0f3453c592b4c90c1f6e55
d3c7ebf71409a901db676ce376554c072ca81314
/src/main/java/bitcamp/team/domain/ManualPrecaution.java
b9c2b81eca98d014a1e94c9eb9454aad31d52bb5
[]
no_license
eikhyeonchoi/project_ohora
c109375672127ab5190adf446722e9e92e26414e
60b3e3700ba058954ab2ee0bf3a41eecfff4c870
refs/heads/master
2022-02-12T23:26:25.866134
2019-07-30T08:54:09
2019-07-30T08:54:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
784
java
package bitcamp.team.domain; public class ManualPrecaution { private int no; private int manualNo; private String title; private String contents; private String media; public int getNo() { return no; } public void setNo(int no) { this.no = no; } public int getManualNo() { return manualNo; } public void setManualNo(int manualNo) { this.manualNo = manualNo; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContents() { return contents; } public void setContents(String contents) { this.contents = contents; } public String getMedia() { return media; } public void setMedia(String media) { this.media = media; } }
[ "eikhyeon.choi@gmail.com" ]
eikhyeon.choi@gmail.com
5b53beebb71ff62bd5039b19aad9639105d09a15
e7a95b90343d9ce399151c924b4a1b9dd9d0c5cd
/src/com/test/CaseManagerAdd.java
d9ad770ea14fa002d7ccd7cb1d4995728eeddfd6
[]
no_license
amrutheshag/Macro-soft
8524ddb3cd249e53241bf79974adb2f3deebb93b
cb7745210688a9911e33a6b7768fa8cb82208d46
refs/heads/master
2020-04-14T05:00:50.333746
2018-12-31T08:18:55
2018-12-31T08:18:55
163,651,252
0
0
null
null
null
null
UTF-8
Java
false
false
4,453
java
package com.test; import java.io.FileInputStream; import org.apache.log4j.xml.DOMConfigurator; import org.openqa.selenium.WebDriver; import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; import com.pages.CaseManagerListingPage; import com.pages.HomePage; import com.pages.LoginPage; import com.pages.ProvidersPage; import utility.BrowserUtils; import utility.Constant; import utility.ExcelUtils; import utility.Log; public class CaseManagerAdd { WebDriver driver; FileInputStream fis; @Test public void CaseManagerAddTestScript() throws Exception{ DOMConfigurator.configure("log4j.xml"); System.out.println("\n*****************************************************\n"); Log.info("\n*****************************************************\n"); System.out.println("Executing Case Manager- Add"); Log.info("Executing Case Manager- Add "); try{ String Path=Constant.Path_TestData + Constant.File_CaseManagersData; int rowCount=ExcelUtils.setExcelFile(Path, "Sheet1"); for (int count=1; count<=rowCount; count++){ String code= ExcelUtils.getCellData(count,1); String name=ExcelUtils.getCellData(count,2); String newCode= ExcelUtils.getCellData(count, 3); String newName= ExcelUtils.getCellData(count, 4); String city= ExcelUtils.getCellData(count, 5); String startDate= ExcelUtils.getCellData(count, 6); String endDate= ExcelUtils.getCellData(count, 7); String active= ExcelUtils.getCellData(count, 8); String subject= ExcelUtils.getCellData(count, 9); String type = ExcelUtils.getCellData(count, 10); String status = ExcelUtils.getCellData(count, 11); String priority = ExcelUtils.getCellData(count, 12); String followupDate = ExcelUtils.getCellData(count, 13); String noteType = ExcelUtils.getCellData(count, 14); String medium = ExcelUtils.getCellData(count, 15); String details = ExcelUtils.getCellData(count, 16); if (ExcelUtils.getCellData(count,0).isEmpty()) {System.out.println("End of Test Data");} else{ System.out.println("\n----------------------------------------------------\n"); System.out.println("Case Manager add- Running Iteration No: " + ExcelUtils.getCellData(count,0)); System.out.println("\n----------------------------------------------------\n"); Log.info("----------------------------------------------------"); Log.info("Case Manager add- Running Iteration No: " + ExcelUtils.getCellData(count,0)); Log.info("----------------------------------------------------"); addCaseManagerMultiple(driver,code, name, startDate, endDate, active); } } }catch (Exception e) {System.out.println("Test Data File not found");e.printStackTrace();} } public void addCaseManagerMultiple(WebDriver driver,String code, String name, String startDate, String endDate, String active) throws Exception { // Launch Chrome Browser driver= BrowserUtils.openChromeBrowser(); //open risk manager driver.get(Constant.URL); System.out.println("opened browser"); //click network user LoginPage loginPageObject = new LoginPage(driver); loginPageObject.clickNetworkUser(); //click providers HomePage homePageObject = new HomePage(driver); try{ homePageObject.clickExitMyOpenCaseListing(); }catch(Exception e) { System.out.println("Blank Home Page"); Log.info("log4j - msg -Blank Home Page");} homePageObject.clickProviders(); Thread.sleep(2000); //click case managers ProvidersPage providersPageObject = new ProvidersPage(driver); providersPageObject.clickOnCaseManagers(); Thread.sleep(2000); //add CaseManagerListingPage caseManagerListingPageObject = new CaseManagerListingPage(driver); caseManagerListingPageObject.addCaseManager( code, name, startDate, endDate, active); } @AfterMethod public void afterMethod() throws Exception { if (driver!=null) driver.quit(); System.out.println("Done with Case Manager-Add \n\n"); if (fis != null) fis.close(); } }
[ "agavirangappa@MAC-LAP-125.macrosoftindia.com" ]
agavirangappa@MAC-LAP-125.macrosoftindia.com
17a455f5e56dfc53ba2efdbd2774b22415e305aa
bfba3b96cd5d8706ff3238c6ce9bf10967af89cf
/src/main/java/com/robertx22/age_of_exile/database/data/spells/components/MapHolder.java
73805fe374bfebec61df71f75e6c734d91a86921
[]
no_license
panbanann/Age-of-Exile
e6077d89a5ab8f2389e9926e279aa8360960c65a
cc54a9aa573dec42660b0684fffbf653015406cf
refs/heads/master
2023-04-12T14:16:56.379334
2021-05-04T21:13:19
2021-05-04T21:13:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,063
java
package com.robertx22.age_of_exile.database.data.spells.components; import com.robertx22.age_of_exile.database.data.exile_effects.ExileEffect; import com.robertx22.age_of_exile.database.data.spells.SetAdd; import com.robertx22.age_of_exile.database.data.spells.components.actions.AggroAction; import com.robertx22.age_of_exile.database.data.spells.components.actions.ExileEffectAction.GiveOrTake; import com.robertx22.age_of_exile.database.data.spells.components.actions.SummonProjectileAction; import com.robertx22.age_of_exile.database.data.spells.components.actions.vanity.ParticleInRadiusAction; import com.robertx22.age_of_exile.database.data.spells.map_fields.MapField; import com.robertx22.age_of_exile.database.data.value_calc.ValueCalculation; import com.robertx22.age_of_exile.database.registry.Database; import com.robertx22.age_of_exile.uncommon.enumclasses.AttackType; import com.robertx22.age_of_exile.uncommon.enumclasses.Elements; import com.robertx22.age_of_exile.uncommon.utilityclasses.DashUtils; import com.robertx22.age_of_exile.uncommon.utilityclasses.EntityFinder; import net.minecraft.block.Block; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.particle.DefaultParticleType; import net.minecraft.sound.SoundEvent; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; import java.util.HashMap; import static com.robertx22.age_of_exile.database.data.spells.map_fields.MapField.EXILE_POTION_ID; import static com.robertx22.age_of_exile.database.data.spells.map_fields.MapField.POTION_ID; public class MapHolder { public String type; private HashMap<String, Object> map = new HashMap<>(); public boolean has(MapField f) { return map.containsKey(f.GUID()); } public <T> MapHolder put(MapField<T> field, T t) { if (field == MapField.VALUE_CALCULATION) { this.map.put(field.GUID(), ((ValueCalculation) t).GUID()); return this; } this.map.put(field.GUID(), t); return this; } public <T> T get(MapField<T> field) { if (field == MapField.VALUE_CALCULATION) { return (T) Database.ValueCalculations() .get((String) map.get(field.GUID())); } return (T) map.get(field.GUID()); } public ExileEffect getExileEffect() { return Database.ExileEffects() .get(get(EXILE_POTION_ID)); } public AttackType getDmgEffectType() { return AttackType.valueOf(get(MapField.DMG_EFFECT_TYPE)); } public StatusEffect getPotion() { return Registry.STATUS_EFFECT.get(new Identifier(get(POTION_ID))); } public Elements getElement() { return Elements.valueOf(get(MapField.ELEMENT)); } public DashUtils.Way getPushWay() { return DashUtils.Way.valueOf(get(MapField.PUSH_WAY)); } public AggroAction.Type getAggro() { return AggroAction.Type.valueOf(get(MapField.AGGRO_TYPE)); } public GiveOrTake getPotionAction() { return GiveOrTake.valueOf(get(MapField.POTION_ACTION)); } public SummonProjectileAction.ShootWay getOrDefault(SummonProjectileAction.ShootWay way) { String f = getOrDefault(MapField.SHOOT_DIRECTION, ""); if (!f.isEmpty() && SummonProjectileAction.ShootWay.valueOf(f) != null) { return SummonProjectileAction.ShootWay.valueOf(f); } else { return way; } } public SummonProjectileAction.PositionSource getOrDefault(SummonProjectileAction.PositionSource way) { String f = getOrDefault(MapField.POS_SOURCE, ""); if (!f.isEmpty() && SummonProjectileAction.PositionSource.valueOf(f) != null) { return SummonProjectileAction.PositionSource.valueOf(f); } else { return way; } } public DefaultParticleType getParticle() { return (DefaultParticleType) Registry.PARTICLE_TYPE.get(new Identifier(get(MapField.PARTICLE_TYPE))); } public Block getBlock() { return Registry.BLOCK.get(new Identifier(get(MapField.BLOCK))); } public SoundEvent getSound() { return Registry.SOUND_EVENT.get(new Identifier(get(MapField.SOUND))); } public EntityFinder.SelectionType getSelectionType() { return EntityFinder.SelectionType.valueOf(get(MapField.SELECTION_TYPE)); } public SetAdd getSetAdd() { return SetAdd.valueOf(get(MapField.SET_ADD)); } public ParticleInRadiusAction.Shape getParticleShape() { String str = get(MapField.PARTICLE_SHAPE); if (str != null && !str.isEmpty()) { return ParticleInRadiusAction.Shape.valueOf(str); } else { return ParticleInRadiusAction.Shape.CIRCLE; } } public EntityFinder.EntityPredicate getEntityPredicate() { return EntityFinder.EntityPredicate.valueOf(get(MapField.ENTITY_PREDICATE)); } public <T> T getOrDefault(MapField<T> field, T defa) { return (T) map.getOrDefault(field.GUID(), defa); } }
[ "treborx555@gmail.com" ]
treborx555@gmail.com
0ca457350e4f0ce3c410c06760a829d0b7f996f5
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-36b-1-21-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/lang3/math/NumberUtils_ESTest.java
05272bcb52465259b042967aaf5a2213b40b7947
[]
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
976
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 06:11:53 UTC 2020 */ package org.apache.commons.lang3.math; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.lang3.math.NumberUtils; 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 NumberUtils_ESTest extends NumberUtils_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { try { NumberUtils.createNumber("wD/{lS/8&fD#'{\"&."); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // wD/{lS/8&fD#'{\"&. is not a valid number. // verifyException("org.apache.commons.lang3.math.NumberUtils", e); } } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
9588dcf08f3d82ac09ff71dc9e8feb2daa8a1c37
6d108c6305452a804de80f22618d273bd14a4135
/src/main/java/io/github/dadikovi/config/LiquibaseConfiguration.java
867db85562c6be575f548383872384b280db4712
[]
no_license
dadikovi/library-stats
69ad1456943468b3a0f2a9ab05e53d27434e26f4
c597f901488a977c24fae7fb3da19acb96280c8a
refs/heads/master
2022-12-15T16:18:32.699013
2020-09-03T17:54:37
2020-09-03T17:54:37
289,950,083
0
0
null
2020-08-25T15:12:49
2020-08-24T14:24:59
Java
UTF-8
Java
false
false
3,310
java
package io.github.dadikovi.config; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.liquibase.SpringLiquibaseUtil; import java.util.concurrent.Executor; import javax.sql.DataSource; import liquibase.integration.spring.SpringLiquibase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.boot.autoconfigure.liquibase.LiquibaseDataSource; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; @Configuration public class LiquibaseConfiguration { private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); private final Environment env; public LiquibaseConfiguration(Environment env) { this.env = env; } @Bean public SpringLiquibase liquibase( @Qualifier("taskExecutor") Executor executor, @LiquibaseDataSource ObjectProvider<DataSource> liquibaseDataSource, LiquibaseProperties liquibaseProperties, ObjectProvider<DataSource> dataSource, DataSourceProperties dataSourceProperties ) { // If you don't want Liquibase to start asynchronously, substitute by this: // SpringLiquibase liquibase = SpringLiquibaseUtil.createSpringLiquibase(liquibaseDataSource.getIfAvailable(), liquibaseProperties, dataSource.getIfUnique(), dataSourceProperties); SpringLiquibase liquibase = SpringLiquibaseUtil.createAsyncSpringLiquibase( this.env, executor, liquibaseDataSource.getIfAvailable(), liquibaseProperties, dataSource.getIfUnique(), dataSourceProperties ); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setLiquibaseSchema(liquibaseProperties.getLiquibaseSchema()); liquibase.setLiquibaseTablespace(liquibaseProperties.getLiquibaseTablespace()); liquibase.setDatabaseChangeLogLockTable(liquibaseProperties.getDatabaseChangeLogLockTable()); liquibase.setDatabaseChangeLogTable(liquibaseProperties.getDatabaseChangeLogTable()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); liquibase.setLabels(liquibaseProperties.getLabels()); liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); liquibase.setRollbackFile(liquibaseProperties.getRollbackFile()); liquibase.setTestRollbackOnUpdate(liquibaseProperties.isTestRollbackOnUpdate()); if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE))) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } return liquibase; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e9e639a248abf25110d3e50ef839d56805ccd379
7a37c7e7eda8cdf397096a91c548320aed700137
/src/main/java/com/bc/webcrawler/util/InMemoryStore.java
a6a414bc8b9842e566a978bee75b2967d5ef46b0
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
poshjosh/bcwebcrawler
61873db91193524db08dd383c5d921078eee6a57
f9deece199399e5bed15c8bdd3311ab17268c42f
refs/heads/master
2022-09-29T10:29:42.393274
2021-12-17T20:36:06
2021-12-17T20:36:06
138,355,490
0
0
NOASSERTION
2022-09-01T22:28:52
2018-06-22T23:07:34
Java
UTF-8
Java
false
false
1,783
java
/* * Copyright 2017 NUROX Ltd. * * Licensed under the NUROX Ltd Software License (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.looseboxes.com/legal/licenses/software.html * * 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.bc.webcrawler.util; import com.bc.webcrawler.util.Store; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Set; /** * @author Chinomso Bassey Ikwuagwu on Oct 5, 2017 11:10:12 AM */ public class InMemoryStore<E> implements Store<E> { private final Set<E> store; public InMemoryStore() { this(Collections.EMPTY_SET); } public InMemoryStore(Set<E> set) { this.store = Collections.synchronizedSet(new HashSet()); this.store.addAll(set); } @Override public boolean contains(E name) { return store.contains(name); } @Override public Iterable<E> getAll(int offset, int limit) { int end = offset + limit; end = Math.min(store.size(), end); return new ArrayList(store).subList(offset, end); } @Override public void flush() { } @Override public E save(E elem) { store.add(elem); return elem; } @Override public E delete(E elem) { store.remove(elem); return elem; } @Override public long count() { return store.size(); } }
[ "posh.bc@gmail.com" ]
posh.bc@gmail.com
87ad39e9be864e91e147b96acf0e689d25afc1e2
4c2d4f32674adf257d6f5a331709b4946307c699
/Neverland-JavaSE/src/main/java/org/jabe/neverland/download/ReadTaskFileException.java
8c60e20f79257905c2809546618a809572abe2ce
[ "Apache-2.0" ]
permissive
jabelai/Neverland
c31a70a8dfc6397534f3942cd25e770defac923d
eaa0976284815e8559bbf25ba59d92a93c2088b2
refs/heads/master
2020-05-16T22:54:27.030549
2014-09-18T16:42:52
2014-09-18T16:42:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
260
java
package org.jabe.neverland.download; public class ReadTaskFileException extends Exception { public ReadTaskFileException(String message) { super(message); } /** * */ private static final long serialVersionUID = -987388795353475400L; }
[ "lailong.ll@alibaba-inc.com" ]
lailong.ll@alibaba-inc.com
e7367c2ec1b0334e96104fb4bbb232bee35a8baf
932480a6fa3d2e04d6fa0901c51ad14b9704430b
/jonix-onix3/src/main/java/com/tectonica/jonix/onix3/ScriptCode.java
2d61046f5e99bca34ff07b1b1a1f60df3441d6ac
[ "Apache-2.0" ]
permissive
hobbut/jonix
952abda58a3e9817a57ae8232a4a62ab6b3cd50f
0544feb4b1ac8fd7dfd52e34e3f84d46eae5749e
refs/heads/master
2021-01-12T08:22:58.679531
2016-05-22T15:13:53
2016-05-22T15:13:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,090
java
/* * Copyright (C) 2012 Zach Melamed * * Latest version available online at https://github.com/zach-m/jonix * Contact me at zach@tectonica.co.il * * 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.tectonica.jonix.onix3; import java.io.Serializable; import com.tectonica.jonix.JPU; import com.tectonica.jonix.OnixElement; import com.tectonica.jonix.codelist.RecordSourceTypes; import com.tectonica.jonix.codelist.TextScriptCodes; /* * NOTE: THIS IS AN AUTO-GENERATED FILE, DON'T EDIT MANUALLY */ /** * <h1>Script code</h1> * <p> * A code identifying the script in which the language is represented. Optional and non-repeating. * </p> * <table border='1' cellpadding='3'> * <tr> * <td>Format</td> * <td>Fixed-length, four letters. Note that ISO 15924 specifies that script codes shall be sent as one upper case * followed by three lower case letters</td> * </tr> * <tr> * <td>Codelist</td> * <td>ISO 15924 four-letter script codes List 121</td> * </tr> * <tr> * <td>Reference name</td> * <td>&lt;ScriptCode&gt;</td> * </tr> * <tr> * <td>Short tag</td> * <td>&lt;x420&gt;</td> * </tr> * <tr> * <td>Cardinality</td> * <td>0&#8230;1</td> * </tr> * <tr> * <td>Example</td> * <td>&lt;ScriptCode&gt;Cyrl&lt;/ScriptCode&gt; (Cyrillic)</td> * </tr> * </table> */ public class ScriptCode implements OnixElement, Serializable { private static final long serialVersionUID = 1L; public static final String refname = "ScriptCode"; public static final String shortname = "x420"; // /////////////////////////////////////////////////////////////////////////////// // ATTRIBUTES // /////////////////////////////////////////////////////////////////////////////// /** * (type: dt.DateOrDateTime) */ public String datestamp; public RecordSourceTypes sourcetype; public String sourcename; // /////////////////////////////////////////////////////////////////////////////// // VALUE MEMBER // /////////////////////////////////////////////////////////////////////////////// public TextScriptCodes value; // /////////////////////////////////////////////////////////////////////////////// // SERVICES // /////////////////////////////////////////////////////////////////////////////// public ScriptCode() {} public ScriptCode(org.w3c.dom.Element element) { datestamp = JPU.getAttribute(element, "datestamp"); sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype")); sourcename = JPU.getAttribute(element, "sourcename"); value = TextScriptCodes.byCode(JPU.getContentAsString(element)); } }
[ "zach@tectonica.co.il" ]
zach@tectonica.co.il
a32363ff72d7b8f1d3eb1663b47090c8725d970a
e8af9448b9ae9244fdd1d47483730df4ef0a0ef8
/replit_1/MaxArray.java
f35c4589e249e2028340150970560797479f1de7
[]
no_license
ShaazShaaz/JavaPragramming_B23
83b756967e2d9c16d617e650c6f8c13db1232bf2
432d3a5f02fa1004927c6a40f44027fe9f986141
refs/heads/master
2023-07-09T18:02:32.929144
2021-08-19T20:11:14
2021-08-19T20:11:14
395,329,318
0
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
import java.util.Arrays; public class MaxArray { public static void main(String[] args) { /* Given an array num, get the max number in the array and print it out to the console. nums → [2, 4, 2, 3, -2]) → 4 nums → [2, 2, 5, 3, 0 ]) → 5 nums → [1, 33, 5, 7, 9]) → 33 nums → [2, 4, 2, 3, -2]) → 4 nums → [2, 2, 5, 3, 0 ]) → 5 nums → [1, 33, 5, 7, 9]) → 33 hint: create a variable called max and before you start searching assume the first item value is the max. loop through each and every item and check for whether the value max is less than the item value. if so assign the value to the max to overwrite existing max. you will get the max value when you are done with the loop */ int[] nums={2,4,2,3,-2}; int max= nums[0]; for (int i = 0; i <=nums.length-1 ; i++) { int each=nums[i]; if (each>max){ max=each; } } System.out.println("Max: "+max); } }
[ "shaziasenol@gmail.com" ]
shaziasenol@gmail.com
8693af06f8bcb3168543dcb6b4363ebac201007c
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/pluginsdk/ui/ProfileMobilePhoneView$1.java
b73932595d7552b978e959eea7808245430a8517
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
793
java
package com.tencent.mm.pluginsdk.ui; import android.view.View; import android.view.View.OnClickListener; import android.widget.TextView; import com.tencent.matrix.trace.core.AppMethodBeat; final class ProfileMobilePhoneView$1 implements View.OnClickListener { ProfileMobilePhoneView$1(ProfileMobilePhoneView paramProfileMobilePhoneView) { } public final void onClick(View paramView) { AppMethodBeat.i(27532); ProfileMobilePhoneView.a(this.viz, ((TextView)paramView).getText().toString()); AppMethodBeat.o(27532); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar * Qualified Name: com.tencent.mm.pluginsdk.ui.ProfileMobilePhoneView.1 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
cc841cd48e4cbec760dd9e9b13637aff5ac03543
891626c4ec7cc773779545703e72ca586155583a
/rdfind-flink/src/main/java/de/hpi/isg/sodap/flink/util/Encoding.java
167af7cb478dda73a9ae9ceb5097f7bbe2b09809
[ "Apache-2.0" ]
permissive
renxiangnan/rdfind
aaf3ad5c90e755c83eb97b3bc8fc2a44af13c7b2
67b691a834f72a76d4bcbef774e67e507f2d79d8
refs/heads/master
2021-01-13T17:31:34.692251
2016-07-05T15:15:22
2016-07-05T15:15:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,144
java
package de.hpi.isg.sodap.flink.util; import org.apache.commons.io.input.BOMInputStream; import java.io.*; import java.nio.charset.Charset; /** * This class describes the encoding of a file. * * @author sebastian.kruse * @since 28.04.2015 */ @SuppressWarnings("serial") public class Encoding implements Serializable { public static final org.apache.commons.io.ByteOrderMark[] SUPPORTED_BOMS = { org.apache.commons.io.ByteOrderMark.UTF_8, org.apache.commons.io.ByteOrderMark.UTF_16BE, org.apache.commons.io.ByteOrderMark.UTF_16LE, org.apache.commons.io.ByteOrderMark.UTF_32BE, org.apache.commons.io.ByteOrderMark.UTF_32LE }; /** * Default encoding of the system: no BOM and UTF-8. */ public static final Encoding DEFAULT_ENCODING = new Encoding(ByteOrderMark.NONE, Charset.forName("UTF-8")); public enum ByteOrderMark { // NB: In order to keep old encoding ordinals valid, it is better to append here. NONE(null), UTF_8("UTF-8", (byte) 0xef, (byte) 0xbb, (byte) 0xbf), UTF_16_BE("UTF-16BE", (byte) 0xfe, (byte) 0xff), UTF_16_LE("UTF-16LE", (byte) 0xff, (byte) 0xfe), UTF_32_BE("UTF-32BE", (byte) 0x00, (byte) 0x00, (byte) 0xfe, (byte) 0xff), UTF_32_LE("UTF-32LE", (byte) 0xff, (byte) 0xfe, (byte) 0x00, (byte) 0x00); private byte[] bomCode; private Charset associatedCharset; private ByteOrderMark(String associatedCharset, byte... bomCode) { this.bomCode = bomCode; } public void skip(InputStream stream) throws IOException { for (int i = 0; i < this.bomCode.length; i++) { int inputByte = stream.read(); if ((0xFF & this.bomCode[i]) != inputByte) { throw new IllegalStateException(String.format("Did not find expected BOM %s in stream (found %x@%d).", this, inputByte, i)); } } } } public static Encoding fromConfigString(String configString) { if (configString == null || configString.isEmpty()) { return DEFAULT_ENCODING; } int colonPos = configString.indexOf(":"); ByteOrderMark byteOrderMark = ByteOrderMark.values()[Integer.parseInt(configString.substring(0, colonPos))]; Charset charset = Charset.forName(configString.substring(colonPos + 1)); return new Encoding(byteOrderMark, charset); } private ByteOrderMark byteOrderMark; /** Potentially lazy-initialized to guarantee serializability. */ private transient Charset charset; private String charsetName; public Encoding(ByteOrderMark byteOrderMark, String charsetName) { this(byteOrderMark, Charset.forName(charsetName)); } public Encoding(ByteOrderMark byteOrderMark, Charset charset) { this.byteOrderMark = byteOrderMark; setCharset(charset); } public ByteOrderMark getByteOrderMark() { return byteOrderMark; } public void setByteOrderMark(ByteOrderMark byteOrderMark) { this.byteOrderMark = byteOrderMark; } public Charset getCharset() { // Lazy-initialize charset. if (this.charset == null && this.charsetName != null) { setCharset(this.charsetName); } return this.charset; } public void setCharset(Charset charset) { this.charset = charset; this.charsetName = charset == null ? null : charset.name(); } public void setCharset(String charsetName) { setCharset(Charset.forName(charsetName)); } /** * Creates a reader that is configured according to this encoding. * @param inputStream should be decoded correctly * @return a {@link Reader} that wraps the input stream */ public Reader applyTo(InputStream inputStream) { if (this.byteOrderMark != ByteOrderMark.NONE) { inputStream = new BOMInputStream(inputStream, SUPPORTED_BOMS); } return new InputStreamReader(inputStream, getCharset()); } @Override public String toString() { return "Encoding{" + "byteOrderMark=" + byteOrderMark + ", charset=" + getCharset() + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Encoding encoding = (Encoding) o; if (byteOrderMark != encoding.byteOrderMark) return false; Charset thisCharset = getCharset(); Charset thatCharset = encoding.getCharset(); if (thisCharset != null ? !thisCharset.equals(thatCharset) : thatCharset != null) return false; return true; } @Override public int hashCode() { int result = byteOrderMark != null ? byteOrderMark.hashCode() : 0; result = 31 * result + (charsetName != null ? charsetName.hashCode() : 0); return result; } public String toConfigString() { return this.byteOrderMark.ordinal() + ":" + this.charsetName; } }
[ "sebastian.kruse@hpi.de" ]
sebastian.kruse@hpi.de
4a7642c62b56a651b9c8063e2c82155ea2238961
d4896a7eb2ee39cca5734585a28ca79bd6cc78da
/sources/androidx/loader/app/LoaderManager.java
ebecbe53b68f0dae294a27f0fe5b9f9b389238a0
[]
no_license
zadweb/zadedu.apk
a235ad005829e6e34ac525cbb3aeca3164cf88be
8f89db0590333929897217631b162e39cb2fe51d
refs/heads/master
2023-08-13T03:03:37.015952
2021-10-12T21:22:59
2021-10-12T21:22:59
416,498,604
0
0
null
null
null
null
UTF-8
Java
false
false
757
java
package androidx.loader.app; import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.ViewModelStoreOwner; import androidx.loader.content.Loader; import java.io.FileDescriptor; import java.io.PrintWriter; public abstract class LoaderManager { public interface LoaderCallbacks<D> { void onLoadFinished(Loader<D> loader, D d); void onLoaderReset(Loader<D> loader); } @Deprecated public abstract void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr); public abstract void markForRedelivery(); public static <T extends LifecycleOwner & ViewModelStoreOwner> LoaderManager getInstance(T t) { return new LoaderManagerImpl(t, t.getViewModelStore()); } }
[ "midoekid@gmail.com" ]
midoekid@gmail.com
25080770df83bae618fce68eeba9867ba3594287
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.pde.ui/3423.java
a755f317ca13bc6dfba98119503627b9bb4ea6ff
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
627
java
/******************************************************************************* * Copyright (c) 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ public class X { public void foo() { } public void foo2() { } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
4ce7a6a6e59939b7a4fbe2ceda8995cbf1fca232
7c37bf35151837462d178698e227cbca368e7644
/src/main/java/org/jenkinsci/plugins/gitchangelog/config/CustomIssue.java
46ac277629395f71ffb6a15ade584929d9b6a60f
[ "MIT" ]
permissive
jenkinsci/git-changelog-plugin
b5ed02c4edaae1d68e954e21a52a7a93d92de3a6
75bab57692d194aa3da2a9eb50196b3b8f1cf090
refs/heads/master
2023-09-05T08:34:36.417078
2023-08-31T15:42:21
2023-08-31T15:43:33
43,630,800
56
38
MIT
2023-01-27T01:17:07
2015-10-04T09:07:37
Java
UTF-8
Java
false
false
992
java
package org.jenkinsci.plugins.gitchangelog.config; import java.io.Serializable; import org.kohsuke.stapler.DataBoundConstructor; public class CustomIssue implements Serializable { private static final long serialVersionUID = -6202256680695752956L; private String link; private String name; private String pattern; private final String title; @DataBoundConstructor public CustomIssue(String name, String pattern, String link, String title) { this.name = name; this.pattern = pattern; this.link = link; this.title = title; } public String getLink() { return this.link; } public String getName() { return this.name; } public String getPattern() { return this.pattern; } public String getTitle() { return this.title; } public void setLink(String link) { this.link = link; } public void setName(String name) { this.name = name; } public void setPattern(String pattern) { this.pattern = pattern; } }
[ "tomas.bjerre85@gmail.com" ]
tomas.bjerre85@gmail.com
541e3a7c9693294e756ad7060ec52476db413939
b2e3854391f48ffc9587ed41ee4e9bbd6fc5e6ef
/cd_v1/Scan_Reducer.java
f7684747a4cf5635c3f2808e3b1a587b0e07c8f1
[]
no_license
kuwylsr/Community-search-algorithm-based-on-Hadoop
651426950866595460d2cdbed2f7de9c9d92bb86
aea8737710da185ababc89a84cb20efa15dba89e
refs/heads/master
2023-03-27T08:53:13.555698
2021-03-24T07:46:36
2021-03-24T07:46:36
285,452,441
5
0
null
null
null
null
UTF-8
Java
false
false
2,126
java
package cd_v1; import java.io.IOException; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Reducer; public class Scan_Reducer extends Reducer<Text, Text, Text, Text> { /** * 计算结点的结构化相似度 * @param s1 顶点1的邻居信息 * @param s2 顶点2的邻居信息 * @return 两个顶点之间的相似度 */ public double calSim(Set<Integer> s1, Set<Integer> s2) { double common = 2.0; //共同邻居数的初始值为2,因为要计算上边的两个顶点 for (Integer i : s1) { if (s2.contains(i)) { common += 1.0; } } return common / Math.sqrt((s1.size() + 1) * (s2.size() + 1));// 根据Salton指标来计算相似度指标 } /** * reduce类 * 输入:经过shuffle的过程,输入的键值对为 * key:一条边信息 * value:此条边当中各个点所包含的邻居信息 * 输出:此条边的两个顶点的相似度大于阈值的键值对 * key:null * value:边信息 * 达到了只要两个顶点之间有边,就计算他们的相似度的目的 * */ public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException { double alpha = Double.valueOf(context.getConfiguration().get("alpha")); //获取设定参数中的阈值 Iterator<Text> iter = values.iterator(); Set<Integer> set1 = new HashSet<Integer>(); Set<Integer> set2 = new HashSet<Integer>(); for (String s : iter.next().toString().split(",")) {//set1中添加第一个节点的邻居信息 set1.add(Integer.valueOf(s)); } try { for (String s : iter.next().toString().split(",")) {//set2中添加第二个节点的邻居信息 set2.add(Integer.valueOf(s)); } } catch (Exception e) { System.out.println("Error: " + key); } // for (String s : iter.next().toString().split(",")) {//set2中添加第二个节点的邻居信息 // set2.add(Integer.valueOf(s)); // } double sim = calSim(set1, set2);//计算两个节点的相似度 if (sim >= alpha) { context.write(null, key); } } }
[ "17745109091@163.com" ]
17745109091@163.com
a8147fced9116e0274ba6175a079d9ff29107bda
c322c2991265759610ce29472e86df729c708006
/app/src/main/java/com/wecoo/qutianxia/requestjson/GetSearchDataRequest.java
7abca52e8d52c1f1948f284b2d2671a5eb6451ba
[ "MIT" ]
permissive
sophiemarceau/qtxzs_Android
20654a1bbfb57eede63171759a7314dda45b311e
0c393036213ebbd975a50b5770a7f1bd7657c3be
refs/heads/master
2020-08-27T11:04:50.333789
2019-10-25T03:05:22
2019-10-25T03:05:22
217,343,389
0
0
null
null
null
null
UTF-8
Java
false
false
1,871
java
package com.wecoo.qutianxia.requestjson; import android.content.Context; import com.alibaba.fastjson.JSONObject; import com.wecoo.qutianxia.base.BaseRequest; import com.wecoo.qutianxia.models.ProjectEntity; import com.wecoo.qutianxia.requestset.CallServer; import com.wecoo.qutianxia.requestset.CallServerInterface; import com.yolanda.nohttp.rest.Response; /** * 获取项目搜索数据 **/ public class GetSearchDataRequest extends BaseRequest { public GetSearchDataRequest() { super(WebUrl.searchSimpleAppProjectDtos); } // 设置请求的参数 public void setRequestParms(String project_sort,String projectName,String project_industry , int currentPage, int pageSize) { request.add("_project_sort", project_sort); request.add("_name", projectName); request.add("_project_industry", project_industry); request.add("_currentPage", currentPage); request.add("_pageSize", pageSize); } // 返回数据的回掉 public void setReturnDataClick(final Context context, boolean isshowLoad, int what, final ReturnDataClick dataClick) { CallServer.getInstance().add(context, isshowLoad, what, request, new CallServerInterface<String>() { @Override public void onRequestSucceed(int what, String SucceedData) { if (SucceedData != null) { try { ProjectEntity entity = JSONObject.parseObject(SucceedData, ProjectEntity.class); dataClick.onReturnData(what, entity); } catch (Exception ex) { ex.printStackTrace(); } } } @Override public void onRequestFailed(int what, Response<String> FailedData) { } }); } }
[ "sophiemarceauqu@gmail.com" ]
sophiemarceauqu@gmail.com
4ff3bfd29036dc5372829c98c677d4730852c3d1
958b13739d7da564749737cb848200da5bd476eb
/src/main/java/com/alipay/api/response/ZhimaCreditPeUserOrderConsultResponse.java
cf038dca1813169a332aec8d2ed621c39f7277c4
[ "Apache-2.0" ]
permissive
anywhere/alipay-sdk-java-all
0a181c934ca84654d6d2f25f199bf4215c167bd2
649e6ff0633ebfca93a071ff575bacad4311cdd4
refs/heads/master
2023-02-13T02:09:28.859092
2021-01-14T03:17:27
2021-01-14T03:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,039
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: zhima.credit.pe.user.order.consult response. * * @author auto create * @since 1.0, 2020-05-24 10:40:10 */ public class ZhimaCreditPeUserOrderConsultResponse extends AlipayResponse { private static final long serialVersionUID = 6525345296443757972L; /** * 实际可免押额度,取值范围[0.01,100000000],精确到小数点后2位 */ @ApiField("actual_amount") private String actualAmount; /** * 展示给C看的文案,json格式字符串 */ @ApiField("display_msg") private String displayMsg; /** * 在该信用场景下是否已签约 */ @ApiField("open") private Boolean open; /** * 用户在该场景下能否享用免押,返回true:可享受免押,返回false:不可享受免押 */ @ApiField("permit") private Boolean permit; /** * 拒绝码,只有当permit为false时,才有值 */ @ApiField("refuse_code") private String refuseCode; /** * 拒绝原因描述,只有在permit=false时,才会返回该信息 */ @ApiField("refuse_msg") private String refuseMsg; /** * 芝麻咨询单号,业务处理成功后,芝麻返回该字段,实际使用时请注意保存该字段 */ @ApiField("risk_order_no") private String riskOrderNo; /** * 盖帽额度,取值范围[0.01,100000000],精确到小数点后2位 */ @ApiField("top_amount") private String topAmount; /** * 可免押盖帽物品件数 */ @ApiField("top_goods_count") private Long topGoodsCount; public void setActualAmount(String actualAmount) { this.actualAmount = actualAmount; } public String getActualAmount( ) { return this.actualAmount; } public void setDisplayMsg(String displayMsg) { this.displayMsg = displayMsg; } public String getDisplayMsg( ) { return this.displayMsg; } public void setOpen(Boolean open) { this.open = open; } public Boolean getOpen( ) { return this.open; } public void setPermit(Boolean permit) { this.permit = permit; } public Boolean getPermit( ) { return this.permit; } public void setRefuseCode(String refuseCode) { this.refuseCode = refuseCode; } public String getRefuseCode( ) { return this.refuseCode; } public void setRefuseMsg(String refuseMsg) { this.refuseMsg = refuseMsg; } public String getRefuseMsg( ) { return this.refuseMsg; } public void setRiskOrderNo(String riskOrderNo) { this.riskOrderNo = riskOrderNo; } public String getRiskOrderNo( ) { return this.riskOrderNo; } public void setTopAmount(String topAmount) { this.topAmount = topAmount; } public String getTopAmount( ) { return this.topAmount; } public void setTopGoodsCount(Long topGoodsCount) { this.topGoodsCount = topGoodsCount; } public Long getTopGoodsCount( ) { return this.topGoodsCount; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
bf7facc955dfb1ccca79b8d636b8967dce8a0bd7
03b53dd85f7aa7a98ce4a6f61a0256de5a283260
/services/viewsdb/src/com/newfebproject/viewsdb/dao/UsersOnlyUserIdDao.java
5d071d8a6f9eaebea9c7d43db80700d1f0ab6ed6
[]
no_license
kavyasree7/newFebProject
e8876313bcb1a104d1d6d010ff2eb9594297774e
d3ec5449bee839a0a37fd119dd21cf6eadbdbf42
refs/heads/master
2021-08-08T00:52:57.346722
2017-11-09T08:31:31
2017-11-09T08:31:31
110,087,978
0
0
null
null
null
null
UTF-8
Java
false
false
1,236
java
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ package com.newfebproject.viewsdb.dao; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.orm.hibernate5.HibernateTemplate; import org.springframework.stereotype.Repository; import com.wavemaker.runtime.data.dao.WMGenericDaoImpl; import com.newfebproject.viewsdb.UsersOnlyUserId; /** * Specifies methods used to obtain and modify UsersOnlyUserId related information * which is stored in the database. */ @Repository("viewsdb.UsersOnlyUserIdDao") public class UsersOnlyUserIdDao extends WMGenericDaoImpl<UsersOnlyUserId, Integer> { @Autowired @Qualifier("viewsdbTemplate") private HibernateTemplate template; public HibernateTemplate getTemplate() { return this.template; } }
[ "kavya.sree@wavemaker.com" ]
kavya.sree@wavemaker.com
3391c2e7854db1f67a73e5c88481efca224237a0
3f4d50ac6cc4c84b6e5af83ca785d1630f730a07
/app/src/main/java/cn/poco/preview/site/PreviewImgPageSite.java
95879844e8e40afeb6472d992c127842c7c998e2
[]
no_license
FranklinNEO/BeautyCamera2016
5ceb02047750b54d3be44f07ba08a8d84516bdc2
c0aa17fefa283b43187396ba35073fdef2b541f5
refs/heads/master
2022-09-08T08:37:30.260238
2020-06-01T10:12:02
2020-06-01T10:12:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
629
java
package cn.poco.preview.site; import android.content.Context; import cn.poco.framework.BaseSite; import cn.poco.framework.IPage; import cn.poco.framework.MyFramework; import cn.poco.framework.SiteID; import cn.poco.framework2.Framework2; import cn.poco.preview.PreviewImgPage; /** * 图片预览 */ public class PreviewImgPageSite extends BaseSite { public PreviewImgPageSite() { super(SiteID.PREVIEW_IMG); } @Override public IPage MakePage(Context context) { return new PreviewImgPage(context, this); } public void OnBack(Context context) { MyFramework.SITE_Back(context, null, Framework2.ANIM_NONE); } }
[ "18218125994@163.com" ]
18218125994@163.com
8643dccec2ee24ce6894decd8a80e98186cb676a
69db466b12bf8152ed146178a99b3edc909b15a9
/tinyos.dlrc.refactoring/src/tinyos/dlrc/refactoring/utilities/DebugUtil.java
265ea703ab8977b9df28f04756e2c2876e287983
[]
no_license
mahmoudimus/dlrc-tinyos-plugin
788a575a3cc909b049d4b5b9da9d6370a50eccc9
9e1c6e495f7ac15966a1463f66700f7f4b619381
refs/heads/master
2021-05-29T09:52:46.507638
2013-08-22T08:11:57
2013-08-22T08:11:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
package tinyos.dlrc.refactoring.utilities; /** * This class is just used for debugging purposes * @author Max Urech * */ public class DebugUtil { public static String endOutput=""; public static void addOutput(String output){ if(output.equals("")){ output="output is EMPTY"; } endOutput+="\n"+output; } public static void printOutput(){ System.err.println(endOutput); } public static void clearOutput(){ endOutput=""; } public static void immediatePrint(String output){ System.err.println(output); } }
[ "heavey@heavey-ThinkPad-T420.(none)" ]
heavey@heavey-ThinkPad-T420.(none)