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
d13fc1b5a8897fd15b03a88afb9b36100c68dfe8
fe774f001d93d28147baec987a1f0afe0a454370
/ml-model/files/old-files/set5/novice/shersin9891_birthday-cake-candles_solution.java
e5a524915728150c5b669eb05ec655b120b03232
[]
no_license
gabrielchl/ml-novice-expert-dev-classifier
9dee42e04e67ab332cff9e66030c27d475592fe9
bcfca5870a3991dcfc1750c32ebbc9897ad34ea3
refs/heads/master
2023-03-20T05:07:20.148988
2021-03-19T01:38:13
2021-03-19T01:38:13
348,934,427
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
import java.io.*; import java.math.*; import java.security.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import java.util.regex.*; public class Solution { // Complete the birthdayCakeCandles function below. static int birthdayCakeCandles(int[] ar) { int m = max(ar); int count = 0; for(int i =0;i<ar.length;i++){ if(ar[i]==m) count++; } return count; } public static int max(int[] a){ int m = a[0]; for(int i = 1;i<a.length;i++){ if(a[i]>m){ m=a[i]; } } return m; } }
[ "chihonglee777@gmail.com" ]
chihonglee777@gmail.com
8677ef1988de088ae052fda4b9a9fda25e36406c
9254e7279570ac8ef687c416a79bb472146e9b35
/linkedmall-20180116/src/main/java/com/aliyun/linkedmall20180116/models/SettleOrderResponse.java
4250bab967b2e5e6de4d42e10bb71347f31f2741
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,829
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.linkedmall20180116.models; import com.aliyun.tea.*; public class SettleOrderResponse extends TeaModel { @NameInMap("Code") @Validation(required = true) public String code; @NameInMap("Message") @Validation(required = true) public String message; @NameInMap("RequestId") @Validation(required = true) public String requestId; @NameInMap("TradeOrderSettleResponse") @Validation(required = true) public SettleOrderResponseTradeOrderSettleResponse tradeOrderSettleResponse; public static SettleOrderResponse build(java.util.Map<String, ?> map) throws Exception { SettleOrderResponse self = new SettleOrderResponse(); return TeaModel.build(map, self); } public SettleOrderResponse setCode(String code) { this.code = code; return this; } public String getCode() { return this.code; } public SettleOrderResponse setMessage(String message) { this.message = message; return this; } public String getMessage() { return this.message; } public SettleOrderResponse setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public SettleOrderResponse setTradeOrderSettleResponse(SettleOrderResponseTradeOrderSettleResponse tradeOrderSettleResponse) { this.tradeOrderSettleResponse = tradeOrderSettleResponse; return this; } public SettleOrderResponseTradeOrderSettleResponse getTradeOrderSettleResponse() { return this.tradeOrderSettleResponse; } public static class SettleOrderResponseTradeOrderSettleResponse extends TeaModel { @NameInMap("OutRequestNo") @Validation(required = true) public String outRequestNo; @NameInMap("TradeNo") @Validation(required = true) public String tradeNo; public static SettleOrderResponseTradeOrderSettleResponse build(java.util.Map<String, ?> map) throws Exception { SettleOrderResponseTradeOrderSettleResponse self = new SettleOrderResponseTradeOrderSettleResponse(); return TeaModel.build(map, self); } public SettleOrderResponseTradeOrderSettleResponse setOutRequestNo(String outRequestNo) { this.outRequestNo = outRequestNo; return this; } public String getOutRequestNo() { return this.outRequestNo; } public SettleOrderResponseTradeOrderSettleResponse setTradeNo(String tradeNo) { this.tradeNo = tradeNo; return this; } public String getTradeNo() { return this.tradeNo; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
dbbbd2a42715212cbb7468c882db9f178c068f9a
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/d5bb7ee88443466df8d5c09a77c44bc98ea833ee/before/RedundantMethodOverrideInspection.java
8d0344de8a222dd8e31c0fcb5873c05f08b62b26
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,366
java
/* * Copyright 2005-2007 Bas Leijdekkers * * 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.siyeh.ig.inheritance; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.openapi.project.Project; import com.intellij.psi.*; import com.intellij.psi.search.searches.SuperMethodsSearch; import com.intellij.psi.util.MethodSignatureBackedByPsiMethod; import com.intellij.util.IncorrectOperationException; import com.intellij.util.Query; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.BaseInspection; import com.siyeh.ig.BaseInspectionVisitor; import com.siyeh.ig.InspectionGadgetsFix; import com.siyeh.ig.psiutils.EquivalenceChecker; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class RedundantMethodOverrideInspection extends BaseInspection { @NotNull public String getDisplayName() { return InspectionGadgetsBundle.message( "redundant.method.override.display.name"); } @NotNull protected String buildErrorString(Object... infos) { return InspectionGadgetsBundle.message( "redundant.method.override.problem.descriptor"); } @Nullable protected InspectionGadgetsFix buildFix(PsiElement location) { return new RedundantMethodOverrideFix(); } private static class RedundantMethodOverrideFix extends InspectionGadgetsFix { @NotNull public String getName() { return InspectionGadgetsBundle.message( "redundant.method.override.quickfix"); } public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException { final PsiElement methodNameIdentifier = descriptor.getPsiElement(); final PsiElement method = methodNameIdentifier.getParent(); assert method != null; deleteElement(method); } } public BaseInspectionVisitor buildVisitor() { return new RedundantMethodOverrideVisitor(); } private static class RedundantMethodOverrideVisitor extends BaseInspectionVisitor { @Override public void visitMethod(PsiMethod method) { super.visitMethod(method); final PsiCodeBlock body = method.getBody(); if (body == null) { return; } if (method.getNameIdentifier() == null) { return; } final Query<MethodSignatureBackedByPsiMethod> superMethodQuery = SuperMethodsSearch.search(method, null, true, false); final MethodSignatureBackedByPsiMethod signature = superMethodQuery.findFirst(); if (signature == null) { return; } final PsiMethod superMethod = signature.getMethod(); final PsiCodeBlock superBody = superMethod.getBody(); if (superBody == null) { return; } final PsiModifierList superModifierList = superMethod.getModifierList(); final PsiModifierList modifierList = method.getModifierList(); if (!EquivalenceChecker.modifierListsAreEquivalent( modifierList, superModifierList)) { return; } final PsiType superReturnType = superMethod.getReturnType(); if (superReturnType == null) { return; } final PsiType returnType = method.getReturnType(); if (!superReturnType.equals(returnType)) { return; } if (!EquivalenceChecker.codeBlocksAreEquivalent(body, superBody)) { return; } registerMethodError(method); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
c6fba8be35602402712cbf95fa6e2a87b5f79bfd
af9fe507b31bfa8eb7a0463811fa11c83636cf65
/src/Buoi9/BaiTap/QuanLyDat/Test.java
5d5e1c91d034a886c7b321032462d3c8002f6869
[]
no_license
viethoang1999/JavaBase
9b2766b99c62527355599e3d3b5600507f904e87
78517e4763fad3ed890ae28bc05f80126b506a20
refs/heads/master
2023-06-28T20:17:51.074953
2021-08-09T13:38:07
2021-08-09T13:38:07
374,878,305
0
0
null
null
null
null
UTF-8
Java
false
false
630
java
package Buoi9.BaiTap.QuanLyDat; import java.time.LocalDate; public class Test { public static void main(String[] args) { Quanlygiaodichdat quanlygiaodichdat=new Quanlygiaodichdat(2); quanlygiaodichdat.input(); quanlygiaodichdat.output(); double a=quanlygiaodichdat.Tongsoluongtunggiaodich(); System.out.println("Tổng số lượng từng loại : "+a); double b= quanlygiaodichdat.trungBinhThanhTienTungLoai(); System.out.println("Trung bình từng loại giao dịch: "+b); quanlygiaodichdat.output(LocalDate.of(2013,9,1),LocalDate.of(2013,9,30)); } }
[ "=" ]
=
996cb2f255eecb16b89497b566cc677fb615534e
e56f8a02c22c4e9d851df4112dee0c799efd7bfe
/vip/trade/src/main/java/com/alipay/api/request/AlipayMpointprodBenefitDetailGetRequest.java
e2f35d536e5f9dfc5220185c230c3ca0ef271810
[]
no_license
wu-xian-da/vip-server
8a07e2f8dc75722328a3fa7e7a9289ec6ef1d1b1
54a6855224bc3ae42005b341a2452f25cfeac2c7
refs/heads/master
2020-12-31T00:29:36.404038
2017-03-27T07:00:02
2017-03-27T07:00:02
85,170,395
0
0
null
null
null
null
UTF-8
Java
false
false
2,643
java
package com.alipay.api.request; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.AlipayMpointprodBenefitDetailGetResponse; /** * ALIPAY API: alipay.mpointprod.benefit.detail.get request * * @author auto create * @since 1.0, 2015-01-29 15:46:36 */ public class AlipayMpointprodBenefitDetailGetRequest implements AlipayRequest<AlipayMpointprodBenefitDetailGetResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 消息体内容,JSON格式,不含换行、空格 参数: userId: 支付用户ID, 可以直接传递openId benefitType: 权益类型,支持(MemberGrade:会员等级) benefitStatus: 状态只支持(VALID:生效、WAIT:待生效、INVALID:失效), 默认:全部 */ private String bizContent; public void setBizContent(String bizContent) { this.bizContent = bizContent; } public String getBizContent() { return this.bizContent; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "alipay.mpointprod.benefit.detail.get"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("biz_content", this.bizContent); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<AlipayMpointprodBenefitDetailGetResponse> getResponseClass() { return AlipayMpointprodBenefitDetailGetResponse.class; } }
[ "programboy@126.com" ]
programboy@126.com
f7bebd4c8938537df685cff1332682eb83c71b78
b5a159ce0ec147ad20487713380bd96998a8ad15
/app/src/main/java/com/shushan/thomework101/mvp/ui/fragment/student/MineStudentFragmentControl.java
d44112525371f83a55f855f8274b25f67632e580
[]
no_license
llxqb/homework101_tea_new
14208c07c0e32d630a9966450772fbd4c98991f7
67f9ca561f4cde9fa7434f987fb2ea863c62bf80
refs/heads/master
2022-03-17T01:08:14.229889
2019-12-02T09:44:07
2019-12-02T09:44:07
206,764,693
0
0
null
null
null
null
UTF-8
Java
false
false
871
java
package com.shushan.thomework101.mvp.ui.fragment.student; import com.shushan.thomework101.entity.request.MineStudentListRequest; import com.shushan.thomework101.entity.response.MineStudentResponse; import com.shushan.thomework101.mvp.presenter.LoadDataView; import com.shushan.thomework101.mvp.presenter.Presenter; /** * Created by li.liu on 2019/05/28. */ public class MineStudentFragmentControl { /** * 我的辅导记录、老师页面辅导反馈 */ public interface MineStudentFragmentView extends LoadDataView { void getMineStudentInfoSuccess(MineStudentResponse response); } public interface MineStudentFragmentPresenter extends Presenter<MineStudentFragmentView> { /** * 请求我的学生列表 */ void onRequestMineStudentInfo(MineStudentListRequest mineStudentListRequest); } }
[ "liuli7168165" ]
liuli7168165
49d21b4dfb0aac95041dca541fd2f5d6c6554664
65b2fa4eaf9385c2242c32245d583d1e766ec934
/src/main/java/org/revo/txok/Repository/ExamRepository.java
2661127cbe3af8e6ff508a0bc2da6adeccbcf810
[]
no_license
ashraf-revo/txok
53efd1199feaaf4401091e80b41ec1bee0b339bc
188e427aa50e302dacef786431c2d84cc682b69d
refs/heads/master
2020-03-25T04:56:00.701478
2018-08-16T16:25:43
2018-08-16T16:25:43
143,416,793
0
0
null
null
null
null
UTF-8
Java
false
false
228
java
package org.revo.txok.Repository; import org.revo.txok.Domain.Exam; import org.springframework.data.mongodb.repository.ReactiveMongoRepository; public interface ExamRepository extends ReactiveMongoRepository<Exam, String> { }
[ "ashraf1abdelrasool@gmail.com" ]
ashraf1abdelrasool@gmail.com
84c0e360fec3781b3faea2a66bd933a0b38031ea
bd7b2f839e76e37bf8a3fd841a7451340f7df7a9
/archunit/src/test/java/com/tngtech/archunit/core/importer/testexamples/fieldaccesstointerfaces/InterfaceWithFields.java
503d1556c22634ad1b4813c9ade562d01e7a3b9e
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
TNG/ArchUnit
ee7a1cb280360481a004c46f9861c5db181d7335
87cc595a281f84c7be6219714b22fbce337dd8b1
refs/heads/main
2023-09-01T14:18:52.601280
2023-08-29T09:15:13
2023-08-29T09:15:13
88,962,042
2,811
333
Apache-2.0
2023-09-14T08:11:13
2017-04-21T08:39:20
Java
UTF-8
Java
false
false
333
java
package com.tngtech.archunit.core.importer.testexamples.fieldaccesstointerfaces; // NOTE: The compiler will inline Strings or primitives, thus use field type Object public interface InterfaceWithFields extends ParentInterfaceWithFields { Object objectFieldOne = "objectFieldOne"; Object objectFieldTwo = "objectFieldTwo"; }
[ "peter.gafert@tngtech.com" ]
peter.gafert@tngtech.com
b62262102ee41d1faea302d02f14faf2eb908bcf
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava2/Foo708Test.java
f743745942aa24e4925325b1da500581a60e4d2a
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package applicationModulepackageJava2; import org.junit.Test; public class Foo708Test { @Test public void testFoo0() { new Foo708().foo0(); } @Test public void testFoo1() { new Foo708().foo1(); } @Test public void testFoo2() { new Foo708().foo2(); } @Test public void testFoo3() { new Foo708().foo3(); } @Test public void testFoo4() { new Foo708().foo4(); } @Test public void testFoo5() { new Foo708().foo5(); } @Test public void testFoo6() { new Foo708().foo6(); } @Test public void testFoo7() { new Foo708().foo7(); } @Test public void testFoo8() { new Foo708().foo8(); } @Test public void testFoo9() { new Foo708().foo9(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
2b60e8f85f2dbb4b28d12568cc616173a47c539e
ee63930722137539e989a36cdc7a3ac235ca1932
/app/src/main/java/com/yksj/consultation/sonDoc/chatting/avchat/module/input/robot/animation/SlideInBottomAnimation.java
a71def0eb918ba5f79f0ccb2073472c2b66d19e8
[]
no_license
13525846841/SixOneD
3189a075ba58e11eedf2d56dc4592f5082649c0b
199809593df44a7b8e2485ca7d2bd476f8faf43a
refs/heads/master
2020-05-22T07:21:27.829669
2019-06-05T09:59:58
2019-06-05T09:59:58
186,261,515
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
package com.yksj.consultation.sonDoc.chatting.avchat.module.input.robot.animation; import android.animation.Animator; import android.animation.ObjectAnimator; import android.view.View; public class SlideInBottomAnimation implements BaseAnimation { @Override public Animator[] getAnimators(View view) { return new Animator[]{ ObjectAnimator.ofFloat(view, "translationY", view.getMeasuredHeight(), 0) }; } }
[ "762900942@qq.com" ]
762900942@qq.com
b4fd366da0a8e00d69c8a9bfce9fd71d6022ae76
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_347598514d5e243ba1c36dc7c9b1c475c4ad72f1/Application/5_347598514d5e243ba1c36dc7c9b1c475c4ad72f1_Application_t.java
902e2e7c47e5c69a82260bffe1c6e69fc0a2f7c9
[]
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,607
java
package controllers; import models.Topic; import org.joda.time.DateTime; import play.*; import play.data.format.Formatters; import static play.data.format.Formatters.*; import play.mvc.*; import play.data.Form; import static play.data.Form.*; import play.data.validation.Constraints; import play.mvc.*; import views.html.*; import java.util.Locale; public class Application extends Controller { final static Form<Topic> topicForm = form(Topic.class); public static Result index() { Topic result = Topic.findByTitle("Crisis"); if (result == null) { result = Topic.find.byId(1l); } return ok(index.render(result.title, result.getFullJson().toString())); } public static Result show(String title) { Topic result = Topic.findByTitle(title); if (result == null) { return index(); } return ok(index.render(result.title, result.getFullJson().toString())); } public static Result getTopicJson() { Form<Topic> t = topicForm.bindFromRequest(); Topic topic = Topic.findByTitle(t.get().title); if (topic == null) { return ok("{}"); } return ok(topic.getFullJson()); } public static Result adminTools() { String sessionData = session().get("administrator"); boolean isAdmin = sessionData != null && sessionData.equals("yes"); if (!isAdmin) { return ok(enter_password.render()); } else { return ok(edit_topics.render()); } } public static class Password { @Constraints.Required public String password; } final static Form<Password> passwordForm = form(Password.class); public static Result verifyPassword() { Form<Password> form = passwordForm.bindFromRequest(); if(!form.hasErrors() && form.get().password.equals(Play.application().configuration().getString("password"))) { session("administrator", "yes"); return redirect("/admin_tools"); } return ok("Access Denied"); } public static Result postTopic() { Form<Topic> form = topicForm.bindFromRequest(); String supers = form.field("supers").valueOr(""); String subs = form.field("subs").valueOr(""); String title = Topic.handleForm(form, supers, subs); if (title == null) return redirect("/admin_tools"); else return redirect("/topic/" + title); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
0f058c9830f37cdf20fecab9676d77fa59330b50
2f7b585bc87c88e46747c969f49b86706e05cfa6
/iefas-ws/src/main/java/hk/oro/iefas/ws/casemgt/repository/assembler/CaseDTOAssembler.java
80257fe1a3a2c058a4789c9e03b8b4b3f2a0f0c4
[]
no_license
peterso05168/oro
3fd5ee3e86838215b02b73e8c5a536ba2bb7c525
6ca20e6dc77d4716df29873c110eb68abbacbdbd
refs/heads/master
2020-03-21T17:10:58.381531
2018-06-27T02:19:08
2018-06-27T02:19:08
138,818,244
0
0
null
null
null
null
UTF-8
Java
false
false
2,368
java
package hk.oro.iefas.ws.casemgt.repository.assembler; import java.util.ArrayList; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageRequest; import hk.oro.iefas.core.util.BusinessUtils; import hk.oro.iefas.core.util.CommonUtils; import hk.oro.iefas.core.util.DataUtils; import hk.oro.iefas.domain.casemgt.dto.CaseDTO; import hk.oro.iefas.domain.casemgt.dto.SearchCaseDetailResultDTO; import hk.oro.iefas.domain.casemgt.entity.Case; /** * @version $Revision: 3208 $ $Date: 2018-06-20 10:50:21 +0800 (週三, 20 六月 2018) $ * @author $Author: dante.fang $ */ public class CaseDTOAssembler { public static Page<SearchCaseDetailResultDTO> toResultDTO(Page<Case> page) { List<Case> content = page.getContent(); List<SearchCaseDetailResultDTO> dtoList = new ArrayList<>(); if (CommonUtils.isNotEmpty(content)) { content.stream().forEach(item -> { SearchCaseDetailResultDTO dto = new SearchCaseDetailResultDTO(); dto.setCaseId(item.getCaseId()); dto.setCaseName(item.getCaseName()); dto.setCaseNo(BusinessUtils.addZeroToCaseNo(item.getCaseNo())); dto.setCaseTypeCode(item.getCaseType().getCaseTypeCode()); dto.setCaseTypeDesc(item.getCaseType().getCaseTypeDesc()); dto.setCaseYear(String.valueOf(item.getCaseYear())); dto.setCaseNumber(item.getWholeCaseNo()); dto.setOutsiderName(item.getOutsider() != null ? item.getOutsider().getOutsiderName() : null); dto.setOutsiderTypeName( item.getOutsider() != null ? item.getOutsider().getOutsiderType().getOutsiderTypeDesc() : null); dto.setHandlingOfficerPostTitle(item.getPost().getPostTitle()); dto.setStatus(item.getStatus()); dtoList.add(dto); }); } return new PageImpl<>(dtoList, new PageRequest(page.getNumber(), page.getSize(), page.getSort()), page.getTotalElements()); } public static CaseDTO toDTO(Case caseInfo) { CaseDTO dto = null; if (caseInfo != null) { dto = DataUtils.copyProperties(caseInfo, CaseDTO.class); } return dto; } }
[ "peterso05168@gmail.com" ]
peterso05168@gmail.com
54e6fa8548ddc73bebb96622744f08eaf3b9f443
c0feb57b8d60f787ced8b7f16cd8e0e311a2175e
/app/src/main/java/com/blm/comparepoint/interfacer/UpdateRedAmountInterfacer.java
ac21305a72c657a70af947af7550fbfcc80260d1
[]
no_license
WhiteorBlack/ComparePoint
323b6ddea02373ca8003130558a1c11d2d67ae2b
a3da33c617a8c9ee2239e3d83a711cef92a233c4
refs/heads/master
2021-01-14T08:04:00.197726
2017-06-13T04:18:57
2017-06-13T04:18:57
81,910,854
0
0
null
null
null
null
UTF-8
Java
false
false
180
java
package com.blm.comparepoint.interfacer; /** * Created by Administrator on 2017/5/5. */ public interface UpdateRedAmountInterfacer { void updateRedAmount(int redAmount); }
[ "415082375@qq.com" ]
415082375@qq.com
67432f7a601fff629bd908fe41e3851d6e906b84
808041d5f91415948a3ee28f7620f3b6b99c16d9
/tube/src/main/java/org/revo/Service/MediaService.java
4fc5300214dc0e7b1ebafde614e81e6463334e6b
[]
no_license
ashraf-revo/Revotube
29d03262230797bd3c0e6b63bb5d7e4669cdd8cd
b9ff257269640fa764f82e4fbf66f2bf12e51483
refs/heads/master
2021-03-24T12:32:42.935427
2017-11-23T19:05:35
2017-11-23T19:05:35
109,124,874
0
0
null
null
null
null
UTF-8
Java
false
false
757
java
package org.revo.Service; import org.revo.Domain.Media; import org.revo.Domain.Status; import java.io.File; import java.io.IOException; import java.util.List; /** * Created by ashraf on 15/04/17. */ public interface MediaService { File saveInFileSystem(Media media) throws IOException; Media saveFile(Media media); Media save(Media media); List<Media> findAll(Status status); List<Media> findAll(Status status, List<String> ids); Media findOne(String id); String findOneParsed(String id); String lastId(); List<Media> findByUser(String id, Status status); /* Media publish(Media media, User user); */ File convertImage(File video); Media process(Media media) throws IOException; }
[ "ashraf1abdelrasool@gmail.com" ]
ashraf1abdelrasool@gmail.com
e6c7a2cbc8b91f350cd84e6aa48920033dd49cea
667b169912840feb29954ca4c24526553aeaa906
/extension/richfaces/src/main/java/org/jboss/portletbridge/richfaces/application/ApplicationImpl.java
b34cfc0a263893b1a797fe203c94dea4b94d70de
[]
no_license
ppalaga/portletbridge
8f074bfc46c39c9ad8789a94c82bd38b416e6935
ef01fa82f46ed4eff91702dcfd54cbcbc4e94621
refs/heads/master
2021-01-18T06:36:28.441861
2013-04-16T20:10:06
2013-04-16T20:10:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,190
java
/* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.portletbridge.richfaces.application; import javax.faces.application.Application; import javax.faces.application.ApplicationWrapper; import javax.faces.application.ResourceHandler; import org.jboss.portletbridge.richfaces.application.resource.OutermostRichFacesPortletResourceHandler; import org.richfaces.resource.ResourceHandlerImpl; /** * @author <a href="http://community.jboss.org/people/kenfinni">Ken Finnigan</a> */ public class ApplicationImpl extends ApplicationWrapper { private Application wrapped; public ApplicationImpl(Application application) { wrapped = application; } /** * @see javax.faces.application.ApplicationWrapper#getWrapped() */ @Override public Application getWrapped() { return wrapped; } @Override public ResourceHandler getResourceHandler() { ResourceHandler resourceHandler = wrapped.getResourceHandler(); if (null != resourceHandler && resourceHandler instanceof ResourceHandlerImpl) { resourceHandler = new OutermostRichFacesPortletResourceHandler(resourceHandler); } return resourceHandler; } }
[ "ken@kenfinnigan.me" ]
ken@kenfinnigan.me
3da100f9f585ecd0c3bea87405244ff6d7b6190a
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/model/bv$18.java
45ca5e87251b1329bc183635be601aa5ad2c0927
[]
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
899
java
package com.tencent.mm.model; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.sdk.platformtools.bo; final class bv$18 extends bv.a { bv$18(bv parambv) { super(parambv, (byte)0); } public final boolean a(bt parambt) { boolean bool = false; AppMethodBeat.i(72636); if ((System.currentTimeMillis() - parambt.eRt > 3600000L) && (bo.getInt(parambt.fns, 0) > 0)) { bv.s(parambt.key, parambt.fns); parambt.fns = "0"; parambt.eRt = System.currentTimeMillis(); bool = true; AppMethodBeat.o(72636); } while (true) { return bool; AppMethodBeat.o(72636); } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes8-dex2jar.jar * Qualified Name: com.tencent.mm.model.bv.18 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
d2c4fd39bd4f829b989fb3b0537a9df0abea10b7
1ec62a7e351ed029b2141ee01432d2fc8c44f43a
/java/isemba/Applet/j314/j314.java
d626c54826d9a94026630b21fe450399a8d3d951
[]
no_license
hataka/codingground
7a1b555d13b8e42320f5f5e4898664191da16a47
53d2b204ae2e0fb13bd6d293e07c68066226e26b
refs/heads/master
2021-01-20T01:34:16.778320
2019-02-02T04:27:14
2019-02-02T04:27:14
89,292,259
0
0
null
null
null
null
UTF-8
Java
false
false
1,648
java
// -*- mode: java -*- Time-stamp: <2009-06-20 16:40:17 kahata> /*==================================================================== * name: j314.java * created : Time-stamp: <09/06/20(土) 15:52:08 hata> * $Id$ * Programmed by kahata * To compile: * To run: * links: http://jubilo.cis.ibaraki.ac.jp/~isemba/PROGRAM/JAVA/java.shtml * http://jubilo.cis.ibaraki.ac.jp/~isemba/PROGRAM/JAVA/APPLET/j314.htm * description: * ====================================================================*/ //////////////////////////////////////////////////////////////////////////////// // << j314.java >> // // アプレット(1):グラフィックス(直線) // //  n×nのマス目を描く。 // // ●Graphicsクラスのメソッド //   public abstract void drawLine(int x0, int y0, int x1, int y1) //   機能:点(x0,y0)と点(x1,y1)の間に直線を引く。 // //////////////////////////////////////////////////////////////////////////////// import java.applet.Applet; import java.awt.Graphics; import java.awt.Color; public class j314 extends Applet { public void init() { // アプレットの背景色を白色に設定。 this.setBackground(Color.white); } public void paint(Graphics g) { // n×nのマス目を描画。 int x=30,y=30,h=40,n=3; for( int i=0; i<=n; i++ ) { g.drawLine(x,y+h*i,x+h*n,y+h*i); g.drawLine(x+h*i,y,x+h*i,y+h*n); } } } /* <!-- HTMLファイル --> <html> <head> <title>アプレット</title> </head> <body bgcolor=white text=black> <applet code="j314.class" width="300" height="200"> </applet> </body> </html> */
[ "kazuhiko.hata@nifty.com" ]
kazuhiko.hata@nifty.com
1622c45f6bdda8186a2931bfcfdb99a344d208ff
e6cb9525dbfa760086e715e4926f0f0e41e72ad4
/qyds-dao/src/main/java/net/dlyt/qyds/dao/GdsDetailMapper.java
0d70e21d713cbc3d372dbd3f0f00cd273505348f
[]
no_license
422517423/QYDS
97fbd76d05ef47d23468a173972e734e82768817
bcee5294c0554a2c35d11ea15663cba978b84016
refs/heads/master
2021-10-08T10:10:31.652107
2018-12-11T02:03:31
2018-12-11T02:03:31
113,963,190
0
3
null
2018-01-04T12:44:58
2017-12-12T08:22:33
JavaScript
UTF-8
Java
false
false
447
java
package net.dlyt.qyds.dao; import net.dlyt.qyds.common.dto.GdsDetail; import org.springframework.stereotype.Repository; @Repository public interface GdsDetailMapper { int deleteByPrimaryKey(String goodsId); int insert(GdsDetail record); int insertSelective(GdsDetail record); GdsDetail selectByPrimaryKey(String goodsId); int updateByPrimaryKeySelective(GdsDetail record); int updateByPrimaryKey(GdsDetail record); }
[ "422517423@qq.com" ]
422517423@qq.com
196088dfd7a31a09e744f725106b44572e99fb5a
3b6117c0ff791066a669e74404b4db6a5fb56340
/星河/com.agdress.api/src/main/java/com/agdress/entity/Starship_UserAccountDetailEntity.java
3401ba5bf293a0cffc366c81bf6a600ea388d040
[]
no_license
wofxuan/yunjing
a7316565081bfda0360e769633d43cae5e3c5613
1909facbc5f90ca20591eda39f713301fa1c6787
refs/heads/master
2021-07-16T12:56:11.494760
2017-10-24T03:51:52
2017-10-24T03:51:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,489
java
package com.agdress.entity; import com.agdress.enums.TradeKindEnum; import com.agdress.enums.TradeStatusEnum; import com.agdress.enums.TradeTypeEnum; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; /** * 用户财富实体 */ @TableName(value = "t_user_account_detail") public class Starship_UserAccountDetailEntity extends BaseEntity { @TableId(type = IdType.AUTO,value = "trade_id") private Long tradeId; @TableField(value = "user_id") private Long userId; @TableField(value = "account_id") private Long accountId; @TableField(value = "trade_no") private String tradeNo; @TableField(value = "amount") private Double amount; @TableField(value = "new_balance") private Double newBalance; @TableField(value = "trade_currency") private Integer tradeCurrency; @TableField(value = "trade_kind") private TradeKindEnum tradeKindEnum; @TableField(value = "trade_status") private TradeStatusEnum tradeStatusEnum; @TableField(value = "trade_type") private TradeTypeEnum tradeTypeEnum; @TableField(value = "remarks") private String remarks; @TableField(value = "flow_id") private Long flowId; public Long getFlowId() { return flowId; } public void setFlowId(Long flowId) { this.flowId = flowId; } public String getRemarks() { return remarks; } public void setRemarks(String remarks) { this.remarks = remarks; } public Long getTradeId() { return tradeId; } public void setTradeId(Long tradeId) { this.tradeId = tradeId; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public Long getAccountId() { return accountId; } public void setAccountId(Long accountId) { this.accountId = accountId; } public String getTradeNo() { return tradeNo; } public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } public Double getAmount() { return amount; } public void setAmount(Double amount) { this.amount = amount; } public Double getNewBalance() { return newBalance; } public void setNewBalance(Double newBalance) { this.newBalance = newBalance; } public Integer getTradeCurrency() { return tradeCurrency; } public void setTradeCurrency(Integer tradeCurrency) { this.tradeCurrency = tradeCurrency; } public TradeKindEnum getTradeKindEnum() { return tradeKindEnum; } public void setTradeKindEnum(TradeKindEnum tradeKindEnum) { this.tradeKindEnum = tradeKindEnum; } public TradeStatusEnum getTradeStatusEnum() { return tradeStatusEnum; } public void setTradeStatusEnum(TradeStatusEnum tradeStatusEnum) { this.tradeStatusEnum = tradeStatusEnum; } public TradeTypeEnum getTradeTypeEnum() { return tradeTypeEnum; } public void setTradeTypeEnum(TradeTypeEnum tradeTypeEnum) { this.tradeTypeEnum = tradeTypeEnum; } }
[ "“" ]
7affdc034032755db1a0760c42183be7c1b06ee7
2b2fcb1902206ad0f207305b9268838504c3749b
/WakfuClientSources/srcx/class_4042_blJ.java
17883a0a9f5017d0f85f32253cd7d907cdc8f283
[]
no_license
shelsonjava/Synx
4fbcee964631f747efc9296477dee5a22826791a
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
refs/heads/master
2021-01-15T13:51:41.816571
2013-11-17T10:46:22
2013-11-17T10:46:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,250
java
import org.apache.log4j.Logger; public final class blJ { private static Logger K = Logger.getLogger(blJ.class); private static final bWH fCR = new anh(); public static bWH bwM() { return fCR; } public static void a(int paramInt, bES parambES) { Object localObject; switch (paramInt) { case 4122: localObject = new cbz(); break; case 6200: localObject = new cqM(); break; case 6204: localObject = new aqS(); break; case 8014: localObject = new dfW(); break; case 4520: localObject = new beB(); break; case 4522: localObject = new crB(); break; case 8412: localObject = new bla(); break; case 8302: localObject = new avi(); break; case 8108: localObject = new axW(); break; case 4524: localObject = new dBH(); break; case 4528: localObject = new cKA(); break; case 8410: localObject = new ato(); break; case 4506: localObject = new ben(); break; case 8106: localObject = new cUH(); break; case 8002: localObject = new cnF(); break; case 8028: localObject = new dgJ(); break; case 8010: localObject = new brM(); break; case 8304: localObject = new bDZ(); break; case 4300: localObject = new beM(); break; case 202: localObject = new tN(); break; case 8033: localObject = new Mk(); break; case 8034: localObject = new Wz(); break; case 8120: localObject = new ciP(); break; case 8124: localObject = new qp(); break; case 8122: localObject = new Rg(); break; case 8110: localObject = new aHs(); break; case 8116: localObject = new dMk(); break; case 4123: localObject = new dRd(); break; case 8200: localObject = new aJy(); break; default: K.warn("ATTENTION : l'id de message passé en parametre n'est pas géré par la factory : " + paramInt); localObject = fCR; } ((bWH)localObject).jl(paramInt); parambES.a((bWH)localObject); } }
[ "music_inme@hotmail.fr" ]
music_inme@hotmail.fr
130e96d4eb85b762eb6705a23bc8e5750b1a43da
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/wallet/pay/b$15.java
51d5ee13601831b0d2431a735f5d41124f4099c3
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,291
java
package com.tencent.mm.plugin.wallet.pay; import android.os.Parcelable; import com.tencent.mm.ab.l; import com.tencent.mm.plugin.wallet.pay.a.e.b; import com.tencent.mm.plugin.wallet.pay.a.e.c; import com.tencent.mm.plugin.wallet.pay.a.e.d; import com.tencent.mm.plugin.wallet.pay.a.e.e; import com.tencent.mm.plugin.wallet.pay.a.e.f; import com.tencent.mm.plugin.wallet.pay.b.a; import com.tencent.mm.plugin.wallet_core.model.Orders; import com.tencent.mm.plugin.wallet_core.model.p; import com.tencent.mm.pluginsdk.wallet.PayInfo; import com.tencent.mm.sdk.platformtools.bi; import com.tencent.mm.sdk.platformtools.x; import com.tencent.mm.wallet_core.d.i; import com.tencent.mm.wallet_core.ui.WalletBaseUI; class b$15 extends a { final /* synthetic */ b peU; b$15(b bVar, WalletBaseUI walletBaseUI, i iVar) { this.peU = bVar; super(bVar, walletBaseUI, iVar); } public final /* synthetic */ CharSequence ui(int i) { return this.fEY.getString(com.tencent.mm.plugin.wxpay.a.i.wallet_set_password_pay_tips); } public final boolean d(int i, int i2, String str, l lVar) { if (super.d(i, i2, str, lVar)) { return true; } if (!(lVar instanceof f) || i != 0 || i2 != 0) { return false; } f fVar = (f) lVar; if (fVar.pgm) { b.o(this.peU).putParcelable("key_orders", fVar.pfb); } Parcelable parcelable = fVar.lJN; if (parcelable != null) { b.p(this.peU).putParcelable("key_realname_guide_helper", parcelable); } this.peU.a(this.fEY, 0, b.q(this.peU)); return true; } public final boolean m(Object... objArr) { l lVar; p pVar = (p) objArr[0]; Orders orders = (Orders) b.r(this.peU).getParcelable("key_orders"); if (pVar == null || orders == null) { x.e("MicroMsg.CgiManager", "empty verify or orders"); lVar = null; } else { PayInfo payInfo = pVar.mpb; String str = ""; if (payInfo != null) { x.i("MicroMsg.CgiManager", "get reqKey from payInfo"); str = payInfo.bOd; } if (bi.oW(str)) { x.i("MicroMsg.CgiManager", "get reqKey from orders"); str = orders.bOd; } if (bi.oW(str)) { x.i("MicroMsg.CgiManager", "empty reqKey!"); lVar = new f(pVar, orders); } else { if (payInfo != null) { x.d("MicroMsg.CgiManager", "reqKey: %s, %s", new Object[]{payInfo.bOd, orders.bOd}); } x.i("MicroMsg.CgiManager", "verifyreg reqKey: %s", new Object[]{str}); x.i("MicroMsg.CgiManager", "verifyreg go new split cgi"); lVar = str.startsWith("sns_aa_") ? new com.tencent.mm.plugin.wallet.pay.a.e.a(pVar, orders) : str.startsWith("sns_tf_") ? new e(pVar, orders) : str.startsWith("sns_ff_") ? new b(pVar, orders) : str.startsWith("ts_") ? new c(pVar, orders) : str.startsWith("sns_") ? new d(pVar, orders) : new f(pVar, orders); } } if (lVar != null) { this.uXK.a(lVar, true, 1); } return true; } }
[ "707194831@qq.com" ]
707194831@qq.com
5c3bd74f96cd951fe625cfe7c80f03d4784dcd74
45033710ad1ccd451d0fc436ae928aeaee2ba45a
/fixture/src/main/java/au/com/scds/agric/fixture/scenarios/RecreateSimpleObjects.java
832c69f600f1f3d14f3e4506131eadc6ecf4614c
[ "MIT" ]
permissive
jifffffy/isis-agri
95ebeddd2a1c5a12762aca640590d5da28d81dc3
7563bf328aba3dfebf39a3a86413916276e05a8e
refs/heads/master
2023-03-22T09:56:02.158095
2017-04-19T21:40:07
2017-04-19T21:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,002
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package au.com.scds.agric.fixture.scenarios; import java.util.Arrays; import java.util.Collections; import java.util.List; import com.google.common.collect.Lists; import au.com.scds.agric.dom.simple.SimpleObject; import au.com.scds.agric.fixture.dom.simple.SimpleObjectCreate; import au.com.scds.agric.fixture.dom.simple.SimpleObjectsTearDown; import org.apache.isis.applib.annotation.Programmatic; import org.apache.isis.applib.fixturescripts.FixtureScript; public class RecreateSimpleObjects extends FixtureScript { public final List<String> NAMES = Collections.unmodifiableList(Arrays.asList( "Foo", "Bar", "Baz", "Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo")); public RecreateSimpleObjects() { withDiscoverability(Discoverability.DISCOVERABLE); } //region > number (optional input) private Integer number; /** * The number of objects to create, up to 10; optional, defaults to 3. */ public Integer getNumber() { return number; } public RecreateSimpleObjects setNumber(final Integer number) { this.number = number; return this; } //endregion //region > simpleObjects (output) private final List<SimpleObject> simpleObjects = Lists.newArrayList(); /** * The simpleobjects created by this fixture (output). */ @Programmatic public List<SimpleObject> getSimpleObjects() { return simpleObjects; } //endregion @Override protected void execute(final ExecutionContext ec) { // defaults final int number = defaultParam("number", ec, 3); // validate if(number < 0 || number > NAMES.size()) { throw new IllegalArgumentException(String.format("number must be in range [0,%d)", NAMES.size())); } // // execute // ec.executeChild(this, new SimpleObjectsTearDown()); for (int i = 0; i < number; i++) { final SimpleObjectCreate fs = new SimpleObjectCreate().setName(NAMES.get(i)); ec.executeChild(this, fs.getName(), fs); simpleObjects.add(fs.getSimpleObject()); } } }
[ "steve.cameron.62@gmail.com" ]
steve.cameron.62@gmail.com
769c1753bdc93c5b0164f850bebf5733e4ced865
6b4125b3d69cbc8fc291f93a2025f9f588d160d3
/tests/com/limegroup/gnutella/MessageRouterImplRefactoringTest.java
fba53d8e24e29e2a37fd7c47cf3b5d62d35e2885
[]
no_license
mnutt/limewire5-ruby
d1b079785524d10da1b9bbae6fe065d461f7192e
20fc92ea77921c83069e209bb045b43b481426b4
refs/heads/master
2022-02-10T12:20:02.332362
2009-09-11T15:47:07
2009-09-11T15:47:07
89,669
2
3
null
2022-01-27T16:18:46
2008-12-12T19:40:01
Java
UTF-8
Java
false
false
7,589
java
package com.limegroup.gnutella; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.jmock.Expectations; import org.jmock.Mockery; import org.limewire.io.GUID; import org.limewire.util.BaseTestCase; import com.google.inject.AbstractModule; import com.google.inject.Injector; import com.google.inject.Module; import com.limegroup.gnutella.connection.ConnectionCapabilities; import com.limegroup.gnutella.connection.RoutedConnection; import com.limegroup.gnutella.messages.PushRequest; import com.limegroup.gnutella.search.QueryDispatcher; import com.limegroup.gnutella.util.MessageTestUtils; import com.limegroup.gnutella.util.TestConnectionManager; /** * Temporary test class to ensure that MessageRouterImpl works as before * after refactoring. Test cases should be moved to new top level handler * classes eventually. */ public class MessageRouterImplRefactoringTest extends BaseTestCase { private Mockery context; // private TestConnectionFactory testConnectionFactory; private MessageRouterImpl messageRouterImpl; // private TestConnectionManager connectionManager; public MessageRouterImplRefactoringTest(String name) { super(name); } @Override protected void setUp() throws Exception { context = new Mockery(); } /** * Helper method to configure the injector and return it. It also sets * * Neeeded as each test method needs its own participants. */ private Injector createInjectorAndInitialize(Module... modules) { Injector injector = LimeTestUtils.createInjector(modules); // testConnectionFactory = injector.getInstance(TestConnectionFactory.class); messageRouterImpl = (MessageRouterImpl) injector.getInstance(MessageRouter.class); messageRouterImpl.start(); return injector; } /** * Calls {@link #createInjectorAndInitialize(Module...)} and with a module * that sets up the TestConnectionManager. */ private Injector createDefaultInjector(Module... modules) { Module m = new AbstractModule() { @Override protected void configure() { bind(ConnectionManager.class).to(TestConnectionManager.class); } }; List<Module> list = new ArrayList<Module>(); list.addAll(Arrays.asList(modules)); list.add(m); Injector injector = createInjectorAndInitialize(list.toArray(new Module[0])); // connectionManager = (TestConnectionManager)injector.getInstance(ConnectionManager.class); return injector; } /** * Tests if tcp push requests are correctly handled before and after refactoring. */ public void testHandlePushRequestTCP() { createDefaultInjector(); final PushRequest pushRequest = context.mock(PushRequest.class); final ReplyHandler senderHandler = context.mock(ReplyHandler.class); final GUID guid = new GUID (); context.checking(new Expectations() {{ allowing(pushRequest).getClientGUID(); will(returnValue(guid.bytes())); one(senderHandler).countDroppedMessage(); }}); context.checking(MessageTestUtils.createDefaultMessageExpectations(pushRequest, PushRequest.class)); // test without installed reply handler messageRouterImpl.handleMessage(pushRequest, senderHandler); context.assertIsSatisfied(); final ReplyHandler replyHandler = context.mock(ReplyHandler.class); context.checking(new Expectations() {{ allowing(replyHandler).isOpen(); will(returnValue(true)); one(replyHandler).handlePushRequest(with(same(pushRequest)), with(same(senderHandler))); }}); messageRouterImpl.getPushRouteTable().routeReply(guid.bytes(), replyHandler); // test with installed reply handler messageRouterImpl.handleMessage(pushRequest, senderHandler); context.assertIsSatisfied(); } /** * Tests if udp/multicast push requests are correctly handled before and after refactoring. */ public void testhandlePushRequestUDPMulticast() { final UDPReplyHandlerCache udpReplyHandlerCache = context.mock(UDPReplyHandlerCache.class); createDefaultInjector(new AbstractModule() { @Override protected void configure() { bind(UDPReplyHandlerCache.class).toInstance(udpReplyHandlerCache); } }); final PushRequest pushRequest = context.mock(PushRequest.class); final ReplyHandler senderHandler = context.mock(ReplyHandler.class); final GUID guid = new GUID (); final InetSocketAddress address = InetSocketAddress.createUnresolved("127.0.0.1", 4545); context.checking(new Expectations() {{ allowing(pushRequest).getClientGUID(); will(returnValue(guid.bytes())); one(senderHandler).countDroppedMessage(); allowing(udpReplyHandlerCache).getUDPReplyHandler(with(any(InetSocketAddress.class))); will(returnValue(senderHandler)); }}); context.checking(MessageTestUtils.createDefaultMessageExpectations(pushRequest, PushRequest.class)); // test without installed reply handler messageRouterImpl.handleUDPMessage(pushRequest, address); context.assertIsSatisfied(); // same for multicast messageRouterImpl.handleMulticastMessage(pushRequest, address); context.assertIsSatisfied(); final ReplyHandler replyHandler = context.mock(ReplyHandler.class); context.checking(new Expectations() {{ allowing(replyHandler).isOpen(); will(returnValue(true)); one(replyHandler).handlePushRequest(with(same(pushRequest)), with(same(senderHandler))); }}); messageRouterImpl.getPushRouteTable().routeReply(guid.bytes(), replyHandler); // test with installed reply handler messageRouterImpl.handleUDPMessage(pushRequest, address); context.assertIsSatisfied(); // same for multicast messageRouterImpl.handleMulticastMessage(pushRequest, address); context.assertIsSatisfied(); } public void testConnectionsAreRemoved() { final QueryDispatcher queryDispatcher = context.mock(QueryDispatcher.class); Injector injector = createDefaultInjector(new AbstractModule() { @Override protected void configure() { bind(QueryDispatcher.class).toInstance(queryDispatcher); } }); ConnectionManager connectionManager = injector.getInstance(ConnectionManager.class); final RoutedConnection connection = context.mock(RoutedConnection.class); final ConnectionCapabilities connectionCapabilities = context.mock(ConnectionCapabilities.class); context.checking(new Expectations() {{ allowing(connection).getConnectionCapabilities(); will(returnValue(connectionCapabilities)); allowing(connection).getAddress(); will(returnValue("127.0.0.1")); ignoring(connection); ignoring(connectionCapabilities); one(queryDispatcher).removeReplyHandler(with(same(connection))); }}); connectionManager.remove(connection); context.assertIsSatisfied(); } }
[ "michael@nuttnet.net" ]
michael@nuttnet.net
7d6ae7c821491aa4665158a5abb862cec1f133c5
71007018bfae36117fd2f779dbe6e6d7bb9bde9c
/src/main/java/com/magento/test/handler/ReportComparedProductIndexHandler.java
b23909bcdcd76324321161854a209191004b15d8
[]
no_license
gmai2006/magentotest
819201760b720a90d55ef853be964651ace125ac
ca67d16d6280ddaefbf57fa1129b6ae7bd80408f
refs/heads/main
2023-09-03T05:14:27.788984
2021-10-17T06:25:09
2021-10-17T06:25:09
418,040,494
0
0
null
null
null
null
UTF-8
Java
false
false
2,481
java
/** * %% Copyright (C) 2021 DataScience 9 LLC %% Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing permissions and * limitations under the License. #L% * * <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or * function or changes please update the templates then submit the template through our web * interface. */ package com.magento.test.handler; import java.util.List; import javax.inject.Inject; import javax.inject.Named; import java.nio.charset.StandardCharsets; import com.magento.test.entity.ReportComparedProductIndex; import com.magento.test.dao.JpaDao; import com.magento.test.utils.DelimiterParser; // @Stateless @Named("ReportComparedProductIndexHandler") public class ReportComparedProductIndexHandler extends DelimiterFileHandler<ReportComparedProductIndex> { @Inject @Named("DefaultJpaDao") public ReportComparedProductIndexHandler(final JpaDao dao) { super(dao); } @Override protected ReportComparedProductIndex parseLine(List<String> headers, List<String> tokens) { ReportComparedProductIndex record = new ReportComparedProductIndex(); for (int i = 0; i < tokens.size(); i++) { switch (headers.get(i)) { case "indexId": record.setIndexId(java.lang.Long.valueOf((tokens.get(i)))); break; case "visitorId": record.setVisitorId(java.lang.Integer.valueOf((tokens.get(i)))); break; case "customerId": record.setCustomerId(java.lang.Integer.valueOf((tokens.get(i)))); break; case "productId": record.setProductId(java.lang.Integer.valueOf((tokens.get(i)))); break; case "storeId": record.setStoreId(java.lang.Integer.valueOf((tokens.get(i)))); break; case "addedAt": record.setAddedAt(new java.sql.Timestamp(parseTime(tokens.get(i)))); break; default: logger.severe("Unknown col " + headers.get(i)); } } return record; } }
[ "gmai2006@gmail.com" ]
gmai2006@gmail.com
b1c71437d634b87791bb09eac0d34e4364af53a6
a13ab684732add3bf5c8b1040b558d1340e065af
/java7-src/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java
a3982366ab7095a8fead8e280a807c0c8fb8b763
[]
no_license
Alivop/java-source-code
554e199a79876343a9922e13ccccae234e9ac722
f91d660c0d1a1b486d003bb446dc7c792aafd830
refs/heads/master
2020-03-30T07:21:13.937364
2018-10-25T01:49:39
2018-10-25T01:51:38
150,934,150
5
2
null
null
null
null
UTF-8
Java
false
false
2,344
java
package org.omg.PortableServer.POAPackage; /** * org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl * Friday, July 25, 2014 8:50:00 AM PDT */ abstract public class AdapterAlreadyExistsHelper { private static String _id = "IDL:omg.org/PortableServer/POA/AdapterAlreadyExists:1.0"; public static void insert (org.omg.CORBA.Any a, org.omg.PortableServer.POAPackage.AdapterAlreadyExists that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static org.omg.PortableServer.POAPackage.AdapterAlreadyExists extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.PortableServer.POAPackage.AdapterAlreadyExistsHelper.id (), "AdapterAlreadyExists", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static org.omg.PortableServer.POAPackage.AdapterAlreadyExists read (org.omg.CORBA.portable.InputStream istream) { org.omg.PortableServer.POAPackage.AdapterAlreadyExists value = new org.omg.PortableServer.POAPackage.AdapterAlreadyExists (); // read and discard the repository ID istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableServer.POAPackage.AdapterAlreadyExists value) { // write the repository ID ostream.write_string (id ()); } }
[ "liulp@zjhjb.com" ]
liulp@zjhjb.com
43e677c0f891fd40f113be2319dc4714799c4a8a
ab7619cb640580c931b087d85f7f26fa176702e2
/h2/src/main/org/h2/index/PageDataCursor.java
c29412d1850c98ccf5e9e89e9ed34fcb04a1b222
[]
no_license
pkouki/icdm2017
440da58c66f56a36e98853ff34b14e2c066ed0f7
e05618c285c43416d7615bf41c812b6dede596bc
refs/heads/master
2021-01-21T13:29:22.566573
2017-11-19T04:29:47
2017-11-19T04:29:47
102,126,018
4
0
null
null
null
null
UTF-8
Java
false
false
2,858
java
/* * Copyright 2004-2009 H2 Group. Multiple-Licensed under the H2 License, * Version 1.0, and under the Eclipse Public License, Version 1.0 * (http://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.index; import java.sql.SQLException; import java.util.Iterator; import org.h2.engine.Session; import org.h2.message.Message; import org.h2.result.Row; import org.h2.result.SearchRow; /** * The cursor implementation for the page scan index. */ class PageDataCursor implements Cursor { private PageDataLeaf current; private int idx; private final long max; private Row row; private final boolean multiVersion; private final Session session; private Iterator<Row> delta; PageDataCursor(Session session, PageDataLeaf current, int idx, long max, boolean multiVersion) { this.current = current; this.idx = idx; this.max = max; this.multiVersion = multiVersion; this.session = session; if (multiVersion) { delta = current.index.getDelta(); } } public Row get() { return row; } public long getKey() { return row.getKey(); } public SearchRow getSearchRow() { return get(); } public boolean next() throws SQLException { if (!multiVersion) { nextRow(); return checkMax(); } while (true) { if (delta != null) { if (!delta.hasNext()) { delta = null; row = null; continue; } row = delta.next(); if (!row.isDeleted() || row.getSessionId() == session.getId()) { continue; } } else { nextRow(); if (row != null && row.getSessionId() != 0 && row.getSessionId() != session.getId()) { continue; } } break; } return checkMax(); } private boolean checkMax() throws SQLException { if (row != null) { if (max != Long.MAX_VALUE) { long x = current.index.getLong(row, Long.MAX_VALUE); if (x > max) { row = null; return false; } } return true; } return false; } private void nextRow() throws SQLException { if (idx >= current.getEntryCount()) { current = current.getNextPage(); idx = 0; if (current == null) { row = null; return; } } row = current.getRowAt(idx); idx++; } public boolean previous() { throw Message.throwInternalError(); } }
[ "pkouki@umiacs.umd.edu" ]
pkouki@umiacs.umd.edu
ecb8f8892798445c9a6359f2cb2fd0727caefe1c
6324ba3857e09e1ff891dc547f05bb7c9ed6f449
/backend/bootstrap-parent/application/src/main/java/com/yunkang/saas/bootstrap/application/business/security/dao/AccountRoleRelationSpecification.java
6dc6848038e6f6aa1d926a6a4a547063a642fa64
[]
no_license
ai-coders/devp
68a0431007ebd5796dbf48a321ee08ff2dd87708
9dfe34374048cea2e613fa01fd9f584c5090361d
refs/heads/master
2023-01-09T12:16:06.197363
2018-11-24T09:16:25
2018-11-24T09:16:25
134,250,514
0
2
null
2022-12-26T05:54:12
2018-05-21T09:53:00
Java
UTF-8
Java
false
false
1,841
java
package com.yunkang.saas.bootstrap.application.business.security.dao; import com.yunkang.saas.bootstrap.application.business.security.domain.AccountRoleRelation; import com.yunkang.saas.bootstrap.platform.business.account.dto.AccountRoleRelationCondition; import org.springframework.data.jpa.domain.Specification; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.util.ArrayList; import java.util.List; public class AccountRoleRelationSpecification implements Specification<AccountRoleRelation>{ AccountRoleRelationCondition condition; public AccountRoleRelationSpecification(AccountRoleRelationCondition condition){ this.condition = condition; } @Override public Predicate toPredicate(Root<AccountRoleRelation> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicateList = new ArrayList<>(); if(condition==null){ return null; } tryAddAccountIdPredicate(predicateList, root, cb); tryAddRoleIdPredicate(predicateList, root, cb); Predicate[] pre = new Predicate[predicateList.size()]; pre = predicateList.toArray(pre); return cb.and(pre); } private void tryAddAccountIdPredicate(List<Predicate> predicateList, Root<AccountRoleRelation> root, CriteriaBuilder cb){ if (null != condition.getAccountId() ) { predicateList.add(cb.equal(root.get(AccountRoleRelation.PROPERTY_ACCOUNT_ID).as(Long.class), condition.getAccountId())); } } private void tryAddRoleIdPredicate(List<Predicate> predicateList, Root<AccountRoleRelation> root, CriteriaBuilder cb){ if (null != condition.getRoleId() ) { predicateList.add(cb.equal(root.get(AccountRoleRelation.PROPERTY_ROLE_ID).as(Long.class), condition.getRoleId())); } } }
[ "13962217@qq.com" ]
13962217@qq.com
9949091243fde52595a1976edd7c3fc1a773e758
f404f7198c91a0f91ed6d6dd0a1cda9adf3edbb1
/com/planet_ink/coffee_mud/Abilities/Druid/Chant_GiveLife.java
1d622baccb852d2b7d2dc35f348f6f06ebcbb1f8
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bbailey/ewok
1f1d35b219a6ebd33fd3ad3d245383d075ef457d
b4fcf4ba90c7460b19d0af56a3ecabbc88470f6f
refs/heads/master
2020-04-05T08:27:05.904034
2017-02-01T04:14:19
2017-02-01T04:14:19
656,100
0
0
null
null
null
null
UTF-8
Java
false
false
4,757
java
package com.planet_ink.coffee_mud.Abilities.Druid; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2014-2016 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Chant_GiveLife extends Chant { @Override public String ID() { return "Chant_GiveLife"; } private final static String localizedName = CMLib.lang().L("Give Life"); @Override public String name() { return localizedName; } @Override public int classificationCode(){return Ability.ACODE_CHANT|Ability.DOMAIN_ANIMALAFFINITY;} @Override protected int canAffectCode(){return 0;} @Override protected int canTargetCode(){return Ability.CAN_MOBS;} @Override public int abstractQuality(){ return Ability.QUALITY_OK_OTHERS;} @Override public long flags(){return Ability.FLAG_NOORDERING;} @Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { int amount=100; if(!auto) { if((commands.size()==0)||(!CMath.isNumber(commands.get(commands.size()-1)))) { mob.tell(L("Give how much life experience?")); return false; } amount=CMath.s_int(commands.get(commands.size()-1)); if((amount<=0)||((amount>mob.getExperience()) &&(!CMSecurity.isDisabled(CMSecurity.DisFlag.EXPERIENCE)) &&!mob.charStats().getCurrentClass().expless() &&!mob.charStats().getMyRace().expless())) { mob.tell(L("You cannot give @x1 life experience.",""+amount)); return false; } commands.remove(commands.size()-1); } final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if((!CMLib.flags().isAnimalIntelligence(target))||(!target.isMonster())||(!mob.getGroupMembers(new HashSet<MOB>()).contains(target))) { mob.tell(L("This chant only works on non-player animals in your group.")); return false; } if(mob.isMonster() && (!auto) && (givenTarget==null)) { mob.tell(L("You cannot give your life.")); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,0,auto); if(success) { final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),L(auto?"<T-NAME> gain(s) life experience!":"^S<S-NAME> chant(s) to <T-NAMESELF>, feeding <T-HIM-HER> <S-HIS-HER> life experience.^?")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); CMLib.leveler().postExperience(mob,null,null,-amount,false); if((mob.phyStats().level()>target.phyStats().level())&&(target.isMonster())) amount+=(mob.phyStats().level()-target.phyStats().level()) *(mob.phyStats().level()/10); CMLib.leveler().postExperience(target,null,null,amount,false); if((CMLib.dice().rollPercentage() < amount) &&(target.isMonster()) &&(target.fetchEffect("Loyalty")==null) &&(target.fetchEffect("Chant_BestowName")!=null) &&(target.amFollowing()==mob) &&(mob.playerStats()!=null) &&(!mob.isMonster()) &&(CMLib.flags().flaggedAnyAffects(target, Ability.FLAG_CHARMING).size()==0)) { Ability A=CMClass.getAbility("Loyalty"); A.setMiscText("NAME="+mob.Name()); A.setSavable(true); target.addNonUninvokableEffect(A); mob.tell(mob,target,null,L("<T-NAME> is now loyal to you.")); } } } else return beneficialWordsFizzle(mob,target,L("<S-NAME> chants for <T-NAMESELF>, but nothing happens.")); // return whether it worked return success; } }
[ "nosanity79@gmail.com" ]
nosanity79@gmail.com
658eccf7024a863f73fac38b8fe7d197aed00627
874e9ea8775d886b87390575231a5f05572abd5d
/workspace/javase/core/src/thread/syndemo/TestTicket4.zdq
b6768a4eb4953a3e1fa8cd52c3ac769ac66806f1
[]
no_license
helifee/corp-project
f801d191ed9a6164b9b28174217ad917ef0380c8
97f8cdfc72ea7ef7a470723de46e91d8c4ecd8c9
refs/heads/master
2020-03-28T12:10:14.956362
2018-09-13T02:43:01
2018-09-13T02:43:01
148,274,917
2
3
null
null
null
null
UTF-8
Java
false
false
249
zdq
package thread.syndemo; public class TestTicket4 { public static void main(String[] args) { Ticket4 t = new Ticket4(); new Thread(t, "A").start(); new Thread(t, "B").start(); new Thread(t, "C").start(); new Thread(t, "D").start(); } }
[ "helifee@gmail.com" ]
helifee@gmail.com
3aceed182eff871b7a21ffb79b411281af2f9cf3
b79a9ab661d8731dc86ba7565a806f7b8a66cc3e
/src/main/java/com/niche/ng/repository/CoverFillingDetailsRepository.java
3745d31686cf31eb7f2bf73e2e4a91e775f1fd36
[]
no_license
RRanjitha/projectgh
f08d962a917a9c92ca5a5cea23292110479c7f15
a437a770b4fddb04e41b9e00cf7e0fa59f53ac13
refs/heads/master
2020-03-30T11:55:44.385866
2018-10-02T05:23:13
2018-10-02T05:23:13
150,845,304
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package com.niche.ng.repository; import com.niche.ng.domain.CoverFillingDetails; import org.springframework.data.jpa.repository.*; import org.springframework.stereotype.Repository; import java.util.List; /** * Spring Data repository for the CoverFillingDetails entity. */ @SuppressWarnings("unused") @Repository public interface CoverFillingDetailsRepository extends JpaRepository<CoverFillingDetails, Long>, JpaSpecificationExecutor<CoverFillingDetails> { List<CoverFillingDetails> findByCoverFillingId(Long coverFillingId); }
[ "ranji.cs016@gmail.com" ]
ranji.cs016@gmail.com
6fd03cca1de11f1ab31fc1b68db8fa962e4c7df1
4a8013ffc2f166506fc709698f2242db6b8dde41
/src/main/java/org/elissa/web/preprocessing/impl/PreprocessingServiceImpl.java
87731ad3f4f54eaebf3acc91d80996f693f5b03f
[]
no_license
tsurdilo/elissa
a7a255c436420b2cbd75b2f7aac6f49aab6c0b1d
d44604bd6b3ef188563bb4dabd25aae4b3f7a69f
refs/heads/master
2021-01-01T05:39:53.149047
2012-02-05T22:18:20
2012-02-05T22:18:20
3,308,767
0
0
null
null
null
null
UTF-8
Java
false
false
2,210
java
/** * Copyright 2010 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.elissa.web.preprocessing.impl; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import org.elissa.web.preprocessing.IDiagramPreprocessingService; import org.elissa.web.preprocessing.IDiagramPreprocessingUnit; import org.elissa.web.profile.IDiagramProfile; /** * * @author Tihomir Surdilovic */ public class PreprocessingServiceImpl implements IDiagramPreprocessingService { public static PreprocessingServiceImpl INSTANCE = new PreprocessingServiceImpl(); private Map<String, IDiagramPreprocessingUnit> _registry = new HashMap<String, IDiagramPreprocessingUnit>(); public Collection<IDiagramPreprocessingUnit> getRegisteredPreprocessingUnits( HttpServletRequest request) { Map<String, IDiagramPreprocessingUnit> preprocessingUnits = new HashMap<String, IDiagramPreprocessingUnit>(_registry); return new ArrayList<IDiagramPreprocessingUnit>(preprocessingUnits.values()); } public IDiagramPreprocessingUnit findPreprocessingUnit( HttpServletRequest request, IDiagramProfile profile) { Map<String, IDiagramPreprocessingUnit> preprocessingUnits = new HashMap<String, IDiagramPreprocessingUnit>(_registry); return preprocessingUnits.get(profile.getName()); } public void init(ServletContext context) { _registry.put("default", new DefaultPreprocessingUnit(context)); _registry.put("jbpm", new JbpmPreprocessingUnit(context)); } }
[ "tsurdilo@redhat.com" ]
tsurdilo@redhat.com
c4470a5fbfa315444140b0d78a9a7ea3e2dd568d
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/geometer_FBReaderJ/fbreader/app/src/main/java/org/geometerplus/fbreader/network/IPredefinedNetworkLink.java
3bf54e1a809cef0b319216e280fe74893d8dffda
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
187
java
// isComment package org.geometerplus.fbreader.network; public interface isClassOrIsInterface extends INetworkLink { String isMethod(); boolean isMethod(String isParameter); }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
72d9331adc4b22c612d901929b5ad40728edf47e
51d977bc80a6c02b80b37d9921427bd78ee2e978
/modules/swagger-generator/src/main/java/com/wordnik/swagger/generator/util/ValidationMessage.java
b64633de2bd22a344c45ee61106e95ef3348741c
[ "Apache-2.0" ]
permissive
joegnelson/swagger-codegen
5f1911d4befa929ba139cf66967dbcfd02db6218
559e6d907dd9d5035cfb67fb9b8092027e767239
refs/heads/master
2021-01-24T04:43:16.714825
2015-06-11T08:25:52
2015-06-11T08:25:52
31,788,798
2
2
null
2015-03-06T20:59:09
2015-03-06T20:59:09
null
UTF-8
Java
false
false
502
java
package com.wordnik.swagger.generator.util; public class ValidationMessage { private String path, message, severity; public String getPath() { return path; } public void setPath(String path) { this.path = path; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getSeverity() { return severity; } public void setSeverity(String severity) { this.severity = severity; } }
[ "fehguy@gmail.com" ]
fehguy@gmail.com
2967eb9259c8370938b1d2a59723f6fbc2aa19c0
45c4da9c0578d728ffb0a7408fd88fc052e952f9
/EvsBatch27_android/app/src/main/java/com/example/aqibjaved/evsbatch27_android/com/signup/validators/SignUpValidator.java
1cf28b9ceae84a21892130d998d09e135fce499e
[]
no_license
aqib1/Java-Android-2k16
571d00831d6c5c00bb7089392719cf33349f6044
da8cd01d001ffc97a1ddacec2d66c7f77babe215
refs/heads/master
2020-08-22T01:08:31.022204
2019-10-20T00:47:24
2019-10-20T00:47:24
216,287,509
6
0
null
null
null
null
UTF-8
Java
false
false
863
java
package com.example.aqibjaved.evsbatch27_android.com.signup.validators; import com.example.aqibjaved.evsbatch27_android.com.contants.app.Constants; import com.example.aqibjaved.evsbatch27_android.com.model.signup.User; /** * Created by AQIB JAVED on 3/4/2018. */ public class SignUpValidator { public boolean isValidUserName(User user){ return Character.isLetter(user.getName().charAt(Constants.indexForUserNameValidationCriteria)); } public boolean isValidPassword(User user){ return user.getPassword().length() >= Constants.passwordMaxLength && user.getPassword().equals(user.getConfirmPassword()); } public boolean isValidNumber(User user){ return user.getContactNumber().length() == Constants.validNumberMinLength; } public boolean allFiledEntered(User user){ return !user.isEmpty(); } }
[ "aqibbutt3078@gmail.com" ]
aqibbutt3078@gmail.com
3c3a61a75a7036643e59b26aad469889d54b5f7b
835c5e5a428465a1bb14aa2922dd8bf9d1f83648
/bitcamp-java/src/main/java/com/eomcs/oop/ex03/Exam0320.java
cc73e9dabe682d32b6009f24e5e0ca7d0f9719c6
[]
no_license
juneglee/bitcamp-study
cc1de00c3e698db089d0de08488288fb86550260
605bddb266510109fb78ba440066af3380b25ef1
refs/heads/master
2020-09-23T13:00:46.749867
2020-09-18T14:26:39
2020-09-18T14:26:39
225,505,347
0
0
null
null
null
null
UTF-8
Java
false
false
1,910
java
// 인스턴스 메서드 응용 package com.eomcs.oop.ex03; import java.util.Scanner; public class Exam0320 { static class Score { String name; int kor; int eng; int math; int sum; float average; // 다음 메서드와 같이 인스턴스 변수를 사용하는 경우 인스턴스 메서드로 정의한다. public void compute() { // 내장 변수 this에는 compute()를 호출할 때 넘겨준 인스턴스 주소가 들어 있다. this.sum = this.kor + this.eng + this.math; this.average = this.sum / 3f; } } public static void main(String[] args) { Scanner keyScan = new Scanner(System.in); System.out.print("성적 데이터를 입력하세요(예: 홍길동 100 100 100)> "); Score s1 = new Score(); s1.name = keyScan.next(); s1.kor = keyScan.nextInt(); s1.eng = keyScan.nextInt(); s1.math = keyScan.nextInt(); System.out.print("성적 데이터를 입력하세요(예: 홍길동 100 100 100)> "); Score s2 = new Score(); s2.name = keyScan.next(); s2.kor = keyScan.nextInt(); s2.eng = keyScan.nextInt(); s2.math = keyScan.nextInt(); // 특정 인스턴스에 대해 작업을 수행할 때는 인스턴스 메서드를 호출한다. s1.compute(); // s1에 들어 있는 인스턴스 주소는 compute()에 전달된다. s2.compute(); // 이번에는 s2에 들어 있는 주소를 compute()에 전달한다. System.out.printf("%s, %d, %d, %d, %d, %.1f\n", s1.name, s1.kor, s1.eng, s1.math, s1.sum, s1.average); System.out.printf("%s, %d, %d, %d, %d, %.1f\n", s2.name, s2.kor, s2.eng, s2.math, s2.sum, s2.average); } }
[ "klcpop1@example.com" ]
klcpop1@example.com
60fa5f98193db4981de274fff1c98e62149fce5a
89e1811c3293545c83966995cb000c88fc95fa79
/MCHH-api/src/main/java/com/threefiveninetong/mchh/appMember/vo/resp/MemberMoodRecordByDayInfoRespVo.java
39ed15ec28ba09424ef2e6e9121f09e96602345f
[]
no_license
wxddong/MCHH-parent
9cafcff20d2f36b5d528fd8dd608fa9547327486
2898fdf4e778afc01b850d003899f25005b8e415
refs/heads/master
2021-01-01T17:25:29.109072
2017-07-23T02:28:59
2017-07-23T02:28:59
96,751,862
0
1
null
null
null
null
UTF-8
Java
false
false
535
java
package com.threefiveninetong.mchh.appMember.vo.resp; import java.util.List; import com.threefiveninetong.mchh.core.vo.BaseVo; /** * 会员查询一天的心情语录信息响应参数 * @author zhanght */ public class MemberMoodRecordByDayInfoRespVo extends BaseVo { //心情语录列表 private List<MoodRecordVo> moodRecordList; public List<MoodRecordVo> getMoodRecordList() { return moodRecordList; } public void setMoodRecordList(List<MoodRecordVo> moodRecordList) { this.moodRecordList = moodRecordList; } }
[ "wxd_1024@163.com" ]
wxd_1024@163.com
aa23e68eefdb1ff77a23588c87839842162cf812
fdb29405779daf4432c8c7dce183c73db8fd6705
/commercetools-models/src/main/java/io/sphere/sdk/channels/ChannelDraftBuilder.java
50ed6fd3ca05d790413885771a01677a205d4fb1
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
Saandji/sphere-jvm-sdk
c669d255065aab240248e259a85c482904dfb6e1
1baf4dac7a8fa50d164617fdf7d2801ccbd241e1
refs/heads/master
2021-01-12T22:09:09.842877
2016-03-16T11:16:56
2016-03-16T11:16:56
53,948,125
0
0
null
2016-03-15T13:47:26
2016-03-15T13:47:26
null
UTF-8
Java
false
false
1,586
java
package io.sphere.sdk.channels; import io.sphere.sdk.models.Base; import io.sphere.sdk.models.Builder; import io.sphere.sdk.models.LocalizedString; import javax.annotation.Nullable; import java.util.Collections; import java.util.Set; /** * Builder for {@link ChannelDraft}. */ public final class ChannelDraftBuilder extends Base implements Builder<ChannelDraftDsl> { private final String key; private Set<ChannelRole> roles = Collections.emptySet(); @Nullable private LocalizedString name; @Nullable private LocalizedString description; private ChannelDraftBuilder(final String key) { this.key = key; } public static ChannelDraftBuilder of(final String key) { return new ChannelDraftBuilder(key); } public static ChannelDraftBuilder of(final ChannelDraft template) { return new ChannelDraftBuilder(template.getKey()) .roles(template.getRoles()) .name(template.getName()) .description(template.getDescription()); } public ChannelDraftBuilder description(@Nullable final LocalizedString description) { this.description = description; return this; } public ChannelDraftBuilder name(@Nullable final LocalizedString name) { this.name = name; return this; } public ChannelDraftBuilder roles(final Set<ChannelRole> roles) { this.roles = roles; return this; } @Override public ChannelDraftDsl build() { return new ChannelDraftDsl(key, roles, name, description); } }
[ "michael.schleichardt@commercetools.de" ]
michael.schleichardt@commercetools.de
4902bfdef892e2327382ec231f7acc7da9a9c2b2
a484a3994e079fc2f340470a658e1797cd44e8de
/app/src/main/java/shangri/example/com/shangri/model/bean/response/ChoiceAnchorsBean.java
78e0daf27dc7265ca928dcb648352afadb2d6d3d
[]
no_license
nmbwq/newLiveHome
2c4bef9b2bc0b83038dd91c7bf7a6a6a2c987437
fde0011f14e17ade627426935cd514fcead5096c
refs/heads/master
2020-07-12T20:33:23.502494
2019-08-28T09:55:52
2019-08-28T09:55:52
204,899,192
0
0
null
null
null
null
UTF-8
Java
false
false
2,230
java
package shangri.example.com.shangri.model.bean.response; import java.io.Serializable; import java.util.List; /** * Created by Administrator on 2018/1/5. */ public class ChoiceAnchorsBean implements Serializable { /** * current_page : 1 * total_page : 1 * anchors : [{"register_guild_id":"1","anchor_name":"Coco💐阿标"},{"register_guild_id":"2","anchor_name":"🛡盾上加鹿🦌"},{"register_guild_id":"3","anchor_name":"四爷"},{"register_guild_id":"4","anchor_name":"大大-"},{"register_guild_id":"5","anchor_name":"习惯了一个人"}] */ private String current_page; private int total_page; private List<AnchorsBean> anchors; public String getCurrent_page() { return current_page; } public void setCurrent_page(String current_page) { this.current_page = current_page; } public int getTotal_page() { return total_page; } public void setTotal_page(int total_page) { this.total_page = total_page; } public List<AnchorsBean> getAnchors() { return anchors; } public void setAnchors(List<AnchorsBean> anchors) { this.anchors = anchors; } public static class AnchorsBean { /** * register_guild_id : 1 * anchor_name : Coco💐阿标 */ private String register_guild_id; private String anchor_name; private String uid; public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } public String getRegister_guild_id() { return register_guild_id; } public void setRegister_guild_id(String register_guild_id) { this.register_guild_id = register_guild_id; } public String getAnchor_name() { return anchor_name; } public void setAnchor_name(String anchor_name) { this.anchor_name = anchor_name; } } }
[ "1763312610@qq.com" ]
1763312610@qq.com
5f33a75533bcb98d704241e10be3e065dea86fe7
3aa4eb3a19a4b1154d9c7d2445feedd100943958
/nvwa-validate/src/test/java/com/skymobi/market/commons/validate/ValidateTestSuite.java
531c13fc07faf940514747f04952dc120d1a9d28
[]
no_license
big-mouth-cn/nvwa
de367065600d6e751cb432df660f377b57052654
6a460cf62c65ed70478a6e9ef3b5a142e8775d19
refs/heads/master
2020-04-12T02:25:02.566820
2018-01-15T04:34:33
2018-01-15T04:34:33
57,180,498
20
26
null
null
null
null
UTF-8
Java
false
false
1,195
java
package com.skymobi.market.commons.validate; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; import com.skymobi.market.commons.validate.factory.AnnotationValidatorFactoryTest; import com.skymobi.market.commons.validate.internal.BeanValidatorTest; import com.skymobi.market.commons.validate.internal.CollectionValidatorTest; import com.skymobi.market.commons.validate.internal.LengthValidatorTest; import com.skymobi.market.commons.validate.internal.NotGreatThanValidatorTest; import com.skymobi.market.commons.validate.internal.NotLaterThanValidatorTest; import com.skymobi.market.commons.validate.internal.NotNullValidatorTest; import com.skymobi.market.commons.validate.internal.NumericValidatorTest; import com.skymobi.market.commons.validate.internal.PatternValidatorTest; @RunWith(Suite.class) @SuiteClasses( { BeanValidatorTest.class, CollectionValidatorTest.class, LengthValidatorTest.class, NotGreatThanValidatorTest.class, NotLaterThanValidatorTest.class, NotNullValidatorTest.class, NumericValidatorTest.class, PatternValidatorTest.class, AnnotationValidatorFactoryTest.class }) public class ValidateTestSuite { }
[ "huxiao.mail@qq.com" ]
huxiao.mail@qq.com
7ec1f3fd59a5c4231e3de35a33198363b58f73e1
1cc6988da857595099e52dd9dd2e6c752d69f903
/ZimbraSelenium/src/java/com/zimbra/qa/selenium/projects/octopus/ui/DisplayFilePreview.java
ac73544e6765da01fee5ec3e5bddff8ee31384cd
[]
no_license
mmariani/zimbra-5682-slapos
e250d6a8d5ad4ddd9670ac381211ba4b5075de61
d23f0f8ab394d3b3e8a294e10f56eaef730d2616
refs/heads/master
2021-01-19T06:58:19.601688
2013-03-26T16:30:38
2013-03-26T16:30:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,063
java
/* * ***** BEGIN LICENSE BLOCK ***** * * Zimbra Collaboration Suite Server * Copyright (C) 2011, 2012 VMware, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * * ***** END LICENSE BLOCK ***** */ package com.zimbra.qa.selenium.projects.octopus.ui; import com.zimbra.qa.selenium.framework.ui.AbsApplication; import com.zimbra.qa.selenium.framework.ui.AbsDisplay; import com.zimbra.qa.selenium.framework.ui.AbsPage; import com.zimbra.qa.selenium.framework.ui.Button; import com.zimbra.qa.selenium.framework.util.HarnessException; public class DisplayFilePreview extends AbsDisplay { public static class Locators { public static final Locators zFilePreview = new Locators( "css=div[id=my-files-preview]"); public static final Locators zFileWatchIcon = new Locators( "css=div[id=my-files-preview-toolbar] span[class=file-info-view-watch-icon]"); public static final Locators zFileImageIcon = new Locators( "css=div[id=my-files-preview-toolbar] span[class=file-info-view-file-icon]>span[class^=Img]"); public static final Locators zHistory = new Locators( "css=div[id=my-files-preview] div[id=my-files-preview-toolbar] button[id=show-activitystream-button]"); public static final Locators zComments = new Locators( "css=div[id=my-files-preview] div[id=my-files-preview-toolbar] button[id=my-files-preview-show-comments-button]"); public static final Locators zPreviewFileName=new Locators( "css=div[id=my-files-preview-toolbar] span[class=file-info-view-file-name]"); public static final Locators zPreviewFileVersion = new Locators( "css=div[id=my-files-preview-toolbar] span[class=file-info-view-file-version]"); public static final Locators zPreviewFileSize = new Locators( "css=div[id=my-files-preview-toolbar] span[class=file-info-view-file-size]"); public final String locator; private Locators(String locator) { this.locator = locator; } } /** * The various displayed fields in preview panel */ public static enum Field { Name, Version, Size, Body } public DisplayFilePreview(AbsApplication application) { super(application); logger.info("new " + DisplayFilePreview.class.getCanonicalName()); } @Override public String myPageName() { return (this.getClass().getName()); } @Override public AbsPage zPressButton(Button button) throws HarnessException { logger.info(myPageName() + " zPressButton(" + button + ")"); tracer.trace("Click button " + button); if (button == null) throw new HarnessException("Button cannot be null!"); // Default behavior variables String buttonLocator = null; AbsPage page = null; // If set, this page will be returned // Based on the button specified, take the appropriate action(s) if (button == Button.B_WATCH) { buttonLocator = Locators.zFileWatchIcon.locator + " span[class^=unwatched-icon]"; } else if (button == Button.B_UNWATCH) { buttonLocator = Locators.zFileWatchIcon.locator + " span[class^=watched-icon]"; } else if (button == Button.B_HISTORY) { buttonLocator = Locators.zHistory.locator; page = new DialogFileHistory(MyApplication, ((AppOctopusClient) MyApplication).zPageOctopus); } else if (button == Button.B_COMMENTS) { buttonLocator = Locators.zComments.locator; page = new DisplayFileComments(MyApplication); } else { throw new HarnessException("no logic defined for button " + button); } if (!this.sIsElementPresent(buttonLocator)) throw new HarnessException("Button is not present: " + buttonLocator); // Default behavior, process the locator by clicking on it // Click it sClickAt(buttonLocator,"0,0"); // If the app is busy, wait for it to become active zWaitForBusyOverlay(); if (page != null) page.zWaitForActive(); return page; } /** * Get the string value of the specified field * * @return the displayed string value * @throws HarnessException */ public String zGetFileProperty(Field field) throws HarnessException { logger.info("DocumentPreview.zGetDocumentProperty(" + field + ")"); String fileName =null; String version=null; String size = null; if (field == Field.Name) { if (this.sIsElementPresent(DisplayFilePreview.Locators.zPreviewFileName.locator)){ fileName =this.sGetText(DisplayFilePreview.Locators.zPreviewFileName.locator); } return fileName; } else if (field == Field.Body) { /* * To get the body contents, need to switch iframes */ try { this.sSelectFrame("//iframe"); String bodyLocator = "css=body"; // Make sure the body is present if (!this.sIsElementPresent(bodyLocator)) throw new HarnessException("Unable to preview body!"); // Get the body value // String body = this.sGetText(bodyLocator).trim(); String html = this.zGetHtml(bodyLocator); logger.info("DocumentPreview GetBody(" + bodyLocator + ") = " + html); return (html); } finally { // Make sure to go back to the original iframe this.sSelectFrame("relative=top"); } } else if (field == Field.Version) { if (this.sIsElementPresent(DisplayFilePreview.Locators.zPreviewFileVersion.locator)){ version =this.sGetText(DisplayFilePreview.Locators.zPreviewFileVersion.locator); } return version; } else if (field == Field.Size) { if (this.sIsElementPresent(DisplayFilePreview.Locators.zPreviewFileSize.locator)){ size =this.sGetText(DisplayFilePreview.Locators.zPreviewFileSize.locator); } return size; } else { throw new HarnessException(" no such field " + field); } } @Override public boolean zIsActive() throws HarnessException { if (zWaitForElementPresent(Locators.zFilePreview.locator, "3000")) return true; else return false; } }
[ "marco.mariani@nexedi.com" ]
marco.mariani@nexedi.com
65272488162bcb1d63baa3b4623eb299582dd266
0e7a8943d743a26ff5ede167b97045e9a5dbf646
/RelativelyPrimePowers.java
12c73bce851e867a4c6b23ab6da3b5b7ee84f972
[]
no_license
mooncrater31/Competitive-Programming
dd7657eda25b269ec3873cc78920fb87edbccc41
7cf2c8fc00e24d1575f8b1ebb1136a01d393979a
refs/heads/master
2020-03-31T04:32:20.498065
2020-01-19T09:58:38
2020-01-19T09:58:38
151,909,755
0
0
null
null
null
null
UTF-8
Java
false
false
214
java
import java.io.InputStreamReader ; import java.io.BufferedReader ; import java.util.* ; public class RelativelyPrimePowers { public static void main(String args[]) throws Exception { } }
[ "mooncraterrocks@gmail.com" ]
mooncraterrocks@gmail.com
84ea48a21a3241b5d2695db97585f9f991410b14
2f4ecd64fb9e36e818d63774c02b9d7dad608b6e
/library/src/main/java/ir/mftvanak/library/thirteenthOfAban/ThirdClass.java
4b6140c5cf0322835a9291fc3671ff20f835b152
[]
no_license
SirLordPouya/MFTSundays
31f92488e8a1c14cc3b55068f9863dafe0928ec1
62e4b3cccd312958737a8a538699be79096e37ef
refs/heads/master
2020-04-06T11:24:55.953826
2019-01-24T11:12:17
2019-01-24T11:12:17
157,415,861
2
0
null
null
null
null
UTF-8
Java
false
false
446
java
package ir.mftvanak.library.thirteenthOfAban; public class ThirdClass { public static void main(String[] args) { ParentClass.printName(); ParentClass pClass = new ParentClass(); // printMyName is public pClass.printMyName(); //printYourName is private // pClass.printYourName(); //printHisName is protected pClass.printHisName(); int b = pClass.getA(); } }
[ "pouyaheydary@gmail.com" ]
pouyaheydary@gmail.com
8d6b6261ce7e155c732ceec52345c9df9b486c54
0af91b31c959895700027c47734aa482c6075dc1
/src/krasa/grepconsole/filter/AbstractFilter.java
8ab3c1b994e47117a865ab93bed3eca767ddc5cf
[]
no_license
hockeyd5/GrepConsole
421cf5a74a372a2795b2cd08d5cd5cabef2c40a0
b9d56b0bfccfb1d593c776d6d8f012be157af13a
refs/heads/master
2021-01-18T14:28:37.023940
2014-04-20T16:19:51
2014-04-20T16:19:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
766
java
package krasa.grepconsole.filter; import com.intellij.openapi.project.Project; import krasa.grepconsole.model.Profile; import krasa.grepconsole.plugin.GrepConsoleApplicationComponent; public abstract class AbstractFilter { protected Project project; protected Profile profile; public AbstractFilter(Project project) { this.project = project; profile = GrepConsoleApplicationComponent.getInstance().getProfile(project); } public AbstractFilter(Profile profile) { this.profile = profile; } protected void refreshProfile() { GrepConsoleApplicationComponent applicationComponent = GrepConsoleApplicationComponent.getInstance(); profile = applicationComponent.getState().getProfile(profile); } public void onChange() { refreshProfile(); } }
[ "vojta.krasa@gmail.com" ]
vojta.krasa@gmail.com
6bf7d7ee3aa10a7d040cf35ae40283587f36e24a
1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a
/acm-common/src/main/java/com/wisdom/base/common/controller/WFController.java
3ae58d54ab8a6ecd7f2082b319b8ca91e53d2fe1
[ "Apache-2.0" ]
permissive
daiqingsong2021/ord_project
332056532ee0d3f7232a79a22e051744e777dc47
a8167cee2fbdc79ea8457d706ec1ccd008f2ceca
refs/heads/master
2023-09-04T12:11:51.519578
2021-10-28T01:58:43
2021-10-28T01:58:43
406,659,566
0
0
null
null
null
null
UTF-8
Java
false
false
5,163
java
package com.wisdom.base.common.controller; import com.wisdom.base.common.form.WfRuningProcessForm; import com.wisdom.base.common.msg.ApiResult; import com.wisdom.base.common.vo.wf.WfCandidateVo; import com.wisdom.base.common.vo.wf.WfRunProcessVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import java.util.*; @RestController @Api(tags="流程回调事件服务") public class WFController { @ApiOperation(value="自定义流程参与者<WfRunProcessVo.setCandidate(new WfCandidateVo().setActivities(null))>清除参与者") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/custom/workflow/candidate") public ApiResult<WfRunProcessVo> customWorkFlowCandidate(@RequestBody WfRuningProcessForm form) { WfRunProcessVo vo = new WfRunProcessVo(); //vo.setCandidate(new WfCandidateVo().setActivities(null)); //清除本次参与者 //把业务数据的状态变更为审批中. return ApiResult.success(vo); } @ApiOperation(value="发起流程后事件") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/start/workflow/after") public ApiResult<WfRunProcessVo> startWorkFlowAfter(@RequestBody WfRuningProcessForm form) { //把业务数据的状态变更为审批中. return ApiResult.success(); } @ApiOperation(value="完成流程事件后") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/complete/workflow/after") public ApiResult<WfRunProcessVo> completeWorkFlowAfter(@RequestBody WfRuningProcessForm form) { //把业务数据的状态变更为已批准. return ApiResult.success(); } @ApiOperation(value="终止流程事件后") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/terminate/workflow/after") public ApiResult<WfRunProcessVo> terminateWorkFlowAfter(@RequestBody WfRuningProcessForm form) { //把业务数据的状态变更为编制中. return ApiResult.success(); } @ApiOperation(value="终止流程事件前") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/terminate/workflow/before") public ApiResult<WfRunProcessVo> terminateWorkFlowBefore(@RequestBody WfRuningProcessForm form) { return ApiResult.success(); } @ApiOperation(value="删除流程事件后") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/delete/workflow/after") public ApiResult<WfRunProcessVo> deleteWorkFlowAfter(@RequestBody WfRuningProcessForm form) { //把业务数据的状态变更为编制中. return ApiResult.success(); } @ApiOperation(value="删除流程事件前") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/delete/workflow/before") public ApiResult<WfRunProcessVo> deleteWorkFlowBefore(@RequestBody WfRuningProcessForm form) { return ApiResult.success(); } @ApiOperation(value="执行工作项事件后") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/execute/task/after") public ApiResult<WfRunProcessVo> executeTaskAfter(@RequestBody WfRuningProcessForm form) { return ApiResult.success(); } @ApiOperation(value="执行工作项事件前(可设置流程业务变量)") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/execute/task/before") public ApiResult<WfRunProcessVo> executeTaskBefore(@RequestBody WfRuningProcessForm form) { WfRunProcessVo vo = new WfRunProcessVo(); Map<String, Object> vars = new LinkedHashMap<>(); //流程变量,全局可用,所有活动ID作为条件时,不能有"-" //vars.put("sid_2F63285F_A5A7_4562_8442_6BE6C2796F80", true); vo.setVars(vars); return ApiResult.success(vo); } @ApiOperation(value="驳回活动事件后") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/back/activity/after") public ApiResult<WfRunProcessVo> backActivityAfter(@RequestBody WfRuningProcessForm form) { return ApiResult.success(); } @ApiOperation(value="驳回活动事件前") @ApiImplicitParams({@ApiImplicitParam(name="form",value= "流程运行表单")}) @PostMapping(value = "/wf/back/activity/before") public ApiResult<WfRunProcessVo> backActivityBefore(@RequestBody WfRuningProcessForm form) { return ApiResult.success(); } }
[ "homeli@126.com" ]
homeli@126.com
4c16ae344cf4388a3e9bf2bdf35af0c99da5998f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_7aac4b19d359285041ccb51d575235339a1a8be0/Version/22_7aac4b19d359285041ccb51d575235339a1a8be0_Version_t.java
7da47fbd96f7ceccc517e812e8f265bd11bf594e
[]
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
297
java
package junit.runner; /** * This class defines the current version of JUnit */ public class Version { private Version() { // don't instantiate } public static String id() { return "4.8b1"; } public static void main(String[] args) { System.out.println(id()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
797adbe11bd748869ed450b7263c37869f9c42f3
952789d549bf98b84ffc02cb895f38c95b85e12c
/V_2.x/Studio/trunk/it.eng.spagobi.studio.dashboard/src/it/eng/spagobi/studio/dashboard/wizards/pages/DocumentWizardPage.java
b37ddb7bb035a3f80bf344d4c9d937d05f66273a
[]
no_license
emtee40/testingazuan
de6342378258fcd4e7cbb3133bb7eed0ebfebeee
f3bd91014e1b43f2538194a5eb4e92081d2ac3ae
refs/heads/master
2020-03-26T08:42:50.873491
2015-01-09T16:17:08
2015-01-09T16:17:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,054
java
/** SpagoBI - The Business Intelligence Free Platform Copyright (C) 2005-2008 Engineering Ingegneria Informatica S.p.A. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA **/ package it.eng.spagobi.studio.dashboard.wizards.pages; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; public class DocumentWizardPage extends WizardPage { Text nameFolderText; public DocumentWizardPage(String pageName) { super(pageName); setTitle("New Document Wiza ..."); } public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); GridLayout gl = new GridLayout(); int ncol = 2; gl.numColumns = ncol; composite.setLayout(gl); new Label(composite, SWT.NONE).setText("Name:"); nameFolderText = new Text(composite, SWT.BORDER); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = ncol - 1; nameFolderText.setLayoutData(gd); setControl(composite); } public Text getNameFolderText() { return nameFolderText; } public void setNameFolderText(Text nameFolderText) { this.nameFolderText = nameFolderText; } }
[ "giachino@99afaf0d-6903-0410-885a-c66a8bbb5f81" ]
giachino@99afaf0d-6903-0410-885a-c66a8bbb5f81
fb639f24b448c1653567ffd718764ba10da8b51b
ac7776cbf1edbaf16db966db49783756c70735f3
/app/src/main/java/cn/zhaoliang5156/jddemo/app/App.java
7f1ca4dfa3ae82abbed22cd87e584dd2be65a8a6
[]
no_license
BruceAnda/JDDemo
7604d8fccdb0f3b8de6fc7819fe5c3861504f5ee
9ebb3c0c8e78cce4a90a35b89f52179b403a564c
refs/heads/master
2020-03-27T12:55:36.380484
2018-09-20T01:18:06
2018-09-20T01:18:06
146,578,563
2
1
null
null
null
null
UTF-8
Java
false
false
4,063
java
package cn.zhaoliang5156.jddemo.app; import android.app.Application; import android.os.StrictMode; import com.igexin.sdk.PushManager; import com.orhanobut.logger.AndroidLogAdapter; import com.orhanobut.logger.Logger; import com.squareup.leakcanary.LeakCanary; import com.tencent.bugly.crashreport.CrashReport; import com.umeng.commonsdk.UMConfigure; import com.umeng.socialize.PlatformConfig; import org.xutils.x; import cn.zhaoliang5156.jddemo.R; import cn.zhaoliang5156.jddemo.activity.crashhandler.CrashHandler; import cn.zhaoliang5156.jddemo.activity.service.PushService; /** * 自定义Application * * @author zhaoliang * @version 1.0 * @create 2018/9/3 */ public class App extends Application { @Override public void onCreate() { super.onCreate(); initXUtils(); initBuglyCrashHandler(); //initCrashHandler(); initLogger(); // install leakcanary installLeakcanary(); /* 初始化友盟 */ initUmeng(); /* 初始化个推 */ initGetTui(); } /** * 初始化个推 * * @author zhaoliang * @version 1.0 * @create 2018/9/13 */ private void initGetTui() { PushManager.getInstance().initialize(this.getApplicationContext(), PushService.class); } /** * 初始化Umeng * * @author zhaoliang * @version 1.0 * @create 2018/9/10 */ private void initUmeng() { // UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, "5b9604788f4a9d37b90000d1"); UMConfigure.init(this, "5b9604788f4a9d37b90000d1", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, ""); } /** * 安装Leakcanary * * @author zhaoliang * @version 1.0 * @create 2018/9/6 */ private void installLeakcanary() { //enabledStrictMode(); if (!LeakCanary.isInAnalyzerProcess(this)) { LeakCanary.install(this); } } private static void enabledStrictMode() { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() // .detectAll() // .penaltyLog() // .penaltyDeath() // .build()); } /** * 初始化Logger * * @author zhaoliang * @version 1.0 * @create 2018/9/6 */ private void initLogger() { Logger.addLogAdapter(new AndroidLogAdapter()); } /** * 初始化腾讯的Bugly * * @author zhaoliang * @version 1.0 * @create 2018/9/6 */ private void initBuglyCrashHandler() { CrashReport.initCrashReport(getApplicationContext(), getString(R.string.bugly_app_id), false); } /** * 初始化 全局异常捕获 */ private void initCrashHandler() { CrashHandler.getInstance().init(this); } /** * 初始化 Xutils * * @author zhaoliang * @version 1.0 * @create 2018/9/3 */ private void initXUtils() { x.Ext.init(this); } { PlatformConfig.setWeixin("wxdc1e388c3822c80b", "3baf1193c85774b3fd9d18447d76cab0"); //豆瓣RENREN平台目前只能在服务器端配置 PlatformConfig.setSinaWeibo("3921700954", "04b48b094faeb16683c32669824ebdad", "http://sns.whalecloud.com"); PlatformConfig.setYixin("yxc0614e80c9304c11b0391514d09f13bf"); PlatformConfig.setQQZone("100424468", "c7394704798a158208a74ab60104f0ba"); PlatformConfig.setTwitter("3aIN7fuF685MuZ7jtXkQxalyi", "MK6FEYG63eWcpDFgRYw4w9puJhzDl0tyuqWjZ3M7XJuuG7mMbO"); PlatformConfig.setAlipay("2015111700822536"); PlatformConfig.setLaiwang("laiwangd497e70d4", "d497e70d4c3e4efeab1381476bac4c5e"); PlatformConfig.setPinterest("1439206"); PlatformConfig.setKakao("e4f60e065048eb031e235c806b31c70f"); PlatformConfig.setDing("dingoalmlnohc0wggfedpk"); PlatformConfig.setVKontakte("5764965", "5My6SNliAaLxEm3Lyd9J"); PlatformConfig.setDropbox("oz8v5apet3arcdy", "h7p2pjbzkkxt02a"); } }
[ "2668645098@qq.com" ]
2668645098@qq.com
f97e4e24dbd0a460bf2a80a48bcdf1bf97325d7d
e6e3a865f1bba98335afa8761c3ed5d96071a3ab
/jrJava/GUI_mixedLayout/UsingMixedLayout.java
8e1e291c642d5bbe227e896f3a09c44e1007e595
[]
no_license
adhvik-kannan/Projects
c5e4b1f58bd30c040a11267a5f6721242e4ba53d
2e659206e98637b1fe4084d36ccc2186f8c0327e
refs/heads/master
2023-08-23T20:12:04.390935
2021-10-23T19:35:44
2021-10-23T19:35:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,795
java
package jrJava.GUI_mixedLayout; import java.awt.*; import javax.swing.*; import javax.swing.border.EmptyBorder; public class UsingMixedLayout { private JFrame frame; private JPanel main, opPanel, numPanel; private JTextField textField; private JLabel label; private JButton[] opButtons, numButtons; public UsingMixedLayout() { frame = new JFrame("Mixed Layout"); frame.setBounds(200, 100, 400, 300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); main = new JPanel(); main.setBackground(Color.WHITE); main.setLayout(new BorderLayout(10, 10)); main.setBorder(new EmptyBorder(10, 10, 20, 10)); frame.add(main); opPanel = new JPanel(); opPanel.setBackground(Color.WHITE); main.add(opPanel, BorderLayout.NORTH); numPanel = new JPanel(); numPanel.setBackground(Color.WHITE); numPanel.setLayout(new GridLayout(4, 3)); main.add(numPanel); textField = new JTextField(); main.add(textField, BorderLayout.SOUTH); label = new JLabel(new ImageIcon("jrJava/GUI_mixedLayout/Sir.png")); main.add(label, BorderLayout.EAST); opButtons = new JButton[4]; Font opFont = new Font("Courier", Font.BOLD, 20); String[] opNames = { "+", "-", "*", "/" }; for (int i = 0; i < opButtons.length; i++) { opButtons[i] = new JButton(opNames[i]); opButtons[i].setFont(opFont); opPanel.add(opButtons[i]); } numButtons = new JButton[12]; String[] numNames = { "7", "8", "9", "4", "5", "6", "1", "2", "3", "", "0", "" }; for (int i = 0; i < numButtons.length; i++) { numButtons[i] = new JButton(numNames[i]); numPanel.add(numButtons[i]); } numButtons[9].setEnabled(false); numButtons[11].setEnabled(false); // frame.pack(); frame.setVisible(true); } public static void main(String[] args) { new UsingMixedLayout(); } }
[ "90004955+adhvik-kannan@users.noreply.github.com" ]
90004955+adhvik-kannan@users.noreply.github.com
f68a74abf47f9965542a1cbeb6e823a128df062b
258de8e8d556901959831bbdc3878af2d8933997
/utopia-service/utopia-crm/utopia-crm-api/src/main/java/com/voxlearning/utopia/service/crm/api/bean/ProductFeedbackListCondition.java
ba8e322002b495bba399abd5137d7b4eac996e0c
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
1,749
java
package com.voxlearning.utopia.service.crm.api.bean; import com.voxlearning.utopia.service.crm.api.constants.agent.AgentProductFeedbackCategory; import com.voxlearning.utopia.service.crm.api.constants.agent.AgentProductFeedbackStatus; import com.voxlearning.utopia.service.crm.api.constants.agent.AgentProductFeedbackSubject; import com.voxlearning.utopia.service.crm.api.constants.agent.AgentProductFeedbackType; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import java.io.Serializable; import java.util.Date; import java.util.List; /** * 产品反馈列表的条件 * Created by yaguang.wang on 2017/2/28. */ @Getter @Setter @NoArgsConstructor public class ProductFeedbackListCondition implements Serializable { private static final long serialVersionUID = 8561119929127859829L; private Date startDate; private Date endDate; private AgentProductFeedbackSubject subject; private AgentProductFeedbackType type; private AgentProductFeedbackStatus status; private AgentProductFeedbackCategory firstCategory; private AgentProductFeedbackCategory secondCategory; private AgentProductFeedbackCategory thirdCategory; private String pmData; private Boolean onlineFlag; private String content; private String feedbackPeople; private String feedbackPeopleId; private String teacher; private Long id; private List<Long> teacherIds; private String onlineEstimateDate; private String teacherName; private Boolean callback; private String pic1Url; private String pic2Url; private String pic3Url; private String pic4Url; private String pic5Url; private Boolean checkIdExist() { return this.id != null; } }
[ "wangahai@300.cn" ]
wangahai@300.cn
30c58a538a38c92392bb8e1e0bee866975097ada
cf5ff8e0bbd93e0d3110169bc7f89e2a2b2be60d
/app/src/main/java/com/thinkcoo/mobile/presentation/mvp/views/TrainHomeView.java
f4e842f8c9c1d079620c8478fdf82250e25e11b3
[]
no_license
yaolu0311/ThinkcooRefactor-2016526
993c09b50719322d9d89621f2d991e4687ab81f8
bfe011a0650ca0c80932dc45c2e60868966afda6
refs/heads/master
2020-09-26T05:30:24.155465
2016-09-05T07:12:13
2016-09-05T07:12:13
67,396,724
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.thinkcoo.mobile.presentation.mvp.views; import com.hannesdorfmann.mosby.mvp.MvpView; import com.thinkcoo.mobile.model.entity.Location; /** * Created by Leevin * CreateTime: 2016/8/18 10:32 */ public interface TrainHomeView extends MvpView,BaseHintView{ void setLocation(Location location); void getLocationFailure(); }
[ "yaolu0311@163.com" ]
yaolu0311@163.com
d78c301752d08a53347da5497fe67184cb4eadf4
78fddaeff9b3bb94ab0f65e60317ce8916b0098b
/support/com/tscp/mvna/domain/support/ticket/CustomerTicket.java
b243a20738a8d5fad1dd59a6fbf329f62203271a
[]
no_license
pongalong/webonthego
1f7666e21428025408037a5128e928677db26b33
d2970a3c93abb56906733c146c273eb7fdf6685d
refs/heads/master
2021-01-10T19:57:25.061696
2013-06-25T21:53:01
2013-06-25T21:53:01
7,276,071
1
0
null
null
null
null
UTF-8
Java
false
false
768
java
package com.tscp.mvna.domain.support.ticket; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; @Entity @DiscriminatorValue(value = "CUSTOMER") public class CustomerTicket extends Ticket { private static final long serialVersionUID = -8249415459905630871L; private int customerId; private int assigneeId; public CustomerTicket() { this.type = TicketType.CUSTOMER; } @Column(name = "customer") public int getCustomerId() { return customerId; } public void setCustomerId(int customerId) { this.customerId = customerId; } @Column(name = "assignee") public int getAssigneeId() { return assigneeId; } public void setAssigneeId(int assigneeId) { this.assigneeId = assigneeId; } }
[ "jonathan.pong@gmail.com" ]
jonathan.pong@gmail.com
4871e675c01e4af33d05dba5b6e4953d4c35670b
a9e78f785fbdd7b4b2bd3b16ac5c703ef0af5a29
/EntityEnderPearl.java
9bd63021e5379c212a3513ebbc79bc124d3fd9cb
[]
no_license
btilm305/mc-dev
0aa1a8aad5b8fe7e0bc7be64fbd7e7f87162fdaa
c0ad4fec170c89b8e1534635b614b50a55235573
refs/heads/master
2016-09-05T20:07:45.144546
2013-06-05T02:12:55
2013-06-05T02:12:55
9,861,501
2
2
null
null
null
null
UTF-8
Java
false
false
1,558
java
package net.minecraft.src; public class EntityEnderPearl extends EntityThrowable { public EntityEnderPearl(World par1World) { super(par1World); } public EntityEnderPearl(World par1World, EntityLiving par2EntityLiving) { super(par1World, par2EntityLiving); } /** * Called when this EntityThrowable hits a block or entity. */ protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { if (par1MovingObjectPosition.entityHit != null) { par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0); } for (int var2 = 0; var2 < 32; ++var2) { this.worldObj.spawnParticle("portal", this.posX, this.posY + this.rand.nextDouble() * 2.0D, this.posZ, this.rand.nextGaussian(), 0.0D, this.rand.nextGaussian()); } if (!this.worldObj.isRemote) { if (this.getThrower() != null && this.getThrower() instanceof EntityPlayerMP) { EntityPlayerMP var3 = (EntityPlayerMP)this.getThrower(); if (!var3.playerNetServerHandler.connectionClosed && var3.worldObj == this.worldObj) { this.getThrower().setPositionAndUpdate(this.posX, this.posY, this.posZ); this.getThrower().fallDistance = 0.0F; this.getThrower().attackEntityFrom(DamageSource.fall, 5); } } this.setDead(); } } }
[ "btilm305@gmail.com" ]
btilm305@gmail.com
2a3620418ad78c2d14852545844c5b9c839fec0a
58caaadb314acdff29c23633741895f1aee462c4
/tipi/com.dexels.navajo.tipi.echo/src/com/dexels/navajo/tipi/components/echoimpl/parsers/CookieRefParser.java
9a5d7b86035bdf0db19ca5934b2ed6ad4607286e
[]
no_license
mvdhorst/navajo
5c26314cc5a9a4ecb337d81604e941f9239ea9f2
21e1ed205d5995ae7aa3bdc645124885448bf867
refs/heads/master
2021-01-10T22:28:23.051655
2015-02-27T08:48:52
2015-02-27T08:48:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
673
java
package com.dexels.navajo.tipi.components.echoimpl.parsers; import com.dexels.navajo.tipi.TipiComponent; import com.dexels.navajo.tipi.TipiTypeParser; import com.dexels.navajo.tipi.internal.TipiEvent; /** * <p> * Title: * </p> * <p> * Description: * </p> * <p> * Copyright: Copyright (c) 2003 * </p> * <p> * Company: * </p> * * @author not attributable * @version 1.0 */ public class CookieRefParser extends TipiTypeParser { private static final long serialVersionUID = -366656459338848632L; public Object parse(TipiComponent source, String expression, TipiEvent event) { return new CookieRef(expression,source.getContext()); } }
[ "frank@dexels.com" ]
frank@dexels.com
4756622f23753ab0b294cf3ed865f2e2fb0668a0
47798511441d7b091a394986afd1f72e8f9ff7ab
/src/main/java/com/alipay/api/response/ZolozAuthenticationCustomerFtokenQueryResponse.java
2697121b3a535e733aabf38c3420d3512eb03fea
[ "Apache-2.0" ]
permissive
yihukurama/alipay-sdk-java-all
c53d898371032ed5f296b679fd62335511e4a310
0bf19c486251505b559863998b41636d53c13d41
refs/heads/master
2022-07-01T09:33:14.557065
2020-05-07T11:20:51
2020-05-07T11:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,412
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.ZhubUidTelPair; import com.alipay.api.AlipayResponse; /** * ALIPAY API: zoloz.authentication.customer.ftoken.query response. * * @author auto create * @since 1.0, 2020-03-09 10:25:36 */ public class ZolozAuthenticationCustomerFtokenQueryResponse extends AlipayResponse { private static final long serialVersionUID = 4638365856993348441L; /** * 图片base64 encodeString */ @ApiField("authimg_base_64") private String authimgBase64; /** * 支付宝uid */ @ApiField("uid") private String uid; /** * 用户名和手机号信息返回的列表 */ @ApiListField("uid_tel_pair_list") @ApiField("zhub_uid_tel_pair") private List<ZhubUidTelPair> uidTelPairList; public void setAuthimgBase64(String authimgBase64) { this.authimgBase64 = authimgBase64; } public String getAuthimgBase64( ) { return this.authimgBase64; } public void setUid(String uid) { this.uid = uid; } public String getUid( ) { return this.uid; } public void setUidTelPairList(List<ZhubUidTelPair> uidTelPairList) { this.uidTelPairList = uidTelPairList; } public List<ZhubUidTelPair> getUidTelPairList( ) { return this.uidTelPairList; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
bb7be526de610fef157451ff8d9b4a7f6d8b3c78
d4e21881b569f6fe1c1781f7c933369909dac2e5
/java-programming-samples/input-output/001-basic-io/src/main/java/org/joolzminer/examples/BinaryStreamCopyRunner.java
a69d067c5c5b4fe25237ce7b5251075c7af00cc8
[]
no_license
sergiofgonzalez/Java-Programming-Repo
985640c7d26cfb7e46afbc8babd8004f3098d13e
837d9f8365a594d2f766fcff76b5b98a06065bce
refs/heads/master
2021-01-21T22:26:12.158608
2015-05-04T07:12:08
2015-05-04T07:12:08
17,510,341
0
0
null
null
null
null
UTF-8
Java
false
false
2,092
java
package org.joolzminer.examples; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class BinaryStreamCopyRunner { private static final Logger LOGGER = LoggerFactory.getLogger(BinaryStreamCopyRunner.class); public void copyFiles(Path originPath, Path destinationPath) throws IOException { if (Files.notExists(originPath)) { throw new NoSuchFileException("origin file must exist"); } if (Files.exists(destinationPath)) { throw new FileAlreadyExistsException("destination file must not exist"); } byte[] readData = new byte[1024]; try ( BufferedInputStream in = new BufferedInputStream(Files.newInputStream(originPath, StandardOpenOption.READ)); BufferedOutputStream out = new BufferedOutputStream(Files.newOutputStream(destinationPath, StandardOpenOption.CREATE_NEW))) { int readBytes = in.read(readData); while (readBytes != -1) { out.write(readData, 0, readBytes); readBytes = in.read(readData); } } catch (IOException e) { LOGGER.error("error copying files: {} -> {}, {}", e); throw e; } } public static void main(String[] args) { BinaryStreamCopyRunner binaryStreamCopyRunner = new BinaryStreamCopyRunner(); Path origin = Paths.get("C:/Users/sergio.f.gonzalez/git/Java-Programming-Repo/java-programming-samples/input-output/001-basic-io/src/test/resources/CAS Modeler Sketch.jpg"); Path destination = Paths.get("C:/Users/sergio.f.gonzalez/git/Java-Programming-Repo/java-programming-samples/input-output/001-basic-io/src/test/resources/CAS Modeler Sketch.copy.jpg"); try { binaryStreamCopyRunner.copyFiles(origin, destination); } catch (IOException e) { System.out.println("Could not perform copy: " + e); } } }
[ "sergio.f.gonzalez@gmail.com" ]
sergio.f.gonzalez@gmail.com
ce3e8571b365c3c50f7c5b41426d2a514c61e4c8
3c55c3ea1719697b429e63069756ee10934ff617
/quotes-parent/pure-quote-repository-api-v1/src/main/java/nz/co/yellow/pure/quote/data/QuoteSystemPictureModel.java
3ab700116d3f07b3e63e7b5d268fbed55353d822
[]
no_license
davidy104/quotes
e3cd6611991b9eb3191f1776209ec4e8be995702
86658e6e3ec42eb890e7b4f151770b470cad2fc4
refs/heads/master
2021-01-25T12:14:41.352609
2013-12-02T20:46:11
2013-12-02T20:46:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,049
java
package nz.co.yellow.pure.quote.data; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @SuppressWarnings("serial") @Entity @Table(name = "Quote_SystemPicture") public class QuoteSystemPictureModel implements Serializable { @Id @GeneratedValue(generator = "qspSeq") @SequenceGenerator(name = "qspSeq", sequenceName = "QUOTE_PIC_SEQ") @Column(name = "SYS_PIC_ID", insertable = false, updatable = false) private Long pictureId; @Column(name = "PIC_REF") private String pictureRef; @Column(name = "CAPTION") private String caption; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "QUOTE_REQ_ID", referencedColumnName = "QUOTE_REQ_ID") private QuoteRequestModel quoteRequest; public Long getPictureId() { return pictureId; } public void setPictureId(Long pictureId) { this.pictureId = pictureId; } public String getPictureRef() { return pictureRef; } public void setPictureRef(String pictureRef) { this.pictureRef = pictureRef; } public String getCaption() { return caption; } public void setCaption(String caption) { this.caption = caption; } public QuoteRequestModel getQuoteRequest() { return quoteRequest; } public void setQuoteRequest(QuoteRequestModel quoteRequest) { this.quoteRequest = quoteRequest; } public void update(String pictureRef, String caption, QuoteRequestModel quoteRequest) { this.pictureRef = pictureRef; this.caption = caption; this.quoteRequest = quoteRequest; } public void update(String pictureRef, String caption) { this.pictureRef = pictureRef; this.caption = caption; } public static Builder getBuilder(String pictureRef, String caption, QuoteRequestModel quotesRequest) { return new Builder(pictureRef, caption, quotesRequest); } public static Builder getBuilder(String pictureRef, String caption) { return new Builder(pictureRef, caption); } public static class Builder { private QuoteSystemPictureModel built; public Builder(String pictureRef, String caption, QuoteRequestModel quoteRequest) { built = new QuoteSystemPictureModel(); built.pictureRef = pictureRef; built.caption = caption; built.quoteRequest = quoteRequest; } public Builder(String pictureRef, String caption) { built = new QuoteSystemPictureModel(); built.pictureRef = pictureRef; built.caption = caption; } public QuoteSystemPictureModel build() { return built; } } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE) .append("pictureId", pictureId) .append("pictureRef", pictureRef).append("caption", caption) .toString(); } }
[ "david.yuan@yellow.co.nz" ]
david.yuan@yellow.co.nz
3cd77d26b8114e6e5ba57e59a3a6005618167d26
ac9abcb25dfeb41df2dffb4608d0d69795526d1a
/src/com/toolbox/common/hibernate3/SpringEhCacheProvider.java
732101034a12e0907a4da7b8684100a981fff1ea
[]
no_license
nextflower/toolbox
d7716f1a1b838b217aba08c76eac91005f56092a
d002c6db442fb1078ae5356fe577d4ec63309b19
refs/heads/master
2016-09-05T13:04:34.875755
2015-05-12T10:47:40
2015-05-12T10:47:40
35,481,909
1
0
null
null
null
null
UTF-8
Java
false
false
3,746
java
package com.toolbox.common.hibernate3; import java.io.IOException; import java.util.Properties; import net.sf.ehcache.CacheManager; import net.sf.ehcache.ObjectExistsException; import net.sf.ehcache.config.Configuration; import net.sf.ehcache.config.ConfigurationFactory; import net.sf.ehcache.config.DiskStoreConfiguration; import org.hibernate.cache.Cache; import org.hibernate.cache.CacheException; import org.hibernate.cache.CacheProvider; import org.hibernate.cache.Timestamper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.Resource; /** * 为WEB应用提供缓存。 * * 解决配置文件地址和缓存文件存放地址的问题。支持/WEB-INF的地址格式。 */ @SuppressWarnings("deprecation") public final class SpringEhCacheProvider implements CacheProvider { private static final Logger log = LoggerFactory .getLogger(SpringEhCacheProvider.class); private Resource configLocation; private Resource diskStoreLocation; private CacheManager manager; public void setConfigLocation(Resource configLocation) { this.configLocation = configLocation; } public void setDiskStoreLocation(Resource diskStoreLocation) { this.diskStoreLocation = diskStoreLocation; } public final Cache buildCache(String name, Properties properties) throws CacheException { try { net.sf.ehcache.Ehcache cache = manager.getEhcache(name); if (cache == null) { String s = "Could not find a specific ehcache configuration for cache named [{}]; using defaults."; log.warn(s, name); manager.addCache(name); cache = manager.getEhcache(name); log.debug("started EHCache region: " + name); } return new net.sf.ehcache.hibernate.EhCache(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } } /** * Returns the next timestamp. */ public final long nextTimestamp() { return Timestamper.next(); } /** * Callback to perform any necessary initialization of the underlying cache * implementation during SessionFactory construction. * <p/> * * @param properties * current configuration settings. */ public final void start(Properties properties) throws CacheException { if (manager != null) { String s = "Attempt to restart an already started EhCacheProvider. Use sessionFactory.close() " + " between repeated calls to buildSessionFactory. Using previously created EhCacheProvider." + " If this behaviour is required, consider using SingletonEhCacheProvider."; log.warn(s); return; } Configuration config = null; try { if (configLocation != null) { config = ConfigurationFactory.parseConfiguration(configLocation .getInputStream()); if (this.diskStoreLocation != null) { DiskStoreConfiguration dc = new DiskStoreConfiguration(); dc.setPath(this.diskStoreLocation.getFile() .getAbsolutePath()); try { config.addDiskStore(dc); } catch (ObjectExistsException e) { String s = "if you want to config distStore in spring," + " please remove diskStore in config file!"; log.warn(s, e); } } } } catch (IOException e) { log.warn("create ehcache config failed!", e); } if (config != null) { manager = new CacheManager(config); } else { manager = new CacheManager(); } } /** * Callback to perform any necessary cleanup of the underlying cache * implementation during SessionFactory.close(). */ public final void stop() { if (manager != null) { manager.shutdown(); manager = null; } } /** * Not sure what this is supposed to do. * * @return false to be safe */ public final boolean isMinimalPutsEnabledByDefault() { return false; } }
[ "dv3333@163.com" ]
dv3333@163.com
8a82c48332760558ad2f5f015db33f77636d757b
eaff5724e7433bae5c09294f295fb9e8e66be875
/fremework/src/main/java/com/kingteller/commonutils/AssetDatabaseOpenHelper.java
668e56c23d2afd0836e6b7b1ffe2966192bbc17f
[]
no_license
Superingxz/Framework
17ae1f4d86ef2af766d2864fbbf103a4f87585be
07a0e1b3902ad8933ee86d1f5d0568765f29b4b3
refs/heads/master
2021-01-12T04:00:33.487381
2016-12-27T14:39:50
2016-12-27T14:39:50
77,461,939
0
0
null
null
null
null
UTF-8
Java
false
false
3,586
java
package com.kingteller.commonutils; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import java.io.InputStreamReader; /** * AssetDatabaseOpenHelper * <ul> * <li>Auto copy databse form assets to /data/data/package_name/databases</li> * <li>You can use it like {@link SQLiteDatabase}, use {@link #getWritableDatabase()} to create and/or open a database * that will be used for reading and writing. use {@link #getReadableDatabase()} to create and/or open a database that * will be used for reading only.</li> * </ul> * * @author <a href="http://www.trinea.cn" target="_blank">Trinea</a> 2013-12-5 */ public class AssetDatabaseOpenHelper { private Context context; private String databaseName; public AssetDatabaseOpenHelper(Context context, String databaseName) { this.context = context; this.databaseName = databaseName; } /** * Create and/or open a database that will be used for reading and writing. * * @return 返货数据库的对象 * @throws RuntimeException if cannot copy database from assets * @throws SQLiteException if the database cannot be opened */ public synchronized SQLiteDatabase getWritableDatabase() { File dbFile = context.getDatabasePath(databaseName); if (dbFile != null && !dbFile.exists()) { try { copyDatabase(dbFile); } catch (IOException e) { throw new RuntimeException("Error creating source database", e); } } return SQLiteDatabase.openDatabase(dbFile.getPath(), null, SQLiteDatabase.OPEN_READWRITE); } /** * Create and/or open a database that will be used for reading only. * * @return 返回读的数据库对象 * @throws RuntimeException if cannot copy database from assets * @throws SQLiteException if the database cannot be opened */ public synchronized SQLiteDatabase getReadableDatabase() { File dbFile = context.getDatabasePath(databaseName); if (dbFile != null && !dbFile.exists()) { try { copyDatabase(dbFile); } catch (IOException e) { throw new RuntimeException("Error creating source database", e); } } return SQLiteDatabase.openDatabase(dbFile.getPath(), null, SQLiteDatabase.OPEN_READONLY); } /** * @return the database name */ public String getDatabaseName() { return databaseName; } private void copyDatabase(File dbFile) throws IOException { InputStream stream = context.getAssets().open(databaseName); FileUtils.writeFile(dbFile, stream); stream.close(); } /** * 获取asset文件下的资源文件信息 * @param fileName * @return */ public static String getFromAssets(String fileName,Context context) { try { InputStreamReader inputReader = new InputStreamReader( context.getAssets().open(fileName)); BufferedReader bufReader = new BufferedReader(inputReader); String line = ""; String Result = ""; while ((line = bufReader.readLine()) != null) { Result += line; } return Result; } catch (Exception e) { e.printStackTrace(); } return null; } }
[ "1803117759@qq.com" ]
1803117759@qq.com
08f5f05b57bac7ad720ac57e232226dd27a7b9d3
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/platform/analysis-impl/src/com/intellij/refactoring/util/TextOccurrencesUtilBase.java
ce297a2c9a7d22b2dac11d75ab3e082e62ee0bf8
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
6,663
java
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.refactoring.util; import com.intellij.find.findUsages.FindUsagesHelper; import com.intellij.lang.ASTNode; import com.intellij.lang.LanguageParserDefinitions; import com.intellij.lang.ParserDefinition; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiPolyVariantReference; import com.intellij.psi.PsiReference; import com.intellij.psi.search.*; import com.intellij.usageView.UsageInfo; import com.intellij.usageView.UsageInfoFactory; import com.intellij.util.PairProcessor; import com.intellij.util.Processor; import org.jetbrains.annotations.NotNull; import java.util.Collection; public final class TextOccurrencesUtilBase { private TextOccurrencesUtilBase() { } public static void addTextOccurrences(@NotNull PsiElement element, @NotNull String stringToSearch, @NotNull GlobalSearchScope searchScope, @NotNull Collection<? super UsageInfo> results, @NotNull UsageInfoFactory factory) { FindUsagesHelper.processTextOccurrences(element, stringToSearch, searchScope, factory, t -> { results.add(t); return true; }); } public static boolean processUsagesInStringsAndComments( @NotNull Processor<? super UsageInfo> processor, @NotNull PsiElement element, @NotNull SearchScope searchScope, @NotNull String stringToSearch, @NotNull UsageInfoFactory factory ) { return processUsagesInStringsAndComments(element, searchScope, stringToSearch, false, (commentOrLiteral, textRange) -> { UsageInfo usageInfo = factory.createUsageInfo(commentOrLiteral, textRange.getStartOffset(), textRange.getEndOffset()); if (usageInfo != null && !processor.process(usageInfo)) return false; return true; }); } /** * @param includeReferences usage with a reference ot offset would be skipped iff {@code includeReferences == false} */ public static boolean processUsagesInStringsAndComments(@NotNull PsiElement element, @NotNull SearchScope searchScope, @NotNull String stringToSearch, boolean includeReferences, @NotNull PairProcessor<? super PsiElement, ? super TextRange> processor) { PsiSearchHelper helper = PsiSearchHelper.getInstance(element.getProject()); SearchScope scope = helper.getUseScope(element); scope = scope.intersectWith(searchScope); Processor<PsiElement> commentOrLiteralProcessor = literal -> processTextIn(literal, stringToSearch, includeReferences, processor); return processStringLiteralsContainingIdentifier(stringToSearch, scope, helper, commentOrLiteralProcessor) && helper.processCommentsContainingIdentifier(stringToSearch, scope, commentOrLiteralProcessor); } private static boolean processStringLiteralsContainingIdentifier(@NotNull String identifier, @NotNull SearchScope searchScope, PsiSearchHelper helper, final Processor<? super PsiElement> processor) { TextOccurenceProcessor occurenceProcessor = (element, offsetInElement) -> { if (isStringLiteralElement(element)) { return processor.process(element); } return true; }; return helper.processElementsWithWord(occurenceProcessor, searchScope, identifier, UsageSearchContext.IN_STRINGS, true); } public static boolean isStringLiteralElement(@NotNull PsiElement element) { final ParserDefinition definition = LanguageParserDefinitions.INSTANCE.forLanguage(element.getLanguage()); if (definition == null) { return false; } final ASTNode node = element.getNode(); return node != null && definition.getStringLiteralElements().contains(node.getElementType()); } private static boolean processTextIn(PsiElement scope, String stringToSearch, boolean allowReferences, PairProcessor<? super PsiElement, ? super TextRange> processor) { String text = scope.getText(); for (int offset = 0; offset < text.length(); offset++) { offset = text.indexOf(stringToSearch, offset); if (offset < 0) break; final PsiReference referenceAt = scope.findReferenceAt(offset); if (!allowReferences && referenceAt != null && (referenceAt.resolve() != null || referenceAt instanceof PsiPolyVariantReference && ((PsiPolyVariantReference)referenceAt).multiResolve(true).length > 0)) { continue; } if (offset > 0) { char c = text.charAt(offset - 1); if (Character.isJavaIdentifierPart(c) && c != '$') { if (offset < 2 || text.charAt(offset - 2) != '\\') continue; //escape sequence } } if (offset + stringToSearch.length() < text.length()) { char c = text.charAt(offset + stringToSearch.length()); if (Character.isJavaIdentifierPart(c) && c != '$') { continue; } } TextRange textRange = new TextRange(offset, offset + stringToSearch.length()); if (!processor.process(scope, textRange)) { return false; } offset += stringToSearch.length(); } return true; } public static void addUsagesInStringsAndComments(@NotNull PsiElement element, @NotNull SearchScope searchScope, @NotNull String stringToSearch, @NotNull Collection<? super UsageInfo> results, @NotNull UsageInfoFactory factory) { Object lock = new Object(); processUsagesInStringsAndComments(element, searchScope, stringToSearch, false, (commentOrLiteral, textRange) -> { UsageInfo usageInfo = factory.createUsageInfo(commentOrLiteral, textRange.getStartOffset(), textRange.getEndOffset()); if (usageInfo != null) { synchronized (lock) { results.add(usageInfo); } } return true; }); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
aea852cd68d790533510e61258bf373b06c393c4
db97ce70bd53e5c258ecda4c34a5ec641e12d488
/src/main/java/com/alipay/api/response/AlipayTradePrecreateConfirmResponse.java
756b9eab50b30a2a0dd373a50d5517551a4d09bf
[ "Apache-2.0" ]
permissive
smitzhang/alipay-sdk-java-all
dccc7493c03b3c937f93e7e2be750619f9bed068
a835a9c91e800e7c9350d479e84f9a74b211f0c4
refs/heads/master
2022-11-23T20:32:27.041116
2020-08-03T13:03:02
2020-08-03T13:03:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,990
java
package com.alipay.api.response; import java.util.Date; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.TradePrecreateConfirmIndirectMerchantInfo; import com.alipay.api.domain.TradePrecreateConfirmTradeMerchantInfo; import com.alipay.api.domain.TradePrecreateConfirmOrderInfo; import com.alipay.api.domain.TradePrecreateConfirmPrecreateCodeInfo; import com.alipay.api.domain.TradePrecreateConfirmTradeStoreInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.trade.precreate.confirm response. * * @author auto create * @since 1.0, 2019-10-23 13:58:49 */ public class AlipayTradePrecreateConfirmResponse extends AlipayResponse { private static final long serialVersionUID = 8498533878132858454L; /** * 收单模式 银行代理收单,取值:bankAgentMode 平台直连收单,取值: normalOrderMode */ @ApiField("acquiring_mode") private String acquiringMode; /** * 间联商户信息,若商户是间联商户则必选 格式为json */ @ApiField("indirect_merchant_info") private TradePrecreateConfirmIndirectMerchantInfo indirectMerchantInfo; /** * 直连商户信息,当商户为直连商户会有非空的值 格式为json */ @ApiField("merchant_info") private TradePrecreateConfirmTradeMerchantInfo merchantInfo; /** * 商户原始订单号 */ @ApiField("merchant_order_no") private String merchantOrderNo; /** * 订单创建时间 */ @ApiField("order_create_time") private Date orderCreateTime; /** * 订单信息 格式为json */ @ApiField("order_info") private TradePrecreateConfirmOrderInfo orderInfo; /** * 商户订单号 */ @ApiField("out_trade_no") private String outTradeNo; /** * 商户ID */ @ApiField("partner_id") private String partnerId; /** * 预下单的码信息 格式为json */ @ApiField("precreate_code_info") private TradePrecreateConfirmPrecreateCodeInfo precreateCodeInfo; /** * 清算机构流水号(如网联流水号) */ @ApiField("settle_serial_no") private String settleSerialNo; /** * 店铺信息 格式为json */ @ApiField("store_info") private TradePrecreateConfirmTradeStoreInfo storeInfo; /** * 订单金额 币种:人民币 单位:元 */ @ApiField("total_amount") private String totalAmount; /** * 支付宝交易号 */ @ApiField("trade_no") private String tradeNo; public void setAcquiringMode(String acquiringMode) { this.acquiringMode = acquiringMode; } public String getAcquiringMode( ) { return this.acquiringMode; } public void setIndirectMerchantInfo(TradePrecreateConfirmIndirectMerchantInfo indirectMerchantInfo) { this.indirectMerchantInfo = indirectMerchantInfo; } public TradePrecreateConfirmIndirectMerchantInfo getIndirectMerchantInfo( ) { return this.indirectMerchantInfo; } public void setMerchantInfo(TradePrecreateConfirmTradeMerchantInfo merchantInfo) { this.merchantInfo = merchantInfo; } public TradePrecreateConfirmTradeMerchantInfo getMerchantInfo( ) { return this.merchantInfo; } public void setMerchantOrderNo(String merchantOrderNo) { this.merchantOrderNo = merchantOrderNo; } public String getMerchantOrderNo( ) { return this.merchantOrderNo; } public void setOrderCreateTime(Date orderCreateTime) { this.orderCreateTime = orderCreateTime; } public Date getOrderCreateTime( ) { return this.orderCreateTime; } public void setOrderInfo(TradePrecreateConfirmOrderInfo orderInfo) { this.orderInfo = orderInfo; } public TradePrecreateConfirmOrderInfo getOrderInfo( ) { return this.orderInfo; } public void setOutTradeNo(String outTradeNo) { this.outTradeNo = outTradeNo; } public String getOutTradeNo( ) { return this.outTradeNo; } public void setPartnerId(String partnerId) { this.partnerId = partnerId; } public String getPartnerId( ) { return this.partnerId; } public void setPrecreateCodeInfo(TradePrecreateConfirmPrecreateCodeInfo precreateCodeInfo) { this.precreateCodeInfo = precreateCodeInfo; } public TradePrecreateConfirmPrecreateCodeInfo getPrecreateCodeInfo( ) { return this.precreateCodeInfo; } public void setSettleSerialNo(String settleSerialNo) { this.settleSerialNo = settleSerialNo; } public String getSettleSerialNo( ) { return this.settleSerialNo; } public void setStoreInfo(TradePrecreateConfirmTradeStoreInfo storeInfo) { this.storeInfo = storeInfo; } public TradePrecreateConfirmTradeStoreInfo getStoreInfo( ) { return this.storeInfo; } public void setTotalAmount(String totalAmount) { this.totalAmount = totalAmount; } public String getTotalAmount( ) { return this.totalAmount; } public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } public String getTradeNo( ) { return this.tradeNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
736b09da00969c56fe66dc8184babb1d5fd8918b
8d3d6c5459a5a1620e49ec34628f54e77e59be45
/app/src/main/java/com/toda/consultant/util/ImageUtils.java
6842226d1dc4d9aa1c9a4ffdcba8de468c3c9a69
[]
no_license
guguangzhu/Consultant
ff055f7f8abe7c45b1a330babe1303167a6b01fb
f338ed46c9e399ad6aa86cb6a57594427f08589d
refs/heads/master
2021-01-25T06:10:19.284683
2017-06-06T16:05:58
2017-06-06T16:06:11
93,535,475
0
0
null
null
null
null
UTF-8
Java
false
false
2,263
java
package com.toda.consultant.util; import android.graphics.Bitmap; import android.widget.ImageView; import io.rong.imageloader.core.DisplayImageOptions; import io.rong.imageloader.core.ImageLoader; import io.rong.imageloader.core.assist.ImageScaleType; /** * 图片处理Utils * Created by yangwei on 2016/11/25. */ public class ImageUtils { public static void loadImage(ImageView iv, String imageUrl) { ImageLoader.getInstance().displayImage(imageUrl, iv, getDisplayImageOptions()); } public static DisplayImageOptions getDisplayImageOptions() { return getDisplayImageOptions(0, 0, 0, true, true); } /** * 配置如何显示图片 * * @param forEmptyUri 如果图片Uri为empty的情况下,显示的图片Id * @param stubImage 正在加载中的情况下显示的图片Id * @param imageOnFial 加载图片失败情况下显示的图片Id * @param cacheInMemory 是否将图片保存到内存中,ture为缓存到内存中 * @param cacheOnDisk 是否将图片保存到sd卡上,ture为缓存到sd卡上 * @return 返回配置如何显示图片的DisplayImageOptions 对象 */ public static DisplayImageOptions getDisplayImageOptions(int forEmptyUri, int stubImage, int imageOnFial, boolean cacheInMemory, boolean cacheOnDisk) { /** * 配置如何显示图片 */ DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder(); // 设置图片Uri为空或是错误的时候显示的图片 builder.showImageForEmptyUri(forEmptyUri); // 设置图片在下载期间显示的图片 builder.showImageOnLoading(stubImage); // 设置图片加载/解码过程中错误时候显示的图片 builder.showImageOnFail(imageOnFial); // 设置是否将加载的图片缓存到磁盘上 builder.cacheOnDisk(cacheOnDisk); // 设置是否将加载的图片缓存到内存中 builder.cacheInMemory(cacheInMemory); // 默认使用RGB_565颜色显示 builder.bitmapConfig(Bitmap.Config.RGB_565); builder.imageScaleType(ImageScaleType.EXACTLY); DisplayImageOptions options = builder.build(); return options; } }
[ "574496377@qq.com" ]
574496377@qq.com
df269813a7fe3067a339dd1475762235993f9f49
11f638750f35b4d9d491a7f3071167e840263ebf
/teacherhelper/app/src/main/java/com/park61/teacherhelper/module/okdownload/db/DownloadDAO.java
06ff4ef06889e4c0196402b1a0e24eceaf59a039
[]
no_license
shushucn2012/gohomeplay
a0a2ca0db1fd59228e23e464703ec16946fe07ff
6f9f25d7d6f17ad3f556ac26ed3a0208f9a5fb88
refs/heads/master
2020-05-31T06:12:06.489037
2019-07-11T15:49:03
2019-07-11T15:49:03
190,134,348
0
0
null
null
null
null
UTF-8
Java
false
false
7,587
java
package com.park61.teacherhelper.module.okdownload.db; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import com.park61.teacherhelper.common.set.Log; import java.util.ArrayList; import java.util.List; /** * Created by chenlie on 2018/2/2. * * 下载任务db操作 */ public class DownloadDAO { private static final String TAG = "Download_DB"; private DownloadDB dbHelper; private DownloadDAO(Context context){ dbHelper = new DownloadDB(context); } private static DownloadDAO dao ; public static DownloadDAO getInstance(){ return dao; } public static void init(Context context){ if (dao == null ){ synchronized (DownloadDAO.class){ if(dao == null){ dao = new DownloadDAO(context); } } } } /** * 插入一条数据 */ public void insertOrUpdate(DownloadTask task){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put("task_icon", task.getTask_icon()); cv.put("task_name", task.getTask_name()); cv.put("task_vid", task.getTask_vid()); cv.put("task_sid", task.getSourceId()); cv.put("contentId", task.getContentId()); cv.put("task_status", task.getTask_status()); cv.put("task_type", task.getTask_type()); cv.put("task_size", task.getTask_size()); cv.put("task_time", task.getTask_time()); cv.put("task_filePath", task.getTask_filePath()); if(hasTask(task.getTask_vid())){ //update int u = db.update(DownloadDB.DOWNLOAD_TABLE, cv, "task_vid = ?", new String[]{task.getTask_vid()}); Log.e(TAG, u > 0 ? "更新成功" : "更新失败"); }else{ //insert long i = db.insert(DownloadDB.DOWNLOAD_TABLE, null, cv); Log.e(TAG, i == -1 ? "插入失败" : "插入成功"); } db.close(); } /** * 根据vid删除一条数据 */ public void delete(String vid){ SQLiteDatabase db = dbHelper.getWritableDatabase(); int result = db.delete(DownloadDB.DOWNLOAD_TABLE, "task_vid = ?", new String[]{vid}); db.close(); Log.e(TAG, result > 0 ? "删除成功" : "删除失败"); } /** * 更新一条数据 * */ public void update(String vid, int status, String filePath, int size){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put("task_status", status); cv.put("task_filePath", filePath); cv.put("task_size", size); db.update(DownloadDB.DOWNLOAD_TABLE, cv, "task_vid = ?", new String[]{vid}); db.close(); } /** * 更新一条数据 下载状态 * */ public void update(String vid, int status){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put("task_status", status); db.update(DownloadDB.DOWNLOAD_TABLE, cv, "task_vid = ?", new String[]{vid}); db.close(); } public boolean hasTask(String vid){ SQLiteDatabase db = dbHelper.getReadableDatabase(); String sql = "select count(*) from "+DownloadDB.DOWNLOAD_TABLE +" where task_vid = ?"; long l = 0; try { Cursor cursor = db.rawQuery(sql, new String[]{vid}); cursor.moveToFirst(); l = cursor.getLong(0); cursor.close(); } catch (Exception e) { e.printStackTrace(); } return l > 0; } /** * 根据 vid 查询 sourceId */ public String selectSid(String vid){ SQLiteDatabase db = dbHelper.getReadableDatabase(); String sql = "select task_sid from "+DownloadDB.DOWNLOAD_TABLE +" where task_vid = ?"; String sid = null; try { Cursor cursor = db.rawQuery(sql, new String[]{vid}); cursor.moveToFirst(); sid = cursor.getString(0); cursor.close(); } catch (Exception e) { e.printStackTrace(); } return sid; } public DownloadTask selectTask(String vid){ SQLiteDatabase db = dbHelper.getReadableDatabase(); String sql = "select task_icon,task_sid,task_name,contentId,task_type,task_status from "+DownloadDB.DOWNLOAD_TABLE +" where task_vid = ?"; DownloadTask t = null; try { Cursor cursor = db.rawQuery(sql, new String[]{vid}); cursor.moveToFirst(); t = new DownloadTask(); t.setTask_icon(cursor.getString(0)); t.setSourceId(cursor.getString(1)); t.setTask_name(cursor.getString(2)); t.setContentId(cursor.getString(3)); t.setTask_type(cursor.getInt(4)); t.setTask_status(cursor.getInt(5)); t.setTask_vid(vid); cursor.close(); } catch (Exception e) { e.printStackTrace(); } return t; } /** * 根据contentId查询 列表中已下载完成的任务 */ public List<DownloadTask> selectContentList(String contentId){ SQLiteDatabase db = dbHelper.getReadableDatabase(); Cursor cursor = db.query(DownloadDB.DOWNLOAD_TABLE, new String[]{"task_sid", "task_status", "task_filePath"}, "contentId = ?", new String[]{contentId}, null, null, null); if(cursor.getCount() > 0){ List<DownloadTask> tasks = new ArrayList<>(cursor.getCount()); while (cursor.moveToNext()) { DownloadTask task = new DownloadTask(); task.setSourceId(cursor.getString(0)); task.setTask_status(cursor.getInt(1)); task.setTask_filePath(cursor.getString(2)); tasks.add(task); } cursor.close(); return tasks; }else{ cursor.close(); return new ArrayList<DownloadTask>(); } } /** * 查询 type 为1 已完成的任务 * */ public List<DownloadTask> selectAllComplete(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); //"where datetime(record_date) > ? and datetime(record_date) < ?" Cursor cursor = db.query(DownloadDB.DOWNLOAD_TABLE, new String[]{"task_icon", "task_name", "task_time","task_vid", "task_size", "task_type", "task_filePath", "contentId"}, "task_status = ?", new String[]{"1"}, null, null, "task_time desc"); if (cursor.getCount() > 0) { List<DownloadTask> tasks = new ArrayList<>(cursor.getCount()); while (cursor.moveToNext()) { DownloadTask task = new DownloadTask(); task.setTask_icon(cursor.getString(0)); task.setTask_name(cursor.getString(1)); task.setTask_time(cursor.getString(2)); task.setTask_vid(cursor.getString(3)); task.setTask_size(cursor.getInt(4)); task.setTask_type(cursor.getInt(5)); task.setTask_filePath(cursor.getString(6)); task.setContentId(cursor.getString(7)); tasks.add(task); } cursor.close(); return tasks; }else{ cursor.close(); return new ArrayList<DownloadTask>(); } } }
[ "199355737@qq.com" ]
199355737@qq.com
c0eb13b926601a61e4f342560a73cfc15a42c1e0
3389348b101e48c482476ffb8c172712981286a8
/src/CL7/IOStream/TryCatch/Demo2JD7.java
e3e13941530da802f21731f6c81fe7a060656a36
[]
no_license
7IsEnough/workspace4Java
2b78c0d11acc181f85642b5131959e0b9bd88843
154871364907aadb7f70ccd9d606e9c1b2b0b021
refs/heads/master
2023-03-09T20:17:28.867838
2021-02-20T11:44:48
2021-02-20T11:44:48
340,636,805
0
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
package CL7.IOStream.TryCatch; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; /** * @author Promise * @create 2019-08-20-10:44 */ public class Demo2JD7 { public static void main(String[] args) { try( //创建字节输入流对象,构造方法中绑定要读取的数据源 FileInputStream fis = new FileInputStream("D:\\5.jpg"); //创建字节输出流对象,构造方法中绑定要写入的目的地 FileOutputStream fos = new FileOutputStream("G:\\workspace4Java\\5.jpg");) { //一次读取一个字节写入一个字节的方式 //使用字节输入流对象中的方法read读取文件 int len = 0; while ((len = fis.read())!=-1){ //使用write方法,把读到的字节写入到目的地的文件夹中 fos.write(len); } }catch (IOException e){ System.out.println(e); } } }
[ "976949689@qq.com" ]
976949689@qq.com
887858efd0f0b9fe9893faa04a5dde0409323ceb
78904c200568ce8adb08b8c3a328c2a4d6d7d4b2
/fcf-messaging/fcf-messaging-jms/fcf-messaging-jms-core/src/main/java/org/fujionclinical/messaging/jms/MessageConsumer.java
c7d19ab2a609ffdf0e9689eb7e3a596a8259b3d9
[ "LicenseRef-scancode-fujion-exception-to-apache-2.0" ]
permissive
fujionclinical/fujion-clinical-framework
9ab5682be96feed6caae8e2cb6a03b052d0f812d
686b4ff4704f6c2c83305dc59c66d4a6b37037fa
refs/heads/master
2023-08-09T03:45:13.565855
2023-07-05T19:37:25
2023-07-05T19:37:25
140,986,953
1
0
null
2023-07-31T21:20:08
2018-07-15T00:25:59
Java
UTF-8
Java
false
false
5,649
java
/* * #%L * Fujion Clinical Framework * %% * Copyright (C) 2020 fujionclinical.org * %% * 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. * * This Source Code Form is also subject to the terms of the Health-Related * Additional Disclaimer of Warranty and Limitation of Liability available at * * http://www.fujionclinical.org/licensing/disclaimer * * #L% */ package org.fujionclinical.messaging.jms; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.fujion.common.MiscUtil; import org.fujionclinical.api.messaging.IMessageConsumer; import org.fujionclinical.api.messaging.Message; import javax.jms.*; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * JMS-based message consumer. */ public class MessageConsumer implements IMessageConsumer { private static final Log log = LogFactory.getLog(MessageConsumer.class); private class Subscriber implements MessageListener { private final String topic; Subscriber(String topic) { this.topic = topic; } @Override public void onMessage(javax.jms.Message message) { try { Object payload; if (message instanceof ObjectMessage) { payload = ((ObjectMessage) message).getObject(); } else if (message instanceof TextMessage) { payload = ((TextMessage) message).getText(); } else { throw new Exception("Ignoring unsupported message"); } Message msg = payload instanceof Message ? (Message) payload : new Message("jmsMessage", payload); if (callback != null) { callback.onMessage(topic, msg); } } catch (Exception e) { log.warn(String.format("Error processing message: type [%s], message [%s]", message.getClass(), message), e); } } } private final Map<String, TopicSubscriber> subscribers = Collections.synchronizedMap(new HashMap<>()); private final JMSService service; private IMessageCallback callback; public MessageConsumer(JMSService service) { this.service = service; } @Override public void setCallback(IMessageCallback callback) { this.callback = callback; } @Override public boolean subscribe(String channel) { if (subscribers.get(channel) != null) { if (log.isDebugEnabled()) { log.debug(String.format("Already subscribed to Topic[%s]", channel)); } return false; } if (log.isDebugEnabled()) { log.debug(String.format("Subscribing to Topic[%s]", channel)); } String selector = null; //JMSUtil.getMessageSelector(channel, getPublisherInfo()); // This doesn't actually create a physical topic. In ActiveMQ, a topic is created on-demand when someone with the // authority to create topics submits something to a topic. By default, everyone has the authority to create topics. See // http://markmail.org/message/us7v5ocnb65m4fdp#query:createtopic%20activemq%20jms+page:1+mid:tce6soq5g7rdkqnw+state:results --lrc Topic topic = service.createTopic(channel); TopicSubscriber subscriber = service.createSubscriber(topic, selector); try { subscriber.setMessageListener(new Subscriber(channel)); } catch (JMSException e) { throw MiscUtil.toUnchecked(e); } this.subscribers.put(channel, subscriber); return true; } @Override public boolean unsubscribe(String channel) { TopicSubscriber subscriber = this.subscribers.remove(channel); if (subscriber == null) { return false; } log.debug(String.format("Unsubscribing Subscriber[%s] for Topic [%s].", subscriber, channel)); try { subscriber.setMessageListener(null); subscriber.close(); } catch (JMSException e) { // NOP } return true; } /** * Reassert subscriptions. */ public void assertSubscriptions() { for (String channel : subscribers.keySet()) { try { subscribers.put(channel, null); subscribe(channel); } catch (Throwable e) { break; } } } /** * Remove all remote subscriptions. */ public void removeSubscriptions() { for (TopicSubscriber subscriber : subscribers.values()) { try { subscriber.close(); } catch (Throwable e) { log.debug("Error closing subscriber", e);//is level appropriate - previously hidden exception -afranken } } subscribers.clear(); } }
[ "mdgeek1@gmail.com" ]
mdgeek1@gmail.com
40041f7b37bc74fbe76f82595b6de08f0f4d2f47
a7f055726959d4871a683c2b407c9a870dbf8f42
/okhttp/src/main/java/com/squareup/okhttp/Dispatcher.java
6a6c273ad67c7507b02b3b384b8bd6ec1f45b862
[ "Apache-2.0" ]
permissive
lxdvs/okhttp
5f0e5351709f7313e9c781e6dc6239e356f808d1
b1a6a735bb8da3f6dcf65369604882e35f6f8742
refs/heads/master
2021-01-16T17:38:44.445901
2014-01-15T00:08:23
2014-01-15T00:08:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,704
java
/* * Copyright (C) 2013 Square, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.squareup.okhttp; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; final class Dispatcher { // TODO: thread pool size should be configurable; possibly configurable per host. private final ThreadPoolExecutor executorService = new ThreadPoolExecutor( 8, 8, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); private final Map<Object, List<Job>> enqueuedJobs = new LinkedHashMap<Object, List<Job>>(); public synchronized void enqueue( HttpURLConnection connection, Request request, Response.Receiver responseReceiver) { Job job = new Job(this, connection, request, responseReceiver); List<Job> jobsForTag = enqueuedJobs.get(request.tag()); if (jobsForTag == null) { jobsForTag = new ArrayList<Job>(2); enqueuedJobs.put(request.tag(), jobsForTag); } jobsForTag.add(job); executorService.execute(job); } public synchronized void cancel(Object tag) { List<Job> jobs = enqueuedJobs.remove(tag); if (jobs == null) return; for (Job job : jobs) { executorService.remove(job); } } synchronized void finished(Job job) { List<Job> jobs = enqueuedJobs.get(job.request.tag()); if (jobs != null) jobs.remove(job); } static class RealResponseBody extends Response.Body { private final HttpURLConnection connection; private final InputStream in; RealResponseBody(HttpURLConnection connection, InputStream in) { this.connection = connection; this.in = in; } @Override public String contentType() { return connection.getHeaderField("Content-Type"); } @Override public long contentLength() { return connection.getContentLength(); // TODO: getContentLengthLong } @Override public InputStream byteStream() throws IOException { return in; } } }
[ "jwilson@squareup.com" ]
jwilson@squareup.com
e91623d77217bbc072159a1520882f3be613050b
929d704f27615532f68566055f10fb37a51df554
/drylining/src/main/java/com/app/drylining/chat/utils/qb/QbUsersHolder.java
1857fff23de472904b5fadad84db00e0d1cdd5cb
[]
no_license
saubhagyamapps/drylining-final
5d9fce6fe7e058a70d7565d185393bc670721b81
cbf4c17b92558959e19e29b9789d76482ea0ea82
refs/heads/master
2021-10-15T23:01:42.841159
2019-02-06T10:29:57
2019-02-06T10:29:57
167,315,768
0
0
null
null
null
null
UTF-8
Java
false
false
1,353
java
package com.app.drylining.chat.utils.qb; import android.util.SparseArray; import com.quickblox.users.model.QBUser; import java.util.ArrayList; import java.util.List; /** * Basically in your app you should store users in database * And load users to memory on demand * We're using runtime SpaceArray holder just to simplify app logic */ public class QbUsersHolder { private static QbUsersHolder instance; private SparseArray<QBUser> qbUserSparseArray; public static synchronized QbUsersHolder getInstance() { if (instance == null) { instance = new QbUsersHolder(); } return instance; } private QbUsersHolder() { qbUserSparseArray = new SparseArray<>(); } public void putUsers(List<QBUser> users) { for (QBUser user : users) { putUser(user); } } public void putUser(QBUser user) { qbUserSparseArray.put(user.getId(), user); } public QBUser getUserById(int id) { return qbUserSparseArray.get(id); } public List<QBUser> getUsersByIds(List<Integer> ids) { List<QBUser> users = new ArrayList<>(); for (Integer id : ids) { QBUser user = getUserById(id); if (user != null) { users.add(user); } } return users; } }
[ "keshuvodedara@gmail.com" ]
keshuvodedara@gmail.com
51718fed6f02d128d18165bed5e647bd07d9ac93
f6c66fd537f8a036edfd6c9a611d1ffa2948f8f5
/wallet/src/main/java/com/aftarobot/wallet/data/Links.java
f034007dfa632533e30aa904ff27f448c6eee2ce
[]
no_license
bohatmx/blockchain-android-repo
2c0c8356ffe0d5971ddc77f59188914a6d990b8e
d42149b5a83e5a0c4e73879206a3e0e86f1685dd
refs/heads/master
2021-09-25T07:06:42.661171
2018-10-19T08:52:35
2018-10-19T08:52:35
118,240,521
0
0
null
null
null
null
UTF-8
Java
false
false
1,308
java
package com.aftarobot.wallet.data; public class Links { private Self self; public Self getSelf() { return this.self; } public void setSelf(Self self) { this.self = self; } private Transactions transactions; public Transactions getTransactions() { return this.transactions; } public void setTransactions(Transactions transactions) { this.transactions = transactions; } private Operations operations; public Operations getOperations() { return this.operations; } public void setOperations(Operations operations) { this.operations = operations; } private Payments payments; public Payments getPayments() { return this.payments; } public void setPayments(Payments payments) { this.payments = payments; } private Effects effects; public Effects getEffects() { return this.effects; } public void setEffects(Effects effects) { this.effects = effects; } private Offers offers; public Offers getOffers() { return this.offers; } public void setOffers(Offers offers) { this.offers = offers; } private Trades trades; public Trades getTrades() { return this.trades; } public void setTrades(Trades trades) { this.trades = trades; } private Data data; public Data getData() { return this.data; } public void setData(Data data) { this.data = data; } }
[ "malengatiger@gmail.com" ]
malengatiger@gmail.com
aeed7be9cec5e42dcdb7ab4bb48180de2b872d3e
a3836c8e97e1b110d68620152157b9bfd5531423
/SV-common/slimevoid/lib/network/PacketTileEntity.java
1a1add2a85e0584a8f238c56ce59a6d28dd3996b
[]
no_license
Smeagolworms4/SlimevoidLibrary
b827507fed10098513a254464f0ce4b8dfcf761e
352c15a62e13e5532f5d4d6f4830d12b1d9a2e2f
refs/heads/master
2021-01-18T02:38:23.601854
2013-05-09T14:36:34
2013-05-09T14:36:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,847
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * Public License for more details. You should have received a copy of the GNU * Lesser General Public License along with this program. If not, see * <http://www.gnu.org/licenses/> */ package slimevoid.lib.network; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import slimevoid.lib.util.SlimevoidHelper; /** * Packet for sending TileEntity information * * @author Eurymachus * */ public abstract class PacketTileEntity extends PacketUpdate { public PacketTileEntity() { super(PacketIds.TILE); } /** * Get the tileentity instance for this packet * * @param world The world in which the tileentity resides * * @return The tileentity */ public TileEntity getTileEntity(World world) { if (this.targetExists(world)) { return SlimevoidHelper.getBlockTileEntity( world, this.xPosition, this.yPosition, this.zPosition); } return null; } @Override public boolean targetExists(World world) { if (SlimevoidHelper.targetExists( world, this.xPosition, this.yPosition, this.zPosition) && Block.blocksList[SlimevoidHelper.getBlockId( world, this.xPosition, this.yPosition, this.zPosition)].hasTileEntity(0) ) { return true; } return false; } }
[ "reflex_ion@hotmail.com" ]
reflex_ion@hotmail.com
bbc35d8b131049f5d891761e7af78ec8ec23bc91
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/10/1720.java
fe577faf8488b3e81be4d57b55a1aebf9255e26d
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package <missing>; public class GlobalMembers { public static int Main() { int[] a = new int[30]; int count = 0; int n; int temp; int i; n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); while (n-- != 0) { temp = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); for (i = 0;i < count;i++) { if (temp > a[i]) { a[i] = temp; break; } } if (i >= count) { a[i] = temp; count++; } } System.out.print(count); System.out.print("\n"); return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
8023a35f5d6c15e268bad540998f98b4929a05f3
bcf03d43318239f6242e53e0bdd3c4753c08fc79
/java/defpackage/afx$2.java
5fcd9587b9284df5688bcdbe3f1d9f2da64d8b1d
[]
no_license
morristech/Candid
24699d45f9efb08787316154d05ad5e6a7a181a5
102dd9504cac407326b67ca7a36df8adf6a8b450
refs/heads/master
2021-01-22T21:07:12.067146
2016-12-22T18:40:30
2016-12-22T18:40:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package defpackage; import android.os.Bundle; class afx$2 implements Runnable { final /* synthetic */ String a; final /* synthetic */ String b; final /* synthetic */ long c; final /* synthetic */ Bundle d; final /* synthetic */ boolean e; final /* synthetic */ boolean f; final /* synthetic */ boolean g; final /* synthetic */ String h; final /* synthetic */ afx i; afx$2(afx afx, String str, String str2, long j, Bundle bundle, boolean z, boolean z2, boolean z3, String str3) { this.i = afx; this.a = str; this.b = str2; this.c = j; this.d = bundle; this.e = z; this.f = z2; this.g = z3; this.h = str3; } public void run() { this.i.b(this.a, this.b, this.c, this.d, this.e, this.f, this.g, this.h); } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
342253c8a810c59038e513f14f351093d464d4eb
a7cdb2c74f213932b8013bc60006ce8f8fad60f7
/app/src/main/java/ru/exampleopit777/newsclean/data/system/ResourceManager.java
828fdc141bd040147cbe25ea079025c90c599c20
[]
no_license
max-android/NewsClean
74a6bf156d93f444e4957171ff64833a4efe8ce8
a5f9172a97e07164b3206326d24a16a602ba6033
refs/heads/master
2020-03-19T05:01:33.067157
2018-06-03T09:05:28
2018-06-03T09:05:45
135,892,131
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package ru.exampleopit777.newsclean.data.system; import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.StringRes; /** * Created Максим on 01.06.2018. * Copyright © Max */ public class ResourceManager { private Context context; public ResourceManager(@NonNull Context context) { this.context = context; } public String getString(@StringRes int id) { return context.getString(id); } }
[ "preferenceLEAD111@yandex.ru" ]
preferenceLEAD111@yandex.ru
9ddf58a692afeffc2a89468b4cf0ef300002b1d8
9094cdb0d38e2dd98fea4077597be1cd8892ae0d
/src/main/java/sirius/web/templates/ExcelExport.java
05deaed023cb0367e6a9a5dcfe4ac039c0c889c4
[ "MIT" ]
permissive
FingolfinTEK/sirius-web
4bd4793a607ccef2fa30202e007bba3633c26cf7
2d025a0676f7e2eec81db269fa1bc1c69865a038
refs/heads/master
2021-01-12T22:35:09.794268
2015-05-31T12:16:47
2015-05-31T12:16:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,222
java
/* * Made with all the love in the world * by scireum in Remshalden, Germany * * Copyright by scireum GmbH * http://www.scireum.de - info@scireum.de */ package sirius.web.templates; import io.netty.handler.codec.http.HttpResponseStatus; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import sirius.kernel.health.Exceptions; import sirius.kernel.nls.NLS; import sirius.web.http.WebContext; import java.io.IOException; import java.io.OutputStream; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Arrays; import java.util.Date; import java.util.List; /** * Generates an Excel file which can be sent as a response for a {@link sirius.web.http.WebContext} * * @author Andreas Haufler (aha@scireum.de) * @since 2015/01 */ public class ExcelExport { private static final String MIME_TYPE_EXCEL = "application/ms-excel"; private final HSSFWorkbook workbook; private final HSSFSheet sheet; private int rows = 0; private int maxCols = 0; private HSSFCellStyle dateStyle; private HSSFCellStyle numeric; private HSSFCellStyle borderStyle; private HSSFCellStyle normalStyle; /** * Generates a new Export */ public ExcelExport() { workbook = new HSSFWorkbook(); sheet = workbook.createSheet(); // Setup styles dateStyle = workbook.createCellStyle(); dateStyle.setDataFormat(workbook.createDataFormat().getFormat("dd.mm.yyyy")); numeric = workbook.createCellStyle(); numeric.setDataFormat(workbook.createDataFormat().getFormat("#,##0.00")); borderStyle = workbook.createCellStyle(); borderStyle.setBorderBottom(HSSFCellStyle.BORDER_THICK); normalStyle = workbook.createCellStyle(); // Setup layout sheet.createFreezePane(0, 1, 0, 1); HSSFPrintSetup ps = sheet.getPrintSetup(); ps.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE); ps.setLandscape(false); ps.setFitWidth((short) 1); ps.setFitHeight((short) 0); sheet.setAutobreaks(true); sheet.setRepeatingRows(new CellRangeAddress(0, 0, -1, -1)); } private void addCell(HSSFRow row, Object obj, int columnIndex, HSSFCellStyle style) { if (obj == null) { return; } HSSFCell cell = row.createCell(columnIndex); cell.setCellStyle(style); if (obj instanceof String) { cell.setCellValue(new HSSFRichTextString((String) obj)); return; } if (obj instanceof LocalDateTime) { cell.setCellValue(Date.from(((LocalDateTime) obj).atZone(ZoneId.systemDefault()).toInstant())); return; } if (obj instanceof LocalDate) { cell.setCellValue(Date.from(((LocalDate) obj).atStartOfDay(ZoneId.systemDefault()).toInstant())); return; } if (obj instanceof Boolean) { cell.setCellValue(new HSSFRichTextString(NLS.toUserString(obj))); return; } if (obj instanceof Double) { cell.setCellValue((Double) obj); return; } if (obj instanceof Float) { cell.setCellValue((Float) obj); return; } if (obj instanceof Integer) { cell.setCellValue((Integer) obj); return; } if (obj instanceof Long) { cell.setCellValue((Long) obj); return; } if (obj instanceof BigDecimal) { cell.setCellValue(((BigDecimal) obj).doubleValue()); return; } cell.setCellValue(new HSSFRichTextString(obj.toString())); } /** * Adds the given array of objects as a row. * * @param row the objects to add to the table * @return the export itself for fluent method calls */ public ExcelExport addRow(Object... row) { addRow(Arrays.asList(row)); return this; } /** * Adds the given list of objects as a row. * * @param row the objects to add to the table * @return the export itself for fluent method calls */ public ExcelExport addRow(List<?> row) { if (row != null) { maxCols = Math.max(maxCols, row.size()); int idx = 0; HSSFRow r = sheet.createRow(rows++); for (Object entry : row) { addCell(r, entry, idx++, getCellStyleForObject(entry)); } } return this; } /** * Writes the generated Excel file to the given web context. * * @param name the filename to use * @param ctx the target context to create a response for */ public void writeResponseTo(String name, WebContext ctx) { OutputStream out = ctx.respondWith() .download(name) .notCached() .outputStream(HttpResponseStatus.OK, MIME_TYPE_EXCEL); writeToStream(out); } /** * Writes the generated excel file to the given stream. * * @param out the target stream to write the excel workbook to */ public void writeToStream(OutputStream out) { try { try { // Make it pretty... for (short col = 0; col < maxCols; col++) { sheet.autoSizeColumn(col); } // Add autofilter... sheet.setAutoFilter(new CellRangeAddress(0, rows, 0, maxCols - 1)); workbook.write(out); } finally { out.close(); } } catch (IOException e) { throw Exceptions.handle(e); } } private HSSFCellStyle getCellStyleForObject(Object data) { HSSFCellStyle style = normalStyle; if (data != null && (data instanceof LocalDate || data instanceof LocalDateTime)) { style = dateStyle; } else if (data != null && (data instanceof Integer || data instanceof Double || data instanceof Long)) { style = numeric; } return style; } }
[ "aha@scireum.de" ]
aha@scireum.de
e711ac2b38322c8883c818a3f00f68433d802f41
054c818843cee81aefe92531643ddf4b175a8163
/app/src/main/java/com/ale2nico/fillfield/firebaselisteners/HomeChildEventListener.java
b508b4b81bc083b2fb437cd927948f78bd8c476e
[]
no_license
nicsalv/FillField
9b44e8c13d96f3c36c13db4fe6e3a053735a0b12
2cd75ba67ffb5d0e17c4b02f5fed78a5a875315f
refs/heads/master
2020-03-24T23:20:11.900178
2018-08-22T11:00:27
2018-08-22T11:00:27
143,029,529
0
0
null
null
null
null
UTF-8
Java
false
false
3,568
java
package com.ale2nico.fillfield.firebaselisteners; import android.support.annotation.NonNull; import android.util.Log; import android.view.View; import android.widget.ProgressBar; import com.ale2nico.fillfield.FieldAdapter; import com.ale2nico.fillfield.models.Field; import com.google.firebase.database.ChildEventListener; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; public class HomeChildEventListener implements ChildEventListener { // The adapter that will look up for the data protected FieldAdapter fieldAdapter; // Progress bar to hide protected ProgressBar progressBar; public HomeChildEventListener() { } public HomeChildEventListener(FieldAdapter fieldAdapter, ProgressBar progressBar) { this.fieldAdapter = fieldAdapter; this.progressBar = progressBar; } @Override public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String previousChildName) { // A new field has been added, add it to the displayed list Field field = dataSnapshot.getValue(Field.class); String fieldKey = dataSnapshot.getKey(); //TODO: filtering result by actul position. // Update RecyclerView fieldAdapter.getFields().add(field); fieldAdapter.getFieldKeyMap().put(field, fieldKey); fieldAdapter.getFieldsIds().add(dataSnapshot.getKey()); fieldAdapter.notifyItemInserted(fieldAdapter.getFields().size() - 1); // Hide progress bar progressBar.setVisibility(View.GONE); } @Override public void onChildChanged(@NonNull DataSnapshot dataSnapshot, String previousChildName) { Log.d("HomeChildEventListener", "onChildChanged"); // A field has changed, use the key to determine if we are displaying // this field and if so displayed the changed field. Field changedField = dataSnapshot.getValue(Field.class); String fieldKey = dataSnapshot.getKey(); int fieldIndex = fieldAdapter.getFieldsIds().indexOf(fieldKey); if (fieldIndex > -1) { // Replace with the new data fieldAdapter.getFields().set(fieldIndex, changedField); // Update RecyclerView fieldAdapter.notifyItemChanged(fieldIndex); } else { Log.w(FieldAdapter.TAG, "onChildChanged:unknown_child:" + fieldKey); } } @Override public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) { Log.d(FieldAdapter.TAG, "onChildRemoved:" + dataSnapshot.getKey()); // A field has been removed, use the key to determine if we are displaying // this field and if so remove it. String fieldKey = dataSnapshot.getKey(); int fieldIndex = fieldAdapter.getFieldsIds().indexOf(fieldKey); if (fieldIndex > -1) { // Remove field from both lists fieldAdapter.getFieldsIds().remove(fieldIndex); fieldAdapter.getFields().remove(fieldIndex); // Update RecyclerView fieldAdapter.notifyItemRemoved(fieldIndex); } } @Override public void onChildMoved(@NonNull DataSnapshot dataSnapshot, String previousChildName) { Log.d(FieldAdapter.TAG, "onChildMoved:" + dataSnapshot.getKey()); // Do nothing because we don't expect a field to move position } @Override public void onCancelled(@NonNull DatabaseError databaseError) { Log.w(FieldAdapter.TAG, "FieldAdapter:onCancelled", databaseError.toException()); } }
[ "you@example.com" ]
you@example.com
7c6bc9927b34dfeb9c4767a10b59e5745525e21f
f55740d354098ef66436b0b42e3301823152f90d
/test/com/techgif/sdk/server/C2DMClientReceiver.java
1167eba81457af7025c8c3e30cf657b5596af4ba
[]
no_license
life-of-kar/Techgif
3de6719bd824aba41104104ffb1823ffb7ead652
64267640c5b48c5c515056822ab9b4469756bb1d
refs/heads/master
2020-08-03T18:09:28.700147
2016-11-11T13:34:47
2016-11-11T13:34:47
73,539,775
2
0
null
2016-11-12T07:58:57
2016-11-12T07:58:56
null
UTF-8
Java
false
false
1,815
java
package com.appsgeyser.sdk.server; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; import com.appsgeyser.sdk.ads.StatServerClient; import com.appsgeyser.sdk.configuration.Configuration; import com.appsgeyser.sdk.notifications.AppNotificationManager; import com.google.android.c2dm.C2DMBaseReceiver; import net.hockeyapp.android.UpdateFragment; public class C2DMClientReceiver extends C2DMBaseReceiver { public C2DMClientReceiver(Context context) { super(Configuration.getInstance().getPushAccount(), context); } public void onRegistered(Context context, String registration) { Configuration.getInstance().loadConfiguration(); new PushServerClient().sendRegisteredId(registration); } public void onUnregistered(Context context, String registration) { Configuration.getInstance().loadConfiguration(); new PushServerClient().sendUnregisteredId(registration); } public void onError(Context context, String errorId) { Log.e("push", errorId); } public void onMessage(Context context, Intent intent) { Bundle extras = intent.getExtras(); if (extras != null) { String url = extras.getString(UpdateFragment.FRAGMENT_URL); String message = extras.getString("message"); String title = extras.getString("title"); AppNotificationManager.generateNotification(context, message, title, AppNotificationManager.getLaunchIntent(context, title, url)); String TAG = getClass().getSimpleName(); Log.i(TAG, "Got incoming push message, url is " + url); Log.i(TAG, "Sending feedback to Appsgeyser..."); new StatServerClient().sendPushReceivedAsync(url); } } }
[ "sureshrajpurohit@live.in" ]
sureshrajpurohit@live.in
27ecb248128297745b3b14b408d3b293727fa83e
8f5d3d144cf98de0b0c535526eb65db0702d4ffc
/main/java/dqr/entity/petEntity/render/DqmRenderPetHiitogizumo.java
0b0a6a96bd7d1b129ce1baea0986fb8127042cd6
[]
no_license
azelDqm/MC1.7.10_DQRmod
54c0790b80c11a8ae591f17d233adc95f1b7e41a
bfec0e17fcade9d4616ac29b5abcbb12aa562d2a
refs/heads/master
2020-04-16T02:26:44.596119
2020-04-06T08:58:47
2020-04-06T08:58:47
57,311,023
6
2
null
null
null
null
UTF-8
Java
false
false
1,266
java
package dqr.entity.petEntity.render; import net.minecraft.client.renderer.entity.RenderLiving; import dqr.entity.petEntity.DqmPetBase; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import dqr.entity.mobEntity.model.DqmModelGizumo; public class DqmRenderPetHiitogizumo extends RenderLiving { /* * テクスチャへのResourceLocationを設定する. */ private static final ResourceLocation DqmMobTexture = new ResourceLocation("dqr:textures/entity/mob/Hiitogizumo.png"); private static final ResourceLocation DqmMobSleepTexture = new ResourceLocation("dqr:textures/entity/mobSleep/HiitogizumoPetzzz.png"); public DqmRenderPetHiitogizumo() { /* * スーパークラスのコンストラクタの引数は * (このRenderと紐付けするModel, このRenderを使うEntityの足元の影の大きさ) */ super(new DqmModelGizumo(), 0.5F); } @Override protected ResourceLocation getEntityTexture(Entity par1EntityLiving) { // TODO 自動生成されたメソッド・スタブ //return null; if(par1EntityLiving instanceof DqmPetBase) { DqmPetBase pet = (DqmPetBase)par1EntityLiving; if(pet.isSitting()) { return this.DqmMobSleepTexture; } } return this.DqmMobTexture; } }
[ "azel.dqm@gmail.com" ]
azel.dqm@gmail.com
cc5e5061d13c40d860b1c260dd9a01c7c816fba6
72bb384115dc7ff23c3069f110d8131fa901d577
/source/tools/src/main/java/ota/client12/ITableProperties.java
52a27b3d182852bb1c7c49ebd0aa83917fae4040
[]
no_license
Automic-Community/hp-quality-center-action-pack
cf2bb743866afe22c07ffc23f7bf4444b866d998
38803fece8e7c00f53ab62ba0402ecc31cc6b90d
refs/heads/master
2023-01-15T22:16:27.310318
2020-11-20T12:58:53
2020-11-20T12:58:53
292,007,852
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package ota.client12 ; import com4j.*; /** * Description of a database table. */ @IID("{C015CC00-5F0F-4DD6-9D8C-733B1412BB1B}") public interface ITableProperties extends Com4jObject { // Methods: /** * <p> * The name of the database table. * </p> * <p> * Getter method for the COM property "Name" * </p> * @return Returns a value of type java.lang.String */ @DISPID(1) //= 0x1. The runtime will prefer the VTID if present @VTID(7) java.lang.String name(); /** * <p> * The display name of the table. * </p> * <p> * Getter method for the COM property "UserLabel" * </p> * @return Returns a value of type java.lang.String */ @DISPID(2) //= 0x2. The runtime will prefer the VTID if present @VTID(8) java.lang.String userLabel(); // Properties: }
[ "ashish.kumar09@nagarro.com" ]
ashish.kumar09@nagarro.com
4439fa5e02a9499f9f3afd8f93d0e5a68ff59d03
1e3e043877f9a8d71f0c70dec547737226e7784e
/winit-label-parent/winit-label-core/src/main/java/com/winit/svr/impl/variable/StringType.java
9be4b085c20d746789b7e5ee61dba92c1db6a4e0
[]
no_license
raisedragon/work
d12e285f506e441902db2e4b31a3246ef272df1b
15e31c3f4b2b5f2ea30420d8885dfc469aa26914
refs/heads/master
2021-03-12T23:42:05.450864
2015-07-15T03:08:30
2015-07-15T03:08:30
24,010,744
0
0
null
null
null
null
UTF-8
Java
false
false
1,380
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.winit.svr.impl.variable; /** * @author Tom Baeyens */ public class StringType implements VariableType { private final int maxLength; public StringType(int maxLength) {this.maxLength = maxLength;} public String getTypeName() { return "string"; } public boolean isCachable() { return true; } public Object getValue(ValueFields valueFields) { return valueFields.getTextValue(); } public void setValue(Object value, ValueFields valueFields) { valueFields.setTextValue((String) value); } public boolean isAbleToStore(Object value) { if (value==null) { return true; } if (String.class.isAssignableFrom(value.getClass())) { String stringValue = (String) value; return stringValue.length() <= maxLength; } return false; } }
[ "wang2009long@126.com" ]
wang2009long@126.com
0b2fff1c9049b89238c2162835ff4896dc82677c
0deb0a9a5d627365179e8e6eb560b8ce5eb4462e
/java/src/main/java/com/yourtion/leetcode/daily/m10/d19/Solution.java
3685cc2efe52e74fb5fd72b98523be576bf2ef81
[ "MIT" ]
permissive
yourtion/LeetCode
511bdd344b2d5a6a436ae0a6c0458c73205d54da
61ee9fb1f97274e1621f8415dcdd8c7e424d20b3
refs/heads/master
2021-08-16T21:50:13.852242
2021-07-09T01:58:46
2021-07-09T01:58:46
231,171,224
0
0
null
null
null
null
UTF-8
Java
false
false
701
java
package com.yourtion.leetcode.daily.m10.d19; /** * 844. 比较含退格的字符串 * * @author Yourtion * @link https://leetcode-cn.com/problems/backspace-string-compare/ */ public class Solution { private String backspace(String str) { char[] arr = str.toCharArray(); int index = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] == '#') { index = index > 1 ? index - 1 : 0; } else { arr[index++] = arr[i]; } } return new String(arr).substring(0, index); } public boolean backspaceCompare(String S, String T) { return backspace(S).equals(backspace(T)); } }
[ "yourtion@gmail.com" ]
yourtion@gmail.com
8134951188f70f1d4e6bfe11b55b4d67326c761a
9e2ad679772c5efbfc8950d72a8de5d598b5408b
/src/main/java/net/mcreator/shadowwolf_mod_one/MCreatorInsanityLeggings.java
6253eea3b29ce90014df85790356c3678c7f3e84
[]
no_license
wiisoup/Insanity-Dimension
f1ffa3a21bf9a41f42815ee67c8ae5f714047d4c
05621a5664679638708918db037c32b44d18b7f7
refs/heads/master
2020-06-28T06:19:08.576893
2019-08-02T06:01:49
2019-08-02T06:01:49
200,161,681
1
0
null
null
null
null
UTF-8
Java
false
false
209
java
package net.mcreator.shadowwolf_mod_one; public class MCreatorInsanityLeggings extends shadowwolf_mod_one.ModElement { public MCreatorInsanityLeggings(shadowwolf_mod_one instance) { super(instance); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
99ce38cfe0ebe61a6cc8f738fff67235b7810918
beffc6542dc4bf85946ceca7cca4a31ac230d376
/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/HttpHeaderInterceptorTests.java
2b8532f15a96a8f0b94aeb75a1588dbd8f6a475a
[ "Apache-2.0" ]
permissive
ZhouKaiDongGitHub/spring-boot-2.0.x
4395970b183eff7321748d4ad0155784aa94eaa6
3f443764747c4ee01085bed6381292fa44744a49
refs/heads/master
2023-01-07T07:27:51.067468
2020-09-13T07:13:04
2020-09-13T07:13:04
215,676,265
1
0
Apache-2.0
2022-12-27T14:52:46
2019-10-17T01:24:02
Java
UTF-8
Java
false
false
3,359
java
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.devtools.remote.client; import java.io.IOException; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.springframework.http.HttpRequest; import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.mock.web.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; /** * Tests for {@link HttpHeaderInterceptor}. * * @author Rob Winch * @since 1.3.0 */ public class HttpHeaderInterceptorTests { @Rule public ExpectedException thrown = ExpectedException.none(); private String name; private String value; private HttpHeaderInterceptor interceptor; private HttpRequest request; private byte[] body; @Mock private ClientHttpRequestExecution execution; @Mock private ClientHttpResponse response; private MockHttpServletRequest httpRequest; @Before public void setup() throws Exception { MockitoAnnotations.initMocks(this); this.body = new byte[] {}; this.httpRequest = new MockHttpServletRequest(); this.request = new ServletServerHttpRequest(this.httpRequest); this.name = "X-AUTH-TOKEN"; this.value = "secret"; given(this.execution.execute(this.request, this.body)).willReturn(this.response); this.interceptor = new HttpHeaderInterceptor(this.name, this.value); } @Test public void constructorNullHeaderName() { this.thrown.expect(IllegalArgumentException.class); this.thrown.expectMessage("Name must not be empty"); new HttpHeaderInterceptor(null, this.value); } @Test public void constructorEmptyHeaderName() { this.thrown.expect(IllegalArgumentException.class); this.thrown.expectMessage("Name must not be empty"); new HttpHeaderInterceptor("", this.value); } @Test public void constructorNullHeaderValue() { this.thrown.expect(IllegalArgumentException.class); this.thrown.expectMessage("Value must not be empty"); new HttpHeaderInterceptor(this.name, null); } @Test public void constructorEmptyHeaderValue() { this.thrown.expect(IllegalArgumentException.class); this.thrown.expectMessage("Value must not be empty"); new HttpHeaderInterceptor(this.name, ""); } @Test public void intercept() throws IOException { ClientHttpResponse result = this.interceptor.intercept(this.request, this.body, this.execution); assertThat(this.request.getHeaders().getFirst(this.name)).isEqualTo(this.value); assertThat(result).isEqualTo(this.response); } }
[ "Kaidong.Zhou@eisgroup.com" ]
Kaidong.Zhou@eisgroup.com
2617998a71f9d0881146bfa452a7abb5a589738b
af0c4995d4bf5f76a6ca283fc55dfdca4e52ca3a
/program/src/main/java/com/whaley/biz/program/uiview/VisibleSwitcher.java
7ba9b9232ee16849773fb3b09e3273f8bb6ef05a
[]
no_license
portal-io/portal-android
da60c4a7d54fb56fbc983c635bb1d2c4d542f78e
623757fbb4d7979745b4c8ee34cebbf395cbd249
refs/heads/master
2020-03-20T07:58:08.196164
2019-03-16T02:30:48
2019-03-16T02:30:48
137,295,692
1
0
null
null
null
null
UTF-8
Java
false
false
163
java
package com.whaley.biz.program.uiview; /** * Author: qxw * Date: 2017/3/31 */ public interface VisibleSwitcher { void changeVisible(boolean isVisible); }
[ "lizs@snailvr.com" ]
lizs@snailvr.com
8bf80d2a0658c80b5d596d1b8150745bffc472bc
75cf6a9fd035883b64ca2309382e0178cf370b43
/Engineering/boards/contiki/emma-node/contiki/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspBreakpoint.java
79d72aaf08df75e4c8cd95dd3bf96de12e505c1f
[ "BSD-3-Clause" ]
permissive
ygtfrdes/Program
171b95b9f32a105185a7bf8ec6c8c1ca9d1eda9d
1c1e30230f0df50733b160ca73510c41d777edb9
refs/heads/master
2022-10-08T13:13:17.861152
2019-11-06T04:53:27
2019-11-06T04:53:27
219,560,170
1
2
null
2022-09-30T19:51:17
2019-11-04T17:39:52
HTML
UTF-8
Java
false
false
2,846
java
/* * Copyright (c) 2012, Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ package se.sics.cooja.mspmote.plugins; import java.io.File; import org.apache.log4j.Logger; import se.sics.cooja.Watchpoint; import se.sics.cooja.mspmote.MspMote; import se.sics.mspsim.core.Memory; import se.sics.mspsim.core.MemoryMonitor; /** * Mspsim watchpoint. * * @author Fredrik Osterlind */ public class MspBreakpoint extends Watchpoint<MspMote> { private static Logger logger = Logger.getLogger(MspBreakpoint.class); private MemoryMonitor memoryMonitor = null; public MspBreakpoint(MspMote mote) { super(mote); /* expects setConfigXML(..) */ } public MspBreakpoint(MspMote mote, Integer address, File codeFile, Integer lineNr) { super(mote, address, codeFile, lineNr); } public void registerBreakpoint() { memoryMonitor = new MemoryMonitor.Adapter() { public void notifyReadBefore(int addr, Memory.AccessMode mode, Memory.AccessType type) { if (type != Memory.AccessType.EXECUTE) { return; } getMote().signalBreakpointTrigger(MspBreakpoint.this); } }; getMote().getCPU().addWatchPoint(getExecutableAddress(), memoryMonitor); } public void unregisterBreakpoint() { getMote().getCPU().removeWatchPoint(getExecutableAddress(), memoryMonitor); } }
[ "githubfortyuds@gmail.com" ]
githubfortyuds@gmail.com
5cc5e0c0dc68655117dd9525f2006955c7ee229f
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/github/pagehelper/test/basic/TestLike.java
69fac6ffbd27b3625e1abb604eaa61b59adfb071
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
3,427
java
/** * The MIT License (MIT) * * Copyright (c) 2014-2017 abel533@gmail.com * * 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.github.pagehelper.test.basic; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.mapper.CountryMapper; import com.github.pagehelper.model.Country; import com.github.pagehelper.util.MybatisHelper; import java.util.List; import org.apache.ibatis.session.SqlSession; import org.junit.Assert; import org.junit.Test; public class TestLike { /** * ??Mapper????????PageHelper.startPage??????????Mapper???? */ @Test public void testMapperWithStartPage() { SqlSession sqlSession = MybatisHelper.getSqlSession(); CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class); try { // ???1??10??????????count PageHelper.startPage(1, 10); Country country = new Country(); country.setCountryname("c"); List<Country> list = countryMapper.selectLike(country); Assert.assertEquals(30, list.get(0).getId()); Assert.assertEquals(10, list.size()); Assert.assertEquals(39, ((Page<?>) (list)).getTotal()); // ???1??10??????????count PageHelper.startPage(4, 10); list = countryMapper.selectLike(country); Assert.assertEquals(130, list.get(0).getId()); Assert.assertEquals(9, list.size()); Assert.assertEquals(39, ((Page<?>) (list)).getTotal()); } finally { sqlSession.close(); } } /** * ??Mapper????????PageHelper.startPage??????????Mapper???? */ @Test public void testMapperWithStartPage_OrderBy() { SqlSession sqlSession = MybatisHelper.getSqlSession(); CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class); try { // ???1??10??????????count PageHelper.orderBy("id desc"); Country country = new Country(); country.setCountryname("c"); List<Country> list = countryMapper.selectLike(country); Assert.assertEquals(174, list.get(0).getId()); Assert.assertEquals(39, list.size()); Assert.assertEquals(39, ((Page<?>) (list)).getTotal()); } finally { sqlSession.close(); } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
18189d6ed929d0ca24564e274d553cb273d75a09
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/g/c/ac.java
b0359b8062d7e687376d444b28e72ce624354838
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
7,612
java
package com.tencent.mm.g.c; import android.content.ContentValues; import android.database.Cursor; import com.tencent.mm.sdk.e.c; import com.tencent.mm.sdk.platformtools.u; import com.tencent.mm.sdk.platformtools.x; public abstract class ac extends c { public static final String[] ciG = new String[0]; private static final int ciO = "msgId".hashCode(); private static final int ciP = "rowid".hashCode(); private static final int ciV; private static final int ckb; private static final int cke; private static final int ckj; private static final int cpS = "msgSvrId".hashCode(); private static final int cpT; private static final int cpU; private static final int cpV; private static final int cpW; private static final int cpX; private static final int cpY; private static final int cpZ; private boolean ciK = true; private boolean ciS = true; private boolean cjF = true; private boolean cjI = true; private boolean cjN = true; private boolean cpK = true; private boolean cpL = true; private boolean cpM = true; private boolean cpN = true; private boolean cpO = true; private boolean cpP = true; private boolean cpQ = true; private boolean cpR = true; private int cqa; private String cqb; public String field_content; public long field_createTime; public int field_hasShow; public String field_imgPath; public boolean field_isExpand; public byte[] field_lvbuffer; public long field_msgId; public long field_msgSvrId; public long field_orderFlag; public int field_status; public String field_talker; public int field_talkerId; public int field_type; static { cke = "type".hashCode(); ciV = "status".hashCode(); ckb = "createTime".hashCode(); cpT = "talker".hashCode(); ckj = "content".hashCode(); cpU = "imgPath".hashCode(); cpV = "lvbuffer".hashCode(); cpW = "talkerId".hashCode(); cpX = "isExpand".hashCode(); cpY = "orderFlag".hashCode(); cpZ = "hasShow".hashCode(); } public final void d(Cursor paramCursor) { String[] arrayOfString = paramCursor.getColumnNames(); if (arrayOfString == null) {} do { for (;;) { return; int j = arrayOfString.length; int i = 0; if (i < j) { int k = arrayOfString[i].hashCode(); if (ciO == k) { this.field_msgId = paramCursor.getLong(i); this.ciK = true; } for (;;) { i += 1; break; if (cpS == k) { this.field_msgSvrId = paramCursor.getLong(i); } else if (cke == k) { this.field_type = paramCursor.getInt(i); } else if (ciV == k) { this.field_status = paramCursor.getInt(i); } else if (ckb == k) { this.field_createTime = paramCursor.getLong(i); } else if (cpT == k) { this.field_talker = paramCursor.getString(i); } else if (ckj == k) { this.field_content = paramCursor.getString(i); } else if (cpU == k) { this.field_imgPath = paramCursor.getString(i); } else if (cpV == k) { this.field_lvbuffer = paramCursor.getBlob(i); } else if (cpW == k) { this.field_talkerId = paramCursor.getInt(i); } else { if (cpX == k) { if (paramCursor.getInt(i) != 0) {} for (boolean bool = true;; bool = false) { this.field_isExpand = bool; break; } } if (cpY == k) { this.field_orderFlag = paramCursor.getLong(i); } else if (cpZ == k) { this.field_hasShow = paramCursor.getInt(i); } else if (ciP == k) { this.sKx = paramCursor.getLong(i); } } } } try { if ((this.field_lvbuffer != null) && (this.field_lvbuffer.length != 0)) { paramCursor = new u(); i = paramCursor.by(this.field_lvbuffer); if (i != 0) { x.e("MicroMsg.SDK.BaseBizTimeLineInfo", "parse LVBuffer error:" + i); return; } } } catch (Exception paramCursor) { x.e("MicroMsg.SDK.BaseBizTimeLineInfo", "get value failed"); return; } } if (!paramCursor.chD()) { this.cqa = paramCursor.getInt(); } } while (paramCursor.chD()); this.cqb = paramCursor.getString(); } public final void dt(String paramString) { this.cqb = paramString; this.cpN = true; } public final void eC(int paramInt) { this.cqa = paramInt; this.cpN = true; } public final ContentValues wH() { try { if (this.cpN) { localObject = new u(); ((u)localObject).chE(); ((u)localObject).CZ(this.cqa); ((u)localObject).Wj(this.cqb); this.field_lvbuffer = ((u)localObject).chF(); } Object localObject = new ContentValues(); if (this.ciK) { ((ContentValues)localObject).put("msgId", Long.valueOf(this.field_msgId)); } if (this.cpK) { ((ContentValues)localObject).put("msgSvrId", Long.valueOf(this.field_msgSvrId)); } if (this.cjI) { ((ContentValues)localObject).put("type", Integer.valueOf(this.field_type)); } if (this.ciS) { ((ContentValues)localObject).put("status", Integer.valueOf(this.field_status)); } if (this.cjF) { ((ContentValues)localObject).put("createTime", Long.valueOf(this.field_createTime)); } if (this.cpL) { ((ContentValues)localObject).put("talker", this.field_talker); } if (this.field_content == null) { this.field_content = ""; } if (this.cjN) { ((ContentValues)localObject).put("content", this.field_content); } if (this.cpM) { ((ContentValues)localObject).put("imgPath", this.field_imgPath); } if (this.cpN) { ((ContentValues)localObject).put("lvbuffer", this.field_lvbuffer); } if (this.cpO) { ((ContentValues)localObject).put("talkerId", Integer.valueOf(this.field_talkerId)); } if (this.cpP) { ((ContentValues)localObject).put("isExpand", Boolean.valueOf(this.field_isExpand)); } if (this.cpQ) { ((ContentValues)localObject).put("orderFlag", Long.valueOf(this.field_orderFlag)); } if (this.cpR) { ((ContentValues)localObject).put("hasShow", Integer.valueOf(this.field_hasShow)); } if (this.sKx > 0L) { ((ContentValues)localObject).put("rowid", Long.valueOf(this.sKx)); } return (ContentValues)localObject; } catch (Exception localException) { for (;;) { x.e("MicroMsg.SDK.BaseBizTimeLineInfo", "get value failed, %s", new Object[] { localException.getMessage() }); } } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes2-dex2jar.jar!/com/tencent/mm/g/c/ac.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
15d14448face5d31a7d1ff4f15839b2b16537c0b
f37a6564e1642c79926be69c7fee13f43b4df76a
/halcon/capa-halcon-portlet/WEB-INF/service/com/ext/portlet/halcon/dto/PromocionResponseBean.java
9d9b380860be327c71d0bcc12370920d389bdbb1
[]
no_license
mshelzr/portlets-business
edc75e3bd5afbf7f51d9df58799bdd4ad4b7be36
9cf59a531524d8cafeb415bc6f711db5c4304aae
refs/heads/master
2021-01-01T06:32:43.719845
2014-09-10T06:04:23
2014-09-10T06:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package com.ext.portlet.halcon.dto; public class PromocionResponseBean { private String codigoPromocion; public String getCodigoPromocion() { return codigoPromocion; } public void setCodigoPromocion(String codigoPromocion) { this.codigoPromocion = codigoPromocion; } @Override public String toString() { return getCodigoPromocion(); } }
[ "mshelzr@gmail.com" ]
mshelzr@gmail.com
e7f357440475471170b415ed82a20306a93adb47
3657b6f5b30ac061e2ab1db7cd745e2ca8183af3
/homeProject/src/com/house/home/web/controller/basic/IntSplPerfPerController.java
9a141677687daa77dd13e27949880c2bb73cf4cb
[]
no_license
Lxt000806/eclipse_workspace
b25f4f81bd0aa6f8d55fc834dd09cdb473af1f3f
04376681ec91c3f8dbde2908d35612c4842a868c
refs/heads/main
2023-05-23T12:05:26.989438
2021-06-13T05:49:26
2021-06-13T05:49:26
376,452,726
0
0
null
null
null
null
UTF-8
Java
false
false
7,244
java
package com.house.home.web.controller.basic; import java.util.Date; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.house.framework.commons.orm.Page; import com.house.framework.bean.WebPage; import com.house.framework.commons.utils.DateUtil; import com.house.framework.commons.utils.IdUtil; import com.house.framework.commons.utils.ServletUtils; import com.house.framework.web.controller.BaseController; import com.house.home.entity.basic.IntSplPerfPer; import com.house.home.entity.insales.Supplier; import com.house.home.service.basic.IntSplPerfPerService; @Controller @RequestMapping("/admin/intSplPerfPer") public class IntSplPerfPerController extends BaseController { private static final Logger logger = LoggerFactory.getLogger(IntSplPerfPerController.class); @Autowired private IntSplPerfPerService intSplPerfPerService; /** * 查询JqGrid表格数据 * @param request * @param response * @return * @throws Exception */ @RequestMapping("/goJqGrid") @ResponseBody public WebPage<Map<String,Object>> goJqGrid(HttpServletRequest request, HttpServletResponse response, IntSplPerfPer intSplPerfPer) throws Exception { Page<Map<String,Object>> page = this.newPageForJqGrid(request); intSplPerfPerService.findPageBySql(page, intSplPerfPer); return new WebPage<Map<String,Object>>(page); } /** * IntSplPerfPer列表 * * @param request * @param response * @return * @throws Exception */ @RequestMapping("/goList") public ModelAndView goList(HttpServletRequest request, HttpServletResponse response) throws Exception { return new ModelAndView("admin/basic/intSplPerfPer/intSplPerfPer_list"); } /** * IntSplPerfPer查询code * * @param request * @param response * @return * @throws Exception */ @RequestMapping("/goCode") public ModelAndView goCode(HttpServletRequest request, HttpServletResponse response) throws Exception { return new ModelAndView("admin/basic/intSplPerfPer/intSplPerfPer_code"); } /** * 跳转到新增IntSplPerfPer页面 * @return */ @RequestMapping("/goSave") public ModelAndView goSave(HttpServletRequest request, HttpServletResponse response, String id){ logger.debug("跳转到新增IntSplPerfPer页面"); IntSplPerfPer intSplPerfPer = null; if (StringUtils.isNotBlank(id)){ intSplPerfPer = intSplPerfPerService.get(IntSplPerfPer.class, Integer.parseInt(id)); intSplPerfPer.setPk(null); }else{ intSplPerfPer = new IntSplPerfPer(); } return new ModelAndView("admin/basic/intSplPerfPer/intSplPerfPer_save") .addObject("intSplPerfPer", intSplPerfPer); } /** * 跳转到修改IntSplPerfPer页面 * @return */ @RequestMapping("/goUpdate") public ModelAndView goUpdate(HttpServletRequest request, HttpServletResponse response, String id){ logger.debug("跳转到修改IntSplPerfPer页面"); IntSplPerfPer intSplPerfPer = null; if (StringUtils.isNotBlank(id)){ intSplPerfPer = intSplPerfPerService.get(IntSplPerfPer.class, Integer.parseInt(id)); }else{ intSplPerfPer = new IntSplPerfPer(); } Supplier supplier=intSplPerfPerService.get(Supplier.class,intSplPerfPer.getSupplCode()); intSplPerfPer.setSupplDescr(supplier.getDescr()); return new ModelAndView("admin/basic/intSplPerfPer/intSplPerfPer_update") .addObject("intSplPerfPer", intSplPerfPer); } /** * 跳转到查看IntSplPerfPer页面 * @return */ @RequestMapping("/goView") public ModelAndView goView(HttpServletRequest request, HttpServletResponse response, String id){ logger.debug("跳转到查看IntSplPerfPer页面"); IntSplPerfPer intSplPerfPer = intSplPerfPerService.get(IntSplPerfPer.class, Integer.parseInt(id)); intSplPerfPer.setM_umState("V"); Supplier supplier=intSplPerfPerService.get(Supplier.class,intSplPerfPer.getSupplCode()); intSplPerfPer.setSupplDescr(supplier.getDescr()); return new ModelAndView("admin/basic/intSplPerfPer/intSplPerfPer_update") .addObject("intSplPerfPer", intSplPerfPer); } /** * 添加IntSplPerfPer * @param request * @param response * @param role */ @RequestMapping("/doSave") public void doSave(HttpServletRequest request, HttpServletResponse response, IntSplPerfPer intSplPerfPer){ logger.debug("添加IntSplPerfPer开始"); try{ intSplPerfPer.setExpired("F"); intSplPerfPer.setActionLog("ADD"); intSplPerfPer.setLastUpdate(new Date()); intSplPerfPer.setLastUpdatedBy(getUserContext(request).getCzybh()); this.intSplPerfPerService.save(intSplPerfPer); ServletUtils.outPrintSuccess(request, response); }catch(Exception e){ ServletUtils.outPrintFail(request, response, "供应商重复!"); } } /** * 修改IntSplPerfPer * @param request * @param response * @param role */ @RequestMapping("/doUpdate") public void doUpdate(HttpServletRequest request, HttpServletResponse response, IntSplPerfPer intSplPerfPer){ logger.debug("修改IntSplPerfPer开始"); try{ intSplPerfPer.setActionLog("EDIT"); intSplPerfPer.setLastUpdate(new Date()); intSplPerfPer.setLastUpdatedBy(getUserContext(request).getCzybh()); this.intSplPerfPerService.update(intSplPerfPer); ServletUtils.outPrintSuccess(request, response); }catch(Exception e){ ServletUtils.outPrintFail(request, response, "供应商重复!"); } } /** * 删除IntSplPerfPer * @param request * @param response * @param roleId */ @RequestMapping("/doDelete") public void doDelete(HttpServletRequest request, HttpServletResponse response, String deleteIds){ logger.debug("删除IntSplPerfPer开始"); if(StringUtils.isBlank(deleteIds)){ ServletUtils.outPrintFail(request, response, "IntSplPerfPer编号不能为空,删除失败"); return; } List<String> deleteIdList = IdUtil.splitStringIds(deleteIds); for(String deleteId : deleteIdList){ if(deleteId != null){ IntSplPerfPer intSplPerfPer = intSplPerfPerService.get(IntSplPerfPer.class, Integer.parseInt(deleteId)); if(intSplPerfPer == null) continue; intSplPerfPerService.delete(intSplPerfPer); } } logger.debug("删除IntSplPerfPer IDS={} 完成",deleteIdList); ServletUtils.outPrintSuccess(request, response,"删除成功"); } /** *IntSplPerfPer导出Excel * @param request * @param response */ @RequestMapping("/doExcel") public void doExcel(HttpServletRequest request, HttpServletResponse response, IntSplPerfPer intSplPerfPer){ Page<Map<String,Object>> page = this.newPage(request); page.setPageSize(-1); intSplPerfPerService.findPageBySql(page, intSplPerfPer); getExcelList(request); ServletUtils.flushExcelOutputStream(request, response, page.getResult(), "IntSplPerfPer_"+DateUtil.DateToString(new Date(),"yyyyMMdd"), columnList, titleList, sumList); } }
[ "1728490992@qq.com" ]
1728490992@qq.com
ffb2708eca0a30d058925eb68ca8942259a6df2f
c2c76ab26a251bf7edd1b2b8e85788d7c8c2bba0
/ssm_domain/src/main/java/com/pei/domain/User.java
e2a5a140f1497a84807b1cbfe10afa4cf9d1026d
[]
no_license
hoshiseiya/ssmproject
b74a7f7d3143f24849d54bc630f561b00548b39a
a1743ca1346022f1eab1bc117f0937aeea4a5aeb
refs/heads/master
2023-05-11T13:15:30.963605
2021-05-24T07:59:06
2021-05-24T07:59:06
367,775,088
0
0
null
null
null
null
UTF-8
Java
false
false
2,353
java
package com.pei.domain; public class User { private String id; private String loginAct; private String name; private String loginPwd; private String email; private String expireTime; private String lockState; private String deptNo; private String allowIps; private String createTime; private String createBy; private String editTime; private String editBy; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getLoginAct() { return loginAct; } public void setLoginAct(String loginAct) { this.loginAct = loginAct; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLoginPwd() { return loginPwd; } public void setLoginPwd(String loginPwd) { this.loginPwd = loginPwd; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getExpireTime() { return expireTime; } public void setExpireTime(String expireTime) { this.expireTime = expireTime; } public String getLockState() { return lockState; } public void setLockState(String lockState) { this.lockState = lockState; } public String getDeptNo() { return deptNo; } public void setDeptNo(String deptNo) { this.deptNo = deptNo; } public String getAllowIps() { return allowIps; } public void setAllowIps(String allowIps) { this.allowIps = allowIps; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public String getCreateBy() { return createBy; } public void setCreateBy(String createBy) { this.createBy = createBy; } public String getEditTime() { return editTime; } public void setEditTime(String editTime) { this.editTime = editTime; } public String getEditBy() { return editBy; } public void setEditBy(String editBy) { this.editBy = editBy; } }
[ "zhangsan@163.com" ]
zhangsan@163.com
3bac30821c47f1d1a30b8f43b4c1228ff4417763
6c69998676e9df8be55e28f6d63942b9f7cef913
/src/com/insigma/siis/local/pagemodel/comm/PSQueryPageModel.java
06f3df9b74f58a4891c933e4d3a9e9179ffa2d3c
[]
no_license
HuangHL92/ZHGBSYS
9dea4de5931edf5c93a6fbcf6a4655c020395554
f2ff875eddd569dca52930d09ebc22c4dcb47baf
refs/heads/master
2023-08-04T04:37:08.995446
2021-09-15T07:35:53
2021-09-15T07:35:53
406,219,162
0
0
null
null
null
null
GB18030
Java
false
false
5,491
java
package com.insigma.siis.local.pagemodel.comm; import java.util.HashMap; import java.util.List; import com.insigma.odin.framework.AppException; import com.insigma.odin.framework.comm.query.PageQueryData; import com.insigma.odin.framework.radow.PageModel; import com.insigma.odin.framework.radow.PageModelEngine; import com.insigma.odin.framework.radow.RadowException; import com.insigma.odin.framework.radow.annotation.EventDataRange; import com.insigma.odin.framework.radow.annotation.PageEvent; import com.insigma.odin.framework.radow.element.ElementType; import com.insigma.odin.framework.radow.element.PageElement; import com.insigma.odin.framework.radow.event.EventRtnType; import com.insigma.odin.framework.radow.util.ObjectUtil; import com.insigma.odin.framework.radow.util.PmHListUtil; import com.insigma.odin.framework.radow.util.SpellUtil; public class PSQueryPageModel extends PageModel { /** * 最小搜索字符长度 */ private final static int MIN_SEARCH_LEN = 6; /** * 中文最小搜索字符长度 */ private final static int MIN_SEARCH_LEN_CN = 2; /** * 查询的sql */ private final static String sql = "select aaz157,aaz001,aae135,aac003,aac004,eac001,eac070,aac008,aab004,aab001,aab001 cpquery,aac001,aab301,aab023,eab014" + " from sbdv_ac20 a " + " where 1=1 /*1*/ "; /** * 初始化界面(init事件使用) * * @throws AppException */ @Override public int doInit() throws RadowException { String searchText = this.getRadow_parent_data(); if (SpellUtil.existsChinese(searchText)) { // 存在中文字符的情况下,按照人员姓名进行查询 // div_1.set("aac003_a", searchText); this.getPageElement("div_1.aac003_a").setValue(searchText); }else if (searchText.length() <= 8) { //div_1.set("eac001_a", searchText); this.getPageElement("div_1.eac001_a").setValue(searchText); } else { //div_1.set("aae135_a", upaae135(searchText)); this.getPageElement("div_1.aae135_a").setValue(searchText); } this.setNextEventName("div_2.dogridquery"); return EventRtnType.NORMAL_SUCCESS; } @PageEvent("div_2.dogridquery") @EventDataRange("div_1") public int div2dogridquery(int start,int limit) throws RadowException { StringBuffer sqlbuff = new StringBuffer(sql); String searchText = null; if((searchText=getPageElement("div_1.aac003_a").getValue())==null || searchText.trim().length()==0 ){ if((searchText=getPageElement("div_1.eac001_a").getValue())==null || searchText.trim().length()==0 ){ if((searchText=getPageElement("div_1.aae135_a").getValue())==null || searchText.trim().length()==0 ) { searchText = ""; } } } if (searchText.length() == 0) { this.setMainMessage("未输入搜索字符"); this.isShowMsg = true; return EventRtnType.FAILD; } boolean existsChinese = SpellUtil.existsChinese(searchText); // 如果小于最小搜索长度,则直接出错 if (existsChinese && searchText.length() < MIN_SEARCH_LEN_CN) { this.setMainMessage("搜索字符串(中文)不能少于" + MIN_SEARCH_LEN_CN + "位!"); this.isShowMsg = true; return EventRtnType.FAILD; } else if (!existsChinese && searchText.length() < MIN_SEARCH_LEN) { this.setMainMessage("搜索字符串(非中文)不能少于" + MIN_SEARCH_LEN + "位!"); this.isShowMsg = true; return EventRtnType.FAILD; } // 判断是否存在中文字符 if (existsChinese) { // 存在中文字符的情况下,按照人员姓名进行查询 sqlbuff.append(" and a.aac003 like '%"+searchText+"%' "); } else { // 宁波 // 不存在中文字符的情况下,再分两种情况进行查询 // 在长度小于等于8的情况下,按个人编码搜索 // 在长度大于8位的情况下,按身份证号查询 if (searchText.length() <= 8) { sqlbuff.append(" and a.eac001 like '%"+searchText+"%'"); } else { sqlbuff.append(" and a.aae135 like '%"+searchText+"%'"); } } PageQueryData pqd = PmHListUtil.pageQuery(this, sqlbuff.toString(), "sql", start, limit); if(pqd.getTotalCount()==1) { this.closeCueWindow("psqueryWindow"); } return EventRtnType.SPE_SUCCESS; } @PageEvent("div_2.rowdbclick") public int div2dbonclick() throws RadowException { PageElement pe = getPageElement("div_2"); this.closeCueWindow("psqueryWindow"); createPageElement("aac004", ElementType.SELECT, true).setValue(pe.getStringValue("aac004")); createPageElement("aac003", ElementType.TEXT, true).setValue(pe.getStringValue("aac003")); createPageElement("aac006", ElementType.DATE, true).setValue(pe.getStringValue("aac006")); createPageElement("aac010", ElementType.TEXT, true).setValue(pe.getStringValue("aac010")); createPageElement("aae004", ElementType.TEXT, true).setValue(pe.getStringValue("aae004")); createPageElement("aae005", ElementType.TEXT, true).setValue(pe.getStringValue("aae005")); createPageElement("aae006", ElementType.TEXT, true).setValue(pe.getStringValue("aae006")); createPageElement("aae007", ElementType.TEXT, true).setValue(pe.getStringValue("aae007")); return EventRtnType.NORMAL_SUCCESS; } public static String upaae135(String aae135) { // 身份证加"19" if (aae135.length() >= 8 && aae135.length() <= 16 && !ObjectUtil.equals(aae135.substring(6, 8), "19")) { aae135 = aae135.substring(0, 6) + "19" + aae135.substring(6); } return aae135; } public static void main(String[] arg) { CommonQueryBS.systemOut(upaae135("330219780102")); } }
[ "351036848@qq.com" ]
351036848@qq.com
d799e39546fa1f82ba5200d9b812283f948fc31b
cca5f035dbbe018268b63a8ddd77b4ec8a9ac0c0
/src/test/java/com/amyliascarlet/jsontest/test/entity/pagemodel/LayoutInstance.java
3283236dcb1a07683f361e7bec422ac46a31536a
[ "Apache-2.0" ]
permissive
AmyliaScarlet/amyliascarletlib
45195dc277fa16ec7f9c71f20686acaaf2b84366
6bd7f69edae8d201e41c6ccfa231ce51fb0ffe16
refs/heads/master
2020-05-25T10:53:20.312058
2019-05-21T07:04:35
2019-05-21T07:04:35
187,766,221
0
2
null
null
null
null
UTF-8
Java
false
false
593
java
package com.amyliascarlet.jsontest.test.entity.pagemodel; import java.io.Serializable; import java.util.List; /** * TODO Comment of LayoutInstance * * @author jiajie.yujj @ 2010-11-29 ����09:53:44 */ public class LayoutInstance extends ComponentInstance implements Serializable { private static final long serialVersionUID = -3025232531863199667L; private List<RegionInstance> regions; public List<RegionInstance> getRegions() { return regions; } public void setRegions(List<RegionInstance> regions) { this.regions = regions; } }
[ "amy373978205@outlook.com" ]
amy373978205@outlook.com
3a37674f709c0187c09cd4b6f98a5d8c66a5764f
fd49852c3426acf214b390c33927b5a30aeb0e0a
/aosp/javalib/android/bluetooth/OobData.java
3bc6fc11147cbc3b4f894cbf2c69afdb95e0c265
[]
no_license
HanChangHun/MobilePlus-Prototype
fb72a49d4caa04bce6edb4bc060123c238a6a94e
3047c44a0a2859bf597870b9bf295cf321358de7
refs/heads/main
2023-06-10T19:51:23.186241
2021-06-26T08:28:58
2021-06-26T08:28:58
333,411,414
0
0
null
null
null
null
UTF-8
Java
false
false
2,442
java
package android.bluetooth; import android.os.Parcel; import android.os.Parcelable; public class OobData implements Parcelable { public static final Parcelable.Creator<OobData> CREATOR = new Parcelable.Creator<OobData>() { public OobData createFromParcel(Parcel param1Parcel) { return new OobData(param1Parcel); } public OobData[] newArray(int param1Int) { return new OobData[param1Int]; } }; private byte[] mLeBluetoothDeviceAddress; private byte[] mLeSecureConnectionsConfirmation; private byte[] mLeSecureConnectionsRandom; private byte[] mSecurityManagerTk; public OobData() {} private OobData(Parcel paramParcel) { this.mLeBluetoothDeviceAddress = paramParcel.createByteArray(); this.mSecurityManagerTk = paramParcel.createByteArray(); this.mLeSecureConnectionsConfirmation = paramParcel.createByteArray(); this.mLeSecureConnectionsRandom = paramParcel.createByteArray(); } public int describeContents() { return 0; } public byte[] getLeBluetoothDeviceAddress() { return this.mLeBluetoothDeviceAddress; } public byte[] getLeSecureConnectionsConfirmation() { return this.mLeSecureConnectionsConfirmation; } public byte[] getLeSecureConnectionsRandom() { return this.mLeSecureConnectionsRandom; } public byte[] getSecurityManagerTk() { return this.mSecurityManagerTk; } public void setLeBluetoothDeviceAddress(byte[] paramArrayOfbyte) { this.mLeBluetoothDeviceAddress = paramArrayOfbyte; } public void setLeSecureConnectionsConfirmation(byte[] paramArrayOfbyte) { this.mLeSecureConnectionsConfirmation = paramArrayOfbyte; } public void setLeSecureConnectionsRandom(byte[] paramArrayOfbyte) { this.mLeSecureConnectionsRandom = paramArrayOfbyte; } public void setSecurityManagerTk(byte[] paramArrayOfbyte) { this.mSecurityManagerTk = paramArrayOfbyte; } public void writeToParcel(Parcel paramParcel, int paramInt) { paramParcel.writeByteArray(this.mLeBluetoothDeviceAddress); paramParcel.writeByteArray(this.mSecurityManagerTk); paramParcel.writeByteArray(this.mLeSecureConnectionsConfirmation); paramParcel.writeByteArray(this.mLeSecureConnectionsRandom); } } /* Location: /home/chun/Desktop/temp/!/android/bluetooth/OobData.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "ehwjs1914@naver.com" ]
ehwjs1914@naver.com
273c022690e46e0e7122f93e9c1a8eb741ef8be9
d27d2702777920031577cefeb49fe94719e98113
/Exams/july23rd/GroupName.java
db3f9cbf2dd6da2f518ba2a0659616226abc7b92
[ "MIT" ]
permissive
Taewii/programming-basics
54905e64044d8d88bba964f1d8b1b2e1583cfe96
418144e1067cf87928ecaf298576fee9dfca30ed
refs/heads/master
2020-03-15T07:15:29.205227
2018-05-03T17:05:21
2018-05-03T17:05:21
132,025,411
0
0
null
null
null
null
UTF-8
Java
false
false
1,328
java
package july23rd; import java.util.Scanner; public class GroupName { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String bigLetter = scanner.nextLine(); String smallLetter1 = scanner.nextLine(); String smallLetter2 = scanner.nextLine(); String smallLetter3 = scanner.nextLine(); String number = scanner.nextLine(); int counter = 0; String AllinOne = bigLetter + smallLetter1 + smallLetter2 + smallLetter3 + number; char bigL = AllinOne.charAt(0); char sml1 = AllinOne.charAt(1); char sml2 = AllinOne.charAt(2); char sml3 = AllinOne.charAt(3); char num = AllinOne.charAt(4); for (char i = 'A'; i <= bigL; i++) { for (char j = 'a'; j <= sml1; j++) { for (char k = 'a'; k <= sml2; k++) { for (char l = 'a'; l <= sml3; l++) { for (char m = '0'; m <= num; m++) { if (i == bigL && j == sml1 && k == sml2 && l == sml3 && m == num) { break; } counter++; } } } } } System.out.println(counter); } }
[ "p3rfec7@abv.bg" ]
p3rfec7@abv.bg
51fc03bee508a46d66d04475aadbce31fee007d7
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/refactoring/changeSignature/ParamJavadoc0.java
4ef84282282b5ae1e38c68d83e0c161e51c58784
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
270
java
class X { /** * Has a method called {@link #mymethod(int, int)}. */ public class TestRefactorLink { /** @return nothing @param y yparam @param z zparam */ public void <caret>mymethod(int y, int z) { } } }
[ "Anna.Kozlova@jetbrains.com" ]
Anna.Kozlova@jetbrains.com
7a58fb2d983335340014e96920ec83feb36331c2
a70fc721c7e318a0a5a2cc5679f0c82cc52bdde7
/src/main/java/gov/utah/dts/det/ccl/view/converter/EnumConverter.java
6a91349784faf70c8b5bd00ee4075c0d56e1f0cc
[]
no_license
hung118/dhsLicensing
6ca5462548bcf8b5a396cf121f668024983455e8
ab3a75ae0d32f16a1deaa7c8d869ce239f2dcbf4
refs/heads/master
2021-01-20T08:06:31.916109
2017-05-03T02:08:02
2017-05-03T02:08:02
90,094,300
0
0
null
null
null
null
UTF-8
Java
false
false
1,209
java
package gov.utah.dts.det.ccl.view.converter; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.apache.struts2.util.StrutsTypeConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings("unchecked") public class EnumConverter extends StrutsTypeConverter { private static final Logger logger = LoggerFactory.getLogger(EnumConverter.class); @Override public Object convertFromString(Map context, String[] values, Class toClass) { logger.debug("converting " + values[0] + " to an enum object"); if (StringUtils.isBlank(values[0])) { return null; } try { Method valueOfMethod = toClass.getMethod("valueOf", String.class); return valueOfMethod.invoke(null, values[0]); } catch (NoSuchMethodException nsme) { return null; } catch (InvocationTargetException ite) { return null; } catch (IllegalAccessException iae) { return null; } } @Override public String convertToString(Map context, Object o) { logger.debug("converting enum object to string"); if (o == null) { return null; } else { return o.toString(); } } }
[ "hung118@gmail.com" ]
hung118@gmail.com
1e1f849f07e5330c385613d110436e0f30f8274f
e3305fdb8e8e7501d47a9cb64ee3eb05a0975fa4
/src/main/java/com/eugene/worklogger/web/rest/vm/ManagedUserVM.java
7d80caa71a9778c6c019c4a08b326f7e223f13ba
[]
no_license
EugeneVanchugov/WL-UAA
cd24dcc294466aa48cd952ff03b13927903f1d9b
6531256d2b4733e837f6afd9667ecd45dc111192
refs/heads/master
2020-04-25T21:45:06.918545
2019-02-28T15:51:43
2019-02-28T15:51:43
173,089,688
0
0
null
null
null
null
UTF-8
Java
false
false
848
java
package com.eugene.worklogger.web.rest.vm; import com.eugene.worklogger.service.dto.UserDTO; import javax.validation.constraints.Size; /** * View Model extending the UserDTO, which is meant to be used in the user management UI. */ public class ManagedUserVM extends UserDTO { public static final int PASSWORD_MIN_LENGTH = 4; public static final int PASSWORD_MAX_LENGTH = 100; @Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH) private String password; public ManagedUserVM() { // Empty constructor needed for Jackson. } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return "ManagedUserVM{" + "} " + super.toString(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
9386a1cc763fdf517aef417be5bf7f89d7b03c53
e04eaf81f95cc8d894694f4976c992665036749e
/org.eclipse.gmt.emfacade.xtext/xtend-gen/org/eclipse/gmt/generator/EmfacadeGenerator.java
33266879dc6d0d1e54069c798bf725d9af7c3701
[]
no_license
hallvard/emfacade
d5fc3d669dfab100ffb2fb33e4315200b90417fe
c1f8b77be5200b233053606470290f61e49f5359
refs/heads/master
2020-05-17T11:36:37.711287
2011-11-14T08:36:57
2011-11-14T08:36:57
2,770,878
0
0
null
null
null
null
UTF-8
Java
false
false
2,956
java
package org.eclipse.gmt.generator; import com.google.inject.Inject; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.gmt.emfacade.EClassMapping; import org.eclipse.gmt.emfacade.EClassifierMapping; import org.eclipse.gmt.emfacade.EDataTypeMapping; import org.eclipse.gmt.emfacade.FacadeModel; import org.eclipse.gmt.generator.GenerateBinderFactory; import org.eclipse.gmt.generator.GenerateEClassMapping; import org.eclipse.xtext.generator.IFileSystemAccess; import org.eclipse.xtext.generator.IGenerator; import org.eclipse.xtext.xbase.lib.BooleanExtensions; import org.eclipse.xtext.xbase.lib.ComparableExtensions; @SuppressWarnings("all") public class EmfacadeGenerator implements IGenerator { @Inject private GenerateEClassMapping _generateEClassMapping; @Inject private GenerateBinderFactory _generateBinderFactory; public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { ResourceSet _resourceSet = resource.getResourceSet(); final ResourceSet resourceSet = _resourceSet; EList<EObject> _contents = resource.getContents(); final EList<EObject> contents = _contents; boolean _operator_and = false; int _size = contents.size(); boolean _operator_greaterThan = ComparableExtensions.<Integer>operator_greaterThan(((Integer)_size), ((Integer)0)); if (!_operator_greaterThan) { _operator_and = false; } else { EObject _get = contents.get(0); _operator_and = BooleanExtensions.operator_and(_operator_greaterThan, (_get instanceof FacadeModel)); } if (_operator_and) { EObject _get_1 = contents.get(0); this.generate(((FacadeModel) _get_1), fsa); } } public void generate(final FacadeModel facadeModel, final IFileSystemAccess fsa) { EList<EClassifierMapping> _classifierMappings = facadeModel.getClassifierMappings(); for (final EClassifierMapping eClassifierMapping : _classifierMappings) { final EClassifierMapping eClassifierMapping_1 = eClassifierMapping; boolean matched = false; if (!matched) { if (eClassifierMapping_1 instanceof EClassMapping) { final EClassMapping eClassifierMapping_2 = (EClassMapping) eClassifierMapping_1; matched=true; this._generateEClassMapping.generateEClassMapping(eClassifierMapping_2, fsa); } } if (!matched) { if (eClassifierMapping_1 instanceof EDataTypeMapping) { final EDataTypeMapping eClassifierMapping_3 = (EDataTypeMapping) eClassifierMapping_1; matched=true; this._generateEClassMapping.generateEDataTypeMapping(eClassifierMapping_3, fsa); } } } this._generateBinderFactory.generateBinderFactory(facadeModel, fsa); } }
[ "hal@idi.ntnu.no" ]
hal@idi.ntnu.no
5d1efd2be47ed69bf58235390aea3b15e69341b3
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE197_Numeric_Truncation_Error/s01/CWE197_Numeric_Truncation_Error__int_console_readLine_to_short_22b.java
669e1be78fb982b06a9af6386c7656494974100f
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
5,404
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE197_Numeric_Truncation_Error__int_console_readLine_to_short_22b.java Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml Template File: sources-sink-22b.tmpl.java */ /* * @description * CWE: 197 Numeric Truncation Error * BadSource: console_readLine Read data from the console using readLine * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: to_short * BadSink : Convert data to a short * Flow Variant: 22 Control flow: Flow controlled by value of a public static variable. Sink functions are in a separate file from sources. * * */ package testcases.CWE197_Numeric_Truncation_Error.s01; import testcasesupport.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.logging.Level; public class CWE197_Numeric_Truncation_Error__int_console_readLine_to_short_22b { public int badSource() throws Throwable { int data; if (CWE197_Numeric_Truncation_Error__int_console_readLine_to_short_22a.badPublicStatic) { data = Integer.MIN_VALUE; /* Initialize data */ { InputStreamReader readerInputStream = null; BufferedReader readerBuffered = null; /* read user input from console with readLine */ try { readerInputStream = new InputStreamReader(System.in, "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from the console using readLine */ 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 { 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); } } } /* NOTE: Tools may report a flaw here because readerBuffered and readerInputStream are not closed. Unfortunately, closing those will close System.in, which will cause any future attempts to read from the console to fail and throw an exception */ } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } return data; } /* goodG2B1() - use goodsource and badsink by setting the static variable to false instead of true */ public int goodG2B1Source() throws Throwable { int data; if (CWE197_Numeric_Truncation_Error__int_console_readLine_to_short_22a.goodG2B1PublicStatic) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } else { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } return data; } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the if in the sink function */ public int goodG2B2Source() throws Throwable { int data; if (CWE197_Numeric_Truncation_Error__int_console_readLine_to_short_22a.goodG2B2PublicStatic) { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } return data; } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
4ca8924f3a967468d8dec7f60a4a3e73c18f0588
110a6f62f631b7b88e52125fe7a70807ed9c5b95
/JAICore/jaicore-search/src/test/java/ai/libs/jaicore/search/algorithms/standard/lds/BestFirstLimitedDiscrepancySearchTester.java
368f38af5b7e5714bcef11a16354cc22fafd75a8
[]
no_license
alexanderwerning/AILibs
2fc24335397c23cb9a121306b9ff7953c2cd0249
a02f20b19d4eb1f77fcf7821551e6367fecfced9
refs/heads/dev
2020-04-27T08:43:39.498853
2019-09-08T20:32:29
2019-09-08T20:32:29
162,276,055
0
0
null
2018-12-18T11:12:17
2018-12-18T11:12:16
null
UTF-8
Java
false
false
873
java
package ai.libs.jaicore.search.algorithms.standard.lds; import ai.libs.jaicore.search.algorithms.GraphSearchSolutionIteratorTester; import ai.libs.jaicore.search.algorithms.standard.lds.BestFirstLimitedDiscrepancySearch; import ai.libs.jaicore.search.core.interfaces.IGraphSearch; import ai.libs.jaicore.search.probleminputs.GraphSearchInput; import ai.libs.jaicore.search.probleminputs.GraphSearchWithNodeRecommenderInput; public class BestFirstLimitedDiscrepancySearchTester extends GraphSearchSolutionIteratorTester { @Override public <N, A> IGraphSearch<?, ?, N, A> getSearchAlgorithm(GraphSearchInput<N, A> problem) { GraphSearchWithNodeRecommenderInput<N, A> transformedProblem = new GraphSearchWithNodeRecommenderInput<>(problem.getGraphGenerator(), (n1, n2) -> 0); return new BestFirstLimitedDiscrepancySearch<>(transformedProblem); } }
[ "fmohr@mail.upb.de" ]
fmohr@mail.upb.de
606fd04e259df011f9b30044788f1c2087a437c9
e00c98b4a1a568d0b2e23cedeed8f347c253228e
/src/pages/Menu.java
ddd1b9a8f6611298f1e3961a31e4831c07802d10
[]
no_license
amolujagare123/POMGaurav
cebfd2ff549c97425a6c4593940bc45082041925
9c8f0159ac4b0fab0cdea61250738b91ca841810
refs/heads/master
2022-10-20T15:48:40.766145
2020-07-01T06:40:35
2020-07-01T06:40:35
274,321,559
1
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package pages; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; public class Menu { @FindBy(linkText = "Dashboard") WebElement lnkDashBoard; @FindBy (xpath = "//span[contains(text(),'Clients')]") WebElement lnkClients; // @FindBy (locator = value) WebElement elementName ; @FindBy (xpath="//a[contains(text(),'Add Client')]") WebElement lnkAddClinent; @FindBy (xpath="//a[contains(text(),'View Client')]") WebElement lnkViewClinent; public Menu(WebDriver driver) // constructor { PageFactory.initElements(driver,this); } public void clickLnkDahboard() { lnkDashBoard.click(); } public void clickAddClient() { lnkClients.click(); lnkAddClinent.click(); } public void clickViewClient() { lnkClients.click(); lnkViewClinent.click(); } }
[ "amolujagare@gmail.com" ]
amolujagare@gmail.com
8ede2c3acf6ea7c29470adab67bc33d6d4cdaf46
7702b313ad4b320fdfa3fb4860a12d51056c0839
/Tuacy/xml/src/main/java/com/tuacy/xml/drawable/shape/RingShapeActivity.java
b98f6ed036319c0849ceb8979b079da6e60fbe5c
[]
no_license
tuacy/2016
0b7d7dce43091b5884a1ffc1a3494002791e8a29
6ac2f7a5d52e80f7000d4447abee6fc817d26d28
refs/heads/master
2021-01-10T02:24:12.870127
2016-04-08T12:01:58
2016-04-08T12:01:58
52,490,086
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package com.tuacy.xml.drawable.shape; import android.os.Bundle; import com.tuacy.common.base.activity.BaseActivity; import com.tuacy.xml.R; public class RingShapeActivity extends BaseActivity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_ring_shape); } }
[ "1007178106@qq.com" ]
1007178106@qq.com
061d05aebe71933ec2bcf52df1a273cb8f84837d
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/identitycenter/src/main/java/com/huaweicloud/sdk/identitycenter/v1/model/ListInstancesRequest.java
2d2a3cf630667b8517ab3d2b1737e0a87d3289bc
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
2,295
java
package com.huaweicloud.sdk.identitycenter.v1.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** * Request Object */ public class ListInstancesRequest { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "limit") private Integer limit; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "marker") private String marker; public ListInstancesRequest withLimit(Integer limit) { this.limit = limit; return this; } /** * Get limit * minimum: 1 * maximum: 100 * @return limit */ public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } public ListInstancesRequest withMarker(String marker) { this.marker = marker; return this; } /** * Get marker * @return marker */ public String getMarker() { return marker; } public void setMarker(String marker) { this.marker = marker; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } ListInstancesRequest that = (ListInstancesRequest) obj; return Objects.equals(this.limit, that.limit) && Objects.equals(this.marker, that.marker); } @Override public int hashCode() { return Objects.hash(limit, marker); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListInstancesRequest {\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" marker: ").append(toIndentedString(marker)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com