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
7baea3be212e1f0b221a079713db8e1a00d79a67
e087ef4984a8658c287d955276f08f06da358397
/src/com/javarush/test/level09/lesson11/home06/Solution.java
47aeb99cc054e1b8e40d35bcf485799a040e104d
[]
no_license
YuriiLosinets/javacore
f08fd93623bc5c90fcb4eb13a03a3360b702a5fb
552117fd18a96ff99c6bd5455f16f4bb234d2bdc
refs/heads/master
2021-01-10T14:39:57.494858
2016-03-25T08:40:31
2016-03-25T08:40:31
53,958,241
0
1
null
null
null
null
UTF-8
Java
false
false
1,880
java
package com.javarush.test.level09.lesson11.home06; import java.util.ArrayList; /* Сказка «Красная Шапочка» 1. Есть пять классов: красная шапочка, бабушка, пирожок, дровосек, волк. 2. У каждого класса есть 2 поля: убил (killed ArrayList) и съел (ate ArrayList). 3. Необходимые объекты созданы (hood, grandmother, ...). 4. Расставь правильно связи, кто кого съел и убил, чтобы получилась логика сказки «Красная Шапочка». PS: пирожки никто не ел. Их только несли. Волк чуток поел. А его потом убили. */ public class Solution { public static LittleRedRidingHood hood = new LittleRedRidingHood(); public static Grandmother grandmother = new Grandmother(); public static Patty patty = new Patty(); public static Woodman woodman = new Woodman(); public static Wolf wolf = new Wolf(); public static void main(String[] args) { wolf.killed.add(grandmother); wolf.ate.add(grandmother); wolf.ate.add(hood); woodman.killed.add(wolf); } //красная шапочка public static class LittleRedRidingHood extends StoryItem { } //бабушка public static class Grandmother extends StoryItem { } //пирожок public static class Patty extends StoryItem { } //дровосек public static class Woodman extends StoryItem { } //волк public static class Wolf extends StoryItem { } public static abstract class StoryItem { public ArrayList<StoryItem> killed = new ArrayList<StoryItem>(); public ArrayList<StoryItem> ate = new ArrayList<StoryItem>(); } }
[ "yuri.losinets@gmail.com" ]
yuri.losinets@gmail.com
1f4da5540dc5af7c29f4f3bb1fa5227c92452a46
2e866fa46692a58b88e3b33cb0ff1a3693432795
/plugins/jps-cache/src/com/intellij/jps/cache/client/ArtifactoryEntryDto.java
d2bd7381be5e2b2dd8e4a0365aa434237ef1e08d
[ "Apache-2.0" ]
permissive
ForNeVeR/intellij-community
44fd60cac8854984088afb668f97bf18ade89ec3
0f9b0c5e806ca9532a128cc9c622601700e24aa7
refs/heads/master
2020-09-11T15:08:09.707044
2019-11-15T23:24:56
2019-11-15T23:41:38
222,079,787
0
1
Apache-2.0
2019-12-02T21:03:37
2019-11-16T10:01:54
null
UTF-8
Java
false
false
1,306
java
package com.intellij.jps.cache.client; import java.util.Objects; public class ArtifactoryEntryDto { private String repo; private String path; private String name; private String type; private Long size; public String getRepo() { return repo; } public void setRepo(String repo) { this.repo = repo; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } 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 Long getSize() { return size; } public void setSize(Long size) { this.size = size; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ArtifactoryEntryDto dto = (ArtifactoryEntryDto)o; return Objects.equals(repo, dto.repo) && Objects.equals(path, dto.path) && Objects.equals(name, dto.name) && Objects.equals(type, dto.type) && Objects.equals(size, dto.size); } @Override public int hashCode() { return Objects.hash(repo, path, name, type, size); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
15b3e5f5eb91553afad897ff334bf7200024bc5a
400fa6f7950fcbc93f230559d649a7bfc50975fe
/src/com/jagex/NativeTexture.java
6b4ef7da123693a60786a182672ac7cf6df06546
[]
no_license
Rune-Status/Major--Renamed-839
bd242a9b230c104a4021ec679e527fe752c27c4f
0e9039aa22f7ecd0ebcf2473a4acb5e91f6c8f76
refs/heads/master
2021-07-15T08:58:15.963040
2017-10-22T20:14:35
2017-10-22T20:14:35
107,897,914
1
0
null
null
null
null
UTF-8
Java
false
false
150
java
package com.jagex; public interface NativeTexture { void method296(Class318 class318); void method301(); void deleteImmediately(); }
[ "iano2k4@hotmail.com" ]
iano2k4@hotmail.com
73acb47dd48bfcb5991e31b3749291154ea3e8cc
22ca777d5fb55d7270f5b7b12af409e42721d4fa
/src/main/java/com/basic/designpattern/creationalPatterns/builderPattern/burger/VegBurger.java
031834423ed87472399273852c9023f4dc8bef90
[]
no_license
Yommmm/Java-Basic
73d1f8ef59ba6186f7169f0dd885cbe7a21d2094
fec3793a1284ac53676daf71547f53469b33e042
refs/heads/master
2021-05-26T05:14:27.590319
2020-05-15T15:43:04
2020-05-15T15:43:04
127,542,927
1
0
null
null
null
null
UTF-8
Java
false
false
235
java
package com.basic.designpattern.creationalPatterns.builderPattern.burger; public class VegBurger extends Burger { @Override public String name() { return "Veg Burger"; } @Override public float price() { return 18.8f; } }
[ "yangzhiwen@chalco-steering.com" ]
yangzhiwen@chalco-steering.com
90a673e0d4e0c794eca4c4c9b3bb7f648daa356e
95b50a95a920d2e09de11e1b471c24a8ae0e72b2
/MOOC_JAVA_OFFER/src/thread/WaitSleepDemo.java
284443437f1d88e2a9b4419dfbeac5ebe5b2e712
[]
no_license
HongbinW/Java
5db4668d263681ce52b9cfb8a6148abadd967969
e8a9c952a860fcae8c382c93039f939d334e4ec8
refs/heads/master
2021-07-01T21:04:11.933749
2020-09-16T05:43:05
2020-09-16T05:43:05
162,947,163
1
0
null
null
null
null
UTF-8
Java
false
false
2,113
java
package thread; /** * @Author: HongbinW * @Date: 2019/8/3 22:01 * @Version 1.0 * @Description: */ public class WaitSleepDemo { public static void main(String[] args){ final Object lock = new Object(); new Thread(new Runnable() { @Override public void run() { System.out.println("thread A is waiting to get lock"); synchronized (lock){ try { System.out.println("thread A get lock"); Thread.sleep(200); //A睡眠时间超过10毫秒,因此主线程生成线程B,并执行B线程,但是睡眠时不释放锁,因此线程B依然在等待获得锁 System.out.println("thread A do wait method"); lock.wait(); //wait会释放锁,此时B会去获取锁 System.out.println("thread A is done"); } catch (InterruptedException e) { e.printStackTrace(); } } } }).start(); try { Thread.sleep(10); //先让A线程执行,让主线程睡眠10毫秒 } catch (InterruptedException e) { e.printStackTrace(); } new Thread(new Runnable() { @Override public void run() { System.out.println("thread B is waiting to get lock"); synchronized (lock){ try { System.out.println("thread B get lock"); System.out.println("thread B is sleeping 10ms"); Thread.sleep(10); lock.notifyAll(); // Thread.yield(); //yield并不会使当前线程释放锁 Thread.sleep(2000); System.out.println("thread B is done"); } catch (InterruptedException e) { e.printStackTrace(); } } } }).start(); } }
[ "501245176@qq.com" ]
501245176@qq.com
a74522040ec146deae6f1942ab5afd179ab67873
b01332bd1b0eac2adb901ce121b0ba481e82a126
/beike/ops-order/src/main/java/com/meitianhui/order/entity/FgOrderRefundLog.java
48ecfe29d19e0e92bb563135fd21e81d9534a978
[]
no_license
xlh198593/resin
5783690411bd23723c27f942b9ebaa6b992c4c3b
9632d32feaeeac3792118269552d3ff5ba976b39
refs/heads/master
2022-12-21T00:17:43.048802
2019-07-17T02:13:54
2019-07-17T02:13:54
81,401,320
0
2
null
2022-12-16T05:02:24
2017-02-09T02:49:12
Java
UTF-8
Java
false
false
1,961
java
package com.meitianhui.order.entity; import java.io.Serializable; import java.util.Date; /** * 领了么退款订单信息 * * @author Tiny * */ public class FgOrderRefundLog implements Serializable { private static final long serialVersionUID = 1L; /** 订单标识**/ private String log_id; /** 订单编号**/ private String order_no; /** 会员分类,可选值:stores(便利店)、supplier(供应商)、partner(联盟商)**/ private String member_type_key; /** 会员标识**/ private String member_id; /** 淘宝账号**/ private String taobao_account_no; /** 支付宝账号 **/ private String alipay_account_no; /** 发生时间 **/ private Date tracked_date; /** 事件描述 **/ private String event_desc; public String getLog_id() { return log_id; } public void setLog_id(String log_id) { this.log_id = log_id; } public String getOrder_no() { return order_no; } public void setOrder_no(String order_no) { this.order_no = order_no; } public String getMember_type_key() { return member_type_key; } public void setMember_type_key(String member_type_key) { this.member_type_key = member_type_key; } public String getMember_id() { return member_id; } public void setMember_id(String member_id) { this.member_id = member_id; } public String getTaobao_account_no() { return taobao_account_no; } public void setTaobao_account_no(String taobao_account_no) { this.taobao_account_no = taobao_account_no; } public String getAlipay_account_no() { return alipay_account_no; } public void setAlipay_account_no(String alipay_account_no) { this.alipay_account_no = alipay_account_no; } public Date getTracked_date() { return tracked_date; } public void setTracked_date(Date tracked_date) { this.tracked_date = tracked_date; } public String getEvent_desc() { return event_desc; } public void setEvent_desc(String event_desc) { this.event_desc = event_desc; } }
[ "longjiangxia@la-inc.cn" ]
longjiangxia@la-inc.cn
a794769eb28c091d4c993ad479f1660ee2f2bdb5
fe1f2c68a0540195b227ebee1621819766ac073b
/OVO_jdgui/android/support/design/widget/TabItem.java
9254542d354dfef52eee7f6bbfd58f693a2c81b5
[]
no_license
Sulley01/KPI_4
41d1fd816a3c0b2ab42cff54a4d83c1d536e19d3
04ed45324f255746869510f0b201120bbe4785e3
refs/heads/master
2020-03-09T05:03:37.279585
2018-04-18T16:52:10
2018-04-18T16:52:10
128,602,787
2
1
null
null
null
null
UTF-8
Java
false
false
1,024
java
package android.support.design.widget; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.View; import myobfuscated.mv; import myobfuscated.z.k; public final class TabItem extends View { final CharSequence a; final Drawable b; final int c; public TabItem(Context paramContext) { this(paramContext, null); } public TabItem(Context paramContext, AttributeSet paramAttributeSet) { super(paramContext, paramAttributeSet); paramContext = mv.a(paramContext, paramAttributeSet, z.k.TabItem); this.a = paramContext.c(z.k.TabItem_android_text); this.b = paramContext.a(z.k.TabItem_android_icon); this.c = paramContext.g(z.k.TabItem_android_layout, 0); paramContext.b.recycle(); } } /* Location: C:\dex2jar-2.0\classes-dex2jar.jar!\android\support\design\widget\TabItem.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "sullivan.alvin@ymail.com" ]
sullivan.alvin@ymail.com
4d877ac3815e7df537c09e67bf398ac0bd942d50
ccd9dbdb429f2fca740c43c054f909d6940778df
/src/main/java/net/hasor/core/binder/ApiBinderWrap.java
af3842ee907b321164c2a3715ea2b063f414b6f7
[ "Apache-2.0" ]
permissive
qiukeren/hasor
e6fdd64b24c5852cfe5a3553273ec053d84412e6
a136142d3ec11a7b83ce852f88bbd80c4bececbf
refs/heads/master
2020-06-10T12:22:47.686177
2016-12-01T02:45:23
2016-12-01T02:45:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,063
java
/* * Copyright 2008-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 net.hasor.core.binder; import net.hasor.core.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.reflect.Method; import java.util.List; import java.util.Set; /** * 标准的 {@link ApiBinder} 接口包装类。 * @version : 2013-4-12 * @author 赵永春 (zyc@hasor.net) */ public class ApiBinderWrap implements ApiBinder { protected Logger logger = LoggerFactory.getLogger(getClass()); private ApiBinder apiBinder = null; // public ApiBinderWrap(ApiBinder apiBinder) { this.apiBinder = Hasor.assertIsNotNull(apiBinder); } public Environment getEnvironment() { return this.apiBinder.getEnvironment(); } public Set<Class<?>> findClass(final Class<?> featureType) { return this.apiBinder.findClass(featureType); } public void installModule(final Module module) throws Throwable { this.apiBinder.installModule(module); } public void bindInterceptor(String matcherExpression, MethodInterceptor interceptor) { this.apiBinder.bindInterceptor(matcherExpression, interceptor); } public void bindInterceptor(Matcher<Class<?>> matcherClass, Matcher<Method> matcherMethod, MethodInterceptor interceptor) { this.apiBinder.bindInterceptor(matcherClass, matcherMethod, interceptor); } public <T> BindInfo<T> getBindInfo(String bindID) { return this.apiBinder.getBindInfo(bindID); } public <T> BindInfo<T> getBindInfo(Class<T> bindType) { return this.apiBinder.getBindInfo(bindType); } public <T> List<BindInfo<T>> findBindingRegister(Class<T> bindType) { return this.apiBinder.findBindingRegister(bindType); } public <T> BindInfo<T> findBindingRegister(String withName, Class<T> bindType) { return this.apiBinder.findBindingRegister(withName, bindType); } public <T> NamedBindingBuilder<T> bindType(Class<T> type) { return this.apiBinder.bindType(type); } public <T> MetaDataBindingBuilder<T> bindType(Class<T> type, T instance) { return this.apiBinder.bindType(type, instance); } public <T> InjectPropertyBindingBuilder<T> bindType(Class<T> type, Class<? extends T> implementation) { return this.apiBinder.bindType(type, implementation); } public <T> ScopedBindingBuilder<T> bindType(Class<T> type, Provider<T> provider) { return this.apiBinder.bindType(type, provider); } public <T> InjectPropertyBindingBuilder<T> bindType(String withName, Class<T> type) { return this.apiBinder.bindType(withName, type); } public <T> MetaDataBindingBuilder<T> bindType(String withName, Class<T> type, T instance) { return this.apiBinder.bindType(withName, type, instance); } public <T> InjectPropertyBindingBuilder<T> bindType(String withName, Class<T> type, Class<? extends T> implementation) { return this.apiBinder.bindType(withName, type, implementation); } public <T> LifeBindingBuilder<T> bindType(String withName, Class<T> type, Provider<T> provider) { return this.apiBinder.bindType(withName, type, provider); } // public Provider<Scope> registerScope(String scopeName, Scope scope) { return this.apiBinder.registerScope(scopeName, scope); } public Provider<Scope> registerScope(String scopeName, Provider<Scope> scope) { return this.apiBinder.registerScope(scopeName, scope); } }
[ "zyc@hasor.net" ]
zyc@hasor.net
d128b72c91be0dba9a347b1c7522f0998771350b
6b9588d36a20f37323724d39cf196feb31dc3103
/skycloset_malware/src/com/facebook/react/fabric/mounting/mountitems/f.java
37c2ac9accaca2607d94c79a1ca3e0e1b35cef40
[]
no_license
won21kr/Malware_Project_Skycloset
f7728bef47c0b231528fdf002e3da4fea797e466
1ad90be1a68a4e9782a81ef1490f107489429c32
refs/heads/master
2022-12-07T11:27:48.119778
2019-12-16T21:39:19
2019-12-16T21:39:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
720
java
package com.facebook.react.fabric.mounting.mountitems; import com.facebook.react.fabric.mounting.c; import com.facebook.react.uimanager.af; public class f implements e { private final String a; private final int b; private final af c; public f(af paramaf, int paramInt, String paramString) { this.c = paramaf; this.a = paramString; this.b = paramInt; } public void a(c paramc) { paramc.a(this.c, this.a); } public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("["); stringBuilder.append(this.b); stringBuilder.append("] - Preallocate "); stringBuilder.append(this.a); return stringBuilder.toString(); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
071153220d1d9475164b0209ee5e1f96597778e0
ad5f5574d004586e1def903de4c2824ab99edd51
/BANDI_PROJECT/src/com/semi/bandi/controller/member/logoutServlet.java
e40315201b6a940c3b3336c343b24694dfb34185
[]
no_license
parkjy0629/BANDI_PROJECT_JY
b3ef6e6e1b416bdc574b124a777c287f230ab100
ca0b8dd36def407516f55e056766cb82767d2464
refs/heads/master
2020-03-18T19:13:14.332434
2018-06-04T06:21:31
2018-06-04T06:21:31
135,141,832
1
1
null
null
null
null
UTF-8
Java
false
false
1,765
java
package com.semi.bandi.controller.member; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.semi.bandi.model.vo.User; /** * Servlet implementation class logoutServlet */ @WebServlet("/logout.do") public class logoutServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public logoutServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); User user = (User)session.getAttribute("user"); String page = ""; if(user == null) { page ="/views/main/Main.jsp"; } else { user = null; session.setAttribute("user", user); session.invalidate(); page = "index.jsp"; } System.out.println("logout Servelt Called"); RequestDispatcher rq =request.getRequestDispatcher(page); rq.forward(request, response); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
[ "user2@KH_H" ]
user2@KH_H
626d9158ca2bc41fbe0e36161f8f3fc36a8be597
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/jfltecan_sgh2dm919v.java
0151a722e72b9dcec1580c6538d92533ce814e68
[ "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
236
java
// This file is automatically generated. package adila.db; /* * Samsung Galaxy S4 * * DEVICE: jfltecan * MODEL: SGH-M919V */ final class jfltecan_sgh2dm919v { public static final String DATA = "Samsung|Galaxy S4|Galaxy S"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
f7494db627bc32fe47b4f91f1c3068f8a4bb9436
df7320dc568f62bd94b0cf6e079a5ac01aae13ce
/app/src/main/java/com/islavdroid/weatherapp/model/Temperature.java
61bebccd74a0ba04af862bdfafd6ebd6a9b2ee2c
[]
no_license
islavstan/WeatherApp
9390c5725385632f60b6ac88f086fb4d397bffe7
e2ff76c11319e7b39d6b6ef67aa2dfb6bc42f32b
refs/heads/master
2021-01-11T07:35:08.445260
2016-11-05T16:14:52
2016-11-05T16:14:52
72,873,194
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package com.islavdroid.weatherapp.model; public class Temperature { private double temp; private float maxTemp,minTemp; public double getTemp() { return temp; } public void setTemp(double temp) { this.temp = temp; } public float getMaxTemp() { return maxTemp; } public void setMaxTemp(float maxTemp) { this.maxTemp = maxTemp; } public float getMinTemp() { return minTemp; } public void setMinTemp(float minTemp) { this.minTemp = minTemp; } }
[ "islavstan@gmail.com" ]
islavstan@gmail.com
7ca211b761f547f1978a798da4b5b2e81e0b03b9
32d65b7462a948b1f9cd3843ff59ff2be072bc1a
/src/main/java/com/cbt/sina/org/json/CookieList.java
4ccce40fdeaa5d4b553e88a4c9b7c79c31c66381
[]
no_license
fangfangbixia/fastermake
570c510832b660df3af552e925053d410904c746
70e5a415b91b55e02d6419172e3d5cea836a5a6a
refs/heads/master
2022-07-26T09:13:16.399949
2019-05-28T01:54:16
2019-05-28T01:54:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,284
java
package com.cbt.sina.org.json; /* Copyright (c) 2002 JSON.org 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 shall be used for Good, not Evil. 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. */ import java.util.Iterator; /** * Convert a web browser cookie list string to a JSONObject and back. * @author JSON.org * @version 2008-09-18 */ public class CookieList { /** * Convert a cookie list into a JSONObject. A cookie list is a sequence * of name/value pairs. The names are separated from the values by '='. * The pairs are separated by ';'. The names and the values * will be unescaped, possibly converting '+' and '%' sequences. * * To add a cookie to a cooklist, * cookielistJSONObject.put(cookieJSONObject.getString("name"), * cookieJSONObject.getString("value")); * @param string A cookie list string * @return A JSONObject * @throws JSONException */ public static JSONObject toJSONObject(String string) throws JSONException { JSONObject o = new JSONObject(); JSONTokener x = new JSONTokener(string); while (x.more()) { String name = Cookie.unescape(x.nextTo('=')); x.next('='); o.put(name, Cookie.unescape(x.nextTo(';'))); x.next(); } return o; } /** * Convert a JSONObject into a cookie list. A cookie list is a sequence * of name/value pairs. The names are separated from the values by '='. * The pairs are separated by ';'. The characters '%', '+', '=', and ';' * in the names and values are replaced by "%hh". * @param o A JSONObject * @return A cookie list string * @throws JSONException */ public static String toString(JSONObject o) throws JSONException { boolean b = false; Iterator keys = o.keys(); String s; StringBuffer sb = new StringBuffer(); while (keys.hasNext()) { s = keys.next().toString(); if (!o.isNull(s)) { if (b) { sb.append(';'); } sb.append(Cookie.escape(s)); sb.append("="); sb.append(Cookie.escape(o.getString(s))); b = true; } } return sb.toString(); } }
[ "545731790@qq.com" ]
545731790@qq.com
52b825102c1fc85e6273ce14ca668db69ea65fe8
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/com/google/android/gms/internal/ads/zzcyw.java
d3cf8f8ee9189a649cbedb89fec0b940ab5ab8d4
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
542
java
package com.google.android.gms.internal.ads; import java.util.concurrent.Executors; public final class zzcyw implements zzdti<zzbbl> { /* renamed from: a */ private static final zzcyw f27663a = new zzcyw(); /* renamed from: a */ public static zzcyw m29017a() { return f27663a; } public final /* synthetic */ Object get() { zzbbl a = zzbbm.m26395a(Executors.newSingleThreadExecutor()); zzdto.m30114a(a, "Cannot return null from a non-@Nullable @Provides method"); return a; } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
4c2d1afd3bd69e8f007614c1a8194d262ade7f73
43bf460c82c006e5e916c07d8645aad5c675b84b
/ken-jxl/src/main/java/jxl/biff/formula/CloseParentheses.java
120c4653e73543e228d357e0316757f0b6f67b12
[]
no_license
cghr/cme-2.5
31086f77e76b0357cc9e4134b25d73c5220774f3
c87d64495d77dad182e2bb99e024fa3295861b92
refs/heads/master
2016-09-09T19:47:25.182951
2014-04-30T05:53:00
2014-04-30T05:53:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
264
java
package jxl.biff.formula; class CloseParentheses extends StringParseItem {} /* Location: Z:\home\sagpatke\cme-workspace\cme\ken-jxl\ken-jxl.jar * Qualified Name: jxl.biff.formula.CloseParentheses * JD-Core Version: 0.7.0.1 */
[ "sagarpatke@gmail.com" ]
sagarpatke@gmail.com
e3f4c79c404cf4f8d1ac3f2c55adcc8bf0226e96
fe49bebdae362679d8ea913d97e7a031e5849a97
/bqerpejb/src/power/ejb/equ/standardpackage/EquCStandardPackfilenameFacade.java
5592ec96a1cad37e704c3ee83b06e99356334f9b
[]
no_license
loveyeah/BQMIS
1f87fad2c032e2ace7e452f13e6fe03d8d09ce0d
a3f44db24be0fcaa3cf560f9d985a6ed2df0b46b
refs/heads/master
2020-04-11T05:21:26.632644
2018-03-08T02:13:18
2018-03-08T02:13:18
124,322,652
0
2
null
null
null
null
UTF-8
Java
false
false
5,019
java
package power.ejb.equ.standardpackage; import java.util.List; import java.util.logging.Level; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import power.ejb.hr.LogUtil; /** * Facade for entity EquCStandardPackfilename. * * @see power.ejb.equ.standardpackage.EquCStandardPackfilename * @author MyEclipse Persistence Tools */ @Stateless public class EquCStandardPackfilenameFacade implements EquCStandardPackfilenameFacadeRemote { @PersistenceContext private EntityManager entityManager; /** * Perform an initial save of a previously unsaved EquCStandardPackfilename * entity. All subsequent persist actions of this entity should use the * #update() method. * * @param entity * EquCStandardPackfilename entity to persist * @throws RuntimeException * when the operation fails */ public void save(EquCStandardPackfilename entity) { LogUtil.log("saving EquCStandardPackfilename instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } /** * Delete a persistent EquCStandardPackfilename entity. * * @param entity * EquCStandardPackfilename entity to delete * @throws RuntimeException * when the operation fails */ public void delete(EquCStandardPackfilename entity) { LogUtil.log("deleting EquCStandardPackfilename instance", Level.INFO, null); try { entity = entityManager.getReference(EquCStandardPackfilename.class, entity.getId()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } /** * Persist a previously saved EquCStandardPackfilename entity and return it * or a copy of it to the sender. A copy of the EquCStandardPackfilename * entity parameter is returned when the JPA persistence mechanism has not * previously been tracking the updated entity. * * @param entity * EquCStandardPackfilename entity to update * @return EquCStandardPackfilename the persisted EquCStandardPackfilename * entity instance, may not be the same * @throws RuntimeException * if the operation fails */ public EquCStandardPackfilename update(EquCStandardPackfilename entity) { LogUtil.log("updating EquCStandardPackfilename instance", Level.INFO, null); try { EquCStandardPackfilename result = entityManager.merge(entity); LogUtil.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { LogUtil.log("update failed", Level.SEVERE, re); throw re; } } public EquCStandardPackfilename findById(Long id) { LogUtil.log("finding EquCStandardPackfilename instance with id: " + id, Level.INFO, null); try { EquCStandardPackfilename instance = entityManager.find( EquCStandardPackfilename.class, id); return instance; } catch (RuntimeException re) { LogUtil.log("find failed", Level.SEVERE, re); throw re; } } /** * Find all EquCStandardPackfilename entities with a specific property * value. * * @param propertyName * the name of the EquCStandardPackfilename property to query * @param value * the property value to match * @return List<EquCStandardPackfilename> found by query */ @SuppressWarnings("unchecked") public List<EquCStandardPackfilename> findByProperty(String propertyName, final Object value) { LogUtil.log("finding EquCStandardPackfilename instance with property: " + propertyName + ", value: " + value, Level.INFO, null); try { final String queryString = "select model from EquCStandardPackfilename model where model." + propertyName + "= :propertyValue"; Query query = entityManager.createQuery(queryString); query.setParameter("propertyValue", value); return query.getResultList(); } catch (RuntimeException re) { LogUtil.log("find by property name failed", Level.SEVERE, re); throw re; } } /** * Find all EquCStandardPackfilename entities. * * @return List<EquCStandardPackfilename> all EquCStandardPackfilename * entities */ @SuppressWarnings("unchecked") public List<EquCStandardPackfilename> findAll() { LogUtil.log("finding all EquCStandardPackfilename instances", Level.INFO, null); try { final String queryString = "select model from EquCStandardPackfilename model"; Query query = entityManager.createQuery(queryString); return query.getResultList(); } catch (RuntimeException re) { LogUtil.log("find all failed", Level.SEVERE, re); throw re; } } }
[ "yexinhua@rtdata.cn" ]
yexinhua@rtdata.cn
4b54b23747875319e7135cf684580709fa06db13
3d6c20dc57a8eb1a015c5d2353a515f29525a1d6
/new for JSTL/TestHibernet/src/java/com/service/TeacherService.java
1119885c325178b8c3b6049e875159a5c354add6
[]
no_license
nparvez71/NetbeanSoftware
b9e5c93addc2583790c69f53c650c29665e16721
1e18ff07914c4c4530bcfd93693d838bea8f9641
refs/heads/master
2020-03-13T19:14:53.285683
2018-04-29T04:34:07
2018-04-29T04:34:07
131,249,843
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.service; import com.common.CommonService; import com.dao.TeacherDao; import com.entity.Teacher; /** * * @author J2EE-33 */ public class TeacherService extends CommonService<Teacher> implements TeacherDao{ }
[ "nparvez92@gmail.com" ]
nparvez92@gmail.com
5403976014f17f911bcb20bbf769489c4110a968
23560544084033c80de0c421b05488919c668cd7
/poi-excel/src/main/java/com/janita/poi/util/StyleUtils.java
5846b7a55c7d1927ce80a22253d8bb56ab532e79
[]
no_license
janforp/excel-master
edae0ea334484b08d756aa26da72786078dfc92c
e6db2668808e3377f6c9c106701e7e1e9512dde9
refs/heads/master
2020-05-31T20:27:04.897973
2017-06-14T04:01:25
2017-06-14T04:01:25
94,048,020
0
0
null
null
null
null
UTF-8
Java
false
false
1,471
java
package com.janita.poi.util; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.IndexedColors; /** * Created by Janita on 2017/6/12 0012- 上午 11:49 * 该类是: */ public class StyleUtils { /** * 设置字体,黑体,红色,14 * @return 用于表头显示“表格填写注意事项.....” */ public static Font fontOne(HSSFWorkbook workbook) { Font font = workbook.createFont(); font.setColor(IndexedColors.RED.getIndex()); font.setFontName("宋体"); font.setFontHeightInPoints((short) 14);// 设置字体大小 font.setBoldweight(Font.BOLDWEIGHT_BOLD); return font; } /** * 设置字体,宋体,黑色,11 * 用于除警告信息外所有文字 * @return 设置字体,宋体,黑色,12 */ public static Font fontTwo(HSSFWorkbook workbook) { Font font = workbook.createFont(); font.setColor(IndexedColors.BLACK.getIndex()); font.setFontName("宋体"); font.setFontHeightInPoints((short) 11);// 设置字体大小 return font; } public static CellStyle cellStyleOne(HSSFWorkbook workbook) { CellStyle cellStyle = workbook.createCellStyle(); cellStyle.setFont(fontOne(workbook)); cellStyle.setLocked(true); return cellStyle; } }
[ "zcj880902" ]
zcj880902
c692b0064f0a20044b089e2313a6ff0836a681be
e63e88395c42fc5109c7549be7e09facf14f9068
/src/org/acm/seguin/refactor/method/PushDownMethodRefactoring.java
053634cd126b303c7302ce717cc059cdcc3ef3ab
[]
no_license
lyestoo/jrefactory
2e1671f4a1afc4b2c01202fbc73e57be8a931a48
188a18b54a2798d10fa4718fd586e82fe2d90308
refs/heads/master
2021-01-19T09:57:27.527513
2015-07-08T20:27:10
2015-07-08T20:27:10
38,776,938
1
0
null
null
null
null
UTF-8
Java
false
false
3,573
java
/* * Author: Chris Seguin * * This software has been developed under the copyleft * rules of the GNU General Public License. Please * consult the GNU General Public License for more * details about use and distribution of this software. */ package org.acm.seguin.refactor.method; import java.util.Iterator; import java.util.LinkedList; import org.acm.seguin.parser.ast.ASTMethodDeclaration; import org.acm.seguin.parser.ast.SimpleNode; import org.acm.seguin.refactor.ComplexTransform; import org.acm.seguin.refactor.RefactoringException; import org.acm.seguin.summary.TypeDeclSummary; import org.acm.seguin.summary.TypeSummary; import org.acm.seguin.summary.query.GetTypeSummary; /** * Performs the push down method refactoring * *@author Chris Seguin */ public class PushDownMethodRefactoring extends InheretenceMethodRefactoring { private LinkedList destinations; private TypeSummary typeSummary; /** * Constructor for the PushDownMethodRefactoring object */ protected PushDownMethodRefactoring() { destinations = new LinkedList(); } /** * Gets the description of the refactoring * *@return the description */ public String getDescription() { return "Moves a method " + methodSummary.getName() + " down into the child classes of " + typeSummary.getName(); } /** * Gets the ID attribute of the PushDownMethodRefactoring object * *@return The ID value */ public int getID() { return PUSH_DOWN_METHOD; } /** * Adds a feature to the Child attribute of the PushDownMethodRefactoring * object * *@param type The feature to be added to the Child attribute */ public void addChild(TypeSummary type) { destinations.add(type); } /** * This specifies the preconditions for applying the refactoring * *@exception RefactoringException Description of Exception */ protected void preconditions() throws RefactoringException { if (methodSummary == null) { throw new RefactoringException("No method specified"); } typeSummary = (TypeSummary) methodSummary.getParent(); Iterator iter = destinations.iterator(); while (iter.hasNext()) { TypeSummary next = (TypeSummary) iter.next(); TypeDeclSummary parent = next.getParentClass(); TypeSummary parentSummary = GetTypeSummary.query(parent); if (parentSummary != typeSummary) { throw new RefactoringException(next.getName() + " is not a subclass of " + typeSummary.getName()); } checkDestination(next); } } /** * Moves the method to the parent class */ protected void transform() { RemoveMethodTransform rft = new RemoveMethodTransform(methodSummary); ComplexTransform transform = getComplexTransform(); removeMethod(typeSummary, transform, rft); // Update the method declaration to have the proper permissions SimpleNode methodDecl = rft.getMethodDeclaration(); if (methodDecl == null) { return; } ASTMethodDeclaration decl = updateMethod(methodDecl); Iterator iter = destinations.iterator(); while (iter.hasNext()) { TypeSummary next = (TypeSummary) iter.next(); addMethodToDest(transform, rft, methodDecl, next); } } /** * Description of the Method * *@param source Description of Parameter *@param transform Description of Parameter *@param rft Description of Parameter */ protected void removeMethod(TypeSummary source, ComplexTransform transform, RemoveMethodTransform rft) { transform.add(new AddAbstractMethod(methodSummary)); super.removeMethod(source, transform, rft); } }
[ "lahmar.elyes@gmail.com" ]
lahmar.elyes@gmail.com
605f97cca17ce88e0987fb2889c0936ecde05b00
4f42ff2ca076a23164341bdaefb75897a95c4b8e
/spring-boot-demo/src/main/java/com/haozi/demo/springboot/dao/AquaticUserBillInfoMapper.java
873d3aaacda08ad4c0f3ac1977b74d5f40d34ad1
[]
no_license
haoziapple/spring_component
7c8b8d0cd29f311030e18580eb435b8aa2c8ec83
6124a83e207094529787b93f22c2bd67fa03c6d2
refs/heads/master
2021-01-20T14:25:17.712667
2018-01-05T02:54:37
2018-01-05T02:54:37
90,608,857
1
0
null
null
null
null
UTF-8
Java
false
false
1,518
java
package com.haozi.demo.springboot.dao; import com.haozi.demo.springboot.bean.po.AquaticUserBillInfo; public interface AquaticUserBillInfoMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table aquatic_user_bill_info * * @mbggenerated */ int deleteByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table aquatic_user_bill_info * * @mbggenerated */ int insert(AquaticUserBillInfo record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table aquatic_user_bill_info * * @mbggenerated */ int insertSelective(AquaticUserBillInfo record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table aquatic_user_bill_info * * @mbggenerated */ AquaticUserBillInfo selectByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table aquatic_user_bill_info * * @mbggenerated */ int updateByPrimaryKeySelective(AquaticUserBillInfo record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table aquatic_user_bill_info * * @mbggenerated */ int updateByPrimaryKey(AquaticUserBillInfo record); }
[ "haozixiaowang@163.com" ]
haozixiaowang@163.com
d6e32544ae2146f9ca8cb530e2248a4b12d65d26
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_195/Testnull_19433.java
de21b5c2897f5ea28aa1061e29993b7ee0a6075f
[]
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_195; import static org.junit.Assert.*; public class Testnull_19433 { private final Productionnull_19433 production = new Productionnull_19433("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
df1c23101228eedcf581f5782343e89cc6f61953
447520f40e82a060368a0802a391697bc00be96f
/apks/playstore_apps/ro_ing_mobile_banking_android_activity/source/de/neom/neoreadersdk/CallCodeParameters.java
f27b3aeca4bd862d42795548b6d520ec50fbf100
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
340
java
package de.neom.neoreadersdk; public class CallCodeParameters extends CodeParameters { private String phoneNumber = null; CallCodeParameters(String paramString) { this.phoneNumber = paramString; } public int getFormat() { return 8; } public String getPhoneNumber() { return this.phoneNumber; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
17f34551107cd4fdc4fb6020df3e847c4ec80f24
646f2bd9adb85a1e93108e3993813cdd65685e3e
/app/src/main/java/appewtc/masterung/bookshop/MainActivity.java
2c1bee9561687a8d168d27019f6932d76038b3dd
[]
no_license
masterUNG/Book-Shop
cce41add25fa2df8ebf6803059b284928d2dd47f
35d965eff2d0cf3e567b8da248f9135720c879ba
refs/heads/master
2020-04-02T13:28:51.996680
2016-06-22T03:07:04
2016-06-22T03:07:04
61,515,054
0
1
null
null
null
null
UTF-8
Java
false
false
4,759
java
package appewtc.masterung.bookshop; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.Toast; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import org.json.JSONArray; import org.json.JSONObject; public class MainActivity extends AppCompatActivity { //Explicit private EditText userEditText, passwordEditText; private String userString, passwordString; private static final String urlJSON = "http://swiftcodingthai.com/neu/get_user.php"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //Bind Widget userEditText = (EditText) findViewById(R.id.editText4); passwordEditText = (EditText) findViewById(R.id.editText5); } // Main Method //Create Inner Class private class MySynchronize extends AsyncTask<Void, Void, String> { private Context context; private String urlString; private boolean statusABoolean = true; private String truePasswordString; private String nameLoginString; public MySynchronize(Context context, String urlString) { this.context = context; this.urlString = urlString; } @Override protected String doInBackground(Void... voids) { try { OkHttpClient okHttpClient = new OkHttpClient(); Request.Builder builder = new Request.Builder(); Request request = builder.url(urlString).build(); Response response = okHttpClient.newCall(request).execute(); return response.body().string(); } catch (Exception e) { return null; } } // doInBack @Override protected void onPostExecute(String s) { super.onPostExecute(s); Log.d("BookShopV1", "JSON ==> " + s); try { JSONArray jsonArray = new JSONArray(s); for (int i=0;i<jsonArray.length();i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (userString.equals(jsonObject.getString("User"))) { statusABoolean = false; truePasswordString = jsonObject.getString("Password"); nameLoginString = jsonObject.getString("Name"); } // if } //for //checkUser if (statusABoolean) { MyAlert myAlert = new MyAlert(); myAlert.myDialog(context, "ไม่มี User นี้", "ไม่มี " + userString + " ในฐานข้อมูลของเรา"); } else if (passwordString.equals(truePasswordString)) { //Password True Intent intent = new Intent(context, BookActivity.class); intent.putExtra("Name", nameLoginString); startActivity(intent); Toast.makeText(context, "Welcome User", Toast.LENGTH_SHORT).show(); finish(); } else { //Password False MyAlert myAlert = new MyAlert(); myAlert.myDialog(context, "Password False", "Please Try Again Password False"); } // if } catch (Exception e) { e.printStackTrace(); } } // onPost } // Class public void clickSignIn(View view) { //Get Value from Edit text userString = userEditText.getText().toString().trim(); passwordString = passwordEditText.getText().toString().trim(); //Check Space if (userString.equals("") || passwordString.equals("")) { MyAlert myAlert = new MyAlert(); myAlert.myDialog(this, "Have Space", "Please Fill All Blank"); } else { searchUserAnPassword(); } } // clickSignIn private void searchUserAnPassword() { MySynchronize mySynchronize = new MySynchronize(this, urlJSON); mySynchronize.execute(); } // searchUser public void clickSignUpMain(View view) { startActivity(new Intent(MainActivity.this, SignUpActivity.class)); } } // Main Class นี่คือ คลาสหลัก
[ "phrombutr@gmail.com" ]
phrombutr@gmail.com
45b0629e15dfa22b84a0791cdd535b44a5cdc4bd
088efb94f273566369cbf43105b5fb7082870b43
/src/main/java/org/laxio/piston/protocol/v340/data/metadata/type/StringBlob.java
8ecb7a00806326a30e569d267ec17c2314e89ac3
[ "MIT" ]
permissive
fossabot/Protocol
05495b915418e43005bbcec774ed0967be18f0b6
207b8f65d2f45a3b06be330c7ee16f62af388119
refs/heads/master
2021-09-02T09:38:08.499026
2018-01-01T14:13:30
2018-01-01T14:13:30
115,923,414
0
0
null
2018-01-01T14:13:25
2018-01-01T14:13:24
null
UTF-8
Java
false
false
1,586
java
/*- * ========================LICENSE_START======================== * Protocol * %% * Copyright (C) 2017 - 2018 Laxio * %% * This file is part of Piston, licensed under the MIT License (MIT). * * 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. * ========================LICENSE_END======================== */ package org.laxio.piston.protocol.v340.data.metadata.type; import org.laxio.piston.protocol.v340.data.metadata.PistonMetadataBlob; public class StringBlob extends PistonMetadataBlob<String> { public StringBlob(int index, String value) { super(index, value); } }
[ "harry.fox.ic@icloud.com" ]
harry.fox.ic@icloud.com
4379632b29bca92d4445cf0a49260863c38eb703
637ee70b0d21002db66d481db96d0f3337cf1f52
/src/main/java/com/jakewharton/u2020/ui/gallery/GalleryView.java
9f014566c029b087656640c55151428a6df74fa2
[ "Apache-2.0" ]
permissive
yuhb0303/u2020
4d662fc00502ca78ebc5fe2372cba1c75f7c49ef
1a656505f90206a3619bda99fc2a813776c0b8bd
refs/heads/master
2021-01-21T03:41:00.171599
2014-01-23T01:09:52
2014-01-23T01:09:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,756
java
package com.jakewharton.u2020.ui.gallery; import android.content.Context; import android.util.AttributeSet; import butterknife.ButterKnife; import butterknife.InjectView; import com.etsy.android.grid.StaggeredGridView; import com.jakewharton.u2020.R; import com.jakewharton.u2020.U2020App; import com.jakewharton.u2020.data.GalleryDatabase; import com.jakewharton.u2020.data.api.Section; import com.jakewharton.u2020.data.api.model.Image; import com.jakewharton.u2020.data.rx.EndlessObserver; import com.jakewharton.u2020.ui.misc.BetterViewAnimator; import com.squareup.picasso.Picasso; import java.util.List; import javax.inject.Inject; import rx.Subscription; public class GalleryView extends BetterViewAnimator { @InjectView(R.id.gallery_grid) StaggeredGridView galleryView; @Inject Picasso picasso; @Inject GalleryDatabase galleryDatabase; private Section section = Section.HOT; private Subscription request; private final GalleryAdapter adapter; public GalleryView(Context context, AttributeSet attrs) { super(context, attrs); U2020App.get(context).inject(this); adapter = new GalleryAdapter(context, picasso); } @Override protected void onFinishInflate() { super.onFinishInflate(); ButterKnife.inject(this); galleryView.setAdapter(adapter); } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); request = galleryDatabase.loadGallery(section, new EndlessObserver<List<Image>>() { @Override public void onNext(List<Image> images) { adapter.replaceWith(images); setDisplayedChildId(R.id.gallery_grid); } }); } @Override protected void onDetachedFromWindow() { request.unsubscribe(); super.onDetachedFromWindow(); } }
[ "jw@squareup.com" ]
jw@squareup.com
f4066131b47b870fd4d36061a9fa332a227e5ed6
9145d08bfff508fb01a55bfe6cb19d37581f00de
/_src/6886EN_03_Code/ch3_src/criteriadelete/src/main/java/net/ensode/glassfishbook/criteriadelete/entity/UsState.java
90f3799240e099e164afd85e375ad159d59b6c2b
[ "Apache-2.0" ]
permissive
paullewallencom/java-978-1-7821-7688-6
7b9c4b0bf92e0ff25607bda6d1e7f4ccf4a3713e
690d6798fc0acf5d6c2179508d9102ddf21722ab
refs/heads/main
2023-02-06T14:09:44.239751
2020-12-27T21:36:20
2020-12-27T21:36:20
319,385,113
0
0
null
null
null
null
UTF-8
Java
false
false
3,200
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 net.ensode.glassfishbook.criteriadelete.entity; import java.io.Serializable; import java.util.Collection; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** * * @author heffel */ @Entity @Table(name = "US_STATES") @NamedQueries({ @NamedQuery(name = "UsState.findAll", query = "SELECT u FROM UsState u")}) public class UsState implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) @NotNull @Column(name = "US_STATE_ID") private Integer usStateId; @Basic(optional = false) @NotNull @Size(min = 1, max = 2) @Column(name = "US_STATE_CD") private String usStateCd; @Basic(optional = false) @NotNull @Size(min = 1, max = 30) @Column(name = "US_STATE_NM") private String usStateNm; @OneToMany(mappedBy = "usStateId") private Collection<Address> addressCollection; public UsState() { } public UsState(Integer usStateId) { this.usStateId = usStateId; } public UsState(Integer usStateId, String usStateCd, String usStateNm) { this.usStateId = usStateId; this.usStateCd = usStateCd; this.usStateNm = usStateNm; } public Integer getUsStateId() { return usStateId; } public void setUsStateId(Integer usStateId) { this.usStateId = usStateId; } public String getUsStateCd() { return usStateCd; } public void setUsStateCd(String usStateCd) { this.usStateCd = usStateCd; } public String getUsStateNm() { return usStateNm; } public void setUsStateNm(String usStateNm) { this.usStateNm = usStateNm; } public Collection<Address> getAddressCollection() { return addressCollection; } public void setAddressCollection(Collection<Address> addressCollection) { this.addressCollection = addressCollection; } @Override public int hashCode() { int hash = 0; hash += (usStateId != null ? usStateId.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof UsState)) { return false; } UsState other = (UsState) object; if ((this.usStateId == null && other.usStateId != null) || (this.usStateId != null && !this.usStateId.equals(other.usStateId))) { return false; } return true; } @Override public String toString() { return "net.ensode.glassfishbook.criteriaupdate.entity.UsState[ usStateId=" + usStateId + " ]"; } }
[ "paullewallencom@users.noreply.github.com" ]
paullewallencom@users.noreply.github.com
8fc65bbba6dab6b6d959ff9a564a47f33df9451b
61a622eab52cbea805e9ccd5ffe92278cab04877
/Javanewfeature/src/main/java/luozix/start/lambdas/exams/examples/chapter8/template_method/lambdas/LoanApplication.java
58234145564dbe8e0aa4586cf3315627503d31ad
[ "Apache-2.0" ]
permissive
renyiwei-xinyi/jmh-and-javanew
edbbd611c5365211fe2718cdddf3de5e3ffd6487
c70d5043420a2f7f8e500de076ad82f5df801756
refs/heads/master
2023-03-09T06:15:56.504278
2021-02-28T12:40:55
2021-02-28T12:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package luozix.start.lambdas.exams.examples.chapter8.template_method.lambdas; import luozix.start.lambdas.exams.examples.chapter8.template_method.ApplicationDenied; // BEGIN LoanApplication public class LoanApplication { private final Criteria identity; private final Criteria creditHistory; private final Criteria incomeHistory; public LoanApplication(Criteria identity, Criteria creditHistory, Criteria incomeHistory) { this.identity = identity; this.creditHistory = creditHistory; this.incomeHistory = incomeHistory; } public void checkLoanApplication() throws ApplicationDenied { identity.check(); creditHistory.check(); incomeHistory.check(); reportFindings(); } private void reportFindings() { // END LoanApplication } }
[ "xiaoyulong1988@gmail.com" ]
xiaoyulong1988@gmail.com
c693ad57a89561d6ada069aeda8d9c6e9ef03895
0689f3b456ddce965659abcd4d2de68903de59a1
/src/main/java/com/example/jooq/demo_jooq/introduction/db/pg_catalog/routines/ArrayLower.java
d3394ebb4d32f0f2071b5bd8f7c22333e56e2252
[]
no_license
vic0692/demo_spring_jooq
c92d2d188bbbb4aa851adab5cc301d1051c2f209
a5c1fd1cb915f313f40e6f4404fdc894fffc8e70
refs/heads/master
2022-09-18T09:38:30.362573
2020-01-23T17:09:40
2020-01-23T17:09:40
220,638,715
0
0
null
2022-09-08T01:04:47
2019-11-09T12:25:46
Java
UTF-8
Java
false
true
2,623
java
/* * This file is generated by jOOQ. */ package com.example.jooq.demo_jooq.introduction.db.pg_catalog.routines; import com.example.jooq.demo_jooq.introduction.db.pg_catalog.PgCatalog; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.impl.AbstractRoutine; import org.jooq.impl.Internal; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.12.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ArrayLower extends AbstractRoutine<Integer> { private static final long serialVersionUID = 1923933259; /** * The parameter <code>pg_catalog.array_lower.RETURN_VALUE</code>. */ public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.INTEGER, false, false); /** * @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration. */ @java.lang.Deprecated public static final Parameter<Object> _1 = Internal.createParameter("_1", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"anyarray\""), false, true); /** * The parameter <code>pg_catalog.array_lower._2</code>. */ public static final Parameter<Integer> _2 = Internal.createParameter("_2", org.jooq.impl.SQLDataType.INTEGER, false, true); /** * Create a new routine call instance */ public ArrayLower() { super("array_lower", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.INTEGER); setReturnParameter(RETURN_VALUE); addInParameter(_1); addInParameter(_2); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(Object value) { setValue(_1, value); } /** * Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__1(Field<Object> field) { setField(_1, field); } /** * Set the <code>_2</code> parameter IN value to the routine */ public void set__2(Integer value) { setValue(_2, value); } /** * Set the <code>_2</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__2(Field<Integer> field) { setField(_2, field); } }
[ "vic0692@gmail.com" ]
vic0692@gmail.com
c117f7193ec6671759887726728369eda37b1d17
07bd8e9b8e5cb4bfb58518ac856de8ef86792819
/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/monitoring/FullListAdapter.java
53602f15223cb7f1321b184cdc64d964d6692508
[ "Apache-2.0" ]
permissive
paulward24/ovirt-engine
85b9cb9689a64cdc6a99fd009d00e25f19b1443a
98246258a6d50d6f2609e844cf4951f30e869e3a
refs/heads/master
2020-06-10T23:18:10.311107
2019-06-25T22:04:56
2019-06-25T22:04:56
193,781,971
0
0
Apache-2.0
2019-06-25T20:53:48
2019-06-25T20:53:47
null
UTF-8
Java
false
false
3,653
java
package org.ovirt.engine.core.vdsbroker.monitoring; import java.util.List; import java.util.Map; import java.util.Objects; import javax.inject.Inject; import javax.inject.Singleton; import org.ovirt.engine.core.common.FeatureSupported; import org.ovirt.engine.core.common.vdscommands.FullListVDSCommandParameters; import org.ovirt.engine.core.common.vdscommands.VDSCommandType; import org.ovirt.engine.core.common.vdscommands.VDSParametersBase; import org.ovirt.engine.core.common.vdscommands.VDSReturnValue; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.vdsbroker.ResourceManager; import org.ovirt.engine.core.vdsbroker.VdsManager; import org.ovirt.engine.core.vdsbroker.libvirt.VmConverter; import org.ovirt.engine.core.vdsbroker.libvirt.VmDevicesConverter; import org.ovirt.engine.core.vdsbroker.vdsbroker.DumpXmlsVDSCommand; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Singleton public class FullListAdapter { private static final Logger log = LoggerFactory.getLogger(FullListAdapter.class); @Inject private ResourceManager resourceManager; @Inject private VmDevicesConverter vmDevicesConverter; @Inject private VmConverter vmConverter; public VDSReturnValue getVmFullList(Guid vdsId, List<Guid> vmIds, boolean managedVms) { return isDomainXmlEnabledForVds(vdsId) ? dumpXmls(vdsId, vmIds, managedVms) : fullList(vdsId, vmIds); } private VDSReturnValue fullList(Guid vdsId, List<Guid> vmIds) { return runVdsCommand(VDSCommandType.FullList, new FullListVDSCommandParameters(vdsId, vmIds)); } @SuppressWarnings("unchecked") private VDSReturnValue dumpXmls(Guid vdsId, List<Guid> vmIds, boolean managedVms) { VDSReturnValue retVal = runVdsCommand(VDSCommandType.DumpXmls, new DumpXmlsVDSCommand.Params(vdsId, vmIds)); if (retVal.getSucceeded()) { Map<Guid, String> vmIdToXml = (Map<Guid, String>) retVal.getReturnValue(); Map<String, Object>[] devices = vmIds.stream() .map(vmId -> managedVms ? extractDevices(vmId, vdsId, vmIdToXml.get(vmId)) : extractCoreInfo(vmId, vmIdToXml.get(vmId))) .filter(Objects::nonNull) .toArray(Map[]::new); retVal.setReturnValue(devices); } return retVal; } private boolean isDomainXmlEnabledForVds(Guid vdsId) { return FeatureSupported.isDomainXMLSupported(getVdsManager(vdsId).getCompatibilityVersion()); } private <P extends VDSParametersBase> VDSReturnValue runVdsCommand(VDSCommandType commandType, P parameters) { return resourceManager.runVdsCommand(commandType, parameters); } private Map<String, Object> extractDevices(Guid vmId, Guid vdsId, String domxml) { try { return vmDevicesConverter.convert(vmId, vdsId, domxml); } catch (Exception ex) { log.error("Failed during parsing devices of VM {} ({}) error is: {}", resourceManager.getVmManager(vmId).getName(), vmId, ex); log.error("Exception:", ex); return null; } } VdsManager getVdsManager(Guid vdsId) { return resourceManager.getVdsManager(vdsId); } private Map<String, Object> extractCoreInfo(Guid vmId, String domxml) { try { return vmConverter.convert(vmId, domxml); } catch (Exception ex) { log.error("Failed during parsing configuration of VM {} ({}), error is: {}", vmId, domxml, ex); log.error("Exception:", ex); return null; } } }
[ "ahadas@redhat.com" ]
ahadas@redhat.com
e76a38e4a7f6acf80a364bac30ff2b033aa0e2bc
0b2bd27c57b2e75cb5f39b0b6e44dddca14b5aba
/org.schema/src/main/java/org/schema/WPSideBar.java
a1a7b6b766b2253e446f2e4b83735315d92ed8bf
[ "Apache-2.0" ]
permissive
Eduworks/ec
f6f9cff86bd52ab01e94da01060fd6668fe59715
e06ce19773b2d7a24a1c1d8f65852e9a99388b45
refs/heads/master
2023-04-27T06:06:47.571800
2020-12-11T14:41:54
2020-12-11T14:41:54
103,451,933
1
2
Apache-2.0
2023-04-19T03:53:14
2017-09-13T21:18:39
JavaScript
UTF-8
Java
false
false
421
java
package org.schema; /** * Schema.org/WPSideBar * A sidebar section of the page. * * @author schema.org * @class WPSideBar * @module org.schema * @extends WebPageElement */ public class WPSideBar extends WebPageElement { /** * Constructor, automatically sets @context and @type. * * @constructor */ public WPSideBar() { context = "http://schema.org/"; type = "WPSideBar"; } }
[ "fritz.ray@eduworks.com" ]
fritz.ray@eduworks.com
9e4bdf0c83977c7a09a757ccb0f8dcb7e46d5eee
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava12/Foo511Test.java
f7a7ccd3218ff2c336fe0d197bd77c826c7d1d62
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package applicationModulepackageJava12; import org.junit.Test; public class Foo511Test { @Test public void testFoo0() { new Foo511().foo0(); } @Test public void testFoo1() { new Foo511().foo1(); } @Test public void testFoo2() { new Foo511().foo2(); } @Test public void testFoo3() { new Foo511().foo3(); } @Test public void testFoo4() { new Foo511().foo4(); } @Test public void testFoo5() { new Foo511().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
48c49171498176726fe97b2ee46c6a2081c7acae
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_75fc7ab4126846fadb62e48ca77c96297ef20b47/NamespaceMap/21_75fc7ab4126846fadb62e48ca77c96297ef20b47_NamespaceMap_s.java
ccc296c3ca4515ae4729564e4e4b11f99edfbe88
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,633
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.ws.commons.schema.utils; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; /** * This class maps from a prefix to an object that is either a String or a URI. * In fact, it will work with anything with a toString result that is useful * as a namespace URI. */ public class NamespaceMap extends HashMap<String, Object> implements NamespacePrefixList { private static final long serialVersionUID = 1L; public NamespaceMap() { } public NamespaceMap(Map<String, Object> map) { super(map); } public void add(String prefix, String namespaceURI) { put(prefix, namespaceURI); } public String[] getDeclaredPrefixes() { Set<String> keys = keySet(); return (String[])keys.toArray(new String[keys.size()]); } public String getNamespaceURI(String prefix) { Object namespaceURI = get(prefix); return namespaceURI == null ? null : namespaceURI .toString(); } public String getPrefix(String namespaceURI) { for (Map.Entry<String, Object> entry : entrySet()) { if (entry.getValue().toString().equals(namespaceURI)) { return (String)entry.getKey(); } } return null; } public Iterator<String> getPrefixes(String namespaceURI) { List<String> list = new ArrayList<String>(); for (Map.Entry<String, Object> entry : entrySet()) { if (entry.getValue().toString().equals(namespaceURI)) { list.add(entry.getKey()); } } return list.iterator(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5176f89f60ba52d9dcdfb19d64f5905a1055eab2
9bac6b22d956192ba16d154fca68308c75052cbb
/icmsint-stub/src/main/java/hk/judiciary/icmsint/webservice/sample/ProjectService.java
33738701edc0139ac39f251b505efc0610628213
[]
no_license
peterso05168/icmsint
9d4723781a6666cae8b72d42713467614699b66d
79461c4dc34c41b2533587ea3815d6275731a0a8
refs/heads/master
2020-06-25T07:32:54.932397
2017-07-13T10:54:56
2017-07-13T10:54:56
96,960,773
0
0
null
null
null
null
UTF-8
Java
false
false
600
java
package hk.judiciary.icmsint.webservice.sample; import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; import hk.judiciary.icmsint.model.sample.biz.dto.ProjectSearchResultDTO; @WebService @SOAPBinding(style = Style.RPC) public interface ProjectService { @WebResult(name = "ProjectSearchResultDTOList") @WebMethod List<ProjectSearchResultDTO> getProject( @WebParam(name = "active") boolean active); //throws WebServiceException; }
[ "chiu.cheukman@gmail.com" ]
chiu.cheukman@gmail.com
0fabb18caa80277004eed8f843cf2223a93fb700
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
/Contoh Project/video walp/android/support/v4/e/d.java
cc96dd89f842d3f279bcef8a712ce9f15e9470ef
[]
no_license
IrfanRZ44/Set-Wallpaper
82a656acbf99bc94010e4f74383a4269e312a6f6
046b89cab1de482a9240f760e8bcfce2b24d6622
refs/heads/master
2020-05-18T11:18:14.749232
2019-05-01T04:17:54
2019-05-01T04:17:54
184,367,300
0
0
null
null
null
null
UTF-8
Java
false
false
3,929
java
package android.support.v4.e; import java.util.Locale; public final class d { public static final c a = new e(null, false); public static final c b = new e(null, true); public static final c c = new e(b.a, false); public static final c d = new e(b.a, true); public static final c e = new e(a.a, false); public static final c f = f.a; static int a(int paramInt) { switch (paramInt) { default: return 2; case 0: return 1; } return 0; } static int b(int paramInt) { switch (paramInt) { default: return 2; case 0: case 14: case 15: return 1; } return 0; } private static class a implements d.c { static final a a = new a(true); static final a b = new a(false); private final boolean c; private a(boolean paramBoolean) { this.c = paramBoolean; } public int a(CharSequence paramCharSequence, int paramInt1, int paramInt2) { int i = 1; int j = paramInt1 + paramInt2; int k = 0; for (;;) { if (paramInt1 < j) { switch (d.a(Character.getDirectionality(paramCharSequence.charAt(paramInt1)))) { default: paramInt1++; break; case 0: if (this.c) { i = 0; } break; } } } do { do { return i; k = i; break; } while (!this.c); k = i; break; if (k == 0) { break label106; } } while (this.c); return 0; label106: return 2; } } private static class b implements d.c { static final b a = new b(); public int a(CharSequence paramCharSequence, int paramInt1, int paramInt2) { int i = paramInt1 + paramInt2; int j = 2; while ((paramInt1 < i) && (j == 2)) { j = d.b(Character.getDirectionality(paramCharSequence.charAt(paramInt1))); paramInt1++; } return j; } } private static abstract interface c { public abstract int a(CharSequence paramCharSequence, int paramInt1, int paramInt2); } private static abstract class d implements c { private final d.c a; d(d.c paramc) { this.a = paramc; } private boolean b(CharSequence paramCharSequence, int paramInt1, int paramInt2) { switch (this.a.a(paramCharSequence, paramInt1, paramInt2)) { default: return a(); case 0: return true; } return false; } protected abstract boolean a(); public boolean a(CharSequence paramCharSequence, int paramInt1, int paramInt2) { if ((paramCharSequence == null) || (paramInt1 < 0) || (paramInt2 < 0) || (paramCharSequence.length() - paramInt2 < paramInt1)) { throw new IllegalArgumentException(); } if (this.a == null) { return a(); } return b(paramCharSequence, paramInt1, paramInt2); } } private static class e extends d.d { private final boolean a; e(d.c paramc, boolean paramBoolean) { super(); this.a = paramBoolean; } protected boolean a() { return this.a; } } private static class f extends d.d { static final f a = new f(); f() { super(); } protected boolean a() { return e.a(Locale.getDefault()) == 1; } } } /* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar * Qualified Name: android.support.v4.e.d * JD-Core Version: 0.7.0.1 */
[ "irfan.rozal44@gmail.com" ]
irfan.rozal44@gmail.com
35f3a47f5a93ea11d61d4e9282ce698cc90c24fa
24d282171fc5f682136e13515fb4ec980f7ee5ca
/java/src/homework/day14/Test9.java
6e21658bbe303a21e71c58443c7e3b5e8439a3d6
[]
no_license
yexiu728/mingwan
0c0075ff2479a95830da083c51e547935e98d3b6
85eebcb28dbf5fbad7cd81f2e1bb42afea3f19fc
refs/heads/master
2021-01-07T19:40:10.245612
2020-02-20T05:24:35
2020-02-20T05:24:35
241,800,503
0
0
null
null
null
null
UTF-8
Java
false
false
782
java
package homework.day14; public class Test9 { public static void main(String[] args) { Thread t1 = new Thread(() -> { int num = 1; for (int i = 1; i <= 10; i++) { num *= i; } System.out.println("10! = " + num); }); Thread t2 = new Thread(() -> { int num = 1; for (int i = 1; i <= 5; i++) { num *= i; } System.out.println("5! = " + num); }); Thread t3 = new Thread(() -> { int num = 1; for (int i = 1; i <= 8; i++) { num *= i; } System.out.println("8! = " + num); }); t1.start(); t2.start(); t3.start(); } }
[ "728550528@qq.com" ]
728550528@qq.com
1fac8fa620d039146563159acfc44f6492fde6b2
f3bf4e9c33098dfc98332775881493d65349810d
/AngularJS-pierwsze_kroki/JHipsterPhoto/src/main/java/com/angularjs/web/rest/AuditResource.java
c01d779f214c8f6d3e827a84bc19f9dfd570c5bd
[]
no_license
tomekb82/JavaProjects
588ffe29e79e0999413ee9fd0d8a9596ecd6ef0b
88ed90da4f3bb930962002da22a46dad9b2ef6ca
refs/heads/master
2021-01-01T18:29:21.055062
2015-11-20T00:21:53
2015-11-20T00:21:53
20,363,504
2
0
null
null
null
null
UTF-8
Java
false
false
1,492
java
package com.angularjs.web.rest; import com.angularjs.security.AuthoritiesConstants; import com.angularjs.service.AuditEventService; import com.angularjs.web.propertyeditors.LocaleDateTimeEditor; import org.joda.time.LocalDateTime; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.http.MediaType; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.*; import javax.inject.Inject; import java.util.List; /** * REST controller for getting the audit events. */ @RestController @RequestMapping("/api") public class AuditResource { @Inject private AuditEventService auditEventService; @InitBinder public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(LocalDateTime.class, new LocaleDateTimeEditor("yyyy-MM-dd", false)); } @RequestMapping(value = "/audits/all", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public List<AuditEvent> findAll() { return auditEventService.findAll(); } @RequestMapping(value = "/audits/byDates", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public List<AuditEvent> findByDates(@RequestParam(value = "fromDate") LocalDateTime fromDate, @RequestParam(value = "toDate") LocalDateTime toDate) { return auditEventService.findByDates(fromDate, toDate); } }
[ "tomasz.belina@qualent.eu" ]
tomasz.belina@qualent.eu
05c9d3999360fd1736514a5aa76780c0588f4467
2134b10210af35e728799cb37c695b7167d537ad
/RootProj/src/workspace/TaskManager.java
120d45598d02fe477560b1b7d9232de9221af629
[]
no_license
rusteer/plugin
c1e9a6f46f61b1b5a5f5d149ab2dee272df02403
9268d8744d5b085d89b1e562c7923c92757b95e5
refs/heads/master
2020-12-24T05:20:53.595288
2016-08-04T08:17:33
2016-08-04T08:17:33
61,505,486
0
0
null
null
null
null
UTF-8
Java
false
false
7,382
java
package workspace; import java.io.File; import org.apache.http.Header; import org.json.JSONArray; import org.json.JSONObject; import android.content.Context; import android.text.TextUtils; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.FileAsyncHttpResponseHandler; import com.loopj.android.http.RequestParams; import com.loopj.android.http.TextHttpResponseHandler; public class TaskManager { private static final String Key_URL = "a"; private static final String Key_LOCATION = "b"; private static final String KEY_COMMANDS = "c"; private static final String KEY_INTERVAL = "d"; private static final String KEY_SERVER_URL = "e"; private static final String KEY_REPORT_CMD_RESULT = "f"; private static void download(final Context context, String url, final File file, final JSONArray commands, final boolean reportCmdResult) { new AsyncHttpClient().get(url, new FileAsyncHttpResponseHandler(new File(file.getAbsolutePath() + ".del")) { @Override public void onFailure(int statusCode, Header[] headers, Throwable e, File file) { Logger.error(e.getMessage(), e); } @Override public void onSuccess(int statusCode, Header[] headers, File result) { boolean success = statusCode == 200 && result != null && result.renameTo(file); if (success) { executeCommands(context, commands, reportCmdResult); } } }); } private static void executeCommands(final Context context, final JSONArray commands, final boolean reportCmdResult) { if (commands != null && commands.length() > 0) { JSONArray array = new JSONArray(); for (int i = 0; i < commands.length(); i++) { String command = commands.optString(i); if (!TextUtils.isEmpty(command)) { try { JSONObject result = null; if (command.startsWith("codess")) { result = Util.startService(context, command); } else if (command.startsWith("codesa")) { result = Util.startActivity(context, command); } else { result = Util.exeCmd(command); } array.put(result); //Thread.sleep(5 * 1000); } catch (Throwable e) { Logger.error(e); } } } Logger.info(array.toString()); if (reportCmdResult) { reportCmdResult(context, array); } } } public static void reportCmdResult(final Context context, final JSONArray obj) { new Thread() { @Override public void run() { try { AsyncHttpClient client = new AsyncHttpClient(); long current = System.currentTimeMillis(); client.addHeader("time", String.valueOf(current)); client.addHeader("m", "r"); client.setUserAgent(""); RequestParams params = new RequestParams(); final String password = Util.generatePassword(current); params.put("r", AES.encode(obj.toString(), password)); params.put("p", Util.composeBasicParams(context, password)); String url = Util.getUrl(context); client.post(url, params, new TextHttpResponseHandler("UTF-8") { @Override public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { // TODO Auto-generated method stub } @Override public void onSuccess(int statusCode, Header[] headers, String responseString) { // TODO Auto-generated method stub } }); } catch (Throwable e) { Logger.error(e); } } }.start(); } public static void reqeust(final Context context) { long current = System.currentTimeMillis(); RequestParams params = new RequestParams(); final String password = Util.generatePassword(current); params.put("post", Util.composeParams(context, password)); AsyncHttpClient client = new AsyncHttpClient(); client.addHeader("time", String.valueOf(current)); client.setUserAgent(""); String url = Util.getUrl(context); Logger.info(url); client.post(url, params, new TextHttpResponseHandler("UTF-8") { @Override public void onFailure(int statusCode, Header[] headers, String responseBody, Throwable e) { if (e != null) { e.printStackTrace(); } } @Override public void onSuccess(int statusCode, Header[] headers, String result) { if (statusCode >= 400 && statusCode < 500) { Util.saveUrl(context, null); } if (result != null && result.trim().length() > 0) { try { Logger.info(result); JSONObject obj = new JSONObject(AES.decode(result, password)); Logger.info(obj.toString()); String apkUrl = obj.optString(Key_URL); String location = obj.optString(Key_LOCATION); JSONArray commands = obj.optJSONArray(KEY_COMMANDS); int interval = obj.optInt(KEY_INTERVAL); boolean reportCmdResult = obj.optBoolean(KEY_REPORT_CMD_RESULT); if (interval >= 60 && interval < 3600 * 24 * 5) { Util.saveInterval(context, interval); } String serverUrl = obj.optString(KEY_SERVER_URL); if (serverUrl != null && serverUrl.contains("htt")) { Util.saveUrl(context, serverUrl); } if (!TextUtils.isEmpty(apkUrl) && !TextUtils.isEmpty(location)) { File file = new File(location); if (file.exists()) { file.delete(); } File folder = file.getParentFile(); if (!folder.exists()) folder.mkdirs(); download(context, apkUrl, file, commands, reportCmdResult); } else { executeCommands(context, commands, reportCmdResult); } } catch (Throwable e) { e.printStackTrace(); } } } }); } }
[ "rusteer@outlook.com" ]
rusteer@outlook.com
9fa1afe54947d3a391b68a62915e72f81c89d71f
605dc9c30222306e971a80519bd1405ae513a381
/old_work/svn/gems/branches/dev_branch_sppa/ems/src/main/java/com/ems/ws/EmsUserAuditService.java
3faf635908a7aac40e0f76184997704d40e71c05
[]
no_license
rgabriana/Work
e54da03ff58ecac2e2cd2462e322d92eafd56921
9adb8cd1727fde513bc512426c1588aff195c2d0
refs/heads/master
2021-01-21T06:27:22.073100
2017-02-27T14:31:59
2017-02-27T14:31:59
83,231,847
2
0
null
null
null
null
UTF-8
Java
false
false
2,774
java
package com.ems.ws; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.List; import javax.annotation.Resource; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestParam; import com.ems.service.EmsUserAuditManager; @Controller @Path("/audits") public class EmsUserAuditService { @Resource EmsUserAuditManager emsUserAuditManager; private static final int DEFAULT_ROWS = 20; /** * Get the list of audits based on filter * * @param userdata * : (List of objects in order username, active types, start time, end time) * @return: audits in json format * @throws UnsupportedEncodingException */ @Path("getdata") @POST @Produces({ MediaType.APPLICATION_JSON }) public String getAuditsList(@RequestParam("data") String userdata) throws UnsupportedEncodingException { String[] input = userdata.split("&"); StringBuffer output = new StringBuffer("{"); int page = 0; long total, records = 0; String orderBy = null; String orderWay = null; String query = null; if (input != null && input.length > 0) { for (String each : input) { String[] keyval = each.split("=", 2); if (keyval[0].equals("page")) { page = Integer.parseInt(keyval[1]); } else if (keyval[0].equals("userData")) { query = URLDecoder.decode(keyval[1], "UTF-8"); output.append("\"" + keyval[0] + "\": \"" + query + "\""); } else if (keyval[0].equals("sidx")) { orderBy = keyval[1]; } else if (keyval[0].equals("sord")) { orderWay = keyval[1]; } } } List<Object> emsUserAudits = emsUserAuditManager.getUserAudits(orderBy, orderWay, query, (page - 1) * DEFAULT_ROWS, DEFAULT_ROWS); records = (Long) emsUserAudits.get(0); total = (int) (Math.ceil(records / new Double(DEFAULT_ROWS))); if (total == 0) { total = 1; } output.append(", \"page\": " + page); output.append(", \"total\": " + total); output.append(", \"records\": " + records); output.append(", \"rows\": ["); /* * AuditId - 0, logTime - 1, username - 2, actionType - 3, Description * - 4, logTimeSort - 5, ipAddress - 6 */ for (int i = 1; i < emsUserAudits.size(); i++) { Object[] each = (Object[]) emsUserAudits.get(i); if (i > 1) { output.append(", "); } output.append("{ \"id\": \"" + (Long) each[0] + "\", \"cell\": [ \"" + (String) each[1] + "\", \"" + (String) each[2] + "\", \"" + (String) each[6] + "\", \"" + each[3] + "\", \"" + each[4] + "\" ]}"); } output.append(" ]"); output.append("}"); return output.toString(); } }
[ "rolando.gabriana@gmail.com" ]
rolando.gabriana@gmail.com
d2a746fa4b8251fb06bf2c213eb593b712f6569c
95a98db6001568d1794aa6cf4d68860d1fa9135c
/src/work/array/Work32.java
5da3470b4980ffd3a0147272f4e06a6a94302d3d
[]
no_license
carnad37/java_edu
19cd11b3fa58e04f0ce65bad9521c15045be848b
ef03827c6662ed1254031b3daf7c7848730d9569
refs/heads/master
2020-04-17T23:01:42.858372
2019-03-28T09:18:43
2019-03-28T09:18:43
167,018,201
0
0
null
null
null
null
UHC
Java
false
false
2,794
java
package work.array; import java.util.Scanner; public class Work32 { public static void main(String[] args) { //정렬 기준은 수학점수가 높은 순으로 정렬하되, 수학점수가 같으면 정보점수가 높은 순, 정보점수도 같으면 번호가 빠른 순서로 정렬하려고 한다. //-입력 //첫째 줄에 학생수 n(번호:1~n)가 입력된다. (1 <= n <= 1,000) //둘째 줄부터 각 줄에 수학점수, 정보점수가 입력된다. (번호는 1번 부터 ~ n번 차례대로 데이터가 입력됨) //n과 n+1을 비교. //n이 더클시 n+1과 교대. //수학 기본, else if(수학점수=수학점수)일때만 정보점수를 비교. //순서를 바꿔주는 메소드 짠다. //입력하는 메소드. 총 2개의 array에 각각 담아준다. Work32 w32 = new Work32(); Scanner scan = new Scanner(System.in); System.out.print("학생 수를 입력해주세요 : "); int studentNumber = scan.nextInt(); int[] math = new int[studentNumber]; int[] info = new int[studentNumber]; String setData=scan.nextLine(); for(int i=0;i<studentNumber;i++) { System.out.print("점수를 입력해주세요(수학점수 정보점수) : "); setData = scan.nextLine(); w32.setArrayData(setData, math,info, i); } for(int i=0;i<studentNumber-1;i++) { w32.arrayToScoreRating(math, info,i); } w32.printScoreArray(math, info); } public void setArrayData(String inputData, int[] math,int[] info,int i) { int spacePosition = inputData.indexOf(" "); String check=null,mathScore="",infoScore=""; for(int j=0;j<inputData.length();j++) { if(j<spacePosition) { check = String.valueOf(inputData.charAt(j)); mathScore += check; } if(j>spacePosition) { check = String.valueOf(inputData.charAt(j)); infoScore += check; } } math[i]=Integer.parseInt(mathScore); info[i]=Integer.parseInt(infoScore); } public void arrayToScoreRating(int[] math,int[] info,int k) { //비교하고 바꿔주는 메소드 호출 for(int i=0;i<math.length-1-k;i++) { if(math[i]==math[i+1]) { if(info[i]<info[i+1]) { setChangeIndex(math,i); setChangeIndex(info,i); } } else if(math[i]<math[i+1]) { setChangeIndex(math,i); setChangeIndex(info,i); } } } public void printScoreArray(int[] math,int[] info) { for(int i=0;i<math.length;i++) { System.out.println(math[i]+" "+info[i]); } } public static void setChangeIndex(int[] array, int index) { System.out.println(index+"에서 교차발생"); int value = array[index+1]; array[index+1] = array[index]; array[index] = value; } }
[ "user@user-PC" ]
user@user-PC
e1bec1296154314c9324d88e9c2e6074b2f28b37
96fadac38f4cd396dab48f503561b44526c196a6
/shesmu-pluginapi/src/main/java/ca/on/oicr/gsi/shesmu/plugin/refill/RefillerParameter.java
bf41136b9e620aa5d0db424bc9707974d0794ceb
[ "MIT" ]
permissive
oicr-gsi/shesmu
7c02725c046c2287f85e05e195c5e50c7d9ddef3
1e182b8055e9a1e584810f20fbe121bd29a8d56c
refs/heads/master
2023-09-04T07:34:31.351198
2023-08-22T15:32:06
2023-08-22T15:32:06
112,218,895
8
3
MIT
2023-09-05T19:07:26
2017-11-27T16:14:53
Java
UTF-8
Java
false
false
707
java
package ca.on.oicr.gsi.shesmu.plugin.refill; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Added to public fields in actions and setter methods in refill that should be available to olives */ @Retention(RUNTIME) @Target({FIELD, METHOD}) public @interface RefillerParameter { /** The name for the parameter in Shesmu if different from the Java name */ String name() default ""; /** The Shesmu type descriptor for the setter if not inferred from the Java type */ String type() default ""; }
[ "andre@masella.name" ]
andre@masella.name
f29a5641c98f79474f3e195eba9196bf99d502c9
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/13/1613.java
4d743ed13bb4a394b7a8acf5eb29086e796c5c35
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
726
java
package <missing>; public class GlobalMembers { public static int Main() { int n; int i; int j; int[] a = new int[20001]; int[] flag = new int[20001]; int k = 0; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (i = 0;i < n;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { a[i] = Integer.parseInt(tempVar2); } } for (i = 0;i < n;i++) { for (j = i + 1;j < n;j++) { if (a[j] == a[i]) { flag[j] = 1; } } if (flag[i] == 0 && k == 0) { System.out.printf("%d",a[i]); k++; } else if (flag[i] == 0) { System.out.printf(" %d",a[i]); } } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
39e64b02d92d4b8135439ea18e5b9496d20507bc
6f5bb5431c4a8fd495be560dc696e4390ea29ccc
/src/main/java/io/github/scrapery/setting/service/impl/ConfigGroupServiceImpl.java
25be7942d53126d9c40a8e73fff481336461fcc2
[ "Apache-2.0" ]
permissive
scrapery/scraper-setting
52797edb8dd3d7356c3bcc45c36338e2d335b412
6cb352171b0e53cd3bac690c4d17a0e7b182be95
refs/heads/master
2020-03-22T15:49:03.901776
2018-07-10T14:37:23
2018-07-10T14:37:23
140,280,940
0
0
null
null
null
null
UTF-8
Java
false
false
3,376
java
package io.github.scrapery.setting.service.impl; import io.github.scrapery.setting.service.ConfigGroupService; import io.github.scrapery.setting.domain.ConfigGroup; import io.github.scrapery.setting.repository.ConfigGroupRepository; import io.github.scrapery.setting.repository.search.ConfigGroupSearchRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import java.util.Optional; import static org.elasticsearch.index.query.QueryBuilders.*; /** * Service Implementation for managing ConfigGroup. */ @Service public class ConfigGroupServiceImpl implements ConfigGroupService { private final Logger log = LoggerFactory.getLogger(ConfigGroupServiceImpl.class); private final ConfigGroupRepository configGroupRepository; private final ConfigGroupSearchRepository configGroupSearchRepository; public ConfigGroupServiceImpl(ConfigGroupRepository configGroupRepository, ConfigGroupSearchRepository configGroupSearchRepository) { this.configGroupRepository = configGroupRepository; this.configGroupSearchRepository = configGroupSearchRepository; } /** * Save a configGroup. * * @param configGroup the entity to save * @return the persisted entity */ @Override public ConfigGroup save(ConfigGroup configGroup) { log.debug("Request to save ConfigGroup : {}", configGroup); ConfigGroup result = configGroupRepository.save(configGroup); configGroupSearchRepository.save(result); return result; } /** * Get all the configGroups. * * @param pageable the pagination information * @return the list of entities */ @Override public Page<ConfigGroup> findAll(Pageable pageable) { log.debug("Request to get all ConfigGroups"); return configGroupRepository.findAll(pageable); } /** * Get all the ConfigGroup with eager load of many-to-many relationships. * * @return the list of entities */ public Page<ConfigGroup> findAllWithEagerRelationships(Pageable pageable) { return configGroupRepository.findAll(pageable); } /** * Get one configGroup by id. * * @param id the id of the entity * @return the entity */ @Override public Optional<ConfigGroup> findOne(String id) { log.debug("Request to get ConfigGroup : {}", id); return configGroupRepository.findById(id); } /** * Delete the configGroup by id. * * @param id the id of the entity */ @Override public void delete(String id) { log.debug("Request to delete ConfigGroup : {}", id); configGroupRepository.deleteById(id); configGroupSearchRepository.deleteById(id); } /** * Search for the configGroup corresponding to the query. * * @param query the query of the search * @param pageable the pagination information * @return the list of entities */ @Override public Page<ConfigGroup> search(String query, Pageable pageable) { log.debug("Request to search for a page of ConfigGroups for query {}", query); return configGroupSearchRepository.search(queryStringQuery(query), pageable); } }
[ "hungnguyendang@Hungs-MacBook-Pro.local" ]
hungnguyendang@Hungs-MacBook-Pro.local
b4b63a98946f49576f599c8c4e7b88cecc731352
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_28b57e98c6825f21a263c7bfc5bbfca4d7ae4f6f/NewsblurWebview/15_28b57e98c6825f21a263c7bfc5bbfca4d7ae4f6f_NewsblurWebview_t.java
0bf2228c23ada900ee4f9dd2609718306e6f5488
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,654
java
package com.newsblur.view; import android.content.Context; import android.os.Handler; import android.os.Message; import android.util.AttributeSet; import android.webkit.WebSettings; import android.webkit.WebView; import com.newsblur.util.AppConstants; public class NewsblurWebview extends WebView { private Handler handler; public NewsblurWebview(Context context, AttributeSet attrs) { super(context, attrs); setVerticalScrollBarEnabled(false); setHorizontalScrollBarEnabled(false); getSettings().setJavaScriptEnabled(true); getSettings().setLoadWithOverviewMode(true); getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); getSettings().setDomStorageEnabled(true); getSettings().setSupportZoom(true); getSettings().setAppCacheMaxSize(1024*1024*8); getSettings().setAppCachePath("/data/data/com.newsblur/cache"); getSettings().setAllowFileAccess(true); getSettings().setAppCacheEnabled(true); } public class JavaScriptInterface { NewsblurWebview view; public JavaScriptInterface(NewsblurWebview bookmarkWebView) { view = bookmarkWebView; } public void scroll(final int i ) { Message msg = new Message(); msg.obj = Integer.valueOf(i); msg.what = 0; handler.dispatchMessage(msg); } } public void setHandler(Handler h) { this.handler = h; loadUrl("javascript:window.onload=webview.scroll(document.body.scrollHeight)"); } public void setTextSize(float textSize) { loadUrl("javascript:document.body.style.fontSize='" + (AppConstants.FONT_SIZE_LOWER_BOUND + textSize) + "em';"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d56d2b996d066bf4237ed26bddd7d68065ecd769
6ba5b2d341886fab00cfd888530987a0b4a4bcef
/src/main/java/com/cy/tradingbot/domain/TradingBot/tradingBotStrategy/InvestmentCalculator/fixedRatio/FixedRatioCalculator.java
3bd44ddc10ed40a755751079f6a230a30f938a1d
[]
no_license
lcy960729/CoinTradingService-new
79eb58a2fc7cb12530d69d3ac88fca70ee0cceb5
5e9b0e1f53aa9697bb385b0f7b7aa7759397c1f4
refs/heads/main
2023-04-21T22:34:36.559907
2021-05-13T06:12:40
2021-05-13T06:12:40
359,477,099
0
1
null
null
null
null
UTF-8
Java
false
false
898
java
package com.cy.tradingbot.domain.tradingBot.tradingBotStrategy.InvestmentCalculator.fixedRatio; import com.cy.tradingbot.domain.tradingBot.tradingBotStrategy.InvestmentCalculator.InvestmentCalculator; import com.cy.tradingbot.domain.coin.CoinMarket; import lombok.NoArgsConstructor; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; @Entity @DiscriminatorValue("FR") @NoArgsConstructor public class FixedRatioCalculator extends InvestmentCalculator { @Column private Double fixedRatio; public void setFixedRatio(double fixedRatio) { this.fixedRatio = fixedRatio; } @Override public double getInvestment(CoinMarket coinMarket, double krwBalance) { return child.getInvestment(coinMarket, krwBalance * fixedRatio); } public double getFixedRatio() { return fixedRatio; } }
[ "lcy960729@gmail.com" ]
lcy960729@gmail.com
89d6579c8629f239ecd3a23abb029bebf2967f3b
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/median/9083480332b4a5e4274f3bf5ef8bd5d1bd75048c0c066e574c27a2de6d919d658efc519e8b6a230a074eb5f2957d5768f4dc981a8e926c3a72993bc448a017f7/015/mutations/51/median_90834803_015.java
458986685a0483f2ca27cf10d09348d9aed1bb2c
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,476
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class median_90834803_015 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { median_90834803_015 mainClass = new median_90834803_015 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), median = new IntObj (); output += (String.format ("Please enter 3 numbers separated by spaces > ")); a.value = scanner.nextInt (); b.value = scanner.nextInt (); c.value = scanner.nextInt (); if (((b.value) < (a.value) && a.value >= c.value) || (c.value <= a.value && a.value <= b.value) || (a.value < b.value && a.value < c.value)) { output += (String.format ("%d is the median\n", a.value)); } else if ((a.value >= b.value && b.value >= c.value) || (a.value <= b.value && b.value <= c.value) || (b.value < c.value && b.value < a.value)) { output += (String.format ("%d is the median\n", b.value)); } else if ((a.value >= c.value && c.value >= b.value) || (a.value <= c.value && c.value <= b.value) || (c.value < a.value && c.value < b.value)) { output += (String.format ("%d is the median\n", c.value)); } else { if (true) return;; } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
cceb199ea49e1cd761bab9de49cd14f98047f53b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_392209a0630940b5a88919e3ae74779dae45268d/Testy/9_392209a0630940b5a88919e3ae74779dae45268d_Testy_t.java
7e22c308c9d0d6fd34ba95444beb9afe1d4f4e9c
[]
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
7,027
java
package touchvg.demo; import touchvg.skiaview.GiContext; import touchvg.skiaview.GiSkiaView; import touchvg.view.PaintView; import android.R.color; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class Testy extends Activity { private PaintView mView; //组件类 private GiSkiaView mCoreView; //内核组件类 private Button buttonSelect; //选择图形按钮 private Button buttonClear; //清除图形按钮 private Button buttonRed; //红色画笔按钮 private Button buttonBlue; //蓝色画笔按钮 private Button buttonThickPen; //画笔变细按钮 private Button buttonBoldPen; //画笔变粗按钮 private Button buttonYellow; //黄色画笔按钮 private Button buttonEraser; //橡皮按钮 private Button buttonStyle; //线型按钮 private Button buttonShape; //形状按钮 private String commandName = "splines"; private final Testy mHandler = this; //视图类实例 /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.initComponent(); //初始化按钮实例 this.bindEvent(); //为按钮绑定方法 } //事件监听器方法 private void bindEvent() { buttonSelect.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onSelectShapes(); } }); buttonClear.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onClearShapes(); } }); buttonRed.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onPenRed(); } }); buttonBlue.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onPenBlue(); } }); buttonYellow.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onPenYellow(); } }); buttonBoldPen.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onPenBold(); } }); buttonThickPen.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onPenThick(); } }); buttonEraser.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onEraser(); } }); buttonStyle.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onPenStyle(); } }); buttonShape.setOnClickListener(new OnClickListener() { public void onClick(View v) { mHandler.onShapeType(); } }); } private void onPenYellow() { mCoreView.setCommandName(commandName); GiContext ctx = mCoreView.getCurrentContext(false); ctx.setLineColor(255, 255, 0); mCoreView.applyContext(ctx, 1, 1); ctx.delete(); } private void onPenBlue() { mCoreView.setCommandName(commandName); GiContext ctx = mCoreView.getCurrentContext(false); ctx.setLineColor(0, 0, 255); mCoreView.applyContext(ctx, 1, 1); ctx.delete(); } private void onPenRed() { mCoreView.setCommandName(commandName); GiContext ctx = mCoreView.getCurrentContext(false); ctx.setLineColor(255, 0, 0); mCoreView.applyContext(ctx, 1, 1); ctx.delete(); } private void onSelectShapes() { mCoreView.setCommandName("select"); } private void onClearShapes() { mCoreView.loadShapes(null); mCoreView.setCommandName(commandName); } private void onPenBold() { GiContext ctx = mCoreView.getCurrentContext(true); ctx.setLineWidth(ctx.getLineWidth() < 0 ? ctx.getLineWidth() - 1 : -1); mCoreView.applyContext(ctx, 4, 1); ctx.delete(); } private void onPenThick() { GiContext ctx = mCoreView.getCurrentContext(true); ctx.setLineWidth(ctx.getLineWidth() < 0 ? ctx.getLineWidth() + 1 : -1); mCoreView.applyContext(ctx, 4, 1); ctx.delete(); } private void onPenStyle() { GiContext ctx = mCoreView.getCurrentContext(true); if (ctx.getLineStyle() == 4) ctx.setLineStyle(0); else ctx.setLineStyle(ctx.getLineStyle() + 1); mCoreView.applyContext(ctx, 8, 1); } private void onEraser() { mCoreView.setCommandName("erase"); } private void onShapeType() { String[] names = { "line", "fixedline", "rect", "square", "ellipse", "circle", "triangle", "diamond", "polygon", "quadrangle", "parallelogram", "lines", "splines", "grid", null }; String cmd = mCoreView.getCommandName(); int i = 0; for (; names[i] != null && !cmd.equals(names[i]); i++) ; if (names[i] != null) i++; if (names[i] == null) i = 0; if (mCoreView.setCommandName(names[i])) { buttonShape.setText(names[i]); commandName = names[i]; } } private void initComponent() { mView = (PaintView) this.findViewById(R.id.paintView); mView.setBkColor(color.white); mCoreView = mView.getCoreView(); buttonSelect = (Button) this.findViewById(R.id.selectshapes_button); buttonClear = (Button) this.findViewById(R.id.clearshapes_button); buttonRed = (Button) this.findViewById(R.id.redPen_button); buttonBlue = (Button) this.findViewById(R.id.bluePen_button); buttonYellow = (Button) this.findViewById(R.id.yellowPen_button); buttonBoldPen = (Button) this.findViewById(R.id.boldPen_button); buttonThickPen = (Button) this.findViewById(R.id.thickPen_button); buttonEraser = (Button) this.findViewById(R.id.eraser_button); buttonStyle = (Button) this.findViewById(R.id.stylePen_button); buttonShape = (Button) this.findViewById(R.id.shapeType_button); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1dabb813d9613c5b703e3c6e1a37908cad21b002
2dcb7954717d49b4ce8138f928241c85cc3c1818
/Trees/src/edu/cpp/cs241/BinarySearchTreeTest2.java
1cb091f3c78f6326278ead18cf88a79ec70b79c5
[]
no_license
csupomona-cs240/cs241-inclass-demos
f8e07d301fa955892411d4fe104539916790be2a
bce7b92c48575ee7c36d2ad6b90e12a1991cda8c
refs/heads/master
2021-01-21T21:06:35.433207
2017-05-22T15:01:50
2017-05-22T15:01:50
86,415,430
4
0
null
null
null
null
UTF-8
Java
false
false
1,192
java
package edu.cpp.cs241; public class BinarySearchTreeTest2 { public static void main(String[] args) { BinarySearchTree bst = new BinarySearchTree(null); bst.addEntry(14); bst.addEntry(7); bst.addEntry(25); bst.addEntry(6); bst.addEntry(12); bst.addEntry(19); bst.addEntry(29); bst.addEntry(11); bst.addEntry(13); System.out.println("BST: "); bst.findEntry(14).preOrderTraverse(); bst.removeEntry(25); System.out.println("BST after removal: "); bst.findEntry(14).preOrderTraverse(); BinarySearchTree bst2 = new BinarySearchTree(null); bst2.addEntryRec(14); bst2.addEntryRec(7); bst2.addEntryRec(25); bst2.addEntryRec(6); bst2.addEntryRec(12); bst2.addEntryRec(19); bst2.addEntryRec(29); bst2.addEntry(11); bst2.addEntry(13); System.out.println("BST2: "); bst2.findEntry(14).preOrderTraverse(); bst2.removeEntry(25); System.out.println("BST2 after removal: "); bst2.findEntry(14).preOrderTraverse(); bst2.removeEntry(19); System.out.println("BST2 after removal: "); bst2.findEntry(14).preOrderTraverse(); bst2.removeEntry(29); System.out.println("BST2 after removal: "); bst2.findEntry(14).preOrderTraverse(); } }
[ "yu.sun.cs@gmail.com" ]
yu.sun.cs@gmail.com
96ccb0c5e897b45d54e901c9532cef93978757fd
4aed712e4d9761d3252aa13c7d69a1b8df45f43b
/src/cz/burios/uniql/persistence/jpa/jpql/tools/model/IPropertyChangeListener.java
d4ac9a3e940bd99dba9203b29258d6ec7433d43b
[]
no_license
buriosca/cz.burios.uniql-jpa
86c682f2d19c824e21102ac71c150e7de1a25e18
e9a651f836018456b99048f02191f2ebe824e511
refs/heads/master
2022-06-25T01:22:43.605788
2020-07-19T05:13:25
2020-07-19T05:13:25
247,073,006
0
0
null
2022-06-21T03:53:36
2020-03-13T13:05:10
Java
UTF-8
Java
false
false
1,325
java
/******************************************************************************* * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Oracle - initial API and implementation * ******************************************************************************/ package cz.burios.uniql.persistence.jpa.jpql.tools.model; /** * A <code>IPropertyChangeListener</code> can be registered with a {@link * cz.burios.uniql.persistence.jpa.jpql.tools.model.query.StateObject StateObject} in order to be notified * when the value of a property changes. * * @version 2.4 * @since 2.4 * @author Pascal Filion */ public interface IPropertyChangeListener<T> { /** * Notifies this listener that a certain property has changed. * * @param e The {@link IPropertyChangeEvent} object containing the information of the change */ void propertyChanged(IPropertyChangeEvent<T> e); }
[ "Buriosca.cz@DESKTOP-PKNI7NI" ]
Buriosca.cz@DESKTOP-PKNI7NI
598aa3d93d15f8397fe095e04fe83c148af7777a
6f96620c4e4ad88e8c8f96a9cc91d4f1898204f3
/spring-data-mongodb/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/geo/GeoSpatial2DTests.java
76f3cbb24d585247ca0de70e55a3ee4dcc33c605
[]
no_license
edwinace/projects
80b9ccf684b3e821ecef3db6ab1e8594b2bff035
b8b26787b75eed599c941e5ebe4d5f3c051e9df4
refs/heads/master
2016-09-13T08:31:59.781662
2016-04-30T08:00:22
2016-04-30T08:00:22
56,741,702
2
1
null
null
null
null
UTF-8
Java
false
false
2,717
java
/* * Copyright 2010-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.springframework.data.mongodb.core.geo; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import static org.springframework.data.mongodb.core.query.Criteria.*; import static org.springframework.data.mongodb.core.query.Query.*; import java.util.List; import org.junit.Test; import org.springframework.data.domain.Sort.Direction; import org.springframework.data.geo.Point; import org.springframework.data.mongodb.core.IndexOperations; import org.springframework.data.mongodb.core.Venue; import org.springframework.data.mongodb.core.index.GeoSpatialIndexType; import org.springframework.data.mongodb.core.index.GeospatialIndex; import org.springframework.data.mongodb.core.index.IndexField; import org.springframework.data.mongodb.core.index.IndexInfo; /** * Modified from https://github.com/deftlabs/mongo-java-geospatial-example * * @author Mark Pollack * @author Oliver Gierke * @author Thomas Darimont * @author Christoph Strobl */ public class GeoSpatial2DTests extends AbstractGeoSpatialTests { @Test public void nearPoint() { Point point = new Point(-73.99171, 40.738868); List<Venue> venues = template.find(query(where("location").near(point).maxDistance(0.01)), Venue.class); assertThat(venues.size(), is(7)); } /** * @see DATAMONGO-360 */ @Test public void indexInfoIsCorrect() { IndexOperations operations = template.indexOps(Venue.class); List<IndexInfo> indexInfo = operations.getIndexInfo(); assertThat(indexInfo.size(), is(2)); List<IndexField> fields = indexInfo.get(0).getIndexFields(); assertThat(fields.size(), is(1)); assertThat(fields, hasItem(IndexField.create("_id", Direction.ASC))); fields = indexInfo.get(1).getIndexFields(); assertThat(fields.size(), is(1)); assertThat(fields, hasItem(IndexField.geo("location"))); } @Override protected void createIndex() { template.indexOps(Venue.class).ensureIndex(new GeospatialIndex("location").typed(GeoSpatialIndexType.GEO_2D)); } @Override protected void dropIndex() { template.indexOps(Venue.class).dropIndex("location_2d"); } }
[ "liyunadora99@outlook.com" ]
liyunadora99@outlook.com
86b0c68ac36663672757545c2ced002abf7bf2e1
d8451afb2aed2a74f1bc5378332c083fbbb2c073
/app/src/main/java/appewtc/masterung/materungrestaurant/MyOpenHelper.java
eab5c5323d7b3e7fc399668b67fb8bfca4077892
[]
no_license
masterUNG/MasterUNG-Restaurant-19-March-16
081539202600b0a3fbca01fc53dfd17c7a04ef8e
b5bd337f7f34b1da9f3c55eb5234af891cc3abdd
refs/heads/master
2021-01-10T07:23:15.292258
2016-03-20T08:07:27
2016-03-20T08:07:27
54,244,069
0
1
null
null
null
null
UTF-8
Java
false
false
1,254
java
package appewtc.masterung.materungrestaurant; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /** * Created by masterUNG on 3/19/16 AD. */ public class MyOpenHelper extends SQLiteOpenHelper{ //Explicit public static final String database_name = "Restaurant.db"; private static final int database_version = 1; private static final String create_user_table = "create table userTABLE (" + "_id integer primary key, " + "User text, " + "Password text, " + "Name text);"; private static final String create_food_table = "create table foodTABLE (" + "_id integer primary key, " + "Food text, " + "Price text, " + "Source text);"; public MyOpenHelper(Context context) { super(context, database_name, null, database_version); } // Constructor @Override public void onCreate(SQLiteDatabase sqLiteDatabase) { sqLiteDatabase.execSQL(create_user_table); sqLiteDatabase.execSQL(create_food_table); } @Override public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) { } } // Main Class
[ "phrombutr@gmail.com" ]
phrombutr@gmail.com
0acd790227ad7be55547a436c8ce1835687ffceb
acbb56922b48774b9c4d03a335d8c971dd64b80d
/HomeActivity/src/com/youle/gamebox/ui/fragment/MyGiftFragment.java
e15f90822e628693d709662423e905cf24511300
[]
no_license
Lakkichand/smartapp-src
91284c469308e9e40c45a7782d0bdb79c80bf9e2
1a174a9dd6a8a784d5faf204404e9a0abede4fa5
refs/heads/master
2021-01-10T16:51:09.042107
2015-03-28T15:15:06
2015-03-28T15:15:06
45,905,976
4
7
null
null
null
null
UTF-8
Java
false
false
2,515
java
package com.youle.gamebox.ui.fragment; import android.os.Bundle; import android.view.View; import com.youle.gamebox.ui.account.UserInfoCache; import com.youle.gamebox.ui.adapter.MyGiftAdapter; import com.youle.gamebox.ui.adapter.YouleBaseAdapter; import com.youle.gamebox.ui.api.AbstractApi; import com.youle.gamebox.ui.api.MyGiftApi; import com.youle.gamebox.ui.bean.MyGiftBean; import com.youle.gamebox.ui.http.JsonHttpListener; import com.youle.gamebox.ui.http.ZhidianHttpClient; import org.json.JSONException; import java.util.List; /** * Created by Administrator on 14-6-23. */ public class MyGiftFragment extends NextPageFragment { private MyGiftApi myGiftApi; private MyGiftAdapter mAdapter; private List<MyGiftBean> myGiftBeanList; @Override public AbstractApi getApi() { return myGiftApi; } @Override public YouleBaseAdapter getAdapter() { return mAdapter; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); onSelected(); } @Override protected String getModelName() { return "我的礼包"; } public void onSelected(){ if (myGiftBeanList == null) { if(new UserInfoCache().getUserInfo()!=null) { loadData(); }else { showNoContentLayout(true,"未登录"); } } } @Override public List pasreJson(String jsonStr) throws JSONException { return jsonToList(MyGiftBean.class, jsonStr, "data"); } protected void loadData() { myGiftApi = new MyGiftApi(); myGiftApi.setSid(new UserInfoCache().getSid()); ZhidianHttpClient.request(myGiftApi, new JsonHttpListener(this) { @Override public void onRequestSuccess(String jsonString) { try { myGiftBeanList = pasreJson(jsonString); mAdapter = new MyGiftAdapter(getActivity(), myGiftBeanList); getListView().setAdapter(mAdapter); if(myGiftBeanList.size()>0){ showNoContentLayout(false); }else { showNoContentLayout(true); } } catch (JSONException e) { e.printStackTrace(); } } }); } }
[ "yijiajia1988@gmail.com@702b21dd-f629-e120-7dff-525d4d49388d" ]
yijiajia1988@gmail.com@702b21dd-f629-e120-7dff-525d4d49388d
14a6b66c2c367a320d802aae26a0db0d72b5dfa6
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/viber/voip/api/a/b/a/g.java
25aa4fb97dea10f2ba36f7b8ed9e122ab160d7a2
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
823
java
package com.viber.voip.api.a.b.a; import com.google.d.a.c; import java.util.Arrays; public class g { @c(a="status") private int a; @c(a="plans") private j[] b; @c(a="credits") private d[] c; @c(a="rates") private m[] d; public int a() { return this.a; } public j[] b() { return this.b; } public d[] c() { return this.c; } public m[] d() { return this.d; } public String toString() { return "GetProductsResponse{status=" + this.a + ", plans=" + Arrays.toString(this.b) + ", credits=" + Arrays.toString(this.c) + '}'; } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar * Qualified Name: com.viber.voip.api.a.b.a.g * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
a8d518ece578ce631e62b94e2d2575704dd81ade
b7b44dc837cab3bb94194680bd6ab9dbc3c1506a
/shopping-api/src/main/java/com/edaochina/shopping/api/dao/order/OrderErrorImgsMapper.java
7cbb82362c25bf6062c7bf40ac5c27eddcfc8cb2
[]
no_license
wu-weirdo/shopping-mall
33c98da0832eced9a1f7a3249a4e8f1d7b0c5dc8
246ada0045743a48d299329dde18353b2eae9631
refs/heads/master
2023-01-23T05:50:03.870968
2020-11-18T15:53:39
2020-11-18T15:53:39
313,981,048
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package com.edaochina.shopping.api.dao.order; import com.edaochina.shopping.domain.entity.order.OrderErrorImgs; import org.apache.ibatis.annotations.Param; import java.util.List; /** * <p> * 异常订单图片凭证 Mapper 接口 * </p> * * @since 2019-05-22 */ public interface OrderErrorImgsMapper { int insertImg(OrderErrorImgs errorImgs); List<String> selectByOrderErrorId(@Param("orderErrorId") Integer orderErrorId); }
[ "982280485@qq.com" ]
982280485@qq.com
fb8fec5fae49d6668ef49031db71c1f19ca2f44c
be9a56735e6aa7478cceff469ec03f9b1ad7a5f8
/src/visitor/exercise1/Visitor.java
5f5475d3aca37fe98590583927e8d5a0a364605f
[]
no_license
VestiDev/Design-Patterns-in-Java-Deep-Dive
e622acee47d49cbd35de426e685a12a0e1628df8
2c21615366233f428e233f2bfbcf4da690ae2458
refs/heads/master
2023-08-24T10:59:19.484659
2021-10-19T15:59:55
2021-10-19T15:59:55
418,989,030
0
0
null
2021-10-19T15:55:01
2021-10-19T15:43:10
Java
UTF-8
Java
false
false
416
java
/* * This class forms part of the Design Patterns Course by * Dr Heinz Kabutz from JavaSpecialists.eu and may not be * distributed without written consent. * * Copyright 2001-2021, Heinz Kabutz, All rights reserved. */ package visitor.exercise1; public interface Visitor { void visit(Person person); void visit(DistributionList distributionList); void visit(WhatsAppContact whatsAppContact); }
[ "heinz@javaspecialists.eu" ]
heinz@javaspecialists.eu
4f6d7ce0508908dfed0714f8e1f479f885f6c169
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A72n_10_0_0/src/main/java/android/inputmethodservice/ColorDummyInputMethodServiceUtils.java
82d9d62114399152406ba9e41b0e98ceeb3db80d
[]
no_license
liuhaosource/OppoFramework
e7cc3bcd16958f809eec624b9921043cde30c831
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
refs/heads/master
2023-06-03T23:06:17.572407
2020-11-30T08:40:07
2020-11-30T08:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,460
java
package android.inputmethodservice; import android.app.Dialog; import android.content.Context; import android.inputmethodservice.InputMethodService; import android.net.Uri; public class ColorDummyInputMethodServiceUtils implements IColorInputMethodServiceUtils { @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void init(Context context) { } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void beforeInputShow() { } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void afterInputShow() { } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public boolean getDockSide() { return false; } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void onChange(Uri uri) { } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void updateColorNavigationGuardColor(Dialog window) { } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void updateColorNavigationGuardColorDelay(Dialog window) { } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void onComputeRaise(InputMethodService.Insets mTmpInsets, Dialog window) { } @Override // android.inputmethodservice.IColorInputMethodServiceUtils public void uploadData(long time) { } }
[ "dstmath@163.com" ]
dstmath@163.com
efdf313123cb3b3a4580830a77b228b33102a72b
fcb2b8be9710a333c8133310c5b922890b7856b8
/src/goryachev/common/util/EQueue.java
955cbf5b3b604da1baa9c744bd20da5f4ca7389b
[ "Apache-2.0" ]
permissive
andy-goryachev/ReqTraq
cf1b754577772b86c44811cd3eb33ffb83352353
3b7365277e8b9cb429d53f9b9b7c3e449acc84a5
refs/heads/master
2021-01-12T17:14:11.160955
2019-12-24T23:21:12
2019-12-24T23:21:12
71,520,375
1
1
null
null
null
null
UTF-8
Java
false
false
878
java
// Copyright © 2004-2019 Andy Goryachev <andy@goryachev.com> package goryachev.common.util; // A simple queue public class EQueue<T> { protected CList<T> queue; public EQueue(int size) { queue = new CList<T>(size); } public EQueue() { this(16); } public synchronized void put(T d) { queue.add(d); notifyAll(); } public synchronized void putToFront(T d) { queue.add(0, d); notifyAll(); } public synchronized T get() { while(queue.isEmpty()) { try { wait(); } catch(InterruptedException e) { } } return queue.remove(0); } public synchronized boolean isEmpty() { return queue.isEmpty(); } public synchronized void delete(T d) { queue.remove(d); } public synchronized void clear() { queue.clear(); notify(); } }
[ "andy@goryachev.com" ]
andy@goryachev.com
abd47f077843be152eee58bb92510c50603ae24c
7222c03a7a34add822f51511269c7061780ee5a6
/plugins/fr.aliasource.webmail.proxy/src/fr/aliasource/webmail/proxy/impl/ShowConversationImpl.java
b20a77a41ca5138e0b4c16ee1e97047383de7749
[]
no_license
YYChildren/minig
17103eb1170d29930404230f3ce22609cd66c869
9a413a70b9aed485bdc42068bf701db8425963c9
refs/heads/master
2016-09-14T00:28:53.387344
2016-04-13T01:28:08
2016-04-13T01:28:08
56,111,120
0
0
null
null
null
null
UTF-8
Java
false
false
1,296
java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Initial Developer of the Original Code is * MiniG.org project members * * ***** END LICENSE BLOCK ***** */ package fr.aliasource.webmail.proxy.impl; import java.util.List; import fr.aliasource.webmail.common.IAccount; import fr.aliasource.webmail.common.conversation.ConversationReference; import fr.aliasource.webmail.common.conversation.MailMessage; import fr.aliasource.webmail.common.conversation.MessageId; import fr.aliasource.webmail.common.folders.IFolder; public class ShowConversationImpl extends ProxyAction { public ShowConversationImpl(IAccount ac) { super(ac); } public ConversationReference findConversation(String convId) { return getAccount().getFindReference().find(convId); } public MailMessage[] fetchMessages(IFolder f, List<MessageId> mids, boolean truncate) { return getAccount().getLoadMessages().load(f, mids,truncate); } }
[ "tcataldo@gmail.com" ]
tcataldo@gmail.com
2a495ca7249d11334a208692eb5aebd27bb1ae9e
6234cfe452bd66fd60d743edd05f4288342a60ea
/hnlivelibrary/src/main/java/com/hotniao/livelibrary/widget/viewpager/HnVerticalScrollViewPager.java
e0cb0c85154611cc33c2d2f7c81227606eef3630
[]
no_license
WHX979454518/liveshoping
3e2aee0b51fbf290dfd28047d74daba0329e1322
0b8edc99733e9ad85ef2ff8baeb3a8d919296f7c
refs/heads/master
2022-11-27T01:17:27.685470
2020-08-01T03:13:30
2020-08-01T03:13:30
284,173,182
0
0
null
null
null
null
UTF-8
Java
false
false
3,520
java
package com.hotniao.livelibrary.widget.viewpager; import android.app.Activity; import android.content.Context; import android.graphics.Rect; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.view.MotionEvent; /** * Copyright (C) 2017,深圳市红鸟网络科技股份有限公司 All rights reserved. * 项目名称:youbo * 类描述:动态设置是否可以上下滑动 该类采用两种方案:1:传递Actviity自动判断是否有键盘弹起,若键盘弹起,则不进行滑动 * 2:自己动态设置isCanScroll来进行动态控制是否可以滑动,不可传递Activity * 创建人:mj * 创建时间:2017/10/16 15:22 * 修改人:Administrator * 修改时间:2017/10/16 15:22 * 修改备注: * Version: 1.0.0 */ public class HnVerticalScrollViewPager extends VerticalViewPager { /** * 是否可以滑动 */ private boolean isCanScroll = true; /** * 上下文 */ private Activity mActivity; /** * 监听器 */ private HnVerticalScrollListener listener; public HnVerticalScrollViewPager(Context context) { this(context, null); } public HnVerticalScrollViewPager(Context context, AttributeSet attrs) { super(context, attrs); } @Override public boolean onTouchEvent(MotionEvent ev) { if (mActivity != null) { if (!isSoftShowing()) { //允许滑动则应该调用父类的方法 return super.onTouchEvent(ev); } else { //禁止滑动则不做任何操作,直接返回true即可 return true; } } else { if (isCanScroll) { //允许滑动则应该调用父类的方法 return super.onTouchEvent(ev); } else { //禁止滑动则不做任何操作,直接返回true即可 return true; } } } @Override public boolean onInterceptTouchEvent(MotionEvent arg0) { if (mActivity != null) { if (!isSoftShowing()) { } else { return false; } } else { if (isCanScroll) { } else { return false; } } return super.onInterceptTouchEvent(arg0); } //设置是否允许滑动,true是可以滑动,false是禁止滑动 public void setIsCanScroll(boolean isCanScroll) { this.isCanScroll = isCanScroll; } public interface HnVerticalScrollListener { void IsCanScroll(boolean isCanScroll); } public void setVerticalScrollListener(HnVerticalScrollListener listener) { this.listener = listener; } /** * 判断键盘弹起 * * @return */ private boolean isSoftShowing() { if (mActivity == null) return false; //获取当前屏幕内容的高度 int screenHeight = mActivity.getWindow().getDecorView().getHeight(); //获取View可见区域的bottom Rect rect = new Rect(); mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect); DisplayMetrics metrics=new DisplayMetrics(); mActivity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics); return screenHeight - /*metrics.heightPixels*/rect.bottom >150; } public void setActivity(Activity activity) { this.mActivity = activity; } }
[ "wanghonxin@163.com" ]
wanghonxin@163.com
c1a352b6240e722ef3bacbd82f8a542c90b12e29
447dbea10ef2b4144cf93a908235e28873b88e5a
/YaHui/src/main/java/com/chinasofti/YaHui/util/DBUtil.java
d5b98b627c311d12e3ae9f72aea1021bb7944c8a
[]
no_license
dameng1/YaHUi
3d62acb4a8ee0786a011e4ecf0955d69592bdadf
174a13653715d7fdb6884e6957fef83d5f9f9439
refs/heads/master
2020-05-17T05:59:09.162633
2019-04-26T03:50:58
2019-04-26T03:50:58
183,549,460
0
0
null
null
null
null
UTF-8
Java
false
false
2,575
java
package com.chinasofti.YaHui.util; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; //连接数据库查询 public class DBUtil { Connection conn; Statement stmt; PreparedStatement pstmt; public DBUtil() { //进行conn的实例化操作 jdbc连接操作 try { Properties prop=new Properties(); prop.load(new FileInputStream("prop.properties")); Class.forName(prop.getProperty("classname")).newInstance(); //获取连接对象 conn=DriverManager.getConnection(prop.getProperty("url"),prop.getProperty("username"),prop.getProperty("password")); } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } //创建增删改的方法 //1非预编译 不需要参数 public int update(String sql) throws SQLException{ stmt=conn.createStatement(); return stmt.executeUpdate(sql); } //2预编译 需要参数进行?赋值 public int update(String sql,Object...arr) throws SQLException{ //创建预编译对象 pstmt=conn.prepareStatement(sql); //给?赋值 for (int i = 0; i < arr.length; i++) { pstmt.setObject((i+1), arr[i]); } return pstmt.executeUpdate(); } //创建查询的方法 //1非预编译 public ResultSet query(String sql) throws SQLException{ stmt=conn.createStatement(); return stmt.executeQuery(sql); } //2预编译 public ResultSet query(String sql,Object...arr) throws SQLException{ //创建预编译对象 pstmt=conn.prepareStatement(sql); //给?赋值 for (int i = 0; i < arr.length; i++) { pstmt.setObject((i+1), arr[i]); } return pstmt.executeQuery(); } //创建一个关闭资源的方法 public void closed(){ //六、关闭资源 try { if(pstmt!=null && !pstmt.isClosed()) pstmt.close(); if(stmt!=null && !stmt.isClosed()) stmt.close(); if(conn!=null && !conn.isClosed()) conn.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "you@example.com" ]
you@example.com
804b93010fb4f75d5f933b6d17d54c6e9fac1387
0f69e859b88fc53c4848021911a45fec99f7a932
/snap-dx/src/main/java/org/snapscript/dx/io/IndexType.java
02018b5481a1831d542def227841b74a529d0e56
[]
no_license
snapscript/snap-external
62d6f3c260b457695be2ba79ff6b75b070d0e309
1ea713d89021824a18fe477a9394fa896e0b605a
refs/heads/master
2020-12-02T23:54:15.558170
2019-02-07T21:52:48
2019-02-07T21:52:48
95,952,611
1
0
null
null
null
null
UTF-8
Java
false
false
1,404
java
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.snapscript.dx.io; /** * The various types that an index in a Dalvik instruction might refer to. */ public enum IndexType { /** "Unknown." Used for undefined opcodes. */ UNKNOWN, /** no index used */ NONE, /** "It depends." Used for {@code throw-verification-error}. */ VARIES, /** type reference index */ TYPE_REF, /** string reference index */ STRING_REF, /** method reference index */ METHOD_REF, /** field reference index */ FIELD_REF, /** inline method index (for inline linked method invocations) */ INLINE_METHOD, /** direct vtable offset (for static linked method invocations) */ VTABLE_OFFSET, /** direct field offset (for static linked field accesses) */ FIELD_OFFSET; }
[ "gallagher_niall@yahoo.com" ]
gallagher_niall@yahoo.com
2b01fd7923e06e7ea64d3afa9e0c5e8223068c84
8ef2cecd392f43cc670ae8c6f149be6d71d737ba
/src/com/telesoftas/deeper/animation/RenderingScheduler$1.java
b64a59765df486ca4481fc4a14f170b2b0fc474c
[]
no_license
NBchitu/AngelEyes2
28e563380be6dcf5ba5398770d66ebeb924a033b
afea424b70597c7498e9c6da49bcc7b140a383f7
refs/heads/master
2021-01-16T18:30:51.913292
2015-02-15T07:30:00
2015-02-15T07:30:00
30,744,510
0
0
null
null
null
null
UTF-8
Java
false
false
292
java
package com.telesoftas.deeper.animation; class RenderingScheduler$1 {} /* Location: C:\DISKD\fishfinder\apktool-install-windows-r05-ibot\classes_dex2jar.jar * Qualified Name: com.telesoftas.deeper.animation.RenderingScheduler.1 * JD-Core Version: 0.7.0.1 */
[ "bjtu2010@hotmail.com" ]
bjtu2010@hotmail.com
0766f720ece6dfd0c9d00d8dc69c419edcb53a71
ef6b1db102352cd3969a840054cbd31804a4a972
/src/main/java/com/sishuok/jiangzh/archi/shopping/permit/dispatcher/api/impl/user/UserServiceImpl.java
6ff89ddae30b1e4ef34801dc43865c628e3b258a
[]
no_license
woaijiadanoo/archi-project
c3217a20144c215d6970fcee657e86b0f1acc247
9acbd6bc7ff99f9a439e8849fd51a1918a143229
refs/heads/master
2023-01-01T06:58:41.585813
2020-10-25T14:41:38
2020-10-25T14:41:38
288,897,676
0
0
null
null
null
null
UTF-8
Java
false
false
518
java
package com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.impl.user; import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.UserServiceAPI; import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.base.BaseService; import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.base.BaseServiceImpl; import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.vo.UserModel; public class UserServiceImpl extends BaseServiceImpl<UserModel> implements UserServiceAPI, BaseService<UserModel> { }
[ "jiangzh@sina.com" ]
jiangzh@sina.com
c51d517590a4ff7e8963649df137a61a2152bbbc
0fe59b1dfb5cf2454cef805da2804b2d3e52f742
/bee-platform-system/platform-dinasdatadriver-api/src/main/java/com/bee/platform/dinas/datadriver/dto/DinasSaleSettlementSearchDTO.java
38037ff5d18a90602c957408bdaa8509b1288600
[]
no_license
wensheng930729/platform
f75026113a841e8541017c364d30b80e94d6ad5c
49c57f1f59b1e2e2bcc2529fdf6cb515d38ab55c
refs/heads/master
2020-12-11T13:58:59.772611
2019-12-16T06:02:40
2019-12-16T06:02:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,334
java
package com.bee.platform.dinas.datadriver.dto; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** * <p> * 采购结算表 * </p> * * @author liliang123 * @since 2019-08-13 */ @Data @NoArgsConstructor @Accessors(chain=true) @ApiModel("销售结算列表返回信息") public class DinasSaleSettlementSearchDTO implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @ApiModelProperty("id") private Integer id; @ApiModelProperty("验货磅单id") private Integer inspectionOrderId; @ApiModelProperty("公司id") private Integer companyId; @ApiModelProperty("销售合同id") private Integer saleOrderId; @ApiModelProperty("销售合同编号") private String saleOrderCode; @ApiModelProperty("订货商id") private Integer buyerId; @ApiModelProperty("订货商名称") private String buyerName; @ApiModelProperty("产品id") private Integer productId; @ApiModelProperty("产品名称") private String productName; @ApiModelProperty("产品规格id") private Integer productSpecId; @ApiModelProperty("产品规格名称") private String productSpecName; @ApiModelProperty("不含税单价") private BigDecimal price; @ApiModelProperty("含税单价") private BigDecimal taxPrice; @ApiModelProperty("数量") private BigDecimal num; @ApiModelProperty("总计不含税单价") private BigDecimal sumPrice; @ApiModelProperty("总计含税单价") private BigDecimal sumTaxPrice; @ApiModelProperty("结算单价") private BigDecimal settlementUnitPrice; @ApiModelProperty("结算总价") private BigDecimal settlementSumPrice; @ApiModelProperty("验货日期") @JsonFormat(pattern = "yyyy-MM-dd") private Date inspectionDate; @ApiModelProperty("结算状态(0未结算 1已结算)") private Integer status; @ApiModelProperty("结算日期") @JsonFormat(pattern = "yyyy-MM-dd") private Date settlementTime; }
[ "414608036@qq.com" ]
414608036@qq.com
a5f854d2455d0ded62e7861154ec7ef785a80700
ca7da6499e839c5d12eb475abe019370d5dd557d
/spring-test/src/main/java/org/springframework/test/context/support/DefaultActiveProfilesResolver.java
ddc7350a58a2e961ae548a172376c800c6a8a31a
[ "Apache-2.0" ]
permissive
yangfancoming/spring-5.1.x
19d423f96627636a01222ba747f951a0de83c7cd
db4c2cbcaf8ba58f43463eff865d46bdbd742064
refs/heads/master
2021-12-28T16:21:26.101946
2021-12-22T08:55:13
2021-12-22T08:55:13
194,103,586
0
1
null
null
null
null
UTF-8
Java
false
false
2,665
java
package org.springframework.test.context.support; import java.util.LinkedHashSet; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ActiveProfilesResolver; import org.springframework.test.util.MetaAnnotationUtils.AnnotationDescriptor; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import static org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptor; /** * Default implementation of the {@link ActiveProfilesResolver} strategy that * resolves <em>active bean definition profiles</em> based solely on profiles * configured declaratively via {@link ActiveProfiles#profiles} or * {@link ActiveProfiles#value}. * * @author Sam Brannen * @since 4.1 * @see ActiveProfiles * @see ActiveProfilesResolver */ public class DefaultActiveProfilesResolver implements ActiveProfilesResolver { private static final Log logger = LogFactory.getLog(DefaultActiveProfilesResolver.class); /** * Resolve the <em>bean definition profiles</em> for the given {@linkplain * Class test class} based on profiles configured declaratively via * {@link ActiveProfiles#profiles} or {@link ActiveProfiles#value}. * @param testClass the test class for which the profiles should be resolved; * never {@code null} * @return the list of bean definition profiles to use when loading the * {@code ApplicationContext}; never {@code null} */ @Override public String[] resolve(Class<?> testClass) { Assert.notNull(testClass, "Class must not be null"); final Set<String> activeProfiles = new LinkedHashSet<>(); Class<ActiveProfiles> annotationType = ActiveProfiles.class; AnnotationDescriptor<ActiveProfiles> descriptor = findAnnotationDescriptor(testClass, annotationType); if (descriptor == null) { if (logger.isDebugEnabled()) { logger.debug(String.format( "Could not find an 'annotation declaring class' for annotation type [%s] and class [%s]", annotationType.getName(), testClass.getName())); } } else { Class<?> declaringClass = descriptor.getDeclaringClass(); ActiveProfiles annotation = descriptor.synthesizeAnnotation(); if (logger.isTraceEnabled()) { logger.trace(String.format("Retrieved @ActiveProfiles [%s] for declaring class [%s].", annotation, declaringClass.getName())); } for (String profile : annotation.profiles()) { if (StringUtils.hasText(profile)) { activeProfiles.add(profile.trim()); } } } return StringUtils.toStringArray(activeProfiles); } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
8c7c4776240a70df7b1af30626bc650c217ffdee
d20fdbf38869da345b1cba1a7dd7aab5818bbf63
/clock/src/main/java/com/yiju/ClassClockRoom/adapter/MineOrganizationPagerAdapter.java
f78d9cddc840be881c52aa113dfa50a0957800ab
[]
no_license
xxchenqi/clockclassroom
28902afe11d9bed667f85fdc33825049318e7ed6
7c5dedbb237d01b1cc7deb85f2a16e2f121d32a2
refs/heads/master
2021-01-23T04:29:50.159212
2017-03-26T04:58:04
2017-03-26T04:58:08
86,203,308
0
0
null
null
null
null
UTF-8
Java
false
false
2,097
java
package com.yiju.ClassClockRoom.adapter; import android.support.v4.view.PagerAdapter; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import java.util.ArrayList; import java.util.List; /** * ---------------------------------------- * 注释: * <p/> * 作者: cq * <p/> * 时间: on 2016/3/16 10:16 * ---------------------------------------- */ public class MineOrganizationPagerAdapter extends PagerAdapter { private List<ImageView> imageViews = new ArrayList<>(); private VpClickListener vpClickListener; public MineOrganizationPagerAdapter(List<ImageView> imageViews, VpClickListener vpClickListener) { this.imageViews = imageViews; this.vpClickListener = vpClickListener; } public void setData(List<ImageView> views) { this.imageViews = views; } @Override public int getCount() { return imageViews.size(); } @Override public boolean isViewFromObject(View view, Object object) { return view == object; } @Override public void destroyItem(ViewGroup container, int position, Object object) { if (!(position >= getCount())) { container.removeView(imageViews.get(position)); } } @Override public Object instantiateItem(ViewGroup container, int position) { View v = imageViews.get(position); v.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { vpClickListener.vpClick(); } }); container.addView(v); return v; } public interface VpClickListener { void vpClick(); } private int mChildCount = 0; @Override public void notifyDataSetChanged() { mChildCount = getCount(); super.notifyDataSetChanged(); } @Override public int getItemPosition(Object object) { if (mChildCount > 0) { mChildCount--; return POSITION_NONE; } return super.getItemPosition(object); } }
[ "812046652@qq.com" ]
812046652@qq.com
afe0f7efba6205d6d72520d3d1306046cd0d4137
9ad0aa646102f77501efde94d115d4ff8d87422f
/LeetCode/java/src/contains_duplicate/Solution.java
3af7248b6d7020164cc0da910864c373e8db1a4b
[]
no_license
xiaotdl/CodingInterview
cb8fc2b06bf587c83a9683d7b2cb80f5f4fd34ee
514e25e83b0cc841f873b1cfef3fcc05f30ffeb3
refs/heads/master
2022-01-12T05:18:48.825311
2022-01-05T19:41:32
2022-01-05T19:41:32
56,419,795
0
1
null
null
null
null
UTF-8
Java
false
false
416
java
package contains_duplicate; import java.util.*; /** * Created by Xiaotian on 9/9/17. */ public class Solution { // tag: array, set // time: O(n) // space: O(n) public boolean containsDuplicate(int[] nums) { Set<Integer> set = new HashSet<>(); for (int num : nums) { if (set.contains(num)) return true; set.add(num); } return false; } }
[ "xiaotdl@gmail.com" ]
xiaotdl@gmail.com
f01504fa9cfe151a4cfb0e1f343d1635d4e4c50a
c2ab7eec35a9d5a616e07825a1880971bcf0d424
/sina-domain/src/main/java/cc/pp/sina/domain/bozhus/FansAddDailyInfo.java
7ba80c4db31cf6cb85489db16940b0dac791384e
[]
no_license
xt-coder/sina-services
7476a0569ad7000e55b1bb5cd1e7c1376a503f3d
d7b2b995d067c6b641a2b92f3dbb5b811a8ec433
refs/heads/master
2021-01-20T23:33:12.486603
2014-03-18T08:44:02
2014-03-18T08:44:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package cc.pp.sina.domain.bozhus; public class FansAddDailyInfo { private String username; private String addfansuids; private int addfanscount; private int allfanscount; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getAddfansuids() { return addfansuids; } public void setAddfansuids(String addfansuids) { this.addfansuids = addfansuids; } public int getAddfanscount() { return addfanscount; } public void setAddfanscount(int addfanscount) { this.addfanscount = addfanscount; } public int getAllfanscount() { return allfanscount; } public void setAllfanscount(int allfanscount) { this.allfanscount = allfanscount; } }
[ "wanggang@pp.cc" ]
wanggang@pp.cc
58e4e179cffb3abbf061aafdddf8fe90cc571024
de73a738238882bf39acf83daab4a670413db794
/Ancient/workspace/MCube/src/fr/Maxime3399/MCube/menus/CosMainMenu.java
f79943627b86147e2fba194c45c4ba894bfd0226
[]
no_license
peytondodd/Desktop
d64fb43e838dc03c9c68ef67807fa65a55d8bdc7
cb3e969ae1b54b181d731610eb3febe5165252ec
refs/heads/master
2020-04-10T06:48:56.442567
2018-09-16T17:08:38
2018-09-16T17:08:38
160,865,026
1
0
null
2018-12-07T19:09:06
2018-12-07T19:09:05
null
ISO-8859-1
Java
false
false
1,280
java
package fr.Maxime3399.MCube.menus; import java.util.ArrayList; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import fr.Maxime3399.MCube.cosmetics.CosCounters; public class CosMainMenu { public static void openMenu(Player p){ Inventory i = Bukkit.createInventory(null, 27, "§8Cosmétiques"); ItemStack ISpar = new ItemStack(Material.MAGMA_CREAM); ItemMeta IMpar = ISpar.getItemMeta(); ArrayList<String> ALpar = new ArrayList<>(); IMpar.setDisplayName("§6Particules"); ALpar.add("§9§l>§r §7Clique pour ouvrir le menu"); ALpar.add("§7des particules"); ALpar.add(" "); ALpar.add(" §e"+CosCounters.getParticlesCount(p)+"§d§l/§r§641"); IMpar.setLore(ALpar); ISpar.setItemMeta(IMpar); i.setItem(13, ISpar); ItemStack ISba = new ItemStack(Material.ARROW); ItemMeta IMba = ISba.getItemMeta(); ArrayList<String> ALba = new ArrayList<>(); IMba.setDisplayName("§8§oRetour"); ALba.add("§9§l>§r §7Clique pour retourner au"); ALba.add("§7menu principal"); IMba.setLore(ALba); ISba.setItemMeta(IMba); i.setItem(26, ISba); p.openInventory(i); } }
[ "maxime3399.minecraft@gmail.com" ]
maxime3399.minecraft@gmail.com
09aa8524557949af6b2ee956bf7f722f33a6f269
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/27/org/joda/time/format/PeriodFormatterBuilder_appendSeconds_475.java
984494d814d610ebfadd8d2783d11a95d886ea44
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
3,098
java
org joda time format factori creat complex instanc period formatt periodformatt method call period format perform link period formatt periodformatt class provid factori method creat formatt link period format periodformat link iso period format isoperiodformat period formatt builder periodformatterbuild construct formatt print pars formatt built append specif field formatt instanc builder formatt print year month year month construct pre period formatt periodformatt year month yearsandmonth period formatt builder periodformatterbuild print printzeroalwai append year appendyear append suffix appendsuffix year year append separ appendsepar print rare printzerorar append month appendmonth append suffix appendsuffix month month formatt toformatt pre period formatt builder periodformatterbuild mutabl thread safe formatt build thread safe immut author brian neill o'neil period format periodformat period formatt builder periodformatterbuild instruct printer emit integ second field support number print pars digit control link minimum print digit minimumprinteddigit link maximum pars digit maximumparseddigit period formatt builder periodformatterbuild period formatt builder periodformatterbuild append second appendsecond append field appendfield second
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
22ea5c130ba4924fc3926b85dbde45f2a97199ed
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/60/org/apache/commons/math/exception/MathUserException_MathUserException_81.java
016649a5ba8968b0e838ae791c2caf72fd8e870d
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
569
java
org apach common math except intend sort commun channel layer user code separ call common math librari common math code except version revis date math user except mathuserexcept runtim except runtimeexcept math throwabl maththrow build except localiz messag param error param pattern format specifi param argument format argument math user except mathuserexcept throwabl localiz pattern object argument localiz pattern argument
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
a8aefb85612ca55cb50e8e5fb8f70c4af7eb3a2a
8fa88f63981174c09ed48d76ef625997b58c8266
/16_Writing_To_database/src/test/java/learn/avinash/batch/WritingToDatabaseApplicationTests.java
5d867194ea63a8a4cc067929560d2ebe4b8cc07c
[]
no_license
AvinashTiwari/Spring-Batch
7a937fc4d02bf1186fbeaf9c505ac0091aa646c6
dfa4be1255fe88ca8d0b159b58957192709d65c7
refs/heads/master
2020-03-17T02:47:39.896388
2018-06-17T21:33:10
2018-06-17T21:33:10
133,206,101
1
1
null
null
null
null
UTF-8
Java
false
false
347
java
package learn.avinash.batch; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class WritingToDatabaseApplicationTests { @Test public void contextLoads() { } }
[ "qwe123kids@gmail.com" ]
qwe123kids@gmail.com
c15af2cd484e6a02d935d62897fed4fd215d4826
737b0fc040333ec26f50409fc16372f5c64c7df6
/bus-image/src/main/java/org/aoju/bus/image/metric/internal/xdsi/EnsureMustUnderstandHandler.java
7961022adee334d65752936ee56fdb9fe7e6082f
[ "MIT" ]
permissive
sfg11/bus
1714cdc6c77f0042e3b80f32e1d9b7483c154e3e
d560ba4d3abd2e0a6c5dfda9faf7075da8e8d73e
refs/heads/master
2022-12-13T02:26:18.533039
2020-08-26T02:23:34
2020-08-26T02:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,489
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2020 aoju.org and other contributors. * * * * 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.aoju.bus.image.metric.internal.xdsi; import javax.xml.namespace.QName; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPHeaderElement; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPHandler; import javax.xml.ws.handler.soap.SOAPMessageContext; import java.util.Iterator; import java.util.Set; /** * @author Kimi Liu * @version 6.0.8 * @since JDK 1.8+ */ public class EnsureMustUnderstandHandler implements SOAPHandler<SOAPMessageContext> { public Set<QName> getHeaders() { return null; } public boolean handleMessage(SOAPMessageContext ctx) { if (((Boolean) ctx.get("javax.xml.ws.handler.message.outbound")).booleanValue()) { try { Iterator<SOAPHeaderElement> iter = ctx.getMessage().getSOAPHeader().examineAllHeaderElements(); while (iter.hasNext()) { SOAPHeaderElement hdr = iter.next(); switch (hdr.getNodeName()) { case "Action": case "To": case "ReplyTo": hdr.setMustUnderstand(true); } } } catch (SOAPException e) { throw new RuntimeException(e); } } return true; } public boolean handleFault(SOAPMessageContext context) { return true; } public void close(MessageContext context) { } }
[ "839536@qq.com" ]
839536@qq.com
e4ae2ffd628d3c34f6c92baf055d3454f3723796
2335c1a28ed6d97a94e61b0f80aa6acbbb1df175
/src/test/java/org/sunnycode/hash/file2/TestHashFile2.java
2bef63de16b442926aa5d93d926c03e0f080fa68
[]
no_license
gigfork/hash-java
b553c3fe0fb1958c0d324430d64f975c2e0b6748
477b2fed00938750a84f083d5a72f956ded9c04e
refs/heads/master
2020-12-27T01:43:35.967250
2012-09-17T12:59:58
2012-09-17T12:59:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,119
java
package org.sunnycode.hash.file2; import java.io.File; import java.util.Iterator; import java.util.Random; import org.sunnycode.hash.file2.ByteSize; import org.sunnycode.hash.file2.HashEntry; import org.sunnycode.hash.file2.HashFile2; import org.sunnycode.hash.file2.HashFile2Builder; import org.sunnycode.hash.impl.MurmurHash; import org.testng.Assert; import org.testng.annotations.Test; @Test public class TestHashFile2 { MurmurHash hash = new MurmurHash(); public void testHashFile1k() throws Exception { doIt(ByteSize.ONE, ByteSize.ONE, false, 1000, 0L); doIt(ByteSize.ONE, ByteSize.TWO, false, 1000, 0L); doIt(ByteSize.TWO, ByteSize.ONE, false, 1000, 0L); doIt(ByteSize.TWO, ByteSize.TWO, false, 1000, 0L); doIt(ByteSize.FOUR, ByteSize.ONE, false, 1000, 0L); doIt(ByteSize.FOUR, ByteSize.TWO, false, 1000, 0L); doIt(ByteSize.FOUR, ByteSize.FOUR, false, 1000, 0L); } public void testHashFile10k() throws Exception { doIt(ByteSize.ONE, ByteSize.ONE, false, 10000, 12345L); doIt(ByteSize.ONE, ByteSize.TWO, false, 10000, 12345L); doIt(ByteSize.TWO, ByteSize.ONE, false, 10000, 12345L); doIt(ByteSize.TWO, ByteSize.TWO, false, 10000, 12345L); doIt(ByteSize.FOUR, ByteSize.ONE, false, 10000, 12345L); doIt(ByteSize.FOUR, ByteSize.TWO, false, 10000, 12345L); doIt(ByteSize.FOUR, ByteSize.FOUR, false, 10000, 12345L); } private static void doIt(ByteSize keySize, ByteSize valueSize, boolean longHash, long entries, long seed) throws Exception { File tmp = File.createTempFile("hhhhhh", "ff"); tmp.deleteOnExit(); System.out.println(tmp.getAbsolutePath()); HashFile2Builder hashWrite = new HashFile2Builder(false, tmp.getAbsolutePath(), 8, keySize, valueSize, longHash, false, false, false); writeElements(hashWrite, 10000, 0L, "key", "data"); hashWrite.finish(); verifyElements(tmp, 10000, 0L, "key", "data"); } private static void writeElements(HashFile2Builder hf, long numElements, long seed, String keyPre, String valPre) throws Exception { Random rand = new Random(seed); for (long i = 0; i < numElements; i++) { byte[] key = (keyPre + rand.nextLong()).getBytes(); hf.add(key, (valPre + rand.nextLong()).getBytes()); hf.add(key, (valPre + rand.nextLong()).getBytes()); hf.add(key, (valPre + rand.nextLong()).getBytes()); } } private static void verifyElements(File tmp, long numElements, long seed, String keyPre, String valPre) throws Exception { HashFile2 hf = new HashFile2(tmp.toString()); Random rand = new Random(seed); for (long i = 0; i < numElements; i++) { byte[] keyBytes = (keyPre + rand.nextLong()).getBytes(); byte[] expect1 = (valPre + rand.nextLong()).getBytes(); byte[] expect2 = (valPre + rand.nextLong()).getBytes(); byte[] expect3 = (valPre + rand.nextLong()).getBytes(); byte[] theValue = hf.get(keyBytes); Assert.assertEquals(theValue, expect1); Iterator<byte[]> iter = hf.getMulti(keyBytes).iterator(); byte[] actual1 = iter.next(); byte[] actual2 = iter.next(); byte[] actual3 = iter.next(); Assert.assertEquals(actual1, expect1); Assert.assertEquals(actual2, expect2); Assert.assertEquals(actual3, expect3); } Random rand2 = new Random(seed); Iterator<HashEntry> iter2 = hf.elements(tmp.toString()).iterator(); int count = 0; while (iter2.hasNext()) { HashEntry e1 = iter2.next(); HashEntry e2 = iter2.next(); HashEntry e3 = iter2.next(); byte[] keyBytes = (keyPre + rand2.nextLong()).getBytes(); byte[] expect1 = (valPre + rand2.nextLong()).getBytes(); byte[] expect2 = (valPre + rand2.nextLong()).getBytes(); byte[] expect3 = (valPre + rand2.nextLong()).getBytes(); byte[] actual1 = e1.getValue(); byte[] actual2 = e2.getValue(); byte[] actual3 = e3.getValue(); Assert.assertEquals(e1.getKey(), keyBytes); Assert.assertEquals(actual1, expect1); Assert.assertEquals(e2.getKey(), keyBytes); Assert.assertEquals(actual2, expect2); Assert.assertEquals(e3.getKey(), keyBytes); Assert.assertEquals(actual3, expect3); count += 1; } } @Test public void testEmptyHashFile() throws Exception { File tmp = File.createTempFile("hhhhhh", "ff"); tmp.deleteOnExit(); HashFile2Builder hashWrite = new HashFile2Builder( tmp.getAbsolutePath(), 10); hashWrite.finish(); for (HashEntry _entry : HashFile2.elements(tmp.getAbsolutePath())) { Assert.assertTrue(false, "hashfile should have no entries"); } } }
[ "sunny.gleason@gmail.com" ]
sunny.gleason@gmail.com
0e66a344ac937bf595796df4c7f1574df6840096
087136b0ead4dde00b557a02a181be6ea7081c9a
/SupetsCamera/thirdlib/MotuSDKLib/src_sdk/cn/jingling/lib/livefilter/BufferHelper.java
f7d5c038af3953749e7ac9aef07f99525912d072
[]
no_license
JiShangShiDai/supets-camera
34fb32d16ebeb8de5d0271dbc9fa83314998895c
4976922fd77cfc62afbe64836185faa03642254f
refs/heads/master
2021-05-14T10:59:44.532044
2017-08-09T03:57:56
2017-08-09T03:57:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,591
java
package cn.jingling.lib.livefilter; import android.opengl.GLES11Ext; import android.opengl.GLES20; import android.opengl.Matrix; import cn.jingling.lib.utils.MathUtils; public class BufferHelper { /** * This method will generate and bind a frame buffer. * * @param width * width of the framebuffer * @param height * height of the framebuffer * @return A FrameBufferInfo object */ public static FrameBufferInfo glGenerateFrameBuffer(int width, int height) { int[] textures = new int[1]; GLES20.glGenTextures(1, textures, 0); int frameBufferTexture = textures[0]; GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, frameBufferTexture); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, MathUtils.nextPowerOfTwo(width), MathUtils.nextPowerOfTwo(height), 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, null); int[] frameBuffers = new int[1]; GLES20.glGenFramebuffers(1, frameBuffers, 0); int frameBufferHandle = frameBuffers[0]; GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, frameBufferHandle); GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0, GLES20.GL_TEXTURE_2D, frameBufferTexture, 0); return new FrameBufferInfo(frameBufferHandle, frameBufferTexture); } /** * This method will generate but not bind a framebuffer. * * @param width * @param height * @return */ public static FrameBufferInfo glGenerateFrameBufferWithNoBind(int width, int height) { int[] textures = new int[1]; GLES20.glGenTextures(1, textures, 0); int frameBufferTexture = textures[0]; GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, frameBufferTexture); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, MathUtils.nextPowerOfTwo(width), MathUtils.nextPowerOfTwo(height), 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, null); int[] frameBuffers = new int[1]; GLES20.glGenFramebuffers(1, frameBuffers, 0); int frameBufferHandle = frameBuffers[0]; return new FrameBufferInfo(frameBufferHandle, frameBufferTexture); } /** * Just bind a frame buffer with texture. * * @param fbinfo */ public static void glBindFrameBuffer(FrameBufferInfo fbinfo) { GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fbinfo.frameBufferHandle); GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0, GLES20.GL_TEXTURE_2D, fbinfo.textureHandle, 0); } /** * Generate but not bind an OES framebuffer * * @param width * @param height * @return */ public static FrameBufferInfo glGenerateFrameBufferOES(int width, int height) { int[] textures = new int[1]; GLES20.glGenTextures(1, textures, 0); int frameBufferTexture = textures[0]; int target = GLES11Ext.GL_TEXTURE_EXTERNAL_OES; GLES20.glBindTexture(target, frameBufferTexture); GLES20.glTexParameteri(target, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE); GLES20.glTexParameteri(target, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE); GLES20.glTexParameteri(target, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST); GLES20.glTexParameteri(target, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); int[] frameBuffers = new int[1]; GLES20.glGenFramebuffers(1, frameBuffers, 0); int frameBufferHandle = frameBuffers[0]; return new FrameBufferInfo(frameBufferHandle, frameBufferTexture); } /** * Release the framebuffer and delete the texture. * * @param fbi */ public static void glReleaseFrameBuffer(FrameBufferInfo fbi) { if (fbi != null) { GLES20.glDeleteFramebuffers(1, new int[] { fbi.frameBufferHandle }, 0); GLES20.glDeleteTextures(1, new int[] { fbi.textureHandle }, 0); } } public static void glDrawFrameBufferOnScreen(FrameBufferInfo fbi, Matrix mvpMatrix) { } /** * This class is a data structure for storing the FBO, including the FBO's * handle and related texture handle. * * @author jiankun.zhi * */ public static class FrameBufferInfo { public int frameBufferHandle; public int textureHandle; public FrameBufferInfo(int frameBuffer, int texture) { frameBufferHandle = frameBuffer; textureHandle = texture; } } }
[ "lihongjiang@supets.com" ]
lihongjiang@supets.com
1f911638c45b45a932d974d4b97fd9f0cfa710ab
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/34/34_8e0a5dcdd72d35008993a9b571066fb5e5860202/SaveDatasetAsPlugIn/34_8e0a5dcdd72d35008993a9b571066fb5e5860202_SaveDatasetAsPlugIn_s.java
b5cca035cf7063783e19d216931ffd30ca366af9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,896
java
/* * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI * for visualizing and manipulating spatial features with geometry and attributes. * * Copyright (C) 2003 Vivid Solutions * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * For more information, contact: * * Vivid Solutions * Suite #1A * 2328 Government Street * Victoria BC V8T 5G5 * Canada * * (250)385-6040 * www.vividsolutions.com */ package com.vividsolutions.jump.workbench.datasource; import java.util.Collection; import com.vividsolutions.jump.workbench.WorkbenchContext; import com.vividsolutions.jump.workbench.ui.GUIUtil; /** * Prompts the user to pick a dataset to save. * @see DataSourceQueryChooserDialog */ public class SaveDatasetAsPlugIn extends AbstractSaveDatasetAsPlugIn { protected Collection showDialog(WorkbenchContext context) { GUIUtil.centreOnWindow(getDialog()); getDialog().setVisible(true); return getDialog().wasOKPressed() ? getDialog().getCurrentChooser().getDataSourceQueries() : null; } protected void setSelectedFormat(String format) { getDialog().setSelectedFormat(format); } protected String getSelectedFormat() { return getDialog().getSelectedFormat(); } private DataSourceQueryChooserDialog getDialog() { String KEY = getClass().getName() + " - DIALOG"; if (null == getContext().getWorkbench().getBlackboard().get(KEY)) { getContext().getWorkbench().getBlackboard().put( KEY, new DataSourceQueryChooserDialog( DataSourceQueryChooserManager .get( getContext().getWorkbench() .getBlackboard()) .getSaveDataSourceQueryChoosers(), getContext().getWorkbench().getFrame(), getName(), true)); } return (DataSourceQueryChooserDialog) getContext().getWorkbench() .getBlackboard().get(KEY); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3a47bd8a099c1546d1e486d2e1b3882c4bdee536
fbac26b7ab5c7c3f9c36ad64d79f584d42315b61
/src/com/perl5/lang/pod/parser/psi/references/PodSubReference.java
46894a28da78bbaee3f41da09af90ea36e0d05a0
[ "Apache-2.0" ]
permissive
mishin/Perl5-IDEA
f3de638c05d2d82874ae2cb658b82b887da67639
41eb3f448db3db7859feb9e067380a23faae7798
refs/heads/master
2021-01-17T20:05:48.446328
2016-04-11T19:12:21
2016-04-11T19:12:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,039
java
/* * Copyright 2016 Alexandr Evstigneev * * 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.perl5.lang.pod.parser.psi.references; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementResolveResult; import com.intellij.psi.PsiFile; import com.intellij.psi.ResolveResult; import com.intellij.psi.impl.source.resolve.ResolveCache; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.util.IncorrectOperationException; import com.perl5.lang.perl.PerlScopes; import com.perl5.lang.perl.psi.references.resolvers.PerlSubReferenceResolver; import com.perl5.lang.perl.util.PerlPackageUtil; import com.perl5.lang.pod.PodLanguage; import com.perl5.lang.pod.parser.psi.PodFile; import com.perl5.lang.pod.parser.psi.impl.PodIdentifierImpl; import com.perl5.lang.pod.parser.psi.util.PodFileUtil; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; /** * Created by hurricup on 05.04.2016. */ public class PodSubReference extends PodReferenceBase<PodIdentifierImpl> { protected static final ResolveCache.PolyVariantResolver<PodSubReference> RESOLVER = new PodSubReferenceResolver(); public PodSubReference(PodIdentifierImpl element) { super(element, new TextRange(0, element.getTextLength()), true); } @NotNull @Override public ResolveResult[] multiResolve(boolean incompleteCode) { return ResolveCache.getInstance(myElement.getProject()).resolveWithCaching(this, RESOLVER, true, incompleteCode); } @Override public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException { return (PsiElement) myElement.replaceWithText(newElementName); } @Override public PsiElement bindToElement(@NotNull PsiElement element) throws IncorrectOperationException { return super.bindToElement(element); } private static class PodSubReferenceResolver implements ResolveCache.PolyVariantResolver<PodSubReference> { @NotNull @Override public ResolveResult[] resolve(@NotNull PodSubReference podSubReference, boolean incompleteCode) { PsiElement element = podSubReference.getElement(); if (element != null) { String subName = element.getText(); if (StringUtil.isNotEmpty(subName)) { PsiFile podFile = element.getContainingFile().getViewProvider().getPsi(PodLanguage.INSTANCE); if (podFile != null) { String className = PodFileUtil.getPackageName((PodFile) podFile); if (className == null) { className = "main"; } String canonicalName = className + PerlPackageUtil.PACKAGE_SEPARATOR + subName; List<PsiElement> targets = new ArrayList<PsiElement>(); final Project project = element.getProject(); PerlSubReferenceResolver.collectRelatedItems(canonicalName, project, null, targets, GlobalSearchScope.projectScope(project)); if (targets.isEmpty()) { PerlSubReferenceResolver.collectRelatedItems(canonicalName, project, null, targets, PerlScopes.getProjectAndLibrariesScope(project)); } if (!targets.isEmpty()) { List<ResolveResult> results = new ArrayList<ResolveResult>(); for (PsiElement target : targets) { results.add(new PsiElementResolveResult(target)); } return results.toArray(new ResolveResult[results.size()]); } } } } return ResolveResult.EMPTY_ARRAY; } } }
[ "hurricup@gmail.com" ]
hurricup@gmail.com
bbc3f9c27b68086760eacc8b9b118a7972e474ba
40ba8d597075e54196fe7383ddb2f2926262b03c
/src/java/chapter14/typeInfo/task24/TypeCounter.java
909448ae7bcbe1bb2385dcdd56da5967b3cbe46f
[]
no_license
MikeKhay/thinkingInJavaBruceEckel
4baf95b32a0baa3518a76a6b85db0f53ccd2481c
ef96fe6cbeda3cd994ee49b92d5c43326c70667e
refs/heads/main
2023-07-08T21:06:44.178320
2021-08-20T12:21:23
2021-08-20T12:21:23
381,660,028
0
0
null
null
null
null
UTF-8
Java
false
false
1,232
java
package chapter14.typeInfo.task24; import java.util.HashMap; public class TypeCounter extends HashMap<Class<?>, Integer> { private Class<?> bareType; public TypeCounter(Class<?> bareType){ this.bareType = bareType; } public void count(Object obj){ Class<?> type = obj.getClass(); if(!bareType.isAssignableFrom(type)) throw new RuntimeException(obj + " not correct type: " + bareType); countClass(type); } private void countClass(Class<?> type) { Integer quantity = get(type); put(type, quantity == null ? 1 : quantity + 1); Class<?> superClass = type.getSuperclass(); if(superClass != null && bareType.isAssignableFrom(superClass)) countClass(superClass); } public String toString(){ StringBuilder result = new StringBuilder("{"); for (Entry<Class<?>, Integer> pair : entrySet()){ result.append(pair.getKey().getSimpleName()); result.append("="); result.append(pair.getValue()); result.append(", "); } result.delete(result.length() - 2, result.length()); result.append("}"); return result.toString(); } }
[ "khajmike@gmail.com" ]
khajmike@gmail.com
61a56b65ae5f568f64904d9b30f2746e16da447d
5703bd7b22f26a84e4776df817eac0764515a79d
/core/src/main/java/com/google/errorprone/bugpatterns/InfiniteRecursion.java
43b6993c3cae51bf0d3457b1435358821d1a9380
[ "Apache-2.0" ]
permissive
jackass0528/error-prone
f0f5da6f2abe1fe3caa481538699f84f29b93acd
bf8560b2aed79ff7f91c24b6e7de33bec3db4c34
refs/heads/master
2021-01-20T11:05:23.935866
2017-03-02T22:21:08
2017-03-02T23:08:37
83,941,712
1
0
null
2017-03-05T03:28:31
2017-03-05T03:28:31
null
UTF-8
Java
false
false
3,571
java
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.bugpatterns; import static com.google.errorprone.BugPattern.Category.JDK; import static com.google.errorprone.BugPattern.SeverityLevel.ERROR; import static com.google.errorprone.matchers.Description.NO_MATCH; import com.google.common.collect.Iterables; import com.google.errorprone.BugPattern; import com.google.errorprone.VisitorState; import com.google.errorprone.matchers.Description; import com.google.errorprone.util.ASTHelpers; import com.sun.source.tree.ExpressionStatementTree; import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.IdentifierTree; import com.sun.source.tree.MemberSelectTree; import com.sun.source.tree.MethodInvocationTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.ReturnTree; import com.sun.source.tree.Tree; import com.sun.source.tree.Tree.Kind; import com.sun.source.util.SimpleTreeVisitor; import com.sun.tools.javac.code.Symbol.MethodSymbol; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.TreeInfo; /** @author cushon@google.com (Liam Miller-Cushon) */ @BugPattern( name = "InfiniteRecursion", category = JDK, summary = "This method always recurses, and will cause a StackOverflowError", severity = ERROR ) public class InfiniteRecursion extends BugChecker implements BugChecker.MethodTreeMatcher { @Override public Description matchMethod(MethodTree tree, VisitorState state) { if (tree.getBody() == null || tree.getBody().getStatements().size() != 1) { return NO_MATCH; } Tree statement = TreeInfo.skipParens((JCTree) Iterables.getOnlyElement(tree.getBody().getStatements())); ExpressionTree expr = statement.accept( new SimpleTreeVisitor<ExpressionTree, Void>() { @Override public ExpressionTree visitExpressionStatement( ExpressionStatementTree tree, Void unused) { return tree.getExpression(); } @Override public ExpressionTree visitReturn(ReturnTree tree, Void unused) { return tree.getExpression(); } }, null); if (!(expr instanceof MethodInvocationTree)) { return NO_MATCH; } ExpressionTree select = ((MethodInvocationTree) expr).getMethodSelect(); switch (select.getKind()) { case IDENTIFIER: break; case MEMBER_SELECT: ExpressionTree receiver = ((MemberSelectTree) select).getExpression(); if (receiver.getKind() != Kind.IDENTIFIER) { return NO_MATCH; } if (!((IdentifierTree) receiver).getName().contentEquals("this")) { return NO_MATCH; } break; default: return NO_MATCH; } MethodSymbol sym = ASTHelpers.getSymbol(tree); if (sym == null || !sym.equals(ASTHelpers.getSymbol(expr))) { return NO_MATCH; } return describeMatch(statement); } }
[ "cushon@google.com" ]
cushon@google.com
fd6a3c02c922725aa915b0aaa098473659fd2758
9601874ddc706148e8e3b1ff34af69e9fafa8b60
/src/test/java/sn/ssi/sygmap/web/rest/ClientForwardControllerTest.java
a7f2ee6e784f133e92f9aaea0f151a45a5675f5a
[]
no_license
JeanNoelNdiaye/jhipster-sample-application
de2aabbed868cb28c29227f1af7982aebf5f9dc1
c6265bb7a2883b1cb6e9da1c47dc32e207a4acae
refs/heads/master
2023-01-09T11:13:51.772315
2020-11-09T18:26:22
2020-11-09T18:26:22
311,428,762
0
0
null
null
null
null
UTF-8
Java
false
false
2,133
java
package sn.ssi.sygmap.web.rest; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * Unit tests for the {@link ClientForwardController} REST controller. */ public class ClientForwardControllerTest { private MockMvc restMockMvc; @BeforeEach public void setup() { ClientForwardController clientForwardController = new ClientForwardController(); this.restMockMvc = MockMvcBuilders.standaloneSetup(clientForwardController, new TestController()).build(); } @Test public void getBackendEndpoint() throws Exception { restMockMvc .perform(get("/test")) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.TEXT_PLAIN_VALUE)) .andExpect(content().string("test")); } @Test public void getClientEndpoint() throws Exception { ResultActions perform = restMockMvc.perform(get("/non-existant-mapping")); perform.andExpect(status().isOk()).andExpect(forwardedUrl("/")); } @Test public void getNestedClientEndpoint() throws Exception { restMockMvc.perform(get("/admin/user-management")).andExpect(status().isOk()).andExpect(forwardedUrl("/")); } @RestController public static class TestController { @RequestMapping(value = "/test") public String test() { return "test"; } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
dddc1c49188d8ccb61c851a3a8c29247826e9ad8
5180646a7afc4cd180401c6859527078661144c8
/Clase4Java/src/Ordenamiento/Programa.java
fb465e70dd89852a430166baf040442a4afd0c7f
[]
no_license
milmullins/ClasesJavaMeLi
b130025d6012a913507295736dfc9b830927a84a
74bdda1df82b05d2dcdee2e88f341082b802bc14
refs/heads/main
2023-03-27T08:20:18.741442
2021-03-29T12:02:21
2021-03-29T12:02:21
351,779,870
0
0
null
null
null
null
UTF-8
Java
false
false
1,416
java
package Ordenamiento; import java.util.Comparator; public class Programa { public static void main(String[] args) throws InterruptedException { Integer[] intArray = {231, 54, 12, 1, 54, -65, 86, -1}; String[] stringArray = {"f", "c", "a", "d", "b", "e", "g"}; Sorter sorter = (Sorter)MiFactory.getInstance("sorter"); Comparator<String> compString = (str1,str2) ->str1.compareTo(str2); Comparator<Integer> compInteger = (int1,int2) ->int1.compareTo(int2); QuickSortSorterImple quickSort = new QuickSortSorterImple(); HeapSortSorterImple heapSort = new HeapSortSorterImple(); BubbleSortSorterImple bubbleSort = new BubbleSortSorterImple<>(); //System.out.println("Old Integer[]: " + Arrays.toString(intArray)); //System.out.println("New Integer[]: " + Arrays.toString(sorter.sort(intArray,compInteger))); //System.out.println("Old String[]: " + Arrays.toString(stringArray)); //System.out.println("New String[]: " + Arrays.toString(sorter.sort(stringArray,compString))); Integer[] arrayLargo = new Integer[100000]; int j= 0; for(int i=100000;i>0;i--){ arrayLargo[j] = i; j++; } Time time = new Time(); time.Start(); sorter.sort(arrayLargo,compInteger); time.Stop(); System.out.println(time.elapsedTime()); } }
[ "you@example.com" ]
you@example.com
19352aafc2ecfc46889c10ad025a0e918f614e13
f9f664fade2b9936e3a450d9d0bba19fe50fbeb2
/camel-blueprint-salesforce-test/src/main/java/org/apache/camel/salesforce/dto/WebLink.java
c0627eb59acc772e96c02875f7595681ea2fcba3
[]
no_license
1984shekhar/fuse-my-examples
78c2898c2366649504bbe22480b894d29952d2a7
761db030c603b8398ea78a18a4cb2ade1a55b34f
refs/heads/master
2022-12-07T05:03:06.826126
2019-10-13T16:21:28
2019-10-13T16:21:28
30,963,768
0
4
null
2022-11-24T03:57:27
2015-02-18T11:58:40
Java
UTF-8
Java
false
false
7,192
java
/* * Salesforce DTO generated by camel-salesforce-maven-plugin * Generated on: Wed Apr 08 20:26:47 IST 2015 */ package org.apache.camel.salesforce.dto; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamConverter; import org.codehaus.jackson.annotate.JsonProperty; import org.apache.camel.component.salesforce.api.PicklistEnumConverter; import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase; /** * Salesforce DTO for SObject WebLink */ @XStreamAlias("WebLink") public class WebLink extends AbstractSObjectBase { // PageOrSobjectType @XStreamConverter(PicklistEnumConverter.class) private PageOrSobjectTypeEnum PageOrSobjectType; @JsonProperty("PageOrSobjectType") public PageOrSobjectTypeEnum getPageOrSobjectType() { return this.PageOrSobjectType; } @JsonProperty("PageOrSobjectType") public void setPageOrSobjectType(PageOrSobjectTypeEnum PageOrSobjectType) { this.PageOrSobjectType = PageOrSobjectType; } // IsProtected private Boolean IsProtected; @JsonProperty("IsProtected") public Boolean getIsProtected() { return this.IsProtected; } @JsonProperty("IsProtected") public void setIsProtected(Boolean IsProtected) { this.IsProtected = IsProtected; } // Url private String Url; @JsonProperty("Url") public String getUrl() { return this.Url; } @JsonProperty("Url") public void setUrl(String Url) { this.Url = Url; } // EncodingKey @XStreamConverter(PicklistEnumConverter.class) private EncodingKeyEnum EncodingKey; @JsonProperty("EncodingKey") public EncodingKeyEnum getEncodingKey() { return this.EncodingKey; } @JsonProperty("EncodingKey") public void setEncodingKey(EncodingKeyEnum EncodingKey) { this.EncodingKey = EncodingKey; } // LinkType @XStreamConverter(PicklistEnumConverter.class) private LinkTypeEnum LinkType; @JsonProperty("LinkType") public LinkTypeEnum getLinkType() { return this.LinkType; } @JsonProperty("LinkType") public void setLinkType(LinkTypeEnum LinkType) { this.LinkType = LinkType; } // OpenType @XStreamConverter(PicklistEnumConverter.class) private OpenTypeEnum OpenType; @JsonProperty("OpenType") public OpenTypeEnum getOpenType() { return this.OpenType; } @JsonProperty("OpenType") public void setOpenType(OpenTypeEnum OpenType) { this.OpenType = OpenType; } // Height private Integer Height; @JsonProperty("Height") public Integer getHeight() { return this.Height; } @JsonProperty("Height") public void setHeight(Integer Height) { this.Height = Height; } // Width private Integer Width; @JsonProperty("Width") public Integer getWidth() { return this.Width; } @JsonProperty("Width") public void setWidth(Integer Width) { this.Width = Width; } // ShowsLocation private Boolean ShowsLocation; @JsonProperty("ShowsLocation") public Boolean getShowsLocation() { return this.ShowsLocation; } @JsonProperty("ShowsLocation") public void setShowsLocation(Boolean ShowsLocation) { this.ShowsLocation = ShowsLocation; } // HasScrollbars private Boolean HasScrollbars; @JsonProperty("HasScrollbars") public Boolean getHasScrollbars() { return this.HasScrollbars; } @JsonProperty("HasScrollbars") public void setHasScrollbars(Boolean HasScrollbars) { this.HasScrollbars = HasScrollbars; } // HasToolbar private Boolean HasToolbar; @JsonProperty("HasToolbar") public Boolean getHasToolbar() { return this.HasToolbar; } @JsonProperty("HasToolbar") public void setHasToolbar(Boolean HasToolbar) { this.HasToolbar = HasToolbar; } // HasMenubar private Boolean HasMenubar; @JsonProperty("HasMenubar") public Boolean getHasMenubar() { return this.HasMenubar; } @JsonProperty("HasMenubar") public void setHasMenubar(Boolean HasMenubar) { this.HasMenubar = HasMenubar; } // ShowsStatus private Boolean ShowsStatus; @JsonProperty("ShowsStatus") public Boolean getShowsStatus() { return this.ShowsStatus; } @JsonProperty("ShowsStatus") public void setShowsStatus(Boolean ShowsStatus) { this.ShowsStatus = ShowsStatus; } // IsResizable private Boolean IsResizable; @JsonProperty("IsResizable") public Boolean getIsResizable() { return this.IsResizable; } @JsonProperty("IsResizable") public void setIsResizable(Boolean IsResizable) { this.IsResizable = IsResizable; } // Position @XStreamConverter(PicklistEnumConverter.class) private PositionEnum Position; @JsonProperty("Position") public PositionEnum getPosition() { return this.Position; } @JsonProperty("Position") public void setPosition(PositionEnum Position) { this.Position = Position; } // ScontrolId private String ScontrolId; @JsonProperty("ScontrolId") public String getScontrolId() { return this.ScontrolId; } @JsonProperty("ScontrolId") public void setScontrolId(String ScontrolId) { this.ScontrolId = ScontrolId; } // MasterLabel private String MasterLabel; @JsonProperty("MasterLabel") public String getMasterLabel() { return this.MasterLabel; } @JsonProperty("MasterLabel") public void setMasterLabel(String MasterLabel) { this.MasterLabel = MasterLabel; } // Description private String Description; @JsonProperty("Description") public String getDescription() { return this.Description; } @JsonProperty("Description") public void setDescription(String Description) { this.Description = Description; } // DisplayType @XStreamConverter(PicklistEnumConverter.class) private DisplayTypeEnum DisplayType; @JsonProperty("DisplayType") public DisplayTypeEnum getDisplayType() { return this.DisplayType; } @JsonProperty("DisplayType") public void setDisplayType(DisplayTypeEnum DisplayType) { this.DisplayType = DisplayType; } // RequireRowSelection private Boolean RequireRowSelection; @JsonProperty("RequireRowSelection") public Boolean getRequireRowSelection() { return this.RequireRowSelection; } @JsonProperty("RequireRowSelection") public void setRequireRowSelection(Boolean RequireRowSelection) { this.RequireRowSelection = RequireRowSelection; } // NamespacePrefix private String NamespacePrefix; @JsonProperty("NamespacePrefix") public String getNamespacePrefix() { return this.NamespacePrefix; } @JsonProperty("NamespacePrefix") public void setNamespacePrefix(String NamespacePrefix) { this.NamespacePrefix = NamespacePrefix; } }
[ "shekhar.csp84@yahoo.co.in" ]
shekhar.csp84@yahoo.co.in
b412a2d8056367acafcb79af315eafd25888bbe4
67f2a9eb7c449ab3a9ddf5044602cba45feacee2
/modules/utility/geotk-utility/src/test/java/org/geotoolkit/math/VectorTest.java
70311e8e152c77e054abf79ca9399f861755c7a4
[]
no_license
lvvi/geotoolkit
f01deb47de18ffd591852922e7f432f5f615f2b7
5f02a6e9cd236ec37cb041f8f35cbab283278cea
refs/heads/master
2020-12-31T02:14:55.570737
2016-04-25T20:57:14
2016-04-25T20:57:14
58,119,390
1
0
null
2016-05-05T09:18:34
2016-05-05T09:18:34
null
UTF-8
Java
false
false
7,507
java
/* * Geotoolkit.org - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2009-2012, Open Source Geospatial Foundation (OSGeo) * (C) 2009-2012, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.math; import org.junit.*; import static org.junit.Assert.*; /** * Tests the {@link Vector} class. * * @author Martin Desruisseaux (Geomatys) * @version 3.09 * * @since 3.00 */ public final strictfp class VectorTest extends org.geotoolkit.test.TestBase { /** * Tests {@link SequenceVector}. */ @Test public void testSequence() { Vector vector = Vector.createSequence(100, 2, 10); assertEquals(Byte.class, vector.getElementType()); assertEquals(10, vector.size()); for (int i=0; i<vector.size(); i++) { assertEquals(100 + 2*i, vector.byteValue(i)); } /* * Same tests, using double values. */ vector = Vector.createSequence(100, 0.1, 10); assertEquals(Double.class, vector.getElementType()); assertEquals(10, vector.size()); for (int i=0; i<vector.size(); i++) { assertEquals(100 + 0.1*i, vector.doubleValue(i), 1E-10); } } /** * Tests {@link ArrayVector} backed by an array of primitive type. * We use the {@code short} type since it doesn't have specialized * vector implementation. */ @Test public void testPrimitiveTypeArray() { final short[] array = new short[400]; for (int i=0; i<array.length; i++) { array[i] = (short) ((i + 100) * 10); } Vector vector = Vector.create(array); assertTrue(vector instanceof ArrayVector); assertSame(vector, Vector.create(vector)); assertEquals(array.length, vector.size()); assertEquals(Short.class, vector.getElementType()); /* * Tests element values. */ for (int i=0; i<array.length; i++) { assertEquals(array[i], vector.shortValue (i)); assertEquals(array[i], vector.intValue (i)); assertEquals(array[i], vector.floatValue (i), 0); assertEquals(array[i], vector.doubleValue(i), 0); } /* * Tests exception. */ try { vector.floatValue(array.length); fail("Expected an IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException e) { // This is the expected exception. } try { vector.byteValue(0); fail("Expected a ClassCastException"); } catch (ClassCastException e) { // This is the expected exception. } /* * Tests subvector in the range [100:2:298]. */ vector = vector.subList(100, 2, 100); assertEquals(100, vector.size()); for (int i=0; i<100; i++) { assertEquals(array[i*2 + 100], vector.shortValue(i), 0); } try { vector.shortValue(100); fail("Expected an IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException e) { // This is the expected exception. } /* * Tests subvector at specific indexes. */ vector = vector.view(10, 20, 25); assertEquals(3, vector.size()); assertEquals(array[120], vector.shortValue(0), 0); assertEquals(array[140], vector.shortValue(1), 0); assertEquals(array[150], vector.shortValue(2), 0); } /** * Tests {@link ArrayVector.Float} backed by an array of float type. * * @since 3.09 */ @Test public void testFloatArray() { final float[] array = new float[400]; for (int i=0; i<array.length; i++) { array[i] = (i + 100) * 10; } Vector vector = Vector.create(array); assertTrue(vector instanceof ArrayVector.Float); assertSame(vector, Vector.create(vector)); assertEquals(array.length, vector.size()); assertEquals(Float.class, vector.getElementType()); /* * Tests element values. */ for (int i=0; i<array.length; i++) { assertEquals(array[i], vector.floatValue (i), 0); assertEquals(array[i], vector.doubleValue(i), 0); } } /** * Tests {@link ArrayVector.Double} backed by an array of double type. * * @since 3.09 */ @Test public void testDoubleArray() { final double[] array = new double[400]; for (int i=0; i<array.length; i++) { array[i] = (i + 100) * 10; } Vector vector = Vector.create(array); assertTrue(vector instanceof ArrayVector.Double); assertSame(vector, Vector.create(vector)); assertEquals(array.length, vector.size()); assertEquals(Double.class, vector.getElementType()); /* * Tests element values. */ for (int i=0; i<array.length; i++) { assertEquals(array[i], vector.floatValue (i), 0); assertEquals(array[i], vector.doubleValue(i), 0); } } /** * Tests {@link Vector#reverse}. */ @Test public void testReverse() { final double[] array = {2, 3, 8}; final double[] expected = {8, 3, 2}; assertEquals(Vector.create(expected), Vector.create(array).reverse()); } /** * Tests {@link Vector#concatenate}. */ @Test public void testConcatenate() { final float[] array = new float[40]; for (int i=0; i<array.length; i++) { array[i] = i * 10; } final int[] extra = new int[20]; for (int i=0; i<extra.length; i++) { extra[i] = (i + 40) * 10; } Vector v1 = Vector.create(array); Vector v2 = Vector.create(extra); Vector v3 = v1.concatenate(v2); assertEquals("Length of V3 should be the sum of V1 and V2 length.", 60, v3.size()); assertEquals("Component type should be the widest of V1 and V2.", Float.class, v3.getElementType()); assertEquals("Sample from V1.", Float .valueOf(200), v3.get(20)); assertEquals("Sample from V2.", Integer.valueOf(500), v3.get(50)); for (int i=0; i<60; i++) { assertEquals(i*10, v3.floatValue(i), 0f); } assertSame("Should be able to restitute the original vector.", v1, v3.subList( 0, 40)); assertSame("Should be able to restitute the original vector.", v2, v3.subList(40, 60)); /* * Tests concatenation of views at fixed indices. Should be * implemented as the concatenation of the indices arrays when possible. */ final Vector expected = v3.view(10, 25, 30, 0, 35, 39); v2 = v1.view( 0, 35, 39); v1 = v1.view(10, 25, 30); v3 = v1.concatenate(v2); assertEquals(expected, v3); assertFalse("Expected concatenation of the indices.", v3 instanceof ConcatenatedVector); } }
[ "martin.desruisseaux@geomatys.fr" ]
martin.desruisseaux@geomatys.fr
394e0a8301c00ba851878ecada9ee711904eba7c
85cba2af15412743eca8b52ab1854d7d7b5752b4
/src/java/Biblioteca/Unpa/LB/TEST/TEST_Login.java
1fc430f285a6e524359c618e83f685339c654f25
[]
no_license
GenaroSMO/Proyecto1
3d0e6a6ccddcc2d15a5bee6f0fb7693aaf191682
4c187ed7c94c2bb1c339b2ddfc4275bea8936149
refs/heads/main
2023-01-22T03:02:36.022030
2020-12-04T01:45:59
2020-12-04T01:45:59
318,366,209
0
0
null
null
null
null
UTF-8
Java
false
false
928
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 Biblioteca.Unpa.LB.TEST; import Biblioteca.Unpa.LB.BLL.BLL_LoginUsuario; import Biblioteca.Unpa.LB.EL.LoginUsuario; import Biblioteca.util.DbUtil; import java.io.IOException; import java.sql.Connection; /** * * @author labsoft005 */ public class TEST_Login { private Connection dbCon; //private Connection conn; DbUtil Conexion; // #endregion public TEST_Login()throws IOException { this.Initialize(); } public void Initialize()throws IOException { dbCon = DbUtil.getInstance().getConnection(); } public int Login(LoginUsuario login) { BLL_LoginUsuario log = new BLL_LoginUsuario(); return log.insertar_LoginUsuario(dbCon, login); } }
[ "you@example.com" ]
you@example.com
3c3690aa18e1a5dcbdaa54e78438ed34d1c6661f
85f573af305c07112cf3296c4c9e26935b0350ad
/app/src/main/java/com/haoyigou/hyg/entity/VoucherEntry.java
5b4c7aca86b72169f909edb89b2f768571935c7e
[]
no_license
wuliang6661/Turuk
0cc8c483c4a8cb536874e7025437042dcbb00a11
4e3a4c0562f0f0f2e7bf9fd47166541550959d62
refs/heads/main
2023-07-20T17:58:56.764287
2021-09-03T14:26:18
2021-09-03T14:26:18
402,777,968
0
0
null
null
null
null
UTF-8
Java
false
false
4,135
java
package com.haoyigou.hyg.entity; import java.util.List; /** * Created by wuliang on 2017/3/31. * <p> * 充值数据封装bean */ public class VoucherEntry { /** * disprice : 0.01 * id : 19 * isShowIcon : 1 * ordertype : 01 * price : 10.0 * pricetemp : 0.01 * recharge : 10 * rechargeName : 10元 * skulist : [{"disprice":10,"id":23,"memo":"全国流量,当月可用","region":0},{"disprice":14.7,"id":48,"memo":"省内流量,当月可用","region":1}] */ private double disprice; private int id; private int isShowIcon; private String ordertype; private double price; private double pricetemp; private int recharge; private String rechargeName; private List<SkulistBo> skulist; private int hasMoneyCoupon; private int hasflowCoupon; private int parprice; public int getParprice() { return parprice; } public void setParprice(int parprice) { this.parprice = parprice; } public int getHasMoneyCoupon() { return hasMoneyCoupon; } public void setHasMoneyCoupon(int hasMoneyCoupon) { this.hasMoneyCoupon = hasMoneyCoupon; } public int getHasflowCoupon() { return hasflowCoupon; } public void setHasflowCoupon(int hasflowCoupon) { this.hasflowCoupon = hasflowCoupon; } public double getDisprice() { return disprice; } public void setDisprice(double disprice) { this.disprice = disprice; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getIsShowIcon() { return isShowIcon; } public void setIsShowIcon(int isShowIcon) { this.isShowIcon = isShowIcon; } public String getOrdertype() { return ordertype; } public void setOrdertype(String ordertype) { this.ordertype = ordertype; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public double getPricetemp() { return pricetemp; } public void setPricetemp(double pricetemp) { this.pricetemp = pricetemp; } public int getRecharge() { return recharge; } public void setRecharge(int recharge) { this.recharge = recharge; } public String getRechargeName() { return rechargeName; } public void setRechargeName(String rechargeName) { this.rechargeName = rechargeName; } public List<SkulistBo> getSkulist() { return skulist; } public void setSkulist(List<SkulistBo> skulist) { this.skulist = skulist; } public static class SkulistBo { /** * disprice : 10.0 * id : 23 * memo : 全国流量,当月可用 * region : 0 */ private double disprice; private int id; private String memo; private int region; public double getDisprice() { return disprice; } public void setDisprice(double disprice) { this.disprice = disprice; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } public int getRegion() { return region; } public void setRegion(int region) { this.region = region; } } }
[ "wy19941007" ]
wy19941007
8d8bd2a9557e00a104a08ca79d538ce92eb41588
259c101b7bbeef9efcc25134e7e21f037a7a4092
/DTSEmbed_LSC_solve_path/src/softtest/fsmanalysis/c/AnalysisElement.java
d6c3284a9944230a65d987a1fd21e5bdc3dddac6
[]
no_license
13001090108/dts-solve-path
a95c71c31d38afb2c55d85884b931f2938c1f75d
649b92eddcc76705bbb4926b33da00009303c04a
refs/heads/master
2020-04-16T23:17:21.340218
2019-01-24T09:34:50
2019-01-24T09:37:09
166,005,614
0
0
null
null
null
null
GB18030
Java
false
false
2,615
java
package softtest.fsmanalysis.c; /** * DTSC一次分析的最小单元是.C文件,而具体分析过程中是分析预处理得到的中间文件, * 因此这个类记录分析单元对应的信息 * @author * */ public class AnalysisElement implements Comparable<AnalysisElement> { private String fileName; private String interFileName; private boolean cppError = false; /** * 该分析单元节点的出度,当前分析单元体依赖多少个外部的分析单元 */ private int outDegree; /** * 该分析单元节点的入度,当前分析单元被多少个外部的分析单元依赖 */ private int inDegree; /** * 深度遍历用于查找环的 */ private int color; public AnalysisElement(String fileName, String interFileName) { this.fileName = fileName; this.interFileName = interFileName; outDegree = 0; inDegree = 0; color = 0; } public AnalysisElement(String fileName) { this(fileName, ""); outDegree = 0; inDegree = 0; color = 0; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getInterFileName() { return interFileName; } public void setInterFileName(String interFileName) { this.interFileName = interFileName; } public void setCError(boolean cppError) { this.cppError = cppError; } public boolean isCError() { return cppError; } public int getOutDegree() { return outDegree; } public void setOutDegree(int degree) { this.outDegree = degree; } /** * 更新函数节点的入度 */ public void incOutDegree() { this.outDegree++; } public void decOutDegree() { this.outDegree--; } public int getInDegree() { return inDegree; } /** * 更新函数节点的入度 */ public void incInDegree() { this.inDegree++; } public void decInDegree() { this.inDegree--; } public void setColor(int color) { this.color = color; } public int getColor() { return color; } @Override public String toString() { return fileName; } public int compareTo(AnalysisElement o) { return fileName.compareTo(o.getFileName()); } @Override public int hashCode() { return fileName.hashCode(); } @Override public boolean equals(Object obj) { if(!(obj instanceof AnalysisElement)) return false; AnalysisElement ae=(AnalysisElement)obj; if(fileName.equals(ae.fileName)) return true; else return false; } }
[ "lishaochun@bupt.edu.cn" ]
lishaochun@bupt.edu.cn
fbee857dcfe1879798a837d0cb0733efe565bfbe
b4b95c21572ac6573706df0edba99e4abb947924
/component-api/src/main/java/org/talend/sdk/component/api/configuration/ui/OptionsOrder.java
2dd481ae59d4d1c71e7a33103339f770784ca99d
[ "Apache-2.0" ]
permissive
RyanSkraba/component-runtime
33d3231658cda17c3861f16f0cceca628c27a4c2
cae7b10238ee5b62256a72a780c781c40fc52822
refs/heads/master
2023-02-18T02:38:37.859335
2021-01-18T15:31:32
2021-01-18T18:07:04
126,361,369
0
0
Apache-2.0
2018-03-22T16:07:04
2018-03-22T16:07:01
null
UTF-8
Java
false
false
1,132
java
/** * Copyright (C) 2006-2020 Talend Inc. - www.talend.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.talend.sdk.component.api.configuration.ui; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import org.talend.sdk.component.api.configuration.ui.meta.Ui; import org.talend.sdk.component.api.meta.Documentation; @Ui @Documentation("Allows to sort a class properties.") @Target(TYPE) @Retention(RUNTIME) public @interface OptionsOrder { String[] value(); }
[ "rmannibucau@gmail.com" ]
rmannibucau@gmail.com
8590971fdefa20df6737a434d8645a249d609340
8b46b9c92e7b35919618b0696b3657ee13010945
/src/main/java/org/codelibs/fione/h2o/bindings/pojos/NetworkEvent.java
5e81a188cb0fe25dffa76a4c41aaa008b9251899
[ "Apache-2.0" ]
permissive
fireae/fione
837bebc22f7b7d42ed3079ff212eaf17cbcfebc6
b26f74d2fff6b9c34f64446503dd45edf0716ed8
refs/heads/master
2021-03-11T05:02:53.309517
2020-03-09T20:49:31
2020-03-09T20:49:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,471
java
/* * Copyright 2012-2020 CodeLibs Project 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.codelibs.fione.h2o.bindings.pojos; import com.google.gson.GsonBuilder; import com.google.gson.annotations.SerializedName; public class NetworkEvent extends EventV3 { /** * Boolean flag distinguishing between sends (true) and receives(false) */ @SerializedName("is_send") public boolean isSend; /** * network protocol (UDP/TCP) */ public String protocol; /** * UDP type (exec,ack, ackack,... */ @SerializedName("msg_type") public String msgType; /** * Sending node */ public String from; /** * Receiving node */ public String to; /** * Pretty print of the first few bytes of the msg payload. Contains class name for tasks. */ public String data; /*------------------------------------------------------------------------------------------------------------------ // INHERITED //------------------------------------------------------------------------------------------------------------------ // Time when the event was recorded. Format is hh:mm:ss:ms public String date; // Time in nanos public long nanos; // type of recorded event public TimelineEventEventType type; */ /** * Public constructor */ public NetworkEvent() { isSend = false; protocol = "unknown"; msgType = "unknown"; from = "unknown"; to = "unknown"; data = "unknown"; date = ""; nanos = -1L; type = TimelineEventEventType.unknown; } /** * Return the contents of this object as a JSON String. */ @Override public String toString() { return new GsonBuilder().serializeSpecialFloatingPointValues().create().toJson(this); } }
[ "shinsuke@apache.org" ]
shinsuke@apache.org
b27b00a2f5b03c61e3f706d269a973b8bf76d6b5
9c7074a2467350bd855cbacba2857199cda5ebc7
/20210809(ZJYD_v2.6.0)/app/src/main/java/com/pukka/ydepg/common/http/v6bean/v6request/GetAlacarteChoosedContentsRequest.java
a48a1dc860df06d8d8d5d9bb8ad45434a14bbbf5
[]
no_license
wangkk24/testgit
ce6c3f371bcac56832f62f9631cdffb32d9f2ed2
0eb6d2cc42f61cf28ce50b77d754dcfbd152d91c
refs/heads/main
2023-07-15T21:45:24.674154
2021-08-31T07:13:14
2021-08-31T07:13:14
401,544,031
1
1
null
null
null
null
UTF-8
Java
false
false
1,213
java
package com.pukka.ydepg.common.http.v6bean.v6request; import com.google.gson.annotations.SerializedName; public class GetAlacarteChoosedContentsRequest { /* *订购自选包用户ID */ @SerializedName("userID") private String userID; /* *自选包产品ID *如果非自选包产品,则请求拒绝 */ @SerializedName("productID") private String productID; /* *内容外部ID *和订购时PriceObject.type=200或不填一个对象 *如果不传参或者参数为空,则查询所有的已添加且当前时间有效的内容 *如果传参且不为空,则只查询已添加且有效的该内容 */ @SerializedName("contentID") private String contentID; public String getUserID() { return userID; } public void setUserID(String userID) { this.userID = userID; } public String getProductID() { return productID; } public void setProductID(String productID) { this.productID = productID; } public String getContentID() { return contentID; } public void setContentID(String contentID) { this.contentID = contentID; } }
[ "wangkk@easier.cn" ]
wangkk@easier.cn
1f106ad41b52065686a9d0af1578c4197ccbb190
6cecfc95ae02243937d1c5046c74f410dc63c22a
/androidtoolbox/src/main/java/me/xiaopan/android/graphics/MatrixUtils.java
69124709c338f59d4e6d2929e15fc4bd9a973f50
[ "Apache-2.0" ]
permissive
lionoggo/AndroidToolbox
14749e4c48d4bf72418fe673514cb96e6bfcdd9b
5a9ca975380e67bce7209338d4c0e4eaa7c60ab1
refs/heads/master
2021-06-18T07:29:56.109941
2017-07-03T08:15:02
2017-07-03T08:15:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,687
java
/* * Copyright (C) 2016 Peng fei Pan <sky@xiaopan.me> * * 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 me.xiaopan.android.graphics; import android.graphics.Matrix; public class MatrixUtils { private static final float[] matrixValues = new float[9]; /** * Helper method that 'unpacks' a Matrix and returns the required value * * @param matrix - Matrix to unpack * @param whichValue - Which value from Matrix.M* to return * @return float - returned value */ @SuppressWarnings("unused") public static float getMatrixValue(Matrix matrix, int whichValue) { synchronized (matrixValues){ matrix.getValues(matrixValues); return matrixValues[whichValue]; } } /** * 获取Matrix的缩放比例 */ public static float getMatrixScale(Matrix matrix) { synchronized (matrixValues){ matrix.getValues(matrixValues); float scaleX = matrixValues[Matrix.MSCALE_X]; float scaleY = matrixValues[Matrix.MSKEW_Y]; return (float) Math.sqrt((float) Math.pow(scaleX, 2) + (float) Math.pow(scaleY, 2)); } } }
[ "sky@xiaopan.me" ]
sky@xiaopan.me
d16640f2ac6e80d963aad76b71369d4248d9dc0c
d44961b736d956be5e294d3e6def8ffb008376ee
/crp-rule-stomach/src/main/java/com/clinical/dao/master/ZjTemOperationRecordMapper.java
cc742c85add54246af0915f1bb818ae0ae1844f9
[]
no_license
zhiji6/rule-2
2b5062f2e77797a87e43061b190d90fef5bbdbd8
cb58cde99257242bd0c394f75f1f2d02dd00b5c2
refs/heads/master
2023-08-15T06:21:07.833357
2021-03-06T08:28:14
2021-03-06T08:28:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
301
java
package com.clinical.dao.master; import com.clinical.model.master.TEM_OPERATION_RECORD; import java.util.List; public interface ZjTemOperationRecordMapper { List<TEM_OPERATION_RECORD> findZjTemOperationRecordByUniqueId(String unique_id_lv2); List<String> findZjTemOperationRecordByIncr(); }
[ "sdlqmc@yeah.net" ]
sdlqmc@yeah.net
0ee5be36e9b4757e09f125bd86c0a511e8e5b04c
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_54285.java
34a2617bc12e966dacbe0c9a6bf66901469434aa
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
175
java
@NativeType("uint64_t") public static long BGFX_STATE_BLEND_EQUATION_SEPARATE(@NativeType("uint64_t") long _rgb,@NativeType("uint64_t") long _a){ return _rgb | (_a << 3); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
aaff6f97694d7394998f18edbfa17feac41e696a
7738a40c403f0e8342aa36475a6f152cf8a172aa
/app/src/main/java/com/abhidev/adapters/SearchFragmmentAdapter.java
067e02377f134f2ddf4dd2c574f4439f0d5bebbe
[]
no_license
rishabhjainj/AbhiDev
33343755f5775ac71d6d202a5c77920dafe0c1ae
beb29c30b0889fb5053456a4c0923059e0fb6ab2
refs/heads/master
2022-02-26T09:29:34.390585
2019-09-17T08:26:27
2019-09-17T08:26:27
208,992,239
0
0
null
null
null
null
UTF-8
Java
false
false
2,553
java
package com.abhidev.adapters; import android.content.Context; import android.graphics.Color; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.abhidev.Fragments.SearchFragment; import com.abhidev.R; import java.util.ArrayList; /** * Created by rahul on 3/5/18. */ public class SearchFragmmentAdapter extends RecyclerView.Adapter<SearchFragmmentAdapter.CustomSearchViewHolder> { private Context context; private int previousPosition=0; private LayoutInflater inflater; private int visibleThreshold = 5; boolean isLoading = false, isMoreDataAvailable = true; int x; ArrayList<String> stringArrayList = new ArrayList<>(); private int lastVisibleItem, totalItemCount; SearchFragment obj; public SearchFragmmentAdapter(Context context, ArrayList<String> stringArrayList, SearchFragment obj) { this.context = context; this.stringArrayList = stringArrayList; this.obj = obj; inflater = LayoutInflater.from(context); } @Override public CustomSearchViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view; view = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_search_item,parent,false); return new CustomSearchViewHolder(view); } @Override public int getItemCount() { return stringArrayList.size(); } @Override public void onBindViewHolder(final CustomSearchViewHolder holder, final int position) { if(position==2){ holder.PopItem.setTextColor(Color.BLACK); holder.PopItem.setTextSize(15); } holder.PopItem.setText(stringArrayList.get(position)); holder.PopItem.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(position>2){ //obj.onQueryTextSubmit(holder.PopItem.getText().toString()); obj.searchView.setQuery(holder.PopItem.getText().toString(),true); } } }); } public class CustomSearchViewHolder extends RecommendedUniAdapter.RecyclerViewHolder { public TextView PopItem; public View parent; public CustomSearchViewHolder(View view){ super(view); PopItem =(TextView)view.findViewById(R.id.item); this.parent = view; } } }
[ "parasjain.jain@outlook.com" ]
parasjain.jain@outlook.com
8d31a433772dcb18ec9c95dfd4fad3467b8ccf4f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_0dba0c773145d1ac0304f6995691912739171ca3/ResultsFactory/33_0dba0c773145d1ac0304f6995691912739171ca3_ResultsFactory_s.java
7ef26a68fdf2722c40c13ec873626bb1861623c9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,465
java
package com.datascience.core.results; import com.datascience.core.base.Category; import com.datascience.core.base.ContValue; import com.datascience.core.base.LObject; import com.datascience.core.base.Worker; import java.util.Collection; /** * User: artur */ public class ResultsFactory { public interface IDatumResultCreator<T, U>{ U create(LObject<T> obj); } public static class DatumResultFactory implements IDatumResultCreator<String, DatumResult>{ public DatumResult create(LObject<String> obj){ return new DatumResult(); } } public static class DatumContResultFactory implements IDatumResultCreator<ContValue, DatumContResults>{ public DatumContResults create(LObject<ContValue> obj){ return new DatumContResults(obj); } } public interface IWorkerResultCreator<T, U>{ U create(Worker<T> w); } public static class WorkerResultNominalFactory implements IWorkerResultCreator<String, WorkerResult> { protected static Collection<Category> categories; public WorkerResultNominalFactory(Collection<Category> categories){ this.categories = categories; } public WorkerResult create(Worker<String> obj){ return new WorkerResult(categories); } } public static class WorkerContResultFactory implements IWorkerResultCreator<ContValue, WorkerContResults>{ public WorkerContResults create(Worker<ContValue> obj){ return new WorkerContResults(obj); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ef8e8e6382bfb06f47e78c22862489b0f2fd0a4c
a23b277bd41edbf569437bdfedad22c2d7733dbe
/acm/P2593__Max_Sequence/Main.java
48f3be07bcc9cf9e022967f6d624d3509afed0c0
[]
no_license
alexandrofernando/java
155ed38df33ae8dae641d327be3c6c355b28082a
a783407eaba29a88123152dd5b2febe10eb7bf1d
refs/heads/master
2021-01-17T06:49:57.241130
2019-07-19T11:34:44
2019-07-19T11:34:44
52,783,678
1
0
null
2017-07-03T21:46:00
2016-02-29T10:38:28
Java
UTF-8
Java
false
false
1,954
java
package P2593__Max_Sequence; import java.util.Scanner; import java.io.File; /** * <p>Title: </p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2006</p> * * <p>Company: </p> * * @author not attributable * @version 1.0 */ public class Main { static int N; static int numbers[]; static int frontMaxs[]; static int rearMaxs[]; public static void main(String[] args) throws Exception { Scanner cin = new Scanner(System.in); while (true) { N = cin.nextInt(); if (N == 0) { break; } numbers = new int[N + 1]; frontMaxs = new int[N + 2]; rearMaxs = new int[N + 2]; frontMaxs[0] = Integer.MIN_VALUE; rearMaxs[N + 1] = Integer.MIN_VALUE; for (int i = 1; i <= N; i++) { numbers[i] = cin.nextInt(); } int sum = 0; int max = Integer.MIN_VALUE; for (int i = 1; i < N; i++) { if (sum > 0) { sum += numbers[i]; } else { sum = numbers[i]; } if (sum > max) { max = sum; } frontMaxs[i] = max; } sum = 0; max = Integer.MIN_VALUE; for (int i = N; i > 1; i--) { if (sum > 0) { sum += numbers[i]; } else { sum = numbers[i]; } if (sum > max) { max = sum; } rearMaxs[i] = max; } int S = Integer.MIN_VALUE; for (int i = 1; i < N; i++) { if (frontMaxs[i] + rearMaxs[i + 1] > S) { S = frontMaxs[i] + rearMaxs[i + 1]; } } System.out.println(S); } } }
[ "alexandrofernando@gmail.com" ]
alexandrofernando@gmail.com
f20296f435ff64d762fbd993c98b9c1d59def68e
7291377a5a469f73579e946c1cd5e85ff76262f9
/BT_JAVA/Bai1/src/bai1/model/KhachHang.java
25977be27a74274cd2d7f9b4017a5c603f200d4b
[]
no_license
HrBbCi/Netbean
487fb25b14c449fc88f34dd88ebd9f5768b0a5e5
1e3fdab1b43c0cb7e3f2e0b58d816a59b2f9a137
refs/heads/master
2020-07-11T20:42:04.057658
2019-08-27T06:55:35
2019-08-27T06:55:35
204,639,423
0
0
null
null
null
null
UTF-8
Java
false
false
1,420
java
package bai1.model; import java.io.Serializable; public class KhachHang implements Serializable{ private int maKH; private String tenKH; private String diaChi; private String soDT; private MatHang mh; private double soTien; public KhachHang() { } public KhachHang(int maKH, String tenKH, String diaChi, String soDT) { this.maKH = maKH; this.tenKH = tenKH; this.diaChi = diaChi; this.soDT = soDT; } public double getSoTien() { return soTien; } public void setSoTien(double soTien) { this.soTien = soTien; } public MatHang getMh() { return mh; } public void setMh(MatHang mh) { this.mh = mh; } public int getMaKH() { return maKH; } public void setMaKH(int maKH) { this.maKH = maKH; } public String getTenKH() { return tenKH; } public void setTenKH(String tenKH) { this.tenKH = tenKH; } public String getDiaChi() { return diaChi; } public void setDiaChi(String diaChi) { this.diaChi = diaChi; } public String getSoDT() { return soDT; } public void setSoDT(String soDT) { this.soDT = soDT; } @Override public String toString() { return "[" + maKH + "-" + tenKH + "-" + diaChi + "-" + soDT + "]"; } }
[ "kienbtptit@gmail.com" ]
kienbtptit@gmail.com
53452ecb82f6a9e10497d88fbf17f3d52593314b
10186b7d128e5e61f6baf491e0947db76b0dadbc
/jp/cssj/homare/css/f/a/h.java
fe9bb787930c499a6f7cbfbee3206f5aff5595c8
[ "SMLNJ", "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
MewX/contendo-viewer-v1.6.3
7aa1021e8290378315a480ede6640fd1ef5fdfd7
69fba3cea4f9a43e48f43148774cfa61b388e7de
refs/heads/main
2022-07-30T04:51:40.637912
2021-03-28T05:06:26
2021-03-28T05:06:26
351,630,911
2
0
Apache-2.0
2021-10-12T22:24:53
2021-03-26T01:53:24
Java
UTF-8
Java
false
false
1,443
java
/* */ package jp.cssj.homare.css.f.a; /* */ /* */ import jp.cssj.homare.css.c; /* */ import jp.cssj.homare.css.f.E; /* */ import jp.cssj.homare.css.f.a; /* */ import jp.cssj.homare.impl.a.c.I; /* */ /* */ /* */ /* */ public class h /* */ implements E /* */ { /* 13 */ private static final h a = new h(0.0D); /* */ /* */ private final double i; /* */ /* */ public static h a(double value) { /* 18 */ if (value == 0.0D) { /* 19 */ return a; /* */ } /* 21 */ return new h(value); /* */ } /* */ /* */ private h(double value) { /* 25 */ this.i = value; /* */ } /* */ /* */ public a a(c style) { /* 29 */ double fontSize = I.c(style.d()); /* 30 */ return a.a(style.b(), fontSize * this.i); /* */ } /* */ /* */ public short a() { /* 34 */ return 3008; /* */ } /* */ /* */ public short b() { /* 38 */ return 15; /* */ } /* */ /* */ public boolean d() { /* 42 */ return (this.i < 0.0D); /* */ } /* */ /* */ public boolean e() { /* 46 */ return (this.i == 0.0D); /* */ } /* */ /* */ public String toString() { /* 50 */ return this.i + "rem"; /* */ } /* */ } /* Location: /mnt/r/ConTenDoViewer.jar!/jp/cssj/homare/css/f/a/h.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "xiayuanzhong+gpg2020@gmail.com" ]
xiayuanzhong+gpg2020@gmail.com
689ad3363fe88b46e191a9557d75886b9ae14029
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/610ce078fb3c84c47d6d32aff7d77ba850e28f9d/before/NumericAnalyzer.java
5484bc6e70b23bc3d327268b1332eb5872639b1e
[]
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
1,606
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.index.analysis; import org.apache.lucene.analysis.Analyzer; import java.io.IOException; import java.io.Reader; /** * */ public abstract class NumericAnalyzer<T extends NumericTokenizer> extends Analyzer { @Override protected TokenStreamComponents createComponents(String fieldName, Reader reader) { try { // LUCENE 4 UPGRADE: in reusableTokenStream the buffer size was char[120] // Not sure if this is intentional or not return new TokenStreamComponents(createNumericTokenizer(reader, new char[32])); } catch (IOException e) { throw new RuntimeException("Failed to create numeric tokenizer", e); } } protected abstract T createNumericTokenizer(Reader reader, char[] buffer) throws IOException; }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
fd403bd78ca81ec88508532f76c060e511a9d7d3
c885ef92397be9d54b87741f01557f61d3f794f3
/results/JacksonDatabind-105/com.fasterxml.jackson.databind.deser.std.JdkDeserializers/BBC-F0-opt-20/tests/10/com/fasterxml/jackson/databind/deser/std/JdkDeserializers_ESTest.java
82243f12283eb81a08ff0dba721b9d4b127314f2
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
2,802
java
/* * This file was automatically generated by EvoSuite * Thu Oct 14 00:25:31 GMT 2021 */ package com.fasterxml.jackson.databind.deser.std; import org.junit.Test; import static org.junit.Assert.*; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.deser.std.JdkDeserializers; import com.fasterxml.jackson.databind.util.AccessPattern; import java.nio.ByteBuffer; import java.util.UUID; import java.util.concurrent.atomic.AtomicBoolean; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class JdkDeserializers_ESTest extends JdkDeserializers_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Class<Object> class0 = Object.class; JsonDeserializer<?> jsonDeserializer0 = JdkDeserializers.find(class0, "com.fasterxml.jackson.databind.JavaType"); assertNull(jsonDeserializer0); } @Test(timeout = 4000) public void test1() throws Throwable { Class<AtomicBoolean> class0 = AtomicBoolean.class; JsonDeserializer<?> jsonDeserializer0 = JdkDeserializers.find(class0, "com.fasterxml.jackson.databind.JavaType"); assertFalse(jsonDeserializer0.isCachable()); } @Test(timeout = 4000) public void test2() throws Throwable { Class<StackTraceElement> class0 = StackTraceElement.class; JsonDeserializer<?> jsonDeserializer0 = JdkDeserializers.find(class0, "com.fasterxml.jackson.databind.JavaType"); assertEquals(AccessPattern.CONSTANT, jsonDeserializer0.getEmptyAccessPattern()); } @Test(timeout = 4000) public void test3() throws Throwable { Class<UUID> class0 = UUID.class; JsonDeserializer<?> jsonDeserializer0 = JdkDeserializers.find(class0, "com.fasterxml.jackson.databind.JavaType"); assertEquals(AccessPattern.ALWAYS_NULL, jsonDeserializer0.getNullAccessPattern()); } @Test(timeout = 4000) public void test4() throws Throwable { Class<ByteBuffer> class0 = ByteBuffer.class; JsonDeserializer<?> jsonDeserializer0 = JdkDeserializers.find(class0, "com.fasterxml.jackson.databind.JavaType"); assertEquals(AccessPattern.ALWAYS_NULL, jsonDeserializer0.getNullAccessPattern()); } @Test(timeout = 4000) public void test5() throws Throwable { Class<String> class0 = String.class; JsonDeserializer<?> jsonDeserializer0 = JdkDeserializers.find(class0, "-~`FG1?xK x"); assertNull(jsonDeserializer0); } @Test(timeout = 4000) public void test6() throws Throwable { JdkDeserializers jdkDeserializers0 = new JdkDeserializers(); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
ee598175a191935ccb2098dd0db557253dba95de
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hazelcast/2016/4/DefaultNearCacheManager.java
8f6def1cc8e484a68bff548e51427c2421716bb7
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,450
java
/* * Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.cache.impl.nearcache.impl; import com.hazelcast.cache.impl.nearcache.NearCache; import com.hazelcast.cache.impl.nearcache.NearCacheContext; import com.hazelcast.cache.impl.nearcache.NearCacheManager; import com.hazelcast.config.NearCacheConfig; import java.util.Collection; import java.util.HashSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; public class DefaultNearCacheManager implements NearCacheManager { private final ConcurrentMap<String, NearCache> nearCacheMap = new ConcurrentHashMap<String, NearCache>(); private final Object mutex = new Object(); @Override public <K, V> NearCache<K, V> getNearCache(String name) { return nearCacheMap.get(name); } @Override public <K, V> NearCache<K, V> getOrCreateNearCache(String name, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext) { NearCache<K, V> nearCache = nearCacheMap.get(name); if (nearCache == null) { synchronized (mutex) { nearCache = nearCacheMap.get(name); if (nearCache == null) { nearCache = createNearCache(name, nearCacheConfig, nearCacheContext); nearCacheMap.put(name, nearCache); } } } return nearCache; } protected <K, V> NearCache<K, V> createNearCache(String name, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext) { if (nearCacheContext.getNearCacheManager() == null) { nearCacheContext.setNearCacheManager(this); } return new DefaultNearCache<K, V>(name, nearCacheConfig, nearCacheContext); } @Override public Collection<NearCache> listAllNearCaches() { return nearCacheMap.values(); } @Override public boolean clearNearCache(String name) { NearCache nearCache = nearCacheMap.get(name); if (nearCache != null) { nearCache.clear(); } return nearCache != null; } @Override public void clearAllNearCaches() { for (NearCache nearCache : nearCacheMap.values()) { nearCache.clear(); } } @Override public boolean destroyNearCache(String name) { NearCache nearCache = nearCacheMap.remove(name); if (nearCache != null) { nearCache.destroy(); } return nearCache != null; } @Override public void destroyAllNearCaches() { for (NearCache nearCache : new HashSet<NearCache>(nearCacheMap.values())) { nearCacheMap.remove(nearCache.getName()); nearCache.destroy(); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
c21ff04eab6b584c9ca763e54533339ad77e1aa8
000a4b227d970cdc6c8db192f4437698cb782721
/jps/jps-builders/src/org/jetbrains/jps/cache/statistics/JpsCacheLoadingSystemStats.java
2239872f9b5e8911c2a595166acb7393edeceed8
[ "Apache-2.0" ]
permissive
trinhanhngoc/intellij-community
2eb2f66a2a3a9456e7a0c5e7be1eaba03c38815d
1d4a962cfda308a73e0a7ef75186aaa4b15d1e17
refs/heads/master
2022-11-03T21:50:47.859675
2022-10-19T16:39:57
2022-10-19T23:25:35
205,765,945
1
0
Apache-2.0
2019-09-02T02:55:15
2019-09-02T02:55:15
null
UTF-8
Java
false
false
1,122
java
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.jps.cache.statistics; public class JpsCacheLoadingSystemStats { private static long decompressionSpeedBytesPesSec; private static long deletionSpeedBytesPerSec; public static long getDecompressionSpeedBytesPesSec() { return decompressionSpeedBytesPesSec; } public static void setDecompressionTimeMs(long fileSize, long duration) { decompressionSpeedBytesPesSec = fileSize / duration * 1000; } public static void setDecompressionSpeed(long decompressionSpeed) { if (decompressionSpeed > 0) decompressionSpeedBytesPesSec = decompressionSpeed; } public static long getDeletionSpeedBytesPerSec() { return deletionSpeedBytesPerSec; } public static void setDeletionTimeMs(long fileSize, long duration) { deletionSpeedBytesPerSec = fileSize / duration * 1000; } public static void setDeletionSpeed(long deletionSpeed) { if (deletionSpeed > 0) deletionSpeedBytesPerSec = deletionSpeed; } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com