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
601c7d518a8e5911d1bcffaddc361315f4b57060
cc2d6ff05315bc3f36d0e2f72599d8eb79bec090
/app/src/main/java/com/appzone/eyeres/activities_fragments/activity_splash/SplashActivity.java
07203328ec74899be46b5c03355056645d9c1ec3
[]
no_license
freelanceapp/Eyeres
5848cc3914c683a4fa15677c8c2ccf497d899bf7
74d2524e2427cff57df0375b9cbcc19e6af343f5
refs/heads/master
2020-05-16T23:42:23.532595
2019-04-18T11:18:27
2019-04-18T11:18:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,518
java
package com.appzone.eyeres.activities_fragments.activity_splash; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.FrameLayout; import com.appzone.eyeres.R; import com.appzone.eyeres.activities_fragments.activity_home.activity.HomeActivity; import com.appzone.eyeres.activities_fragments.activity_sign_in.activity.SignInActivity; import com.appzone.eyeres.local_manager.LocalManager; import com.appzone.eyeres.models.UserModel; import com.appzone.eyeres.preferences.Preferences; import com.appzone.eyeres.singletone.UserSingleTone; import com.appzone.eyeres.tags.Tags; import java.util.Locale; import io.paperdb.Paper; public class SplashActivity extends AppCompatActivity { private FrameLayout fl; private Preferences preferences; private UserSingleTone userSingleTone; private String current_language; @Override protected void attachBaseContext(Context newBase) { super.attachBaseContext(LocalManager.updateResources(newBase,LocalManager.getLanguage(newBase))); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); Paper.init(this); current_language = Paper.book().read("lang", Locale.getDefault().getLanguage()); preferences = Preferences.getInstance(); userSingleTone = UserSingleTone.getInstance(); fl = findViewById(R.id.fl); Animation animation = AnimationUtils.loadAnimation(this,R.anim.fade); fl.startAnimation(animation); animation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { String session = preferences.getSession(SplashActivity.this); if (session.equals(Tags.session_login)) { UserModel userModel = preferences.getUserData(SplashActivity.this); userSingleTone.setUserModel(userModel); Intent intent = new Intent(SplashActivity.this, HomeActivity.class); startActivity(intent); finish(); if (current_language.equals("ar")) { overridePendingTransition(R.anim.from_right,R.anim.to_left); }else { overridePendingTransition(R.anim.from_left,R.anim.to_right); } }else { Intent intent = new Intent(SplashActivity.this, SignInActivity.class); startActivity(intent); finish(); if (current_language.equals("ar")) { overridePendingTransition(R.anim.from_right,R.anim.to_left); }else { overridePendingTransition(R.anim.from_left,R.anim.to_right); } } } @Override public void onAnimationRepeat(Animation animation) { } }); } }
[ "emadmagdi.151995@gmai.com" ]
emadmagdi.151995@gmai.com
3d0a07c4020f5404f62fd3d6d279e6aa98e92b29
a7e74ddfe68d261800076a6243317cc5e5737cee
/flashlight/src/main/java/com/gongyou/flashlight/MyApp.java
40e537a9729992310a835ca0c968c439879bed3c
[]
no_license
hezijie1234/GYApplication
0566bbf418671c705e63e4ed8e097f07e1e692aa
ca7fea42cd26e15c56e99612b46fb53731bd1e0e
refs/heads/master
2021-07-16T20:23:37.794836
2020-04-28T09:19:08
2020-04-28T09:19:08
135,516,356
0
0
null
null
null
null
UTF-8
Java
false
false
474
java
package com.gongyou.flashlight; import android.app.Application; import android.content.Context; import android.content.res.Configuration; /** * Created by hezijie on 2018/11/13. */ public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); getApplicationContext(); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); } }
[ "1710276127@qq.com" ]
1710276127@qq.com
825871acdd06c30081eba00545d89b597624c818
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/response/AlipayLifeassistantProdBillGetResponse.java
35789c688ee94a58e15ea12548d7a6ff0ff764b1
[ "Apache-2.0" ]
permissive
WQmmm/alipay-sdk-java-all
57974d199ee83518523e8d354dcdec0a9ce40a0c
66af9219e5ca802cff963ab86b99aadc59cc09dd
refs/heads/master
2023-06-28T03:54:17.577332
2021-08-02T10:05:10
2021-08-02T10:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,052
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.lifeassistant.prod.bill.get response. * * @author auto create * @since 1.0, 2021-07-14 10:10:14 */ public class AlipayLifeassistantProdBillGetResponse extends AlipayResponse { private static final long serialVersionUID = 3738378463933833832L; /** * 支付金额 */ @ApiField("amount") private String amount; /** * 流水号 */ @ApiField("order_id") private String orderId; /** * 支付款项名称 */ @ApiField("order_item") private String orderItem; /** * 支付时间,毫秒 */ @ApiField("pay_time") private String payTime; /** * 付款类型 */ @ApiField("pay_type") private String payType; /** * 收款方名称|机构名称 */ @ApiField("payee") private String payee; /** * 交易类型 S——担保交易 FP——即时到帐 COD——货到付款 */ @ApiField("trade_type") private String tradeType; public void setAmount(String amount) { this.amount = amount; } public String getAmount( ) { return this.amount; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getOrderId( ) { return this.orderId; } public void setOrderItem(String orderItem) { this.orderItem = orderItem; } public String getOrderItem( ) { return this.orderItem; } public void setPayTime(String payTime) { this.payTime = payTime; } public String getPayTime( ) { return this.payTime; } public void setPayType(String payType) { this.payType = payType; } public String getPayType( ) { return this.payType; } public void setPayee(String payee) { this.payee = payee; } public String getPayee( ) { return this.payee; } public void setTradeType(String tradeType) { this.tradeType = tradeType; } public String getTradeType( ) { return this.tradeType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
f45da0ead5609489da34b38cd3d0beb17ce64c96
4c9d35da30abf3ec157e6bad03637ebea626da3f
/eclipse/libs_src/org/ripple/bouncycastle/crypto/digests/SHA512Digest.java
a6c1191f522e872314dfad30a99521f362955794
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
youweixue/RipplePower
9e6029b94a057e7109db5b0df3b9fd89c302f743
61c0422fa50c79533e9d6486386a517565cd46d2
refs/heads/master
2020-04-06T04:40:53.955070
2015-04-02T12:22:30
2015-04-02T12:22:30
33,860,735
0
0
null
2015-04-13T09:52:14
2015-04-13T09:52:11
null
UTF-8
Java
false
false
1,861
java
package org.ripple.bouncycastle.crypto.digests; import org.ripple.bouncycastle.crypto.util.Pack; import org.ripple.bouncycastle.util.Memoable; /** * FIPS 180-2 implementation of SHA-512. * * <pre> * block word digest * SHA-1 512 32 160 * SHA-256 512 32 256 * SHA-384 1024 64 384 * SHA-512 1024 64 512 * </pre> */ public class SHA512Digest extends LongDigest { private static final int DIGEST_LENGTH = 64; /** * Standard constructor */ public SHA512Digest() { } /** * Copy constructor. This will copy the state of the provided message * digest. */ public SHA512Digest(SHA512Digest t) { super(t); } public String getAlgorithmName() { return "SHA-512"; } public int getDigestSize() { return DIGEST_LENGTH; } public int doFinal(byte[] out, int outOff) { finish(); Pack.longToBigEndian(H1, out, outOff); Pack.longToBigEndian(H2, out, outOff + 8); Pack.longToBigEndian(H3, out, outOff + 16); Pack.longToBigEndian(H4, out, outOff + 24); Pack.longToBigEndian(H5, out, outOff + 32); Pack.longToBigEndian(H6, out, outOff + 40); Pack.longToBigEndian(H7, out, outOff + 48); Pack.longToBigEndian(H8, out, outOff + 56); reset(); return DIGEST_LENGTH; } /** * reset the chaining variables */ public void reset() { super.reset(); /* * SHA-512 initial hash value The first 64 bits of the fractional parts * of the square roots of the first eight prime numbers */ H1 = 0x6a09e667f3bcc908L; H2 = 0xbb67ae8584caa73bL; H3 = 0x3c6ef372fe94f82bL; H4 = 0xa54ff53a5f1d36f1L; H5 = 0x510e527fade682d1L; H6 = 0x9b05688c2b3e6c1fL; H7 = 0x1f83d9abfb41bd6bL; H8 = 0x5be0cd19137e2179L; } public Memoable copy() { return new SHA512Digest(this); } public void reset(Memoable other) { SHA512Digest d = (SHA512Digest) other; copyIn(d); } }
[ "longwind2012@hotmail.com" ]
longwind2012@hotmail.com
fb035b3e9e120217b483b5fe0e719eccdd076cd1
aeceebd88c27c3d9a692b39b3fd970c63fc1c9c8
/day_07_6th_exercise/src/Member.java
75ae1297f1ddf21f09fad98fb7c393d05301d37b
[]
no_license
shsewonitw/study_Java
15a5a6dc0f80e021536749a08eface4f7995866a
cea49b84b209c8b2e8220b270f2db8bf25df88e2
refs/heads/master
2020-06-13T21:59:37.627150
2019-07-02T06:25:15
2019-07-02T06:25:15
194,801,164
0
0
null
null
null
null
UTF-8
Java
false
false
193
java
public class Member { private String name; private String id; private String password; private int age; public Member(String name, String id) { this.name = name; this.id = id; } }
[ "shsewonitw@gmail.com" ]
shsewonitw@gmail.com
799efa9379e2ac98964370349f684d4d0c1e9e15
82e2fa3b1128edc8abd2bd84ecfc01c932831bc0
/jena-integration-tests/src/test/java/org/apache/jena/http/AbstractTestAuthRemote.java
27e097b35127b5556034979ceb72b7b646daa8a2
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
apache/jena
b64f6013582f2b5aa38d1c9972d7b14e55686316
fb41e79d97f065b8df9ebbc6c69b3f983b6cde04
refs/heads/main
2023-08-14T15:16:21.086308
2023-08-03T08:34:08
2023-08-03T08:34:08
7,437,073
966
760
Apache-2.0
2023-09-02T09:04:08
2013-01-04T08:00:32
Java
UTF-8
Java
false
false
4,066
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.http; import static org.apache.jena.fuseki.test.HttpTest.expect401; import static org.junit.Assert.assertNotNull; import java.net.URI; import org.apache.jena.graph.Graph; import org.apache.jena.http.auth.AuthEnv; import org.apache.jena.query.Query; import org.apache.jena.query.QueryFactory; import org.apache.jena.sparql.exec.QueryExec; import org.apache.jena.sparql.exec.http.GSP; import org.apache.jena.sparql.exec.http.QueryExecHTTP; import org.junit.Test; /** * Covers the AuthEnv/Lib challenge response code * for basic and digest authentication. */ public abstract class AbstractTestAuthRemote { protected abstract String endpoint() ; protected abstract URI endpointURI(); protected abstract String user(); protected abstract String password(); // ---- QueryExecHTTP @Test public void auth_qe_no_auth() { expect401(()->{ try ( QueryExec qexec = QueryExecHTTP.newBuilder() .endpoint(endpoint()) .queryString("ASK{}") .build()) { qexec.ask(); } }); } @Test public void auth_qe_good_registered() { // Digest auth is not provided by java.net.http. // Digest only works via AuthEnv. AuthEnv.get().registerUsernamePassword(endpointURI(), user(), password()); try ( QueryExec qexec = QueryExecHTTP.newBuilder() //.httpClient(hc) .endpoint(endpoint()) .queryString("ASK{}") .build()) { qexec.ask(); } } @Test public void auth_qe_good_registered_query() { // Digest only works via AuthEnv. AuthEnv.get().registerUsernamePassword(endpointURI(), user(), password()); // This has a query string with newlines. // Issue: https://github.com/apache/jena/issues/1318 Query query = QueryFactory.create("ASK{}"); try ( QueryExec qexec = QueryExecHTTP.newBuilder() //.httpClient(hc) .endpoint(endpoint()) .query(query) .build()) { qexec.ask(); } } @Test public void auth_qe_bad_registered() { expect401(()->{ AuthEnv.get().registerUsernamePassword(endpointURI(), "wrong-user", password()); try ( QueryExec qexec = QueryExecHTTP.newBuilder() .endpoint(endpoint()) .queryString("ASK{}") .build()) { qexec.ask(); } }); } // ---- GSP @Test public void auth_gsp_no_auth() { expect401(()->{ GSP.service(endpoint()).defaultGraph().GET(); }); } @Test public void auth_gsp_good_registered() { AuthEnv.get().registerUsernamePassword(endpointURI(), user(), password()); Graph graph = GSP.service(endpoint()).defaultGraph().GET(); assertNotNull(graph); } @Test public void auth_gsp_bad_registered() { AuthEnv.get().registerUsernamePassword(endpointURI(), "wrong-user", password()); expect401(()->{ GSP.service(endpoint()).defaultGraph().GET(); }); } }
[ "andy@apache.org" ]
andy@apache.org
8c0a07374d101d4b9e3a2b722cb10172761ff4f0
187713e94047e26b7019721d7ca2e2f5158b1c20
/src/main/java/algz/platform/util/FileUtil.java
ae23e029f349f648cce7610c465e83e22b2d447b
[]
no_license
algz/Framework
f7b793d94f1e81d6d878492466c77e022833f872
4a6f1e3e25e25f34192c82beb7b4d49d973606ae
refs/heads/master
2021-01-18T22:40:40.300148
2018-04-18T01:56:51
2018-04-18T01:56:51
30,111,934
0
1
null
null
null
null
UTF-8
Java
false
false
1,697
java
package algz.platform.util; import java.io.File; public class FileUtil { /** * File file=new File("D:\\demo"); //deleteFileByWinCom(file); deleteFile(file); * 通过调用系统命令删除一个文件夹及下面的所有文件 * @param file */ public static void deleteFileByWinCom(File file){ if(file.exists()){ Runtime rt = Runtime.getRuntime(); String cmd = null; try{ if(file.isFile()){ cmd = "cmd.exe /c del /q/a/f/s "+file.getAbsolutePath(); }else{ cmd = "cmd.exe /c rd /s/q "+file.getAbsolutePath(); } rt.exec(cmd); System.out.println("成功执行了命令..."); }catch(Exception e){ System.out.println("调用系统命令失败了..."); } } } /** * 通过递归调用删除一个文件夹及下面的所有文件 * @param file */ public static void deleteFile(File file){ if(file.exists()){ if(file.isFile()){//表示该文件不是文件夹 file.delete(); }else{ //首先得到当前的路径 String[] childFilePaths = file.list(); for(String childFilePath : childFilePaths){ File childFile=new File(file.getAbsolutePath()+"\\"+childFilePath); deleteFile(childFile); } file.delete(); } } } }
[ "algz1982@gmail.com" ]
algz1982@gmail.com
8ae8d4a285c53c6e446a426ea01286850008ff53
10b3215e3fce60c5a43175342dc503b59e908618
/services/services_core/src/main/java/com/sfl/pms/services/payment/customer/method/event/StartCustomerPaymentMethodRemovalRequestProcessingEvent.java
a5052aac6b699e4ab426c2298b06eb0eb8cfd93a
[ "Apache-2.0" ]
permissive
rubvardanyan/ms_payment
118d9ffa8cd36a315f9c5fb51423d8f47021bfbf
cd3d29c3481c7bedb9f8b5e4acecc5c11b2ca530
refs/heads/master
2021-01-09T05:34:44.164747
2018-10-03T14:56:20
2018-10-03T14:56:20
80,759,925
3
0
null
2017-02-02T19:20:25
2017-02-02T19:20:25
null
UTF-8
Java
false
false
1,975
java
package com.sfl.pms.services.payment.customer.method.event; import com.sfl.pms.services.system.event.model.ApplicationEvent; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.springframework.util.Assert; /** * User: Mher Sargsyan * Company: SFL LLC * Date: 4/13/15 * Time: 2:45 PM */ public class StartCustomerPaymentMethodRemovalRequestProcessingEvent implements ApplicationEvent { /* Properties */ private final Long removalRequestId; /* Constructors */ public StartCustomerPaymentMethodRemovalRequestProcessingEvent(final Long removalRequestId) { Assert.notNull(removalRequestId, "Authorization request should not be null"); this.removalRequestId = removalRequestId; } /* Properties getters and setters */ public Long getRemovalRequestId() { return removalRequestId; } /* Equals, HashCode and ToString */ @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof StartCustomerPaymentMethodRemovalRequestProcessingEvent)) { return false; } final StartCustomerPaymentMethodRemovalRequestProcessingEvent that = (StartCustomerPaymentMethodRemovalRequestProcessingEvent) o; final EqualsBuilder builder = new EqualsBuilder(); builder.append(getRemovalRequestId(), that.getRemovalRequestId()); return builder.isEquals(); } @Override public int hashCode() { final HashCodeBuilder builder = new HashCodeBuilder(); builder.append(getRemovalRequestId()); return builder.build(); } @Override public String toString() { final ToStringBuilder builder = new ToStringBuilder(this); builder.append("removalRequestId", getRemovalRequestId()); return builder.build(); } }
[ "ruben.dilanyan@sflpro.com" ]
ruben.dilanyan@sflpro.com
9741a1011584078eafd307e986a8ed2f6773bbad
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-07-19-tempmail/sources/com/google/android/gms/common/api/internal/zacd.java
68403a6058453c64cce7f83519418f7918c52800
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
408
java
package com.google.android.gms.common.api.internal; import com.google.android.gms.common.api.PendingResult; import com.google.android.gms.common.api.Result; public final class zacd<R extends Result> extends PendingResult<R> { public final void b() { throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()"); } }
[ "zteeed@minet.net" ]
zteeed@minet.net
283d003d1c5d6e5beb849afb5699daaf8aa2ca4a
103d4cbac7b4c0c73c8032cae7a85952b0d486b1
/sd-project-2018-initiativesplatform/src/main/java/com/application/initiatives_platform/InitiativesPlatformServer/business/services/CampaignService.java
f3b6e34a754b1d1a94010664cb8deb6ea907548e
[]
no_license
ieremiasviorel/software_design_homeworks
0692ff60c560fb87303fede12edf6f09cf0eaa4e
a8690c5ad391da4fda52ada42221ba58fb254fbe
refs/heads/master
2020-05-01T08:42:53.750565
2018-10-10T21:43:58
2018-10-10T21:43:58
177,384,529
0
0
null
null
null
null
UTF-8
Java
false
false
260
java
package com.application.initiatives_platform.InitiativesPlatformServer.business.services; import com.application.initiatives_platform.InitiativesPlatformServer.data.entity.Campaign; public interface CampaignService { public Campaign getCurrentCampaign(); }
[ "ieremiasviorel@yahoo.com" ]
ieremiasviorel@yahoo.com
c65d130861b13863374ed0afab3de4891ccd1b60
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/383058.java
28aee5f58ac33435986d397ac342f3328f368338
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
746
java
class c383058 { public static boolean getFile(String s, String name) { try { File f = new File("D:\\buttons\\data\\sounds\\" + name); URL url = new URL(s); URLConnection conn = url.openConnection(); BufferedInputStream bis = new BufferedInputStream(conn.getInputStream()); int ch; BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(f)); while ((ch = bis.read()) != -1) { bos.write(ch); } System.out.println("wrote audio url: " + s + " \nto file " + f); } catch (Exception e) { e.printStackTrace(); return false; } return true; } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
fb87d84723f1d12efa6261085e3ee0cda36648cd
0decdab2a8efd451dec5dd9a94f88325eb1993c3
/jdroid-javaweb/src/main/java/com/jdroid/javaweb/google/gcm/GcmMessage.java
7e846fe113fdb4c02a492def8c02152a9785636a
[ "Apache-2.0" ]
permissive
sayi21cn/jdroid
f00b44f5013ee846c46c10741929b9bc8c2aacee
2d15f5549a61397dcc05ad091d5e7ec8f3f6cfa0
refs/heads/master
2021-01-22T02:53:13.000239
2015-11-24T04:44:12
2015-11-24T04:44:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,287
java
package com.jdroid.javaweb.google.gcm; import com.jdroid.java.collections.Lists; import com.jdroid.java.collections.Maps; import com.jdroid.java.utils.StringUtils; import com.jdroid.javaweb.push.DeviceType; import com.jdroid.javaweb.push.PushMessage; import java.util.List; import java.util.Map; public class GcmMessage implements PushMessage { private String googleServerApiKey; // Required. This parameter specifies the recipient of a message. The value must be a registration token, notification key, or topic private String to; // This parameter specifies a list of devices (registration tokens, or IDs) receiving a multicast message. // It must contain at least 1 and at most 1000 registration tokens. // Use this parameter only for multicast messaging, not for single recipients. // Multicast messages (sending to more than 1 registration tokens) are allowed using HTTP JSON format only. private List<String> registrationIds; // Optional. This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed, // so that only the last message gets sent when delivery can be resumed. // This is intended to avoid sending too many of the same messages when the device comes back online or becomes active (see delay_while_idle). // Note that there is no guarantee of the order in which messages get sent. // Note: A maximum of 4 different collapse keys is allowed at any given time. // This means a GCM connection server can simultaneously store 4 different send-to-sync messages per client app. // If you exceed this number, there is no guarantee which 4 collapse keys the GCM connection server will keep. private String collapseKey; // Sets the priority of the message. Valid values are "normal" and "high." On iOS, these correspond to APNs priority 5 and 10. // By default, messages are sent with normal priority. Normal priority optimizes the client app's battery consumption, // and should be used unless immediate delivery is required. For messages with normal priority, the app may receive the message with unspecified delay. // When a message is sent with high priority, it is sent immediately, and the app can wake a sleeping device and open a network connection to your server. private GcmMessagePriority priority = GcmMessagePriority.NORMAL; // Optional. When this parameter is set to true, it indicates that the message should not be sent until // the device becomes active. The default value is false. private Boolean delayWhileIdle = false; // Optional. This parameter specifies how long (in seconds) the message should be kept in GCM storage if the device is offline. // The maximum time to live supported is 4 weeks. The default value is 4 weeks. private Integer timeToLive; // Optional. This parameter specifies the custom key-value pairs of the message's payload. // For example, with data:{"score":"3x1"}: // - On Android, this would result in an intent extra named score with the string value 3x1. // - On iOS, if the message is sent via APNS, it represents the custom data fields. // If it is sent via GCM connection server, it would be represented as key value dictionary in // AppDelegate application:didReceiveRemoteNotification:. // The key should not be a reserved word ("from" or any word starting with "google" or "gcm"). // Values in string types are recommended. You have to convert values in objects or other non-string // data types (e.g., integers or booleans) to string. private Map<String, String> data = Maps.newHashMap(); public GcmMessage() { // Do nothing } public GcmMessage(String messageKey) { this("messageKey", messageKey); } public GcmMessage(String messageKeyExtraName, String messageKey) { addParameter(messageKeyExtraName, messageKey); } @Override public DeviceType getDeviceType() { return DeviceType.ANDROID; } @Override public void addParameter(String key, String value) { if (StringUtils.isNotEmpty(key) && StringUtils.isNotEmpty(value)) { data.put(key, value); } } @Override public void addParameter(String key, Boolean value) { if (StringUtils.isNotEmpty(key) && value != null) { data.put(key, value.toString()); } } @Override public void addParameter(String key, Integer value) { if (StringUtils.isNotEmpty(key) && value != null) { data.put(key, value.toString()); } } @Override public void addParameter(String key, Long value) { if (StringUtils.isNotEmpty(key) && value != null) { data.put(key, value.toString()); } } @Override public Map<String, String> getParameters() { return data; } public String getTo() { return to; } public void setTo(String to) { this.to = to; } public List<String> getRegistrationIds() { return registrationIds; } public void addRegistrationId(String registrationId) { if (registrationIds == null) { registrationIds = Lists.newArrayList(); } registrationIds.add(registrationId); } public void setRegistrationIds(List<String> registrationIds) { this.registrationIds = registrationIds; } public String getCollapseKey() { return collapseKey; } public void setCollapseKey(String collapseKey) { this.collapseKey = collapseKey; } public GcmMessagePriority getPriority() { return priority; } public void setPriority(GcmMessagePriority priority) { this.priority = priority; } public void markAsHighPriority() { this.priority = GcmMessagePriority.HIGH; } public Boolean isDelayWhileIdle() { return delayWhileIdle; } public void setDelayWhileIdle(Boolean delayWhileIdle) { this.delayWhileIdle = delayWhileIdle; } public Integer getTimeToLive() { return timeToLive; } public void setTimeToLive(Integer timeToLive) { this.timeToLive = timeToLive; } @Override public String toString() { return "GcmMessage{" + ", to='" + to + '\'' + ", registrationIds=" + registrationIds + ", collapseKey='" + collapseKey + '\'' + ", priority=" + priority + ", delayWhileIdle=" + delayWhileIdle + ", timeToLive=" + timeToLive + ", data=" + data + '}'; } public String getGoogleServerApiKey() { return googleServerApiKey; } public void setGoogleServerApiKey(String googleServerApiKey) { this.googleServerApiKey = googleServerApiKey; } }
[ "maxirosson@gmail.com" ]
maxirosson@gmail.com
4da0633aa5d9eb99000064a7909268c1db7d3250
81effe1dde07ef14131c0ff32c438b8e925c0916
/src/ApolloRescue/module/algorithm/convexhull/JarvisMarch.java
1dbe411b48195e7e53d6dbe5caadd8bfa250be9d
[ "BSD-3-Clause" ]
permissive
elliotleee/Apollo-lab
14723603ea382056011ca6907e1f57fd3f9774e8
a5b020128b368dda75daa6fbd4e16c002c59893b
refs/heads/master
2020-04-25T06:36:27.556545
2019-02-25T21:22:36
2019-02-25T21:22:36
172,586,663
1
2
null
null
null
null
UTF-8
Java
false
false
5,076
java
package ApolloRescue.module.algorithm.convexhull; import ApolloRescue.module.universal.tools.Planarizable; import java.util.ArrayList; import java.util.List; /** * creat convex hull by Javis March */ public class JarvisMarch<T extends Planarizable>{ private List<T> points; private List<T> hull; private static int MAX_ANGLE = 4; private double currentMinAngle = 0; public JarvisMarch(List<T> points) throws Exception { this.points = points; this.hull = new ArrayList<T>(); this.calculate(); } private void calculate() throws Exception { int firstIndex = getFirstPointIndex(this.points); this.hull.clear(); this.hull.add(this.points.get(firstIndex));//向list(hull)中添加第一个点 currentMinAngle = 0; for (int i = nextIndex(firstIndex, this.points); i != firstIndex; i = nextIndex( i, this.points)) { this.hull.add(this.points.get(i)); }//向list(hull)中添加其他的点,这些点将构成一个convex hull } public void remove(T item) throws Exception { if (!hull.contains(item)) { points.remove(item); return; } points.remove(item); // TODO calculate(); } public void remove(List<T> items) throws Exception{ points.removeAll(items); calculate(); } public void add(T item) throws Exception { points.add(item); List<T> tmplist = new ArrayList<T>(); tmplist.addAll(hull); tmplist.add(item); List<T> tmphull = new ArrayList<T>(); int firstIndex = getFirstPointIndex(tmplist); tmphull.add(tmplist.get(firstIndex)); currentMinAngle = 0; for (int i = nextIndex(firstIndex, tmplist); i != firstIndex; i = nextIndex( i, tmplist)) { tmphull.add(tmplist.get(i)); } this.hull = tmphull; } public void add(List<T> items) throws Exception { points.addAll(items); List<T> tmplist = new ArrayList<T>(); tmplist.addAll(hull); tmplist.addAll(items); List<T> tmphull = new ArrayList<T>(); int firstIndex = getFirstPointIndex(tmplist); tmphull.add(tmplist.get(firstIndex)); currentMinAngle = 0; for (int i = nextIndex(firstIndex, tmplist); i != firstIndex; i = nextIndex( i, tmplist)) { tmphull.add(tmplist.get(i)); } this.hull = tmphull; } public List<T> getHull() { return this.hull; } private int nextIndex(int currentIndex, List<T> points) throws Exception { double minAngle = MAX_ANGLE; double pseudoAngle; int minIndex = 0; for (int i = 0; i < points.size(); i++) { if (i != currentIndex) { // //FIXME // if((points.get(i).x() - points.get(currentIndex).x()) == 0 // && (points.get(i).y() - points.get(currentIndex).y()) == 0) { // System.err.println("error jarvis"); // continue; // } // // pseudoAngle = getPseudoAngle( points.get(i).x() - points.get(currentIndex).x(), points.get(i).y() - points.get(currentIndex).y()); if (pseudoAngle >= currentMinAngle && pseudoAngle < minAngle) { minAngle = pseudoAngle; minIndex = i; } else if (pseudoAngle == minAngle) { if ((Math.abs(points.get(i).x() - points.get(currentIndex).x()) > Math.abs(points .get(minIndex).x() - points.get(currentIndex).x())) || (Math.abs(points.get(i).y() - points.get(currentIndex).y()) > Math .abs(points.get(minIndex).y() - points.get(currentIndex).y()))) { minIndex = i; } } } } currentMinAngle = minAngle; return minIndex; } //获得起始点 private int getFirstPointIndex(List<T> points) { int minIndex = 0; for (int i = 1; i < points.size(); i++) { if (points.get(i).y() < points.get(minIndex).y()) { minIndex = i; } else if ((points.get(i).y() == points.get(minIndex).y()) && (points.get(i).x() < points.get(minIndex).x())) { minIndex = i; } } return minIndex; } private double getPseudoAngle(double dx, double dy) throws Exception { if (dx > 0 && dy >= 0) return dy / (dx + dy); if (dx <= 0 && dy > 0) return 1 + (Math.abs(dx) / (Math.abs(dx) + dy)); if (dx < 0 && dy <= 0) return 2 + (dy / (dx + dy)); if (dx >= 0 && dy < 0) return 3 + (dx / (dx + Math.abs(dy))); // throw new Error("Impossible"); throw new Exception("Impossible"); } }
[ "a" ]
a
20719f203c06cbc9486470e25201e66a80cb1bfd
817fc852490339447282fb39c3ab4d26b8654603
/one/src/main/java/com/skysport/inerfaces/action/info/WorkmanshipOfBondingLaminatingCoatingAction.java
59d719b1b6429c90ad0fbae9843f6be57f95ac06
[ "Apache-2.0" ]
permissive
tfgzs/open-erp
a94cd7c975285d00dfe6ff912080b68f0f2b8ca4
ca113d80cc30ba1c1fd3aefd3a96f77475b77507
refs/heads/master
2021-01-18T17:55:29.277574
2016-03-04T10:16:41
2016-03-04T10:16:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,701
java
package com.skysport.inerfaces.action.info; import com.skysport.core.action.BaseAction; import com.skysport.core.annotation.SystemControllerLog; import com.skysport.core.bean.query.DataTablesInfo; import com.skysport.core.bean.system.SelectItem2; import com.skysport.core.constant.DictionaryKeyConstant; import com.skysport.core.model.common.ICommonService; import com.skysport.core.model.seqno.service.IncrementNumber; import com.skysport.inerfaces.bean.info.WorkmanshipOfBondingLaminatingCoatingInfo; import com.skysport.inerfaces.constant.WebConstants; import com.skysport.inerfaces.model.info.material.impl.helper.WorkmanshipOfBondingLaminatingCoatingServiceHelper; import com.skysport.inerfaces.utils.BuildSeqNoHelper; import org.apache.commons.lang3.StringUtils; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; /** * 类说明:贴膜或涂层工艺 * Created by zhangjh on 2015/6/25. */ @Scope("prototype") @Controller @RequestMapping("/system/material/wblc") public class WorkmanshipOfBondingLaminatingCoatingAction extends BaseAction<String, Object, WorkmanshipOfBondingLaminatingCoatingInfo> { @Resource(name = "workmanshipOfBondingLaminatingCoatingService") private ICommonService workmanshipOfBondingLaminatingCoatingService; @Resource(name = "incrementNumber") private IncrementNumber incrementNumber; /** * 此方法描述的是:展示list页面 * * * @author: zhangjh * @version: 2015年4月29日 下午5:34:53 */ @RequestMapping(value = "/list") @ResponseBody @SystemControllerLog(description = "点击贴膜或涂层工艺菜单") public ModelAndView search() { ModelAndView mav = new ModelAndView("/system/material/wblc/list"); return mav; } /** * 此方法描述的是: * * @author: zhangjh * @version: 2015年4月29日 下午5:34:53 */ @RequestMapping(value = "/search") @ResponseBody @SystemControllerLog(description = "查询贴膜或涂层工艺信息列表") public Map<String, Object> search(HttpServletRequest request) { // HashMap<String, String> paramMap = convertToMap(params); DataTablesInfo dataTablesInfo = convertToDataTableQrInfo(DictionaryKeyConstant.WBLC_TABLE_COLUMN, request); // 总记录数 int recordsTotal = workmanshipOfBondingLaminatingCoatingService.listInfosCounts(); int recordsFiltered = recordsTotal; if (!StringUtils.isBlank(dataTablesInfo.getSearchValue())) { recordsFiltered = workmanshipOfBondingLaminatingCoatingService.listFilteredInfosCounts(dataTablesInfo); } int draw = Integer.parseInt(request.getParameter("draw")); List<WorkmanshipOfBondingLaminatingCoatingInfo> infos = workmanshipOfBondingLaminatingCoatingService.searchInfos(dataTablesInfo); Map<String, Object> resultMap = buildSearchJsonMap(infos, recordsTotal, recordsFiltered, draw); return resultMap; } /** * 此方法描述的是: * * @author: zhangjh * @version: 2015年4月29日 下午5:35:09 */ @RequestMapping(value = "/edit", method = RequestMethod.POST) @ResponseBody @SystemControllerLog(description = "编辑贴膜或涂层工艺") public Map<String, Object> edit(WorkmanshipOfBondingLaminatingCoatingInfo areaInfo, HttpServletRequest request, HttpServletResponse respones) { workmanshipOfBondingLaminatingCoatingService.edit(areaInfo); WorkmanshipOfBondingLaminatingCoatingServiceHelper.SINGLETONE.refreshSelect(); return rtnSuccessResultMap("更新成功"); } /** * 此方法描述的是: * * @author: zhangjh * @version: 2015年4月29日 下午5:35:09 */ @RequestMapping(value = "/new", method = RequestMethod.POST) @ResponseBody @SystemControllerLog(description = "增加贴膜或涂层工艺") public Map<String, Object> add(WorkmanshipOfBondingLaminatingCoatingInfo areaInfo, HttpServletRequest request, HttpServletResponse reareaonse) { String currentNo = workmanshipOfBondingLaminatingCoatingService.queryCurrentSeqNo(); //设置ID areaInfo.setNatrualkey(BuildSeqNoHelper.SINGLETONE.getNextSeqNo(WebConstants.WBLC_INFO, currentNo, incrementNumber)); workmanshipOfBondingLaminatingCoatingService.add(areaInfo); WorkmanshipOfBondingLaminatingCoatingServiceHelper.SINGLETONE.refreshSelect(); return rtnSuccessResultMap("新增成功"); } /** * @param natrualKey 主键id * @param request 请求信息 * @param reareaonse 返回信息 * @return 根据主键id找出详细信息 */ @RequestMapping(value = "/info/{natrualKey}", method = RequestMethod.GET) @ResponseBody @SystemControllerLog(description = "查询贴膜或涂层工艺信息") public WorkmanshipOfBondingLaminatingCoatingInfo info(@PathVariable String natrualKey, HttpServletRequest request, HttpServletResponse reareaonse) { WorkmanshipOfBondingLaminatingCoatingInfo areaInfo = (WorkmanshipOfBondingLaminatingCoatingInfo) workmanshipOfBondingLaminatingCoatingService.queryInfoByNatrualKey(natrualKey); return areaInfo; } /** * @param natrualKey * @return */ @RequestMapping(value = "/del/{natrualKey}", method = RequestMethod.DELETE) @ResponseBody @SystemControllerLog(description = "删除贴膜或涂层工艺") public Map<String, Object> del(@PathVariable String natrualKey) { workmanshipOfBondingLaminatingCoatingService.del(natrualKey); WorkmanshipOfBondingLaminatingCoatingServiceHelper.SINGLETONE.refreshSelect(); return rtnSuccessResultMap("删除成功"); } @RequestMapping(value = "/select", method = RequestMethod.GET) @ResponseBody public Map<String, Object> querySelectList(HttpServletRequest request) { String name = request.getParameter("name"); List<SelectItem2> commonBeans = workmanshipOfBondingLaminatingCoatingService.querySelectList(name); return rtSelectResultMap(commonBeans); } }
[ "firebata@gmail.com" ]
firebata@gmail.com
2afdb1f8d1d1d19696c1d2102d070beeaaa373cc
39fdbaa47bc18dd76ccc40bccf18a21e3543ab9f
/modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/GroupEntity.java
d0a8168af72f66016ff9c363f0d3fb8b9dabffa9
[]
no_license
jpjyxy/Activiti-activiti-5.16.4
b022494b8f40b817a54bb1cc9c7f6fa41dadb353
ff22517464d8f9d5cfb09551ad6c6cbecff93f69
refs/heads/master
2022-12-24T14:51:08.868694
2017-04-14T14:05:00
2017-04-14T14:05:00
191,682,921
0
0
null
2022-12-16T04:24:04
2019-06-13T03:15:47
Java
UTF-8
Java
false
false
2,181
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.activiti.engine.impl.persistence.entity; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import org.activiti.engine.identity.Group; import org.activiti.engine.impl.db.HasRevision; import org.activiti.engine.impl.db.PersistentObject; /** * @author Tom Baeyens */ public class GroupEntity implements Group, Serializable, PersistentObject, HasRevision { private static final long serialVersionUID = 1L; protected String id; protected int revision; protected String name; protected String type; public GroupEntity() { } public GroupEntity(String id) { this.id = id; } public Object getPersistentState() { Map<String, Object> persistentState = new HashMap<String, Object>(); persistentState.put("name", name); persistentState.put("type", type); return persistentState; } public int getRevisionNext() { return revision + 1; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getType() { return type; } public void setType(String type) { this.type = type; } public int getRevision() { return revision; } public void setRevision(int revision) { this.revision = revision; } }
[ "905280842@qq.com" ]
905280842@qq.com
576a8e24cb2ecd992ab43ad1c6387be685553341
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/p298ml/process/C6833c.java
de2222171ad3fc56df1af212f80dcb348575b9da
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
215
java
package com.p280ss.android.p298ml.process; import java.util.List; /* renamed from: com.ss.android.ml.process.c */ public interface C6833c extends C6832b { String getFeature(); List<String> getLabels(); }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
33572c690b88c608c195dded44e89c01b3474e72
67a1248d981248ac9c00861ecc76d822fc637312
/modules/FiltersPlugin/src/main/java/org/gephi/filters/plugin/edge/EdgeTypeUI.java
1b2c3f0b610400c381e5e87d3073d5cd0e778235
[ "Apache-2.0", "CDDL-1.0", "GPL-3.0-only", "GPL-1.0-or-later", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-free-unknown" ]
permissive
LiXiaoRan/Gephi_improved
186d229e14dfa83caaa3b3c12a7caa832b8107ee
c9d7ca0c9ac00b2519d1b3837ccc732b1cfe33bb
refs/heads/master
2022-09-21T19:12:39.263426
2019-07-01T08:49:13
2019-07-01T08:49:13
174,827,977
0
0
Apache-2.0
2022-09-08T00:59:36
2019-03-10T13:33:43
Java
UTF-8
Java
false
false
2,021
java
/* Copyright 2008-2010 Gephi Authors : Mathieu Bastian <mathieu.bastian@gephi.org> Website : http://www.gephi.org This file is part of Gephi. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2011 Gephi Consortium. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 3 only ("GPL") or the Common Development and Distribution License("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at http://gephi.org/about/legal/license-notice/ or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License files at /cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyrighted [year] [name of copyright owner]" If you wish your version of this file to be governed by only the CDDL or only the GPL Version 3, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 3] license." If you do not indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 3 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 3 code and therefore, elected the GPL Version 3 license, then the option applies only if the new code is made subject to such option by the copyright holder. Contributor(s): Portions Copyrighted 2011 Gephi Consortium. */ package org.gephi.filters.plugin.edge; import javax.swing.JPanel; /** * * @author mbastian */ public interface EdgeTypeUI { public JPanel getPanel(EdgeTypeBuilder.EdgeTypeFilter filter); }
[ "997843911@qq.com" ]
997843911@qq.com
73f69fa1db83549e44645709de04550f96e3bfcd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_d2c989cffffb29fef61fe74afab3e08a1aaa2e86/StatsBean/25_d2c989cffffb29fef61fe74afab3e08a1aaa2e86_StatsBean_s.java
d2b7f32262f587b8f49e04ae175daab96e993ffa
[]
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
4,759
java
/* * Copyright 2011 juliensmadja. * * 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.anzymus.neogeo.hiscores.controller; import java.util.ArrayList; import java.util.List; import javax.ejb.EJB; import javax.faces.bean.ManagedBean; import com.anzymus.neogeo.hiscores.domain.Game; import com.anzymus.neogeo.hiscores.domain.Player; import com.anzymus.neogeo.hiscores.domain.Scores; import com.anzymus.neogeo.hiscores.service.GameService; import com.anzymus.neogeo.hiscores.service.PlayerService; import com.anzymus.neogeo.hiscores.service.ScoreService; import com.anzymus.neogeo.hiscores.service.TitleUnlockingService; import com.google.common.collect.Lists; @ManagedBean public class StatsBean { @EJB PlayerService playerService; @EJB TitleUnlockingService titleUnlockingService; @EJB ScoreService scoreService; @EJB GameService gameService; public long getNumberOfPlayers() { return playerService.getNumberOfPlayers(); } public List<Player> getBestTitleUnlockers() { List<Player> bestTitleUnlockers = new ArrayList<Player>(); List<Player> playersOrderByNumUnlockedTitles = titleUnlockingService.findPlayersOrderByNumUnlockedTitles(); if (!playersOrderByNumUnlockedTitles.isEmpty()) { Player player = playersOrderByNumUnlockedTitles.get(0); int max = player.getUnlockedTitles().size(); int currentNumUnlockedTitles = max; while (max == currentNumUnlockedTitles && !playersOrderByNumUnlockedTitles.isEmpty()) { Player nextPlayer = playersOrderByNumUnlockedTitles.remove(0); currentNumUnlockedTitles = nextPlayer.getUnlockedTitles().size(); if (currentNumUnlockedTitles == max) { bestTitleUnlockers.add(nextPlayer); } } } return bestTitleUnlockers; } public List<Player> getBestScorers() { List<Player> bestScorers = new ArrayList<Player>(); List<Player> playersOrderByNumScores = scoreService.findPlayersOrderByNumScores(); if (!playersOrderByNumScores.isEmpty()) { Player player = playersOrderByNumScores.get(0); Scores scores = scoreService.findAllByPlayer(player); int maxContributions = scores.count(); int currentContributions = maxContributions; while (maxContributions == currentContributions && !playersOrderByNumScores.isEmpty()) { player = playersOrderByNumScores.remove(0); scores = scoreService.findAllByPlayer(player); currentContributions = scores.count(); if (currentContributions == maxContributions) { player.setContribution(maxContributions); bestScorers.add(player); } } } return bestScorers; } public List<Game> getMostPlayedGames() { List<Game> mostPlayedGames = Lists.newArrayList(); List<Game> gamesOrderByNumScores = scoreService.findGamesOrderByNumScores(); if (!gamesOrderByNumScores.isEmpty()) { Game game = gamesOrderByNumScores.get(0); Scores scores = scoreService.findAllByGame(game); int maxContributions = scores.count(); int currentContributions = maxContributions; while (maxContributions == currentContributions && !gamesOrderByNumScores.isEmpty()) { game = gamesOrderByNumScores.remove(0); scores = scoreService.findAllByGame(game); currentContributions = scores.count(); if (currentContributions == maxContributions) { game.setContribution(maxContributions); mostPlayedGames.add(game); } } } return mostPlayedGames; } public long getNumberOfPlayedGames() { return scoreService.getNumberOfPlayedGames(); } public long getNumberOfUnplayedGames() { return gameService.getNumberOfGames() - getNumberOfPlayedGames(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
bb111b17a8485353a4c99b0d3549361e8ecd5aff
f248fea32b8eec9b24f77a8eb4381f2384dd918b
/src/main/java/net/foxdenstudio/sponge/foxcore/common/network/server/ServerPositionPacket.java
73313035c6d4f5aa42fc37e2ce5dcafc1b902b95
[ "MIT" ]
permissive
FaeyUmbrea/FoxCore
7063355216092389af740cb34b0bd76745d4b84f
509fd5d19b6609df8f3d08b360917749e6f27ce1
refs/heads/master
2021-05-31T21:42:14.829401
2016-04-24T03:09:14
2016-04-24T03:09:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
906
java
package net.foxdenstudio.sponge.foxcore.common.network.server; import com.flowpowered.math.vector.Vector3i; import io.netty.buffer.ByteBuf; import net.foxdenstudio.sponge.foxcore.common.network.IServerPacket; import org.spongepowered.api.network.ChannelBuf; import java.util.ArrayList; import java.util.List; /** * Created by Fox on 4/18/2016. */ public class ServerPositionPacket implements IServerPacket { List<Vector3i> positionList; @Override public void read(ByteBuf payload) { positionList = new ArrayList<>(); while (payload.isReadable(12)) { Vector3i pos = new Vector3i(payload.readInt(), payload.readInt(), payload.readInt()); pos.add(pos); } } @Override public void write(ChannelBuf buf) { positionList.forEach(vec -> buf.writeInteger(vec.getX()).writeInteger(vec.getY()).writeInteger(vec.getZ())); } }
[ "gravityreallyhatesme@gmail.com" ]
gravityreallyhatesme@gmail.com
412b6f09047e3ce3c12b13754b5536d81338b097
7ffe634399e3508b4962361132ebf98e09be9775
/code/back-end/Cloud_native_first_attempt/sample-spring-microservices-new-master/proxy-service/src/main/java/org/pokemonrun/api/ProxyApi.java
7a33622af6c5136b31434ac653401c54abe2548f
[ "MIT" ]
permissive
ashibatian/PokemonAR-running
b25784dd3d06bb06b552079a20ff8005996fdd02
a06ed1c03f3ef7e7437649c0db1f53cf87fe3d56
refs/heads/master
2022-04-08T22:01:02.618760
2019-09-15T02:17:57
2019-09-15T02:17:57
259,052,069
1
0
null
2020-04-26T14:33:20
2020-04-26T14:33:19
null
UTF-8
Java
false
false
1,276
java
package org.pokemonrun.api; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.netflix.zuul.filters.ZuulProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import springfox.documentation.swagger.web.SwaggerResource; import springfox.documentation.swagger.web.SwaggerResourcesProvider; @Configuration//for apiauto document---swagger ui public class ProxyApi { @Autowired ZuulProperties properties; @Primary @Bean public SwaggerResourcesProvider swaggerResourcesProvider() { return () -> { List<SwaggerResource> resources = new ArrayList<>(); properties.getRoutes().values().stream() .forEach(route -> resources.add(createResource(route.getServiceId(), route.getId(), "2.0"))); return resources; }; } private SwaggerResource createResource(String name, String location, String version) { SwaggerResource swaggerResource = new SwaggerResource(); swaggerResource.setName(name); swaggerResource.setLocation("/" + location + "/v2/api-docs"); swaggerResource.setSwaggerVersion(version); return swaggerResource; } }
[ "coredroid0401@gmail.com" ]
coredroid0401@gmail.com
118d83cefd26da28a057a53f24f8a5f1fd465837
d04cd3239fb32ab6038fb457436b0823ed5bd694
/src/main/java/com/teamnet/authapi/repository/CustomAuditEventRepository.java
130b5cdaed1cb7fcb335be134261bd45ab4fe8d1
[]
no_license
archi-mbo/authapi
b080bbacc4540f541d7bbff355b18fcc4c276524
e1611da3c1f0fdc26013b996b02769c0641730b1
refs/heads/master
2021-05-03T15:46:37.263893
2018-02-06T16:05:34
2018-02-06T16:05:34
120,484,450
0
0
null
null
null
null
UTF-8
Java
false
false
4,649
java
package com.teamnet.authapi.repository; import com.teamnet.authapi.config.Constants; import com.teamnet.authapi.config.audit.AuditEventConverter; import com.teamnet.authapi.domain.PersistentAuditEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.actuate.audit.AuditEventRepository; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; /** * An implementation of Spring Boot's AuditEventRepository. */ @Repository public class CustomAuditEventRepository implements AuditEventRepository { private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE"; /** * Should be the same as in Liquibase migration. */ protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255; private final PersistenceAuditEventRepository persistenceAuditEventRepository; private final AuditEventConverter auditEventConverter; private final Logger log = LoggerFactory.getLogger(getClass()); public CustomAuditEventRepository(PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter) { this.persistenceAuditEventRepository = persistenceAuditEventRepository; this.auditEventConverter = auditEventConverter; } @Override public List<AuditEvent> find(Date after) { Iterable<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findByAuditEventDateAfter(after.toInstant()); return auditEventConverter.convertToAuditEvent(persistentAuditEvents); } @Override public List<AuditEvent> find(String principal, Date after) { Iterable<PersistentAuditEvent> persistentAuditEvents; if (principal == null && after == null) { persistentAuditEvents = persistenceAuditEventRepository.findAll(); } else if (after == null) { persistentAuditEvents = persistenceAuditEventRepository.findByPrincipal(principal); } else { persistentAuditEvents = persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfter(principal, after.toInstant()); } return auditEventConverter.convertToAuditEvent(persistentAuditEvents); } @Override public List<AuditEvent> find(String principal, Date after, String type) { Iterable<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfterAndAuditEventType(principal, after.toInstant(), type); return auditEventConverter.convertToAuditEvent(persistentAuditEvents); } @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void add(AuditEvent event) { if (!AUTHORIZATION_FAILURE.equals(event.getType()) && !Constants.ANONYMOUS_USER.equals(event.getPrincipal())) { PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent(); persistentAuditEvent.setPrincipal(event.getPrincipal()); persistentAuditEvent.setAuditEventType(event.getType()); persistentAuditEvent.setAuditEventDate(event.getTimestamp().toInstant()); Map<String, String> eventData = auditEventConverter.convertDataToStrings(event.getData()); persistentAuditEvent.setData(truncate(eventData)); persistenceAuditEventRepository.save(persistentAuditEvent); } } /** * Truncate event data that might exceed column length. */ private Map<String, String> truncate(Map<String, String> data) { Map<String, String> results = new HashMap<>(); if (data != null) { for (Map.Entry<String, String> entry : data.entrySet()) { String value = entry.getValue(); if (value != null) { int length = value.length(); if (length > EVENT_DATA_COLUMN_MAX_LENGTH) { value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH); log.warn("Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.", entry.getKey(), length, EVENT_DATA_COLUMN_MAX_LENGTH); } } results.put(entry.getKey(), value); } } return results; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
f2625547986bdc723e90f6ce429e07f002fea72a
df58b5961c80264828580c3c5b6aa56d5c70a907
/src/main/java/com/jspxcms/core/repository/OrderDao.java
1d47090234779c10e42727080cdb37026adfd87a
[]
no_license
yanziyang2016/jspxcms_6.5.2_ep
32272599213cfb0a46b72427599929f929c4e6bf
3a883127bb194e70bdf42701ca13288b32250526
refs/heads/master
2021-07-21T14:01:44.904061
2017-10-31T06:25:03
2017-10-31T06:25:03
107,365,230
0
0
null
null
null
null
UTF-8
Java
false
false
993
java
package com.jspxcms.core.repository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.Repository; import com.jspxcms.core.domain.Order; import com.jspxcms.core.domain.User; /** * OrderDao * * @author liufang * */ public interface OrderDao extends Repository<Order, Integer> , OrderDaoPlus { public Page<Order> findAll(Specification<Order> spec, Pageable pageable); public Order save(Order order); public Order findOne(Integer id); public void delete(Order bean); @Modifying @Query("update Order bean set bean.logisticsNo=?2,bean.logisticsName=?3,bean.status=?4 where bean.orderNo=?1") public void updateOrder(String orderNo, String logisticsNo, String logisticsName, Integer status); }
[ "yanziyang@163.com" ]
yanziyang@163.com
8cc75a47afba1c8ca5da47446079a2771f301e3d
70d838e359599899e303dcabf83de8721748e186
/Imagine/gradients/src/main/java/org/imagine/awt/spi/TexturePaintWrapperImageLoader.java
ad9b44b04d5b7dc2d3dfeadf4e93dce99494cd32
[]
no_license
timboudreau/imagine
b30fd24351a2cb6473db00e4a4b04b844a79445b
294317a0a4ae7cf1db2d423c2974bef237147650
refs/heads/master
2023-08-31T09:38:52.324126
2023-06-12T04:16:59
2023-06-12T04:16:59
95,410,344
5
0
null
2023-08-23T17:54:31
2017-06-26T05:07:57
Java
UTF-8
Java
false
false
1,259
java
package org.imagine.awt.spi; import java.awt.MultipleGradientPaint; import java.awt.Rectangle; import java.awt.TexturePaint; import java.awt.image.BufferedImage; import org.imagine.awt.key.MultiplePaintKey; import org.imagine.awt.key.TexturedPaintWrapperKey; import org.openide.util.Lookup; /** * * @author Tim Boudreau */ public abstract class TexturePaintWrapperImageLoader { private static TexturePaintWrapperImageLoader INSTANCE; static TexturePaintWrapperImageLoader getDefault() { if (INSTANCE == null) { INSTANCE = Lookup.getDefault().lookup(TexturePaintWrapperImageLoader.class); if (INSTANCE == null) { INSTANCE = new DefaultTexturePaintLoader(); } } return INSTANCE; } protected abstract <P extends MultiplePaintKey<T>, T extends MultipleGradientPaint> BufferedImage imageFor(TexturedPaintWrapperKey<P, T> key); protected <P extends MultiplePaintKey<T>, T extends MultipleGradientPaint> TexturePaint paintFor(TexturedPaintWrapperKey<P, T> key) { BufferedImage img = imageFor(key); TexturePaint paint = new TexturePaint(img, new Rectangle(0, 0, key.width(), key.height())); return paint; } }
[ "tim@timboudreau.com" ]
tim@timboudreau.com
37aeb3cc9f9599115a00bb0506be3d7ecd770e94
42e6e7f98090236e416112efafbedd26f9bdb169
/src/main/java/net/mrscauthd/boss_tools/procedures/RocketY54Procedure.java
68c3e285d1e9094b5d46f9c8cd3aa431b17d2398
[]
no_license
Romaindu35/Space-Bosstools
77fe4ef0c416be7e2193406a953c8a6b0abcb00e
28ed6def84589578fecaf53c71c0df398108287f
refs/heads/master
2023-03-08T22:39:40.526151
2021-03-12T09:20:01
2021-03-12T09:20:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,257
java
package net.mrscauthd.boss_tools.procedures; import net.mrscauthd.boss_tools.entity.RocketTier3Entity; import net.mrscauthd.boss_tools.entity.RocketTier2Entity; import net.mrscauthd.boss_tools.entity.RocketEntity; import net.mrscauthd.boss_tools.BossToolsModElements; import net.mrscauthd.boss_tools.BossToolsMod; import net.minecraft.entity.Entity; import java.util.Map; @BossToolsModElements.ModElement.Tag public class RocketY54Procedure extends BossToolsModElements.ModElement { public RocketY54Procedure(BossToolsModElements instance) { super(instance, 696); } public static boolean executeProcedure(Map<String, Object> dependencies) { if (dependencies.get("entity") == null) { if (!dependencies.containsKey("entity")) BossToolsMod.LOGGER.warn("Failed to load dependency entity for procedure RocketY54!"); return false; } Entity entity = (Entity) dependencies.get("entity"); if ((((entity.getPosY()) >= 530) && ((!((entity.getPosY()) >= 540)) && (((entity.getRidingEntity()) instanceof RocketEntity.CustomEntity) || (((entity.getRidingEntity()) instanceof RocketTier2Entity.CustomEntity) || ((entity.getRidingEntity()) instanceof RocketTier3Entity.CustomEntity)))))) { return (true); } return (false); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
e402d88e3bfcaf959a6037395db50b11370cc26a
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/android/support/v7/widget/AppCompatEditText.java
1c6aadea784e30db1610f9b92a8259c0bb618f55
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
3,497
java
package android.support.v7.widget; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.support.annotation.DrawableRes; import android.support.annotation.Nullable; import android.support.annotation.RestrictTo; import android.support.annotation.RestrictTo.Scope; import android.support.v4.view.TintableBackgroundView; import android.support.v7.appcompat.C0299R; import android.util.AttributeSet; import android.widget.EditText; public class AppCompatEditText extends EditText implements TintableBackgroundView { private AppCompatBackgroundHelper mBackgroundTintHelper; private AppCompatTextHelper mTextHelper; public AppCompatEditText(Context context) { this(context, null); } public AppCompatEditText(Context context, AttributeSet attrs) { this(context, attrs, C0299R.attr.editTextStyle); } public AppCompatEditText(Context context, AttributeSet attrs, int defStyleAttr) { super(TintContextWrapper.wrap(context), attrs, defStyleAttr); this.mBackgroundTintHelper = new AppCompatBackgroundHelper(this); this.mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr); this.mTextHelper = AppCompatTextHelper.create(this); this.mTextHelper.loadFromAttributes(attrs, defStyleAttr); this.mTextHelper.applyCompoundDrawablesTints(); } public void setBackgroundResource(@DrawableRes int resId) { super.setBackgroundResource(resId); if (this.mBackgroundTintHelper != null) { this.mBackgroundTintHelper.onSetBackgroundResource(resId); } } public void setBackgroundDrawable(Drawable background) { super.setBackgroundDrawable(background); if (this.mBackgroundTintHelper != null) { this.mBackgroundTintHelper.onSetBackgroundDrawable(background); } } @RestrictTo({Scope.LIBRARY_GROUP}) public void setSupportBackgroundTintList(@Nullable ColorStateList tint) { if (this.mBackgroundTintHelper != null) { this.mBackgroundTintHelper.setSupportBackgroundTintList(tint); } } @Nullable @RestrictTo({Scope.LIBRARY_GROUP}) public ColorStateList getSupportBackgroundTintList() { return this.mBackgroundTintHelper != null ? this.mBackgroundTintHelper.getSupportBackgroundTintList() : null; } @RestrictTo({Scope.LIBRARY_GROUP}) public void setSupportBackgroundTintMode(@Nullable Mode tintMode) { if (this.mBackgroundTintHelper != null) { this.mBackgroundTintHelper.setSupportBackgroundTintMode(tintMode); } } @Nullable @RestrictTo({Scope.LIBRARY_GROUP}) public Mode getSupportBackgroundTintMode() { return this.mBackgroundTintHelper != null ? this.mBackgroundTintHelper.getSupportBackgroundTintMode() : null; } protected void drawableStateChanged() { super.drawableStateChanged(); if (this.mBackgroundTintHelper != null) { this.mBackgroundTintHelper.applySupportBackgroundTint(); } if (this.mTextHelper != null) { this.mTextHelper.applyCompoundDrawablesTints(); } } public void setTextAppearance(Context context, int resId) { super.setTextAppearance(context, resId); if (this.mTextHelper != null) { this.mTextHelper.onSetTextAppearance(context, resId); } } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
05a339c0c68a6dc496c0cb84dba56efb80c48165
a422de59c29d077c512d66b538ff17d179cc077a
/hsxt/hsxt-bs/hsxt-bs-service/src/main/java/com/gy/hsxt/bs/order/interfaces/IOrderService.java
c0cf4ed555dd290a3c74759dccda2e2e5f9c1f8b
[]
no_license
liveqmock/hsxt
c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd
40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04
refs/heads/master
2020-03-28T14:09:31.939168
2018-09-12T10:20:46
2018-09-12T10:20:46
148,461,898
0
0
null
2018-09-12T10:19:11
2018-09-12T10:19:10
null
UTF-8
Java
false
false
2,798
java
/* * Copyright (c) 2015-2018 SHENZHEN GUIYI SCIENCE AND TECHNOLOGY DEVELOP CO., LTD. All rights reserved. * * 注意:本内容仅限于深圳市归一科技研发有限公司内部传阅,禁止外泄以及用于其他的商业目的 */ package com.gy.hsxt.bs.order.interfaces; import java.util.List; import com.gy.hsxt.bs.bean.order.Order; import com.gy.hsxt.bs.bean.order.OrderQueryParam; import com.gy.hsxt.bs.common.bean.PayUrl; import com.gy.hsxt.common.exception.HsException; /** * 通用业务订单接口定义 * * @Package: com.gy.hsxt.bs.order.interfaces * @ClassName: IOrderService * @Description: TODO * * @author: kongsl * @date: 2015-10-21 下午6:41:50 * @version V3.0.0 */ public interface IOrderService { /** * 保存通用订单 * * @param order * 订单信息 * @return 订单号 * @throws HsException */ public String saveCommonOrder(Order order) throws HsException; /** * 更新资源费订单 * * @param orderNo * 订单编号 * @throws HsException */ public void updateResFeeOrder(String orderNo) throws HsException; /** * 根据订单号查询一条订单记录 * * @param orderNo * 订单号 * @return 订单 * @throws HsException */ public Order getOrderByNo(String orderNo) throws HsException; /** * 获取网银支付地址 * * @param payUrl * 非空订单支付方式,枚举类:PayChannel 订单数据 支付成功后跳转页面 签约号:快捷支付时需要 * 短信验证码:快捷支付时需要 * @return 成功返回true,false或异常为失败 * @throws HsException */ public String getPayUrl(PayUrl payUrl) throws HsException; /** * 更新订单状态 * * @param orderNo * 订单号 * @param orderStatus * 订单状态码 * @throws HsException */ public void updateOrderStatus(String orderNo, Integer orderStatus) throws HsException; /** * 更新订单所有状态 * * @param order * 订单信息 * @throws HsException */ public void updateOrderAllStatus(Order order) throws HsException; /** * 查询支付系统对账数据 * * @param queryParam * 查询实体 * @return list * @throws HsException */ List<Order> queryListForGPByQuery(OrderQueryParam queryParam) throws HsException; /** * 获取支付订单 * * @param orderNo * 订单编号 * @return 订单实体 * @throws HsException */ public Order findUnPayOrder(String orderNo) throws HsException; }
[ "864201042@qq.com" ]
864201042@qq.com
e3727afbce9ae19c50999f84c053650cde970996
9d39b64a51d7734a4101846ecd46dbbe3a618a66
/src/main/java/kenny/ml/utils/ImageUtils.java
132835dd4731fc0b0bd43c490dd2a5b3704d3cc7
[]
no_license
muratugur348/ml
d44b867e93cc6e4588f20ebda2694da19cd8a7c3
f1675d96e02527ae381ea480a6a8c4d292422c31
refs/heads/master
2023-03-21T21:35:17.121288
2016-05-15T23:54:24
2016-05-15T23:54:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,222
java
package kenny.ml.utils; import org.apache.log4j.Logger; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; /** * Created by kenny on 4/5/15. */ public class ImageUtils { private static final Logger LOGGER = Logger.getLogger(ImageUtils.class); public static kenny.ml.data.image.Image resize(final kenny.ml.data.image.Image image, final int width, final int height) { return new kenny.ml.data.image.Image(resize(image.data(), width, height)); } public static BufferedImage resize(final BufferedImage image, final int width, final int height) { final Image tmp = image.getScaledInstance(width, height, Image.SCALE_SMOOTH); final BufferedImage scaledImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); final Graphics2D g2d = scaledImage.createGraphics(); g2d.drawImage(tmp, 0, 0, null); g2d.dispose(); return scaledImage; } public static int[] toRgb(final int rgb) { int r = (rgb) & 0xFF; int g = (rgb >> 8) & 0xFF; int b = (rgb >> 16) & 0xFF; return new int[] {r, g, b}; } public static int[] toRgba(final int argb) { int r = (argb) & 0xFF; int g = (argb >> 8) & 0xFF; int b = (argb >> 16) & 0xFF; int a = (argb >> 24) & 0xFF; return new int[] {r, g, b, a}; } public static int[] toYcBcR(final int rgb) { int[] rgbArr = toRgb(rgb); int r = rgbArr[0]; int g = rgbArr[1]; int b = rgbArr[2]; int y = (int) Math.round(16 + (65.738 * r + 129.057 * g + 25.064 * b) / 256); int cb = (int) Math.round(128 + (-37.945 * r - 74.494 * g + 112.439 * b) / 256); int cr = (int) Math.round(128 + (112.439 * r - 94.154 * g - 18.285 * b) / 256); return new int[] {y, cb, cr}; } public static void saveThumbnail(final BufferedImage bi, final String file, final double scale) { int width = (int) (bi.getWidth() * scale); int height = (int) (bi.getHeight() * scale); int imgWidth = bi.getWidth(); int imgHeight = bi.getHeight(); if (imgWidth * height < imgHeight * width) { width = imgWidth * height / imgHeight; } else { height = imgHeight * width / imgWidth; } BufferedImage newImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g = newImage.createGraphics(); try { g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); g.setBackground(Color.BLACK); g.clearRect(0, 0, width, height); g.drawImage(bi, 0, 0, width, height, null); } finally { g.dispose(); } try { LOGGER.info("Writing file: " + file); ImageIO.write(newImage, getFormat(file), new File(file)); } catch (IOException e) { LOGGER.error(e.getMessage(), e); } } public static String getFormat(String file) { String[] parts = file.split("\\."); return parts[parts.length - 1]; } }
[ "kenneth.cason@gmail.com" ]
kenneth.cason@gmail.com
38044ab6cca7f56d1c1d3eaca79e40ad599a7381
0432a6ad0856a14ce864fc8c18a6ba962b98be15
/dubbo-common/src/test/java/org/apache/dubbo/common/logger/slf4j/Slf4jLoggerTest.java
a8cb0c44e66079e57e497fd759eb3a1fd5ea3bbd
[ "Apache-2.0" ]
permissive
wsccoder/incubator-dubbo
4661f0fa3eab4dee851b83c16cff3338f8963db7
db8293a88a8b1cd77dca1c325e44dcb235e73725
refs/heads/master
2020-03-28T15:48:36.882476
2019-12-27T07:54:00
2019-12-27T07:54:00
148,628,090
3
3
Apache-2.0
2018-09-13T11:30:54
2018-09-13T11:30:54
null
UTF-8
Java
false
false
2,545
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.common.logger.slf4j; import org.junit.Test; import org.slf4j.Marker; import org.slf4j.spi.LocationAwareLogger; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.isNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.internal.verification.VerificationModeFactory.times; public class Slf4jLoggerTest { @Test public void testLocationAwareLogger() { LocationAwareLogger locationAwareLogger = mock(LocationAwareLogger.class); Slf4jLogger logger = new Slf4jLogger(locationAwareLogger); logger.error("error"); logger.warn("warn"); logger.info("info"); logger.debug("debug"); logger.trace("info"); verify(locationAwareLogger, times(5)).log(isNull(Marker.class), anyString(), anyInt(), anyString(), isNull(Object[].class), isNull(Throwable.class)); logger.error(new Exception("error")); logger.warn(new Exception("warn")); logger.info(new Exception("info")); logger.debug(new Exception("debug")); logger.trace(new Exception("trace")); logger.error("error", new Exception("error")); logger.warn("warn", new Exception("warn")); logger.info("info", new Exception("info")); logger.debug("debug", new Exception("debug")); logger.trace("trace", new Exception("trace")); verify(locationAwareLogger, times(10)).log(isNull(Marker.class), anyString(), anyInt(), anyString(), isNull(Object[].class), any(Throwable.class)); } }
[ "ian.luo@gmail.com" ]
ian.luo@gmail.com
d45a36cac53de4a7c8b2dd0cf68066b566621c08
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--kotlin/b45f19c0e26aebd919c388585c762f50760f6d2f/before/JavaClassArray.java
701da974560b58983e94acd3cb9d5bc338ad01f5
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,440
java
/* * Copyright 2010-2012 JetBrains s.r.o. * * 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.jetbrains.jet.codegen.intrinsics; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.asm4.Type; import org.jetbrains.asm4.commons.InstructionAdapter; import org.jetbrains.jet.codegen.ExpressionCodegen; import org.jetbrains.jet.codegen.GenerationState; import org.jetbrains.jet.codegen.StackValue; import org.jetbrains.jet.lang.descriptors.CallableDescriptor; import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor; import org.jetbrains.jet.lang.psi.JetCallExpression; import org.jetbrains.jet.lang.psi.JetExpression; import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lang.resolve.calls.ResolvedCall; import org.jetbrains.jet.lang.resolve.calls.ResolvedValueArgument; import org.jetbrains.jet.lang.resolve.calls.VarargValueArgument; import java.util.List; import java.util.Map; /** * @author alex.tkachman */ public class JavaClassArray implements IntrinsicMethod { @Override public StackValue generate( ExpressionCodegen codegen, InstructionAdapter v, @NotNull Type expectedType, @Nullable PsiElement element, @Nullable List<JetExpression> arguments, StackValue receiver, @NotNull GenerationState state ) { ResolvedCall<? extends CallableDescriptor> call = codegen.getBindingContext().get(BindingContext.RESOLVED_CALL, ((JetCallExpression) element).getCalleeExpression()); assert call != null; Map.Entry<ValueParameterDescriptor, ResolvedValueArgument> next = call.getValueArguments().entrySet().iterator().next(); codegen.genVarargs(next.getKey(), (VarargValueArgument) next.getValue()); return StackValue.onStack(expectedType); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
535e5da5674ab881d1ad2f9fc9ddd5de3fe92b21
a4d338bebd051e46802b75e98c9466c70d6093e2
/src/main/java/com/norteksoft/product/util/zip/UnrecognizedExtraField.java
e84968e02fd674eeafefe556ab71618956b173ca
[]
no_license
norteksoft/iMatrix-v6.5.RC2
39175574a3c7ca05fdf6d45aef9d443fe968a4d1
9b1c50181860c5266bab350f5d15ef6f63f024bb
refs/heads/master
2021-01-10T05:44:21.015962
2016-03-01T07:24:42
2016-03-01T07:24:42
52,853,470
0
2
null
null
null
null
UTF-8
Java
false
false
3,768
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.norteksoft.product.util.zip; /** * Simple placeholder for all those extra fields we don't want to deal * with. * * <p>Assumes local file data and central directory entries are * identical - unless told the opposite.</p> * */ public class UnrecognizedExtraField implements ZipExtraField { /** * The Header-ID. * * @since 1.1 */ private ZipShort headerId; /** * Set the header id. * @param headerId the header id to use */ public void setHeaderId(ZipShort headerId) { this.headerId = headerId; } /** * Get the header id. * @return the header id */ public ZipShort getHeaderId() { return headerId; } /** * Extra field data in local file data - without * Header-ID or length specifier. * * @since 1.1 */ private byte[] localData; /** * Set the extra field data in the local file data - * without Header-ID or length specifier. * @param data the field data to use */ public void setLocalFileDataData(byte[] data) { localData = data; } /** * Get the length of the local data. * @return the length of the local data */ public ZipShort getLocalFileDataLength() { return new ZipShort(localData.length); } /** * Get the local data. * @return the local data */ public byte[] getLocalFileDataData() { return localData; } /** * Extra field data in central directory - without * Header-ID or length specifier. * * @since 1.1 */ private byte[] centralData; /** * Set the extra field data in central directory. * @param data the data to use */ public void setCentralDirectoryData(byte[] data) { centralData = data; } /** * Get the central data length. * If there is no central data, get the local file data length. * @return the central data length */ public ZipShort getCentralDirectoryLength() { if (centralData != null) { return new ZipShort(centralData.length); } return getLocalFileDataLength(); } /** * Get the central data. * @return the central data if present, else return the local file data */ public byte[] getCentralDirectoryData() { if (centralData != null) { return centralData; } return getLocalFileDataData(); } /** * @param data the array of bytes. * @param offset the source location in the data array. * @param length the number of bytes to use in the data array. * @see ZipExtraField#parseFromLocalFileData(byte[], int, int) */ public void parseFromLocalFileData(byte[] data, int offset, int length) { byte[] tmp = new byte[length]; System.arraycopy(data, offset, tmp, 0, length); setLocalFileDataData(tmp); } }
[ "iMatrix@norteksoft.com" ]
iMatrix@norteksoft.com
30a84ea948da8976fb65d948d2c355f1a69c7fc2
2733a49a6b5404857787802ef90c1db351523a23
/src/main/java/org/virtue/network/event/encoder/impl/LogoutEventEncoder.java
1e1c18127b33148020d9fa976cda34d3ac58a0c5
[ "MIT" ]
permissive
Sundays211/VirtueRS3
2500c9bbc0f2adf9b8036be2e398388ee8be1c97
b630bd3add4e849ac6c457b3f158a731f10ff502
refs/heads/develop
2021-01-18T21:35:39.166859
2018-07-29T07:14:17
2018-07-29T07:14:17
49,179,329
14
26
MIT
2022-11-03T10:32:36
2016-01-07T03:45:43
Java
UTF-8
Java
false
false
2,087
java
/** * Copyright (c) 2014 Virtue Studios * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.virtue.network.event.encoder.impl; import org.virtue.game.entity.player.Player; import org.virtue.network.event.buffer.OutboundBuffer; import org.virtue.network.event.context.impl.out.LogoutEventContext; import org.virtue.network.event.encoder.EventEncoder; import org.virtue.network.event.encoder.ServerProtocol; /** * @author Im Frizzy <skype:kfriz1998> * @since Oct 5, 2014 */ public class LogoutEventEncoder implements EventEncoder<LogoutEventContext> { /* (non-Javadoc) * @see org.virtue.network.event.encoder.EventEncoder#encode(org.virtue.game.entity.player.Player, org.virtue.network.event.context.GameEventContext) */ @Override public OutboundBuffer encode(Player player, LogoutEventContext context) { OutboundBuffer buffer = new OutboundBuffer(); if (context.toLobby()) { buffer.putPacket(ServerProtocol.LOGOUT_LOBBY, player); } else { buffer.putPacket(ServerProtocol.LOGOUT_FULL, player); } return buffer; } }
[ "sundays211@gmail.com" ]
sundays211@gmail.com
d9d82367aa6e73cfb913a082595717eda12bee9f
6cff61954a77b878f7b15d55fcc8e8f606e21cbb
/angel-ps/core/src/test/java/com/tencent/angel/ml/math/matrix/SparseFloatMatrixTest.java
8347ebc143fd98a582b3713e504fcb3ac66fe293
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "MIT", "Apache-2.0" ]
permissive
ccchengff/angel
23abefacc5dc34dc639f021741bdd141743e8115
7d73d380f49e9133039970a89b795ea0bfea74e1
refs/heads/master
2021-05-07T14:13:55.057990
2018-04-26T14:37:46
2018-04-26T14:37:46
109,799,295
1
0
null
2017-11-07T07:07:57
2017-11-07T07:07:34
Java
UTF-8
Java
false
false
3,219
java
/* * Tencent is pleased to support the open source community by making Angel available. * * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * https://opensource.org/licenses/BSD-3-Clause * * 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.tencent.angel.ml.math.matrix; import com.tencent.angel.ml.math.vector.SparseFloatVector; import org.junit.Test; import static junit.framework.Assert.assertEquals; public class SparseFloatMatrixTest { @Test public void testPlusByGet() { SparseFloatMatrix matrix = new SparseFloatMatrix(2, 2); matrix.plusBy(0, 0, 1.0f); matrix.plusBy(1, 1, 1.0f); assertEquals(matrix.get(0, 0), 1.0f); assertEquals(matrix.get(0, 1), 0.0f); assertEquals(matrix.get(1, 0), 0.0f); assertEquals(matrix.get(1, 1), 1.0f); matrix.clear(); SparseFloatVector incVec = new SparseFloatVector(2); incVec.set(0, 1); incVec.set(1, 1); incVec.setRowId(0); matrix.plusBy(incVec); assertEquals(matrix.get(0, 0), 1.0f); assertEquals(matrix.get(0, 1), 1.0f); assertEquals(matrix.get(1, 0), 0.0f); assertEquals(matrix.get(1, 1), 0.0f); matrix.clear(); int [] rowIndexes = {0, 1}; int [] colIndexes = {0, 1}; float [] values = {1.0f, 1.0f}; matrix.plusBy(rowIndexes, colIndexes, values); assertEquals(matrix.get(0, 0), 1.0f); assertEquals(matrix.get(0, 1), 0.0f); assertEquals(matrix.get(1, 0), 0.0f); assertEquals(matrix.get(1, 1), 1.0f); matrix.clear(); colIndexes[0] = 0; colIndexes[1] = 1; values[0] = 1.0f; values[1] = 1.0f; matrix.plusBy(0, colIndexes, values); assertEquals(matrix.get(0, 0), 1.0f); assertEquals(matrix.get(0, 1), 1.0f); assertEquals(matrix.get(1, 0), 0.0f); assertEquals(matrix.get(1, 1), 0.0f); SparseFloatMatrix matrix1 = new SparseFloatMatrix(2, 2); matrix.clear(); matrix.plusBy(0, 0, 1.0f); matrix.plusBy(1, 1, 1.0f); matrix1.plusBy(0, 0, 1.0f); matrix1.plusBy(1, 1, 1.0f); matrix.plusBy(matrix1); assertEquals(matrix.get(0, 0), 2.0f); assertEquals(matrix.get(0, 1), 0.0f); assertEquals(matrix.get(1, 0), 0.0f); assertEquals(matrix.get(1, 1), 2.0f); assertEquals(((SparseFloatVector)matrix.getTVector(0)).get(0), 2.0f); assertEquals(((SparseFloatVector)matrix.getTVector(0)).get(1), 0.0f); assertEquals(((SparseFloatVector)matrix.getTVector(1)).get(0), 0.0f); assertEquals(((SparseFloatVector)matrix.getTVector(1)).get(1), 2.0f); } @Test public void testSizeSparsity() { SparseFloatMatrix matrix= new SparseFloatMatrix(2, 2); matrix.plusBy(0, 0, 1.0f); matrix.plusBy(1, 1, 1.0f); assertEquals(matrix.size(), 4); assertEquals(matrix.sparsity(), 0.5); } }
[ "cswjsxs2005@gmail.com" ]
cswjsxs2005@gmail.com
c6927fc2408c0e8d6dbc46fa777ccea4cc034525
d8a29b6cf1bd3af493ef5bbd8dbcfde55801a21d
/src/main/java/com/yuxh/dp/strategy/better/Duck.java
e6d7143372706ee86947cc1546284628202e43d6
[]
no_license
yuxh/my-design-patterns
9e87d37dd4d29285f256396becd71c3db655086d
ffddcb6de9db25b33a91c48b946d7d7f2bd064c2
refs/heads/master
2023-05-12T13:46:15.829114
2021-06-03T09:50:00
2021-06-03T09:50:00
371,673,429
0
0
null
null
null
null
UTF-8
Java
false
false
650
java
package com.yuxh.dp.strategy.better; /** * @author yuxh * @Date: 2021-05-28. * @Time: 10:05 */ abstract class Duck { FlyBehavior flyBehavior; QuackBehavior quackBehavior; void performFly() { flyBehavior.fly(); } public void setFlyBehavior(FlyBehavior flyBehavior) { this.flyBehavior = flyBehavior; } public void setQuackBehavior(QuackBehavior quackBehavior) { this.quackBehavior = quackBehavior; } void performQuack() { quackBehavior.quake(); } public void swim() { System.out.println("All ducks float, even decoys!"); } abstract void display(); }
[ "@" ]
@
7a01cab2e218b18ad7c299285a266337e7c34aed
01f7d35f902d18f5d3f57b3a18602b344f0e6f91
/src/java/controller/admin/AdminSizesController.java
3f04c01115ce95200bd9101da1dea8e834d35178
[]
no_license
jw1903lm/FinalProject
3894d905505c0d73f0bffb781a03aa28337b1dfd
d85d931ffea576884184d5db1a1fc60e8bb92cc1
refs/heads/master
2020-08-06T01:29:30.493711
2019-10-04T10:00:23
2019-10-04T10:00:23
212,784,898
0
0
null
null
null
null
UTF-8
Java
false
false
3,489
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 controller.admin; import entity.Products; import entity.Sizes; import java.sql.SQLException; import java.util.List; import javax.servlet.http.HttpServletRequest; import model.admin.AdminProductModel; import model.admin.AdminSizeModel; import model.admin.AdminUtil; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; /** * * @author NamPA */ @Controller @RequestMapping(value = "/adminSizesController") public class AdminSizesController { @RequestMapping(value = "/getAll") public ModelAndView getAllSizes() { ModelAndView mav = new ModelAndView("admin/size/sizes"); List<Sizes> listSize = AdminSizeModel.getAllSizes(); mav.addObject("listSize", listSize); return mav; } @RequestMapping(value = "/doSearch") public ModelAndView doSearch(HttpServletRequest request) { ModelAndView mav = new ModelAndView("admin/size/sizes"); String name = request.getParameter("search"); List<Sizes> listSize = AdminSizeModel.findSizeByName(name); mav.addObject("listSize", listSize); return mav; } @RequestMapping(value = "/initInsert") public ModelAndView initInsert() { ModelAndView mav = new ModelAndView("admin/size/newSize"); Sizes sizeInsert = new Sizes(); List<Products> listProduct = AdminProductModel.getAllProducts(); mav.addObject("listProduct", listProduct); mav.addObject("sizeInsert", sizeInsert); return mav; } @RequestMapping(value = "/insert") public String insertSize(Sizes sizeInsert, HttpServletRequest request) { sizeInsert.setCreated(AdminUtil.getCurrentDate()); Products product = AdminProductModel.getProductById(request.getParameter("product")); sizeInsert.setProducts(product); return (AdminSizeModel.addSize(sizeInsert)) ? "redirect:getAll.htm" : "admin/error"; } @RequestMapping(value = "/initUpdate") public ModelAndView initUpdate(String sizeId) { ModelAndView mav = new ModelAndView("admin/size/updateSize"); List<Products> listProduct = AdminProductModel.getAllProducts(); Sizes sizeUpdate = AdminSizeModel.getSizeById(sizeId); mav.addObject("sizeUpdate", sizeUpdate); mav.addObject("listProduct", listProduct); return mav; } @RequestMapping(value = "/update") public String updateSize(Sizes sizeUpdate, HttpServletRequest request) { Sizes size = AdminSizeModel.getSizeById(String.valueOf(sizeUpdate.getSizeId())); Products product = AdminProductModel.getProductById(request.getParameter("product")); sizeUpdate.setCreated(size.getCreated()); sizeUpdate.setProducts(product); return AdminSizeModel.updateSize(sizeUpdate) ? "redirect:getAll.htm" : "admin/error"; } @RequestMapping(value = "/delete") public String deleteSize(String sizeId, HttpServletRequest request) throws SQLException { if (request.getSession().getAttribute("adminName") == null) { return "redirect:/adminIndexController/login.htm"; } return AdminSizeModel.deleteSize(sizeId) ? "redirect:getAll.htm" : "admin/error"; } }
[ "you@example.com" ]
you@example.com
55173e480178779472dd3212b5f07ffed31c2d9e
a741d82fb5ee0203161455353587ffcc902ef351
/aylson-admin/src/main/java/com/aylson/dc/mem/controller/GiftExchangeRecordsController.java
b66dc3bca0f2accf5c85f0cff81a9d65ea17d37f
[]
no_license
xiaofeifei321/aylson-parent
b48121272d5e92a1acc4b671ab7af63aa6c06b0b
3749a0f1ef45851b4aa513b324ef23a04e4421d3
refs/heads/master
2022-12-23T20:15:51.598455
2019-08-29T11:30:13
2019-08-29T11:30:13
204,696,341
0
0
null
null
null
null
UTF-8
Java
false
false
2,358
java
package com.aylson.dc.mem.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.aylson.core.easyui.EasyuiDataGridJson; import com.aylson.core.frame.controller.BaseController; import com.aylson.dc.base.GeneralConstant.MemberType; import com.aylson.dc.mem.search.GiftExchangeRecordsSearch; import com.aylson.dc.mem.service.GiftExchangeRecordsService; import com.aylson.dc.mem.vo.GiftExchangeRecordsVo; /** * 积分兑换礼品记录管理 * @author wwx * @since 2016-08 * @version v1.0 * */ @Controller @RequestMapping("/mem/giftExchangeRecords") public class GiftExchangeRecordsController extends BaseController { @Autowired private GiftExchangeRecordsService giftExchangeRecordsService; //发布管理服务 /** * 后台-首页 * * @return */ @RequestMapping(value = "/admin/toIndex", method = RequestMethod.GET) public String toIndex() { this.request.setAttribute("memberTypeMap", MemberType.MemberTypeMap); return "/jsp/mem/admin/giftExchangeRecords/index"; } /** * 获取列表 * @return list */ @RequestMapping(value = "/admin/list", method = RequestMethod.GET) @ResponseBody public EasyuiDataGridJson list(GiftExchangeRecordsSearch giftExchangeRecordsSearch){ EasyuiDataGridJson result = new EasyuiDataGridJson();//页面DataGrid结果集 try{ giftExchangeRecordsSearch.setIsPage(true); List<GiftExchangeRecordsVo> list = this.giftExchangeRecordsService.getList(giftExchangeRecordsSearch); result.setTotal(this.giftExchangeRecordsService.getRowCount(giftExchangeRecordsSearch)); result.setRows(list); return result; }catch(Exception e){ e.printStackTrace(); return null; } } /** * 根据条件获取列表信息 * @param giftExchangeRecordsSearch * @return */ @ResponseBody @RequestMapping(value = "/getList", method = RequestMethod.GET) public List<GiftExchangeRecordsVo> getList(GiftExchangeRecordsSearch giftExchangeRecordsSearch) { List<GiftExchangeRecordsVo> list = this.giftExchangeRecordsService.getList(giftExchangeRecordsSearch); return list; } }
[ "874189630@qq.com" ]
874189630@qq.com
76e5903602ddee7577ac47d918b36bafab4a7c7b
c802aaf4730f4eefd74b273435379a496a18ab9d
/src/test/java/com/tpg/smp/web/controllers/expectations/ExpectedAttribute.java
db3a54ec155468a11853eae61f797dbce17c0ede
[]
no_license
tpgoldie/smp
2984074493aa6b69821ecc095dd73a59ae790ef4
fd42a1e555b0a6969bbb25aad1428c485f678dc0
refs/heads/master
2021-01-13T05:31:02.439836
2017-02-04T17:39:52
2017-02-04T17:39:52
80,115,970
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
package com.tpg.smp.web.controllers.expectations; abstract class ExpectedAttribute<T> { private final String attributeName; private final T expectedValue; ExpectedAttribute(String attributeName, T expectedValue) { this.attributeName = attributeName; this.expectedValue = expectedValue; } public String getAttributeName() { return attributeName; } public T getExpectedValue() { return expectedValue; } }
[ "tpg@blueyonder.co.uk" ]
tpg@blueyonder.co.uk
fafb4b3e2a5517bbf62a844d8ecc8fa48558f13f
7f046e7b8ac247368f8a24ad5c9d9481ae9641f8
/app/src/main/java/com/jake/wukong/ui/BaseViewHolder.java
8ddefdfb850d6c538c675f048e4dc45df8076c53
[]
no_license
hlbt/Wukong
c2884dc4f51f9e5416c9fe32b6e09528a358e107
9f77aa91c4b07ff1e038f160d1c201836e3baa76
refs/heads/master
2020-05-25T03:30:41.484585
2016-09-30T09:25:55
2016-09-30T09:25:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
314
java
package com.jake.wukong.ui; import android.view.View; public class BaseViewHolder { public View itemView; public BaseViewHolder(View itemView) { this.itemView = itemView; } protected View findViewById(int id) { return itemView != null ? itemView.findViewById(id) : null; } }
[ "903475400@qq.com" ]
903475400@qq.com
4a806ee967d2c5f47235ae5bf6ba8c97836cc76b
e5ed92716951559384442b1c1adb80d813f286e4
/Java_Advanced/Object Oriented Programming/Classes Fundamentals/Exercises/WorkShop/Main.java
805cd06fcbe012c9d86303ba6fca2355c6890c4c
[]
no_license
aleksandar1498/Softuni
63993b231920bf718bec492c032fc6aeb5b75e67
9c7ed27a04ef094fcd875709c96e452d1b68a8e4
refs/heads/master
2021-06-26T23:45:43.781295
2020-09-23T17:34:34
2020-09-23T17:34:34
164,289,287
0
0
null
2020-10-13T16:29:51
2019-01-06T08:31:42
Java
UTF-8
Java
false
false
292
java
package oop.workshop; public class Main { public static void main(String[] args) { GenericArray<String> genericArray=new GenericArray<>(String.class); genericArray.add("Alex"); genericArray.add("Prova"); genericArray.forEach(System.out::println); } }
[ "aleksandar.fs@gmail.com" ]
aleksandar.fs@gmail.com
99c6e34ea9e70d0ebb922cec1628564039ff8124
1c5fd654b46d3fb018032dc11aa17552b64b191c
/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheStandaloneIntegrationTests.java
b8781a47433ac5289040669d1a300495041faefd
[ "Apache-2.0" ]
permissive
yangfancoming/spring-boot-build
6ce9b97b105e401a4016ae4b75964ef93beeb9f1
3d4b8cbb8fea3e68617490609a68ded8f034bc67
refs/heads/master
2023-01-07T11:10:28.181679
2021-06-21T11:46:46
2021-06-21T11:46:46
193,871,877
0
0
Apache-2.0
2022-12-27T14:52:46
2019-06-26T09:19:40
Java
UTF-8
Java
false
false
2,031
java
package org.springframework.boot.autoconfigure.mustache; import java.util.Collections; import com.samskivert.mustache.Mustache; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; /** * Integration Tests for {@link MustacheAutoConfiguration} outside of a web application. * * @author Dave Syer */ @RunWith(SpringRunner.class) @DirtiesContext @SpringBootTest(webEnvironment = WebEnvironment.NONE, properties = { "env.FOO=There", "foo=World" }) public class MustacheStandaloneIntegrationTests { @Autowired private Mustache.Compiler compiler; @Test public void directCompilation() { assertThat(this.compiler.compile("Hello: {{world}}") .execute(Collections.singletonMap("world", "World"))) .isEqualTo("Hello: World"); } @Test public void environmentCollectorCompoundKey() { assertThat(this.compiler.compile("Hello: {{env.foo}}").execute(new Object())) .isEqualTo("Hello: There"); } @Test public void environmentCollectorCompoundKeyStandard() { assertThat(this.compiler.standardsMode(true).compile("Hello: {{env.foo}}") .execute(new Object())).isEqualTo("Hello: There"); } @Test public void environmentCollectorSimpleKey() { assertThat(this.compiler.compile("Hello: {{foo}}").execute(new Object())) .isEqualTo("Hello: World"); } @Configuration @Import({ MustacheAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class }) protected static class Application { } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
dded8638f6e6eb93921d183175608ca5743463bc
3f2eaddea3e9b6aac7564bbb50210f38a39f2933
/day26_DesingModel/src/abstractfactory/Fruit.java
d86dff96a2683016b8be22476db1c556b8626d64
[]
no_license
Dxuan-chen/yq
a30b2c6c50f8b1c26d0dd04d56ac0f01d114b358
6eb815215179fe03c1dacbb292eec4b40a7ed69c
refs/heads/master
2023-07-16T03:39:58.709784
2021-08-18T11:39:33
2021-08-18T11:39:33
391,780,698
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package abstractfactory; /** * 简单工厂实现流程: * 1.棍据需要创建的对象类型,抽取出一个父类型接口 * 2.提供一个工厂方法,用于根据指定的参数(对象类型)实现创建一个父接口类型对象 */ public interface Fruit {//为了所有水果可以返回 public void showMe(); }
[ "xuanfeng_chen@163.com" ]
xuanfeng_chen@163.com
e1ee324b2d063539c15b6e5db63046f5feeeea52
2f5220f7126e52a939412067f08a321bb95f0010
/gulimall-ware/src/main/java/com/atguigu/gulimall/ware/service/impl/WareInfoServiceImpl.java
f704f14b461305ece5b562369864c8285ce22342
[ "Apache-2.0" ]
permissive
gzqnb/springcloud
77e5c581840ba7b4b72a86a49eb4c4a50b92a020
b7f1ef3e78155230502a3058195deb088904b547
refs/heads/master
2023-06-20T02:09:45.873381
2021-07-05T06:37:23
2021-07-05T06:37:23
360,515,806
0
0
null
null
null
null
UTF-8
Java
false
false
2,357
java
package com.atguigu.gulimall.ware.service.impl; import com.alibaba.fastjson.TypeReference; import com.atguigu.common.utils.R; import com.atguigu.gulimall.ware.feign.MemberFeignService; import com.atguigu.gulimall.ware.vo.FareVo; import com.atguigu.gulimall.ware.vo.MemberAddressVo; import org.aspectj.weaver.ast.Or; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.atguigu.common.utils.PageUtils; import com.atguigu.common.utils.Query; import com.atguigu.gulimall.ware.dao.WareInfoDao; import com.atguigu.gulimall.ware.entity.WareInfoEntity; import com.atguigu.gulimall.ware.service.WareInfoService; import org.springframework.util.StringUtils; @Service("wareInfoService") public class WareInfoServiceImpl extends ServiceImpl<WareInfoDao, WareInfoEntity> implements WareInfoService { @Autowired MemberFeignService memberFeignService; @Override public PageUtils queryPage(Map<String, Object> params) { QueryWrapper<WareInfoEntity> wareInfoEntityQueryWrapper = new QueryWrapper<>(); String key = (String) params.get("key"); if(!StringUtils.isEmpty(key)){ wareInfoEntityQueryWrapper.eq("id",key).or().like("name",key).or().like("address",key).or().like("areacode",key); } IPage<WareInfoEntity> page = this.page( new Query<WareInfoEntity>().getPage(params), wareInfoEntityQueryWrapper ); return new PageUtils(page); } @Override public FareVo getFare(Long addrId) { FareVo fareVo = new FareVo(); R r = memberFeignService.addrInfo(addrId); MemberAddressVo data = r.getData("memberReceiveAddress",new TypeReference<MemberAddressVo>() { }); if (data!=null){ String phone = data.getPhone(); String s = phone.substring(phone.length() - 1, phone.length()); BigDecimal bigDecimal = new BigDecimal(s); fareVo.setAddress(data); fareVo.setFare(bigDecimal); return fareVo; } return null; } }
[ "905351828@qq.com" ]
905351828@qq.com
3e8546d56bae6b6e3eb89447a9923f178e015484
8358717b853f240843ffa56784773a29b1efc19e
/service-interface-wms/src/main/java/com/jumbo/wms/model/warehouse/StaCartonCommand.java
e0f08c7a2e3fd3698d2e5bb197699a96485b8fe0
[]
no_license
huanglongf/enterprise_project
65ec3e2c56e4a2909f0881a9276a9966857bb9c7
de1865e638c9620e702818124f0b2deac04028c9
refs/heads/master
2020-05-07T13:25:07.223338
2018-10-21T08:44:33
2018-10-21T08:44:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,630
java
package com.jumbo.wms.model.warehouse; import java.util.Date; import com.jumbo.wms.model.mongodb.StaCarton; public class StaCartonCommand extends StaCarton { /** * */ private static final long serialVersionUID = -6167438940468172752L; private String cartonCode; private Long skuId; private String skuCode; private String barCode; private String name; private String supplierCode; private String keyProperties; private String statusName; private Date productionDate; private Date expDate; private String userName; private Long qty; private boolean isSnSku; private String dmgType; // 残次类型 private String dmgReason; // 残次原因 private String dmgCode; // 条码 private String sn; private String locationCode; public String getLocationCode() { return locationCode; } public void setLocationCode(String locationCode) { this.locationCode = locationCode; } public boolean isSnSku() { return isSnSku; } public void setSnSku(boolean isSnSku) { this.isSnSku = isSnSku; } public String getSn() { return sn; } public void setSn(String sn) { this.sn = sn; } public String getDmgType() { return dmgType; } public void setDmgType(String dmgType) { this.dmgType = dmgType; } public String getDmgReason() { return dmgReason; } public void setDmgReason(String dmgReason) { this.dmgReason = dmgReason; } public String getDmgCode() { return dmgCode; } public void setDmgCode(String dmgCode) { this.dmgCode = dmgCode; } public Long getSkuId() { return skuId; } public void setSkuId(Long skuId) { this.skuId = skuId; } public String getCartonCode() { return cartonCode; } public void setCartonCode(String cartonCode) { this.cartonCode = cartonCode; } public String getSkuCode() { return skuCode; } public void setSkuCode(String skuCode) { this.skuCode = skuCode; } public String getBarCode() { return barCode; } public void setBarCode(String barCode) { this.barCode = barCode; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSupplierCode() { return supplierCode; } public void setSupplierCode(String supplierCode) { this.supplierCode = supplierCode; } public String getKeyProperties() { return keyProperties; } public void setKeyProperties(String keyProperties) { this.keyProperties = keyProperties; } public String getStatusName() { return statusName; } public void setStatusName(String statusName) { this.statusName = statusName; } public Date getProductionDate() { return productionDate; } public void setProductionDate(Date productionDate) { this.productionDate = productionDate; } public Date getExpDate() { return expDate; } public void setExpDate(Date expDate) { this.expDate = expDate; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public Long getQty() { return qty; } public void setQty(Long qty) { this.qty = qty; } }
[ "lijg@many-it.com" ]
lijg@many-it.com
62c6f968e2f7f4cecac478296d0941fdd6e65279
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/RuleMazer/src/com/puttysoftware/rulemazer/maze/effects/RotatedCCW.java
76580d81e3f0566558b78e7d7f641e3faa5b29a4
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
1,449
java
/* RuleMazer: A Maze-Solving Game Copyright (C) 2008-2010 Eric Ahnell Any questions should be directed to the author via email at: rulemazer@puttysoftware.com */ package com.puttysoftware.rulemazer.maze.effects; import com.puttysoftware.rulemazer.generic.DirectionConstants; public class RotatedCCW extends MazeEffect { // Constructor public RotatedCCW(final int newRounds) { super("Rotated CCW", newRounds); } @Override public int modifyMove1(final int arg) { switch (arg) { case DirectionConstants.DIRECTION_NORTH: return DirectionConstants.DIRECTION_WEST; case DirectionConstants.DIRECTION_SOUTH: return DirectionConstants.DIRECTION_EAST; case DirectionConstants.DIRECTION_WEST: return DirectionConstants.DIRECTION_SOUTH; case DirectionConstants.DIRECTION_EAST: return DirectionConstants.DIRECTION_NORTH; case DirectionConstants.DIRECTION_NORTHWEST: return DirectionConstants.DIRECTION_SOUTHWEST; case DirectionConstants.DIRECTION_NORTHEAST: return DirectionConstants.DIRECTION_NORTHWEST; case DirectionConstants.DIRECTION_SOUTHWEST: return DirectionConstants.DIRECTION_SOUTHEAST; case DirectionConstants.DIRECTION_SOUTHEAST: return DirectionConstants.DIRECTION_NORTHEAST; default: break; } return 0; } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
329c8c22db60c3c525fcc2f6c61fb23409ea65ea
03dbebe2803cd6a2936362f7050e316449aa052b
/app/src/main/java/com/shellcore/android/shelltwitter/lib/GlideImageLoader.java
2bd439af0e232ed437f6ba76a9fc54cea8e504d5
[]
no_license
ShellCore/ShellTwitterClient
67b9a20f88c71ce39d9a31a524cbf053d8a68421
b02aac120df8cd9ab4ec769cd0e6339938c00a06
refs/heads/master
2021-01-01T04:54:54.813765
2017-07-18T20:57:28
2017-07-18T20:57:28
97,276,925
0
0
null
null
null
null
UTF-8
Java
false
false
799
java
package com.shellcore.android.shelltwitter.lib; import android.widget.ImageView; import com.bumptech.glide.RequestManager; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.shellcore.android.shelltwitter.lib.base.ImageLoader; /** * Created by Cesar on 14/07/2017. */ public class GlideImageLoader implements ImageLoader { private RequestManager glideRequestManager; public GlideImageLoader(RequestManager glideRequestManager) { this.glideRequestManager = glideRequestManager; } @Override public void load(ImageView imageView, String url) { glideRequestManager.load(url) .diskCacheStrategy(DiskCacheStrategy.ALL) .centerCrop() .override(600, 400) .into(imageView); } }
[ "shell.one.core@gmail.com" ]
shell.one.core@gmail.com
3fc2af32fed61095be062fcd9c76d74002af099f
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
/src/main/java/com/microsoft/graph/requests/generated/BaseManagedAppConfigurationRequestBuilder.java
3ceb8af15a20238ae751ce13ff73f40d0d3f4e3f
[ "MIT" ]
permissive
rgrebski/msgraph-sdk-java
e595e17db01c44b9c39d74d26cd925b0b0dfe863
759d5a81eb5eeda12d3ed1223deeafd108d7b818
refs/heads/master
2020-03-20T19:41:06.630857
2018-03-16T17:31:43
2018-03-16T17:31:43
137,648,798
0
0
null
2018-06-17T11:07:06
2018-06-17T11:07:05
null
UTF-8
Java
false
false
2,232
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.requests.generated; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.models.extensions.*; import com.microsoft.graph.models.generated.*; import com.microsoft.graph.http.*; import com.microsoft.graph.requests.extensions.*; import com.microsoft.graph.requests.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.EnumSet; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The class for the Base Managed App Configuration Request Builder. */ public class BaseManagedAppConfigurationRequestBuilder extends BaseRequestBuilder implements IBaseManagedAppConfigurationRequestBuilder { /** * The request builder for the ManagedAppConfiguration * * @param requestUrl the request URL * @param client the service client * @param requestOptions the options for this request */ public BaseManagedAppConfigurationRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<? extends Option> requestOptions) { super(requestUrl, client, requestOptions); } /** * Creates the request * * @return the IManagedAppConfigurationRequest instance */ public IManagedAppConfigurationRequest buildRequest() { return buildRequest(getOptions()); } /** * Creates the request with specific requestOptions instead of the existing requestOptions * * @param requestOptions the options for this request * @return the IManagedAppConfigurationRequest instance */ public IManagedAppConfigurationRequest buildRequest(final java.util.List<? extends Option> requestOptions) { return new ManagedAppConfigurationRequest(getRequestUrl(), getClient(), requestOptions); } }
[ "caitbal@microsoft.com" ]
caitbal@microsoft.com
4e3ba4a909e22eb7af83f9a79f0edae86a2efc39
330c8634f8cfcc1b4ce56eb929698f3cba3077de
/halva/src/main/java/io/soabase/halva/matcher/Getter.java
930d8989e3b16a80a1835eda93da8c7fb7758232
[ "Apache-2.0" ]
permissive
smilingleo/halva
34185bc5ce12ae91778c4bae968c4eb6cef57489
168483c2964be0cfa3b572af0dd4acb7f15802dd
refs/heads/master
2020-12-25T03:29:41.836678
2016-06-29T01:16:05
2016-06-29T01:16:05
62,016,154
0
0
null
2016-06-27T01:13:13
2016-06-27T01:13:13
null
UTF-8
Java
false
false
3,634
java
/** * Copyright 2016 Jordan Zimmerman * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.soabase.halva.matcher; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.function.Function; import java.util.function.Supplier; class Getter<ARG> implements GettersBase { private final List<Entry<ARG>> entries = new ArrayList<>(); private final Optional<ARG> arg; private volatile Entry<ARG> defaultEntry; static class Entry<ARG> { final Function<ARG, Optional<? extends Supplier<?>>> curry; public Entry(ExtractObject extracter, Supplier<?> extracterProc) { if ( extracter == null ) { throw new IllegalArgumentException("extracter cannot be null"); } if ( extracterProc == null ) { throw new IllegalArgumentException("proc cannot be null"); } curry = arg -> extracter.extract(arg) ? Optional.of(extracterProc::get) : Optional.empty(); } Entry(Supplier<?> proc) { if ( proc == null ) { throw new IllegalArgumentException("proc cannot be null"); } this.curry = arg -> Optional.of(proc); } } Getter(ARG arg) { this.arg = Optional.ofNullable(arg); } Getter(ARG arg, Getter<ARG> rhs) { this.defaultEntry = rhs.defaultEntry; this.arg = Optional.ofNullable(arg); this.entries.addAll(rhs.entries); } void addEntry(Entry<ARG> entry) { entries.add(entry); } void setDefault(Supplier<?> proc) { if ( proc == null ) { throw new IllegalArgumentException("proc cannot be null"); } if ( defaultEntry != null ) { throw new IllegalArgumentException("A default case has already been added"); } defaultEntry = new Entry<>(proc); } @SuppressWarnings("unchecked") @Override public <T> Optional<T> getOpt() { ARG localArg = getArg(); Optional<? extends Supplier<?>> first = entries.stream() .map(entry -> entry.curry.apply(localArg)) .filter(Optional::isPresent) .map(Optional::get) .findFirst(); if ( first.isPresent() ) { return Optional.ofNullable((T)first.get().get()); } if ( defaultEntry != null ) { Optional<? extends Supplier<?>> supplier = defaultEntry.curry.apply(localArg); if ( supplier.isPresent() ) { return Optional.ofNullable((T)supplier.get().get()); } } return Optional.empty(); } @SuppressWarnings("unchecked") @Override public <T> T get() { return (T)getOpt().orElseThrow(() -> new MatchError("No matches found and no default provided for: " + getArg())); } @Override public void apply() { getOpt(); } ARG getArg() { return this.arg.orElse(null); } }
[ "jordan@jordanzimmerman.com" ]
jordan@jordanzimmerman.com
c5d892149981630231b468bd1a2ec7ca5d839623
6b3d528e936bc134cc4558bf134ca9e72ff306b7
/TW-PLAT-APP/src/main/java/com/efun/platform/http/response/bean/PhoneAreaTypeResponse.java
373a66fe56746c0a6f10025f24110d238ff3bf04
[]
no_license
gan00000/app
23162e57993e5b4e2b8d51192539156f3f34f9b8
73d6f79497bd3f97566fb93a47ff4fe176bc74eb
refs/heads/master
2020-06-30T20:17:38.919084
2016-11-21T11:11:50
2016-11-21T11:11:50
74,354,862
0
0
null
null
null
null
UTF-8
Java
false
false
1,516
java
package com.efun.platform.http.response.bean; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONObject; import com.efun.platform.module.account.bean.PhoneAreaBean; import com.efun.platform.module.account.bean.PhoneAreaResultBean; import com.efun.platform.module.account.bean.ResultBean; import com.efun.platform.module.game.bean.GameItemBean; /** * 獲取手機號碼地區 * @author itxuxxey * */ public class PhoneAreaTypeResponse extends BaseResponseBean { /** * 账号相关处理结果{@link ResultBean} */ private PhoneAreaResultBean phoneAreaBean; private ArrayList<PhoneAreaBean> mPhoneAreas; @Override public void setValues(Object object) { JSONObject jsonObject = (JSONObject) object; phoneAreaBean = new PhoneAreaResultBean(); mPhoneAreas = new ArrayList<PhoneAreaBean>(); phoneAreaBean.setCode(jsonObject.optString("code")); phoneAreaBean.setMessage(jsonObject.optString("message")); if(jsonObject.has("result")){ JSONArray jsonArray= jsonObject.optJSONArray("result"); PhoneAreaBean bean = null; for (int i = 0; i < jsonArray.length(); i++) { bean = new PhoneAreaBean(); jsonObject = jsonArray.optJSONObject(i); bean.setKey(jsonObject.optString("key")); bean.setValue(jsonObject.optString("value")); bean.setPattern(jsonObject.optString("pattern")); mPhoneAreas.add(bean); } phoneAreaBean.setmPhoneAreas(mPhoneAreas); } } public PhoneAreaResultBean getPhoneAreaResultBean() { return phoneAreaBean; } }
[ "ganyuanrong@gmail.com" ]
ganyuanrong@gmail.com
101183bee6e4168cb2565e1beb4439e9c8ba82ce
2006490d6ce6f42fd20e5307700f6bb984a7ce74
/src/semanticMarkup/io/input/lib/taxonx/TargetAudienceType.java
827e37c548653bcc270d4b32be6de4500bfc4e46
[ "Apache-2.0" ]
permissive
dongyemeng/charaparser
80886db1f4075aad7e1c487fdaaa886d16d3b3b8
71fd06900884175909132cce4179e174c6971a35
refs/heads/master
2021-01-18T16:19:07.668337
2013-07-12T20:28:49
2013-07-12T20:28:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,013
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.04.11 at 02:48:30 PM MST // package semanticMarkup.io.input.lib.taxonx; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * 008/22, 521 * * <p>Java class for targetAudienceType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="targetAudienceType"> * &lt;simpleContent> * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string"> * &lt;attGroup ref="{http://www.loc.gov/mods/v3}language"/> * &lt;attribute name="authority" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" /> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "targetAudienceType", propOrder = { "value" }) public class TargetAudienceType { @XmlValue protected String value; @XmlAttribute(name = "authority") @XmlSchemaType(name = "anySimpleType") protected String authority; @XmlAttribute(name = "lang") @XmlSchemaType(name = "anySimpleType") protected String languageLang; @XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace") protected String lang; @XmlAttribute(name = "script") @XmlSchemaType(name = "anySimpleType") protected String script; @XmlAttribute(name = "transliteration") @XmlSchemaType(name = "anySimpleType") protected String transliteration; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the authority property. * * @return * possible object is * {@link String } * */ public String getAuthority() { return authority; } /** * Sets the value of the authority property. * * @param value * allowed object is * {@link String } * */ public void setAuthority(String value) { this.authority = value; } /** * Gets the value of the languageLang property. * * @return * possible object is * {@link String } * */ public String getLanguageLang() { return languageLang; } /** * Sets the value of the languageLang property. * * @param value * allowed object is * {@link String } * */ public void setLanguageLang(String value) { this.languageLang = value; } /** * Gets the value of the lang property. * * @return * possible object is * {@link String } * */ public String getLang() { return lang; } /** * Sets the value of the lang property. * * @param value * allowed object is * {@link String } * */ public void setLang(String value) { this.lang = value; } /** * Gets the value of the script property. * * @return * possible object is * {@link String } * */ public String getScript() { return script; } /** * Sets the value of the script property. * * @param value * allowed object is * {@link String } * */ public void setScript(String value) { this.script = value; } /** * Gets the value of the transliteration property. * * @return * possible object is * {@link String } * */ public String getTransliteration() { return transliteration; } /** * Sets the value of the transliteration property. * * @param value * allowed object is * {@link String } * */ public void setTransliteration(String value) { this.transliteration = value; } }
[ "thomas.rodenhausen@gmail.com" ]
thomas.rodenhausen@gmail.com
16f870291ee79e28a5d1cf4bfc42bf5a6680e19c
72e1e90dd8e1e43bad4a6ba46a44d1f30aa76fe6
/java/jee/Jee_7_essentials/base/src/main/java/br/com/fernando/chapter05_soapBasedws/part07_security/Security.java
dbdb7f5f1d0d7d4e17ba42c8075d8f3be078cae2
[ "Apache-2.0" ]
permissive
fernando-romulo-silva/myStudies
bfdf9f02778d2f4993999f0ffc0ddd0066ec41b4
aa8867cda5edd54348f59583555b1f8fff3cd6b3
refs/heads/master
2023-08-16T17:18:50.665674
2023-08-09T19:47:15
2023-08-09T19:47:15
230,160,136
3
0
Apache-2.0
2023-02-08T19:49:02
2019-12-25T22:27:59
null
UTF-8
Java
false
false
169
java
package br.com.fernando.chapter05_soapBasedws.part07_security; public class Security { // TODO Security with SOAP // http://www.whitemesa.com/soapauth.html }
[ "fernando.romulo.silva@gmail.com" ]
fernando.romulo.silva@gmail.com
c79712fac6b3b0cab2d43346d728b6122e86d24e
80403ec5838e300c53fcb96aeb84d409bdce1c0c
/server/modules/study/test/src/org/labkey/test/tests/search/SearchSyntaxTest.java
8c66402ef718f532f7a1c43039ca95b3f536a029
[]
no_license
scchess/LabKey
7e073656ea494026b0020ad7f9d9179f03d87b41
ce5f7a903c78c0d480002f738bccdbef97d6aeb9
refs/heads/master
2021-09-17T10:49:48.147439
2018-03-22T13:01:41
2018-03-22T13:01:41
126,447,224
0
1
null
null
null
null
UTF-8
Java
false
false
2,306
java
package org.labkey.test.tests.search; import org.junit.Test; import org.junit.experimental.categories.Category; import org.labkey.test.BaseWebDriverTest; import org.labkey.test.Locator; import org.labkey.test.categories.DailyC; import org.labkey.test.util.SearchHelper; import java.util.Arrays; import java.util.List; import static org.junit.Assert.assertTrue; @Category({DailyC.class}) public class SearchSyntaxTest extends BaseWebDriverTest { @Test public void testSyntaxErrorMessages() { SearchHelper searchHelper = new SearchHelper(this); searchHelper.searchFor("age()", false); checkSyntaxErrorMessage("Error: Can't parse 'age()': Problem character is highlighted", "These characters have special meaning within search queries:", "You can escape special characters using \\ before the character or you can enclose the query string in double quotes.", "For more information, visit the search syntax documentation."); searchHelper.searchFor("incomplete(", false); checkSyntaxErrorMessage("Error: Can't parse 'incomplete(': Query string is incomplete", "These characters have special meaning within search queries:"); searchHelper.searchFor("this AND OR", false); checkSyntaxErrorMessage("Error: Can't parse 'this AND OR': Problem character is highlighted", "Boolean operators AND, OR, and NOT have special meaning within search queries"); } private void checkSyntaxErrorMessage(String... expectedPhrases) { String errorText = getText(Locator.css("div.alert-warning table")); // We want our nice, custom error messages to appear for (String phrase : expectedPhrases) { assertTrue("Did not find expected error message: " + phrase, errorText.contains(phrase)); } // Various phrases that appear in the standard Lucene system error message assertTextNotPresent("Cannot parse", "encountered", "Was expecting", "<NOT>", "<OR>", "<AND>", "<EOF>"); } @Override protected BrowserType bestBrowser() { return BrowserType.CHROME; } @Override protected String getProjectName() { return null; } @Override public List<String> getAssociatedModules() { return Arrays.asList("search"); } }
[ "klum@labkey.com" ]
klum@labkey.com
10d47ef504f7be74e301ab9c9d026cc615c83625
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/ua.java
fe2947162e1c4ccbc7eab8bfee974e5671e302a3
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
3,106
java
package com.tencent.mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import i.a.a.b; import java.util.LinkedList; public final class ua extends esc { public long YZK; public final int op(int paramInt, Object... paramVarArgs) { AppMethodBeat.i(259229); if (paramInt == 0) { paramVarArgs = (i.a.a.c.a)paramVarArgs[0]; if (this.BaseResponse == null) { paramVarArgs = new b("Not all required fields were included: BaseResponse"); AppMethodBeat.o(259229); throw paramVarArgs; } if (this.BaseResponse != null) { paramVarArgs.qD(1, this.BaseResponse.computeSize()); this.BaseResponse.writeFields(paramVarArgs); } paramVarArgs.bv(2, this.YZK); AppMethodBeat.o(259229); return 0; } if (paramInt == 1) { if (this.BaseResponse == null) { break label376; } } label376: for (paramInt = i.a.a.a.qC(1, this.BaseResponse.computeSize()) + 0;; paramInt = 0) { int i = i.a.a.b.b.a.q(2, this.YZK); AppMethodBeat.o(259229); return paramInt + i; if (paramInt == 2) { paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = esc.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = esc.getNextFieldNumber(paramVarArgs)) { if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) { paramVarArgs.kFT(); } } if (this.BaseResponse == null) { paramVarArgs = new b("Not all required fields were included: BaseResponse"); AppMethodBeat.o(259229); throw paramVarArgs; } AppMethodBeat.o(259229); return 0; } if (paramInt == 3) { Object localObject = (i.a.a.a.a)paramVarArgs[0]; ua localua = (ua)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: AppMethodBeat.o(259229); return -1; case 1: paramVarArgs = ((i.a.a.a.a)localObject).aMP(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { localObject = (byte[])paramVarArgs.get(paramInt); kd localkd = new kd(); if ((localObject != null) && (localObject.length > 0)) { localkd.parseFrom((byte[])localObject); } localua.BaseResponse = localkd; paramInt += 1; } AppMethodBeat.o(259229); return 0; } localua.YZK = ((i.a.a.a.a)localObject).ajGk.aaw(); AppMethodBeat.o(259229); return 0; } AppMethodBeat.o(259229); return -1; } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar * Qualified Name: com.tencent.mm.protocal.protobuf.ua * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
8cd5a73950a5535447763113eee971d23905e260
5d6c374a2518d469d674a1327d21d8e0cf2b54f7
/modules/ogc/net.opengis.wps/src/net/opengis/wps10/impl/DataInputsType1Impl.java
3cf88dd43b74c5352ab0df5a189c642c9abead3a
[]
no_license
HGitMaster/geotools-osgi
648ebd9343db99a1e2688d9aefad857f6521898d
09f6e327fb797c7e0451e3629794a3db2c55c32b
refs/heads/osgi
2021-01-19T08:33:56.014532
2014-03-19T18:04:03
2014-03-19T18:04:03
4,750,321
3
0
null
2014-03-19T13:50:54
2012-06-22T11:21:01
Java
UTF-8
Java
false
false
4,010
java
/** * <copyright> * </copyright> * * $Id: DataInputsType1Impl.java 31841 2008-11-14 13:21:26Z jdeolive $ */ package net.opengis.wps10.impl; import java.util.Collection; import net.opengis.wps10.DataInputsType1; import net.opengis.wps10.InputType; import net.opengis.wps10.Wps10Package; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Data Inputs Type1</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.opengis.wps10.impl.DataInputsType1Impl#getInput <em>Input</em>}</li> * </ul> * </p> * * @generated */ public class DataInputsType1Impl extends EObjectImpl implements DataInputsType1 { /** * The cached value of the '{@link #getInput() <em>Input</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getInput() * @generated * @ordered */ protected EList input; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected DataInputsType1Impl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return Wps10Package.Literals.DATA_INPUTS_TYPE1; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList getInput() { if (input == null) { input = new EObjectContainmentEList(InputType.class, this, Wps10Package.DATA_INPUTS_TYPE1__INPUT); } return input; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Wps10Package.DATA_INPUTS_TYPE1__INPUT: return ((InternalEList)getInput()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Wps10Package.DATA_INPUTS_TYPE1__INPUT: return getInput(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case Wps10Package.DATA_INPUTS_TYPE1__INPUT: getInput().clear(); getInput().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eUnset(int featureID) { switch (featureID) { case Wps10Package.DATA_INPUTS_TYPE1__INPUT: getInput().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case Wps10Package.DATA_INPUTS_TYPE1__INPUT: return input != null && !input.isEmpty(); } return super.eIsSet(featureID); } } //DataInputsType1Impl
[ "devnull@localhost" ]
devnull@localhost
c22764a9357b6d952303c69191fd5fab0cc2856d
182b7e5ca415043908753d8153c541ee0e34711c
/HibernateBasics/src/main/java/org/vinaylogics/hibernatebasics/annotation/hql/EmployeeHQLUpdateEmployee.java
a9568a49b1b1aff1758833b3a7c893f5848bdf37
[]
no_license
akamatagi/Java9AndAbove
2b62886441241ef4cd62990243d7b29e895452f7
ff002a2395edf506091b3571a470c15fa0742550
refs/heads/master
2023-02-09T17:38:21.467950
2020-12-30T14:47:59
2020-12-30T14:47:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,230
java
package org.vinaylogics.hibernatebasics.annotation.hql; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.hibernate.query.Query; import java.io.File; import java.util.Arrays; import java.util.List; public class EmployeeHQLUpdateEmployee { public static void main(String[] args) { File file = new File(EmployeeHQLUpdateEmployee.class.getClassLoader().getResource("hibernate_hql.cfg.xml").getFile()); SessionFactory sessionFactory = new Configuration().configure(file) .buildSessionFactory(); Session session = sessionFactory.openSession(); session.beginTransaction(); String hql = " UPDATE HqlEmployee e set e.firstName = :firstName WHERE e.id= :id"; // String hql = "FROM org.vinaylogics.hibernatebasics.annotation.hql.models.Employee AS e"; Query query = session.createQuery(hql); query.setParameter("firstName", "Vinay"); query.setParameter("id", 50); int result = query.executeUpdate(); System.out.println("Update Successful = "+result); session.getTransaction().commit(); sessionFactory.close(); session.close(); } }
[ "vinayagam.d.ganesh@gmail.com" ]
vinayagam.d.ganesh@gmail.com
e1a42d88579573b3c4ffc40d46c858fd9da24b6a
8a33d6c801e20413d504e462a1afc5b9fb3a139a
/src/main/java/de/javagl/autogui/model/ValueListener.java
0d120a89e56647101fda5dff37b9571e95356d5e
[ "MIT" ]
permissive
javagl/AutoGUI
2e55f290b2404d53a41e1986d697ddbb6b83715d
2eb2d8d3c6ff91bebc90e0f8cbd4304164d1f565
refs/heads/master
2020-04-14T03:22:22.046975
2018-12-30T17:54:55
2018-12-30T17:54:55
163,606,184
1
0
null
null
null
null
UTF-8
Java
false
false
1,665
java
/* * www.javagl.de - AutoGUI * * Copyright (c) 2014-2018 Marco Hutter - http://www.javagl.de * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ package de.javagl.autogui.model; /** * Interface for classes that want to be informed when the value of * a {@link ValueModel} changes * * @param <T> The type of the value */ public interface ValueListener<T> { /** * Will be called when the value in a {@link ValueModel} changes * * @param oldValue The old value * @param newValue The new value */ void valueChanged(T oldValue, T newValue); }
[ "javagl@javagl.de" ]
javagl@javagl.de
6d54986e48150d36f117566a1fc0e33d580bcc94
66e2f35b7b56865552616cf400e3a8f5928d12a2
/src/main/java/com/alipay/api/response/AlipayDataBillAccountlogQueryResponse.java
12ecea2c74aad6e7ad221db2b8d504eccac74b89
[ "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
1,648
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.AccountLogItemResult; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.data.bill.accountlog.query response. * * @author auto create * @since 1.0, 2019-10-11 10:57:54 */ public class AlipayDataBillAccountlogQueryResponse extends AlipayResponse { private static final long serialVersionUID = 1554477648351594631L; /** * 账务明细返回结果 */ @ApiListField("detail_list") @ApiField("account_log_item_result") private List<AccountLogItemResult> detailList; /** * 分页号,从1开始 */ @ApiField("page_no") private String pageNo; /** * 分页大小1000-2000 */ @ApiField("page_size") private String pageSize; /** * 账务明细总数。返回满足查询条件的明细的数量 */ @ApiField("total_size") private String totalSize; public void setDetailList(List<AccountLogItemResult> detailList) { this.detailList = detailList; } public List<AccountLogItemResult> getDetailList( ) { return this.detailList; } public void setPageNo(String pageNo) { this.pageNo = pageNo; } public String getPageNo( ) { return this.pageNo; } public void setPageSize(String pageSize) { this.pageSize = pageSize; } public String getPageSize( ) { return this.pageSize; } public void setTotalSize(String totalSize) { this.totalSize = totalSize; } public String getTotalSize( ) { return this.totalSize; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
6056c6cba18ad25a9e2487e15fb2dcf179f291b6
c9f497048e25df3ded21b77ebf9dd9be582c1dd9
/app/src/main/java/com/nenggou/slsm/data/entity/PutForwardItem.java
e0237d773740af038ec730b4f6eb5cebdf5097de
[]
no_license
jwc12321/NgMerchant
30aa83914cd0730da3e264be05650c9f47f40e9a
bcbd05e51a8e30ccfaf1600f43140b76cac523e2
refs/heads/master
2021-08-20T05:02:01.242619
2018-10-17T08:06:55
2018-10-17T08:06:55
135,698,672
0
0
null
null
null
null
UTF-8
Java
false
false
1,534
java
package com.nenggou.slsm.data.entity; import com.google.gson.annotations.SerializedName; /** * Created by JWC on 2018/7/26. */ public class PutForwardItem { @SerializedName("id") private String id; @SerializedName("created_at") private String createdAt; @SerializedName("status") private String status; @SerializedName("type") private String type; @SerializedName("cardbank") private String cardbank; @SerializedName("power") private String power; @SerializedName("price") private String price; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getCreatedAt() { return createdAt; } public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getCardbank() { return cardbank; } public void setCardbank(String cardbank) { this.cardbank = cardbank; } public String getPower() { return power; } public void setPower(String power) { this.power = power; } public String getPrice() { return price; } public void setPrice(String price) { this.price = price; } }
[ "921577542@qq.com" ]
921577542@qq.com
f85bb39d2d43e423fb75fdaccb0078cc9e66a89a
9a8e3137db2b3e29dceb170887144e991974c1f2
/eXemplar's-collection/exemplar/rs1/rs1/Unsorted/shellBot/o.java
1e6c9975b2852805e458228598004aa9ef69d4a5
[]
no_license
drewjbartlett/runescape-classic-dump
07155b735cfb6bf7b7b727557d1dd0c6f8e0db0b
f90e3bcc77ffb7ea4a78f087951f1d4cb0f6ad8e
refs/heads/master
2021-01-19T21:32:45.000029
2015-09-05T22:36:22
2015-09-05T22:36:22
88,663,647
1
0
null
2017-04-18T19:40:23
2017-04-18T19:40:23
null
UTF-8
Java
false
false
1,282
java
class o { o() { afk = new int[256]; afm = new int[257]; afn = new int[257]; agc = new boolean[256]; agd = new boolean[16]; age = new byte[256]; agf = new byte[4096]; agg = new int[16]; agh = new byte[18002]; agi = new byte[18002]; agj = new byte[6][258]; agk = new int[6][258]; agl = new int[6][258]; agm = new int[6][258]; agn = new int[6]; } final int adj = 4096; final int adk = 16; final int adl = 258; final int adm = 23; final int adn = 1; final int aea = 6; final int aeb = 50; final int aec = 4; final int aed = 18002; byte aee[]; int aef; int aeg; int aeh; int aei; byte aej[]; int aek; int ael; int aem; int aen; byte afa; int afb; boolean afc; int afd; int afe; int aff; int afg; int afh; int afi; int afj; int afk[]; int afl; int afm[]; int afn[]; public static int aga[]; int agb; boolean agc[]; boolean agd[]; byte age[]; byte agf[]; int agg[]; byte agh[]; byte agi[]; byte agj[][]; int agk[][]; int agl[][]; int agm[][]; int agn[]; int aha; }
[ "tom@tom-fitzhenry.me.uk" ]
tom@tom-fitzhenry.me.uk
f3a08b78a60296017f1a0644ba7347681103276f
75950d61f2e7517f3fe4c32f0109b203d41466bf
/modules/branches/1.8.1/kernel/api/fabric3-spi/src/main/java/org/fabric3/spi/objectfactory/ObjectCreationException.java
bdd3c1881d10cb15cd2846a8fa65b7bd8229740a
[]
no_license
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
UTF-8
Java
false
false
2,771
java
/* * Fabric3 * Copyright (c) 2009-2011 Metaform Systems * * Fabric3 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, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 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 Fabric3. * If not, see <http://www.gnu.org/licenses/>. * * ---------------------------------------------------- * * Portions originally based on Apache Tuscany 2007 * licensed under the Apache 2.0 license. * */ package org.fabric3.spi.objectfactory; import org.fabric3.host.Fabric3Exception; /** * Denotes an error creating a new object instance. * * @version $Rev$ $Date$ */ public class ObjectCreationException extends Fabric3Exception { private static final long serialVersionUID = -6423113430265944499L; public ObjectCreationException() { super(); } public ObjectCreationException(String message) { super(message); } public ObjectCreationException(String message, String identifier) { super(message, identifier); } public ObjectCreationException(String message, Throwable cause) { super(message, cause); } public ObjectCreationException(String message, String identifier, Throwable cause) { super(message, identifier, cause); } public ObjectCreationException(Throwable cause) { super(cause); } }
[ "jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
a4282140a74d6d6a35fbc7c95380c5aa530dbe20
fca6e069c335dc8442618e36d4c0f97ede2c6a06
/src/com/mixshare/rapid_evolution/data/submitted/filter/SubmittedFilterProfile.java
9ba08d864978b4bd394978df65b545b5b9405048
[]
no_license
divideby0/RapidEvolution3
127255648bae55e778321067cd7bb5b979684b2c
f04058c6abfe520442a75b3485147f570f7d538e
refs/heads/master
2020-03-22T00:56:26.188151
2018-06-30T20:41:26
2018-06-30T20:41:26
139,274,034
0
0
null
2018-06-30T19:19:57
2018-06-30T19:19:57
null
UTF-8
Java
false
false
1,118
java
package com.mixshare.rapid_evolution.data.submitted.filter; import java.util.Vector; import com.mixshare.rapid_evolution.data.profile.filter.FilterProfile; import com.mixshare.rapid_evolution.data.submitted.SubmittedHierarchicalProfile; import com.mixshare.rapid_evolution.ui.model.filter.FilterHierarchyInstance; import com.mixshare.rapid_evolution.ui.model.tree.TreeHierarchyInstance; /** * Abstracted ahead of time just in case... */ abstract public class SubmittedFilterProfile extends SubmittedHierarchicalProfile { ////////////////// // CONSTRUCTORS // ////////////////// public SubmittedFilterProfile() { super(); } public SubmittedFilterProfile(FilterProfile filterProfile) { super(filterProfile); } ///////////// // SETTERS // ///////////// public void setParentFilterInstances(Vector<FilterHierarchyInstance> parentInstances) { Vector<TreeHierarchyInstance> treeInstances = new Vector<TreeHierarchyInstance>(parentInstances.size()); for (FilterHierarchyInstance filterInstance : parentInstances) treeInstances.add(filterInstance); setParentInstances(treeInstances); } }
[ "jbickmore@gmail.com" ]
jbickmore@gmail.com
a1c08613b75df8de6f5ebf88f0f346649d53b1e2
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a136/A136297Test.java
b5f79fb8cfb214365995b8bffd070467c818abf7
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a136; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A136297Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
d7d772d0b2939b340b137084571e72f709a52477
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project75/src/main/java/org/gradle/test/performance75_4/Production75_373.java
7dd2642e5ad89294ffc5b193f7ed4f6554f6b0dc
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance75_4; public class Production75_373 extends org.gradle.test.performance16_4.Production16_373 { private final String property; public Production75_373() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f32690f30a981dbd1f01d295df85ef65ae6185fe
f551ac18a556af60d50d32a175c8037aa95ec3ac
/eop/com/enation/eop/processor/core/RequestWrapper.java
2f5543f955af5df56218207c190dc83b52f38c5b
[]
no_license
yexingf/cxcar
06dfc7b7970f09dae964827fcf65f19fa39d35d1
0ddcf144f9682fa2847b9a350be91cedec602c60
refs/heads/master
2021-05-15T05:40:04.396174
2018-01-09T09:46:18
2018-01-09T09:46:18
116,647,698
0
5
null
null
null
null
UTF-8
Java
false
false
1,120
java
package com.enation.eop.processor.core; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author kingapex * @version 1.0 * @created 11-十月-2009 16:20:08 */ public class RequestWrapper implements Request { protected Log logger = LogFactory.getLog(getClass()); protected Request request; /** * * @param request */ public RequestWrapper(Request request) { this.request = request; } /** * * @param uri * @param httpResponse * @param httpRequest */ @Override public Response execute(String uri, HttpServletResponse httpResponse, HttpServletRequest httpRequest) { return this.request.execute(uri, httpResponse, httpRequest); } /** * * @param uri */ @Override public Response execute(String uri) { return this.request.execute(uri); } public Request getRequest() { return this.request; } @Override public void setExecuteParams(Map<String, String> params) { this.request.setExecuteParams(params); } }
[ "274674758_ye@sina.com" ]
274674758_ye@sina.com
8f0fc617e2d420f29ac2a83d6ad6d3a7ea6525db
208ba847cec642cdf7b77cff26bdc4f30a97e795
/z/src/main/java/org.wp.z/models/ReaderUserList.java
ee65578d36a0ee6e00b34864fe3bc31ec146b30f
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
1,144
java
package org.wp.z.models; import org.json.JSONArray; import org.json.JSONObject; import java.util.ArrayList; public class ReaderUserList extends ArrayList<ReaderUser> { /* * returns all userIds in this list */ public ReaderUserIdList getUserIds() { ReaderUserIdList ids = new ReaderUserIdList(); for (ReaderUser user: this) ids.add(user.userId); return ids; } public int indexOfUserId(long userId) { for (int i = 0; i < this.size(); i++) { if (userId == this.get(i).userId) { return i; } } return -1; } /* * passed json is response from getting likes for a post */ public static ReaderUserList fromJsonLikes(JSONObject json) { ReaderUserList users = new ReaderUserList(); if (json==null) return users; JSONArray jsonLikes = json.optJSONArray("likes"); if (jsonLikes!=null) { for (int i=0; i < jsonLikes.length(); i++) users.add(ReaderUser.fromJson(jsonLikes.optJSONObject(i))); } return users; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f204825ae80da7959caad27e8adbe27a8acac45e
642e90aa1c85330cee8bbe8660ca277655bc4f78
/gameserver/src/main/java/l2s/gameserver/templates/premiumaccount/PremiumAccountBonus.java
09cc5e5e151c1b5644c841974bbb081abeed14eb
[]
no_license
BETAJIb/Studious
ac329f850d8c670d6e355ef68138c9e8fd525986
328e344c2eaa70238c403754566865e51629bd7b
refs/heads/master
2020-04-04T08:41:21.112223
2018-10-31T20:18:49
2018-10-31T20:18:49
155,790,706
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package l2s.gameserver.templates.premiumaccount; /** * @author Bonux **/ public class PremiumAccountBonus { private final double _enchantChance; private final double _craftChance; public PremiumAccountBonus(double enchantChance, double craftChance) { _enchantChance = enchantChance; _craftChance = craftChance; } public double getEnchantChance() { return _enchantChance; } public double getCraftChance() { return _craftChance; } }
[ "gladiadorse@hotmail.com" ]
gladiadorse@hotmail.com
76050d261ed385208123f254339087af595bb1ad
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13942-2-2-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/model/internal/reference/AbstractEntityReferenceResolver_ESTest_scaffolding.java
10590f0899e1f898269d47a928657957aad2a757
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
2,685
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 02 13:33:35 UTC 2020 */ package org.xwiki.model.internal.reference; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractEntityReferenceResolver_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.model.internal.reference.AbstractEntityReferenceResolver"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AbstractEntityReferenceResolver_ESTest_scaffolding.class.getClassLoader() , "org.xwiki.model.reference.EntityReferenceResolver", "org.xwiki.model.internal.reference.ExplicitStringEntityReferenceResolver", "org.xwiki.component.phase.Initializable", "org.xwiki.component.annotation.Component", "org.xwiki.model.reference.EntityReference", "org.xwiki.model.internal.reference.DefaultSymbolScheme$1", "org.xwiki.model.internal.reference.SymbolScheme", "org.xwiki.model.internal.reference.AbstractEntityReferenceResolver", "org.xwiki.model.internal.reference.AbstractStringEntityReferenceResolver", "org.xwiki.model.EntityType", "org.xwiki.component.phase.InitializationException", "org.xwiki.model.internal.reference.DefaultSymbolScheme" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
beffca6d544092798b2c226e1a4c4f48e72bde49
5ebf8e5463d207b5cc17e14cc51e5a1df135ccb9
/moe.apple/moe.platform.ios/src/main/java/apple/foundation/NSDimension.java
9bd3b31e5f7d5fbd9dc412bd7d188aea2a2bfef4
[ "ICU", "Apache-2.0", "W3C" ]
permissive
multi-os-engine-community/moe-core
1cd1ea1c2caf6c097d2cd6d258f0026dbf679725
a1d54be2cf009dd57953c9ed613da48cdfc01779
refs/heads/master
2021-07-09T15:31:19.785525
2017-08-22T10:34:50
2017-08-22T10:59:02
101,847,137
1
0
null
2017-08-30T06:43:46
2017-08-30T06:43:46
null
UTF-8
Java
false
false
5,847
java
/* Copyright 2014-2016 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package apple.foundation; import apple.NSObject; import apple.foundation.protocol.NSSecureCoding; import org.moe.natj.c.ann.FunctionPtr; import org.moe.natj.general.NatJ; import org.moe.natj.general.Pointer; import org.moe.natj.general.ann.Generated; import org.moe.natj.general.ann.Library; import org.moe.natj.general.ann.Mapped; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.general.ann.NInt; import org.moe.natj.general.ann.NUInt; import org.moe.natj.general.ann.Owned; import org.moe.natj.general.ann.Runtime; import org.moe.natj.general.ptr.VoidPtr; import org.moe.natj.objc.Class; import org.moe.natj.objc.ObjCRuntime; import org.moe.natj.objc.SEL; import org.moe.natj.objc.ann.ObjCClassBinding; import org.moe.natj.objc.ann.ProtocolClassMethod; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper; @Generated @Library("Foundation") @Runtime(ObjCRuntime.class) @ObjCClassBinding public class NSDimension extends NSUnit implements NSSecureCoding { static { NatJ.register(); } @Generated protected NSDimension(Pointer peer) { super(peer); } @Generated @Selector("accessInstanceVariablesDirectly") public static native boolean accessInstanceVariablesDirectly(); @Generated @Owned @Selector("alloc") public static native NSDimension alloc(); @Generated @Selector("allocWithZone:") @MappedReturn(ObjCObjectMapper.class) public static native Object allocWithZone(VoidPtr zone); @Generated @Selector("automaticallyNotifiesObserversForKey:") public static native boolean automaticallyNotifiesObserversForKey(String key); @Generated @Selector("baseUnit") @MappedReturn(ObjCObjectMapper.class) public static native Object baseUnit(); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:") public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:selector:object:") public static native void cancelPreviousPerformRequestsWithTargetSelectorObject( @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector, @Mapped(ObjCObjectMapper.class) Object anArgument); @Generated @Selector("classFallbacksForKeyedArchiver") public static native NSArray<String> classFallbacksForKeyedArchiver(); @Generated @Selector("classForKeyedUnarchiver") public static native Class classForKeyedUnarchiver(); @Generated @Selector("debugDescription") public static native String debugDescription_static(); @Generated @Selector("description") public static native String description_static(); @Generated @Selector("hash") @NUInt public static native long hash_static(); @Generated @Selector("instanceMethodForSelector:") @FunctionPtr(name = "call_instanceMethodForSelector_ret") public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector); @Generated @Selector("instanceMethodSignatureForSelector:") public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector); @Generated @Selector("instancesRespondToSelector:") public static native boolean instancesRespondToSelector(SEL aSelector); @Generated @Selector("isSubclassOfClass:") public static native boolean isSubclassOfClass(Class aClass); @Generated @Selector("keyPathsForValuesAffectingValueForKey:") public static native NSSet<String> keyPathsForValuesAffectingValueForKey(String key); @Generated @Owned @Selector("new") @MappedReturn(ObjCObjectMapper.class) public static native Object new_objc(); @Generated @Selector("resolveClassMethod:") public static native boolean resolveClassMethod(SEL sel); @Generated @Selector("resolveInstanceMethod:") public static native boolean resolveInstanceMethod(SEL sel); @Generated @Selector("setVersion:") public static native void setVersion_static(@NInt long aVersion); @Generated @Selector("superclass") public static native Class superclass_static(); @Generated @Selector("supportsSecureCoding") public static native boolean supportsSecureCoding(); @Generated @Selector("version") @NInt public static native long version_static(); @Generated @Selector("converter") public native NSUnitConverter converter(); @Generated @Selector("encodeWithCoder:") public native void encodeWithCoder(NSCoder aCoder); @Generated @Selector("init") public native NSDimension init(); @Generated @Selector("initWithCoder:") public native NSDimension initWithCoder(NSCoder aDecoder); @Generated @Selector("initWithSymbol:") public native NSDimension initWithSymbol(String symbol); @Generated @Selector("initWithSymbol:converter:") public native NSDimension initWithSymbolConverter(String symbol, NSUnitConverter converter); @Generated @ProtocolClassMethod("supportsSecureCoding") public boolean _supportsSecureCoding() { return supportsSecureCoding(); } }
[ "kristof.liliom@migeran.com" ]
kristof.liliom@migeran.com
d8a6cb9814f37bd22b8bd40ebdbbb520c2d800ef
f34602b407107a11ce0f3e7438779a4aa0b1833e
/professor/dvl/roadnet-client/src/main/java/org/datacontract/schemas/_2004/_07/roadnet_apex_server_services_wcfshared_datacontracts/TelematicsDeviceDimensionPropertyOptions.java
5bb2d4130177ae7c7e520db818657abbd0e81c61
[]
no_license
ggmoura/treinar_11836
a447887dc65c78d4bd87a70aab2ec9b72afd5d87
0a91f3539ccac703d9f59b3d6208bf31632ddf1c
refs/heads/master
2022-06-14T13:01:27.958568
2020-04-04T01:41:57
2020-04-04T01:41:57
237,103,996
0
2
null
2022-05-20T21:24:49
2020-01-29T23:36:21
Java
UTF-8
Java
false
false
4,466
java
package org.datacontract.schemas._2004._07.roadnet_apex_server_services_wcfshared_datacontracts; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import org.datacontract.schemas._2004._07.roadnet_apex_server_services.DomainEntityPropertyOptions; /** * <p>Classe Java de TelematicsDeviceDimensionPropertyOptions complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType name="TelematicsDeviceDimensionPropertyOptions"&gt; * &lt;complexContent&gt; * &lt;extension base="{http://schemas.datacontract.org/2004/07/Roadnet.Apex.Server.Services.DataTransferObjectMapping}DomainEntityPropertyOptions"&gt; * &lt;sequence&gt; * &lt;element name="CreatedInRegionIdentifier" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt; * &lt;element name="Description" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt; * &lt;element name="Identifier" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt; * &lt;element name="TelematicsProviderType_AccessoryType" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TelematicsDeviceDimensionPropertyOptions", propOrder = { "createdInRegionIdentifier", "description", "identifier", "telematicsProviderTypeAccessoryType" }) public class TelematicsDeviceDimensionPropertyOptions extends DomainEntityPropertyOptions { @XmlElement(name = "CreatedInRegionIdentifier") protected Boolean createdInRegionIdentifier; @XmlElement(name = "Description") protected Boolean description; @XmlElement(name = "Identifier") protected Boolean identifier; @XmlElement(name = "TelematicsProviderType_AccessoryType") protected Boolean telematicsProviderTypeAccessoryType; /** * Obtém o valor da propriedade createdInRegionIdentifier. * * @return * possible object is * {@link Boolean } * */ public Boolean isCreatedInRegionIdentifier() { return createdInRegionIdentifier; } /** * Define o valor da propriedade createdInRegionIdentifier. * * @param value * allowed object is * {@link Boolean } * */ public void setCreatedInRegionIdentifier(Boolean value) { this.createdInRegionIdentifier = value; } /** * Obtém o valor da propriedade description. * * @return * possible object is * {@link Boolean } * */ public Boolean isDescription() { return description; } /** * Define o valor da propriedade description. * * @param value * allowed object is * {@link Boolean } * */ public void setDescription(Boolean value) { this.description = value; } /** * Obtém o valor da propriedade identifier. * * @return * possible object is * {@link Boolean } * */ public Boolean isIdentifier() { return identifier; } /** * Define o valor da propriedade identifier. * * @param value * allowed object is * {@link Boolean } * */ public void setIdentifier(Boolean value) { this.identifier = value; } /** * Obtém o valor da propriedade telematicsProviderTypeAccessoryType. * * @return * possible object is * {@link Boolean } * */ public Boolean isTelematicsProviderTypeAccessoryType() { return telematicsProviderTypeAccessoryType; } /** * Define o valor da propriedade telematicsProviderTypeAccessoryType. * * @param value * allowed object is * {@link Boolean } * */ public void setTelematicsProviderTypeAccessoryType(Boolean value) { this.telematicsProviderTypeAccessoryType = value; } }
[ "gleidson.gmoura@gmail.com" ]
gleidson.gmoura@gmail.com
7458bcd4aba14b4d2b0a27fcbceac28fa511a64f
fc05322703594e40548f8e738449b9418efb7518
/src/main/java/org/basex/query/func/FileLineSeparator.java
469221cc85ba25226878b818a81d38bb5661f50a
[]
no_license
mauricioscastro/basex-lmdb
0028994871be99ec1f5d86738adfad18983d3046
bb8f32b800cb0f894c398c0019bc501196a1a801
refs/heads/master
2021-01-21T00:08:36.905964
2017-09-26T17:39:31
2017-09-26T17:39:31
41,042,448
1
1
null
2017-09-26T14:58:24
2015-08-19T15:24:11
Java
UTF-8
Java
false
false
400
java
package org.basex.query.func; import org.basex.query.*; import org.basex.query.value.item.*; import org.basex.util.*; /** * Function implementation. * * @author BaseX Team 2005-15, BSD License * @author Christian Gruen */ public final class FileLineSeparator extends StandardFunc { @Override public Item item(final QueryContext qc, final InputInfo ii) { return Str.get(Prop.NL); } }
[ "mauricioscastro@hotmail.com" ]
mauricioscastro@hotmail.com
c3951466d8da5f38eebfc69199d27c796c0472f4
104b421e536d1667a70f234ec61864f9278137c4
/code/com/appyjump/video/sdk/Const.java
582b2d67567e630f935b2f772e213a9506dd41be
[]
no_license
AshwiniVijayaKumar/Chrome-Cars
f2e61347c7416d37dae228dfeaa58c3845c66090
6a5e824ad5889f0e29d1aa31f7a35b1f6894f089
refs/heads/master
2021-01-15T11:07:57.050989
2016-05-13T05:01:09
2016-05-13T05:01:09
58,521,050
1
0
null
2016-05-11T06:51:56
2016-05-11T06:51:56
null
UTF-8
Java
false
false
1,075
java
package com.appyjump.video.sdk; public class Const { public static final int CONNECTION_TIMEOUT = 15000; public static final String ENCODING = "UTF-8"; public static final String HIDE_BORDER = "<style>* { -webkit-tap-highlight-color: rgba(0,0,0,0) }</style>"; public static final String IMAGE = "<body style='\"'margin: 0px; padding: 0px; text-align:center;'\"'><img src='\"'{0}'\"' width='\"'{1}'dp\"' height='\"'{2}'dp\"'/></body>"; public static final String PREFS_DEVICE_ID = "madserve_device_id"; public static final String PROTOCOL_VERSION = "3"; public static final String REDIRECT_URI = "REDIRECT_URI"; public static final String RESPONSE_ENCODING = "ISO-8859-1"; public static final int SOCKET_TIMEOUT = 15000; public static final String TAG = "mAdserve"; public static final int TOUCH_DISTANCE = 30; public static final String VERSION = "1.2"; } /* Location: C:\Users\ADMIN\Desktop\foss\dex2jar-2.0\classes-dex2jar.jar!\com\appyjump\video\sdk\Const.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ASH ABHI" ]
ASH ABHI
e20401301f133a6fe514e39db0536f804f40f540
504c10908089bc639ae8eb3fa6dd2ead2097c1f1
/src/com/SkyIsland/QuestManager/Quest/Requirements/RequirementUpdateEvent.java
94f7b629f2df947d019554e179362b97612392ed
[]
no_license
NMTMinecraftClub/QuestManager
96109c97ee584aa9b8449c1d959c2b9f43376868
62d601e119ddbbb638c5c826819e03bf583d765c
refs/heads/master
2021-05-31T06:52:46.964505
2016-01-18T02:52:52
2016-01-18T02:52:52
36,177,568
0
1
null
null
null
null
UTF-8
Java
false
false
1,421
java
package com.SkyIsland.QuestManager.Quest.Requirements; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; public class RequirementUpdateEvent extends Event { private static final HandlerList handlers = new HandlerList(); /** * Keeps track of the requirement that called the update */ private Requirement requirement; @Override public HandlerList getHandlers() { return handlers; } public static HandlerList getHandlerList() { return handlers; } /** * Creates an event with no requirement information.<br /> * This is typically only used when an entire system-wide update is needed.<br /> * To only call the neccessary and involved quests to update their information, * use the {@link #RequirementUpdateEvent(Requirement)} constructor instead. */ public RequirementUpdateEvent() { this(null); } /** * Constructs an event with given requirement information.<br /> * This event triggers an update of quests involved with the given requirement only. * @param requirement */ public RequirementUpdateEvent(Requirement requirement) { this.requirement = requirement; } /** * Returns the involved requirement, or null if none was passed on creation.<br /> * Events with <i>no requirement information</i> are expected to perform system-wide * updates and checks. * @return */ public Requirement getRequirement() { return requirement; } }
[ "skymanzanares@hotmail.com" ]
skymanzanares@hotmail.com
78273d044e4c7fca00919848aeb9274225098072
2e743d39b9928e352f1a8c7ecc33bf7c9f7481fb
/AE-Game/data/scripts/system/handlers/quest/pandaemonium/_4967GrowthNinissSecondCharm.java
3a90eb66fce9412857969b6b2db20670aa2b28fc
[]
no_license
webdes27/AionTypeZero
40461b3b99ae7ca229735889277e62eed4c5db7e
ff234a0a515c1155f18e61e5b5ba2afad7dfd8c9
refs/heads/master
2021-05-30T12:14:08.672390
2016-01-29T13:54:32
2016-01-29T13:54:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,358
java
/* * Copyright (c) 2015, TypeZero Engine (game.developpers.com) * 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 TypeZero Engine nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ package quest.pandaemonium; import org.typezero.gameserver.model.gameobjects.Npc; import org.typezero.gameserver.model.gameobjects.player.Player; import org.typezero.gameserver.questEngine.handlers.QuestHandler; import org.typezero.gameserver.model.DialogAction; import org.typezero.gameserver.questEngine.model.QuestEnv; import org.typezero.gameserver.questEngine.model.QuestState; import org.typezero.gameserver.questEngine.model.QuestStatus; /** * Talk with Maochinicherk (798068). Bring the Glossy Aether Paper (186000091) and Kinah (50000) to Ninis (798385). * * @author undertrey * @modified vlog */ public class _4967GrowthNinissSecondCharm extends QuestHandler { private final static int questId = 4967; public _4967GrowthNinissSecondCharm() { super(questId); } @Override public void register() { qe.registerQuestNpc(798385).addOnQuestStart(questId); qe.registerQuestNpc(798385).addOnTalkEvent(questId); qe.registerQuestNpc(798068).addOnTalkEvent(questId); } @Override public boolean onDialogEvent(QuestEnv env) { final Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); int targetId = 0; if (env.getVisibleObject() instanceof Npc) targetId = ((Npc) env.getVisibleObject()).getNpcId(); if (qs == null || qs.getStatus() == QuestStatus.NONE) { if (targetId == 798385) { // Ninis if (env.getDialog() == DialogAction.QUEST_SELECT) return sendQuestDialog(env, 1011); else return sendQuestStartDialog(env); } } else if (qs.getStatus() == QuestStatus.START) { int var = qs.getQuestVarById(0); switch (targetId) { case 798068: { // Maochinicherk switch (env.getDialog()) { case QUEST_SELECT: if (var == 0) return sendQuestDialog(env, 1352); case SETPRO1: return defaultCloseDialog(env, 0, 1, 182207137, 1, 0, 0); // 1 } break; } case 798385: // Ninis switch (env.getDialog()) { case QUEST_SELECT: if (var == 1) { removeQuestItem(env, 182207137, 1); return sendQuestDialog(env, 2375); } case CHECK_USER_HAS_QUEST_ITEM: long itemAmount = player.getInventory().getItemCountByItemId(186000091); if (var == 1 && itemAmount >= 1 && player.getInventory().tryDecreaseKinah(50000) ) { removeQuestItem(env, 186000091, 1); changeQuestStep(env, 1, 1, true); // reward return sendQuestDialog(env, 5); } else return sendQuestDialog(env, 2716); case FINISH_DIALOG: return defaultCloseDialog(env, 1, 1); } break; } } else if (qs.getStatus() == QuestStatus.REWARD) { if (targetId == 798385) { // Ninis return sendQuestEndDialog(env); } } return false; } }
[ "game.fanpage@gmail.com" ]
game.fanpage@gmail.com
2978a0be1b5f8411b0970011d591fd07dc9c1e7e
175e50a81d645686d895834624bfaa7c65c792a9
/support/cas-server-support-oauth/src/main/java/org/apereo/cas/config/CasOAuthComponentSerializationConfiguration.java
219417f6f81815fe3ea852779683498a8bf9873f
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
apple006/cas
a3533dc8d276994e7026aa5553a8da310cdbce50
2283bdf384aab8084e743e12e260b8ae7ecf421d
refs/heads/master
2020-05-18T01:34:54.678779
2019-04-29T12:44:07
2019-04-29T12:44:07
184,092,160
1
0
Apache-2.0
2019-04-29T15:01:13
2019-04-29T15:01:13
null
UTF-8
Java
false
false
2,003
java
package org.apereo.cas.config; import org.apereo.cas.ComponentSerializationPlan; import org.apereo.cas.ComponentSerializationPlanConfigurator; import org.apereo.cas.configuration.CasConfigurationProperties; import org.apereo.cas.support.oauth.services.OAuthRegisteredService; import org.apereo.cas.ticket.accesstoken.AccessTokenImpl; import org.apereo.cas.ticket.accesstoken.OAuthAccessTokenExpirationPolicy; import org.apereo.cas.ticket.code.OAuthCodeExpirationPolicy; import org.apereo.cas.ticket.code.OAuthCodeImpl; import org.apereo.cas.ticket.device.DeviceTokenImpl; import org.apereo.cas.ticket.device.DeviceUserCodeImpl; import org.apereo.cas.ticket.refreshtoken.OAuthRefreshTokenExpirationPolicy; import org.apereo.cas.ticket.refreshtoken.RefreshTokenImpl; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; /** * This is {@link CasOAuthComponentSerializationConfiguration}. * * @author Misagh Moayyed * @since 5.2.0 */ @Configuration("casOAuthComponentSerializationConfiguration") @EnableConfigurationProperties(CasConfigurationProperties.class) public class CasOAuthComponentSerializationConfiguration implements ComponentSerializationPlanConfigurator { @Override public void configureComponentSerializationPlan(final ComponentSerializationPlan plan) { plan.registerSerializableClass(OAuthAccessTokenExpirationPolicy.class); plan.registerSerializableClass(OAuthRefreshTokenExpirationPolicy.class); plan.registerSerializableClass(OAuthCodeExpirationPolicy.class); plan.registerSerializableClass(OAuthRegisteredService.class); plan.registerSerializableClass(OAuthCodeImpl.class); plan.registerSerializableClass(AccessTokenImpl.class); plan.registerSerializableClass(RefreshTokenImpl.class); plan.registerSerializableClass(DeviceTokenImpl.class); plan.registerSerializableClass(DeviceUserCodeImpl.class); } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
401ec7334d5559b688197e265475ee1083838f22
69ed18f94b2c1caf9742d983f5daf28f40614ca2
/SpringboardLtsBackend/src/com/bomwebportal/lts/dto/order/ServiceActionTypeDTO.java
605890e6d0260166a83e705c0b2cb01ecb71d1b8
[]
no_license
RodexterMalinao/springBoard
d1b4f9d2f7e76f63e2690f414863096e3e271369
aa4bf03395b12d923d28767e1561049c45ee3261
refs/heads/master
2020-09-03T07:21:15.415737
2019-12-16T07:12:22
2019-12-16T07:12:22
219,409,720
0
1
null
2019-12-16T07:12:23
2019-11-04T03:28:03
Java
UTF-8
Java
false
false
1,452
java
package com.bomwebportal.lts.dto.order; import java.io.Serializable; public class ServiceActionTypeDTO implements Serializable, Cloneable { private static final long serialVersionUID = -4870128083685629204L; private String wqType = null; private String wqSubtype = null; private String wqNatureId = null; private String suspendReaCdBom = null; private String offerGrpId = null; private String[] wqNatureRemarks = null; public String getWqType() { return wqType; } public void setWqType(String wqType) { this.wqType = wqType; } public String getWqSubtype() { return wqSubtype; } public void setWqSubtype(String wqSubtype) { this.wqSubtype = wqSubtype; } public String getWqNatureId() { return wqNatureId; } public void setWqNatureId(String wqNatureId) { this.wqNatureId = wqNatureId; } public String getSuspendReaCdBom() { return suspendReaCdBom; } public void setSuspendReaCdBom(String suspendReaCdBom) { this.suspendReaCdBom = suspendReaCdBom; } public String getOfferGrpId() { return offerGrpId; } public void setOfferGrpId(String offerGrpId) { this.offerGrpId = offerGrpId; } public String[] getWqNatureRemarks() { return this.wqNatureRemarks; } public void setWqNatureRemarks(String[] pWqNatureRemarks) { this.wqNatureRemarks = pWqNatureRemarks; } public Object clone() { try { return super.clone(); } catch(CloneNotSupportedException ex) { return this; } } }
[ "acer_08_06@yahoo.com" ]
acer_08_06@yahoo.com
1af9ab604b356ff4ab111f263ef4489a0d50877c
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/pd1421v_vivo20x5pro20v.java
3d3f604fcb9b1437ccecc5169e802fd9a456bc0f
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
223
java
// This file is automatically generated. package adila.db; /* * Vivo X5Pro V * * DEVICE: PD1421V * MODEL: vivo X5Pro V */ final class pd1421v_vivo20x5pro20v { public static final String DATA = "Vivo|X5Pro V|"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
5b78742895750d830b1902dee91a0acb7eb94e0e
a66838c6208c5960567d34b9cbbc3966752910dc
/core/src/main/java/com/cardpay/mgt/riskblack/dao/BlackCustomerMapper.java
8752fa88f63316f3aa060da7267edbe2e36cfe44
[]
no_license
JohnCny/PCCredit_New
9787ecc8900f2267e2e44b63245939f1655f2a89
442dfb46058c29b36182dca091da2b343d0720b7
refs/heads/master
2021-01-12T09:18:16.073367
2017-02-14T05:43:22
2017-02-14T05:43:22
76,819,691
0
2
null
2017-02-14T05:43:22
2016-12-19T02:04:17
Java
UTF-8
Java
false
false
523
java
package com.cardpay.mgt.riskblack.dao; import com.cardpay.basic.base.mapper.BasicMapper; import com.cardpay.mgt.riskblack.model.BlackCustomer; import com.cardpay.mgt.riskblack.model.vo.BlackCustomerVo; import java.util.List; import java.util.Map; public interface BlackCustomerMapper extends BasicMapper<BlackCustomer> { /** * 获取黑名单分页数据 * * @param map 参数map * @return 黑名单分页数据 */ List<BlackCustomerVo> blackCustomerPageList(Map<String, Object> map); }
[ "root" ]
root
777f05723169513feedcc956fb2e31d99ea55e41
417b0e3d2628a417047a7a70f28277471d90299f
/proxies/com/microsoft/bingads/v11/customermanagement/Name.java
6f47107718254668d6215ad01f8fb2af8b50eecf
[ "MIT" ]
permissive
jpatton14/BingAds-Java-SDK
30e330a5d950bf9def0c211ebc5ec677d8e5fb57
b928a53db1396b7e9c302d3eba3f3cc5ff7aa9de
refs/heads/master
2021-07-07T08:28:17.011387
2017-10-03T14:44:43
2017-10-03T14:44:43
105,914,216
0
0
null
2017-10-05T16:33:39
2017-10-05T16:33:39
null
UTF-8
Java
false
false
1,512
java
package com.microsoft.bingads.v11.customermanagement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Java class for Name simple type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;simpleType name="Name"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token"> * &lt;pattern value="\i\c*"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Name", namespace = "http://www.w3.org/2001/XMLSchema", propOrder = { "value" }) public class Name { @XmlValue @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "Name") protected String value; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } }
[ "baliu@microsoft.com" ]
baliu@microsoft.com
fceaaa043dc0d71fc29b65ef6bf0b3b93b28dd8f
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/3.0.1/code/base/dso-spring/src/com/tcspring/DistributableBeanFactory.java
3b3078d75cf7dc5b1f9c0d18322ac803266d5d6a
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
1,528
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tcspring; import java.util.List; import java.util.Map; /** * Mixin interface to encapsulate all state information for each <code>BeanFactory</code> instance. * * @author Jonas Bon&#233;r * @author Eugene Kuleshov */ public interface DistributableBeanFactory { public static final String PROTOTYPE = "prototype"; public static final String SINGLETON = "singleton"; boolean isClustered(); String getAppName(); String getId(); List getLocations(); List getSpringConfigHelpers(); // configuration details boolean isDistributedEvent(String className); boolean isDistributedBean(String beanName); boolean isDistributedField(String beanName, String name); boolean isDistributedSingleton(String beanName); boolean isDistributedScoped(String beanName); // initialization void addLocation(String location); /** * Register bean definitions * * @param beanMap map of <code>String</code> bean names to <code>AbstractBeanDefinition</code>. */ void registerBeanDefinitions(Map beanMap); // runtime BeanContainer getBeanContainer(ComplexBeanId beanId); BeanContainer putBeanContainer(ComplexBeanId beanId, BeanContainer container); BeanContainer removeBeanContainer(ComplexBeanId beanId); void initializeBean(ComplexBeanId beanId, Object bean, BeanContainer container); }
[ "foshea@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
foshea@7fc7bbf3-cf45-46d4-be06-341739edd864
78450747048a99b6f3fe7aa3d349335d9bb3f20b
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE571_Expression_Always_True/CWE571_Expression_Always_True__class_getClass_not_equal_01.java
238ee28293d9525064391e283337bfcc4bf10c6b
[]
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
1,512
java
/* * @description statement always evaluates to true * * */ package testcases.CWE571_Expression_Always_True; import testcasesupport.AbstractTestCase; import testcasesupport.IO; import java.security.SecureRandom; import java.util.Random; public class CWE571_Expression_Always_True__class_getClass_not_equal_01 extends AbstractTestCase { public void bad() { /* FLAW: always evaluates to true */ Random badRand = new Random(); SecureRandom goodRand = new SecureRandom(); if( !badRand.getClass().equals(goodRand.getClass()) ) { IO.writeLine("always prints"); } } public void good() { good1(); } private void good1() { Object objs[] = new Object [] {new Random(), new SecureRandom(), new SecureRandom()}; int n = ((SecureRandom)objs[1]).nextInt(3); /* FIX: may evaluate to true or false */ if( objs[1].getClass().equals(objs[n].getClass()) ) { IO.writeLine("sometimes prints"); } } /* 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
3bfc19a499ed7384a9dd4ac4927cab4c9b61b138
0429ec7192a11756b3f6b74cb49dc1ba7c548f60
/src/main/java/com/linkage/module/liposs/performance/bio/pefdef/PefDefByMidAndDescId.java
17e287c89575422da7f6e6677a3bc5125cc692f1
[]
no_license
lichao20000/WEB
5c7730779280822619782825aae58506e8ba5237
5d2964387d66b9a00a54b90c09332e2792af6dae
refs/heads/master
2023-06-26T16:43:02.294375
2021-07-29T08:04:46
2021-07-29T08:04:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,639
java
package com.linkage.module.liposs.performance.bio.pefdef; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * 通过中转表达式与描述表达式ID获取描述 * * @author Duangr * @version 1.0 * @since 2008-6-30 10:29:21 * @category PerDef * */ public class PefDefByMidAndDescId extends AbstractCommonPefDefImp { /** * 存放中间OID的采集数据 * <li>key: midOID的实例索引 * <li>value:索引对应的值 */ private Map<String, String> midMap = new HashMap<String, String>(); /** * 存放描述数据 * <li>key: descOID的实例索引 * <li>value:索引对应的值 */ private Map<String, String> descMap = new HashMap<String, String>(); /* * (non-Javadoc) * @see com.linkage.liposs.webtopo.common.pefdef.AbstractBasePefDefImp#getDescDataByExpression() */ protected void getDescDataByExpression() { getDescDataByMidAndDescOidSnmpWalk(device_id, readCom); } /** * 通过中间转换OID与描述OID来读取数据(snmpWalk方式) * * @param device_id * 设备ID * @param readCom * 读口令(实际没有作用) * @return 读取数据结果的标志位 * <li> 1: 成功 * <li>-32: middleoid采集到的索引不能完全包含性能oid采集到的索引 * <li>-33: describeoid采集到的索引不能完全包含middleoid采集到的值 * <li>-34: middleoid没有采集到值 * <li>-35: describeoid没有采集到值 */ private int getDescDataByMidAndDescOidSnmpWalk(String device_id, String readCom) { print("通过中间转换表达式<" + middleId + ">与描述表达式<" + descId + ">来采集描述信息 [ device_id =" + device_id + " ]"); int flag = 1; String midValue = null; String descValue = null; // 获取一个性能OID的实例MAP Map<String, String> instanceMap = dataMap.get(dataList.get(0)); // 获取中转OID采集到的数据 String midOID = getOnlyOidById(middleId); if (midOID != null) midMap = getDataByOID(midOID, device_id, readCom, false); if (midMap.size() == 0) { // 中转OID没有采集到数据 flag = -34; } print("通过{middleoid}采集到的值 midMap = " + midMap); // 获取描述OID采集到的数据 String descOID = getOnlyOidById(descId); if (descOID != null) descMap = getDataByOID(descOID, device_id, readCom, false); if (descMap.size() == 0) { // 描述OID没有采集到数据 flag = -35; } print("通过{describeoid}采集到的值 descMap = " + descMap); resultMap = new HashMap<String, String>(); // 性能OID采集出来的索引迭代对象 Iterator<String> instanceMapKeyIter = instanceMap.keySet().iterator(); while (instanceMapKeyIter.hasNext()) { String indexStr = instanceMapKeyIter.next(); if (midMap.containsKey(indexStr)) { // 找到中转OID采集到的值 midValue = (String) midMap.get(indexStr); // 把这个值作为索引去描述OID采集到的值中去找对应的值 descValue = (String) descMap.get(midValue); if (descValue != null) { resultMap.put(indexStr, descValue); } else { // describeoid采集到的索引不能完全包含middleoid采集到的值 flag = -33; // 江苏电信要把不一致的用索引代替 resultMap.put(indexStr, indexStr); } } else { // middleoid采集到的索引不能完全包含性能oid采集到的索引 flag = -32; // 江苏电信要把不一致的用索引代替 resultMap.put(indexStr, indexStr); } } print("采集结果集 resultMap = " + resultMap); return flag; } }
[ "di4zhibiao.126.com" ]
di4zhibiao.126.com
a0b46b9fcfb34ac0d5a505a675901fe20f705a93
0f889b82b1c6e3d9746dac298416be90baab244a
/restaurant-api/src/main/java/com/mycompany/restaurantapi/model/Dish.java
694524aa8b504a21dd5900cf7c0aca51b95a45fd
[]
no_license
VinodKandula/springboot-caching-neo4j
777aa729ce0b325f7b8887b2880bfc5ed875aab7
dfabcda80b3abe73407180b5317484c4cce8beb7
refs/heads/master
2023-06-05T17:50:28.106556
2021-06-16T11:49:36
2021-06-16T11:49:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
436
java
package com.mycompany.restaurantapi.model; import lombok.Data; import org.springframework.data.neo4j.core.schema.GeneratedValue; import org.springframework.data.neo4j.core.schema.Id; import org.springframework.data.neo4j.core.schema.Node; import java.math.BigDecimal; import java.util.UUID; @Data @Node public class Dish { @Id @GeneratedValue private UUID id; private String name; private BigDecimal price; }
[ "ivan.franchin@takeaway.com" ]
ivan.franchin@takeaway.com
c20761b36da8c9add73a512fca5376b5ae45edb5
ae9d4a11e296b53369e329727dcd6c01e1189448
/testing-libraries-overview/src/main/java/de/rieckpil/blog/ReviewValidation.java
278fec5a2091bf62b5879a15fd6e547a6c18e936
[ "MIT" ]
permissive
sneha1702/blog-tutorials
704a770a3146d1326a7059df64dd6f1dde112a99
8e68cc859aaeab9976bae411de423e959665ec59
refs/heads/master
2023-02-21T03:26:25.185724
2021-01-26T12:55:22
2021-01-26T12:55:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
302
java
package de.rieckpil.blog; public class ReviewValidation { public boolean titleMeetsQualityStandards(String reviewTitle) { if (reviewTitle.length() < 10) { return false; } if (reviewTitle.toLowerCase().contains("lorem ipsum")) { return false; } return true; } }
[ "mail@philipriecks.de" ]
mail@philipriecks.de
6c7523427bcd71cef43a3cf54c5199f41cc1457b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_148/Testnull_14762.java
7b09d24ff5727362055f23f90a9d062fffc63d86
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_148; import static org.junit.Assert.*; public class Testnull_14762 { private final Productionnull_14762 production = new Productionnull_14762("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
27a5f5e85b6c285f04f7dc54c77d85dd653c7a68
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2007-06-29/seasar2-2.4.14/s2-framework/src/test/java/org/seasar/framework/container/autoregister/InterfaceAspectAutoRegisterTest.java
7c650dcb37f6ae35aa053a36f183719d2836fd60
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
1,591
java
/* * Copyright 2004-2007 the Seasar Foundation and the Others. * * 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.seasar.framework.container.autoregister; import org.seasar.framework.container.ComponentDef; import org.seasar.framework.container.S2Container; import org.seasar.framework.unit.S2FrameworkTestCase; /** * @author higa */ public class InterfaceAspectAutoRegisterTest extends S2FrameworkTestCase { private S2Container child; /** * @throws Exception */ public void setUpRegisterAll() throws Exception { include("InterfaceAspectAutoRegisterTest.dicon"); } /** * @throws Exception */ public void testRegisterAll() throws Exception { ComponentDef cd = child.getComponentDef("foo"); assertEquals("1", 2, cd.getAspectDefSize()); Foo foo = (Foo) cd.getComponent(); assertEquals("2", "Hello", foo.greet()); ComponentDef cd2 = child.getComponentDef("foo2"); assertEquals("3", 0, cd2.getAspectDefSize()); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
185cf7b3fc496448e1179b9ea539a250d7655835
cf7c928d6066da1ce15d2793dcf04315dda9b9ed
/Baekjoon_Online_Judge/단계/08 기본 수학 1/Main_BOJ_2775_부녀회장이될테야.java
75dd95bb8e9246c10b789ef6cecb8e4bf45f949b
[]
no_license
refresh6724/APS
a261b3da8f53de7ff5ed687f21bb1392046c98e5
945e0af114033d05d571011e9dbf18f2e9375166
refs/heads/master
2022-02-01T23:31:42.679631
2021-12-31T14:16:04
2021-12-31T14:16:04
251,617,280
0
0
null
null
null
null
UTF-8
Java
false
false
815
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * https://www.acmicpc.net/problem/2775 */ public class Main_BOJ_2775_부녀회장이될테야 { // 제출일 2020-11-03 23:23 public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][] p = new int[15][15]; for (int i = 1; i < 15; i++) { p[0][i] = i; } for (int floor = 1; floor < 15; floor++) { for (int room = 1; room < 15; room++) { p[floor][room] = p[floor][room - 1] + p[floor - 1][room]; } } int TC = Integer.parseInt(br.readLine()); for (int i = 0; i < TC; i++) { int k = Integer.parseInt(br.readLine()); int n = Integer.parseInt(br.readLine()); System.out.println(p[k][n]); } } }
[ "refresh6724@gmail.com" ]
refresh6724@gmail.com
25722977ff82e6ff859ed270f6008f704ef0e914
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/tencent/im/oidb/cmd0x796/oidb_0x796$ReqBody.java
8aaf020b4bbed8c77a00c602aea23db710e0c9c7
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,582
java
package tencent.im.oidb.cmd0x796; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.pb.ByteStringMicro; import com.tencent.mobileqq.pb.MessageMicro; import com.tencent.mobileqq.pb.MessageMicro.FieldMap; import com.tencent.mobileqq.pb.PBBytesField; import com.tencent.mobileqq.pb.PBField; import com.tencent.mobileqq.pb.PBUInt32Field; import com.tencent.mobileqq.pb.PBUInt64Field; public final class oidb_0x796$ReqBody extends MessageMicro { static final MessageMicro.FieldMap __fieldMap__; public final PBBytesField feedsid = PBField.initBytes(ByteStringMicro.EMPTY); public oidb_0x796.ItemInfo stLastInfo = new oidb_0x796.ItemInfo(); public final PBUInt32Field uint32_seq = PBField.initUInt32(0); public final PBUInt32Field uint32_type = PBField.initUInt32(0); public final PBUInt64Field uint64_time = PBField.initUInt64(0L); public final PBUInt64Field uint64_uin = PBField.initUInt64(0L); static { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; ByteStringMicro localByteStringMicro = ByteStringMicro.EMPTY; __fieldMap__ = MessageMicro.initFieldMap(new int[] { 10, 16, 24, 32, 42, 48 }, new String[] { "feedsid", "uint64_time", "uint64_uin", "uint32_type", "stLastInfo", "uint32_seq" }, new Object[] { localByteStringMicro, Long.valueOf(0L), Long.valueOf(0L), Integer.valueOf(0), null, Integer.valueOf(0) }, ReqBody.class); } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\tencent\im\oidb\cmd0x796\oidb_0x796$ReqBody.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
9ec5408038a171de663f031ad885f095b2767db7
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/1420249/buggy-version/lucene/dev/branches/branch_4x/solr/contrib/uima/src/test/org/apache/solr/uima/ts/DummySentimentAnnotation_Type.java
9b75982a25bd6fbbc04f76e7e028df5676a6bc2e
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,844
java
/* First created by JCasGen Fri Mar 04 13:08:40 CET 2011 */ package org.apache.solr.uima.ts; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; import org.apache.uima.cas.impl.FeatureImpl; import org.apache.uima.cas.Feature; import org.apache.uima.jcas.tcas.Annotation_Type; /** * Updated by JCasGen Fri Mar 04 13:08:40 CET 2011 * @generated */ public class DummySentimentAnnotation_Type extends Annotation_Type { /** @generated */ protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (DummySentimentAnnotation_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = DummySentimentAnnotation_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new DummySentimentAnnotation(addr, DummySentimentAnnotation_Type.this); DummySentimentAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new DummySentimentAnnotation(addr, DummySentimentAnnotation_Type.this); } }; /** @generated */ public final static int typeIndexID = DummySentimentAnnotation.typeIndexID; /** @generated @modifiable */ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.solr.uima.ts.SentimentAnnotation"); /** @generated */ final Feature casFeat_mood; /** @generated */ final int casFeatCode_mood; /** @generated */ public String getMood(int addr) { if (featOkTst && casFeat_mood == null) jcas.throwFeatMissing("mood", "org.apache.solr.uima.ts.SentimentAnnotation"); return ll_cas.ll_getStringValue(addr, casFeatCode_mood); } /** @generated */ public void setMood(int addr, String v) { if (featOkTst && casFeat_mood == null) jcas.throwFeatMissing("mood", "org.apache.solr.uima.ts.SentimentAnnotation"); ll_cas.ll_setStringValue(addr, casFeatCode_mood, v);} /** initialize variables to correspond with Cas Type and Features * @generated */ public DummySentimentAnnotation_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); casFeat_mood = jcas.getRequiredFeatureDE(casType, "mood", "uima.cas.String", featOkTst); casFeatCode_mood = (null == casFeat_mood) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_mood).getCode(); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
0afe93ec6a52942734c9d780d97332ba704b7ddb
9be0baa3d53e460fb9088280b2f38d6352a4097e
/src/java/diagapplet/PlotTracker.java
14edb18953f414e4dfad4ef14c2e638d382c13d9
[ "LicenseRef-scancode-public-domain" ]
permissive
usnistgov/rcslib
480cd9f97b9abe83c23dcddc1dd4db253084ff13
f26d07fd14e068a1a5bfb97b0dc6ba5afefea0a1
refs/heads/master
2023-04-06T13:35:53.884499
2023-04-03T20:01:08
2023-04-03T20:01:08
32,079,125
35
22
NOASSERTION
2020-10-12T22:03:48
2015-03-12T13:43:52
Java
UTF-8
Java
false
false
4,184
java
/* The NIST RCS (Real-time Control Systems) library is protected domain software, however it is preferred that the following disclaimers be attached. Software Copywrite/Warranty Disclaimer This software was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the protected domain. NIST Real-Time Control System software is an experimental system. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. We would appreciate acknowledgement if the software is used. This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modifiedS versions bear some notice that they have been modified. */ package diagapplet; import diagapplet.plotter.PlotData; import diagapplet.CodeGen.ModuleInfo; import diagapplet.CodeGen.BufferInfo; /* * * PlotTracker * */ class PlotTracker { protected String structName=null; protected String varName=null; protected long msg_type; protected ModuleInfo module = null; protected int var_number = 0; protected boolean is_cmd_value = false; protected boolean is_aux_channel = false; protected BufferInfo auxBufferInfo = null; protected String aux_channel_name = null; protected PlotData plot_data; protected boolean array_type=false; protected int min_var_num=0; protected int max_var_num=0; protected int skip_size=0; protected boolean ndla=false; protected int ndla_length_var_num=0; protected int cur_ndla_len=0; protected int cur_max_var_num=0; protected int array_size; protected boolean using_nml_single_var_log=false; protected int nml_single_var_log_number=-1; protected rcs.nml.NMLConnectionInterface nml_for_get_single_var_log=null; protected double last_x; protected double last_y; protected double mean; protected double stddev; protected double integral; protected double derivmean; protected int point_count; protected int last_compare_index; protected String single_var_log_name=null; protected boolean need_nml_single_var_log_resetup=false; protected boolean cur_ndla_len_var_found=false; protected String vname=null; protected boolean updated=false; protected int last_new_data_count; protected String name; protected long last_reconnect_time_millis=0; PlotTracker() { last_reconnect_time_millis = System.currentTimeMillis(); } public String toString() { try { String s = super.toString()+"\n"; s += "\t{\n"; s += "\tmsg_type="+msg_type+",\n"; s += "\tvar_number="+var_number+",\n"; s += "\tis_cmd_value="+is_cmd_value+",\n"; s += "\tis_aux_channel="+is_aux_channel+",\n"; s += "\tarray_type="+array_type+",\n"; s += "\tmin_var_num="+min_var_num+",\n"; s += "\tmax_var_num="+max_var_num+",\n"; s += "\tskip_size="+skip_size+",\n"; s += "\tndla="+ndla+",\n"; s += "\tndla_length_var_num="+ndla_length_var_num + ",\n"; s += "\tcur_ndla_len="+cur_ndla_len+",\n"; s += "\tcur_ndla_len_var_found="+cur_ndla_len_var_found+",\n"; s += "\tcur_max_var_num="+cur_max_var_num+",\n"; s += "\tusing_nml_single_var_log="+using_nml_single_var_log+",\n"; s += "\tnml_single_var_log_number="+ nml_single_var_log_number+",\n"; s += "\tnml_for_get_single_var_log="+nml_for_get_single_var_log+", single_var_log_name="+single_var_log_name+"\n"; if(module != null) { s+= " module.Name="+module.Name+","; } if(plot_data != null) { s+= " plot_data.name="+plot_data.name; } s += "\n"; s += "plot_data= {\n\t"+plot_data+"\n},\n"; s += "\n"; s += "auxBufferInfo= {\n\t"+auxBufferInfo+"\n}\n"; s += "\n"; s +="} "; return s; } catch(Exception e) { e.printStackTrace(); } return ""; } }
[ "william.shackleford@nist.gov" ]
william.shackleford@nist.gov
b282270738456dfe1db9659035d72cb0e7b54ec0
c6c123f7c0ac0a9689ea34721f64d8e340a08c7d
/src/test/java/com/codeborne/selenide/drivercommands/LazyDriverTest.java
94c0ccc541854bedef0eac59de0353ece24d280e
[ "MIT", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-free-unknown" ]
permissive
Antonppavlov/selenide
582ee5cebe6aca72e3ee1ea8bd629f8db4a47132
92f15e253a54569cebdb919fcb08275d17256bd4
refs/heads/master
2023-02-22T14:36:01.182984
2021-01-21T11:00:44
2021-01-21T11:00:44
302,486,829
0
0
MIT
2020-10-08T23:47:06
2020-10-08T23:47:05
null
UTF-8
Java
false
false
4,346
java
package com.codeborne.selenide.drivercommands; import com.codeborne.selenide.Config; import com.codeborne.selenide.impl.DummyFileNamer; import com.codeborne.selenide.webdriver.WebDriverFactory; import org.assertj.core.api.WithAssertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openqa.selenium.Proxy; import org.openqa.selenium.WebDriver; import java.io.File; import static java.util.Collections.emptyList; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.isNull; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; final class LazyDriverTest implements WithAssertions { private final Config config = mock(Config.class); private final WebDriver webdriver = mock(WebDriver.class); private final WebDriverFactory factory = mock(WebDriverFactory.class); private final BrowserHealthChecker browserHealthChecker = mock(BrowserHealthChecker.class); private final CreateDriverCommand createDriverCommand = new CreateDriverCommand(new DummyFileNamer("123_456_78")); private final CloseDriverCommand closeDriverCommand = new CloseDriverCommand(); private LazyDriver driver; @BeforeEach void mockLogging() { when(config.downloadsFolder()).thenReturn("build/down"); when(config.reopenBrowserOnFail()).thenReturn(true); when(config.proxyEnabled()).thenReturn(true); driver = new LazyDriver(config, null, emptyList(), factory, browserHealthChecker, createDriverCommand, closeDriverCommand); } @BeforeEach void setUp() { doReturn(webdriver).when(factory).createWebDriver(any(), any(), any()); doReturn(webdriver).when(factory).createWebDriver(any(), isNull(), any()); } @Test void createWebDriverWithoutProxy() { when(config.proxyEnabled()).thenReturn(false); driver.createDriver(); verify(factory).createWebDriver(config, null, new File("build/down/123_456_78").getAbsoluteFile()); } @Test void createWebDriverWithSelenideProxyServer() { when(config.proxyEnabled()).thenReturn(true); driver.createDriver(); assertThat(driver.getProxy()).isNotNull(); verify(factory).createWebDriver(config, driver.getProxy().createSeleniumProxy(), new File("build/down/123_456_78").getAbsoluteFile()); } @Test void checksIfBrowserIsStillAlive() { givenOpenedBrowser(); when(config.reopenBrowserOnFail()).thenReturn(true); assertThat(driver.getAndCheckWebDriver()).isEqualTo(webdriver); verify(browserHealthChecker).isBrowserStillOpen(any()); } @Test void doesNotReopenBrowserIfItFailed() { givenOpenedBrowser(); when(config.reopenBrowserOnFail()).thenReturn(false); assertThat(driver.getAndCheckWebDriver()).isEqualTo(webdriver); verify(browserHealthChecker, never()).isBrowserStillOpen(any()); } @Test void getWebDriver_throwsException_ifBrowserIsNotOpen() { assertThatThrownBy(() -> driver.getWebDriver()) .isInstanceOf(IllegalStateException.class) .hasMessageStartingWith("No webdriver is bound to current thread") .hasMessageEndingWith("You need to call open(url) first."); } @Test void getWebDriver_throwsException_ifBrowserHasBeenClosed() { driver.getAndCheckWebDriver(); driver.close(); assertThatThrownBy(() -> driver.getWebDriver()) .isInstanceOf(IllegalStateException.class) .hasMessageStartingWith("Webdriver has been closed") .hasMessageEndingWith("You need to call open(url) to open a browser again."); } @Test void closeWebDriver() { when(config.holdBrowserOpen()).thenReturn(false); when(config.proxyEnabled()).thenReturn(true); driver = new LazyDriver(config, mockProxy("selenide:0"), emptyList(), factory, browserHealthChecker, createDriverCommand, closeDriverCommand); givenOpenedBrowser(); driver.close(); assertThat(driver.hasWebDriverStarted()).isFalse(); } private Proxy mockProxy(String httpProxy) { Proxy mockedProxy = mock(Proxy.class); when(mockedProxy.getHttpProxy()).thenReturn(httpProxy); return mockedProxy; } private void givenOpenedBrowser() { assertThat(driver.getAndCheckWebDriver()).isSameAs(webdriver); } }
[ "andrei.solntsev@gmail.com" ]
andrei.solntsev@gmail.com
f657699a1d1d954cbbd1be4d78fb5a292b103581
9b5cbbd0d0703b274b752a6eed14af64f85f884a
/src/core/src/test/java/org/apache/struts2/interceptor/CreateSessionInterceptorTest.java
2af78a1d5fd45e6d3b801bece1780ba633b6f6da
[ "Apache-2.0" ]
permissive
Iletee/struts2-showcase-demo
00bae82c7723611a802e4101fc0cf1b390169634
9a8d781db5d3fa41ea435d5efd3160d0adb8e209
refs/heads/master
2021-09-16T22:41:30.732315
2018-06-18T11:06:03
2018-06-18T11:06:03
104,106,137
0
4
Apache-2.0
2018-06-18T11:01:40
2017-09-19T17:30:01
Java
UTF-8
Java
false
false
2,123
java
/* * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.interceptor; import com.opensymphony.xwork2.mock.MockActionInvocation; import org.apache.struts2.ServletActionContext; import org.apache.struts2.StrutsInternalTestCase; import org.jmock.Mock; import org.jmock.core.constraint.IsEqual; import org.jmock.core.matcher.InvokeOnceMatcher; import javax.servlet.http.HttpServletRequest; /** * Test case for CreateSessionInterceptor. * */ public class CreateSessionInterceptorTest extends StrutsInternalTestCase { public void testCreateSession() throws Exception { Mock httpServletRequestMock = new Mock(HttpServletRequest.class); httpServletRequestMock.expects(new InvokeOnceMatcher()).method("getSession").with(new IsEqual(Boolean.FALSE)); httpServletRequestMock.expects(new InvokeOnceMatcher()).method("getSession").with(new IsEqual(Boolean.TRUE)); httpServletRequestMock.expects(new InvokeOnceMatcher()).method("getSession").with(new IsEqual(Boolean.FALSE)); HttpServletRequest request = (HttpServletRequest) httpServletRequestMock.proxy(); ServletActionContext.setRequest(request); CreateSessionInterceptor interceptor = new CreateSessionInterceptor(); interceptor.intercept(new MockActionInvocation()); httpServletRequestMock.verify(); } }
[ "iturunen@sonatype.com" ]
iturunen@sonatype.com
bbd19f5839e0ac8988a87becd4b56495c8721eaa
7a21ff93edba001bef328a1e927699104bc046e5
/project-parent/auth-parent/cas-server/src/main/java/com/dotop/smartwater/project/auth/cache/EnterpriseRoleCacheDao.java
7444abe1037eec0d1d068798a35530f363d4ff99
[]
no_license
150719873/zhdt
6ea1ca94b83e6db2012080f53060d4abaeaf12f5
c755dacdd76b71fd14aba5e475a5862a8d92c1f6
refs/heads/master
2022-12-16T06:59:28.373153
2020-09-14T06:57:16
2020-09-14T06:57:16
299,157,259
1
0
null
2020-09-28T01:45:10
2020-09-28T01:45:10
null
UTF-8
Java
false
false
1,329
java
package com.dotop.smartwater.project.auth.cache; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.dotop.smartwater.dependence.cache.StringValueCache; import com.dotop.smartwater.dependence.core.utils.JSONUtils; import com.dotop.smartwater.project.module.core.auth.vo.RolePermissionVo; /** * * @date 2019年5月9日 * @description */ @Component public class EnterpriseRoleCacheDao { private static final Logger LOGGER = LogManager.getLogger(EnterpriseRoleCacheDao.class); private static final String KEY = "auth:role:enterprise:"; private static final int TIME = 60 * 60 * 24 * 180; @Autowired private StringValueCache svc; public void setEnterpriseRole(RolePermissionVo rolePermission) { try { if (rolePermission == null) { return; } svc.set(KEY + rolePermission.getRoleid(), JSONUtils.toJSONString(rolePermission), TIME); } catch (Exception e) { LOGGER.error("setEnterpriseRole", e); } } public RolePermissionVo getEnterpriseRole(String roleId) { try { return JSONUtils.parseObject(svc.get(KEY + roleId), RolePermissionVo.class); } catch (Exception e) { LOGGER.error("getEnterpriseRole", e); return null; } } }
[ "2216502193@qq.com" ]
2216502193@qq.com
8925ac53a4098c55e225bf3ef03c1a657c817ebb
4c19b724f95682ed21a82ab09b05556b5beea63c
/XMSYGame/java2/server/zxyy-calculate/src/main/java/com/xmsy/server/zxyy/calculate/common/validator/group/QcloudGroup.java
18c8208a57c34d75b111639acab4dd2e79a523a6
[]
no_license
angel-like/angel
a66f8fda992fba01b81c128dd52b97c67f1ef027
3f7d79a61dc44a9c4547a60ab8648bc390c0f01e
refs/heads/master
2023-03-11T03:14:49.059036
2022-11-17T11:35:37
2022-11-17T11:35:37
222,582,930
3
5
null
2023-02-22T05:29:45
2019-11-19T01:41:25
JavaScript
UTF-8
Java
false
false
178
java
package com.xmsy.server.zxyy.calculate.common.validator.group; /** * 腾讯云 * @author aleng * @email xxxxxx * @date 2017-03-28 13:51 */ public interface QcloudGroup { }
[ "163@qq.com" ]
163@qq.com
2a3ef4af6e96931a3a58d11430b6597f3ee83bd6
515424ebdcdff4509e015f47359d8220b8b0423e
/src/test/java/com/lovecws/mumu/avro/jmh/JMHSerialize.java
73b8867c4db8fa55319ab18442a9430921131a15
[ "Apache-2.0" ]
permissive
TonyJava/mumu-avro
79d5a993572e1465ccd9eefe82d69b75b6a3d3c1
c5d2aa4184456c1501a06025e18633f22c5a1f95
refs/heads/master
2021-07-12T22:23:59.715335
2017-10-18T02:17:41
2017-10-18T02:17:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,779
java
package com.lovecws.mumu.avro.jmh; import com.alibaba.fastjson.JSON; import com.lovecws.mumu.avro.news.SinaFinanceNewsParser; import com.lovecws.mumu.avro.parser.AvroParser; import org.apache.avro.Schema; import org.apache.avro.generic.GenericData; import org.apache.avro.generic.GenericDatumWriter; import org.apache.avro.generic.GenericRecord; import org.apache.avro.io.BinaryEncoder; import org.apache.avro.io.DatumWriter; import org.apache.avro.io.EncoderFactory; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; import java.io.*; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * @author babymm * @version 1.0-SNAPSHOT * @Description: TODO * @date 2017-10-18 9:41 */ public class JMHSerialize { private static Schema schema = new AvroParser().schema("SinaFinanceNewsPair.avsc"); private static final String JAVA_CLASSPATH = SinaFinanceNewsParser.class.getResource("/").getPath(); private static final DatumWriter<GenericRecord> writer = new GenericDatumWriter<GenericRecord>(schema); private static List<GenericRecord> records = new ArrayList<GenericRecord>(); static { try { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(new File(JAVA_CLASSPATH + "financeNews.json")))); String readLine = null; while ((readLine = bufferedReader.readLine()) != null) { if (readLine == null) { continue; } Map map = JSON.parseObject(readLine, Map.class); GenericRecord record = new GenericData.Record(schema); record.put("htitle", map.get("htitle")); record.put("keywords", map.get("keywords")); record.put("description", map.get("description")); record.put("url", map.get("url")); record.put("sumary", map.get("sumary")); record.put("content", map.get("content")); record.put("logo", map.get("logo")); record.put("title", map.get("title")); record.put("pubDate", map.get("pubDate")); record.put("mediaName", map.get("mediaName")); record.put("mediaUrl", map.get("mediaUrl")); record.put("category", map.get("category")); record.put("type", map.get("type")); records.add(record); } } catch (IOException e) { e.printStackTrace(); } } @Benchmark @BenchmarkMode(Mode.All) public void serialize() throws IOException { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); BinaryEncoder encoder = EncoderFactory.get().binaryEncoder(byteArrayOutputStream, null); for (GenericRecord record : records) { writer.write(record, encoder); } //byte[] bytes = byteArrayOutputStream.toByteArray(); encoder.flush(); //System.out.println(bytes.length); } public static void main(String[] args) { Options options = new OptionsBuilder() .include(JMHSerialize.class.getSimpleName()+".serialize") .threads(1) .forks(1) .measurementIterations(10) .warmupIterations(10) .build(); try { new Runner(options).run(); } catch (RunnerException e) { e.printStackTrace(); } } }
[ "lovercws@gmail.com" ]
lovercws@gmail.com
67928d09a886a0b4f83b885fa46d47868828c26e
06bb62b24dacb5707b565e9537676dc29933efae
/src/fr/adrienbrault/idea/symfony2plugin/templating/dict/TwigCreateContainer.java
6df8cb2a68432576be5cd56c4b2d084a8bdcd588
[ "MIT" ]
permissive
ahurt2000/idea-php-symfony2-plugin
685b83f7bb5cac020dc1b96be0630aa8e800eda8
de0fe4da912eac798055b9196a109fdf32518f26
refs/heads/master
2020-12-29T03:20:02.208709
2016-06-30T13:16:28
2016-06-30T13:16:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,053
java
package fr.adrienbrault.idea.symfony2plugin.templating.dict; import org.jetbrains.annotations.Nullable; import java.util.*; public class TwigCreateContainer { private Map<String, Integer> extendHap = new HashMap<String, Integer>(); private Map<String, Integer> blockHap = new HashMap<String, Integer>(); public void addExtend(String extend) { if(extendHap.containsKey(extend)) { extendHap.put(extend, extendHap.get(extend) + 1); } else { extendHap.put(extend, 1); } } public void addBlock(String block) { if(blockHap.containsKey(block)) { blockHap.put(block, blockHap.get(block) + 1); } else { blockHap.put(block, 1); } } @Nullable public String getExtend() { Map<String, Integer> extendsMap = this.getExtends(); return extendsMap.size() > 0 ? extendsMap.keySet().iterator().next() : null; } public Map<String, Integer> getExtends() { return sortByValue(extendHap); } public Map<String, Integer> getBlocks() { return sortByValue(blockHap); } public Collection<String> getBlockNames(int limit) { List<String> strings = new ArrayList<String>(getBlocks().keySet()); if(strings.size() > limit) { strings = strings.subList(0, limit); } return strings; } private static <K, V extends Comparable<? super V>> Map<K, V> sortByValue(Map<K, V> map ) { List<Map.Entry<K, V>> list = new LinkedList<Map.Entry<K, V>>( map.entrySet() ); Collections.sort(list, new Comparator<Map.Entry<K, V>>() { public int compare(Map.Entry<K, V> o1, Map.Entry<K, V> o2) { return (o1.getValue()).compareTo(o2.getValue()); } }); Collections.reverse(list); Map<K, V> result = new LinkedHashMap<K, V>(); for (Map.Entry<K, V> entry : list) { result.put( entry.getKey(), entry.getValue() ); } return result; } }
[ "espendiller@gmx.de" ]
espendiller@gmx.de
33af4ef81571cb08e699a8b27de36d6a199c8ebf
f87803449f234b29b2256d1dafab3331e9d63cbf
/cloud-provider-consul-payment-8004/src/main/java/org/jliang/apps/cloud/controller/PaymentController.java
52992d285ab8231e21e8f462f54ba1ca44db5776
[]
no_license
ky2009888/spring_cloud_project_all_custom_demo
eb0bc912d1c0e0c61ab434c51cebc45a633126bb
e526747f06dab053f782d72c3024f17ea24369cb
refs/heads/master
2022-08-02T02:11:01.122492
2020-04-05T09:43:33
2020-04-05T09:43:33
246,742,670
3
0
null
2022-06-21T02:58:20
2020-03-12T04:22:52
Java
UTF-8
Java
false
false
3,097
java
package org.jliang.apps.cloud.controller; import lombok.extern.slf4j.Slf4j; import org.jliang.apps.cloud.entity.CommonResult; import org.jliang.apps.cloud.entity.Payment; import org.jliang.apps.cloud.service.PaymentService; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; /** * (Payment)表控制层 * * @author makejava * @since 2020-03-13 10:24:56 */ @RestController @RequestMapping("payment") @Slf4j public class PaymentController { /** * 服务对象 */ @Resource private PaymentService paymentService; /** * 定义端口号 */ @Value("${server.port}") private String port; /** * 服务发现和注册. */ @Resource private DiscoveryClient discoveryClient; /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @GetMapping("selectOne") public CommonResult<Payment> selectOne(Long id) { log.info("查询数据成功"); Payment payment = this.paymentService.queryById(id); log.info("数据查询结束了"); if (payment != null) { return new CommonResult<Payment>(200, "查询成功,port:" + port, payment); } else { return new CommonResult<Payment>(200, "未查询到主键" + id + "对应的数据,port:" + port, payment); } } /** * 添加数据到数据库 * * @param payment 支付对象 * @return CommonResult<Payment> 请求响应对象 */ @PostMapping("addPayment") public CommonResult<Payment> addPayment(Payment payment) { log.info("插入数据成功"); Payment paymentResult = this.paymentService.insert(payment); if (paymentResult.getId() > 0) { return new CommonResult<Payment>(200, "添加数据成功,port:" + port, paymentResult); } else { return new CommonResult<Payment>(404, "添加数据失败,port:" + port, paymentResult); } } /** * 返回服务发现的信息 * * @return Object */ @GetMapping("discoveryInfo") public Object discoveryInfo() { List<String> services = discoveryClient.getServices(); for (String element : services ) { log.info("****************element:{}", element); } List<ServiceInstance> instances = discoveryClient.getInstances("CLOUD-PROVIDER-PAYMENT"); for (ServiceInstance service : instances ) { log.info("{},{},{},{},{}", service.getHost(), service.getInstanceId(), service.getUri(), service.getPort(), service.getScheme()); } return discoveryClient; } }
[ "ji_jinliang2012@163.com" ]
ji_jinliang2012@163.com
4fc334597616c6f490d0dce1334279cdfa1736b3
afb4a7b115599c13dd5ec604cacc68f45a8f9032
/src/main/java/com/prj/money/api/resource/LancamentoResource.java
0cc8347369989ea82475de48150cb86f305e8958
[]
no_license
vitorfelipep/money-api
5bbac5cbf5248885e74904cefa03c5346d89c37f
ceb2986ecc90a179771558d3d00774b86e5d67ff
refs/heads/master
2021-01-20T12:11:22.977496
2018-05-27T16:27:39
2018-05-27T16:27:39
101,702,560
0
0
null
null
null
null
UTF-8
Java
false
false
4,254
java
package com.prj.money.api.resource; import java.util.Arrays; import java.util.List; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; import com.prj.money.api.event.RecursoCriadoEvent; import com.prj.money.api.exceptionhandler.MoneyExcptionHandler.Erro; import com.prj.money.api.model.Lancamento; import com.prj.money.api.repository.LancamentoRepository; import com.prj.money.api.repository.filter.LancamentoFilter; import com.prj.money.api.repository.projection.ResumoLancamento; import com.prj.money.api.service.LancamentoService; import com.prj.money.api.service.exception.PessoaInexistenteOuInativaException; @RestController @RequestMapping("/lancamentos") public class LancamentoResource { @Autowired private LancamentoRepository lancamentoRepository; @Autowired private LancamentoService lancamentoService; @Autowired private ApplicationEventPublisher publisher; @Autowired private MessageSource messageSource; @GetMapping @PreAuthorize("hasAuthority('ROLE_PESQUISAR_LANCAMENTO') and #oauth2.hasScope('read')") public Page<Lancamento> pesquisar(LancamentoFilter lancamentoFilter, Pageable pageAble ) { return lancamentoRepository.filtrar(lancamentoFilter, pageAble); } @GetMapping(params = "resumo") @PreAuthorize("hasAuthority('ROLE_PESQUISAR_LANCAMENTO') and #oauth2.hasScope('read')") public Page<ResumoLancamento> resumirLancamento(LancamentoFilter lancamentoFilter, Pageable pageAble ) { return lancamentoRepository.resumir(lancamentoFilter, pageAble); } @GetMapping("/{codigo}") @PreAuthorize("hasAuthority('ROLE_PESQUISAR_LANCAMENTO') and #oauth2.hasScope('read')") public ResponseEntity<Lancamento> buscarPorId(@PathVariable Long codigo) { Lancamento lancamento = lancamentoRepository.findOne(codigo); return lancamento != null ? ResponseEntity.ok().body(lancamento) : ResponseEntity.notFound().build(); } @PostMapping @PreAuthorize("hasAuthority('ROLE_CADASTRAR_LANCAMENTO') and #oauth2.hasScope('write')") public ResponseEntity<Lancamento> criar(@Valid @RequestBody Lancamento lancamento, HttpServletResponse response) { Lancamento lancamentoSalvo = lancamentoService.salvar(lancamento); publisher.publishEvent(new RecursoCriadoEvent(this, response, lancamentoSalvo.getCodigo())); return ResponseEntity.status(HttpStatus.CREATED).body(lancamentoSalvo); } @ExceptionHandler( { PessoaInexistenteOuInativaException.class } ) public ResponseEntity<Object> handlePessoaInexistenteOuInativaException(PessoaInexistenteOuInativaException ex) { String mensagemUsuario = messageSource.getMessage("pessoa.inexistente-ou-inativa",null, LocaleContextHolder.getLocale()); String mensagemDesenvolvedor = ex.toString(); List<Erro> erros = Arrays.asList(new Erro(mensagemUsuario, mensagemDesenvolvedor)); return ResponseEntity.badRequest().body(erros); } @DeleteMapping("/{codigo}") @PreAuthorize("hasAuthority('ROLE_CADASTRAR_LANCAMENTO') and #oauth2.hasScope('write')") @ResponseStatus(HttpStatus.NO_CONTENT) public void deletar(@PathVariable Long codigo) { lancamentoRepository.delete(codigo); } }
[ "vitorfelipep@gmail.com" ]
vitorfelipep@gmail.com
29deff79443398e3c5f54efb203853f9240e023a
8a89fb4e5c45ee532311866c9ed37546a9b5cabd
/src/api/java/appeng/api/recipes/IIngredient.java
2878022d316c0eaed8db09d8ab0aa2dcabb6fa0d
[ "MIT", "Unlicense", "CC0-1.0", "CC-BY-3.0", "LicenseRef-scancode-public-domain" ]
permissive
FPSP-Modpack/EnderIO
f0e32e2b4a85156ec8eadf14833d4be09dd9fb9c
6b021bac7ae7591b92ef4cbb9b599b80212b0c81
refs/heads/master
2023-03-23T09:43:46.578450
2021-03-22T18:48:23
2021-03-22T18:48:23
309,092,201
0
0
Unlicense
2021-03-22T18:48:24
2020-11-01T12:35:39
Java
UTF-8
Java
false
false
2,950
java
/* * The MIT License (MIT) * * Copyright (c) 2013 AlgorithmX2 * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package appeng.api.recipes; import net.minecraft.item.ItemStack; import appeng.api.exceptions.MissingIngredientError; import appeng.api.exceptions.RegistrationError; public interface IIngredient { /** * Acquire a single input stack for the current recipe, if more then one ItemStack is possible a * RegistrationError exception will be thrown, ignore these and let the system handle the error. * * @return a single ItemStack for the recipe handler. * * @throws RegistrationError * @throws MissingIngredientError */ ItemStack getItemStack() throws RegistrationError, MissingIngredientError; /** * Acquire a list of all the input stacks for the current recipe, this is for handlers that support * multiple inputs per slot. * * @return an array of ItemStacks for the recipe handler. * * @throws RegistrationError * @throws MissingIngredientError */ ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError; /** * If you wish to support air, you must test before getting the ItemStack, or ItemStackSet * * @return true if this slot contains no ItemStack, this is passed as "_" */ boolean isAir(); /** * @return The Name Space of the item. Prefer getItemStack or getItemStackSet */ String getNameSpace(); /** * @return The Name of the item. Prefer getItemStack or getItemStackSet */ String getItemName(); /** * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet */ int getDamageValue(); /** * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet */ int getQty(); /** * Bakes the lists in for faster runtime look-ups. * * @throws MissingIngredientError * @throws RegistrationError */ void bake() throws RegistrationError, MissingIngredientError; }
[ "tterrag1098@gmail.com" ]
tterrag1098@gmail.com
ef3a6a798f237ce0d09f336c0f78933df0903e45
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
/Research_Bucket/Completed_Archived/dropboxbackup_9_1_18/AndroidData/old/Notsure/data/realvsfake/coinpirates/realcoinpirates_1%0%6%apk/org/apache/james/mime4j/message/StorageTextBody.java
27a15c8a6b62b83b667c8abfa714e7c7fb6e89c2
[]
no_license
dan7800/Research
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
f68ea72c599f74e88dd44d85503cc672474ec12a
refs/heads/master
2021-01-23T09:50:47.744309
2018-09-01T14:56:01
2018-09-01T14:56:01
32,521,867
1
1
null
null
null
null
UTF-8
Java
false
false
1,655
java
package org.apache.james.mime4j.message; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Reader; import java.nio.charset.Charset; import org.apache.james.mime4j.codec.CodecUtil; import org.apache.james.mime4j.storage.MultiReferenceStorage; import org.apache.james.mime4j.util.CharsetUtil; class StorageTextBody extends TextBody { private Charset charset; private MultiReferenceStorage storage; public StorageTextBody(MultiReferenceStorage paramMultiReferenceStorage, Charset paramCharset) { this.storage = paramMultiReferenceStorage; this.charset = paramCharset; } public StorageTextBody copy() { this.storage.addReference(); return new StorageTextBody(this.storage, this.charset); } public void dispose() { if (this.storage != null) { this.storage.delete(); this.storage = null; } } public String getMimeCharset() { return CharsetUtil.toMimeCharset(this.charset.name()); } public Reader getReader() throws IOException { return new InputStreamReader(this.storage.getInputStream(), this.charset); } public void writeTo(OutputStream paramOutputStream) throws IOException { if (paramOutputStream == null) throw new IllegalArgumentException(); InputStream localInputStream = this.storage.getInputStream(); CodecUtil.copy(localInputStream, paramOutputStream); localInputStream.close(); } } /* Location: * Qualified Name: org.apache.james.mime4j.message.StorageTextBody * Java Class Version: 6 (50.0) * JD-Core Version: 0.6.1-SNAPSHOT */
[ "dan@go.com" ]
dan@go.com
5b60233c42b0bc22529ef6ec195c6662d7b66e6f
1c5e8605c1a4821bc2a759da670add762d0a94a2
/src/dahua/fdc/costdb/app/MarketInfoController.java
4c36bf06ffeb3a07d0ebba29a0d225667e62e92f
[]
no_license
shxr/NJG
8195cfebfbda1e000c30081399c5fbafc61bb7be
1b60a4a7458da48991de4c2d04407c26ccf2f277
refs/heads/master
2020-12-24T06:51:18.392426
2016-04-25T03:09:27
2016-04-25T03:09:27
19,804,797
0
3
null
null
null
null
UTF-8
Java
false
false
1,794
java
package com.kingdee.eas.fdc.costdb.app; import com.kingdee.bos.BOSException; //import com.kingdee.bos.metadata.*; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.*; import com.kingdee.bos.Context; import java.lang.String; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.eas.fdc.costdb.MarketInfoCollection; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.bos.util.*; import com.kingdee.eas.fdc.costdb.MarketInfoInfo; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.framework.*; import com.kingdee.eas.framework.app.BillBaseController; import java.rmi.RemoteException; import com.kingdee.bos.framework.ejb.BizController; public interface MarketInfoController extends BillBaseController { public MarketInfoInfo getMarketInfoInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; public MarketInfoInfo getMarketInfoInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException; public MarketInfoInfo getMarketInfoInfo(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public MarketInfoCollection getMarketInfoCollection(Context ctx) throws BOSException, RemoteException; public MarketInfoCollection getMarketInfoCollection(Context ctx, EntityViewInfo view) throws BOSException, RemoteException; public MarketInfoCollection getMarketInfoCollection(Context ctx, String oql) throws BOSException, RemoteException; }
[ "shxr_code@126.com" ]
shxr_code@126.com
8698848d585400b1c254ce68fcc96d224623f610
08ed169f957783e5f5ed59c2493affea39ff5562
/src/test/java/com/nayanzin/sparkjava/ch01basics/ConvertRddToDataset.java
ee94df1f84c363902f3a39c91f73bf0c69fe0cec
[]
no_license
Nayanzin-Alexander/spark-java
1624a60791cbe008bafb66dd9fa110d7106cabbf
6d9449ace3a7042681ddbf7e2a4a2aa77e03a1b7
refs/heads/master
2021-07-25T00:10:35.540012
2020-09-13T20:28:01
2020-09-13T20:29:00
216,992,796
0
0
null
null
null
null
UTF-8
Java
false
false
1,661
java
package com.nayanzin.sparkjava.ch01basics; import com.holdenkarau.spark.testing.JavaDataFrameSuiteBase; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; import org.apache.spark.sql.types.StructType; import org.junit.Test; import scala.Tuple2; import java.io.Serializable; import static java.util.Arrays.asList; import static org.apache.spark.sql.RowFactory.create; import static org.apache.spark.sql.types.DataTypes.*; import static org.assertj.core.api.Assertions.assertThat; public class ConvertRddToDataset extends JavaDataFrameSuiteBase implements Serializable { private static final StructType SCHEMA = createStructType(asList( createStructField("name", StringType, false), createStructField("number", IntegerType, false))); @Test public void countByKeyTest() { JavaPairRDD<String, Integer> pairRdd = jsc().parallelizePairs(asList( new Tuple2<>("A", 1), new Tuple2<>("A", 11), new Tuple2<>("A", 111), new Tuple2<>("B", 2), new Tuple2<>("B", 22), new Tuple2<>("C", 3))); JavaRDD<Row> rdd = pairRdd.map(tuple -> create(tuple._1, tuple._2)); Dataset<Row> dataset = spark().createDataFrame(rdd, SCHEMA); assertThat(dataset.collectAsList()).containsExactlyInAnyOrder( create("A", 1), create("A", 11), create("A", 111), create("B", 2), create("B", 22), create("C", 3) ); } }
[ "nayanzin.alexander@gmail.com" ]
nayanzin.alexander@gmail.com
52da006e4f2a9a4d2f6669385b7670ea4df98350
6dd10e6261b4b85264443b6c160db84548502861
/Javachobo/Day2_151229/OperatorEx4.java
0a05d46c4f304804f956bf69cfa2ac52c1159d68
[]
no_license
mirikim/JavaSamples
a139c23dc64397f8b37448c660b8911dd550ef3c
465cb9793a661670df4ed59341c3b9b00682f016
refs/heads/master
2021-01-10T06:42:52.188095
2016-02-14T04:25:12
2016-02-14T04:25:12
50,391,133
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
package Day2_151229; public class OperatorEx4 { public static void main(String[] args) { // TODO Auto-generated method stub int i = -10; i = +i; System.out.println(i); i = -10; i = -i; System.out.println(i); } }
[ "rlaalfl92@nate.com" ]
rlaalfl92@nate.com