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
3cfcac466e45302e0cc7e0d1e979db354d5d601e
70f7a06017ece67137586e1567726579206d71c7
/alimama/src/main/java/com/taobao/tao/log/godeye/GodeyeInitializer.java
bbe76477393488a70d342a755436d8afed333a2e
[]
no_license
liepeiming/xposed_chatbot
5a3842bd07250bafaffa9f468562021cfc38ca25
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
refs/heads/master
2022-12-20T16:48:21.747036
2020-10-14T02:37:49
2020-10-14T02:37:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,550
java
package com.taobao.tao.log.godeye; import android.app.Application; import com.taobao.android.tlog.protocol.Constants; import com.taobao.android.tlog.protocol.model.GodeyeInfo; import com.taobao.tao.log.godeye.core.GodEyeAppListener; import com.taobao.tao.log.godeye.core.GodEyeReponse; import com.taobao.tao.log.godeye.core.control.Godeye; import java.util.HashMap; import java.util.concurrent.atomic.AtomicBoolean; public class GodeyeInitializer { public GodeyeConfig config; AtomicBoolean enabling; private GodeyeInitializer() { this.enabling = new AtomicBoolean(false); this.config = null; } private static class CreateInstance { /* access modifiers changed from: private */ public static GodeyeInitializer instance = new GodeyeInitializer(); private CreateInstance() { } } public static synchronized GodeyeInitializer getInstance() { GodeyeInitializer access$100; synchronized (GodeyeInitializer.class) { access$100 = CreateInstance.instance; } return access$100; } public void init(Application application, GodeyeConfig godeyeConfig) { if (this.enabling.compareAndSet(false, true)) { if (godeyeConfig == null) { godeyeConfig = new GodeyeConfig(); } this.config = godeyeConfig; String str = this.config.appVersion; String str2 = this.config.packageTag; String str3 = this.config.appId; Godeye.sharedInstance().utdid = this.config.utdid; Godeye.sharedInstance().initialize(application, str3, str); Godeye.sharedInstance().setBuildId(str2); } } public void registGodEyeReponse(String str, GodEyeReponse godEyeReponse) { if (str != null && godEyeReponse != null) { Godeye.sharedInstance().godEyeReponses.put(str, godEyeReponse); } } public boolean handleRemoteCommand(GodeyeInfo godeyeInfo) { return Godeye.sharedInstance().handleRemoteCommand(godeyeInfo); } public void registGodEyeAppListener(GodEyeAppListener godEyeAppListener) { if (godEyeAppListener != null) { Godeye.sharedInstance().godEyeAppListener = godEyeAppListener; } } public void onAccurateBootFinished(HashMap<String, String> hashMap) { Godeye.sharedInstance().defaultGodeyeJointPointCenter().invokeCustomEventJointPointHandlersIfExist(Constants.AndroidJointPointKey.EVENT_KEY_APP_STARTED); } }
[ "zhangquan@snqu.com" ]
zhangquan@snqu.com
c3f3c7abfe24927dc02feae0ce96d698c18d21f4
44b18053cdd56f054821e0af93eef1b116053bc9
/core/cas-server-core-authentication-api/src/test/java/org/apereo/cas/authentication/credential/CredentialTests.java
637cb12347cf7f19f5426410ba71a3f78cd723c3
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
dongyongok/cas
c364f27fe5ff10b779737f9764ea7a0f5623087b
45139a50fbdf5fe37302d556260395fd73a67007
refs/heads/master
2022-09-19T10:31:20.645502
2022-09-06T03:43:15
2022-09-06T03:43:15
231,773,571
0
0
Apache-2.0
2022-09-19T01:52:27
2020-01-04T14:06:27
Java
UTF-8
Java
false
false
1,795
java
package org.apereo.cas.authentication.credential; import lombok.val; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.springframework.binding.message.MessageContext; import org.springframework.binding.validation.ValidationContext; import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; /** * This is {@link CredentialTests}. * * @author Misagh Moayyed * @since 6.3.0 */ @Tag("Authentication") public class CredentialTests { @Test public void verifyCred() { val c1 = getCredential(); assertNotNull(c1.getCredentialClass()); assertTrue(c1.isValid()); } @Test public void verifyEquals() { val c1 = getCredential(); val c2 = getCredential(); assertNotNull(c1.getCredentialClass()); assertTrue(c1.isValid()); assertTrue(Math.abs(c1.hashCode()) > 0); assertNotEquals(c2, c1); assertEquals(c1, c1); } @Test public void verifyValid() { val c = new AbstractCredential() { private static final long serialVersionUID = -1746359565306558329L; @Override public String getId() { return null; } }; val context = mock(ValidationContext.class); when(context.getMessageContext()).thenReturn(mock(MessageContext.class)); assertDoesNotThrow(() -> c.validate(context)); } private static AbstractCredential getCredential() { return new AbstractCredential() { private static final long serialVersionUID = -1746359565306558329L; @Override public String getId() { return UUID.randomUUID().toString(); } }; } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
7d04c7cb0313db41329fb8a34d840b82008f4553
1af5de52e596f736c70a8d2b505fcbf406e0d1e4
/adapter/src/main/java/com/adaptris/core/http/ContentTypeProviderImpl.java
5b092898e67ff39107e7884b6c26a38f465f6d8d
[ "Apache-2.0" ]
permissive
williambl/interlok
462970f97b626b6f05d69ae30a43e42d6770dd24
3371e63ede75a53878244d8e44ecc00f36545e74
refs/heads/master
2020-03-28T06:17:23.056266
2018-08-13T13:36:02
2018-08-13T13:36:02
147,825,107
0
0
Apache-2.0
2018-09-07T13:10:38
2018-09-07T13:10:38
null
UTF-8
Java
false
false
1,498
java
/* * Copyright 2015 Adaptris Ltd. * * 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.adaptris.core.http; import static org.apache.commons.lang.StringUtils.isBlank; import javax.mail.internet.ContentType; import javax.mail.internet.ParseException; public abstract class ContentTypeProviderImpl implements ContentTypeProvider { protected String build(String mimeType, String charset) { StringBuilder buf = new StringBuilder(); buf.append(mimeType); if (!isBlank(charset) && !hasCharset(mimeType)) { buf.append("; charset="); buf.append(charset); } return buf.toString(); } private boolean hasCharset(String mimeType) { boolean result = false; try { ContentType ct = new ContentType(mimeType); String charset = ct.getParameter("charset"); result = !isBlank(charset); } catch (ParseException e) { // couldn't parse, hasn't got a charset. result = false; } return result; } }
[ "lewin.chan@adaptris.com" ]
lewin.chan@adaptris.com
503ad21d1164c4f1ca395a1ba562dd9baeef7277
19490fcc6f396eeb35a9234da31e7b615abf6d04
/JDownloader/src/jd/controlling/downloadcontroller/FileIsLockedException.java
e98298f302174262224efc8f882b4fc8a41da8db
[]
no_license
amicom/my-project
ef72026bb91694e74bc2dafd209a1efea9deb285
951c67622713fd89448ffe6e0983fe3f934a7faa
refs/heads/master
2021-01-02T09:15:45.828528
2015-09-06T15:57:01
2015-09-06T15:57:01
41,953,961
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
package jd.controlling.downloadcontroller; public class FileIsLockedException extends Exception { private Object lockHolder; public Object getLockHolder() { return lockHolder; } public void setLockHolder(Object lockHolder) { this.lockHolder = lockHolder; } public FileIsLockedException(Object currentHolder) { super("File is locked by " + currentHolder); lockHolder = currentHolder; } }
[ "amicom.pro@gmail.com" ]
amicom.pro@gmail.com
e465a88ea969e569761d152dd9f3ac470490411c
878969b5df33715cef38b00f1235818303d5cbd4
/phoenix-server/server-auth/src/main/java/com/phoenix/service/impl/UserDetailServiceImpl.java
1d6074b58effba22fb7a8902519655bbde2d673d
[]
no_license
phoniex-fly/phoniex-cloud
d9bbf2ab7fa38d99c77dfea932d79916e10d2389
4113b3fedad519bac340a0fce69fdd6dc18d6e63
refs/heads/master
2023-06-23T17:46:56.889000
2021-07-27T02:26:23
2021-07-27T02:26:23
381,259,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,458
java
package com.phoenix.service.impl; import com.phoenix.common.AuthConstant; import com.phoenix.feign.AuthUserFeign; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @Service public class UserDetailServiceImpl implements UserDetailsService { @Autowired private AuthUserFeign authUserFeign; /** * header中存储登录类型,根据登录类型确定认证逻辑 * * @param username * @return * @throws UsernameNotFoundException */ @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { //获取请求头中的登录类型 ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); String loginType = attributes.getRequest().getHeader(AuthConstant.LOGIN_TYPE); if (StringUtils.isEmpty(loginType)) { return null; } return authUserFeign.loadUserByUsername(username, loginType); } }
[ "shixiaoyan@sinosoft.com.cn" ]
shixiaoyan@sinosoft.com.cn
22ce697211f5c3c095ced47dbccc00017cf8599d
8a2a9959bbbf43fcaa58cc872756e16ae93a5035
/src/main/java/com/linguancheng/gdeiassistant/Controller/ChargeRequest/ChargeRequestController.java
d4b3cc65a98c05eb084f436e1e760980452b31d2
[ "MIT" ]
permissive
guofengma/GdeiAssistant
5fbf0e7a5ea51d85cfd406cd243206f0d831856f
61576d724ab7541a332d8f85035fcf7e4bcc2006
refs/heads/master
2020-04-22T19:58:08.056742
2019-02-06T18:48:54
2019-02-06T18:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,397
java
package com.linguancheng.gdeiassistant.Controller.ChargeRequest; import com.linguancheng.gdeiassistant.Annotation.ReplayAttacksProtection; import com.linguancheng.gdeiassistant.Annotation.RequestLogPersistence; import com.linguancheng.gdeiassistant.Annotation.RequireSecurity; import com.linguancheng.gdeiassistant.Annotation.RestAuthentication; import com.linguancheng.gdeiassistant.Pojo.Charge.ChargeRequest; import com.linguancheng.gdeiassistant.Pojo.Entity.Charge; import com.linguancheng.gdeiassistant.Pojo.Entity.RequestSecurity; import com.linguancheng.gdeiassistant.Pojo.Entity.RequestValidation; import com.linguancheng.gdeiassistant.Pojo.Entity.User; import com.linguancheng.gdeiassistant.Pojo.Result.DataJsonResult; import com.linguancheng.gdeiassistant.Service.Charge.ChargeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; @RestController public class ChargeRequestController { @Autowired private ChargeService chargeService; @RequestMapping(value = "/rest/charge", method = RequestMethod.POST) @RestAuthentication @RequestLogPersistence @ReplayAttacksProtection @RequireSecurity public DataJsonResult ChargeRequest(HttpServletRequest request , @RequestParam("token") String token , @Validated @NotNull @Min(1) @Max(500) Integer amount , @Validated ChargeRequest requestParams , @Validated RequestValidation requestValidation , @Validated RequestSecurity requestSecurity) throws Exception { User user = (User) request.getAttribute("user"); Charge charge = chargeService.ChargeRequest(request.getSession().getId() , user.getUsername(), user.getPassword(), amount); //保存充值日志记录 chargeService.SaveChargeLog(user.getUsername(), amount); //返回充值结果 return new DataJsonResult<>(true, charge); } }
[ "zwlddx0815@gmail.com" ]
zwlddx0815@gmail.com
1509db6400a16619447cd0d2c869f97cadc74057
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.jdt.ui/4041.java
709b28f88a588a1fd0a925ab5687245537010e3b
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
248
java
//9, 35, 9, 59 package p; import java.util.List; import java.util.ArrayList; class A { private static final ArrayList<Integer> ITEMS = new ArrayList<Integer>(); void m() { List<? extends Number> l = ITEMS; } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
3ca6b6620c5df63695e4db744eca32cd7e6b0b0b
a80e56f814f874cfd29a47364603044e24f957be
/src/main/java/smt/pack/phytology/world/ActBoss.java
827154ecdce16f24e986b6a22ef8bb60e210c17b
[]
no_license
timaxa007/SMT
55cc815a8c354bc155da660e26fce5fd224aabb2
4fb54c1d65df1b25395ebe7d4221d93f895e658c
refs/heads/master
2020-04-02T01:32:58.168246
2018-07-28T19:11:16
2018-07-28T19:11:16
27,762,065
2
1
null
null
null
null
UTF-8
Java
false
false
229
java
package smt.pack.phytology.world; import net.minecraft.util.AxisAlignedBB; public class ActBoss { static AxisAlignedBB boundingBox = null; public static void setBoundingBox(AxisAlignedBB aabb) { boundingBox = aabb; } }
[ "timaxa007@gmail.com" ]
timaxa007@gmail.com
bd7da23f8cdb0082c2cbabece5d22ba93862b3f9
5e3cfc138ca45746cbd8ed1fc8eccaa59cd0840b
/Homeless/Android/Homeless_com.positivelymade.homeless_source_from_JADX/com/google/android/gms/ads/internal/client/ac.java
dc1e9f66af3e31f9fc339f1971570f25e2487d9f
[]
no_license
ycourteau/PedagogiqueProjets
18011979f797bacd5f6b87bd6e6866ebc83752f9
7704cf3e431f34b408f874d908132af9aa498c7b
refs/heads/master
2021-06-27T21:30:17.028954
2019-05-08T17:26:29
2019-05-08T17:26:29
110,717,560
0
0
null
null
null
null
UTF-8
Java
false
false
4,091
java
package com.google.android.gms.ads.internal.client; import android.content.Context; import com.google.android.gms.ads.C0427a; import com.google.android.gms.ads.internal.util.client.C0691b; import com.google.android.gms.ads.p022a.C0456a; import com.google.android.gms.ads.p022a.C0458c; import com.google.android.gms.ads.p022a.C0460e; import com.google.android.gms.ads.purchase.C0694b; import com.google.android.gms.ads.purchase.C0696d; import com.google.android.gms.p028c.bk; import com.google.android.gms.p028c.dh; import com.google.android.gms.p028c.et; import com.google.android.gms.p028c.ex; public class ac { private final dh f1419a; private final Context f1420b; private final C0520j f1421c; private C0427a f1422d; private C0428a f1423e; private C0490u f1424f; private String f1425g; private String f1426h; private C0456a f1427i; private C0696d f1428j; private C0694b f1429k; private C0460e f1430l; private C0458c f1431m; public ac(Context context) { this(context, C0520j.m2389a(), null); } public ac(Context context, C0520j c0520j, C0460e c0460e) { this.f1419a = new dh(); this.f1420b = context; this.f1421c = c0520j; this.f1430l = c0460e; } private void m2345b(String str) { if (this.f1425g == null) { m2346c(str); } this.f1424f = C0526n.m2402b().m2384b(this.f1420b, new AdSizeParcel(), this.f1425g, this.f1419a); if (this.f1422d != null) { this.f1424f.mo342a(new C0516f(this.f1422d)); } if (this.f1423e != null) { this.f1424f.mo341a(new C0513e(this.f1423e)); } if (this.f1427i != null) { this.f1424f.mo343a(new C0524l(this.f1427i)); } if (this.f1429k != null) { this.f1424f.mo346a(new et(this.f1429k)); } if (this.f1428j != null) { this.f1424f.mo347a(new ex(this.f1428j), this.f1426h); } if (this.f1431m != null) { this.f1424f.mo345a(new bk(this.f1431m)); } } private void m2346c(String str) { if (this.f1424f == null) { throw new IllegalStateException("The ad unit ID must be set on InterstitialAd before " + str + " is called."); } } public void m2347a(C0427a c0427a) { try { this.f1422d = c0427a; if (this.f1424f != null) { this.f1424f.mo342a(c0427a != null ? new C0516f(c0427a) : null); } } catch (Throwable e) { C0691b.m3102d("Failed to set the AdListener.", e); } } public void m2348a(C0428a c0428a) { try { this.f1423e = c0428a; if (this.f1424f != null) { this.f1424f.mo341a(c0428a != null ? new C0513e(c0428a) : null); } } catch (Throwable e) { C0691b.m3102d("Failed to set the AdClickListener.", e); } } public void m2349a(aa aaVar) { try { if (this.f1424f == null) { m2345b("loadAd"); } if (this.f1424f.mo352a(this.f1421c.m2390a(this.f1420b, aaVar))) { this.f1419a.m4228a(aaVar.m2316j()); } } catch (Throwable e) { C0691b.m3102d("Failed to load ad.", e); } } public void m2350a(String str) { if (this.f1425g != null) { throw new IllegalStateException("The ad unit ID can only be set once on InterstitialAd."); } this.f1425g = str; } public boolean m2351a() { boolean z = false; try { if (this.f1424f != null) { z = this.f1424f.mo355c(); } } catch (Throwable e) { C0691b.m3102d("Failed to check if ad is ready.", e); } return z; } public void m2352b() { try { m2346c("show"); this.f1424f.mo371g(); } catch (Throwable e) { C0691b.m3102d("Failed to show interstitial.", e); } } }
[ "ycourteau@collegeshawinigan.qc.ca" ]
ycourteau@collegeshawinigan.qc.ca
3834666fe721de85c18e8d42a104141b72d6e03b
fff3302fe8193d13360f12e5b13d376ef76cf4d6
/AppLock/com/google/android/gms/common/util/C2582g.java
478227ba9d6a0fd40147565d0820d111ba90dd8e
[]
no_license
shaolin-example-com-my-shopify-com/KidWatcher
2912950b7ca4773c3d29005b9d231ad6035b4912
f67a81b757043159ea358b7f9e4b16fd6be0e0c0
refs/heads/master
2022-04-25T17:19:28.800922
2020-04-30T02:53:20
2020-04-30T02:53:20
260,098,439
0
0
null
2020-04-30T02:51:49
2020-04-30T02:51:48
null
UTF-8
Java
false
false
492
java
package com.google.android.gms.common.util; import android.os.SystemClock; public class C2582g implements C2580e { private static C2582g f7558a = new C2582g(); private C2582g() { } public static C2580e m8288d() { return f7558a; } public long mo3360a() { return System.currentTimeMillis(); } public long mo3361b() { return SystemClock.elapsedRealtime(); } public long mo3362c() { return System.nanoTime(); } }
[ "Nist@netcompany.com" ]
Nist@netcompany.com
c880690b9d2cfe1fb634d27c2fe8cb56734fc82c
af0c4995d4bf5f76a6ca283fc55dfdca4e52ca3a
/program/src/main/java/com/whaley/biz/program/playersupport/component/normalplayer/tv/TVComponent.java
1e5a8b9a46b7c85de8820ea5a0fae11a2600b8f8
[]
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
544
java
package com.whaley.biz.program.playersupport.component.normalplayer.tv; import com.whaley.biz.playerui.component.BaseComponent; import com.whaley.biz.playerui.component.BaseController; import com.whaley.biz.playerui.component.BaseUIAdapter; /** * Created by YangZhi on 2017/8/23 16:58. */ public class TVComponent extends BaseComponent{ @Override protected BaseController onCreateController() { return new TVController(); } @Override protected BaseUIAdapter onCreateUIAdapter() { return null; } }
[ "lizs@snailvr.com" ]
lizs@snailvr.com
7da92e97db7d55252e90b472be2394f1cc040371
f652d1377f22f5009e0ca34a7bb5e90a57172db7
/backend/src/main/java/br/com/ivanfsilva/ecommerce/model/Categoria.java
875c0c335b016a8b9a9d3755ab31e9ed1b2f98db
[]
no_license
ivanfsilva/ecommerce
b53b25fe2c894886482828203aba003cafcfe59e
4f71bb3d94efce7a297b10f0b185d87ec6db27ad
refs/heads/master
2022-05-24T15:34:15.791657
2022-05-10T21:39:51
2022-05-10T21:39:51
244,218,369
0
0
null
null
null
null
UTF-8
Java
false
false
835
java
package br.com.ivanfsilva.ecommerce.model; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import javax.persistence.*; import javax.validation.constraints.NotBlank; import java.util.List; @Getter @Setter @Entity @Table(name = "categoria", uniqueConstraints = { @UniqueConstraint(name = "unq_nome", columnNames = { "nome" }) }) public class Categoria extends EntidadeBaseInteger { @NotBlank @Column(length = 100, nullable = false) private String nome; @ManyToOne @JoinColumn(name = "categoria_pai_id", foreignKey = @ForeignKey(name = "fk_categoria_categoriapai")) private Categoria categoriaPai; @OneToMany(mappedBy = "categoriaPai") private List<Categoria> categorias; @ManyToMany(mappedBy = "categorias") private List<Produto> produtos; }
[ "ivanfs27@gmail.com" ]
ivanfs27@gmail.com
76a2a3dfb96a2458f461a2092eb007ae6cda3806
66e2f35b7b56865552616cf400e3a8f5928d12a2
/src/main/java/com/alipay/api/domain/ZhimaCustomerCertificationCertifyModel.java
8788d586533b78a30072dcd11a692b81b40779a6
[ "Apache-2.0" ]
permissive
xiafaqi/alipay-sdk-java-all
18dc797400847c7ae9901566e910527f5495e497
606cdb8014faa3e9125de7f50cbb81b2db6ee6cc
refs/heads/master
2022-11-25T08:43:11.997961
2020-07-23T02:58:22
2020-07-23T02:58:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
642
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 芝麻认证开始认证 * * @author auto create * @since 1.0, 2018-08-29 14:42:03 */ public class ZhimaCustomerCertificationCertifyModel extends AlipayObject { private static final long serialVersionUID = 4688623347644377123L; /** * 一次认证的唯一标识,在完成芝麻认证初始化后可以获取 */ @ApiField("biz_no") private String bizNo; public String getBizNo() { return this.bizNo; } public void setBizNo(String bizNo) { this.bizNo = bizNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
3ac779ba3a3f39854de3a3d965a634d7f32d0e49
61602d4b976db2084059453edeafe63865f96ec5
/com/xunlei/downloadprovider/download/openwith/e.java
4bfc420cdc894e01bc0e812f5c50431bcd3baf5c
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
1,531
java
package com.xunlei.downloadprovider.download.openwith; import android.content.Context; import com.xunlei.common.androidutil.OSUtil; import com.xunlei.common.businessutil.XLFileTypeUtil; import com.xunlei.downloadprovider.download.d.d.a; import com.xunlei.downloadprovider.download.d.f; import com.xunlei.downloadprovider.download.downloadvod.TaskPlayInfo; import com.xunlei.downloadprovider.vodnew.VodPlayerActivityNew; /* compiled from: LocalFileOpenHelper */ final class e implements a { final /* synthetic */ Context a; e(Context context) { this.a = context; } public final void a(f fVar, String str) { if (!(fVar == null || fVar.c == null)) { Context context = this.a; fVar = fVar.c; if (fVar == null || !fVar.activityInfo.packageName.equals(OSUtil.getCurProcessName(context))) { fVar = c.a().a(context, str, fVar); if (fVar != null) { fVar.addFlags(67108864); context.startActivity(fVar); } } else if (XLFileTypeUtil.isLocalVodSupport(str) != null) { fVar = str.contains("/") != null ? str.substring(str.lastIndexOf("/") + 1) : str; TaskPlayInfo taskPlayInfo = new TaskPlayInfo(str); taskPlayInfo.mTitle = fVar; VodPlayerActivityNew.a(context, taskPlayInfo, "app_other", null, true, 0, null); } } d.a(); } public final void a() { d.a(); } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
d50fbaac8e8b64e2f4d4061723726a711c37a026
f3c0028d4138c69c4ce24b2fd01e4ca595a6af4d
/app/src/main/java/com/siweisoft/util/hellocharts/animation/ChartAnimationListener.java
23f814ed8fb1241ce8aacfec69ef145b67a01ae3
[]
no_license
canvaser/desktop
83138fa37b36a02d4663d5e9cb136313f501a43e
7652ece27d050d627c95fe0934734bf05db2cb0e
refs/heads/master
2021-01-13T03:09:42.346997
2017-02-07T01:43:59
2017-02-07T01:43:59
77,433,645
2
0
null
null
null
null
UTF-8
Java
false
false
427
java
package com.siweisoft.util.hellocharts.animation; import java.util.EventListener; /** * Listener used to listen for chart animation start and stop events. Implementations of this interface can be used for * all types of chart animations(data, viewport, PieChart rotation). */ public interface ChartAnimationListener extends EventListener { public void onAnimationStarted(); public void onAnimationFinished(); }
[ "18721607438@163.com" ]
18721607438@163.com
3eda2222df73c7a5bd6177a98363d561fe331894
69cd2c960e14297f364ea83ef0c1106d8368b15c
/mbhd-swing/src/test/java/org/multibit/hd/ui/fest/use_cases/sidebar/contacts/EditBobContactUseCase.java
b1cc3c010721f5270e6e2b2703dde8c7e5303095
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
litecoin-project/multibit-hd
90d03bd4fd8828931efcfde47d26ba4d330116ad
e4a6c84d5adf42e300be9a71b5faa97914793063
refs/heads/develop
2020-12-28T21:27:49.173734
2015-03-19T07:21:41
2015-03-19T07:21:41
29,544,039
7
13
null
2015-01-20T18:11:52
2015-01-20T18:11:52
null
UTF-8
Java
false
false
4,443
java
package org.multibit.hd.ui.fest.use_cases.sidebar.contacts; import org.fest.swing.fixture.FrameFixture; import org.multibit.hd.ui.fest.use_cases.AbstractFestUseCase; import org.multibit.hd.ui.languages.MessageKey; import org.multibit.hd.ui.views.components.tables.ContactTableModel; import org.multibit.hd.ui.views.wizards.edit_contact.EditContactState; import java.util.Map; import static org.fest.assertions.Assertions.assertThat; /** * <p>Use case to provide the following to FEST testing:</p> * <ul> * <li>Verify the "contacts" screen edit Bob contact</li> * </ul> * <p>Requires the "contacts" screen to be showing</p> * <p>Requires the "Bob" contact to be present</p> * * @since 0.0.1 * */ public class EditBobContactUseCase extends AbstractFestUseCase { public EditBobContactUseCase(FrameFixture window) { super(window); } @Override public void execute(Map<String, Object> parameters) { // Get the initial row count int rowCount1 = window .table(MessageKey.CONTACTS.getKey()) .rowCount(); // Find Bob's row int bobRow = window .table(MessageKey.CONTACTS.getKey()) .cell("Bob") .row; // Get the contacts String[][] contacts = window .table(MessageKey.CONTACTS.getKey()) .contents(); ensureCheckboxIsSelected(MessageKey.CONTACTS, bobRow, ContactTableModel.CHECKBOX_COLUMN_INDEX); // Click on Edit window .button(MessageKey.EDIT.getKey()) .click(); // Verify the single contact edit wizard appears assertLabelText(MessageKey.EDIT_CONTACT_TITLE); window .button(MessageKey.CANCEL.getKey()) .requireVisible() .requireEnabled(); // Verify contact image window .label(MessageKey.CONTACT_IMAGE.getKey()) .requireVisible(); // Update Bob's details window .textBox(MessageKey.NAME.getKey()) .requireText("Bob") .setText("Bob Cratchit"); window .textBox(MessageKey.EMAIL_ADDRESS.getKey()) .requireText("bob@example.org") .setText("bob.cratchit@example.org"); // Ensure Add button is disabled without tag addTag("Scrooge Staff", 1); // Private notes window .textBox(MessageKey.PRIVATE_NOTES.getKey()) .setText("Bob is now working for Scrooge"); verifyCancel(); // Click Apply window .button(MessageKey.APPLY.getKey()) .click(); // Verify the underlying screen is back window .button(MessageKey.ADD.getKey()) .requireVisible() .requireEnabled(); // Get an updated row count int rowCount2 = window .table(MessageKey.CONTACTS.getKey()) .rowCount(); // Verify that no new row has been added assertThat(rowCount2).isEqualTo(rowCount1); // Verify that "Alice" is unaffected window .table(MessageKey.CONTACTS.getKey()) .cell("Alice"); // Verify that "Bob" is now "Bob Cratchit" window .table(MessageKey.CONTACTS.getKey()) .cell("Bob Cratchit"); } /** * Verifies that clicking cancel with data present gives a Yes/No popover */ private void verifyCancel() { // Click Cancel window .button(MessageKey.CANCEL.getKey()) .click(); // Expect Yes/No popover window .button(MessageKey.YES.getKey()) .requireVisible() .requireEnabled(); window .button("popover_"+MessageKey.CLOSE.getKey()) .requireVisible() .requireEnabled(); // Click No window .button(MessageKey.NO.getKey()) .requireVisible() .requireEnabled() .click(); } private void addTag(String tag, int startCount) { window .button(EditContactState.EDIT_CONTACT_ENTER_DETAILS + "." + MessageKey.ADD.getKey()) .requireVisible() .requireDisabled(); // Add a tag window .textBox(MessageKey.TAGS.getKey()) .setText(tag); // Count the tags final int tagCount1 = window .list(MessageKey.TAGS.getKey()) .contents().length; assertThat(tagCount1).isEqualTo(startCount); // Click Add tag window .button(EditContactState.EDIT_CONTACT_ENTER_DETAILS + "." + MessageKey.ADD.getKey()) .requireVisible() .requireEnabled() .click(); // Count the tags final int tagCount2 = window .list(MessageKey.TAGS.getKey()) .contents().length; assertThat(tagCount2).isEqualTo(tagCount1 + 1); } }
[ "g.rowe@froot.co.uk" ]
g.rowe@froot.co.uk
61d7e71e68c5eb9f1fa802ea4d5d4dfd686d683e
ca3497abe8c93d39eb91e55de364fb7e5f8723f9
/src/main/java/za/co/mach/liveconsult/security/social/CustomSignInAdapter.java
11e78b2ec25166c4bbf6124a913e6888e442a868
[]
no_license
lukaszmac/liveconsult
24883f3b5aedcf24aebf4b7e176fff4b2d8bc836
9bdcfffd152b0909d12a535ca72737e2aa22e60d
refs/heads/master
2021-08-23T11:28:51.098313
2017-12-04T18:07:48
2017-12-04T18:07:48
113,077,229
0
0
null
null
null
null
UTF-8
Java
false
false
2,826
java
package za.co.mach.liveconsult.security.social; import za.co.mach.liveconsult.security.jwt.TokenProvider; import io.github.jhipster.config.JHipsterProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.social.connect.Connection; import org.springframework.social.connect.web.SignInAdapter; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.security.core.AuthenticationException; import org.springframework.web.context.request.ServletWebRequest; import javax.servlet.http.Cookie; public class CustomSignInAdapter implements SignInAdapter { @SuppressWarnings("unused") private final Logger log = LoggerFactory.getLogger(CustomSignInAdapter.class); private final UserDetailsService userDetailsService; private final JHipsterProperties jHipsterProperties; private final TokenProvider tokenProvider; public CustomSignInAdapter(UserDetailsService userDetailsService, JHipsterProperties jHipsterProperties, TokenProvider tokenProvider) { this.userDetailsService = userDetailsService; this.jHipsterProperties = jHipsterProperties; this.tokenProvider = tokenProvider; } @Override public String signIn(String userId, Connection<?> connection, NativeWebRequest request){ try { UserDetails user = userDetailsService.loadUserByUsername(userId); UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken( user, null, user.getAuthorities()); SecurityContextHolder.getContext().setAuthentication(authenticationToken); String jwt = tokenProvider.createToken(authenticationToken, false); ServletWebRequest servletWebRequest = (ServletWebRequest) request; servletWebRequest.getResponse().addCookie(getSocialAuthenticationCookie(jwt)); } catch (AuthenticationException ae) { log.error("Social authentication error"); log.trace("Authentication exception trace: {}", ae); } return jHipsterProperties.getSocial().getRedirectAfterSignIn(); } private Cookie getSocialAuthenticationCookie(String token) { Cookie socialAuthCookie = new Cookie("social-authentication", token); socialAuthCookie.setPath("/"); socialAuthCookie.setMaxAge(10); return socialAuthCookie; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
e479d76f018127514b15d8c0a26f646a824934b3
e617f4ae796f16eeb4705200935a90dfd31955b2
/com/google/android/gms/games/request/GameRequestRef.java
9be38d634d6ea0f8fb02fe3c01ee7016b9e7b803
[]
no_license
mascot6699/Go-Jek.Android
98dfb73b1c52a7c2100c7cf8baebc0a95d5d511d
051649d0622bcdc7872cb962a0e1c4f6c0f2a113
refs/heads/master
2021-01-20T00:24:46.431341
2016-01-11T05:59:34
2016-01-11T05:59:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,759
java
package com.google.android.gms.games.request; import android.os.Parcel; import com.google.android.gms.common.data.DataHolder; import com.google.android.gms.common.data.d; import com.google.android.gms.games.Game; import com.google.android.gms.games.GameRef; import com.google.android.gms.games.Player; import com.google.android.gms.games.PlayerRef; import java.util.ArrayList; import java.util.List; public final class GameRequestRef extends d implements GameRequest { private final int aaK; public GameRequestRef(DataHolder paramDataHolder, int paramInt1, int paramInt2) { super(paramDataHolder, paramInt1); this.aaK = paramInt2; } public int describeContents() { return 0; } public boolean equals(Object paramObject) { return GameRequestEntity.a(this, paramObject); } public GameRequest freeze() { return new GameRequestEntity(this); } public long getCreationTimestamp() { return getLong("creation_timestamp"); } public byte[] getData() { return getByteArray("data"); } public long getExpirationTimestamp() { return getLong("expiration_timestamp"); } public Game getGame() { return new GameRef(this.II, this.JX); } public int getRecipientStatus(String paramString) { int i = this.JX; while (i < this.JX + this.aaK) { int j = this.II.ar(i); if (this.II.c("recipient_external_player_id", i, j).equals(paramString)) { return this.II.b("recipient_status", i, j); } i += 1; } return -1; } public List<Player> getRecipients() { ArrayList localArrayList = new ArrayList(this.aaK); int i = 0; while (i < this.aaK) { localArrayList.add(new PlayerRef(this.II, this.JX + i, "recipient_")); i += 1; } return localArrayList; } public String getRequestId() { return getString("external_request_id"); } public Player getSender() { return new PlayerRef(this.II, gz(), "sender_"); } public int getStatus() { return getInteger("status"); } public int getType() { return getInteger("type"); } public int hashCode() { return GameRequestEntity.a(this); } public boolean isConsumed(String paramString) { return getRecipientStatus(paramString) == 1; } public String toString() { return GameRequestEntity.c(this); } public void writeToParcel(Parcel paramParcel, int paramInt) { ((GameRequestEntity)freeze()).writeToParcel(paramParcel, paramInt); } } /* Location: /Users/michael/Downloads/dex2jar-2.0/GO_JEK.jar!/com/google/android/gms/games/request/GameRequestRef.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "michael@MJSTONE-MACBOOK.local" ]
michael@MJSTONE-MACBOOK.local
8b9ba37a4948a718f0f7338371103d151aa576ca
e69e5d899856b185e23b6ca0ed50df38b2aff5d1
/ElasticDataServices/src/main/java/com/tip/assetimage/repository/AssetImageAccRepository.java
e3a6a3e3315a40b4f86623664210bca762ac07fe
[]
no_license
shuvankar999/git_backup
10edee9a3db6e4dcb6b67df2a712ebce10c33f31
b39e126e45df1c6147aace22aabbcc75b3d65322
refs/heads/main
2023-06-14T17:12:55.874523
2021-07-09T16:16:14
2021-07-09T16:16:14
384,487,809
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package com.tip.assetimage.repository; import com.tip.assetimage.model.AssetImageAccRequest; @FunctionalInterface public interface AssetImageAccRepository { public boolean updateImageLoc(AssetImageAccRequest assetImageAccRequest); }
[ "shuvankar999@gmail.com" ]
shuvankar999@gmail.com
105bfaa7f97660711dc0235d60202628916dec21
fa8666387662190086611fd08c44bfcbf2e59506
/src/com/csw/Service/impls/TransformSensorMLToebRIMService.java
bf82495da945a99132207f8801907ae2bf62d84f
[]
no_license
xlinliu/CxfMyCsw
45464cc7b76ff91351767cf96fd3098eb3c86f97
6447dd6f7a81fa84e4ed0281be6140e27db95b71
refs/heads/master
2021-06-27T03:53:06.809286
2017-09-18T07:35:37
2017-09-18T07:35:37
103,904,357
0
0
null
null
null
null
GB18030
Java
false
false
3,892
java
package com.csw.Service.impls; import java.io.File; import java.io.FileInputStream; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import com.csw.Service.interfaces.TransformSensorMLToebRIMServiceInterface; import com.csw.exceptions.ServiceException; import com.csw.utils.GetRealPathUtil; import com.csw.utils.StringUtil; import com.csw.utils.FileUtil.FileOperationUtil; import com.csw.utils.TransactionsUtil.TransactionOperation; import com.csw.utils.Userutils.UserInfoUtil; import com.googlecode.jsonplugin.JSONResult; public class TransformSensorMLToebRIMService implements TransformSensorMLToebRIMServiceInterface { /** * 将system,component和processModel的SensorML转换为EbRIM格式内容 * * @param sensorml * system,component,processModel的SensorML内容 * @return 返回转换好的EbRIM格式内容 * @throws Exception */ public String TransformNonProcessChainToEbRIMMethod(String sensorml) throws Exception { String basepath = new GetRealPathUtil().getWebInfPath(); if (basepath.endsWith("\\") || basepath.endsWith("/")) { } else { basepath += "\\"; } String sensormlfilepath = FileOperationUtil.CreateFilePathOperation( basepath, "sensorml"); String processmodelxsltpath = basepath + "transformxsls\\Process.xsl"; String xslfilepath = basepath + "transformxsls\\SensorMLToEbRIM.xsl"; String ebrimfilepath = FileOperationUtil.CreateFilePathOperation( basepath, "ebrim"); String ebrimcontent = ""; basepath = new GetRealPathUtil().getWebInfPath(); // System.out.println(sensormlfilepath); FileOperationUtil.WriteToFileContent(sensorml.trim(), sensormlfilepath, "UTF-8"); TransformerFactory tf = TransformerFactory.newInstance(); Source source = null; if (sensorml.toLowerCase().contains("ProcessModel>".toLowerCase())) { source = new StreamSource(new File(processmodelxsltpath)); } else if (sensorml.toLowerCase().contains("System>".toLowerCase())) { source = new StreamSource(new File(xslfilepath)); } @SuppressWarnings("unused") Transformer tfomerTransformer = tf.newTransformer(source); Source smlsources = new StreamSource(new FileInputStream( sensormlfilepath)); StreamResult result = new StreamResult(new File(ebrimfilepath)); @SuppressWarnings("unused") JSONResult jsonResult = new JSONResult(); tf.newTransformer(source).transform(smlsources, result); ebrimcontent = FileOperationUtil .ReadFileContent(ebrimfilepath, "UTF-8"); return ebrimcontent; } /** * 将sensorml转换为ebrim个格式的文档 */ public String TransactionSensorMLToeEbRIMMethod(String username, String password, String sensorml) throws ServiceException { // 核实用户信息 UserInfoUtil.CheckUserLogin(username, password); if (StringUtil.checkStringIsNotNULLAndEmptyMethod(sensorml) == null) { throw new ServiceException("参数sensorml不能为空!"); } String basepath = new GetRealPathUtil().getWebInfPath(); String sensormlfilepath = FileOperationUtil.CreateFilePathOperation( basepath, "sensorml"); String ebrimfilepath = FileOperationUtil.CreateFilePathOperation( basepath, "ebrim1"); String processmodelxsltpath = basepath + "transformxsls\\Process.xsl"; String xslfilepath = basepath + "transformxsls\\SensorMLToEbRIM.xsl"; String ebrim = TransactionOperation.ParseAndSaveAllTypesProcessMethod( sensorml, sensormlfilepath, processmodelxsltpath, xslfilepath, ebrimfilepath, null, null, null, false, username); if (ebrim.equals("")) { throw new ServiceException("参数ebrim内容错误,请输入规范文档内容"); } FileOperationUtil.DeleteFile(sensormlfilepath); FileOperationUtil.DeleteFile(ebrimfilepath); return ebrim; } }
[ "kexuetou@163.com" ]
kexuetou@163.com
2ba207dc81f8a27d679826d81d996f12f809af27
26f21c96ddb28a9776eff5f09882f61125130788
/meetup-server-dao/src/main/java/com/openteach/meetup/server/dao/MessageDAO.java
5e2aaa3888c06e21e8d1b6a57178a99f2cf6d16b
[]
no_license
sihai/meetup-server
1ecdaebaff7a647f55b6e18ff8db71f7233ba7df
4aaa22738c3a166477ad315434302320d6b76f38
refs/heads/master
2020-04-22T22:07:31.843063
2013-12-04T09:11:04
2013-12-04T09:11:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
703
java
/** * galaxy inc. * meetup server */ package com.openteach.meetup.server.dao; import java.util.List; import com.openteach.meetup.server.client.entity.Message; /** * * @author sihai * */ public interface MessageDAO { /** * * @param message */ void insert(Message message); /** * * @param sender * @param receiver * @param currentPage * @param pageSize * @return */ List<Message> query(String sender, String receiver, int currentPage, int pageSize); /** * * @param sender * @param receiver * @return */ long count(String sender, String receiver); /** * * @param sender * @param receiver */ void delete(String sender, String receiver); }
[ "iac-rq@live.cn" ]
iac-rq@live.cn
c882128fe9b5f8a930950318cc53c38e536023d8
23b6d6971a66cf057d1846e3b9523f2ad4e05f61
/MLMN-Statistics/src/vn/com/vhc/vmsc2/statistics/dao/MnHBscSdcchQosDAOImpl.java
6e6e2928cbc0cf1787322c7a7942e53827fb2bb2
[]
no_license
vhctrungnq/mlmn
943f5a44f24625cfac0edc06a0d1b114f808dfb8
d3ba1f6eebe2e38cdc8053f470f0b99931085629
refs/heads/master
2020-03-22T13:48:30.767393
2018-07-08T05:14:12
2018-07-08T05:14:12
140,132,808
0
1
null
2018-07-08T05:29:27
2018-07-08T02:57:06
Java
UTF-8
Java
false
false
3,375
java
package vn.com.vhc.vmsc2.statistics.dao; import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport; import vn.com.vhc.vmsc2.statistics.domain.MnHBscSdcchQos; public class MnHBscSdcchQosDAOImpl extends SqlMapClientDaoSupport implements MnHBscSdcchQosDAO { /** * This method was generated by Apache iBATIS ibator. * This method corresponds to the database table MN_H_BSC_SDCCH_QOS * * @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010 */ public MnHBscSdcchQosDAOImpl() { super(); } /** * This method was generated by Apache iBATIS ibator. * This method corresponds to the database table MN_H_BSC_SDCCH_QOS * * @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010 */ public int deleteByPrimaryKey(String bscid, Integer month, Integer year) { MnHBscSdcchQos key = new MnHBscSdcchQos(); key.setBscid(bscid); key.setMonth(month); key.setYear(year); int rows = getSqlMapClientTemplate().delete("MN_H_BSC_SDCCH_QOS.ibatorgenerated_deleteByPrimaryKey", key); return rows; } /** * This method was generated by Apache iBATIS ibator. * This method corresponds to the database table MN_H_BSC_SDCCH_QOS * * @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010 */ public void insert(MnHBscSdcchQos record) { getSqlMapClientTemplate().insert("MN_H_BSC_SDCCH_QOS.ibatorgenerated_insert", record); } /** * This method was generated by Apache iBATIS ibator. * This method corresponds to the database table MN_H_BSC_SDCCH_QOS * * @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010 */ public void insertSelective(MnHBscSdcchQos record) { getSqlMapClientTemplate().insert("MN_H_BSC_SDCCH_QOS.ibatorgenerated_insertSelective", record); } /** * This method was generated by Apache iBATIS ibator. * This method corresponds to the database table MN_H_BSC_SDCCH_QOS * * @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010 */ public MnHBscSdcchQos selectByPrimaryKey(String bscid, Integer month, Integer year) { MnHBscSdcchQos key = new MnHBscSdcchQos(); key.setBscid(bscid); key.setMonth(month); key.setYear(year); MnHBscSdcchQos record = (MnHBscSdcchQos) getSqlMapClientTemplate().queryForObject("MN_H_BSC_SDCCH_QOS.ibatorgenerated_selectByPrimaryKey", key); return record; } /** * This method was generated by Apache iBATIS ibator. * This method corresponds to the database table MN_H_BSC_SDCCH_QOS * * @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010 */ public int updateByPrimaryKeySelective(MnHBscSdcchQos record) { int rows = getSqlMapClientTemplate().update("MN_H_BSC_SDCCH_QOS.ibatorgenerated_updateByPrimaryKeySelective", record); return rows; } /** * This method was generated by Apache iBATIS ibator. * This method corresponds to the database table MN_H_BSC_SDCCH_QOS * * @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010 */ public int updateByPrimaryKey(MnHBscSdcchQos record) { int rows = getSqlMapClientTemplate().update("MN_H_BSC_SDCCH_QOS.ibatorgenerated_updateByPrimaryKey", record); return rows; } }
[ "trungnq@vhc.com.vn" ]
trungnq@vhc.com.vn
26fb56e7fb55afe58ee00865a2dc56ec38096757
43ce6ddae68f5405c0cb9af6a7bedfb16e0c25d2
/src/org/usfirst/frc319/SteamworksBob319/CommandGroups/BlankCommandGroup.java
296dc05db65345d9f6b4dd9fed14d3230804d98d
[]
no_license
Team319/SteamworksBob319
104969ef79ef3c1f92a0b5d8da3999bcf4bd5dc0
4587affb6994c8bb1fd273246f5b2d4159aa99a9
refs/heads/master
2021-01-11T17:12:57.701533
2017-10-12T18:19:49
2017-10-12T18:19:49
79,740,547
0
0
null
2017-10-12T18:19:50
2017-01-22T19:40:25
Java
UTF-8
Java
false
false
1,451
java
// RobotBuilder Version: 2.0 // // This file was generated by RobotBuilder. It contains sections of // code that are automatically generated and assigned by robotbuilder. // These sections will be updated in the future when you export to // Java from RobotBuilder. Do not put any code or make any change in // the blocks indicating autogenerated code or it will be lost on an // update. Deleting the comments indicating the section will prevent // it from being updated in the future. package org.usfirst.frc319.SteamworksBob319.CommandGroups; import edu.wpi.first.wpilibj.command.CommandGroup; import org.usfirst.frc319.SteamworksBob319.subsystems.*; /** * */ public class BlankCommandGroup extends CommandGroup { public BlankCommandGroup() { // Add Commands here: // e.g. addSequential(new Command1()); // addSequential(new Command2()); // these will run in order. // To run multiple commands at the same time, // use addParallel() // e.g. addParallel(new Command1()); // addSequential(new Command2()); // Command1 and Command2 will run in parallel. // A command group will require all of the subsystems that each member // would require. // e.g. if Command1 requires chassis, and Command2 requires arm, // a CommandGroup containing them would require both the chassis and the // arm. } }
[ "BigBadBob319@gmail.com" ]
BigBadBob319@gmail.com
7af2ca5812ecd8ba11acb22f3bda534806b52e63
a1d3aa27bfec92ef6c53c47135063a5b37eb79c4
/BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/scriptrunner/impl/StatisticScriptReport.java
c6df5d21f900229ab17a70c3ea18db55af6b2627
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
1ekrem/sailfish-core
661159ca9c56a025302d6795c4e702568a588482
b6051b1eb72b2bde5731a7e645f9ea4b8f92c514
refs/heads/master
2020-05-01T16:36:15.334838
2018-12-29T12:28:57
2018-12-29T13:33:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,617
java
/****************************************************************************** * Copyright 2009-2018 Exactpro (Exactpro Systems Limited) * * 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.exactpro.sf.scriptrunner.impl; import java.util.List; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.exactpro.sf.aml.AMLBlockType; import com.exactpro.sf.aml.script.CheckPoint; import com.exactpro.sf.comparison.ComparisonResult; import com.exactpro.sf.embedded.statistics.StatisticsService; import com.exactpro.sf.embedded.statistics.entities.Tag; import com.exactpro.sf.scriptrunner.ReportUtils; import com.exactpro.sf.scriptrunner.ScriptContext; import com.exactpro.sf.scriptrunner.StatusDescription; public class StatisticScriptReport extends DefaultScriptReport { private static final Logger logger = LoggerFactory.getLogger(StatisticScriptReport.class); private final StatisticsService statisticsService; private final List<Tag> tags; private final String reportFolder; private String matrixName; private long actionCouter = 1; public StatisticScriptReport(StatisticsService statisticsService, String reportFilePath, List<Tag> tags) { this.statisticsService = statisticsService; this.tags = tags; this.reportFolder = reportFilePath; //new File(reportFilePath).getParentFile().getName(); } @Override public void createReport(ScriptContext context, String name, String description, long scriptRunId, String environmentName, String userName) { logger.debug("Create report {}, {}, {}, {}", name, description, scriptRunId, environmentName); this.matrixName = name; //this.scriptRunId = scriptRunId; //this.environmentName = environmentName; if(this.statisticsService != null) { this.statisticsService.matrixStarted(matrixName, reportFolder, scriptRunId, environmentName, userName, tags, context.getScriptDescriptionId()); } } @Override public void createException(Throwable cause) { if(this.statisticsService != null && actionCouter == 1) { statisticsService.matrixEception(matrixName, cause); } } @Override public void closeReport() { if(this.statisticsService != null) { statisticsService.matrixFinished(matrixName); } } @Override public void createTestCase(String reference, String description, int order, int matrixOrder, String tcId, int tcHash, AMLBlockType type) { String name = ReportUtils.generateTestCaseName(reference, matrixOrder, type); logger.debug("Create test case {}", name); if(this.statisticsService != null) { this.statisticsService.testCaseStarted(this.matrixName, tcId, name.replaceAll("\\W", "_"), description, order, tcHash); } } @Override public void closeTestCase(StatusDescription status) { if(this.statisticsService != null) { String failReason = null; if(status.getCause() != null) { failReason = extractFailReason(status.getCause()); } this.statisticsService.testCaseFinished(this.matrixName, status.getStatus(), failReason, status.getKnownBugs()); } actionCouter = 1; } @Override public void createAction(String name, String serviceName, String action, String msg, String description, Object inputParameters, CheckPoint checkPoint, String tag, int hash, List<String> verificationsOrder) { if(this.statisticsService != null) { this.statisticsService.actionStarted(matrixName, serviceName, action, msg, description, actionCouter++, tag, hash); } } @Override public void createAction(String name, String serviceName, String action, String msg, String description, List<Object> inputParameters, CheckPoint checkPoint, String tag, int hash, List<String> verificationsOrder) { if(this.statisticsService != null) { this.statisticsService.actionStarted(matrixName, serviceName, action, msg, description, actionCouter++, tag, hash); } } @Override public void closeAction(StatusDescription status, Object actionResult) { if(this.statisticsService != null) { String failReason = null; if(status.getCause() != null) { failReason = extractFailReason(status.getCause()); } this.statisticsService.actionFinished(matrixName, status.getStatus(), failReason); } } @Override public void createVerification(String name, String description, StatusDescription status, ComparisonResult result) { if (this.statisticsService != null) { this.statisticsService.actionVerification(matrixName, result); } } private String extractFailReason(Throwable t) { Throwable root = ExceptionUtils.getRootCause(t); t = ObjectUtils.defaultIfNull(root, t); return t != null ? t.getMessage() : null; } }
[ "nikita.smirnov@exactprosystems.com" ]
nikita.smirnov@exactprosystems.com
a104bc398f76f9bf689f0fc31f9b4d8dc75e9c92
0175a417f4b12b80cc79edbcd5b7a83621ee97e5
/flexodesktop/generators/flexogenerator/src/main/java/org/openflexo/generator/action/GCAction.java
a52cc73527e617c3d85943147b52c72433f1f6eb
[]
no_license
agilebirds/openflexo
c1ea42996887a4a171e81ddbd55c7c1e857cbad0
0250fc1061e7ae86c9d51a6f385878df915db20b
refs/heads/master
2022-08-06T05:42:04.617144
2013-05-24T13:15:58
2013-05-24T13:15:58
2,372,131
11
6
null
2022-07-06T19:59:55
2011-09-12T15:44:45
Java
UTF-8
Java
false
false
4,908
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenFlexo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.generator.action; import java.util.Vector; import java.util.logging.Logger; import org.openflexo.foundation.FlexoEditor; import org.openflexo.foundation.action.FlexoActionType; import org.openflexo.foundation.cg.CGFile; import org.openflexo.foundation.cg.CGObject; import org.openflexo.foundation.cg.GeneratedOutput.GeneratorFactory; import org.openflexo.foundation.cg.GenerationRepository; import org.openflexo.foundation.cg.action.AbstractGCAction; import org.openflexo.generator.AbstractProjectGenerator; import org.openflexo.generator.file.AbstractCGFile; public abstract class GCAction<A extends GCAction<A, T1>, T1 extends CGObject> extends AbstractGCAction<A, T1> { @SuppressWarnings("unused") private static final Logger logger = Logger.getLogger(GCAction.class.getPackage().getName()); public static interface ProjectGeneratorFactory extends GeneratorFactory { public AbstractProjectGenerator<? extends GenerationRepository> generatorForRepository(GenerationRepository repository); } public static ProjectGeneratorFactory getProjectGeneratorFactory(GenerationRepository repository) { return (ProjectGeneratorFactory) repository.getGeneratedCode().getFactory(); } private AbstractProjectGenerator<? extends GenerationRepository> _projectGenerator; protected GCAction(FlexoActionType<A, T1, CGObject> actionType, T1 focusedObject, Vector<CGObject> globalSelection, FlexoEditor editor) { super(actionType, focusedObject, globalSelection, editor); } @Override public GenerationRepository getRepository() { return getRepository(getFocusedObject(), getGlobalSelection()); } public AbstractProjectGenerator<? extends GenerationRepository> getProjectGenerator() { GenerationRepository repository = getRepository(); if (_projectGenerator == null && repository != null) { if (repository.getProjectGenerator() instanceof AbstractProjectGenerator) { _projectGenerator = (AbstractProjectGenerator<? extends GenerationRepository>) repository.getProjectGenerator(); } if (_projectGenerator == null) { if (getProjectGeneratorFactory(repository) != null) { _projectGenerator = getProjectGeneratorFactory(repository).generatorForRepository(getRepository()); } } } if (_projectGenerator != null) { _projectGenerator.setAction(this); } return _projectGenerator; } public static AbstractProjectGenerator<? extends GenerationRepository> getProjectGenerator(GenerationRepository repository) { if (repository == null) { return null; } return getProjectGeneratorFactory(repository) != null ? getProjectGeneratorFactory(repository).generatorForRepository(repository) : null; } public void setProjectGenerator(AbstractProjectGenerator<? extends GenerationRepository> aProjectGenerator) { _projectGenerator = aProjectGenerator; } /** * Return all AbstractCGFile concerned by current selection * * @return */ protected static Vector<AbstractCGFile> getSelectedCGFiles(CGObject focusedObject, Vector<CGObject> globalSelection) { return getSelectedCGFiles(getRepository(focusedObject, globalSelection), getSelectedTopLevelObjects(focusedObject, globalSelection)); } /** * Return all AbstractCGFile concerned by current selection * * @return */ protected static Vector<AbstractCGFile> getSelectedCGFiles(GenerationRepository repository, Vector<CGObject> selectedTopLevelObject) { Vector<AbstractCGFile> returned = new Vector<AbstractCGFile>(); for (CGFile file : repository.getFiles()) { for (CGObject obj : selectedTopLevelObject) { if (obj.contains(file) && file instanceof AbstractCGFile) { returned.add((AbstractCGFile) file); } } } return returned; } /** * Return all AbstractCGFile concerned by current selection * * @return */ protected Vector<AbstractCGFile> getSelectedCGFiles() { return getSelectedCGFiles(getRepository(), getSelectedTopLevelObjects()); } private boolean _saveBeforeGenerating = true; public boolean getSaveBeforeGenerating() { return _saveBeforeGenerating; } public void setSaveBeforeGenerating(boolean saveBeforeGenerating) { _saveBeforeGenerating = saveBeforeGenerating; } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
807b8eded1174e788a0187e1299a67b030e4d0cf
9c1e687a744aa637bc7deba1d7c2c52a17b2dcf4
/seam-security/src/main/java/de/chkal/togglz/seam/security/FeatureAdmin.java
e9a97e6055a75c09bf3fe99609f9f5563b5360bc
[ "Apache-2.0" ]
permissive
mschroeer/togglz
e02d3948888491232161a1da60cf02f818c50836
9417ddbe35be6c7b90f729d0d2f54beaaae37d09
refs/heads/master
2021-01-18T07:18:43.734459
2012-02-03T17:01:10
2012-02-03T17:01:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package de.chkal.togglz.seam.security; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.jboss.seam.security.annotations.SecurityBindingType; @SecurityBindingType @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.METHOD }) public @interface FeatureAdmin { }
[ "christian@kaltepoth.de" ]
christian@kaltepoth.de
397f644a0c8e6b85800a0fa9a5e4a0808418212d
cd604017f6dcc833813536d6005e880d3e7be820
/ahome-sencha-shared/src/main/java/com/ait/toolkit/sencha/shared/client/dom/CompositeElementLite.java
03f082373c81abc499bb1db76318d561876a9fe8
[]
no_license
dikalo/ahome-sencha-shared
ab302fb2aa498f7d23b23a91e324501a76df89b3
1af938cbc08d9a415e2f849dfb165b4b40fbc764
refs/heads/master
2021-06-05T12:12:19.141003
2016-07-19T12:13:51
2016-07-19T12:13:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,594
java
/* Copyright (c) 2014 Ahomé Innovation Technologies. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.ait.toolkit.sencha.shared.client.dom; import com.google.gwt.core.client.JavaScriptObject; /** * Flyweight composite class. Reuses the same Ext.Element for element * operations. */ public class CompositeElementLite extends CompositeElement { public CompositeElementLite(JavaScriptObject jsObj) { super(jsObj); } private static CompositeElementLite instance(JavaScriptObject jsObj) { return new CompositeElementLite(jsObj); } /** * Returns a flyweight Element of the dom element object at the specified * index. * * @param index * the element index * @return the element at index */ public native ExtElement item(int index) /*-{ var cel = this.@com.ait.toolkit.core.client.JsObject::getJsObj()(); var el = cel.item(index); return el == null ? null : @com.ait.toolkit.sencha.shared.client.dom.ExtElement::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(el); }-*/; }
[ "jazzmatadazz@gmail.com" ]
jazzmatadazz@gmail.com
eb169eaa5d78a403dab76ba2b781b709633ec332
bd729ef9fcd96ea62e82bb684c831d9917017d0e
/keche/trunk/supp_app/statistics/src/main/java/com/ctfo/storage/statistics/core/StatisticsMain.java
53b33fdde43eb5692cb473cc8a70a589af49aa79
[]
no_license
shanghaif/workspace-kepler
849c7de67b1f3ee5e7da55199c05c737f036780c
ac1644be26a21f11a3a4a00319c450eb590c1176
refs/heads/master
2023-03-22T03:38:55.103692
2018-03-24T02:39:41
2018-03-24T02:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
915
java
/** * */ package com.ctfo.storage.statistics.core; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.ctfo.storage.statistics.util.ConfigLoader; //import com.ctfo.storage.statistics.util.SystemUtils; import com.ctfo.storage.statistics.util.SystemUtil; /** * 统计服务 */ public class StatisticsMain { private static Logger log = LoggerFactory.getLogger(StatisticsMain.class); public static void main(String[] args) { try{ if (args.length < 3) {//参数不合法 log.error("输入参数不合法,请输入形式如“-d conf start”的参数。"); return; } // 加载配置文件信息 ConfigLoader.getInstance().init(args); // 生成PID文件 SystemUtil.generagePid(); log.info("服务启动完成--ok!"); }catch (Exception e){ log.error("服务启动异常:" + e.getMessage() , e); log.error("系统退出..."); System.exit(0); } } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
5e5af610ea49467536b95f80d317138c1df9fe0f
fb91f96c6deb06ed1289231bf9c96ce64ce4f57a
/src/main/java/pl/asie/charset/package-info.java
326426ba4c5c2b77fd85619e355225e2273143d9
[]
no_license
CharsetMC/Charset
b314c044b618bc66be6b8ddd2f4326553c7efcfa
401e25a10399c19adf1ed893b94dd5867c07a1f0
refs/heads/1.12-stable
2022-09-22T19:59:22.751395
2022-08-31T20:56:19
2022-08-31T20:56:19
47,063,120
59
54
null
2019-07-21T07:11:19
2015-11-29T12:43:17
Java
UTF-8
Java
false
false
879
java
/* * Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020 Adrian Siekierka * * This file is part of Charset. * * Charset 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. * * Charset 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 Charset. If not, see <http://www.gnu.org/licenses/>. */ @ParametersAreNonnullByDefault package pl.asie.charset; import javax.annotation.ParametersAreNonnullByDefault;
[ "kontakt@asie.pl" ]
kontakt@asie.pl
1c61e4761b39b184b051a347adaa1860479f68e8
134fca5b62ca6bac59ba1af5a5ebd271d9b53281
/build/stx/libjava/tests/mauve/java/src/gnu/testlet/java/util/logging/Logger/getAnonymousLogger.java
85bf7a46cf87031a098695e53feb80154f2797a0
[ "MIT" ]
permissive
GunterMueller/ST_STX_Fork
3ba5fb5482d9827f32526e3c32a8791c7434bb6b
d891b139f3c016b81feeb5bf749e60585575bff7
refs/heads/master
2020-03-28T03:03:46.770962
2018-09-06T04:19:31
2018-09-06T04:19:31
147,616,821
3
2
null
null
null
null
UTF-8
Java
false
false
3,554
java
// Tags: JDK1.4 // Uses: TestFilter TestSecurityManager TestResourceBundle // Copyright (C) 2004 Sascha Brawer <brawer@dandelis.ch> // This file is part of Mauve. // Mauve is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // Mauve is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Mauve; see the file COPYING. If not, write to // the Free Software Foundation, 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. package gnu.testlet.java.util.logging.Logger; import gnu.testlet.Testlet; import gnu.testlet.TestHarness; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.Formatter; import java.util.logging.SimpleFormatter; import java.util.MissingResourceException; /** * @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a> */ public class getAnonymousLogger implements Testlet { TestSecurityManager sec = new TestSecurityManager(); public void test(TestHarness th) { Logger al; Throwable caught; TestFilter filter = new TestFilter(); Formatter formatter = new SimpleFormatter(); try { sec.install(); // This used to be 'sec.setGrantLoggingControl(false)', but that // causes Logger.getAnonymousLogger() to fail on JDK 1.4.2. // Stephen Crawley: 2004-05-11 sec.setGrantLoggingControl(true); // Check #1. al = Logger.getAnonymousLogger(); th.check(al != null); // Check #2: New instance for each call. th.check(al != Logger.getAnonymousLogger()); // Check #3. al = Logger.getAnonymousLogger(); th.check(al.getName(), null); // Check #4. th.check(al.getResourceBundle(), null); // Check #5. th.check(al.getResourceBundleName(), null); // Check #6: Parent is root logger. th.check(al.getParent(), Logger.getLogger("")); // Check #7. al.setFilter(filter); al.setUseParentHandlers(false); al.setLevel(Level.FINEST); al.entering("Class", "method", "txt"); th.check(formatter.formatMessage(filter.getLastRecord()), "ENTRY txt"); // Check #8. al = Logger.getAnonymousLogger(TestResourceBundle.class.getName()); th.check(al.getResourceBundle() instanceof TestResourceBundle); // Check #9. al.setFilter(filter); al.setUseParentHandlers(false); al.setLevel(Level.FINEST); al.entering("Class", "method", "txt"); th.check(formatter.formatMessage(filter.getLastRecord()), "BETRETEN txt"); // Check #10. try { Logger.getAnonymousLogger("garbageClassName"); th.check(false); } catch (MissingResourceException ex) { th.check(true); } catch (Exception ex) { th.check(false); th.debug(ex); } } finally { sec.uninstall(); } } }
[ "gunter.mueller@gmail.com" ]
gunter.mueller@gmail.com
d04688db22a8f53a7d847fc987a85131aad1f533
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/com/netflix/conductor/elasticsearch/query/parser/TestComparisonOp.java
97383948cfe095739e3f6c8fc319d6d8645bca87
[]
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
1,523
java
/** * Copyright 2016 Netflix, 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.netflix.conductor.elasticsearch.query.parser; import org.junit.Assert; import org.junit.Test; /** * * * @author Viren */ public class TestComparisonOp extends AbstractParserTest { @Test public void test() throws Exception { String[] tests = new String[]{ "<", ">", "=", "!=", "IN" }; for (String test : tests) { ComparisonOp name = new ComparisonOp(getInputStream(test)); String nameVal = name.getOperator(); Assert.assertNotNull(nameVal); Assert.assertEquals(test, nameVal); } } @Test(expected = ParserException.class) public void testInvalidOp() throws Exception { String test = "AND"; ComparisonOp name = new ComparisonOp(getInputStream(test)); String nameVal = name.getOperator(); Assert.assertNotNull(nameVal); Assert.assertEquals(test, nameVal); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
37d9d82eb18b3170eefcc89ef0289d7fa806d5c7
122287275ec1666cc27a6b6d06bab4f8b1c4ff33
/用到的工具jar包/jars/evosuite-tests/org/apache/bcel/generic/GETSTATIC_ESTest.java
c045158a2be5d168231e308a4efc1893065c6bc5
[]
no_license
NJUCWL/symbolic_tools
f036691918b147019c99584efb4dcbe1228ae6c0
669f549b0a97045de4cd95b1df43de93b1462e45
refs/heads/main
2023-05-09T12:00:57.836897
2021-06-01T13:34:40
2021-06-01T13:34:40
370,017,201
2
0
null
null
null
null
UTF-8
Java
false
false
5,008
java
/* * This file was automatically generated by EvoSuite * Tue Mar 16 14:54:51 GMT 2021 */ package org.apache.bcel.generic; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.bcel.classfile.Constant; import org.apache.bcel.classfile.ConstantFloat; import org.apache.bcel.classfile.ConstantInterfaceMethodref; import org.apache.bcel.classfile.ConstantPool; import org.apache.bcel.generic.ConstantPoolGen; import org.apache.bcel.generic.GETSTATIC; import org.apache.bcel.verifier.structurals.ExecutionVisitor; import org.apache.bcel.verifier.structurals.InstConstraintVisitor; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class GETSTATIC_ESTest extends GETSTATIC_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { GETSTATIC gETSTATIC0 = new GETSTATIC(); ExecutionVisitor executionVisitor0 = new ExecutionVisitor(); // Undeclared exception! try { gETSTATIC0.accept(executionVisitor0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.bcel.generic.FieldOrMethod", e); } } @Test(timeout = 4000) public void test1() throws Throwable { GETSTATIC gETSTATIC0 = new GETSTATIC(); Constant[] constantArray0 = new Constant[3]; ConstantInterfaceMethodref constantInterfaceMethodref0 = new ConstantInterfaceMethodref(31, (-2104)); constantArray0[0] = (Constant) constantInterfaceMethodref0; ConstantPoolGen constantPoolGen0 = new ConstantPoolGen(constantArray0); // Undeclared exception! try { gETSTATIC0.produceStack(constantPoolGen0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Invalid constant pool reference: -2104. Constant pool size is: 256 // verifyException("org.apache.bcel.classfile.ConstantPool", e); } } @Test(timeout = 4000) public void test2() throws Throwable { GETSTATIC gETSTATIC0 = new GETSTATIC(); Constant[] constantArray0 = new Constant[2]; ConstantFloat constantFloat0 = new ConstantFloat(2.0F); constantArray0[0] = (Constant) constantFloat0; ConstantPool constantPool0 = new ConstantPool(constantArray0); ConstantPoolGen constantPoolGen0 = new ConstantPoolGen(constantPool0); // Undeclared exception! try { gETSTATIC0.produceStack(constantPoolGen0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // org.apache.bcel.classfile.ConstantFloat cannot be cast to org.apache.bcel.classfile.ConstantCP // verifyException("org.apache.bcel.generic.FieldOrMethod", e); } } @Test(timeout = 4000) public void test3() throws Throwable { GETSTATIC gETSTATIC0 = null; try { gETSTATIC0 = new GETSTATIC((-968)); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Negative index value: -968 // verifyException("org.apache.bcel.generic.CPInstruction", e); } } @Test(timeout = 4000) public void test4() throws Throwable { GETSTATIC gETSTATIC0 = new GETSTATIC(); // Undeclared exception! try { gETSTATIC0.produceStack((ConstantPoolGen) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.bcel.generic.FieldOrMethod", e); } } @Test(timeout = 4000) public void test5() throws Throwable { GETSTATIC gETSTATIC0 = new GETSTATIC(); Class<?>[] classArray0 = gETSTATIC0.getExceptions(); assertEquals(4, classArray0.length); } @Test(timeout = 4000) public void test6() throws Throwable { GETSTATIC gETSTATIC0 = new GETSTATIC(164); assertEquals(3, gETSTATIC0.getLength()); } @Test(timeout = 4000) public void test7() throws Throwable { GETSTATIC gETSTATIC0 = new GETSTATIC(); InstConstraintVisitor instConstraintVisitor0 = new InstConstraintVisitor(); // Undeclared exception! try { gETSTATIC0.accept(instConstraintVisitor0); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -1 // verifyException("org.apache.bcel.Const", e); } } }
[ "48467952+NJUCWL@users.noreply.github.com" ]
48467952+NJUCWL@users.noreply.github.com
11367ebe58328afa6402e1b5fdbac429f636bd55
70c3b5180c73214b208490bc42a548fe291b2a59
/D180905214/week3/Complex.java
a022861ed970d3db9093e6d4088dd7264d904735
[]
no_license
shikharsrivastav2/OOP-lab
c722edee040c3ef2c8a24793e42cb38a7ff6377b
a5f1ed075a5b1ef7aba6d09175befc8b979a9bcd
refs/heads/master
2020-08-06T10:40:13.709903
2019-10-05T05:12:56
2019-10-05T05:12:56
212,947,090
0
0
null
null
null
null
UTF-8
Java
false
false
1,257
java
import java.util.*; class Complex { float a,b; Complex() { a=0.0f; b=0.0f; } Complex(int x,int y) { a=x; b=y; } void disp() { if(b>0) System.out.println(a+" + i"+b); else if(b==0) System.out.println(a); else System.out.println(a+" - i"+Math.abs(b)); } void read() { System.out.println("enter real and imaginary parts of a+ib"); Scanner sc=new Scanner(System.in); a=sc.nextFloat(); b=sc.nextFloat(); } Complex add(Complex x) { Complex c=new Complex(); c.a=a+x.a; c.b=b+x.b; return c; } Complex sub(Complex x) { Complex c=new Complex(); c.a=a-x.a; c.b=b-x.b; return c; } } class Complextest { public static void main(String args[]) { System.out.println("Enter the two complex numbers"); Complex x=new Complex(); Complex y=new Complex(); Complex z=new Complex(); x.read(); y.read(); System.out.println("x = "); x.disp(); System.out.println("\ny = "); y.disp(); z=x.add(y); System.out.println("The sum of complex numbers is :"); z.disp(); System.out.println("The diffrence of the complex numbers is :"); z=x.sub(y); z.disp(); } }
[ "user" ]
user
741a0d339b767e40147e013270394d1ac45e81d0
42bb692d9140736c468e7ae328564c12b830b4be
/bitcamp-javabasic/src/step17/ex2/Exam03.java
fa1254e83e54af89662e0dfa614f097fa87a92cc
[]
no_license
kimkwanhee/bitcamp
b047f4cc391d2c43bad858f2ffb4f3a6a3779aa2
0245693f83b06d773365b9b5b6b3d4747877d070
refs/heads/master
2021-01-24T10:28:06.247239
2018-08-20T03:13:18
2018-08-20T03:13:18
123,054,178
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
//상수 코드를 스태틱 중첩 클래스로 다루기 package step17.ex2; public class Exam03 { public static void main(String[] args) { Product2 p = new Product2(); p.category = Category2.appliance.TV; p.name = "울트라 비젼 뷰"; p.price = 2000000; } }
[ "rhdwn1955@naver.com" ]
rhdwn1955@naver.com
def38ebf401d48df4b42c1357086c8d683bd3c05
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/pentaho/di/core/row/RowTest.java
a916a61e76d34f732300d0f8b2c8d73ee23adce8
[]
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
5,442
java
/** * ! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2018 by Hitachi Vantara : http://www.pentaho.com * * ****************************************************************************** * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * **************************************************************************** */ package org.pentaho.di.core.row; import java.math.BigDecimal; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Date; import org.junit.Assert; import org.junit.ClassRule; import org.junit.Test; import org.pentaho.di.junit.rules.RestorePDIEnvironment; public class RowTest { @ClassRule public static RestorePDIEnvironment env = new RestorePDIEnvironment(); @Test public void testNormalStringConversion() throws Exception { SimpleDateFormat fmt = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS"); Object[] rowData1 = new Object[]{ "sampleString", fmt.parse("2007/05/07 13:04:13.203"), new Double(9123.0), new Long(12345), new BigDecimal("123456789012345678.9349"), Boolean.TRUE }; RowMetaInterface rowMeta1 = createTestRowMetaNormalStringConversion1(); Assert.assertEquals("sampleString", rowMeta1.getString(rowData1, 0)); Assert.assertEquals("2007/05/07 13:04:13.203", rowMeta1.getString(rowData1, 1)); Assert.assertEquals("9,123.00", rowMeta1.getString(rowData1, 2)); Assert.assertEquals("0012345", rowMeta1.getString(rowData1, 3)); Assert.assertEquals("123456789012345678.9349", rowMeta1.getString(rowData1, 4)); Assert.assertEquals("Y", rowMeta1.getString(rowData1, 5)); fmt = new SimpleDateFormat("yyyyMMddHHmmss"); Object[] rowData2 = new Object[]{ null, fmt.parse("20070507130413"), new Double(9123.9), new Long(12345), new BigDecimal("123456789012345678.9349"), Boolean.FALSE }; RowMetaInterface rowMeta2 = createTestRowMetaNormalStringConversion2(); Assert.assertTrue(((rowMeta2.getString(rowData2, 0)) == null)); Assert.assertEquals("20070507130413", rowMeta2.getString(rowData2, 1)); Assert.assertEquals("9.123,9", rowMeta2.getString(rowData2, 2)); Assert.assertEquals("0012345", rowMeta2.getString(rowData2, 3)); Assert.assertEquals("123456789012345678.9349", rowMeta2.getString(rowData2, 4)); Assert.assertEquals("false", rowMeta2.getString(rowData2, 5)); } @Test public void testIndexedStringConversion() throws Exception { String[] colors = new String[]{ "Green", "Red", "Blue", "Yellow", null }; // create some timezone friendly dates SimpleDateFormat fmt = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS"); Date[] dates = new Date[]{ fmt.parse("2007/05/07 13:04:13.203"), null, fmt.parse("2007/05/05 05:15:49.349"), fmt.parse("2007/05/05 19:08:44.736") }; RowMetaInterface rowMeta = createTestRowMetaIndexedStringConversion1(colors, dates); Object[] rowData1 = new Object[]{ Integer.valueOf(0), Integer.valueOf(0) }; Object[] rowData2 = new Object[]{ Integer.valueOf(1), Integer.valueOf(1) }; Object[] rowData3 = new Object[]{ Integer.valueOf(2), Integer.valueOf(2) }; Object[] rowData4 = new Object[]{ Integer.valueOf(3), Integer.valueOf(3) }; Object[] rowData5 = new Object[]{ Integer.valueOf(4), Integer.valueOf(0) }; Assert.assertEquals("Green", rowMeta.getString(rowData1, 0)); Assert.assertEquals("2007/05/07 13:04:13.203", rowMeta.getString(rowData1, 1)); Assert.assertEquals("Red", rowMeta.getString(rowData2, 0)); Assert.assertTrue((null == (rowMeta.getString(rowData2, 1)))); Assert.assertEquals("Blue", rowMeta.getString(rowData3, 0)); Assert.assertEquals("2007/05/05 05:15:49.349", rowMeta.getString(rowData3, 1)); Assert.assertEquals("Yellow", rowMeta.getString(rowData4, 0)); Assert.assertEquals("2007/05/05 19:08:44.736", rowMeta.getString(rowData4, 1)); Assert.assertTrue((null == (rowMeta.getString(rowData5, 0)))); Assert.assertEquals("2007/05/07 13:04:13.203", rowMeta.getString(rowData5, 1)); } @Test public void testExtractDataWithTimestampConversion() throws Exception { RowMetaInterface rowMeta = createTestRowMetaNormalTimestampConversion(); Timestamp constTimestamp = Timestamp.valueOf("2012-04-05 04:03:02.123456"); Timestamp constTimestampForDate = Timestamp.valueOf("2012-04-05 04:03:02.123"); makeTestExtractDataWithTimestampConversion(rowMeta, " Test1", constTimestamp, constTimestamp); makeTestExtractDataWithTimestampConversion(rowMeta, " Test2", new Date(constTimestamp.getTime()), constTimestampForDate); makeTestExtractDataWithTimestampConversion(rowMeta, " Test3", new java.sql.Date(constTimestamp.getTime()), constTimestampForDate); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
0cce43b597fd4e0c16edc3c560f4b04a0adb97e1
a0098e9d639e543208bf9e8fa1db072b2dc36a42
/src/main/java/es/once/Pizza/model/Comentario.java
fc9244e5c51d29299234d3707280abd3e2581710
[]
no_license
pacomonle/pizzaworld2
ef52bbb2cb2cfdd5b5f1321d2493a97de7d3593d
6a8cf946f156204d0b62b28d822547708ef8ca54
refs/heads/master
2021-02-10T09:59:32.685726
2020-03-02T13:01:04
2020-03-02T13:01:04
244,372,061
0
0
null
null
null
null
UTF-8
Java
false
false
1,774
java
package es.once.Pizza.model; import java.util.Calendar; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @Entity public class Comentario { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; // clave principal de la tabla (autonumérico Long) private String texto; // texto del comentario private String user; // usuario private int puntuacion; // puntuación que se otorga a la pizza private Calendar fecha; // relación de la tabla comentarios con la table Pizza por medio de // @JoinColumn. Se creará una columna FK llamada idPizza en comentarios // que corresponde a la PK de la tabla Pizza // también activamos el modo Lazy @ManyToOne //@JoinColumn(name = "id_pizza") private Pizza pizza; public String getTexto() { return texto; } public void setTexto(String texto) { this.texto = texto; } public String getUser() { return user; } public void setUser(String user) { this.user = user; } public int getPuntuacion() { return puntuacion; } public void setPuntuacion(int puntuacion) { this.puntuacion = puntuacion; } public Calendar getFecha() { return fecha; } public void setFecha(Calendar fecha) { this.fecha = fecha; } public Comentario(String texto, String user, long idPizza, int puntuacion, Calendar fecha) { this.texto = texto; this.user = user; this.puntuacion = puntuacion; this.fecha = fecha; } }
[ "you@example.com" ]
you@example.com
c88ac9a73521290fabcbaf6240d070ab606df1b1
0b26aac6cb5103a25ee1cf73663a3e0adff780b4
/kubernetes/src/test/java/io/kubernetes/client/openapi/models/V1beta1RuntimeClassListTest.java
6871b8299d0ec27d74eb6cfc443f834b8848c073
[ "Apache-2.0" ]
permissive
wings-software/java
b7b551989aaf6a943b0f9bf26c4e030ddc6a99f6
ec60b5246a444631fb1a2c72bda6bfb901679bef
refs/heads/master
2020-09-20T14:28:47.084448
2019-12-18T20:41:46
2019-12-18T20:41:46
224,510,803
1
0
Apache-2.0
2019-12-18T20:41:47
2019-11-27T20:21:05
null
UTF-8
Java
false
false
1,848
java
/* * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1.15.6 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package io.kubernetes.client.openapi.models; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ListMeta; import io.kubernetes.client.openapi.models.V1beta1RuntimeClass; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for V1beta1RuntimeClassList */ public class V1beta1RuntimeClassListTest { private final V1beta1RuntimeClassList model = new V1beta1RuntimeClassList(); /** * Model tests for V1beta1RuntimeClassList */ @Test public void testV1beta1RuntimeClassList() { // TODO: test V1beta1RuntimeClassList } /** * Test the property 'apiVersion' */ @Test public void apiVersionTest() { // TODO: test apiVersion } /** * Test the property 'items' */ @Test public void itemsTest() { // TODO: test items } /** * Test the property 'kind' */ @Test public void kindTest() { // TODO: test kind } /** * Test the property 'metadata' */ @Test public void metadataTest() { // TODO: test metadata } }
[ "291271447@qq.com" ]
291271447@qq.com
aaa7bec1f1ed4d62f296bc5267b89b478d710d7c
08506438512693067b840247fa2c9a501765f39d
/Product/Production/Services/AdminDistributionCore/src/test/java/gov/hhs/fha/nhinc/admindistribution/AdminDistributionUtilsTest.java
21f814ee0e539c639be9bf7b02bcfe970a39c5b2
[]
no_license
AurionProject/Aurion
2f577514de39e91e1453c64caa3184471de891fa
b99e87e6394ecdde8a4197b755774062bf9ef890
refs/heads/master
2020-12-24T07:42:11.956869
2017-09-27T22:08:31
2017-09-27T22:08:31
49,459,710
1
0
null
2017-03-07T23:24:56
2016-01-11T22:55:12
Java
UTF-8
Java
false
false
5,445
java
/* * Copyright (c) 2012, United States Government, as represented by the Secretary of Health and Human Services. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above * copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the United States Government nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT 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 gov.hhs.fha.nhinc.admindistribution; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import gov.hhs.fha.nhinc.largefile.LargeFileUtils; import java.io.File; import java.io.IOException; import java.net.URI; import javax.activation.DataHandler; import oasis.names.tc.emergency.edxl.de._1.ContentObjectType; import oasis.names.tc.emergency.edxl.de._1.EDXLDistribution; import oasis.names.tc.emergency.edxl.de._1.NonXMLContentType; import org.apache.cxf.attachment.ByteDataSource; import org.jmock.Expectations; import org.jmock.Mockery; import org.jmock.integration.junit4.JUnit4Mockery; import org.jmock.lib.legacy.ClassImposteriser; import org.junit.Test; /** * @author akong * */ public class AdminDistributionUtilsTest { final String URI_STRING = "file:///nhin/temp"; final String URI_SAVED_FILE_STRING = "file:///nhin/temp/saved"; protected Mockery context = new JUnit4Mockery() { { setImposteriser(ClassImposteriser.INSTANCE); } }; final LargeFileUtils mockFileUtils = context.mock(LargeFileUtils.class); @Test public void testConvertFileLocationToDataIfEnabled() throws Exception { AdminDistributionUtils adminUtils = createAdminDistributionUtils(); context.checking(new Expectations() { { oneOf(mockFileUtils).isParsePayloadAsFileLocationEnabled(); will(returnValue(true)); oneOf(mockFileUtils).parseBase64DataAsUri( with(any(DataHandler.class))); will(returnValue(new URI(URI_SAVED_FILE_STRING))); oneOf(mockFileUtils) .convertToDataHandler(with(any(File.class))); will(returnValue(createDataHandler())); } }); EDXLDistribution request = createEDXLDistribution(); adminUtils.convertFileLocationToDataIfEnabled(request); DataHandler dh = request.getContentObject().get(0).getNonXMLContent() .getContentData(); assertNotNull(dh); } @Test public void testConvertDataToFileLocationIfEnabled() throws Exception { AdminDistributionUtils adminUtils = createAdminDistributionUtils(); context.checking(new Expectations() { { oneOf(mockFileUtils).isSavePayloadToFileEnabled(); will(returnValue(true)); oneOf(mockFileUtils).generateAttachmentFile(); will(returnValue(new File(new URI(URI_SAVED_FILE_STRING)))); oneOf(mockFileUtils).saveDataToFile( with(any(DataHandler.class)), with(any(File.class))); oneOf(mockFileUtils).convertToDataHandler( with(any(String.class))); will(returnValue(LargeFileUtils.getInstance() .convertToDataHandler(URI_SAVED_FILE_STRING))); } }); EDXLDistribution request = createEDXLDistribution(); adminUtils.convertDataToFileLocationIfEnabled(request); URI contentUri = LargeFileUtils.getInstance().parseBase64DataAsUri( request.getContentObject().get(0).getNonXMLContent() .getContentData()); assertEquals(URI_SAVED_FILE_STRING, contentUri.toString()); } private EDXLDistribution createEDXLDistribution() throws IOException { LargeFileUtils fileUtils = LargeFileUtils.getInstance(); EDXLDistribution request = new EDXLDistribution(); ContentObjectType co = new ContentObjectType(); NonXMLContentType nonXmlContentType = new NonXMLContentType(); DataHandler dh = fileUtils.convertToDataHandler(URI_STRING); nonXmlContentType.setContentData(dh); co.setNonXMLContent(nonXmlContentType); request.getContentObject().add(co); return request; } private DataHandler createDataHandler() { ByteDataSource bds = new ByteDataSource(new byte[0]); return new DataHandler(bds); } private AdminDistributionUtils createAdminDistributionUtils() { return new AdminDistributionUtils() { protected LargeFileUtils getLargeFileUtils() { return mockFileUtils; } }; } }
[ "neilkwebb@hotmail.com" ]
neilkwebb@hotmail.com
86e1c9abf93c86882596646b7ec8fe02289cff51
d4a66f65524001d0b33d90f6d839981bf6f8c67c
/src/test/java/com/illud/redalert/repository/timezone/DateTimeWrapperRepository.java
f2a3e3b3ba45e86160a144351836dcb0be64bb1e
[]
no_license
illudtechzone/redAlert-Gateway
ea80fa5429d7a74f56addd7024aa75f2ba9d314f
f4ac4737526d3f195a8978497d27c145c0e74895
refs/heads/master
2023-05-14T14:36:20.082351
2019-07-22T06:58:24
2019-07-22T06:58:24
189,348,490
0
0
null
2023-05-01T06:08:43
2019-05-30T05:02:06
Java
UTF-8
Java
false
false
337
java
package com.illud.redalert.repository.timezone; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; /** * Spring Data JPA repository for the DateTimeWrapper entity. */ @Repository public interface DateTimeWrapperRepository extends JpaRepository<DateTimeWrapper, Long> { }
[ "prince.k.c@lxisoft.com" ]
prince.k.c@lxisoft.com
b55448744f534fd4d9e8abab1dcf62f91a4c22bd
a0fb635d5316fe7d427b71ae661ed65eca136d85
/src/main/java/com/azkabanconn/utils/SpringContextUtil.java
822a9ab91e575c0d5f4f07631eecf358f983d493
[]
no_license
CzyerChen/azkabanApi
aba103de42deca4166a3aae1719c70d24cb56f4e
6dcad9c58818a189c8fcd8785a048e0a01e0aa9d
refs/heads/master
2022-06-24T08:53:26.807358
2020-03-13T05:45:22
2020-03-13T05:45:22
246,973,855
0
0
null
2022-06-17T02:59:28
2020-03-13T02:40:22
Java
UTF-8
Java
false
false
1,308
java
package com.azkabanconn.utils; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; /** * @author: claire on 2019-06-21 - 15:24 **/ @Component public class SpringContextUtil implements ApplicationContextAware { private static ApplicationContext applicationContext; @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { SpringContextUtil.applicationContext = applicationContext; } public static Object getBean(String name) { return applicationContext.getBean(name); } public static <T> T getBean(Class<T> clazz){ return applicationContext.getBean(clazz); } public static <T> T getBean(String name, Class<T> requiredType) { return applicationContext.getBean(name, requiredType); } public static boolean containsBean(String name) { return applicationContext.containsBean(name); } public static boolean isSingleton(String name) { return applicationContext.isSingleton(name); } public static Class<?> getType(String name) { return applicationContext.getType(name); } }
[ "clairelove.chen@gmail.com" ]
clairelove.chen@gmail.com
575484185141e5cf72146462a5fa177af3301af8
55042d6a62a329d6e2ab268f00c80663d868aeb5
/src/chap18/complex2/Model2.java
4cfd23f46bbd5f4935e74f6bfb04ccdd7d28d1e5
[]
no_license
wkdalswn11/jsp20201103
92e38add2490ef35396d15a72b22a1e083f892cb
6dd2d410401fadd423d7d037435bef2d21c78b21
refs/heads/master
2023-01-20T07:42:37.676515
2020-12-02T08:52:48
2020-12-02T08:52:48
309,549,728
0
0
null
null
null
null
UTF-8
Java
false
false
198
java
package chap18.complex2; import java.util.Date; public class Model2 implements ModelInterface{ @Override public Object execute() { // TODO Auto-generated method stub return new Date(); } }
[ "wkdalswn133@naver.com" ]
wkdalswn133@naver.com
83888dd7c72ae59e52f5a622becb10edb9ee005d
5c42d61c41aa0594f0598f951ac69bb891f10a26
/swtbot.example.view/src/swtbot/example/view/Activator.java
adcb8e20224e4c018f080c94c25ad8ecec8fbb86
[]
no_license
LorenzoBettini/swtbot-example
898b0737edfe19ed719bfaf9096c2b4381dc64e5
cafb9b53e7680273bf7005a7b88a318fb06bfedb
refs/heads/master
2021-05-04T10:09:00.444778
2017-11-14T20:12:25
2017-11-14T20:16:53
47,764,839
1
1
null
2017-11-14T20:15:49
2015-12-10T13:50:54
Java
UTF-8
Java
false
false
1,360
java
package swtbot.example.view; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class Activator extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "swtbot.example.view"; //$NON-NLS-1$ // The shared instance private static Activator plugin; /** * The constructor */ public Activator() { } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); } /** * Returns the shared instance * * @return the shared instance */ public static Activator getDefault() { return plugin; } /** * Returns an image descriptor for the image file at the given * plug-in relative path * * @param path the path * @return the image descriptor */ public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); } }
[ "lorenzo.bettini@gmail.com" ]
lorenzo.bettini@gmail.com
d4c99a0a1deb46d5cc54840ef2b9786b48855df5
b9beee9fe60473fd7f0657eaeb54182108f0ae21
/spring-cloud-2020/cloud-provider-payment-8001/src/main/java/cn/ac/hwy/springcloud/utils/MessageResult.java
a978ffb84d65314447188f965b96d0a95a37d023
[ "Apache-2.0" ]
permissive
HWYWL/spring-cloud-examples
40fb647c1f5f0f6f8de0048358ba3e4ced7e288f
ea22a7e29eb78a43069af218b700773e6930b26a
refs/heads/master
2022-08-15T23:21:49.098129
2022-07-08T06:37:06
2022-07-08T06:37:06
129,830,682
0
0
Apache-2.0
2022-07-08T06:37:07
2018-04-17T01:56:23
Java
UTF-8
Java
false
false
1,878
java
package cn.ac.hwy.springcloud.utils; /** * 统一返回数据格式 * @author YI * @date 2018-8-22 11:25:56 */ public class MessageResult<T> { private int code = 0; private String msg = "数据读取成功!"; private int count; private T data; public MessageResult() { super(); } public MessageResult(int code, String msg, int count, T data) { this.code = code; this.msg = msg; this.count = count; this.data = data; } public static MessageResult ok() { return new MessageResult(); } public static MessageResult ok(Object data) { MessageResult result = new MessageResult(); result.setData(data); return result; } public static MessageResult errorMsg(String msg) { return new MessageResult(-1, msg, 0, null); } public static MessageResult errorMap(Object data) { return new MessageResult(-1, "ERROR:出错啦,么么哒!!!", 0, data); } public static MessageResult errorTokenMsg(String msg) { return new MessageResult(-1, msg, 0, null); } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } public T getData() { return data; } public void setData(T data) { this.data = data; } @Override public String toString() { return "MessageResult{" + "code=" + code + ", msg='" + msg + '\'' + ", count=" + count + ", data=" + data + '}'; } }
[ "ilovey_hwy@163.com" ]
ilovey_hwy@163.com
26fc941bbc42a4f8687c037e7cf1e932d247c0b6
9bf6dee1407f112cebf42443e0f492e89d0d3fbc
/gameserver/data/scripts/system/handlers/quest/charlirunerks_daemons/_46510SnufflerSaboteur.java
ac5c732823eff4974b339ffc5f5502ac643e0bc2
[]
no_license
vavavr00m/aion-source
6caef6738fee6d4898fcb66079ea63da46f5c9c0
8ce4c356d860cf54e5f3fe4a799197725acffc3b
refs/heads/master
2021-01-10T02:08:43.965463
2011-08-22T10:47:12
2011-08-22T10:47:12
50,949,918
1
0
null
null
null
null
UTF-8
Java
false
false
2,842
java
/* * This file is part of aion-unique * * aion-engine is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * aion-unique is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package quest.charlirunerks_daemons; import org.openaion.gameserver.model.EmotionType; import org.openaion.gameserver.model.gameobjects.Npc; import org.openaion.gameserver.model.gameobjects.VisibleObject; import org.openaion.gameserver.model.gameobjects.player.Player; import org.openaion.gameserver.quest.handlers.QuestHandler; import org.openaion.gameserver.quest.model.QuestCookie; import org.openaion.gameserver.quest.model.QuestState; import org.openaion.gameserver.quest.model.QuestStatus; import org.openaion.gameserver.services.QuestService; public class _46510SnufflerSaboteur extends QuestHandler { private final static int questId = 46510; public _46510SnufflerSaboteur() { super(questId); } @Override public boolean onDialogEvent(QuestCookie env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); if(defaultQuestStartDaily(env)) return true; if(qs == null) return false; if(qs.getStatus() == QuestStatus.START) { if(env.getTargetId() == 700774) return defaultQuestUseNpc(env, 0, 1, EmotionType.NEUTRALMODE2, EmotionType.START_LOOT, true); } if(defaultQuestRewardDialog(env, 799882, 10002) || defaultQuestRewardDialog(env, 799883, 10002)) return true; else return false; } @Override public boolean onKillEvent(QuestCookie env) { return defaultQuestOnKillEvent(env, 216641, 0, true); } @Override public void QuestUseNpcInsideFunction(QuestCookie env) { Player player = env.getPlayer(); VisibleObject vO = env.getVisibleObject(); if(vO instanceof Npc) { Npc trap = (Npc)vO; if(trap.getNpcId() == 700774) QuestService.addNewSpawn(player.getWorldId(), player.getInstanceId(), 216641, trap.getX(), trap.getY(), trap.getZ(), (byte) 0, true); } } @Override public void register() { qe.setNpcQuestData(700774).addOnTalkEvent(questId); qe.setNpcQuestData(799882).addOnTalkEvent(questId); qe.setNpcQuestData(799883).addOnTalkEvent(questId); qe.setNpcQuestData(216641).addOnKillEvent(questId); } }
[ "tomulescu@gmail.com" ]
tomulescu@gmail.com
1003908fe5deeb3a78b89549fa9f6dfe7e623354
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE129_Improper_Validation_of_Array_Index/CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_check_min_75a.java
408c9d130a9deaf2fc84590a409f3b6522be0827
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
7,974
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_check_min_75a.java Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml Template File: sources-sinks-75a.tmpl.java */ /* * @description * CWE: 129 Improper Validation of Array Index * BadSource: getCookies_Servlet Read data from the first cookie using getCookies() * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: array_read_check_min * GoodSink: Read from array after verifying that data is at least 0 and less than array.length * BadSink : Read from array after verifying that data is at least 0 (but not verifying that data less than array.length) * Flow Variant: 75 Data flow: data passed in a serialized object from one method to another in different source files in the same package * * */ package testcases.CWE129_Improper_Validation_of_Array_Index; import testcasesupport.*; import java.io.ByteArrayOutputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import java.sql.*; import javax.servlet.http.*; import javax.servlet.http.*; import java.util.logging.Level; import java.util.logging.Logger; public class CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_check_min_75a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; data = Integer.MIN_VALUE; /* initialize data in case there are no cookies */ /* Read data from cookies */ { Cookie cookieSources[] = request.getCookies(); if (cookieSources != null) { /* POTENTIAL FLAW: Read data from the first cookie value */ String s_data = cookieSources[0].getValue(); try { data = Integer.parseInt(s_data.trim()); } catch(NumberFormatException nfe) { IO.logger.log(Level.WARNING, "Number format exception reading data from cookie", nfe); } } } // serialize data to a byte array ByteArrayOutputStream baos = null; ObjectOutput out = null; try { baos = new ByteArrayOutputStream() ; out = new ObjectOutputStream(baos) ; out.writeObject(data); byte[] data_serialized = baos.toByteArray(); (new CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_check_min_75b()).bad_sink(data_serialized , request, response ); } catch (IOException e) { IO.logger.log(Level.WARNING, "IOException in serialization", e); } finally { // clean up stream writing objects try { if (out != null) { out.close(); } } catch (IOException ioe) { IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", ioe); } try { if (baos != null) { baos.close(); } } catch (IOException ioe) { IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", ioe); } } } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* goodG2B() - use GoodSource and BadSink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; // serialize data to a byte array ByteArrayOutputStream baos = null; ObjectOutput out = null; try { baos = new ByteArrayOutputStream() ; out = new ObjectOutputStream(baos) ; out.writeObject(data); byte[] data_serialized = baos.toByteArray(); (new CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_check_min_75b()).goodG2B_sink(data_serialized , request, response ); } catch (IOException e) { IO.logger.log(Level.WARNING, "IOException in serialization", e); } finally { // clean up stream writing objects try { if (out != null) { out.close(); } } catch (IOException ioe) { IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", ioe); } try { if (baos != null) { baos.close(); } } catch (IOException ioe) { IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", ioe); } } } /* goodB2G() - use BadSource and GoodSink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; data = Integer.MIN_VALUE; /* initialize data in case there are no cookies */ /* Read data from cookies */ { Cookie cookieSources[] = request.getCookies(); if (cookieSources != null) { /* POTENTIAL FLAW: Read data from the first cookie value */ String s_data = cookieSources[0].getValue(); try { data = Integer.parseInt(s_data.trim()); } catch(NumberFormatException nfe) { IO.logger.log(Level.WARNING, "Number format exception reading data from cookie", nfe); } } } // serialize data to a byte array ByteArrayOutputStream baos = null; ObjectOutput out = null; try { baos = new ByteArrayOutputStream() ; out = new ObjectOutputStream(baos) ; out.writeObject(data); byte[] data_serialized = baos.toByteArray(); (new CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_check_min_75b()).goodB2G_sink(data_serialized , request, response ); } catch (IOException e) { IO.logger.log(Level.WARNING, "IOException in serialization", e); } finally { // clean up stream writing objects try { if (out != null) { out.close(); } } catch (IOException ioe) { IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", ioe); } try { if (baos != null) { baos.close(); } } catch (IOException ioe) { IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", ioe); } } } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
7cc04b99b934ae428177d1b2c23d7f9969500f31
f9a6b01dde5f64c5549bf491f03821b69804c925
/src/com/lrf/feature/Son.java
dfd51c7d2691405fec964b0165cab8afa9602135
[]
no_license
lirf2018/javaproject
d0feb8a4d8cc6777e620ead3fb5273b90a880424
f8078d1c06741ca7b3a376b0adbb3aa159899f9f
refs/heads/master
2020-06-17T11:16:15.226540
2019-07-09T01:17:51
2019-07-09T01:17:51
195,908,003
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package com.lrf.feature; /** * 创建人: lirf * 创建时间: 2019/3/7 13:47 * 功能介绍: */ public class Son extends ParentA { /** * @param a * @return void * @desc 子类重载父类方法 * 父类中不存在该方法,向上转型后,父类是不能引用该方法的 */ public void fun1(String a) { System.out.println("Son 的 Fun1..."); fun2(); } /** * 子类重写父类方法 * 指向子类的父类引用调用fun2时,必定是调用该方法 */ public void fun2() { System.out.println("Son 的Fun2..."); } }
[ "512164882@qq.com" ]
512164882@qq.com
9eeb78db5ba78b86306210b2124991ea3da941e4
d10598f7effdb3e7c39590bbced5ede1bb8fcf57
/app/src/main/java/com/fanchen/imovie/view/video_new/Clarity.java
dda9e7a5f57a6c95cf5d49e4eee09ca46485e963
[]
no_license
ycyranqingjjs/Bangumi
6f32235e2b4dba1cc9a48439cd27444aa628cbeb
dddc1772ef5f05072b4865b05b727a7ec541b68c
refs/heads/master
2020-04-07T23:31:26.314885
2018-10-24T06:17:08
2018-10-24T06:17:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package com.fanchen.imovie.view.video_new; /** * 清晰度 */ public class Clarity { public String grade; // 清晰度等级 public String p; // 270P、480P、720P、1080P、4K ... public String videoUrl; // 视频链接地址 public Clarity(String grade, String p, String videoUrl) { this.grade = grade; this.p = p; this.videoUrl = videoUrl; } }
[ "happy1993_chen@sina.cn" ]
happy1993_chen@sina.cn
8f20e316c756d749e25881a93599e6f0a04600e4
2f4043aef4e367a102034d37b5cc62e4b1c1e2c6
/WORKSHOP_ONE/viceCitySecondPart/models/neighbourhood/GangNeighbourhood.java
07b72b3288643cf69fd8702243bbce0a78471b41
[]
no_license
zulnerub/Java---Java-OOP
e56008c97e1417abf8e6c3f9c6e1a60caaf57f01
526ff2ea05549f6b32445f69abc51bef9736d89e
refs/heads/master
2020-12-09T19:16:13.096221
2020-01-12T14:42:00
2020-01-12T14:42:00
233,395,322
0
0
null
null
null
null
UTF-8
Java
false
false
1,541
java
package WORKSHOP_ONE.viceCitySecondPart.models.neighbourhood; import WORKSHOP_ONE.viceCitySecondPart.models.guns.Gun; import WORKSHOP_ONE.viceCitySecondPart.models.players.Player; import java.util.ArrayDeque; import java.util.Collection; public class GangNeighbourhood implements Neighbourhood { @Override public void action(Player mainPlayer, Collection<Player> civilPlayers) { this.mainPlayerAttacksNPCs(mainPlayer, civilPlayers); this.NPCsAttackMainPlayer(mainPlayer, civilPlayers); } private void mainPlayerAttacksNPCs(Player mainPlayer, Collection<Player> civilPlayers){ for (Player civilPlayer: civilPlayers){ this.shootEnemy(mainPlayer, civilPlayer); } } private void NPCsAttackMainPlayer(Player mainPlayer, Collection<Player> civilPlayers){ for (Player civilPlayer: civilPlayers){ if (!mainPlayer.isAlive()){ break; } if (civilPlayer.isAlive()){ this.shootEnemy(civilPlayer, mainPlayer); } } } private void shootEnemy(Player attacker, Player victim){ ArrayDeque<Gun> guns = new ArrayDeque<>(); attacker.getGunRepository().getModels().forEach(guns::offer); while (!guns.isEmpty() && victim.isAlive()){ Gun currentGun = guns.poll(); while (currentGun.canFire() && victim.isAlive()){ int dmg = currentGun.fire(); victim.takeLifePoints(dmg); } } } }
[ "drsimeon_87@abv.bg" ]
drsimeon_87@abv.bg
1564dc8205120d521684d93358059af00ffd1c8f
3c1f2f15aef624726bbc12f18303f19945018122
/HomeTasks/lebed-raque-schooqua-GUI/src/sample/controllers/SettingsController.java
3e76f68b66759fe73a8c63e97c2eade674911e7d
[]
no_license
diedino/Java
fdbdf2dcaf8231b5b8e22eec2d1299d34d0008b1
2206c329342755207a3a204b79c75d1c84b402f7
refs/heads/master
2020-04-22T07:26:50.039722
2019-12-03T07:58:20
2019-12-03T07:58:20
170,216,888
0
0
null
null
null
null
UTF-8
Java
false
false
1,925
java
package sample.controllers; import java.net.URL; import java.util.ResourceBundle; import javafx.fxml.FXML; import javafx.scene.control.Alert; import javafx.scene.control.Button; import javafx.scene.control.TextField; import javax.sound.midi.SysexMessage; public class SettingsController { @FXML private ResourceBundle resources; @FXML private URL location; @FXML private TextField sleepField; @FXML private Button acceptbtn; @FXML private TextField coefField; @FXML private TextField angleField; @FXML void initialize() { acceptbtn.setOnAction(actionEvent -> { if (!tryParseInt(angleField.getText())) { parseAttentionBox("angle"); return; } else { if (Integer.parseInt(angleField.getText()) < 0 || Integer.parseInt(angleField.getText()) > 360) { Alert alert = new Alert(Alert.AlertType.INFORMATION); alert.setTitle("angle"); alert.setHeaderText("Angle can't be more 360 or less 0"); alert.show(); return; } } if (!tryParseInt(coefField.getText())) { parseAttentionBox("coefficient"); return; } if (!tryParseInt(sleepField.getText())) { parseAttentionBox("sleep"); return; } }); } boolean tryParseInt(String value) { try { Integer.parseInt(value); return true; } catch (NumberFormatException e) { return false; } } public void parseAttentionBox(String str) { Alert alert = new Alert(Alert.AlertType.INFORMATION); alert.setTitle(str); alert.setHeaderText("Can't parse" + " " + str + " " + "field"); alert.show(); } }
[ "you@example.com" ]
you@example.com
d9e9fc45fd727cfac60a4821984efb933c92d7ff
d62c759ebcb73121f42a221776d436e9368fdaa8
/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKPropertiesBuilder.java
c21540ad6b35c4060c36479405046ef1ed6eef0f
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gnodet/jclouds
0152a4e7d6d96ac4ec9fa9746729e3555626ecfe
87dd23551c4d9b727540d9bd333ffd9a1136e58a
refs/heads/master
2020-12-24T23:19:24.785844
2011-09-16T15:52:12
2011-09-16T15:52:12
2,399,075
1
0
null
null
null
null
UTF-8
Java
false
false
1,737
java
/** * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. jclouds licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.jclouds.rackspace.cloudservers; import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.Constants.PROPERTY_ISO3166_CODES; import java.util.Properties; import org.jclouds.PropertiesBuilder; import org.jclouds.openstack.OpenStackAuthAsyncClient; /** * * @author Adrian Cole */ public class CloudServersUKPropertiesBuilder extends PropertiesBuilder { @Override protected Properties defaultProperties() { Properties properties = super.defaultProperties(); properties.setProperty(PROPERTY_ISO3166_CODES, "GB-SLG"); properties.setProperty(PROPERTY_ENDPOINT, "https://lon.auth.api.rackspacecloud.com"); properties.setProperty(PROPERTY_API_VERSION, OpenStackAuthAsyncClient.VERSION); return properties; } public CloudServersUKPropertiesBuilder(Properties properties) { super(properties); } }
[ "adrian@jclouds.org" ]
adrian@jclouds.org
fa320c1b108e232d21565138ffa87b533d39b09e
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/f/d/g/Calc_1_1_5361.java
1d4e5ccfe7bcc90fa7dbfbd1b043c506cff62c1a
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package f.d.g; public class Calc_1_1_5361 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
33a3a1fbad4b080edc883c51aa8d7288a261c3ee
f91290b43c675f3657994f0b0485c1fc1eac786a
/src/com/pdd/pop/ext/fasterxml/jackson/databind/ser/std/ArraySerializerBase.java
1922b12660196db5e5667cb4c18292c3bad3504c
[]
no_license
lywx215/http-client
49462178ebbbd3469f798f53b16f5cb52db56d72
29871ab097e2e6dfc1bd2ab5f1a63b6146797c5a
refs/heads/master
2021-10-09T09:01:07.389764
2018-12-25T05:06:11
2018-12-25T05:06:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,993
java
package com.pdd.pop.ext.fasterxml.jackson.databind.ser.std; import java.io.IOException; import com.pdd.pop.ext.fasterxml.jackson.annotation.JsonFormat; import com.pdd.pop.ext.fasterxml.jackson.core.*; import com.pdd.pop.ext.fasterxml.jackson.core.type.WritableTypeId; import com.pdd.pop.ext.fasterxml.jackson.databind.*; import com.pdd.pop.ext.fasterxml.jackson.databind.jsontype.TypeSerializer; import com.pdd.pop.ext.fasterxml.jackson.databind.ser.*; /** * Intermediate base class for serializers used for various * Java arrays. * * @param <T> Type of arrays serializer handles */ @SuppressWarnings("serial") public abstract class ArraySerializerBase<T> extends ContainerSerializer<T> implements ContextualSerializer // for 'unwrapSingleElemArray' { protected final BeanProperty _property; /** * Setting for specific local override for "unwrap single element arrays": * true for enable unwrapping, false for preventing it, `null` for using * global configuration. * * @since 2.6 */ protected final Boolean _unwrapSingle; protected ArraySerializerBase(Class<T> cls) { super(cls); _property = null; _unwrapSingle = null; } /** * Use either variant that just takes type (non-contextual), or, * copy constructor that allows passing of property. * * @deprecated Since 2.6 */ @Deprecated protected ArraySerializerBase(Class<T> cls, BeanProperty property) { super(cls); _property = property; _unwrapSingle = null; } protected ArraySerializerBase(ArraySerializerBase<?> src) { super(src._handledType, false); _property = src._property; _unwrapSingle = src._unwrapSingle; } /** * @since 2.6 */ protected ArraySerializerBase(ArraySerializerBase<?> src, BeanProperty property, Boolean unwrapSingle) { super(src._handledType, false); _property = property; _unwrapSingle = unwrapSingle; } /** * @deprecated Since 2.6 */ @Deprecated protected ArraySerializerBase(ArraySerializerBase<?> src, BeanProperty property) { super(src._handledType, false); _property = property; _unwrapSingle = src._unwrapSingle; } /** * @since 2.6 */ public abstract JsonSerializer<?> _withResolved(BeanProperty prop, Boolean unwrapSingle); @Override public JsonSerializer<?> createContextual(SerializerProvider serializers, BeanProperty property) throws JsonMappingException { Boolean unwrapSingle = null; // First: if we have a property, may have property-annotation overrides if (property != null) { JsonFormat.Value format = findFormatOverrides(serializers, property, handledType()); if (format != null) { unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED); if (unwrapSingle != _unwrapSingle) { return _withResolved(property, unwrapSingle); } } } return this; } // NOTE: as of 2.5, sub-classes SHOULD override (in 2.4 and before, was final), // at least if they can provide access to actual size of value and use `writeStartArray()` // variant that passes size of array to output, which is helpful with some data formats @Override public void serialize(T value, JsonGenerator gen, SerializerProvider provider) throws IOException { if (_shouldUnwrapSingle(provider)) { if (hasSingleElement(value)) { serializeContents(value, gen, provider); return; } } gen.setCurrentValue(value); gen.writeStartArray(); // [databind#631]: Assign current value, to be accessible by custom serializers serializeContents(value, gen, provider); gen.writeEndArray(); } @Override public final void serializeWithType(T value, JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) throws IOException { // [databind#631]: Assign current value, to be accessible by custom serializers g.setCurrentValue(value); WritableTypeId typeIdDef = typeSer.writeTypePrefix(g, typeSer.typeId(value, JsonToken.START_ARRAY)); serializeContents(value, g, provider); typeSer.writeTypeSuffix(g, typeIdDef); } protected abstract void serializeContents(T value, JsonGenerator jgen, SerializerProvider provider) throws IOException; /** * @since 2.9 */ protected final boolean _shouldUnwrapSingle(SerializerProvider provider) { if (_unwrapSingle == null) { return provider.isEnabled(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED); } return _unwrapSingle.booleanValue(); } }
[ "lenzhao@yahoo.com" ]
lenzhao@yahoo.com
b8f2052ba63d91915fb1b1d12bac915c5a683b0a
05948ca1cd3c0d2bcd65056d691c4d1b2e795318
/classes2/com/xiaoenai/app/classes/street/pay/a/l.java
cf2b859787622a4f1ebcae00adde2695af636682
[]
no_license
waterwitness/xiaoenai
356a1163f422c882cabe57c0cd3427e0600ff136
d24c4d457d6ea9281a8a789bc3a29905b06002c6
refs/heads/master
2021-01-10T22:14:17.059983
2016-10-08T08:39:11
2016-10-08T08:39:11
70,317,042
0
8
null
null
null
null
UTF-8
Java
false
false
845
java
package com.xiaoenai.app.classes.street.pay.a; import android.content.Context; import com.xiaoenai.app.net.m; import org.json.JSONObject; class l extends m { l(k paramk, Context paramContext, f paramf) { super(paramContext); } public void a() { super.a(); this.a.a(); } public void a(int paramInt) { super.a(paramInt); this.a.a(false, null); } public void a(com.xiaoenai.app.net.k paramk) { super.a(paramk); this.a.a(false, null); } public void a(JSONObject paramJSONObject) { super.a(paramJSONObject); this.a.a(paramJSONObject.optBoolean("success", false), paramJSONObject); } } /* Location: E:\apk\xiaoenai2\classes2-dex2jar.jar!\com\xiaoenai\app\classes\street\pay\a\l.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
e395020c839a82d6ca29c89510887c6390a5df55
af58eabf5360cb82082e1b0590696b627118d5a3
/marketing-data/src/main/java/com/zhongmei/bty/basemodule/trade/message/ModifyTradeMemoResp.java
297f6b67dff995a69aec7d1f6454444eb0bcddbb
[]
no_license
sengeiou/marketing-app
f4b670f3996ba190decd2f1b8e4a276eb53b8b2a
278f3da95584e2ab7d97dff1a067db848e70a9f3
refs/heads/master
2020-06-07T01:51:25.743676
2019-06-20T08:58:28
2019-06-20T08:58:28
192,895,799
0
1
null
2019-06-20T09:59:09
2019-06-20T09:59:08
null
UTF-8
Java
false
false
207
java
package com.zhongmei.bty.basemodule.trade.message; import com.zhongmei.yunfu.db.entity.trade.Trade; /** * Created by demo on 2018/12/15 */ public class ModifyTradeMemoResp { public Trade trade; }
[ "yangyuanping_cd@shishike.com" ]
yangyuanping_cd@shishike.com
bc864a42fd65deebe7c18383268b9083893e596b
10f7746148c7432d5415e455b53a8c4993e46263
/SpMVC020_JpaJstl/src/com/lnt/hr/daos/EmpDaoImpl.java
3da0279c4705a9cd2fafcfab2cb2d9ef55e7065e
[]
no_license
itsmezeya/SpringMVC4JPA
db14f163c12c1d12e068edcc78b3adefcce00efe
66bf38aeb15e29668851a2b7b1933d5abdc9bdd3
refs/heads/master
2022-12-24T10:28:23.841751
2019-10-19T14:47:12
2019-10-19T14:47:12
216,184,200
0
0
null
2022-12-16T10:52:15
2019-10-19T09:53:11
Java
UTF-8
Java
false
false
2,510
java
package com.lnt.hr.daos; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.lnt.hr.beans.Employees; import com.lnt.hr.exceptions.EmpException; /* * None of the code of the class to echo any message directly on console. * None of the code of the DAO class to throw SQL exception. * Only custom exceptions are expected to come out. * If Connection Pool is being used, each method must procure connection and return back to pool * before execute of method ends. * One class will refer to another class mostly through interface. * * Scopes in Spring IoC * 1. The 'singleton'/'stateless': This object is created never more than once in a Spring Context. * 2. The 'prototype'/'statefull': This object is created every time asked for. * * There are four sub-annotations of @Component. * @Service: It is for declaring Service classes. * @Repository: It is for declaring DAO classes. * @Controller: It is for Spring MVC web application. * @RestController: It is for publishing services as REST services. * * Transactional Propagation.., * 1. Required(Default): Create and propagate the transaction to the DAO methods * and each DB interaction participate in same transaction. * If DB method does not receive a transaction, create a new one. * 2. RequiresNew * 3. Mandatory * 4. Never * 5. Supported * 6. NotSupported * 7. Nested (Spring Transaction) */ @Repository @Scope("singleton") // By default spring objects are singleton. @Transactional(propagation=Propagation.REQUIRED) public class EmpDaoImpl implements EmpDao { @PersistenceContext private EntityManager manager; @Override public List<Employees> getEmpList() throws EmpException { Query qry = manager.createNamedQuery("allEmps"); return qry.getResultList(); } @Override public Employees getEmpDetails(int empNo) throws EmpException { Employees emp = manager.find(Employees.class, empNo); return emp; } @Override public Employees insertNewEmployee(Employees emp) throws EmpException { //System.out.println(emp); manager.persist(emp); return emp; } }
[ "Admin@Admin-PC" ]
Admin@Admin-PC
2ef40eba1cc288bab6d867898746d24888711224
184495ec2118289403f7cbbea6d1fd910935e582
/src/bitcamp/java89/ems/Student.java
4e7e19e5c1e3d521dd7c9164e7843539f79cb6b5
[]
no_license
leesungbok/bitcamp-team1
236bbbc9659ba3368ccfd3694edbe756a1a68400
13753051c6291856a5d7fdd64bd71e5926295355
refs/heads/master
2021-01-12T13:16:46.073387
2016-10-28T06:49:44
2016-10-28T06:49:44
72,175,273
2
1
null
null
null
null
UTF-8
Java
false
false
420
java
package bitcamp.java89.ems; public class Student { // 인스턴스 변수 String userId; String password; String name; String email; String tel; boolean working; int birthYear; String school; public Student() {} public Student(String userId, String password, String name, String tel) { this.userId = userId; this.password = password; this.name = name; this.tel = tel; } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
c3632fc12e58e932a46c1d1f777f3b70385c8777
89c34fa76bccdbd44f10416e6529899f005aeea1
/src/main/java/com/chinesedreamer/eir/vo/query/PoQueryVo.java
9c7cb009ea00a1005ee5101c73f4dad9319b16f2
[]
no_license
Sos10086tsj/eir
f734971e1b426ef7bc7668d33eb9f8dd280833cb
fd31ba4668d2d54ea6245baa924f93f0fe06c56c
refs/heads/master
2020-07-11T02:09:28.896038
2016-12-06T06:05:30
2016-12-06T06:05:30
74,007,108
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
package com.chinesedreamer.eir.vo.query; /** * Description: * Auth:Paris * Date:Nov 17, 2016 **/ public class PoQueryVo extends PageVo{ private Long poId; private String orderNo; private String styleNo; private Long createUser; public Long getPoId() { return poId; } public void setPoId(Long poId) { this.poId = poId; } public Long getCreateUser() { return createUser; } public void setCreateUser(Long createUser) { this.createUser = createUser; } public String getOrderNo() { return orderNo; } public String getStyleNo() { return styleNo; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public void setStyleNo(String styleNo) { this.styleNo = styleNo; } }
[ "paristao1989@gmail.com" ]
paristao1989@gmail.com
0b4945279863c8575c2120e09c198769b7055bbe
5aa4d6e75dff32e54ccaa4b10709e7846721af05
/samples/j2ee/snippets/com.ibm.sbt.automation.test/src/main/java/com/ibm/sbt/test/controls/grid/CommunityRenderer.java
930cf2e0b74986c94f6fe63e4a67e9e561606822
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gnuhub/SocialSDK
6bc49880e34c7c02110b7511114deb8abfdee924
02cc3ac4d131b7a094f6983202c1b5e0043b97eb
refs/heads/master
2021-01-16T20:08:07.509051
2014-07-09T08:53:03
2014-07-09T08:53:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,043
java
/* * � Copyright IBM Corp. 2012 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.ibm.sbt.test.controls.grid; import static org.junit.Assert.assertTrue; import org.junit.Test; import com.ibm.sbt.automation.core.test.BaseGridTest; /** * @author mwallace * * @date 5 Mar 2013 */ public class CommunityRenderer extends BaseGridTest { @Test public void testGrid() { assertTrue("Expected the test to generate a grid", checkGrid("Toolkit_Controls_Grid_CommunityRenderer", true)); } }
[ "LORENZOB@ie.ibm.com" ]
LORENZOB@ie.ibm.com
9e8d7fa18b17dcf33f5b7130b12681845a2b4e6e
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/sas-20181203/src/main/java/com/aliyun/sas20181203/models/SasInstallCodeRequest.java
0a133e3718f4e7c8111c8cd8b819c2d3e966a2a9
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
639
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sas20181203.models; import com.aliyun.tea.*; public class SasInstallCodeRequest extends TeaModel { @NameInMap("SourceIp") public String sourceIp; public static SasInstallCodeRequest build(java.util.Map<String, ?> map) throws Exception { SasInstallCodeRequest self = new SasInstallCodeRequest(); return TeaModel.build(map, self); } public SasInstallCodeRequest setSourceIp(String sourceIp) { this.sourceIp = sourceIp; return this; } public String getSourceIp() { return this.sourceIp; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
d775407733af7d73ae1c589aead849a5737cef38
750d06d12ce6e408301fdf9bdbb08ddef0b6f1f1
/Databases_Advanced/JSON-Processing/src/main/java/demos/springdata/restdemo/service/PostService.java
cca4e43382a8fac35b84f6b2924c321b70e47e21
[]
no_license
Deianov/Java-DB
e16245af70527a33efa9789d03276b449bbee70c
e7023500f76e84f220f621a598e460177ce327d3
refs/heads/master
2022-07-31T02:31:18.508054
2022-06-23T11:06:28
2022-06-23T11:06:28
239,293,956
1
3
null
2022-06-23T11:06:29
2020-02-09T11:35:24
Java
UTF-8
Java
false
false
303
java
package demos.springdata.restdemo.service; import demos.springdata.restdemo.model.Post; import java.util.Collection; public interface PostService { Collection<Post> getPosts(); Post addPost(Post post); Post updatePost(Post post); Post deletePost(Long id); long getPostsCount(); }
[ "44973718+Deianov@users.noreply.github.com" ]
44973718+Deianov@users.noreply.github.com
bf8e6e352fc229d3780d4a75f8ce7d193e6886b0
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
/src/org/apache/http/HttpServerConnection.java
4fc93004d714004b11bd704778433125735e6444
[]
no_license
alexivaner/GadgetX-Android-App
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
26c5866be12da7b89447814c05708636483bf366
refs/heads/master
2022-06-01T09:04:32.347786
2020-04-30T17:43:17
2020-04-30T17:43:17
260,275,241
0
0
null
null
null
null
UTF-8
Java
false
false
1,000
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.apache.http; import java.io.IOException; // Referenced classes of package org.apache.http: // HttpConnection, HttpException, HttpEntityEnclosingRequest, HttpRequest, // HttpResponse public interface HttpServerConnection extends HttpConnection { public abstract void flush() throws IOException; public abstract void receiveRequestEntity(HttpEntityEnclosingRequest httpentityenclosingrequest) throws HttpException, IOException; public abstract HttpRequest receiveRequestHeader() throws HttpException, IOException; public abstract void sendResponseEntity(HttpResponse httpresponse) throws HttpException, IOException; public abstract void sendResponseHeader(HttpResponse httpresponse) throws HttpException, IOException; }
[ "hutomoivan@gmail.com" ]
hutomoivan@gmail.com
d0941a9ffe4200b6440c18db1c2c8549dac213ea
6c1097cb3b68f8dd800350a2535c76bc8c5f8187
/todo/src/test/java/org/study/StreamTest.java
fff0d8d8fb17ae33eef3ef5d0d0af7b0b0471596
[]
no_license
db117/study
0955198ea5ba50ba93b42f8418c4e72a7cdb43d3
5da4648e9417846322093231975dca1dbf6831c7
refs/heads/master
2021-07-24T01:33:35.519465
2018-10-12T03:15:14
2018-10-12T03:15:14
152,688,110
1
0
null
2020-04-27T03:43:41
2018-10-12T03:18:16
Java
UTF-8
Java
false
false
1,692
java
package org.study; import org.junit.Test; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; /** * Stream表达式 * * @author 大兵 * @date 2018-07-12 23:32 **/ public class StreamTest { private List<A> list; @Test public void mapTest() { init(); //提出字段 List<Integer> idList = list.stream().map(A::getId).collect(Collectors.toList()); System.out.println(idList); //提取不重复字段 List<Integer> ageList = list.stream().map(A::getAge).distinct().collect(Collectors.toList()); System.out.println(ageList); //排序 List<Integer> collect = ageList.stream().sorted().collect(Collectors.toList()); System.out.println(collect); } /** * 初始化数据 */ public void init() { list = new ArrayList<>(); for (int i = 0; i < 777; i++) { A a = new A(); a.setAge((int) (Math.random() * 100)); a.setId(i); a.setName("我叫" + i * (Math.random() * 100)); list.add(a); } } static class A { private Integer id; private Integer age; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } } }
[ "z351622948@163.com" ]
z351622948@163.com
a574bc6c8f8bf791a349842158d9bbb1284ec3a1
043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04
/subject_systems/Struts2/src/struts-2.5.2/src/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java
5640a95f49e2ee59a55201028eb385c78d4bc16e
[]
no_license
MarceloLaser/arcade_console_test_resources
e4fb5ac4a7b2d873aa9d843403569d9260d380e0
31447aabd735514650e6b2d1a3fbaf86e78242fc
refs/heads/master
2020-09-22T08:00:42.216653
2019-12-01T21:51:05
2019-12-01T21:51:05
225,093,382
1
2
null
null
null
null
UTF-8
Java
false
false
129
java
version https://git-lfs.github.com/spec/v1 oid sha256:85c5447c34da51a2ae59c802da4d7969f5392b912ef194e36ffaa37b99dbc889 size 6948
[ "marcelo.laser@gmail.com" ]
marcelo.laser@gmail.com
606e45b7a6f7eb561164f0c2e63e874b3182d1d5
003a6ee01d39c3d5e7d3e57f0bac56bc411d2bd5
/TigerGolf004/TGolfer/src/main/java/com/boha/golfpractice/player/dto/GolfCourseDTO.java
f9b897f3fe26ec27195302d0c9d1f9c67f11d07e
[]
no_license
malengatiger/TigerGolf004
e9ee4c7b88f384907670971b7e21d5f66a22e096
16c7e5afa26711bf2aab70fc9685cca983d9a2c7
refs/heads/master
2021-01-18T23:43:35.285638
2016-06-08T13:07:47
2016-06-08T13:07:47
54,854,472
0
0
null
null
null
null
UTF-8
Java
false
false
3,725
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.boha.golfpractice.player.dto; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * * @author aubreymalabie */ public class GolfCourseDTO implements Serializable, Comparable<GolfCourseDTO> { private static final long serialVersionUID = 1L; private Integer golfCourseID; private String golfCourseName; private Double latitude; private Double longitude, distance; private String email; private String cellphone; private List<HoleDTO> holeList; private List<PracticeSessionDTO> practiceSessionList; public GolfCourseDTO() { } public Double getDistance() { return distance; } public void setDistance(Double distance) { this.distance = distance; } public Integer getGolfCourseID() { return golfCourseID; } public void setGolfCourseID(Integer golfCourseID) { this.golfCourseID = golfCourseID; } public String getGolfCourseName() { return golfCourseName; } public void setGolfCourseName(String golfCourseName) { this.golfCourseName = golfCourseName; } public Double getLatitude() { return latitude; } public void setLatitude(Double latitude) { this.latitude = latitude; } public Double getLongitude() { return longitude; } public void setLongitude(Double longitude) { this.longitude = longitude; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getCellphone() { return cellphone; } public void setCellphone(String cellphone) { this.cellphone = cellphone; } public List<HoleDTO> getHoleList() { if (holeList == null) { holeList = new ArrayList<>(); } return holeList; } public void setHoleList(List<HoleDTO> holeList) { this.holeList = holeList; } public List<PracticeSessionDTO> getPracticeSessionList() { if (practiceSessionList == null) { practiceSessionList = new ArrayList<>(); } return practiceSessionList; } public void setPracticeSessionList(List<PracticeSessionDTO> practiceSessionList) { this.practiceSessionList = practiceSessionList; } @Override public int hashCode() { int hash = 0; hash += (golfCourseID != null ? golfCourseID.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof GolfCourseDTO)) { return false; } GolfCourseDTO other = (GolfCourseDTO) object; if ((this.golfCourseID == null && other.golfCourseID != null) || (this.golfCourseID != null && !this.golfCourseID.equals(other.golfCourseID))) { return false; } return true; } @Override public String toString() { return "com.boha.golfpractice.data.GolfCourse[ golfCourseID=" + golfCourseID + " ]"; } @Override public int compareTo(GolfCourseDTO another) { if (distance == null) { return this.getGolfCourseName().compareTo(another.golfCourseName); } if (distance < another.distance) { return -1; } if (distance > another.distance) { return 1; } return 0; } }
[ "malengatiger@gmail.com" ]
malengatiger@gmail.com
7293bc30baf69f127e0d8909576d9666733d70f3
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/google/android/gms/internal/gtm/zzin.java
7c7d0088ae3c727f44748c932fc9668956da246b
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,092
java
package com.google.android.gms.internal.gtm; import com.avito.android.util.preferences.db_preferences.Types; import com.google.android.gms.ads.AdError; import com.google.android.gms.common.internal.Preconditions; public final class zzin extends zzhb { @Override // com.google.android.gms.internal.gtm.zzhb public final zzoa<?> zza(zzfl zzfl, zzoa<?>... zzoaArr) { String str; Preconditions.checkArgument(true); Preconditions.checkArgument(zzoaArr.length == 1); Preconditions.checkArgument(!(zzoaArr[0] instanceof zzol)); Preconditions.checkArgument(true ^ zzoo.zzm(zzoaArr[0])); zzoa<?> zzoa = zzoaArr[0]; if (zzoa == zzog.zzaum) { str = AdError.UNDEFINED_DOMAIN; } else if (zzoa instanceof zzod) { str = Types.BOOLEAN; } else if (zzoa instanceof zzoe) { str = "number"; } else if (zzoa instanceof zzom) { str = Types.STRING; } else { str = zzoa instanceof zzof ? "function" : "object"; } return new zzom(str); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
dfa964b82fa775b16bd2170ae8a3907dcedeb213
59a19bb8c3e2c59a7f7a354f5cafc106e0116e59
/modules/bluima_units/src/main/java/ch/epfl/bbp/uima/ae/RT1CellTypeProteinConcentrationExtractor.java
9b6ab7751af5a09cebf1676109270ca73ada69df
[ "Apache-2.0" ]
permissive
KnowledgeGarden/bluima
ffd5d54d69e42078598a780bdf6e67a6325d695a
793ea3f46761dce72094e057a56cddfa677156ae
refs/heads/master
2021-01-01T06:21:54.919609
2016-01-25T22:37:43
2016-01-25T22:37:43
97,415,950
1
0
null
2017-07-16T22:53:46
2017-07-16T22:53:46
null
UTF-8
Java
false
false
2,721
java
package ch.epfl.bbp.uima.ae; import static ch.epfl.bbp.uima.typesystem.TypeSystem.CELL_TYPE_PROTEIN_CONCENTRATION; import static ch.epfl.bbp.uima.typesystem.TypeSystem.CONCENTRATION; import static ch.epfl.bbp.uima.typesystem.TypeSystem.CONCEPT_MENTION; import static ch.epfl.bbp.uima.typesystem.TypeSystem.PROTEIN; import static ch.epfl.bbp.uima.typesystem.TypeSystem.SENTENCE; import static org.apache.uima.fit.util.JCasUtil.select; import static org.apache.uima.fit.util.JCasUtil.subiterate; import java.util.ArrayList; import java.util.List; import org.apache.uima.jcas.JCas; import org.apache.uima.fit.component.JCasAnnotator_ImplBase; import org.apache.uima.fit.descriptor.TypeCapability; import ch.epfl.bbp.uima.types.CellType; import ch.epfl.bbp.uima.types.CellTypeProteinConcentration; import ch.epfl.bbp.uima.types.Concentration; import ch.epfl.bbp.uima.types.Protein; import de.julielab.jules.types.Sentence; /** * Collects existing annotations ({@link Protein}, {@link Concentration} and * trigger words) and aggregates (copy) them in a * {@link CellTypeProteinConcentration}. * * @author renaud.richardet@epfl.ch */ @Deprecated @TypeCapability(inputs = { SENTENCE, PROTEIN, CONCENTRATION, CONCEPT_MENTION }, outputs = { CELL_TYPE_PROTEIN_CONCENTRATION }) public class RT1CellTypeProteinConcentrationExtractor extends JCasAnnotator_ImplBase { @Override public void process(JCas jCas) { // AnnotationIndex<Annotation> proteinIndex = // jCas.getJFSIndexRepository() // .getAnnotationIndex(Protein.type); for (Sentence sent : select(jCas, Sentence.class)) { List<Protein> prots = new ArrayList<Protein>(); for (Protein prot : subiterate(jCas, Protein.class, sent, false, true)) { prots.add(prot); } List<Concentration> concs = new ArrayList<Concentration>(); for (Concentration conc : subiterate(jCas, Concentration.class, sent, false, true)) { concs.add(conc); } List<CellType> cts = new ArrayList<CellType>(); for (CellType ct : subiterate(jCas, CellType.class, sent, false, true)) { cts.add(ct); } // FIXME 1 if (!prots.isEmpty() && !concs.isEmpty() && !cts.isEmpty()) { CellTypeProteinConcentration ctpc = new CellTypeProteinConcentration( jCas); ctpc.setCelltype(cts.get(0)); ctpc.setConcentration(concs.get(0)); ctpc.setProtein(prots.get(0)); ctpc.addToIndexes(); } } } }
[ "renaud@apache.org" ]
renaud@apache.org
bf8c29a6ce42c7fcf08980ce0588117160095116
e559f24f99355b16f68774aeb444231eb741b200
/core/src/main/java/org/wrml/model/UniquelyNamed.java
cb1238aaf7fa9a71b0316a472279ce1f3dcd851d
[ "Apache-2.0" ]
permissive
ericpu/wrml
9b842c3c3f51a5920a78a61e86e2ee544187abaf
121f840f113c02273864b9cf91573e92e833f479
refs/heads/master
2021-01-24T21:53:11.984766
2013-10-25T16:03:20
2013-10-25T16:03:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,603
java
/** * WRML - Web Resource Modeling Language * __ __ ______ __ __ __ * /\ \ _ \ \ /\ == \ /\ "-./ \ /\ \ * \ \ \/ ".\ \\ \ __< \ \ \-./\ \\ \ \____ * \ \__/".~\_\\ \_\ \_\\ \_\ \ \_\\ \_____\ * \/_/ \/_/ \/_/ /_/ \/_/ \/_/ \/_____/ * * http://www.wrml.org * * Copyright (C) 2011 - 2013 Mark Masse <mark@wrml.org> (OSS project WRML.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. */ package org.wrml.model; import org.wrml.runtime.schema.Title; import org.wrml.util.UniqueName; /** * A <i>composable</i> {@link Abstract} with a <i>universally</i> unique name (a {@link UniqueName}). */ public interface UniquelyNamed extends Abstract { /** * The WRML constant name for a UniquelyNamed's <i>uniqueName</i> slot. */ public static final String SLOT_NAME_UNIQUE_NAME = "uniqueName"; /** * The {@link UniqueName} associated with this {@link UniquelyNamed} model. */ @Title("Unique Name") UniqueName getUniqueName(); /** * @see #getUniqueName() */ UniqueName setUniqueName(UniqueName uniqueName); }
[ "mark@wrml.org" ]
mark@wrml.org
3ed83e2d9e42080bd85d49a4f1977c996a3fc15f
66d4e436dbd3957ba9b9786c2ac2d7490a185a9f
/data/src/main/java/com/haoxuer/adminstore/data/so/MemberSo.java
69c91a688f8ff7b276c7cc27cc0a42330bd2000e
[ "Apache-2.0" ]
permissive
HuWenhai/adminstore
d548502e667b0a7d87ec271e0848ebd96b482417
8df8136e81cb7c012c6f2fa73a6207021eec6844
refs/heads/master
2020-09-06T13:52:45.277256
2019-03-15T00:56:51
2019-03-15T00:56:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
package com.haoxuer.adminstore.data.so; import com.haoxuer.discover.data.page.Filter; import com.haoxuer.discover.data.page.Search; import java.io.Serializable; /** * Created by imake on 2017年08月29日17:08:12. */ public class MemberSo implements Serializable { @Search(name = "name", operator = Filter.Operator.like) private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "cng1985@gmail.com" ]
cng1985@gmail.com
bb54292718d91f0eb01679bb6942e7bc0774cbb7
460e46afd1281b3509cb96d27d1a4e7fb62ae8bc
/src/me/tuke/sktuke/hooks/legendchat/expressions/ExprTellReceiver.java
01eda14abc974900c01a356c7a0b106ad4a28674
[]
no_license
mccrafter1212/TuSKe
cf7bca8c4ba39050926baf1ba8f8f46577c7e640
7fc43a18c9e9c50b13ae6d0bb35674d5251d2a8a
refs/heads/master
2021-01-01T17:20:51.838618
2017-07-14T19:16:38
2017-07-14T19:16:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,004
java
package me.tuke.sktuke.hooks.legendchat.expressions; import me.tuke.sktuke.util.Registry; import org.bukkit.command.CommandSender; import org.bukkit.event.Event; import br.com.devpaulo.legendchat.api.events.PrivateMessageEvent; import javax.annotation.Nullable; import ch.njol.skript.ScriptLoader; import ch.njol.skript.Skript; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.util.Kleenean; public class ExprTellReceiver extends SimpleExpression<CommandSender>{ static { Registry.newSimple(ExprTellReceiver.class, 0, "[tell] receiver"); } //private boolean noWait = true; @Override public Class<? extends CommandSender> getReturnType() { return CommandSender.class; } @Override public boolean isSingle() { return true; } @Override public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, ParseResult arg3) { if (!ScriptLoader.isCurrentEvent(PrivateMessageEvent.class)){ Skript.error("Receiver can only be used on Legendchat tell event."); return false; } //if (arg2 == Kleenean.TRUE) // noWait = false; return true; } @Override public String toString(@Nullable Event arg0, boolean arg1) { return "receiver"; } @Override @Nullable protected CommandSender[] get(Event e) { PrivateMessageEvent tell = (PrivateMessageEvent)e; return new CommandSender[] { (CommandSender) tell.getReceiver() }; } /* public void change(Event e, Object[] delta, Changer.ChangeMode mode){ PrivateMessageEvent tell = (PrivateMessageEvent)e; if (mode == ChangeMode.SET) tell.setReceiver((Player)delta[0]); } @SuppressWarnings("unchecked") public Class<?>[] acceptChange(final Changer.ChangeMode mode) { if (!noWait){ Skript.error("Can't set tell receiver to anything after the event has already passed", ErrorQuality.SEMANTIC_ERROR); return null; } if (mode == ChangeMode.SET) return CollectionUtils.array(Player.class); return null; } */ }
[ "leandro.p.alencar@gmail.com" ]
leandro.p.alencar@gmail.com
b5e912eab8025e2e2037447cc148c63786fc3de7
c7c7c0df36104921847948a9e5478532811d99c8
/src/ifc4javatoolbox/ifc4/IfcFaceBound.java
c3d9faabd0073a7b2e23ea45f38c9366ff3f3935
[]
no_license
puneetarora2000/buildingrules
c57b63a2a3328cd458249ceb6eacb4a5dcf05c06
829a739360165fd395f12be511c702f53676df73
refs/heads/master
2020-04-17T17:07:38.978972
2016-12-21T06:23:58
2016-12-21T06:23:58
66,047,861
0
0
null
null
null
null
UTF-8
Java
false
false
7,891
java
/* Generated By: IFC Tools Project EXPRESS TO JAVA COMPILER: Do not edit this file!! */ package ifc4javatoolbox.ifc4; /** * This is a default implementation of the entity IfcFaceBound<br><br> *<br><br> * Copyright: CC BY-NC-SA 3.0 DE (cc) 2013 Eike Tauscher and Michael Theiler<br><br> * The whole package including this class is licensed under<br> * <a rel='license' href='http://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.en/'> * Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Germany</a>.<br><br> * If you are using the package or parts of it in any commercial way, a commercial license is required. * Visit <a href='http://www.ifctoolsproject.com'>http://www.ifctoolsproject.com</a> for more information * or contact us directly: <a href='mailto:info@ifctoolsproject.com'>info@ifctoolsproject.com</a><br> */ public class IfcFaceBound extends IfcTopologicalRepresentationItem implements ClassInterface { private static final String[] nonInverseAttributes = new String[]{"IfcLoop","BOOLEAN"}; private java.util.ArrayList<CloneableObject> stepParameter = null; private java.util.HashSet<ObjectChangeListener> listenerList = null; protected int stepLineNumber; /** Bound is an DEMANDED attribute - may not be null**/ protected IfcLoop Bound; /** Orientation is an DEMANDED attribute - may not be null**/ protected BOOLEAN Orientation; /** * The default constructor. **/ public IfcFaceBound(){} /** * Constructs a new IfcFaceBound object using the given parameters. * * @param Bound DEMANDED parameter of type IfcLoop - may not be null. * @param Orientation DEMANDED parameter of type BOOLEAN - may not be null. **/ public IfcFaceBound(IfcLoop Bound, BOOLEAN Orientation) { this.Bound = Bound; this.Orientation = Orientation; resolveInverses(); } /** * This method initializes the IfcFaceBound object using the given parameters. * * @param Bound DEMANDED parameter of type IfcLoop - may not be null. * @param Orientation DEMANDED parameter of type BOOLEAN - may not be null. **/ public void setParameters(IfcLoop Bound, BOOLEAN Orientation) { this.Bound = Bound; this.Orientation = Orientation; resolveInverses(); } /** * This method is used internally and should NOT be used for own purposes. **/ void initialize(java.util.ArrayList<CloneableObject> parameters) { this.Bound = (IfcLoop) parameters.get(0); this.Orientation = (BOOLEAN) parameters.get(1); resolveInverses(); } /** * This method is used internally and should NOT be used for own purposes. **/ void destruct() { super.destruct(); listenerList = null; } private void resolveInverses() { } /** * This method is used internally and should NOT be used for own purposes. **/ String[] getNonInverseAttributeTypes() { return IfcFaceBound.nonInverseAttributes; } /** * This method is used internally and should NOT be used for own purposes. **/ private java.util.HashSet<String> getRedefinedDerivedAttributeTypes() { java.util.HashSet<String> redefinedDerivedAttributes = new java.util.HashSet<String>(); return redefinedDerivedAttributes; } /** * This method returns the object IFC STEP representation. This method is called by the IfcModel object to write IFC STEP files. * * @return the IFC STEP representation of this object **/ public String getStepLine() { String stepString = new String("#"+this.stepLineNumber+"= "); stepString = stepString.concat("IFCFACEBOUND("); if(getRedefinedDerivedAttributeTypes().contains("Bound")) stepString = stepString.concat("*,"); else{ if(this.Bound != null) stepString = stepString.concat(((RootInterface)this.Bound).getStepParameter(IfcLoop.class.isInterface())+","); else stepString = stepString.concat("$,"); } if(getRedefinedDerivedAttributeTypes().contains("Orientation")) stepString = stepString.concat("*);"); else{ if(this.Orientation != null) stepString = stepString.concat(((RootInterface)this.Orientation).getStepParameter(BOOLEAN.class.isInterface())+");"); else stepString = stepString.concat("$);"); } return stepString; } /** * This method is used internally and should NOT be used for own purposes. **/ public String getStepParameter(boolean isSelectType) { return "#" + this.stepLineNumber; } /** * This method returns the line number within a IFC STEP representation. This method is called from other objects, where this one is referenced. * * @return the STEP line number **/ public int getStepLineNumber() { return this.stepLineNumber; } /** * This method is used internally and should NOT be used for own purposes. **/ void setStepLineNumber(int number) { this.stepLineNumber = number; } /** * This method sets the Bound attribute to the given value. * * @param Bound OPTIONAL value to set **/ public void setBound(IfcLoop Bound) { this.Bound = Bound; fireChangeEvent(); } /** * This method returns the value of the Bound attribute. * * @return the value of Bound /**/ public IfcLoop getBound() { return this.Bound; } /** * This method sets the Orientation attribute to the given value. * * @param Orientation OPTIONAL value to set **/ public void setOrientation(BOOLEAN Orientation) { this.Orientation = Orientation; fireChangeEvent(); } /** * This method returns the value of the Orientation attribute. * * @return the value of Orientation /**/ public BOOLEAN getOrientation() { return this.Orientation; } /** * This method is used internally and should NOT be used for own purposes. **/ void setStepParameter(java.util.ArrayList<CloneableObject> parameter) { this.stepParameter = parameter; } /** * This method is used internally and should NOT be used for own purposes. **/ java.util.ArrayList<CloneableObject> getStepParameter() { return this.stepParameter; } /** * This method registers an ObjectChangeListener to this object. An event is fired whenever one of its values was changed. * *@param listener the listener to register **/ public void addObjectChangeListener(ObjectChangeListener listener) { if (listenerList == null) listenerList = new java.util.HashSet<ObjectChangeListener>(1,1); listenerList.add(listener); } /** * This method unregisters an ObjectChangeListener from this object. * *@param listener the listener to unregister **/ public void removeObjectChangeListener(ObjectChangeListener listener) { if (listenerList == null) return; listenerList.remove(listener); if (listenerList.size()==0) listenerList = null; } /** * This method removes all currently registered ObjectChangeListeners from this object. **/ public void removeAllObjectChangeListeners() { listenerList = null; } protected void fireChangeEvent() { if(listenerList == null) return; for(ObjectChangeListener listener : listenerList) listener.ifcModelObjectChange(this); } /** * This method clones the object (deep cloning). * * @return the cloned object **/ public Object clone() { IfcFaceBound ifcFaceBound = new IfcFaceBound(); if(this.Bound != null) ifcFaceBound.setBound((IfcLoop)this.Bound.clone()); if(this.Orientation != null) ifcFaceBound.setOrientation((BOOLEAN)this.Orientation.clone()); return ifcFaceBound; } /** * This method copys the object as shallow copy (all referenced objects are remaining). * * @return the cloned object **/ public Object shallowCopy() { IfcFaceBound ifcFaceBound = new IfcFaceBound(); if(this.Bound != null) ifcFaceBound.setBound(this.Bound); if(this.Orientation != null) ifcFaceBound.setOrientation(this.Orientation); return ifcFaceBound; } /** * This method returns the objects standard description. * * @return the standard description **/ public String toString() { return "#"+ this.getStepLineNumber() + " " + this.getClass().getSimpleName(); } }
[ "puneetarora2000@gmail.com" ]
puneetarora2000@gmail.com
baab3c4d75b1e3b2827efe7d5d6831c29fda8c3c
bb211d8d6ba1785ce575b6af55d4b7eafbe8061f
/src/BuildServer/ServerStudy01/Person.java
c4c1a235aebd472f82ffae5cce3b53c21a52907a
[]
no_license
Git-zhoujunjie/ShangXueTang300
5f3989c721c23397719d0898bc358d19f28ad85c
82d099ca1dfbec11d163f8423a0828f72e3552d4
refs/heads/master
2021-07-01T03:47:16.679181
2020-09-26T17:14:54
2020-09-26T17:14:54
169,690,592
0
0
null
null
null
null
UTF-8
Java
false
false
657
java
package BuildServer.ServerStudy01; /** * 存储person信息,一个person相当于一个类的对象 * <person> * <name>至尊宝</name> * <age>9000</age> * </person> * 可看出包含name和age */ public class Person { private String name; private int age; public Person(){} public Person(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public int getAge() { return age; } public void setName(String name) { this.name = name; } public void setAge(int age) { this.age = age; } }
[ "1160529743@qq.com" ]
1160529743@qq.com
69d36ef7384842f41326be908adee31bd54c7ebe
80696d2553eb38693d9faadca881530d28d48201
/onlineobjects/trunk/src/main/java/dk/in2isoft/onlineobjects/service/video/VideoController.java
3cfcf8c971509c0d171127758aaecc8e0ba0c411
[]
no_license
AbsSecurePwd/AbsSecurePwd
c5bbab6d592848aff0c5db70f6fde69c471db431
b0a6d8151573673b12900a8a0d4b76004a8b1361
refs/heads/master
2023-02-08T07:23:07.768558
2020-12-11T13:31:56
2020-12-11T13:31:56
320,307,848
0
0
null
null
null
null
UTF-8
Java
false
false
2,706
java
package dk.in2isoft.onlineobjects.service.video; import java.io.File; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; import dk.in2isoft.commons.http.FilePusher; import dk.in2isoft.onlineobjects.core.ModelService; import dk.in2isoft.onlineobjects.core.exceptions.EndUserException; import dk.in2isoft.onlineobjects.core.exceptions.IllegalRequestException; import dk.in2isoft.onlineobjects.model.Video; import dk.in2isoft.onlineobjects.modules.video.VideoService; import dk.in2isoft.onlineobjects.service.ServiceController; import dk.in2isoft.onlineobjects.services.FileService; import dk.in2isoft.onlineobjects.ui.Request; import dk.in2isoft.onlineobjects.util.images.ImageService; public class VideoController extends ServiceController { private ImageService imageService; private ModelService modelService; private FileService fileService; private VideoService videoService; private Pattern idPattern; public VideoController() { super("video"); idPattern = Pattern.compile("id([0-9]+)"); } @Override public void unknownRequest(Request request) throws IOException, EndUserException { String[] path = request.getLocalPath(); if (path.length>0) { String subject = path[0]; long id = Long.valueOf(match(idPattern,subject)); process(request,id); } else { throw new IllegalRequestException(); } } private String match(Pattern pattern, String subject) { Matcher matcher = pattern.matcher(subject); if (matcher.find()) { for (int i = 0; i <= matcher.groupCount(); i++) { if (i==1) { return matcher.group(i); } } } return null; } private void process(Request request, long id) throws IOException, EndUserException { Video video = modelService.get(Video.class, id, request.getSession()); File file = videoService.getVideoFile(video); FilePusher pusher = new FilePusher(file); pusher.setClientSideCaching(true); pusher.setDownload(request.getBoolean("download")); pusher.push(request.getResponse(), video.getContentType()); } public void setImageService(ImageService imageService) { this.imageService = imageService; } public ImageService getImageService() { return imageService; } public void setModelService(ModelService modelService) { this.modelService = modelService; } public ModelService getModelService() { return modelService; } public void setFileService(FileService fileService) { this.fileService = fileService; } public FileService getFileService() { return fileService; } public void setVideoService(VideoService videoService) { this.videoService = videoService; } public VideoService getVideoService() { return videoService; } }
[ "738501@TCS.com" ]
738501@TCS.com
7e0cb1931021a373485a01709c73580e795e80e8
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE319_Cleartext_Tx_Sensitive_Info/CWE319_Cleartext_Tx_Sensitive_Info__listen_tcp_kerberosKey_67b.java
59a1513007f4d4c2b42c64dc4af3ccaa36a0b5a6
[]
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
3,307
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE319_Cleartext_Tx_Sensitive_Info__listen_tcp_kerberosKey_67b.java Label Definition File: CWE319_Cleartext_Tx_Sensitive_Info.label.xml Template File: sources-sinks-67b.tmpl.java */ /* * @description * CWE: 319 Cleartext Transmission of Sensitive Information * BadSource: listen_tcp Read password using a listening tcp connection * GoodSource: Set password to a hardcoded value (one that was not sent over the network) * Sinks: kerberosKey * GoodSink: Decrypt password before using in KerberosKey() * BadSink : Use password directly in KerberosKey() * Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package * * */ package testcases.CWE319_Cleartext_Tx_Sensitive_Info; import testcasesupport.*; import javax.security.auth.kerberos.KerberosPrincipal; import javax.security.auth.kerberos.KerberosKey; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; public class CWE319_Cleartext_Tx_Sensitive_Info__listen_tcp_kerberosKey_67b { public void badSink(CWE319_Cleartext_Tx_Sensitive_Info__listen_tcp_kerberosKey_67a.Container passwordContainer ) throws Throwable { String password = passwordContainer.containerOne; if (password != null) { KerberosPrincipal principal = new KerberosPrincipal("test"); /* POTENTIAL FLAW: Use password directly in KerberosKey() */ KerberosKey key = new KerberosKey(principal, password.toCharArray(), null); IO.writeLine(key.toString()); } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(CWE319_Cleartext_Tx_Sensitive_Info__listen_tcp_kerberosKey_67a.Container passwordContainer ) throws Throwable { String password = passwordContainer.containerOne; if (password != null) { KerberosPrincipal principal = new KerberosPrincipal("test"); /* POTENTIAL FLAW: Use password directly in KerberosKey() */ KerberosKey key = new KerberosKey(principal, password.toCharArray(), null); IO.writeLine(key.toString()); } } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(CWE319_Cleartext_Tx_Sensitive_Info__listen_tcp_kerberosKey_67a.Container passwordContainer ) throws Throwable { String password = passwordContainer.containerOne; if (password != null) { KerberosPrincipal principal = new KerberosPrincipal("test"); /* FIX: Decrypt password before using in KerberosKey() */ { Cipher aesCipher = Cipher.getInstance("AES"); /* INCIDENTAL: CWE-321: Use of Hard-coded Cryptographic Key */ SecretKeySpec secretKeySpec = new SecretKeySpec("ABCDEFGHABCDEFGH".getBytes("UTF-8"), "AES"); aesCipher.init(Cipher.DECRYPT_MODE, secretKeySpec); password = new String(aesCipher.doFinal(password.getBytes("UTF-8")), "UTF-8"); } KerberosKey key = new KerberosKey(principal, password.toCharArray(), null); IO.writeLine(key.toString()); } } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
160cc0a24b684b5eab6c63761734e994f5789245
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_13897e71ebfd68d3562c5535712926cdd6c4af63/SmartSleep/1_13897e71ebfd68d3562c5535712926cdd6c4af63_SmartSleep_t.java
5711a16842fee73506bfa5c4871beb4f3ac42e43
[]
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,523
java
package robot.engine.relist.ocr; import java.awt.image.BufferedImage; import ocr.Ocr; import org.sikuli.api.ScreenRegion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import robot.engine.commons.Controller; import robot.engine.commons.ImageLogger; import robot.region.TradePileRegion; public class SmartSleep { private static final int DEFAULT_SLEEP_IN_MILLIS = 3600000; // default to 1 hour private TradePileRegion tradePileRegion; private Controller controller; private Ocr ocr; public SmartSleep(Controller controller, TradePileRegion tradePileRegion) { this.controller = controller; this.tradePileRegion = tradePileRegion; ocr = new Ocr(); } private boolean clickFirstCard() { Logger logger = LoggerFactory.getLogger(this.getClass()); ScreenRegion firstCard = tradePileRegion.findFirstCard(1000); boolean successful = false; logger.info("looking for first card..."); if(firstCard != null) { logger.info("clicking first card"); controller.clickCenterOf(firstCard); successful = true; } return successful; } private int parseRemainingTime(String s) { Logger logger = LoggerFactory.getLogger(this.getClass()); logger.info("Parsing Raw Time Ramaining String"); return new TimeParser(s).getInMillis(); } private int calculateFromRemaining(BufferedImage timeBox) { Logger logger = LoggerFactory.getLogger(this.getClass()); logger.info("OCR Time Remaining - start"); String s = ocr.recognizeCharacters(timeBox); logger.info("OCR aquired: {}", s); int timeRemaining = parseRemainingTime(s); logger.info("OCR parsed: {} millis", timeRemaining); return timeRemaining; } // ensure full screen refresh first - wait for a second :) private void sleepForASec() throws InterruptedException { Thread.sleep(1000); } public int getRequiredSleepTime() throws InterruptedException { int sleepTime = DEFAULT_SLEEP_IN_MILLIS; Logger logger = LoggerFactory.getLogger(this.getClass()); sleepForASec(); if(clickFirstCard()) { logger.info("looking for time remaining"); ScreenRegion timeRemaining = tradePileRegion.findTimeRemaining(2000); if(timeRemaining != null) { sleepForASec(); BufferedImage timeBox = timeRemaining.capture(); ImageLogger.getLogger().logToResource(timeBox); sleepTime = calculateFromRemaining(timeBox); } else { logger.info("could not find time remaining!"); } } return sleepTime; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b68fc4ad970db2a7b7fc138e60255f89a99936d3
4acd19cb59d61b846a9b204cd54f6bdf342751bc
/yomio-core/src/main/java/io/yom/parser/CatalogXmlIRIMapper.java
cb1c18c6d5df885b2a8ca9bada13dadad6b1cf2b
[]
no_license
cmungall/yaml-ontology-metalanguage
e41489f077b28d5c3e1878a35399b534d86b1fcb
98cd92bab2ee12311ef92a14bed01a851e63192d
refs/heads/master
2021-01-10T13:06:15.807043
2016-04-09T18:00:19
2016-04-09T18:00:19
47,483,185
1
0
null
null
null
null
UTF-8
Java
false
false
6,073
java
package io.yom.parser; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.net.URL; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLOntologyIRIMapper; import org.xml.sax.SAXException; /** * {@link OWLOntologyIRIMapper} using the mappings from a catalog.xml file. * Taken from ROBOT * @author <a href="mailto:james@overton.ca">James A. Overton</a> */ public class CatalogXmlIRIMapper implements OWLOntologyIRIMapper { /** * Logger. */ private static final Logger logger = LoggerFactory.getLogger(CatalogXmlIRIMapper.class); /** * Mappings from OntologyIRIs to (usually) file IRIs, * allowing a layer of indirection when importing ontologies. */ private final Map<IRI, IRI> mappings; /** * Initialize with IRI mappings. * * @param mappings initial mappings from IRIs to IRIs */ CatalogXmlIRIMapper(Map<IRI, IRI> mappings) { this.mappings = mappings; } /** * Given a String path to a catalog file, create a CatalogXmlIRIMapper * that interprets any relative paths as relative * to the catalog file location. * * @param catalogFile the String path to the catalog file * @throws IOException on any problem */ public CatalogXmlIRIMapper(String catalogFile) throws IOException { this(new File(catalogFile).getAbsoluteFile()); } /** * Given a catalog File, create a CatalogXmlIRIMapper * that interprets any relative paths as relative * to the catalog file location. * * @param catalogFile the catalog File * @throws IOException on any problem */ public CatalogXmlIRIMapper(File catalogFile) throws IOException { this(catalogFile, catalogFile.getAbsoluteFile().getParentFile()); } /** * Given a catalog File and a parent folder, create a CatalogXmlIRIMapper * that interprets any relative paths as relative to the parent folder. * * @param catalogFile the catalog File * @param parentFolder the File for the parent folder * @throws IOException on any problem */ public CatalogXmlIRIMapper(File catalogFile, File parentFolder) throws IOException { this(parseCatalogXml(new FileInputStream(catalogFile), parentFolder)); } /** * Given an IRI, create a CatalogXmlIRIMapper * that interprets any relative paths as relative * to the catalog file location. * * @param catalogIRI the IRI of the catalog file * @throws IOException on any problem */ public CatalogXmlIRIMapper(IRI catalogIRI) throws IOException { this(catalogIRI.toURI().toURL()); } /** * Given an URL, create a CatalogXmlIRIMapper * that interprets any relative paths as relative * to the catalog file location. * * @param catalogURL the URL of the catalog file * @throws IOException on any problem */ public CatalogXmlIRIMapper(URL catalogURL) throws IOException { if ("file".equals(catalogURL.getProtocol())) { try { File catalogFile = new File(catalogURL.toURI()); mappings = parseCatalogXml( new FileInputStream(catalogFile), catalogFile.getParentFile()); } catch (URISyntaxException e) { throw new IOException(e); } } else { mappings = parseCatalogXml(catalogURL.openStream(), null); } } /** * Given an URL and a parent folder, create a CatalogXmlIRIMapper * that interprets any relative paths as relative to the parent folder. * * @param catalogURL the URL of the catalog file * @param parentFolder the File for the parent folder * @throws IOException on any problem */ public CatalogXmlIRIMapper(URL catalogURL, File parentFolder) throws IOException { this(parseCatalogXml(catalogURL.openStream(), parentFolder)); } /** * Given an IRI, return the mapped IRI. * * @param ontologyIRI the IRI that we want to look up * @return the mapped IRI, usually to a local file */ @Override public IRI getDocumentIRI(IRI ontologyIRI) { return mappings.get(ontologyIRI); } /** * Parse the inputStream as a catalog.xml file and extract IRI mappings. * * Optional: Resolve relative file paths with the given parent folder. * * @param inputStream input stream (never null) * @param parentFolder folder or null * @return mappings * @throws IOException on general IO problems * @throws IllegalArgumentException if input stream is null */ static Map<IRI, IRI> parseCatalogXml(InputStream inputStream, final File parentFolder) throws IOException, IllegalArgumentException { if (inputStream == null) { throw new IllegalArgumentException( "InputStream should never be null, missing resource?"); } // use the Java built-in SAX parser SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(false); try { final Map<IRI, IRI> mappings = new HashMap<IRI, IRI>(); SAXParser saxParser = factory.newSAXParser(); saxParser.parse(inputStream, new CatalogElementHandler(parentFolder, mappings)); return mappings; } catch (ParserConfigurationException e) { throw new IOException(e); } catch (SAXException e) { throw new IOException(e); } finally { inputStream.close(); } } }
[ "cjm@berkeleybop.org" ]
cjm@berkeleybop.org
e9eab1c56d8b69a3f72a485f4b2b8ae2485e4a48
c5449e9a00e00b8cf2bb10aad867a44de6ad5991
/Sunday/.apt_generated/tk/woppo/sunday/ui/fragment/DrawerFragment_.java
14f9bbb2051828c6d5b1eff9e41921bfec1b809f
[]
no_license
Mike520/workspaces
b06faf588344dd920192c4da4028b1c3d37cee65
437b00a0cb13a8b78e0aae366bf422cf918723a8
refs/heads/master
2021-01-14T12:02:17.267184
2016-07-18T06:39:51
2016-07-18T06:39:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,168
java
// // DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations 3.0.1. // package tk.woppo.sunday.ui.fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import org.androidannotations.api.view.HasViews; import org.androidannotations.api.view.OnViewChangedListener; import org.androidannotations.api.view.OnViewChangedNotifier; import tk.woppo.sunday.R.layout; public final class DrawerFragment_ extends DrawerFragment implements HasViews, OnViewChangedListener { private final OnViewChangedNotifier onViewChangedNotifier_ = new OnViewChangedNotifier(); private View contentView_; @Override public void onCreate(Bundle savedInstanceState) { OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_); init_(savedInstanceState); super.onCreate(savedInstanceState); OnViewChangedNotifier.replaceNotifier(previousNotifier); } public View findViewById(int id) { if (contentView_ == null) { return null; } return contentView_.findViewById(id); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { contentView_ = super.onCreateView(inflater, container, savedInstanceState); if (contentView_ == null) { contentView_ = inflater.inflate(layout.fragment_drawer, container, false); } return contentView_; } private void init_(Bundle savedInstanceState) { OnViewChangedNotifier.registerOnViewChangedListener(this); } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); onViewChangedNotifier_.notifyViewChanged(this); } public static DrawerFragment_.FragmentBuilder_ builder() { return new DrawerFragment_.FragmentBuilder_(); } @Override public void onViewChanged(HasViews hasViews) { ivWeatherImg = ((ImageView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_weather_img)); tvChuanyi = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_chuanyi)); tvGanmao = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_ganmao)); ivWeather = ((ImageView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_weather)); tvXiche = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_xiche)); tvTemp = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_temp)); tvTigan = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_tigan)); tvWeather = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_tv_weather)); tvZhiwaixian = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_ziwaixian)); tvYundong = ((TextView) hasViews.findViewById(tk.woppo.sunday.R.id.drawer_yundong)); { View view = hasViews.findViewById(tk.woppo.sunday.R.id.drawer_add_city); if (view!= null) { view.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { DrawerFragment_.this.clickAddCity(); } } ); } } { View view = hasViews.findViewById(tk.woppo.sunday.R.id.drawer_del_city); if (view!= null) { view.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { DrawerFragment_.this.clickDelCity(); } } ); } } { View view = hasViews.findViewById(tk.woppo.sunday.R.id.drawwer_setting); if (view!= null) { view.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { DrawerFragment_.this.clickSetting(); } } ); } } { View view = hasViews.findViewById(tk.woppo.sunday.R.id.drawer_exit); if (view!= null) { view.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { DrawerFragment_.this.clickExit(); } } ); } } initFragment(); } public static class FragmentBuilder_ { private Bundle args_; private FragmentBuilder_() { args_ = new Bundle(); } public DrawerFragment build() { DrawerFragment_ fragment_ = new DrawerFragment_(); fragment_.setArguments(args_); return fragment_; } } }
[ "mdjros123@gmail.com" ]
mdjros123@gmail.com
360759cd019c62f5360edf130567afacca3cb5d6
51473c415f2a968744d4ef4d5a31b5a2de4505e4
/android/app/src/main/java/com/chetna_mo_dev_14139/MainApplication.java
8e26e8e6208af65666bf0f4dfc5b208e86dc2baf
[]
no_license
crowdbotics-apps/chetna-mo-dev-14139
52bad6431bbbaad3b0fa7a90105a9083830fc79b
8f371119e00bc1574ee4ed7dd8294c51981d2595
refs/heads/master
2023-01-04T23:12:38.625486
2020-10-31T20:13:57
2020-10-31T20:13:57
307,999,430
0
1
null
null
null
null
UTF-8
Java
false
false
2,696
java
package com.chetna_mo_dev_14139; import android.app.Application; import android.content.Context; import com.facebook.react.PackageList; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } /** * Loads Flipper in React Native templates. Call this in the onCreate method with something like * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); * * @param context * @param reactInstanceManager */ private static void initializeFlipper( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class<?> aClass = Class.forName("com.rndiffapp.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
020eaab13d6b21bf5fe2133b743a8581cccec27f
02e13ddc667a82f5aaa3dcf3e2ea699946d187bd
/src/File/File_1.java
c9e53c86bcd2f9e547cc145e92b6910fca2b7489
[]
no_license
Wmt-Monica/javaSE2
54810dbbf4e029542cf74123d1536a2c173098f0
ab8a8e7ce42ba216d6dc3b5b4dd796a1fd70c99d
refs/heads/master
2023-01-09T10:45:54.874797
2020-11-17T09:21:46
2020-11-17T09:21:46
299,301,030
0
0
null
null
null
null
UTF-8
Java
false
false
3,180
java
package File; import java.io.File; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; public class File_1 { public static void main(String[] args) throws IOException { //指定目录的文件对象,将目录的位置传入,如果使用反斜杠则要用两条,起到转义的作用,也可以受用单斜杠 File file1 = new File("D:\\123"); File file2 = new File("D:/123/JavaProgram"); File file3 = new File("java.txt"); //当不指定路径则会默认在指定本目录下 //打印文件对象只是将文件对象的指定地址打印出来,如果需要打印文件内容则需要用到IO流中的内容 System.out.println("file1:"+file1); System.out.println("file2:"+file2); //可以对文件进行改文件名的操作 file2.renameTo(new File("D:\\123\\JavaProgramTest")); //格式化时间:输出文件最后一次修改的时间的输出格式 SimpleDateFormat simpleDateFormat= new SimpleDateFormat("YYYY-MM-dd hh:mm:ss"); Date date = new Date(file1.lastModified()); //file1.lastModified()输出file1文件最后一次修改的时间参数传入 String str = simpleDateFormat.format(date); //除此之外File还有很多其他的方法 System.out.println("File文件是否存在:"+file1.exists()); System.out.println("File文件是否为一个目录:"+file1.isDirectory()); System.out.println("File是否是一个文件:"+file1.isFile()); System.out.println("File最后修改的时间:"+str); System.out.println("File的所占内存大小:"+file1.length()); System.out.println("File的文件名:"+file1.getName()); System.out.println("File的目录路径:"+file3.getPath());//如果文件指向当前目录则用getPath()方法只是会打相对路径 System.out.println("File的目录路径:"+file3.getAbsolutePath());//用getAbsolutePath()则会打印出绝对路径 //创建文件 File file4 = new File("D:\\123\\JavaProgramTest\\one.txt"); System.out.println("file4是否存在:"+file4.exists());//创建前判断文件是否存在fault file4.createNewFile(); //此处需要抛出或者捕捉一下 IOException异常 System.out.println("file4是否存在:"+file4.exists());//创建后判断文件是否存在true //删除文件 file4.delete(); System.out.println("file4删除后是否存在:"+file4.exists()); /** * mkdir()和mkdirs()方法的区别 * */ File file5 = new File("D:\\123\\JavaProgram\\two"); System.out.println("file5是否存在:"+file5.exists()); //使用mkdir()方法创建树目录在中间除了最后文件夹之外只要有一个不存在则创建失败 file5.mkdir(); System.out.println("file5是否创建成功:"+file5.exists()); //使用mkdirs()方法创建树目录,假如目录中间不存在的目录就会创建一个完整的目录 file5.mkdirs(); System.out.println("file5是否创建成功:"+file5.exists()); } }
[ "3040988158@qq.com" ]
3040988158@qq.com
7576056985c789bb3beb37f5fe0ae57800a93805
c19cb77e3958a194046d6f84ca97547cc3a223c3
/core/src/main/j2me/org/bouncycastle/util/Shorts.java
71f04fd029f2aabe7abff87a1c1171b861b049ad
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bcgit/bc-java
1b6092bc5d2336ec26ebd6da6eeaea6600b4c70a
62b03c0f704ebd243fe5f2d701aef4edd77bba6e
refs/heads/main
2023-09-04T00:48:33.995258
2023-08-30T05:33:42
2023-08-30T05:33:42
10,416,648
1,984
1,021
MIT
2023-08-26T05:14:28
2013-06-01T02:38:42
Java
UTF-8
Java
false
false
146
java
package org.bouncycastle.util; public class Shorts { public static Short valueOf(short value) { return new Short(value); } }
[ "peter.dettman@bouncycastle.org" ]
peter.dettman@bouncycastle.org
3d2725342e9305a654e08bf4cdf64b0bd5da8be6
b55109e36f35eda6cb84bfbe67cf2f363ace235e
/Server/src/DataService/AccountDataService.java
ddc33f4f8456698b6f0e28ade36efb5fb73f79b1
[]
no_license
JonySheep/XiangXiangDeng
cb87e65e24080302f3f135e9e22f23735fe424d5
4ad25e3781d30050c5c7e0b29767e07477cae750
refs/heads/master
2021-04-30T12:18:09.803163
2018-02-12T16:51:37
2018-02-12T16:51:37
121,271,929
1
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
package DataService; import PO.AccountPO; import Util.ResultMessage; import java.rmi.Remote; import java.rmi.RemoteException; import java.util.ArrayList; /** * Created by Jeven on 2017/10/23. */ public interface AccountDataService extends Remote { /** * * @param id * @return 返回删除结果 * @throws RemoteException */ ResultMessage disguiseDeleteAccount(String id) throws RemoteException; /** * * @param po * @return 返回新增结果 * @throws RemoteException */ ResultMessage insert(AccountPO po) throws RemoteException; /** * * @param po * @return 返回更新结果 * @throws RemoteException */ ResultMessage update(AccountPO po) throws RemoteException; /** * * @param cardName * @return 返回找到的Account信息(唯一确定) * @throws RemoteException */ AccountPO getInfo(String cardName) throws RemoteException; /** * * @param str * @return 返回模糊查找的结果(不唯一) * @throws RemoteException */ ArrayList<AccountPO> search(String str) throws RemoteException; ArrayList<AccountPO> getAllAccounts() throws RemoteException; }
[ "161250180@mail.smal.nju.edu.cn" ]
161250180@mail.smal.nju.edu.cn
7162b673b21f3abd9770a10b01d5c968305aac42
2c1a40e80228db30410370f3b4f2ce04b2f03c01
/serverv2/src/main/java/com/kiwihouse/shiro/realm/JwtRealm.java
f92852583aebd3a8b337e012a17d418e72367091
[]
no_license
SxxGDZB/SxxGDZB-customization
5bbc6508dae521812d8e72ee7cd4fc8e90b13a16
85873f6033b6c2bd81018d0197aba52566d85a80
refs/heads/master
2023-02-16T23:33:19.442961
2021-01-11T07:16:29
2021-01-11T07:16:29
289,149,752
0
2
null
null
null
null
UTF-8
Java
false
false
3,070
java
package com.kiwihouse.shiro.realm; import com.kiwihouse.shiro.token.JwtToken; import com.kiwihouse.util.JsonWebTokenUtil; import io.jsonwebtoken.MalformedJwtException; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.SimpleAuthenticationInfo; import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; import java.util.Map; import java.util.Set; /** * @author tomsun28 * @date 18:07 2018/3/3 */ public class JwtRealm extends AuthorizingRealm { private static final String JWT = "jwt:"; private static final int NUM_4 = 4; private static final char LEFT = '{'; private static final char RIGHT = '}'; @Override public Class<?> getAuthenticationTokenClass() { // 此realm只支持jwtToken return JwtToken.class; } @Override protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) { String payload = (String) principalCollection.getPrimaryPrincipal(); // likely to be json, parse it: if (payload.startsWith(JWT) && payload.charAt(NUM_4) == LEFT && payload.charAt(payload.length() - 1) == RIGHT) { Map<String, Object> payloadMap = JsonWebTokenUtil.readValue(payload.substring(4)); Set<String> roles = JsonWebTokenUtil.split((String)payloadMap.get("roles")); Set<String> permissions = JsonWebTokenUtil.split((String)payloadMap.get("perms")); SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); if(null!=roles&&!roles.isEmpty()) { info.setRoles(roles); } if(null!=permissions&&!permissions.isEmpty()) { info.setStringPermissions(permissions); } return info; } return null; } @Override protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException { if (!(authenticationToken instanceof JwtToken)) { return null; } JwtToken jwtToken = (JwtToken)authenticationToken; String jwt = (String)jwtToken.getCredentials(); String payload = null; try{ // 预先解析Payload // 没有做任何的签名校验 payload = JsonWebTokenUtil.parseJwtPayload(jwt); } catch(MalformedJwtException e){ //令牌格式错误 throw new AuthenticationException("errJwt"); } catch(Exception e){ //令牌无效 throw new AuthenticationException("errsJwt"); } if(null == payload){ //令牌无效 throw new AuthenticationException("errJwt"); } return new SimpleAuthenticationInfo("jwt:"+payload,jwt,this.getName()); } }
[ "49900640+SxxGDZB@users.noreply.github.com" ]
49900640+SxxGDZB@users.noreply.github.com
36fdc5988390f8441dd9fa0348666d804a5005dc
e2bcc84f6c734affba77c1d5c94976cc9329f92e
/scm1/src/main/java/com/best1/scm/modules/cms/dao/GuestbookDao.java
1e311b5a4b9d6b5f6037591dd705768abdd01e0c
[]
no_license
CaptainJ93/SpringStudy
422985fa6e6be3d1b7415efdeb7bad4d243d108d
40d0665f9e1917f7189e7d9554c951c13d7d5c5a
refs/heads/master
2020-03-17T05:50:07.857946
2018-06-22T09:06:47
2018-06-22T09:06:47
133,330,489
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.best1.scm.modules.cms.dao; import com.best1.scm.common.persistence.CrudDao; import com.best1.scm.common.persistence.annotation.MyBatisDao; import com.best1.scm.modules.cms.entity.Guestbook; /** * 留言DAO接口 * @author ThinkGem * @version 2013-8-23 */ @MyBatisDao public interface GuestbookDao extends CrudDao<Guestbook> { }
[ "jiashizhen@JSB-0019.best1.com" ]
jiashizhen@JSB-0019.best1.com
6809ddcec802960c6aa23b73593165727030dc1b
28adcde875c60b752ede090d4675b36cd7db98db
/src/net/wit/dao/impl/TopicDaoImpl.java
dad14dd00a5336511294ecfa6d16786ed5b3af3a
[]
no_license
rzico/mp-java
95f1dc0acd889d455fd23cd32c3b11842b51754d
980afd1a264b2f24fcbac508b116cd4dab4aa4a5
refs/heads/master
2021-09-27T13:49:31.257550
2018-05-10T10:53:47
2018-05-10T10:53:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,368
java
package net.wit.dao.impl; import java.util.Calendar; import java.util.Date; import javax.persistence.FlushModeType; import javax.persistence.NoResultException; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import net.wit.entity.Member; import net.wit.entity.Payment; import org.apache.commons.collections.map.HashedMap; import org.apache.commons.lang.time.DateUtils; import org.springframework.stereotype.Repository; import org.springframework.util.StringUtils; import net.wit.Page; import net.wit.Pageable; import net.wit.dao.TopicDao; import net.wit.entity.Topic; /** * @ClassName: TopicDaoImpl * @author 降魔战队 * @date 2017-9-14 19:42:6 */ @Repository("topicDaoImpl") public class TopicDaoImpl extends BaseDaoImpl<Topic, Long> implements TopicDao { /** * @Title:findPage * @Description:标准代码 * @param beginDate * @param endDate * @param pageable * @return Page<Topic> */ public Page<Topic> findPage(Date beginDate,Date endDate, Pageable pageable) { CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); CriteriaQuery<Topic> criteriaQuery = criteriaBuilder.createQuery(Topic.class); Root<Topic> root = criteriaQuery.from(Topic.class); criteriaQuery.select(root); Predicate restrictions = criteriaBuilder.conjunction(); restrictions = criteriaBuilder.conjunction(); if (beginDate!=null) { Date b = DateUtils.truncate(beginDate,Calendar.DATE); restrictions = criteriaBuilder.and(restrictions,criteriaBuilder.greaterThanOrEqualTo(root.<Date> get("createDate"), b)); } if (endDate!=null) { Date e = DateUtils.truncate(endDate,Calendar.DATE); e =DateUtils.addDays(e,1); restrictions = criteriaBuilder.and(restrictions,criteriaBuilder.lessThan(root.<Date> get("createDate"), e)); } criteriaQuery.where(restrictions); return super.findPage(criteriaQuery,pageable); } public Topic find(Member member) { if (member == null) { return null; } String jpql = "select topic from Topic topic where topic.member = :member"; try { return entityManager.createQuery(jpql, Topic.class).setFlushMode(FlushModeType.COMMIT).setParameter("member", member).getSingleResult(); } catch (NoResultException e) { return null; } } }
[ "zhangsr@tiaohuo.com" ]
zhangsr@tiaohuo.com
1aa3d699aecd02b3b3dd412cb07ff320dc33ba11
0764ac07b7bb3a6e6e36311b138d7362b383bbb4
/algo-lecture/src/main/java/기초코딩테스트_트레이닝/삽입정렬3.java
6c1361f277e412f5f291db2e67ac89e38955b4eb
[]
no_license
pparksuuu/algorithm
183104fdc8a6b3ed106b068235baaab7a1e0e960
e9467e225b598ce069618bfb5a93bdc3614a5472
refs/heads/master
2020-03-24T21:07:43.862206
2019-01-23T15:00:32
2019-01-23T15:00:32
143,014,741
0
0
null
null
null
null
UTF-8
Java
false
false
520
java
package 기초코딩테스트_트레이닝; public class 삽입정렬3 { // 카드를 삽입한다! public static void main(String[] args) { int[] input = {5, 6, 2, 8, 7, 23, 4, 1, 44}; insertionSort(input, input.length); for (int a : input) { System.out.print(a + " "); } } private static void insertionSort(int[] a, int n) { int temp = 0; int j = 0; for (int i = 1; i < n; i++) { temp = a[i]; for (j = i; j > 0 && a[j - 1] > temp; j--) { a[j] = a[j - 1]; } a[j] = temp; } } }
[ "supr2000@gmail.com" ]
supr2000@gmail.com
07513848cb2951025d4bd3aed688f5df76525ba1
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
/Variant Programs/1-4/35/filmmaker/FilmmakerFinis.java
075f8952ce2fe232f22c3f3873b84fc00ab449a0
[ "MIT" ]
permissive
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
42e4c2061c3f8da0dfce760e168bb9715063645f
a42ced1d5a92963207e3565860cac0946312e1b3
refs/heads/master
2020-08-09T08:10:08.888384
2019-11-25T01:14:23
2019-11-25T01:14:23
214,041,532
0
0
null
null
null
null
UTF-8
Java
false
false
953
java
package filmmaker; import producingAim.FissionableCavil; import disk.*; public class FilmmakerFinis extends filmmaker.Director { public disk.FlyerTiedLitany<FissionableCavil> mop; public static String secondLeap = "pFaFooRgQyhKblxP"; protected synchronized void awardedNewMatter() throws ShelvingWhiteExcluded { String postSouvenirs = "yaLQKn"; try { this.actualArtifact = this.latestSafekeeping.upcomingSomething(); } catch (disk.ShelvingWhiteExcluded cma) { throw cma; } } public FilmmakerFinis(double meanspirited, double rove, Storing preceding) { demodulating(meanspirited, rove, null, preceding); this.republic = ProduceGovernmental.fasting; this.mop = new disk.FlyerTiedLitany<FissionableCavil>(); } protected synchronized void runActualArtifactEapStore() { double maximal = 0.8620148655338057; this.mop.deleteClosing(this.actualArtifact); this.actualArtifact = null; } }
[ "hayden.cheers@me.com" ]
hayden.cheers@me.com
35e1ed62cb8a6e3b1051574523de2831288549f2
9c6d2de9e85c679c9b9bae0c91f84fae0d410053
/2015-02/Individual Projects/Grupo 1/Proyecto Instancia 2/Generador/generado/androidApplication/app/src/main/java/co/edu/uniandes/proyectoautomatizacion/widget/CatalogoDetallesFragment.java
93c0dcd60d8870085c63a39bf6b06e9d879cad44
[]
no_license
phillipus85/ETLMetricsDataset
902b526900b8c91889570b15538fa92df0db980f
7756381f9d580911b1dff9048f3cff002b110b19
refs/heads/master
2021-06-21T12:02:38.368652
2017-07-12T05:13:21
2017-07-12T05:13:21
79,398,957
0
0
null
null
null
null
UTF-8
Java
false
false
4,986
java
package co.edu.uniandes.proyectoautomatizacion.widget; import android.app.Activity; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.util.DisplayMetrics; import android.util.Log; import android.view.Display; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.List; import co.edu.uniandes.proyectoautomatizacion.ApplicationClass; import co.edu.uniandes.proyectoautomatizacion.R; import co.edu.uniandes.proyectoautomatizacion.database.CategoriaDb; import co.edu.uniandes.proyectoautomatizacion.database.DatabaseHelper; import co.edu.uniandes.proyectoautomatizacion.database.ImagenSliderItemDb; import co.edu.uniandes.proyectoautomatizacion.database.ProductoDb; /** * Created by juandavid on 4/10/15. */ public class CatalogoDetallesFragment extends Fragment{ public static final String TAG = CatalogoDetallesFragment.class.getSimpleName(); public static final String CATEGORIAS = "categorias"; public static final String IMAGENES_SLIDE_HOME = "slidingImages"; private ApplicationClass appClass; private DatabaseHelper dh; private CategoriaDb catalogo; private CatalogoDetallesClickListener listener; private List<ImagenSliderItemDb> imgsdb; public final static String USUARIO_PREFERENCES = "UsuarioPref"; private SharedPreferences usuarioPref; private SharedPreferences.Editor usuarioEdit; public CatalogoDetallesFragment() { // Required empty public constructor } @Override public void onAttach(Activity activity) { super.onAttach(activity); Log.i(TAG, "Attached CatalogoDetallesFragment"); appClass = (ApplicationClass) getActivity().getApplication(); dh = appClass.getDbh(); catalogo = dh.findCategoriaByNombre(((CategoriaDb) getArguments().getSerializable(CATEGORIAS)).getNombre()).get(0); listener = (CatalogoDetallesClickListener) activity; System.out.println(catalogo.getNombre() + dh.findProductosByCategoria(catalogo.getId()).size()); //imgsSlider = (ImagenesSlider) getArguments().getSerializable(IMAGENES_SLIDE_HOME); } @Override public void onStop(){ super.onStop(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View v; DisplayMetrics displaymetrics = new DisplayMetrics(); getActivity().getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); int scrHeight = displaymetrics.heightPixels; int scrWidth = displaymetrics.widthPixels; Log.i(TAG, "CatalogoDetallesFragment Started!"); //slidingImagesList = Arrays.asList(pictures); v = inflater.inflate(R.layout.fragment_catalogo_detalles, container, false); final ViewPager pager = (ViewPager) v.findViewById(R.id.catalogoDetallesViewPager); Display mDisplay = getActivity().getWindowManager().getDefaultDisplay(); int width = mDisplay.getWidth(); int height = mDisplay.getHeight(); ViewGroup.LayoutParams params = pager.getLayoutParams(); // Changes the height and width to the specified *pixels* params.height = (int)((width * 1.42) + (height*0.25)); params.width = width; pager.setLayoutParams(params); pager.setAdapter(new MyPagerAdapter(getChildFragmentManager())); return v; } private class MyPagerAdapter extends FragmentStatePagerAdapter implements ProductoSliderFragment.OnSliderProductosClickListener { public MyPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int pos) { //return CuponDetalladoFragment.newInstance(mPaseDeta.get(pos)); return ProductoSliderFragment.newInstance(dh.findProductosByCategoria(catalogo.getId()).get(pos), this); } @Override public int getCount() { return dh.findProductosByCategoria(catalogo.getId()).size(); } @Override public void onProductoClickListener(ProductoDb img) { System.out.println("click producto imagen slider "); listener.onImagenSlideCatalogoDetallesClick(img); } @Override public void onComprarProductoClickListener(ProductoDb p) { listener.onComprarProductoClick(p); } } public interface CatalogoDetallesClickListener { /** * Called when the view is clicked. * */ public void onImagenSlideCatalogoDetallesClick(ProductoDb img); public void onComprarProductoClick(ProductoDb p); } }
[ "n.bonet2476@uniandes.edu.co" ]
n.bonet2476@uniandes.edu.co
108d315cfb241e3d7005ca80a25cb1cb4432516b
e4d7fa36e07cdbcb5fcb601c33dd01fbb548c244
/android/app/src/main/java/versioned/host/exp/exponent/modules/api/components/svg/RNSVGGroupShadowNode.java
5fe76c33e4b3f849566a8ffc7aebfc4870681720
[ "CC-BY-4.0", "MIT", "Apache-2.0", "BSD-3-Clause" ]
permissive
decebal/exponent
b99ef0c11c23cb363178a1a22372c28c9a3ba446
fefd95ee052c458b75a3c1a2e5c818ba99070752
refs/heads/master
2023-04-08T11:35:38.995397
2016-09-08T21:47:25
2016-09-08T21:47:45
67,743,155
0
0
NOASSERTION
2023-04-04T00:36:21
2016-09-08T21:57:11
JavaScript
UTF-8
Java
false
false
4,185
java
/** * Copyright (c) 2015-present, Horcrux. * All rights reserved. * * This source code is licensed under the MIT-style license found in the * LICENSE file in the root directory of this source tree. */ package versioned.host.exp.exponent.modules.api.components.svg; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Point; import android.view.View; import android.view.ViewGroup; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.ReactShadowNode; import javax.annotation.Nullable; /** * Shadow node for virtual RNSVGGroup view */ public class RNSVGGroupShadowNode extends RNSVGPathShadowNode { public void draw(Canvas canvas, Paint paint, float opacity) { RNSVGSvgViewShadowNode svg = getSvgShadowNode(); if (opacity > MIN_OPACITY_FOR_DRAW) { int count = saveAndSetupCanvas(canvas); clip(canvas, paint); for (int i = 0; i < getChildCount(); i++) { if (!(getChildAt(i) instanceof RNSVGVirtualNode)) { continue; } RNSVGVirtualNode child = (RNSVGVirtualNode) getChildAt(i); child.setupDimensions(canvas); child.mergeProperties(this, mPropList, true); child.draw(canvas, paint, opacity * mOpacity); if (child.isResponsible()) { svg.enableTouchEvents(); } } restoreCanvas(canvas, count); } } @Override protected Path getPath(Canvas canvas, Paint paint) { Path path = new Path(); for (int i = 0; i < getChildCount(); i++) { if (!(getChildAt(i) instanceof RNSVGVirtualNode)) { continue; } RNSVGVirtualNode child = (RNSVGVirtualNode) getChildAt(i); child.setupDimensions(canvas); path.addPath(child.getPath(canvas, paint)); } return path; } @Override public int hitTest(Point point, View view, @Nullable Matrix matrix) { int viewTag = -1; Matrix combinedMatrix = new Matrix(); if (matrix != null) { combinedMatrix.postConcat(matrix); } combinedMatrix.postConcat(mMatrix); for (int i = getChildCount() - 1; i >= 0; i--) { ReactShadowNode child = getChildAt(i); if (!(child instanceof RNSVGVirtualNode)) { continue; } RNSVGVirtualNode node = (RNSVGVirtualNode) child; View childView = ((ViewGroup) view).getChildAt(i); viewTag = node.hitTest(point, childView, combinedMatrix); if (viewTag != -1) { return (node.isResponsible() || viewTag != childView.getId()) ? viewTag : view.getId(); } } return viewTag; } @Override public int hitTest(Point point, View view) { return this.hitTest(point, view, null); } protected void saveDefinition() { if (mName != null) { getSvgShadowNode().defineTemplate(this, mName); } for (int i = getChildCount() - 1; i >= 0; i--) { if (!(getChildAt(i) instanceof RNSVGVirtualNode)) { continue; } ((RNSVGVirtualNode) getChildAt(i)).saveDefinition(); } } @Override public void mergeProperties(RNSVGVirtualNode target, ReadableArray mergeList) { if (mergeList.size() != 0) { for (int i = getChildCount() - 1; i >= 0; i--) { if (!(getChildAt(i) instanceof RNSVGVirtualNode)) { continue; } ((RNSVGVirtualNode) getChildAt(i)).mergeProperties(target, mergeList); } } } @Override public void resetProperties() { for (int i = getChildCount() - 1; i >= 0; i--) { if (!(getChildAt(i) instanceof RNSVGVirtualNode)) { continue; } ((RNSVGVirtualNode) getChildAt(i)).resetProperties(); } } }
[ "aurora@exp.host" ]
aurora@exp.host
d72dab0fff5870f06b55277ffacfbd15322639cf
4ebf08f79e11903a14acb8d8a53e9b6f0f0e8994
/Pilot/src/com/emitrom/pilot/maps/client/maptypes/MapTypeStyler.java
2a33af1ebbb5abc4a3068ebcd2b17ec550b37ac7
[]
no_license
sanyaade-mobiledev/Pilot
a48247328f58bde119646b93e9d7dff713a3f7ad
a385352f241b46f9d273a50a85c8e92e625ee5ba
refs/heads/master
2021-01-20T21:25:55.533922
2013-05-05T00:01:15
2013-05-05T00:01:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,476
java
/** Copyright (c) 2012 Emitrom LLC. All rights reserved. For licensing questions, please contact us at licensing@emitrom.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.emitrom.pilot.maps.client.maptypes; import com.emitrom.pilot.util.client.core.JsObject; import com.emitrom.pilot.util.client.core.JsoHelper; /** * A styler affects how a map's elements will be styled. Each MapTypeStyler * should contain one and only one key. If more than one key is specified in a * single MapTypeStyler, all but one will be ignored. For example: var rule = * {hue: '#ff0000'}. * */ public class MapTypeStyler extends JsObject { public MapTypeStyler() { jsObj = JsoHelper.createObject(); } /** * Gamma. Modifies the gamma by raising the lightness to the given power. * Valid values: Floating point numbers, [0.01, 10], with 1.0 representing * no change. * * @param value */ public native void setGamma(double value)/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); jso.gamma = value; }-*/; public native double getGamma()/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); return jso.gamma; }-*/; /** * Sets the hue of the feature to match the hue of the color supplied. Note * that the saturation and lightness of the feature is conserved, which * means that the feature will not match the color supplied exactly. Valid * values: An RGB hex string, i.e. '#ff0000'. * * @param value */ public native void setHue(String value)/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); jso.hue = value; }-*/; public native String getHue()/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); return jso.hue; }-*/; /** * Inverts lightness. A value of true will invert the lightness of the * feature while preserving the hue and saturation. * * @param value */ public native void setInvertLightness(boolean value)/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); jso.invert_lightness = value; }-*/; public native boolean invertLightness()/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); return jso.invert_lightness; }-*/; /** * Lightness. Shifts lightness of colors by a percentage of the original * value if decreasing and a percentage of the remaining value if * increasing. Valid values: [-100, 100]. * * @param value */ public native void setLightness(double value)/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); jso.lightness = value; }-*/; public native double getLightness()/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); return jso.lightness; }-*/; /** * Saturation. Shifts the saturation of colors by a percentage of the * original value if decreasing and a percentage of the remaining value if * increasing. Valid values: [-100, 100]. * * @param value */ public native void setSaturation(double value)/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); jso.saturation = value; }-*/; public native double getSaturation()/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); return jso.saturation; }-*/; /** * Visibility: Valid values: 'on', 'off' or 'simplified'. * * @param value */ public native void setVisibility(String value)/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); jso.visibility = value; }-*/; public native String getVisibility()/*-{ var jso = this.@com.emitrom.pilot.util.client.core.JsObject::getJsObj()(); return jso.visibility; }-*/; }
[ "jazzmatadazz@gmail.com" ]
jazzmatadazz@gmail.com
0eeb690f9c68e2c86cf7bf602a8d47607bf6d310
a3211b4da9beae2267f7e68d8a9cbe8600521af4
/src/main/java/com/verispjdbcprg/verispjdbc/VerispjdbcApplication.java
ba1e2d683f5e45d533c8125027e988469e9aef3c
[]
no_license
abhijeetvc/verispjdbc
f8d9e10f01a050cd3b22c54bcd41789da1485b79
fdaa8cb527c2d5083154b88456b9b539104cc2f1
refs/heads/master
2023-02-07T15:06:41.154815
2020-12-17T06:57:34
2020-12-17T06:57:34
321,895,620
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package com.verispjdbcprg.verispjdbc; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class VerispjdbcApplication { public static void main(String[] args) { SpringApplication.run(VerispjdbcApplication.class, args); } }
[ "abhijeetvc7@gmail.com" ]
abhijeetvc7@gmail.com
f2d15e7a00bfa825039f951269a490ef8f4bc057
cc83d947649ec7bb9a502a3bc7293b6b875e5278
/CodeSmellAnalyzer/src/it/unisa/codeSmellAnalyzer/testSmellDetector/MysteryGuest.java
1fcf667c272adc3ace6bb68544d536f6a052fd47
[]
no_license
Gcatolino/CodeSmellAnalyzer
13daa9e0289c5e94e1a4462dfab8e6d92085d3d4
385fc9c7e2fa510bd1320b04e78a3995674ec5da
refs/heads/master
2023-04-11T06:35:35.051810
2021-04-21T20:02:27
2021-04-21T20:02:27
72,425,861
0
1
null
null
null
null
UTF-8
Java
false
false
844
java
package it.unisa.codeSmellAnalyzer.testSmellDetector; import it.unisa.codeSmellAnalyzer.beans.ClassBean; import it.unisa.codeSmellAnalyzer.beans.MethodBean; public class MysteryGuest { public boolean isMysteryGuest(ClassBean pClassBean) { boolean mysteryGuest = false; for (MethodBean mb : pClassBean.getMethods()) { String body = mb.getTextContent(); if (!mysteryGuest){ if (body.contains(" File ") || body.contains(" File(") || body.contains("db")){ mysteryGuest = true; } } } return mysteryGuest; } public boolean isMysteryGuest(MethodBean pMethodBean) { boolean mysteryGuest = false; String body = pMethodBean.getTextContent(); if (!mysteryGuest){ if (body.contains(" File ") || body.contains(" File(") || body.contains("db")){ mysteryGuest = true; } } return mysteryGuest; } }
[ "fabio.palomba.89@gmail.com" ]
fabio.palomba.89@gmail.com
5b98e53b6df8598a891066f57c54b2548b7b9be6
005712c065dcb71be2f5dc19fb9b4269822931c5
/src/main/java/com/donghyeon/designpattern/bridge/BridgePatternTest.java
b026248b5415ba42762d7d20d35a8de05bc91749
[]
no_license
DaeAkin/java-design-pattern
4f3547a522efe1365ca7a6a790667b26962d4901
e0878e14e7a1432e911fcc7ded397947c14992c0
refs/heads/master
2020-12-27T15:09:09.863941
2020-07-04T01:40:43
2020-07-04T01:40:43
237,947,437
8
0
null
null
null
null
UTF-8
Java
false
false
288
java
package com.donghyeon.designpattern.bridge; public class BridgePatternTest { public static void main(String[] args) { Shape tri = new Triangle(new RedColor()); tri.applyColor(); Shape pent = new Pentagon(new GreenColor()); pent.applyColor(); } }
[ "mindonghyeon890@gmail.com" ]
mindonghyeon890@gmail.com
44293664249d2f9ba3b532e17c6c4a592469e3ce
af62c80faba96302a2b89fb0bbf9c882a88e542d
/src/main/java/de/pandadoxo/dox_varo/api/gui/Buttons/SwitchButton.java
a577445ee84c939c493edfad27944635a6a27b49
[]
no_license
Pandadoxo/Dox_Varo
56a936ff52ae46dcc19f6a027fae3d141fa88f91
530c930bd383c1721b4343ae0a098b3c886b4d55
refs/heads/master
2023-03-21T05:28:09.534382
2021-03-16T11:16:10
2021-03-16T11:16:10
348,318,927
1
0
null
null
null
null
UTF-8
Java
false
false
3,579
java
package de.pandadoxo.dox_varo.api.gui.Buttons; import de.pandadoxo.dox_varo.Main; import de.pandadoxo.dox_varo.api.gui.Listener.ButtonPressedListener; import de.pandadoxo.dox_varo.api.gui.Menu.GuiItem; import de.pandadoxo.dox_varo.api.gui.Menu.GuiMenu; import org.bukkit.Bukkit; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; public class SwitchButton extends Button { private Listener listener; private GuiMenu menu; private int slot; private GuiItem iconOn; private GuiItem iconOff; private boolean active; private ButtonPressedListener buttonPressedListener; public SwitchButton(GuiItem iconOn, GuiItem iconOff, GuiMenu menu, int slot, ButtonPressedListener buttonPressedListener) { super(menu, slot); this.iconOn = iconOn; this.iconOff = iconOff; this.menu = menu; this.slot = slot; this.buttonPressedListener = buttonPressedListener; if (active) menu.getInventory().setItem(slot, iconOn.getItem()); else menu.getInventory().setItem(slot, iconOff.getItem()); Listener listener = new Listener() { @EventHandler public void onInventoryClick(InventoryClickEvent e) { if (getMenu() == null) return; if (!e.getInventory().equals(getMenu().getInventory())) { destroy(); return; } if (e.getSlot() != getSlot()) return; if (!(e.getWhoClicked() instanceof Player)) return; e.setCancelled(true); setActive(!active); ((Player) e.getWhoClicked()).playSound(e.getWhoClicked().getLocation(), Sound.CHEST_CLOSE, 1, 2); getButtonPressedListener().onPressed(e.getClick(), menu, getIconOn(), getIconOff(), getSlot(), active); return; } }; Bukkit.getPluginManager().registerEvents(listener, Main.getInstance()); } public GuiMenu getMenu() { return menu; } public void setMenu(GuiMenu menu) { this.menu = menu; } public int getSlot() { return slot; } public void setSlot(int slot) { this.slot = slot; } public GuiItem getIconOn() { return iconOn; } public void setIconOn(GuiItem iconOn) { this.iconOn = iconOn; } public GuiItem getIconOff() { return iconOff; } public void setIconOff(GuiItem iconOff) { this.iconOff = iconOff; } public boolean isActive() { return active; } public void setActive(boolean active) { if (active) menu.getInventory().setItem(slot, iconOn.getItem()); else menu.getInventory().setItem(slot, iconOff.getItem()); this.active = active; } public ButtonPressedListener getButtonPressedListener() { return buttonPressedListener; } public void setButtonPressedListener(ButtonPressedListener buttonPressedListener) { this.buttonPressedListener = buttonPressedListener; } public void destroy() { HandlerList.unregisterAll(listener); iconOn = null; iconOff = null; menu = null; slot = -1; buttonPressedListener = null; listener = null; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
d33ca466c58a16498afa177c2e1abaafcc8707b7
6a7966384ce4d278b922f66c08f8d266f9255d7e
/app/src/main/java/com/dimfcompany/signpdfapp/ui/act_profile_dialog/ActProfileDialog.java
62761ab78b66949dadc70a2596190021d5674e69
[]
no_license
bios90/SignPdfApp
87a07b9e99087407160b6dc4bc71c3991deee483
ef671cbe9d6a2e5983924648cd9c75be0c2a5e2d
refs/heads/master
2020-05-17T05:07:55.264774
2019-09-21T08:45:56
2019-09-21T08:45:56
183,523,353
0
0
null
null
null
null
UTF-8
Java
false
false
5,251
java
package com.dimfcompany.signpdfapp.ui.act_profile_dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.util.Log; import androidx.annotation.Nullable; import com.dimfcompany.signpdfapp.base.Constants; import com.dimfcompany.signpdfapp.base.activity.BaseActivity; import com.dimfcompany.signpdfapp.local_db.raw.LocalDatabase; import com.dimfcompany.signpdfapp.local_db.sharedprefs.SharedPrefsHelper; import com.dimfcompany.signpdfapp.models.Model_Document; import com.dimfcompany.signpdfapp.models.Model_User; import com.dimfcompany.signpdfapp.networking.Downloader; import com.dimfcompany.signpdfapp.networking.helpers.HelperUser; import com.dimfcompany.signpdfapp.sync.SyncManager; import com.dimfcompany.signpdfapp.sync.Synchronizer; import com.dimfcompany.signpdfapp.utils.FileManager; import com.dimfcompany.signpdfapp.utils.GlobalHelper; import com.dimfcompany.signpdfapp.utils.MessagesManager; import java.util.List; import javax.inject.Inject; public class ActProfileDialog extends BaseActivity implements ActProfileDialogMvp.ViewListener, HelperUser.CallbackGetDocsCount, HelperUser.CallbackUserRoleName, SyncManager.CallbackSyncFromServer { private static final String TAG = "ActProfileDialog"; @Inject MessagesManager messagesManager; @Inject SharedPrefsHelper sharedPrefsHelper; @Inject HelperUser helperUser; @Inject GlobalHelper globalHelper; @Inject Downloader downloader; @Inject LocalDatabase localDatabase; @Inject FileManager fileManager; @Inject Synchronizer synchronizer; Model_User user; ActProfileDialogMvp.MvpView mvpView; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); getPresenterComponent().inject(this); mvpView = viewMvcFactory.getActProfileDialogMvpView(null); mvpView.registerListener(this); setContentView(mvpView.getRootView()); } @Override protected void onStart() { super.onStart(); user = sharedPrefsHelper.getUserFromSharedPrefs(); if (user == null) { return; } String name = user.getLast_name() + " " + user.getFirst_name(); mvpView.setUserName(name); mvpView.setUserEmail(user.getEmail()); loadInfo(); } private void loadInfo() { if (user == null || !globalHelper.isNetworkAvailable()) { return; } helperUser.getDocsCount(user.getId(), this); helperUser.getUserRoleName(user.getId(), this); } @Override public void clickedSync() { if (!GlobalHelper.isNetworkAvailable()) { messagesManager.showNoInternetAlerter(); return; } if (user == null) { return; } messagesManager.showProgressDialog(); synchronizer.syncronizeNotSynced(new SyncManager.CallbackSyncronizeNoSynced() { @Override public void onSuccessSync() { synchronizer.makeSyncFromServer(ActProfileDialog.this); } @Override public void onErrorSync() { Log.e(TAG, "onErrorSync: Error on pre sync"); messagesManager.dismissProgressDialog(); messagesManager.showRedAlerter("Не удалось загрузить документы"); } }); } @Override public void clickedExit() { messagesManager.showSimpleDialog("Выход", "Выйти из аккаунта?", "Выйти", "Отмена", new MessagesManager.DialogButtonsListener() { @Override public void onOkClicked(DialogInterface dialog) { dialog.dismiss(); sharedPrefsHelper.clearUserLocalData(); navigationManager.toActFirst(null); finish(); } @Override public void onCancelClicked(DialogInterface dialog) { dialog.dismiss(); } }); } @Override public void onSuccessGetDocsCount(Integer count) { mvpView.setDogovorCount(count); } @Override public void onSuccessGetUserRole(String roleName) { mvpView.setRoleName(roleName); } @Override protected void onDestroy() { mvpView.unregisterListener(this); super.onDestroy(); } @Override public void onSuccessSyncFromServer() { messagesManager.dismissProgressDialog(); messagesManager.showGreenAlerter("База успешно синхронизирована"); sendBroadcast(new Intent(Constants.BROADCAST_UPDATE_FINISHED_UI)); } @Override public void onErrorSyncFromServer() { messagesManager.dismissProgressDialog(); messagesManager.showRedAlerter("Не удалось загрузить документы"); } @Override public void clickedEditUser() { navigationManager.toActUserAuthDialog(null, user.getId()); } }
[ "bios90@mail.ru" ]
bios90@mail.ru
b0522b89f3a69f0e68f060ccba3646e1f48dd171
cac785532488f99b12b47f2cadc1b3302b181765
/src/main/java/com/github/lbroudoux/elasticsearch/river/s3/rest/S3ManageAction.java
7f7f0d5e171e3fc187c35a3096e965650a98a2bc
[ "Apache-2.0" ]
permissive
harrisj/es-amazon-s3-river
d101c2f29423c2cdd1bd99026d8584ad78fe78e2
a7c42ece22a63b75bd19fad405e0b91da8d11a34
refs/heads/master
2020-12-25T08:38:19.494111
2015-04-27T16:12:40
2015-04-27T16:12:40
31,087,975
1
3
null
2015-02-20T22:21:12
2015-02-20T22:21:12
null
UTF-8
Java
false
false
3,870
java
/* * Licensed to Laurent Broudoux (the "Author") under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Author 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 com.github.lbroudoux.elasticsearch.river.s3.rest; import java.io.IOException; import org.elasticsearch.client.Client; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.BytesRestResponse; import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.rest.RestRequest.Method; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; /** * REST actions definition for starting and stopping an Amazon S3 river. * @author laurent */ public class S3ManageAction extends BaseRestHandler{ /** The constant for 'start river' command. */ public static final String START_COMMAND = "_start"; /** The constant for 'stop river' command. */ public static final String STOP_COMMAND = "_stop"; @Inject public S3ManageAction(Settings settings, Client client, RestController controller){ super(settings, client); // Define S3 REST endpoints. controller.registerHandler(Method.GET, "/_s3/{rivername}/{command}", this); } @Override public void handleRequest(RestRequest request, RestChannel channel, Client client) throws Exception{ if (logger.isDebugEnabled()){ logger.debug("REST S3ManageAction called"); } String rivername = request.param("rivername"); String command = request.param("command"); String status = null; if (START_COMMAND.equals(command)){ status = "STARTED"; } else if (STOP_COMMAND.equals(command)){ status = "STOPPED"; } try{ if (status != null){ XContentBuilder xb = jsonBuilder() .startObject() .startObject("amazon-s3") .field("feedname", rivername) .field("status", status) .endObject() .endObject(); client.prepareIndex("_river", rivername, "_s3status").setSource(xb).execute().actionGet(); } XContentBuilder builder = jsonBuilder(); builder .startObject() .field(new XContentBuilderString("ok"), true) .endObject(); channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder)); } catch (IOException e) { onFailure(request, channel, e); } } /** */ private void onFailure(RestRequest request, RestChannel channel, Exception e) throws Exception{ try{ channel.sendResponse(new BytesRestResponse(channel, e)); } catch (IOException ioe){ logger.error("Sending failure response fails !", e); channel.sendResponse(new BytesRestResponse(RestStatus.INTERNAL_SERVER_ERROR)); } } }
[ "laurent.broudoux@gmail.com" ]
laurent.broudoux@gmail.com
3ad32fc65dc758e5062d787de69c1b8a931c23f0
6f581e209761374a5fa4d49730cff4e8fedc06cb
/src/main/java/ru/epam/javacore/lesson_18_19_20_java_8/homework/cargo/domain/FoodCargo.java
df646ab902b3c0f066cc8e77f0849349cf215bb9
[]
no_license
DmitryYusupov/epamjavacore
b4cfe78ba608e05d855568704b13d696d357474a
6f5009c89d372dbeb7dd5daffaed47e383ad93c0
refs/heads/master
2022-02-14T00:42:11.032705
2020-02-13T08:31:15
2020-02-13T08:31:15
225,563,013
0
10
null
2022-01-21T23:37:23
2019-12-03T07:59:48
Java
UTF-8
Java
false
false
631
java
package ru.epam.javacore.lesson_18_19_20_java_8.homework.cargo.domain; import java.util.Date; public class FoodCargo extends Cargo { private Date expirationDate; private int storeTemperature; @Override public CargoType getCargoType() { return CargoType.FOOD; } public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } public int getStoreTemperature() { return storeTemperature; } public void setStoreTemperature(int storeTemperature) { this.storeTemperature = storeTemperature; } }
[ "Dmitry_Yusupov@epam.com" ]
Dmitry_Yusupov@epam.com
515c8dc8d6b90351be53e7e70d20d6a72dc00bc1
e83a76fead2de256db9a67d216f52b1f74541b88
/src/main/java/zabi/minecraft/covens/common/enchantment/ModEnchantments.java
7b411a956a3f8f208a487524d25d792a47257b7d
[]
no_license
Ionharin/Covens
a4d3489c0283317540d78f523f4c6d1053c623fc
2a05138a8d6e4916118b7427a0b27748f4aef538
refs/heads/master
2021-05-12T19:41:06.619335
2017-12-03T20:18:53
2017-12-03T20:18:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,057
java
package zabi.minecraft.covens.common.enchantment; import zabi.minecraft.covens.common.lib.Log; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment.Rarity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class ModEnchantments { public static Enchantment soul_siphon, curse_resilience, spell_shielding; public static void registerAll() { MinecraftForge.EVENT_BUS.register(new ModEnchantments()); Log.i("Creating Enchantments"); soul_siphon = new EnchantmentTalismans(Rarity.UNCOMMON, "soul_siphon"); curse_resilience = new EnchantmentTalismans(Rarity.COMMON, "curse_resilience"); spell_shielding = new EnchantmentTalismans(Rarity.UNCOMMON, "spell_shielding"); } @SubscribeEvent public void registerEnchantment(RegistryEvent.Register<Enchantment> evt) { Log.i("Registering Enchantments"); evt.getRegistry().registerAll(soul_siphon, curse_resilience, spell_shielding); } }
[ "zabi94@gmail.com" ]
zabi94@gmail.com
47b9cf84237236b54053c80b3b99ff592ddbe2a5
29261321441a1fff6971ea5a2ce66cfc3087df8a
/Net/ConnectServer.java
1c7dffdb56beeb36dc6c69cf820a27259087757d
[]
no_license
amitsrivastava4all/javabatchjune430
364a1bb24ef7665abcbdaeb3cef0bd35536ade2f
02aedf231a37b8b450aa67473d93c7846d4f4431
refs/heads/master
2020-04-06T07:10:04.411283
2016-09-10T09:33:47
2016-09-10T09:33:47
62,220,158
3
2
null
null
null
null
UTF-8
Java
false
false
1,118
java
import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import java.util.Scanner; public class ConnectServer { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub String path = "/Users/amit/Documents/downloadlocation"; System.out.println("Enter the URL to Connect...."); String urlValue = new Scanner(System.in).next(); String fileName = urlValue.substring(urlValue.lastIndexOf("/")); System.out.println("URL VALUE is "+urlValue); System.out.println("FileName is "+fileName); System.out.println("Path is "+path); System.out.println("Full Path "+path+fileName); FileOutputStream fs = new FileOutputStream(path+fileName); URL url =new URL(urlValue); URLConnection connection = url.openConnection(); connection.connect(); InputStream is = connection.getInputStream(); int singleByte = is.read(); while(singleByte!=-1){ fs.write(singleByte); System.out.print((char)singleByte); singleByte = is.read(); } fs.close(); is.close(); } }
[ "amit4alljava@gmail.com" ]
amit4alljava@gmail.com
f2ac6a871fa08a37b802fb9ec0539ab448f28a12
2958df3f24ae8a8667394b6ebb083ba6a9a1d36a
/Universal08Cloud/src/br/UFSC/GRIMA/util/Ponto.java
1836edabcb88ff185a079247d2a375c740a46398
[]
no_license
igorbeninca/utevolux
27ac6af9a6d03f21d815c057f18524717b3d1c4d
3f602d9cf9f58d424c3ea458346a033724c9c912
refs/heads/master
2021-01-19T02:50:04.157218
2017-10-13T16:19:41
2017-10-13T16:19:41
51,842,805
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
package br.UFSC.GRIMA.util; import java.io.Serializable; public class Ponto implements Serializable{ private double x; private double y; private double z; public Ponto(double x, double y, double z) { // TODO Auto-generated constructor stub this.x = x; this.y = y; this.z = z; } public double getX() { return this.x; } public double getY() { return this.y; } public double getZ() { return this.z; } public void setX(double x) { this.x = x; } public void setY(double y) { this.y = y; } public void setZ(double z) { this.z = z; } public String toString(){ return "X=" + x + " Y=" + y + " Z=" + z; } public String getDados(){ return ("[" + x + ", " + y + ", " + z + "]\n"); } }
[ "pilarrmeister@gmail.com" ]
pilarrmeister@gmail.com
e18f76619aaf3aee9f4a6953e7e6d5b18990c8a7
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/wallet_payu/balance/a/b.java
ee06d48202275f15fc9c7447d849317b84cf9e39
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
1,807
java
package com.tencent.mm.plugin.wallet_payu.balance.a; import com.tencent.mm.wallet_core.e.a.a; import java.util.HashMap; import java.util.Map; import org.json.JSONObject; public final class b extends a { public String fpP; public String fuH; public boolean isRedirect; public String lie; public double pNX; public String pin; public String tbn; public String tbo; public String tbp; public String tbq; public int tbr; public String tbs; public String tbt; public boolean tbu; public String tbv; public b(String str, String str2, String str3, double d, String str4, String str5, String str6, String str7) { this.pin = str; this.tbn = str2; this.fuH = str3; this.pNX = d; this.fpP = str4; this.tbo = str5; this.tbp = str6; this.tbq = str7; Map hashMap = new HashMap(); hashMap.put("pin", str); hashMap.put("bind_serial", str5); hashMap.put("req_key", str3); hashMap.put("fee_type", str4); hashMap.put("total_fee", Math.round(100.0d * d)); hashMap.put("bank_type", str6); hashMap.put("cvv", str2); hashMap.put("dest_bind_serial", str7); D(hashMap); } public final int bKL() { return 10; } public final void a(int i, String str, JSONObject jSONObject) { this.lie = jSONObject.optString("trans_id"); this.tbr = jSONObject.optInt("response_result"); this.isRedirect = jSONObject.optBoolean("redirect"); this.tbs = jSONObject.optString("gateway_reference"); this.tbt = jSONObject.optString("gateway_code"); this.tbu = jSONObject.optBoolean("is_force_adjust"); this.tbv = jSONObject.optString("force_adjust_code"); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
26d9598af38030895baf6dd585725cac9ebaa4c7
a5b866f5708d857347a50d6f106754c040d1acf4
/Maps, Lambda and Stream API - Exercise/src/LegendaryFarming.java
7558b2ae47a964f576ee230c972d7ecadd1d4bf5
[]
no_license
StanchevaYoana/Java-Fundamentals
3c8434cdab20a009737e0d25be2d45bc0d772e37
99a883c313864f52ae39026a508925f4924325d4
refs/heads/master
2020-06-21T20:00:54.710482
2019-08-05T13:50:29
2019-08-05T13:50:29
197,541,288
3
0
null
null
null
null
UTF-8
Java
false
false
2,636
java
import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class LegendaryFarming { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Map<String, Integer> keyMaterials = new HashMap<>(); Map<String, Integer> trash = new HashMap<>(); String winner = ""; boolean haveWinner = false; keyMaterials.put("shards", 0); keyMaterials.put("fragments", 0); keyMaterials.put("motes", 0); do { String[] input = scanner.nextLine().split("\\s+"); for (int i = 0; i < input.length; i += 2) { int quantity = Integer.valueOf(input[i]); String material = input[i + 1].toLowerCase(); if (!keyMaterials.containsKey(material)) { trash.putIfAbsent(material, 0); trash.put(material, trash.get(material) + quantity); } else { keyMaterials.put(material, keyMaterials.get(material) + quantity); if (keyMaterials.get(material) >= 250) { keyMaterials.put(material, keyMaterials.get(material) - 250); switch (material) { case "shards": winner = "Shadowmourne"; break; case "fragments": winner = "Valanyr"; break; case "motes": winner = "Dragonwrath"; break; } System.out.printf("%s obtained!%n", winner); haveWinner = true; break; } } } } while (!haveWinner); keyMaterials .entrySet().stream().sorted((a, b) -> { int sort = Integer.compare(b.getValue(), a.getValue()); if (sort == 0) { sort = a.getKey().compareTo(b.getKey()); } return sort; }).forEach(e -> { System.out.println(String.format( "%s: %d", e.getKey(), e.getValue() )); }); trash .entrySet().stream() .sorted(Comparator.comparing(Map.Entry::getKey)) .forEach(e -> { System.out.println(String.format("%s: %d", e.getKey(), e.getValue())); }); } }
[ "yoana.radoslavova@gmail.com" ]
yoana.radoslavova@gmail.com