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
d45d8ea5e99085af262bcc0fe7a83bee61e6fac6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_f7301dad2df504ab0ac0a1303469d5d06552daa4/Camera_SizeTest/24_f7301dad2df504ab0ac0a1303469d5d06552daa4_Camera_SizeTest_s.java
995174ae9264bdcbd5a73cc3a946138dc560cecb
[]
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,916
java
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.cts; import junit.framework.TestCase; import android.hardware.Camera; import android.hardware.Camera.Parameters; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargetNew; @TestTargetClass(Camera.Size.class) public class Camera_SizeTest extends TestCase { private final int HEIGHT1 = 320; private final int WIDTH1 = 240; private final int HEIGHT2 = 480; private final int WIDTH2 = 320; private final int HEIGHT3 = 640; private final int WIDTH3 = 480; @TestTargetNew( level = TestLevel.COMPLETE, method = "Camera.Size", args = {int.class, int.class} ) public void testConstructor() { Camera camera = Camera.open(); Parameters parameters = camera.getParameters(); checkSize(parameters, WIDTH1, HEIGHT1); checkSize(parameters, WIDTH2, HEIGHT2); checkSize(parameters, WIDTH3, HEIGHT3); } private void checkSize(Parameters parameters, int width, int height) { parameters.setPictureSize(width, height); assertEquals(width, parameters.getPictureSize().width); assertEquals(height, parameters.getPictureSize().height); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c2560cbc294b2f7d8b49dc2060a6c5250228a6fa
6d3bb1a10e7b819895276e28b0eb1447967f8f0e
/tests/src/test/resources/io/github/jeddict/jpa/employee/Project.java
c87af6c99989d676479d15da74a1259456359b8b
[ "Apache-2.0", "EPL-2.0" ]
permissive
alexkarezin/jeddict
4a558afbcf3015b849f0c462fe6b29017df87e7e
49936979a289081e0b8bfbc2c0f0c83676d48d54
refs/heads/master
2022-04-23T17:59:37.740990
2020-04-16T15:46:42
2020-04-16T15:46:42
258,093,633
0
0
Apache-2.0
2020-04-23T04:24:56
2020-04-23T04:24:55
null
UTF-8
Java
false
false
1,032
java
/** * This file was generated by the JPA Modeler */ package io.github.jeddict.jpa.employee; import java.util.List; import javax.persistence.Basic; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToMany; @Entity public class Project { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Basic private String name; @ManyToMany(mappedBy = "projects") private List<Employee> employees; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<Employee> getEmployees() { return employees; } public void setEmployees(List<Employee> employees) { this.employees = employees; } }
[ "gaurav.gupta.jc@gmail.com" ]
gaurav.gupta.jc@gmail.com
ada1a6906d6a16dcf27f4bbdd78cef21d290166c
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/res/raw/android_wear_micro_apk_apk/classes.jar/com/google/android/gms/internal/zzacp$zza.java
c0ad4b7b89cc28f00804e68f1f5052012bcf2b4c
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,001
java
package com.google.android.gms.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; public final class zzacp$zza extends zza { public static final Parcelable.Creator<zza> CREATOR = new bw(); final String Rv; final int Rw; final int versionCode; zzacp$zza(int paramInt1, String paramString, int paramInt2) { this.versionCode = paramInt1; this.Rv = paramString; this.Rw = paramInt2; } zzacp$zza(String paramString, int paramInt) { this.versionCode = 1; this.Rv = paramString; this.Rw = paramInt; } public final void writeToParcel(Parcel paramParcel, int paramInt) { bw.a(this, paramParcel); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\res\raw\android_wear_micro_apk_apk\classes.jar * Qualified Name: com.google.android.gms.internal.zzacp.zza * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
de546b968e512662bc955d84463ed42bf1c36b00
27589488144a2844284185963aed686d1d7b2169
/src/Pokemon/Skill/B/BugBite.java
e3725a16daf590048d31c872efa960db154303fa
[]
no_license
EternalVenus/Deep-Atlas
f07794da3e875881226b29cd4ed83877d1706719
facf24fff202fc844a548e916092cd44aead9171
refs/heads/master
2021-08-23T03:52:21.917810
2017-12-03T02:37:02
2017-12-03T02:37:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,109
java
package Pokemon.Skill.B; import Pokemon.Type; import Pokemon.Skill.*; import Pokemon.Pokemons.Pokemon; public class BugBite extends Skill{ public BugBite() { super("Absorb", new Type("Grass"), "none", 20, "Absorb deals damage and the user will recover 50% of the HP drained.\n" + "If the user is holding a Big Root, the move instead recovers 65% of the damage dealt (30% more than normal). \n" + "If used on a IPokemon with the ability Liquid Ooze,\n" + "the user instead loses the HP it would have otherwise gained.\n", 25, "Special" ); } @Override public int effect(Pokemon pokemon) { return super.effect(pokemon); } @Override public int defenseEffect(Pokemon pokemon) { return super.defenseEffect(pokemon); } @Override public int speedEffect(Pokemon pokemon) { return super.speedEffect(pokemon); } }
[ "djiang86@binghamton.edu" ]
djiang86@binghamton.edu
7b7f59f53ad4e219335d14a48fd7f442c5ce8a09
6c52903f326b43f5339b18b1525a6623a4f9de0f
/src/leetcode/algo/doubleindex/NextPermutation31.java
17253a2ba13868b05219d9d6c478d58ceaab4376
[]
no_license
underwindfall/Algorithme
19f31710cc2a6bf2f4e3f0652225c7ab8858e5ac
2284b7791c99354a3132366131290e2f37aae6dc
refs/heads/master
2022-10-17T14:25:52.815940
2022-09-29T08:32:20
2022-09-29T08:32:20
203,821,259
1
0
null
null
null
null
UTF-8
Java
false
false
3,704
java
package leetcode.algo.doubleindex; // https://leetcode.com/problems/next-permutation/ public class NextPermutation31 { //time O(N) //space O(1) class LooTwice { public void nextPermutation(int[] nums) { //1. 1,2,3 ==> 1,3,2 //1. 倒序遍历, 找到第一个数, 这个数比后面的数小; //2. 继续倒序遍历, 找到一个比上面的数大的数; //3. 交换 //4. 把1中的这个数后面的数全部递增排列, 因为在1后面的数时递减排列的, 所以首尾交换即可获得升序排列 int len = nums.length; int i = len - 2; //i = len - 2 是为了防止下面nums[i + 1]越界! //1. 倒序遍历, 找到第一个数, 这个数比后面的数小; while(i >= 0){ if(nums[i] < nums[i + 1])break; --i; } //2. 继续倒序遍历, 找到一个上面的数大的数 if(i >= 0){ int j = len - 1; while(j >= 0){ if (nums[j] > nums[i])break; --j; } //3. 交换i和j swap(nums, i, j); //交换i和j的位置 } //4. 将 i后面的数升序排列, 只需要对撞双指针交换即可(因为i后面的数时降序的) reverse(nums, i + 1, len - 1); } void swap(int[] nums, int left, int right){ int temp = nums[left]; nums[left] = nums[right]; nums[right] = temp; } void reverse(int[] nums, int left, int right){ while(left < right){ swap(nums, left, right); ++left; --right; } } } //time O(n) //space O(1) /*0*/ public void nextPermutation(int[] nums) { // pivot is the element just before the non-increasing (weakly decreasing) suffix /*2*/ int pivot = indexOfLastPeak(nums) - 1; // paritions nums into [prefix pivot suffix] if (pivot != -1) { int nextPrefix = lastIndexOfGreater(nums, nums[pivot]); // in the worst case it's suffix[0] // next prefix must exist because pivot < suffix[0], otherwise pivot would be part of suffix /*4*/ swap(nums, pivot, nextPrefix); // this minimizes the change in prefix } /*5*/ reverseSuffix(nums, pivot + 1); // reverses the whole list if there was no pivot /*6*/ } /** * Find the last element which is a peak. * In case there are multiple equal peaks, return the first of those. * @return first index of last peak */ /*1*/ int indexOfLastPeak(int[] nums) { for (int i = nums.length - 1; 0 < i; --i) { if (nums[i - 1] < nums[i]) return i; } return 0; } /** @return last index where the {@code num > threshold} or -1 if not found */ /*3*/ int lastIndexOfGreater(int[] nums, int threshold) { for (int i = nums.length - 1; 0 <= i; --i) { if (threshold < nums[i]) return i; } return -1; } /** Reverse numbers starting from an index till the end. */ void reverseSuffix(int[] nums, int start) { int end = nums.length - 1; while (start < end) { swap(nums, start++, end--); } } void swap(int[] nums, int i, int j) { int temp = nums[i]; nums[i] = nums[j]; nums[j] = temp; } }
[ "14819756+underwindfall@users.noreply.github.com" ]
14819756+underwindfall@users.noreply.github.com
ff6bd5a34e52efe5e84995111bc8bb27620c9304
0e71ab06b33e7203f6659ff23acee47a5678b073
/StepicJavaHW05/src/main/java/accountServer/AccountServerController.java
ae134bf1489f90535ec67e78a0a36a1e97b88817
[ "MIT" ]
permissive
przrak/homework_tester
10243be8b6d16d54cc0fc24f6d213efee3c300c8
9b292dc6c07abb466d6ad568931b84b6ac718401
refs/heads/master
2020-04-21T21:29:58.597449
2019-02-10T16:40:48
2019-02-10T16:40:48
169,880,768
0
0
MIT
2019-02-09T15:27:29
2019-02-09T15:27:29
null
UTF-8
Java
false
false
504
java
package accountServer; /** * @author v.chibrikov */ public class AccountServerController implements AccountServerControllerMBean { private final AccountServer accountServer; public AccountServerController(AccountServer accountServer) { this.accountServer = accountServer; } @Override public int getUsersLimit() { return accountServer.getUsersLimit(); } @Override public void setUsersLimit(int bla) { accountServer.setUsersLimit(bla); } }
[ "vitaly.chibrikov@gmail.com" ]
vitaly.chibrikov@gmail.com
933b143f816574edf2289e2e0c09b8c8c6f60f69
e62c3b93b38d2d7781d38ba1cdbabfea2c1cf7af
/BOCMBankClient606/src/main/java/com/chinamworld/bocmbci/biz/goldbonus/fixinvestmanager/FixInvestStopSuccssActivity.java
e1feed936064763ee8b635d1d486a3ee2a9e986f
[]
no_license
soghao/zgyh
df34779708a8d6088b869d0efc6fe1c84e53b7b1
09994dda29f44b6c1f7f5c7c0b12f956fc9a42c1
refs/heads/master
2021-06-19T07:36:53.910760
2017-06-23T14:23:10
2017-06-23T14:23:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,712
java
package com.chinamworld.bocmbci.biz.goldbonus.fixinvestmanager; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.text.SpannableString; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.text.style.ForegroundColorSpan; import android.text.style.UnderlineSpan; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import com.chinamworld.bocmbci.R; import com.chinamworld.bocmbci.biz.goldbonus.GoldBonusBaseActivity; import com.chinamworld.bocmbci.biz.goldbonus.GoldbonusLocalData; import com.chinamworld.bocmbci.biz.goldbonus.busitrade.BusiTradeAvtivity; import com.chinamworld.bocmbci.constant.DictionaryData; import com.chinamworld.bocmbci.userwidget.TitleAndContentLayout; import com.chinamworld.bocmbci.utils.StringUtil; import java.util.Map; /** * 贵金属积利金模块 定投管理 提前终止结果页面 * @author linyl * */ public class FixInvestStopSuccssActivity extends GoldBonusBaseActivity implements OnClickListener { /**详情信息展示布局**/ private TitleAndContentLayout mAgreeDetailInfo; private Button btn_success; LinearLayout cancelSuccess_ll,cancelSuccessTitle; /**动态添加元素的布局**/ private LinearLayout mContainerLayout; /**点击 这里 链接**/ private TextView tv_link; /**列表项详情信息**/ private Map<String,Object> itemDetailMap; // /**贵金属积利定投计划终止确认返回数据**/ // private Map<String,Object> fixInvestStopPreMap; // /**贵金属积利定投计划终止提交 上送参数**/ // private Map<String,Object> requestStopCommitParamMap = new HashMap<String,Object>(); private SpannableString msp = null; String fixCancelPsStr; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getBackgroundLayout().setTitleNewText(R.string.goldbonus_fixinvestmanager); setContentView(R.layout.goldbonus_fixinvest_stop_success); getBackgroundLayout().setLeftButtomNewVisibility(View.GONE); mAgreeDetailInfo = (TitleAndContentLayout) findViewById(R.id.titleAndContentLayout_detailinfo); mAgreeDetailInfo.setTitleVisibility(View.GONE); cancelSuccess_ll = (LinearLayout) findViewById(R.id.ll_cancel_success_href); btn_success = (Button) findViewById(R.id.btn_success);//终止结果页面 完成按钮 tv_link = (TextView) findViewById(R.id.tv_link); fixCancelPsStr = this.getIntent().getStringExtra("fixCancelPs"); // fixInvestStopPreMap = GoldbonusLocalData.getInstance().FixInvestStopPreMap; msp = new SpannableString("*您已提前终止本条定投预约,您可点击这里重新进行定投预约。"); msp.setSpan(new UnderlineSpan(), 18, 20, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); msp.setSpan(new ForegroundColorSpan(Color.BLUE), 18, 20, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); tv_link.setText(getClickableSpan()); tv_link.setMovementMethod(LinkMovementMethod.getInstance()); cancelSuccessTitle = (LinearLayout) findViewById(R.id.cancel_success_info_title); mContainerLayout = (LinearLayout) mAgreeDetailInfo.findViewById(R.id.myContainerLayout); itemDetailMap = GoldbonusLocalData.getInstance().FixInvestListDetailQueryMap; btn_success.setOnClickListener(this); initDetailView(); } private SpannableString getClickableSpan() { //监听器 View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { Intent intent2 = new Intent(FixInvestStopSuccssActivity.this, BusiTradeAvtivity.class); intent2.putExtra("issueType", GoldbonusLocalData.FIXINVESTINTENTFLAG); startActivity(intent2); finish(); } }; SpannableString spanableInfo = new SpannableString("*您已提前终止本条定投预约,您可点击这里重新进行定投预约。"); spanableInfo.setSpan(new Clickable(listener), 18, 20, Spanned.SPAN_MARK_MARK); return spanableInfo; } class Clickable extends ClickableSpan implements View.OnClickListener { private final View.OnClickListener mListener; public Clickable(View.OnClickListener listener) { mListener = listener; } @Override public void onClick(View view) { mListener.onClick(view); } } /** * 详情页面展示元素 */ private void initDetailView() { mContainerLayout.removeAllViews(); mContainerLayout.addView(createLabelTextView(R.string.fixinvest_settime, (String)itemDetailMap.get("crtDate"),null)); mContainerLayout.addView(createLabelTextView(R.string.goldbonus_timedeposit_proName, (String)itemDetailMap.get("issueName"),null)); mContainerLayout.addView(createLabelTextView(R.string.goldbonus_fixinvest_status, DictionaryData.getKeyByValue((String)itemDetailMap.get("fixStatus"),DictionaryData.FixStatusList),null)); if("0".equals((String)itemDetailMap.get("fixTermType"))){//日 mContainerLayout.addView(createLabelTextView(R.string.fixinvest_tracycle, DictionaryData.getKeyByValue((String)itemDetailMap.get("fixTermType"),DictionaryData.goldbonusfixTermTypeList),null)); }else if("1".equals((String)itemDetailMap.get("fixTermType"))){//周 mContainerLayout.addView(createLabelTextView(R.string.fixinvest_tracycle, DictionaryData.getKeyByValue((String)itemDetailMap.get("fixTermType"),DictionaryData.goldbonusfixTermTypeList) + "," + DictionaryData.getKeyByValue((String)itemDetailMap.get("fixPayDateValue"),DictionaryData.goldbonusfixPayDateValueWeekList),null)); }else if("2".equals((String)itemDetailMap.get("fixTermType"))){//月 mContainerLayout.addView(createLabelTextView(R.string.fixinvest_tracycle, DictionaryData.getKeyByValue((String)itemDetailMap.get("fixTermType"),DictionaryData.goldbonusfixTermTypeList) + "," + DictionaryData.getKeyByValue((String)itemDetailMap.get("fixPayDateValue"),DictionaryData.goldbonusfixPayDateValueMounthList),null)); }else{ mContainerLayout.addView(createLabelTextView(R.string.fixinvest_tracycle,"-",null)); } mContainerLayout.addView(createLabelTextView(R.string.fixinvest_buynum, StringUtil.parseStringPattern(StringUtil.deleateNumber((String)itemDetailMap.get("weight")),0)+" 克",null)); mContainerLayout.addView(createLabelTextView(R.string.fixinvest_fixPendCnt, "成功 "+String.valueOf((Long.parseLong((String)itemDetailMap.get("fixPendCnt")) - Long.parseLong((String)itemDetailMap.get("fixCount")))) +" 次,失败 " + (String)itemDetailMap.get("fixCount") +" 次",null)); mContainerLayout.addView(createLabelTextView(R.string.fixinvest_remaindcnt, (String)itemDetailMap.get("unfCount") + " 次",null)); if("2".equals((String)itemDetailMap.get("fixStatus")) || "3".equals((String)itemDetailMap.get("fixStatus"))){//状态为客户终止或者银行终止 if(!"".equals(itemDetailMap.get("remark").toString().trim()) && StringUtil.isNullOrEmpty(itemDetailMap.get("remark"))){ mContainerLayout.addView(createRemarkLabelTextView(R.string.fixinvest_cancel_ps, "-", null)); }else{ mContainerLayout.addView(createRemarkLabelTextView(R.string.fixinvest_cancel_ps, (String)itemDetailMap.get("remark") , null)); } } mContainerLayout.addView(createRemarkLabelTextView(R.string.fixinvest_cancel_ps, fixCancelPsStr,null)); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_success://终止结果页面 完成 Intent intent2 = new Intent(this, FixInvestManagerActivity.class); startActivity(intent2); finish(); break; } } }
[ "15609143618@163.com" ]
15609143618@163.com
9bf63a0e23fa83d3e6adcf063ba1422660959758
aff1aa80bdd434cc83ecec2cfa13057614cd0201
/lab1/src/eu/javaspecialists/deadlock/lab1solution/Thinker.java
ca828f3ece92042fb5f32dffc0f2728909a1c31a
[]
no_license
kabutz/DeadlockLabECESCON9
2936977923bec909a9229c8a5827284d376563e5
0711498521180cd7d2f2f6547a41dbafa8a5fffd
refs/heads/master
2020-07-31T04:24:12.968488
2016-04-20T16:56:40
2016-04-20T16:56:40
55,251,885
4
3
null
null
null
null
UTF-8
Java
false
false
1,630
java
package eu.javaspecialists.deadlock.lab1solution; import eu.javaspecialists.deadlock.lab1.*; import java.util.concurrent.*; /** * Our philosopher always first locks left, then right. If all of the thinkers * sit in a circle and their threads call "drink()" at the same time, then they * will end up with a deadlock. * <p> * In our solution, we decide in the constructor which the larger and smaller * locks are, rather than doing this every time the drink() method is called. * * @author Heinz Kabutz */ public class Thinker implements Callable<ThinkerStatus> { private final int id; private final Krasi bigger, smaller; private int drinks = 0; public Thinker(int id, Krasi left, Krasi right) { this.id = id; this.bigger = left.compareTo(right) > 0 ? left : right; this.smaller = bigger == left ? right : left; } public ThinkerStatus call() throws Exception { for (int i = 0; i < 1000; i++) { drink(); think(); } return drinks == 1000 ? ThinkerStatus.HAPPY_THINKER : ThinkerStatus.UNHAPPY_THINKER; } public void drink() { synchronized (bigger) { synchronized (smaller) { drinking(); } } } private void drinking() { if (!Thread.holdsLock(bigger) || !Thread.holdsLock(smaller)) { throw new IllegalMonitorStateException("Not holding both locks"); } System.out.printf("(%d) Drinking%n", id); drinks++; } public void think() { System.out.printf("(%d) Thinking%n", id); } }
[ "heinz@javaspecialists.eu" ]
heinz@javaspecialists.eu
6bbff3a8e212e646fe74c56191c81ba52bd44e2e
5825f8e9ed7e97dac071f9899bf9fb185a9151c6
/clients/Base/src/org/spongycastle/crypto/tls/TlsInputStream.java
5e9089bcf617590d3efca52e9331d61a7f4446cf
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
stko/oobd
58072f58455ae1cd7ea2b36130d69728618317df
44a74d3fa4845b2d6743209e771d2a8bb3f81080
refs/heads/master
2023-03-14T02:04:54.662033
2022-02-20T06:35:14
2022-02-20T06:35:14
33,430,824
12
8
null
2023-03-05T23:09:16
2015-04-05T04:56:49
Java
UTF-8
Java
false
false
762
java
package org.spongycastle.crypto.tls; import java.io.IOException; import java.io.InputStream; /** * An InputStream for an TLS 1.0 connection. */ class TlsInputStream extends InputStream { private byte[] buf = new byte[1]; private TlsProtocolHandler handler = null; TlsInputStream(TlsProtocolHandler handler) { this.handler = handler; } public int read(byte[] buf, int offset, int len) throws IOException { return this.handler.readApplicationData(buf, offset, len); } public int read() throws IOException { if (this.read(buf) < 0) { return -1; } return buf[0] & 0xff; } public void close() throws IOException { handler.close(); } }
[ "steffen.koehlers.de@gmail.com@f834055d-ee70-0692-e1cb-8b28bc4b2f15" ]
steffen.koehlers.de@gmail.com@f834055d-ee70-0692-e1cb-8b28bc4b2f15
0840c8e92ab2a2c8feed237bf5a0fe18337b9914
3e43b899a0352fc5848ae31cc80ac4e00b92399e
/hybris/bin/custom/mercury/mercuryfacades/src/org/mercury/facades/offers/OfferRegistrationFacade.java
34daa41794387f5d5b2aafa858bd12985bfd191f
[]
no_license
vinayj344/interviewpractice
8e84c876336a737cb32858ab24f56e50d35d2269
3d61c30e9f32b7ac3787d5190e11032b4f07836c
refs/heads/master
2020-06-26T03:03:07.195821
2019-08-03T06:22:20
2019-08-03T06:22:20
199,505,882
0
0
null
2019-08-03T06:22:21
2019-07-29T18:23:35
Java
UTF-8
Java
false
false
437
java
/** * */ package org.mercury.facades.offers; import de.hybris.platform.commerceservices.customer.DuplicateUidException; import org.mercury.facades.OfferFormData; import org.mercury.facades.product.data.GenderData; import java.util.List; /** * @author Admin * */ public interface OfferRegistrationFacade { void registerOffer(final OfferFormData data) throws DuplicateUidException; public List<GenderData> getTestGenders(); }
[ "vinay.j344@gmail.com" ]
vinay.j344@gmail.com
381ec595b0a71bf319f3c3c622b7c16430af6c87
7df40f6ea2209b7d48979465fd8081ec2ad198cc
/TOOLS/server/javax/mail/event/MessageChangedListener.java
d275b3423407724cbc86c72f582b4b3c5078a005
[ "IJG" ]
permissive
warchiefmarkus/WurmServerModLauncher-0.43
d513810045c7f9aebbf2ec3ee38fc94ccdadd6db
3e9d624577178cd4a5c159e8f61a1dd33d9463f6
refs/heads/master
2021-09-27T10:11:56.037815
2021-09-19T16:23:45
2021-09-19T16:23:45
252,689,028
0
0
null
2021-09-19T16:53:10
2020-04-03T09:33:50
Java
UTF-8
Java
false
false
372
java
package javax.mail.event; import java.util.EventListener; public interface MessageChangedListener extends EventListener { void messageChanged(MessageChangedEvent paramMessageChangedEvent); } /* Location: C:\Users\leo\Desktop\server.jar!\javax\mail\event\MessageChangedListener.class * Java compiler version: 4 (48.0) * JD-Core Version: 1.1.3 */
[ "warchiefmarkus@gmail.com" ]
warchiefmarkus@gmail.com
d9e5cce9571826d6112417a82b1e7112838c135f
7f95b0c2d6e1922aeb64d0ba0a52698d17b6a5f2
/product-service/education/src/main/java/com/gemini/business/education/lecturer/po/EduCourseCollectPo.java
5b0d2522494577f8c209f1b6678f4b7576011ae3
[]
no_license
xiaominglol/product-cloud
35cb8cc50748d1748e0e64737d5ab1b95ecf53ef
a0227879f92cc85a72839d34530ea5514bf3ed5e
refs/heads/master
2020-11-25T21:44:39.903145
2020-03-30T06:34:30
2020-03-30T06:34:30
228,858,639
0
0
null
null
null
null
UTF-8
Java
false
false
733
java
package com.gemini.business.education.lecturercation.lecturer.po; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.util.Date; /** * 课程收藏 * * @author 小明不读书 * @date Fri Mar 27 20:45:30 CST 2020 */ @Data @TableName("edu_course_collect") public class EduCourseCollectPo { private Long id; /** * 课程讲师ID */ private String courseId; /** * 课程专业ID */ private String memberId; /** * 逻辑删除 1(true)已删除, 0(false)未删除 */ private Byte isDeleted; /** * 创建时间 */ private Date gmtCreate; /** * 更新时间 */ private Date gmtModified; }
[ "474345633@qq.com" ]
474345633@qq.com
c6f0e82a3b0c1fb0d977128057a2a5d3fe611588
8273dedf80a0377f7168e891dcd9bbb42bba23e8
/legacy/11g/bined-jdeveloper-extension/src/org/exbin/bined/delta/DeltaDataPageWindow.java
1f7994eb0d5027b38581aeb373de763cd6d2276e
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
exbin/bined-jdeveloper-extension
238d76a582ec055b96a8e266598dc363433d8587
fe502f500f2f351d6fe4cd4d0ec5704fd7398f5b
refs/heads/master
2021-06-25T01:53:50.862170
2019-08-15T07:32:04
2019-08-15T07:32:04
79,743,623
0
0
null
null
null
null
UTF-8
Java
false
false
3,500
java
/* * Copyright (C) ExBin 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.exbin.bined.delta; import java.io.IOException; import java.io.RandomAccessFile; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nonnull; /** * Access window for delta data. * * @version 0.2.0 2018/04/27 * @author ExBin Project (https://exbin.org) */ public class DeltaDataPageWindow { public static final int PAGE_SIZE = 1024; @Nonnull private final FileDataSource data; @Nonnull private final DataPage[] dataPages = new DataPage[]{new DataPage(), new DataPage()}; private int activeDataPage = 1; public DeltaDataPageWindow(@Nonnull FileDataSource data) { this.data = data; dataPages[0].pageIndex = 0; loadPage(0); data.addCacheClearListener(new FileDataSource.CacheClearListener() { @Override public void clearCache() { DeltaDataPageWindow.this.clearCache(); } }); } private void loadPage(int index) { long pageIndex = dataPages[index].pageIndex; long pagePosition = pageIndex * PAGE_SIZE; RandomAccessFile file = data.getAccessFile(); try { file.seek(pagePosition); byte[] page = dataPages[index].page; int offset = 0; int toRead = PAGE_SIZE; if (pagePosition + PAGE_SIZE > file.length()) { toRead = (int) (file.length() - pagePosition); } while (toRead > 0) { int red = file.read(page, offset, toRead); toRead -= red; offset += red; } } catch (IOException ex) { Logger.getLogger(DeltaDataPageWindow.class.getName()).log(Level.SEVERE, null, ex); } } public byte getByte(long position) { long targetPageIndex = position / PAGE_SIZE; int index = -1; long pageIndex1 = dataPages[0].pageIndex; long pageIndex2 = dataPages[1].pageIndex; if (pageIndex1 == targetPageIndex) { index = 0; } else if (pageIndex2 == targetPageIndex) { index = 1; } if (index == -1) { DataPage dataPage = dataPages[activeDataPage]; dataPage.pageIndex = targetPageIndex; loadPage(activeDataPage); activeDataPage = (activeDataPage + 1) & 1; return dataPage.page[(int) (position % PAGE_SIZE)]; } return dataPages[index].page[(int) (position % PAGE_SIZE)]; } /** * Clears window cache. */ public void clearCache() { dataPages[0].pageIndex = -1; dataPages[1].pageIndex = -1; } /** * Simple structure for data page. */ private static class DataPage { public DataPage() { page = new byte[PAGE_SIZE]; } long pageIndex = -1; byte[] page; } }
[ "hajdam@users.sf.net" ]
hajdam@users.sf.net
90c33d28e3388ea100a1bbf9f318c0367ee2cbb3
b66bdee811ed0eaea0b221fea851f59dd41e66ec
/src/com/paypal/android/sdk/fq.java
25fa2655cc00e469cd239ea3e94b80f6adc7198f
[]
no_license
reverseengineeringer/com.grubhub.android
3006a82613df5f0183e28c5e599ae5119f99d8da
5f035a4c036c9793483d0f2350aec2997989f0bb
refs/heads/master
2021-01-10T05:08:31.437366
2016-03-19T20:41:23
2016-03-19T20:41:23
54,286,207
0
0
null
null
null
null
UTF-8
Java
false
false
2,729
java
package com.paypal.android.sdk; import java.util.Calendar; import java.util.Iterator; import java.util.Map; import java.util.Set; public class fq extends dz { private static final String a = fq.class.getSimpleName(); private final ag b; public fq(ea paramea, ef paramef, ag paramag) { super(new ee(cl.a), paramea, paramef); b = paramag; } private static void a(Map paramMap, StringBuilder paramStringBuilder) { if (paramMap.isEmpty()) {} for (;;) { return; Iterator localIterator = paramMap.keySet().iterator(); while (localIterator.hasNext()) { String str1 = (String)localIterator.next(); if (paramMap.get(str1) == null) { new StringBuilder("No value for ").append(str1).append(", skipping"); return; } String str2 = ft.a((String)paramMap.get(str1)); paramStringBuilder.append("&").append(str1); paramStringBuilder.append("=").append(str2); } } } public final String a(dx paramdx) { return "https://paypal.112.2o7.net/b/ss/paypalglobal/0/OIP-2.1.6/"; } public final boolean a() { return true; } public final String b() { StringBuilder localStringBuilder = new StringBuilder(); Object localObject = Calendar.getInstance(); int i = ((Calendar)localObject).get(4); long l = -((((Calendar)localObject).get(15) + ((Calendar)localObject).get(16)) / 60000); localStringBuilder.append(Integer.toString(((Calendar)localObject).get(5))).append("/").append(Integer.toString(((Calendar)localObject).get(2))).append("/").append(Integer.toString(((Calendar)localObject).get(1))).append(" ").append(Integer.toString(((Calendar)localObject).get(11))).append(":").append(Integer.toString(((Calendar)localObject).get(12))).append(":").append(Integer.toString(((Calendar)localObject).get(13))).append(" ").append(Integer.toString(i)).append(" ").append(Long.toString(l)); localObject = localStringBuilder.toString(); localStringBuilder = new StringBuilder(); localStringBuilder.append("s").append(b.a).append("?AQB=1").append("&ndh=1").append("&t" + ft.a((String)localObject)); localObject = ft.a(t().d().e().replace("-", "")); localStringBuilder.append("&ch=" + ft.a(b.c)).append("&sv=" + b.d).append("&vid=" + (String)localObject); a(b.b, localStringBuilder); localStringBuilder.append("&AQE=1"); return localStringBuilder.toString(); } public final void c() {} public final void d() {} public final String e() { return "mockSiteCatalystResponse"; } } /* Location: * Qualified Name: com.paypal.android.sdk.fq * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
e3fe94d64d9e0a64458f0119c8fa6fbc95aa93e0
c3debbc571031781ec2f156783ae0d17fb663d90
/qa/carbon-TestAutomation-Framework/component-test-framework/test-components/mediators-fault/src/test/java/org/wso2/carbon/mediator/fault/test/Soap11FCodeVrTest.java
92ea8bf4a879d91c34cb1ea88eee8463d2477818
[]
no_license
manoj-kristhombu/commons
1e0b24ed25a21691dfa848b8debaf95a47b9a8e0
4928923d66a345a3dca15c6f2a6f1fe9b246b2e8
refs/heads/master
2021-05-28T15:53:21.146705
2014-11-17T14:53:18
2014-11-17T14:53:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,593
java
package org.wso2.carbon.mediator.fault.test; import junit.framework.Assert; import org.apache.axiom.om.OMElement; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.authenticator.proxy.test.utils.FrameworkSettings; import org.wso2.carbon.common.test.utils.ConfigHelper; import org.wso2.carbon.common.test.utils.TestTemplate; import org.wso2.carbon.common.test.utils.client.StockQuoteClient; import org.wso2.carbon.mediation.configadmin.test.commands.ConfigServiceAdminStubCommand; import org.wso2.carbon.mediation.configadmin.ui.ConfigServiceAdminStub; import java.io.File; /* Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved. WSO2 Inc. 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. * */ public class Soap11FCodeVrTest extends TestTemplate { private static final Log log = LogFactory.getLog(Soap11FCodeVrTest.class); @Override public void init() { log.info("Initializing Fault Mediator SOAP11 Tests"); log.debug("Fault Mediator SOAP11 Tests Initialised"); } @Override public void runSuccessCase() { log.debug("Running Fault Mediator SOAP11 SuccessCase "); OMElement result = null; StockQuoteClient stockQuoteClient = new StockQuoteClient(); try { ConfigServiceAdminStub configServiceAdminStub = new ConfigServiceAdminStubCommand().initConfigServiceAdminStub(sessionCookie); String xmlPath = frameworkPath + File.separator + "mediators-fault" + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "soap11_fcode_vr.xml"; System.out.println(xmlPath); OMElement omElement = ConfigHelper.createOMElement(xmlPath); new ConfigServiceAdminStubCommand(configServiceAdminStub).updateConfigurationExecuteSuccessCase(omElement); if(FrameworkSettings.STRATOS.equalsIgnoreCase("false")){ result = stockQuoteClient.stockQuoteClientforProxy("http://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTP_PORT, null, "IBM"); } else if(FrameworkSettings.STRATOS.equalsIgnoreCase("true")){ result = stockQuoteClient.stockQuoteClientforProxy("http://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTP_PORT + "/services/" + FrameworkSettings.TENANT_NAME + "/", null, "IBM"); } log.info(result); System.out.println(result); assert result != null; if (!result.toString().contains("IBM")) { Assert.fail("Fault Mediator SOAP11 not invoked"); log.error("Fault Mediator SOAP11 not invoked"); } } catch (Exception e) { e.printStackTrace(); log.error("Fault Mediator SOAP11 doesn't work : " + e.getMessage()); } } @Override public void runFailureCase() { } @Override public void cleanup() { loadDefaultConfig(); } }
[ "hasini@a5903396-d722-0410-b921-86c7d4935375" ]
hasini@a5903396-d722-0410-b921-86c7d4935375
dc72b0c971cc1b8e1ced1e6ec905bbae68fcea62
41a4993b50363ddb4a2ed279b714c963b26ea6c6
/app/src/main/java/cn/com/mbmpv/trainingonline/adapter/InformationListViewAdapter.java
f5f8dab1696a9c5b05f79e8f9476f5aee890cea0
[]
no_license
coolhades/FujianBengchi
e6f89bf336589e810d4ed6bcebcb8fd2bd12a933
a32556f5484d7072118340a8b35c9871dfc317ea
refs/heads/master
2021-01-13T07:20:52.395169
2016-10-21T03:25:29
2016-10-21T03:25:29
71,526,089
0
0
null
null
null
null
UTF-8
Java
false
false
2,540
java
package cn.com.mbmpv.trainingonline.adapter; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import java.util.List; import cn.com.mbmpv.trainingonline.R; public class InformationListViewAdapter extends BaseAdapter{ List<String> list; Context mContext; public InformationListViewAdapter(List<String> list, Context mContext) { super(); this.list = list; this.mContext = mContext; } @Override public int getCount() { // TODO Auto-generated method stub return list.size(); } @Override public Object getItem(int position) { // TODO Auto-generated method stub return list.get(position); } @Override public long getItemId(int position) { // TODO Auto-generated method stub return position; } @Override public View getView(final int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub final ViewHolder viewHolder; if(convertView==null) { viewHolder=new ViewHolder(); convertView=View.inflate(mContext, R.layout.information_item, null); convertView.setTag(viewHolder); } else { viewHolder=(ViewHolder) convertView.getTag(); } /* Glide.with(mContext) .load(list.get(position).getImgUrl()) .error(R.drawable.fail_img) .placeholder(R.drawable.fail_img) // .animate() .centerCrop() //.fitCenter() .into(viewHolder.img);*/ /*ImageRequest irequest = new ImageRequest( list.get(position).getImgUrl(), new Response.Listener<Bitmap>() { @SuppressLint("NewApi") @SuppressWarnings("deprecation") @Override public void onResponse(Bitmap bitmap) { if (viewHolder.img.getTag() != null && viewHolder.img.getTag().equals(list.get(position).getImgUrl())) { viewHolder.img.setImageBitmap(bitmap); } } }, R.drawable.fail_img,R.drawable.fail_img, Config.RGB_565, new ErrorListener() { @Override public void onErrorResponse(VolleyError arg0) { } }); MyApplication.getRq().add(irequest); */ return convertView; } class ViewHolder { } }
[ "723760950@qq.com" ]
723760950@qq.com
49bb9b8b71ea62bf94a7599d805245f9f27ffa15
055547b224ebd5738cc028c24f8bea6bf436b8a9
/src/main/java/com/city/controller/HospitalController.java
f0757d27470ea5893de184e9d4135f18a8cf0b7d
[]
no_license
XGKerwin/city_boot
17fb7db102918bf2421ba501784386179c2d3d6d
b440fcb1ad3ad0273b2778556c57229e42158a10
refs/heads/master
2023-08-17T22:30:17.953355
2021-10-16T12:17:08
2021-10-16T12:17:08
411,958,205
0
0
null
null
null
null
UTF-8
Java
false
false
5,367
java
package com.city.controller; import com.alibaba.fastjson.JSONObject; import com.city.bean.*; import com.city.returnJson.ReturnObject; import com.city.service.impl.HospitalImpl; import com.city.util.ServletUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * @author 关鑫 * @date 2021/9/28 8:25 星期二 * @Description com.city.controller */ @Controller @RequestMapping("/hospital") @CrossOrigin(origins = "*", allowedHeaders = "*", methods = {}, allowCredentials = "true") public class HospitalController { @Autowired private HospitalImpl hospital; @RequestMapping("/all") @ResponseBody public Object selectAll() { List<Hospital> hospitals = hospital.queryAll(); if (hospitals != null) { for (Hospital hospital1 : hospitals) { hospital1.setImgUrl(ServletUtils.getImageUrl(hospital1.getImgUrl())); } return JSONObject.toJSON(new ReturnObject(200, "操作成功", hospitals.size(), hospitals)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } @RequestMapping("/hospitalId") @ResponseBody public Object selectById(String hospitalId) { Hospital hospital = this.hospital.queryOne(hospitalId); if (hospital != null) { hospital.setImgUrl(ServletUtils.getImageUrl(hospital.getImgUrl())); return JSONObject.toJSON(hospital); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } @RequestMapping("/hospitalImage") @ResponseBody public Object selectImage(String hospitalId) { List<HospitalMsg> hospitalMsgs = hospital.queryImage(hospitalId); if (hospitalMsgs != null) { for (HospitalMsg hospitalMsg : hospitalMsgs) { hospitalMsg.setImgUrl(ServletUtils.getImageUrl(hospitalMsg.getImgUrl())); } return JSONObject.toJSON(new ReturnObject(200, "操作成功", hospitalMsgs.size(), hospitalMsgs)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } @RequestMapping("/idcard") @ResponseBody public Object selectIdCard(String cardId) { List<HospitalIdcard> hospitalIdcards = hospital.queryIdcard(cardId); if (hospitalIdcards != null) { for (HospitalIdcard hospitalIdcard : hospitalIdcards) { hospitalIdcard.setImgUrl(ServletUtils.getImageUrl(hospitalIdcard.getImgUrl())); } return JSONObject.toJSON(new ReturnObject(200, "操作成功", hospitalIdcards.size(), hospitalIdcards)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } @RequestMapping("/addidcard") @ResponseBody public Object addIdCard(HospitalIdcard hospitalIdcard) { int i = hospital.addIdCard(hospitalIdcard); if (i == 1) { return JSONObject.toJSON(new ReturnObject(200, "操作成功", 1, hospitalIdcard)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } /** * 错误 * * @param hospitalId * @return */ @RequestMapping("/hospitalType") @ResponseBody public Object selectType(String hospitalId) { System.out.println("hospital/hospitalType"); List<HospitalType> hospitalTypes = hospital.queryHospitalId(hospitalId); if (hospitalTypes != null) { return JSONObject.toJSON(new ReturnObject(200, "操作成功", hospitalTypes.size(), hospitalTypes)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } @RequestMapping("/Doctors") @ResponseBody public Object selectDoctor(String hospitalId) { System.out.println("hospital/Doctors"); List<Doctors> doctors = hospital.queryDoctorsId(hospitalId); if (doctors != null) { return JSONObject.toJSON(new ReturnObject(200, "操作成功", doctors.size(), doctors)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } @RequestMapping("/saveByid") @ResponseBody public Object selectByid(String userId) { System.out.println("hospital/saveByid"); List<HospitalSave> hospitalSaves = hospital.querySave(userId); if (hospitalSaves != null) { return JSONObject.toJSON(new ReturnObject(200, "操作成功", hospitalSaves.size(), hospitalSaves)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } @RequestMapping("/addSave") @ResponseBody public Object addSave(HospitalSave save) { System.out.println("hospital/addSave"); int i = hospital.addSave(save); if (i == 1) { return JSONObject.toJSON(new ReturnObject(200, "操作成功", 1, save)); } else { return JSONObject.toJSON(new ReturnObject(500, "操作失败")); } } }
[ "1064936282@qq.com" ]
1064936282@qq.com
a568e1b8e4000e59471d346d72ef162e6eb082e2
cef9d9dd795961294472c83334a91308a9ff22e0
/src/com/digihealth/anesthesia/doc/po/DocSafeCheck.java
1113277ff1a2efa868ce01550b6b89ff791a8dd4
[]
no_license
radtek/AIS4.0_BACKEND
3aa6ed353ba9fd9f275d5be5636895f1e46e0044
59c0a997d09a82d7a4a66f825415cec8fcdec712
refs/heads/master
2020-05-29T20:39:47.292740
2018-12-04T14:17:05
2018-12-04T14:17:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,827
java
/* * DocSafeCheck.java * Copyright(C) 2016 digihealth * All rights reserved. * ---------------------------------------- * @author cy * 2017-03-30 Created */ package com.digihealth.anesthesia.doc.po; import java.util.ArrayList; import java.util.List; import com.digihealth.anesthesia.basedata.po.BasDiagnosedef; import com.digihealth.anesthesia.basedata.po.BasOperdef; import com.wordnik.swagger.annotations.ApiModel; import com.wordnik.swagger.annotations.ApiModelProperty; @ApiModel(value = "安全核查对象") public class DocSafeCheck { @ApiModelProperty(value = "主键id") private String safCheckId; @ApiModelProperty(value = "患者ID") private String regOptId; /** * 特殊耗材条码粘贴处 */ @ApiModelProperty(value = "特殊耗材条码粘贴处") private String remarks; /** * 签字时间 */ @ApiModelProperty(value = "签字时间") private String signTime; /** * 巡回护士签名 */ @ApiModelProperty(value = "巡回护士签名") private String circunurseId; @ApiModelProperty(value = "巡回护士签名") private String circunurseName; @ApiModelProperty(value = "麻醉医生签名") private String anesthetistId; @ApiModelProperty(value = "手术医师签名") private String operatorId; /** * END,NO_END */ @ApiModelProperty(value = "是否完成 END,NO_END") private String processState; @ApiModelProperty(value = "巡回护士签名") private List<String> circunurseIdList; @ApiModelProperty(value = "麻醉医生签名") private List<String> anesthetistIdList; @ApiModelProperty(value = "手术医师签名") private List<String> operatorIdList; @ApiModelProperty(value = "实施麻醉方法") private String realAnaesMethodName; @ApiModelProperty(value = "术后诊断") private String realDiagnosisName; @ApiModelProperty(value = "实施手术") private String realOptName; @ApiModelProperty(value = "实施手术") private List<BasOperdef> realOptNameList; @ApiModelProperty(value = "实施麻醉方法") private List<String> realAnaesMethodNameList; @ApiModelProperty(value = "术后诊断") private List<BasDiagnosedef> realDiagnosisNameList; public List<BasOperdef> getRealOptNameList() { return realOptNameList; } public void setRealOptNameList(List<BasOperdef> realOptNameList) { this.realOptNameList = realOptNameList; } public List<String> getRealAnaesMethodNameList() { return realAnaesMethodNameList==null?new ArrayList<String>():realAnaesMethodNameList; } public void setRealAnaesMethodNameList(List<String> realAnaesMethodNameList) { this.realAnaesMethodNameList = realAnaesMethodNameList; } public List<BasDiagnosedef> getRealDiagnosisNameList() { return realDiagnosisNameList; } public void setRealDiagnosisNameList(List<BasDiagnosedef> realDiagnosisNameList) { this.realDiagnosisNameList = realDiagnosisNameList; } public String getRealAnaesMethodName() { return realAnaesMethodName; } public void setRealAnaesMethodName(String realAnaesMethodName) { this.realAnaesMethodName = realAnaesMethodName; } public String getRealDiagnosisName() { return realDiagnosisName; } public void setRealDiagnosisName(String realDiagnosisName) { this.realDiagnosisName = realDiagnosisName; } public String getRealOptName() { return realOptName; } public void setRealOptName(String realOptName) { this.realOptName = realOptName; } public String getAnesthetistId() { return anesthetistId; } public void setAnesthetistId(String anesthetistId) { this.anesthetistId = anesthetistId; } public String getOperatorId() { return operatorId; } public void setOperatorId(String operatorId) { this.operatorId = operatorId; } public List<String> getCircunurseIdList() { return circunurseIdList; } public void setCircunurseIdList(List<String> circunurseIdList) { this.circunurseIdList = circunurseIdList; } public List<String> getAnesthetistIdList() { return anesthetistIdList; } public void setAnesthetistIdList(List<String> anesthetistIdList) { this.anesthetistIdList = anesthetistIdList; } public List<String> getOperatorIdList() { return operatorIdList; } public void setOperatorIdList(List<String> operatorIdList) { this.operatorIdList = operatorIdList; } public String getSafCheckId() { return safCheckId; } public void setSafCheckId(String safCheckId) { this.safCheckId = safCheckId == null ? null : safCheckId.trim(); } public String getRegOptId() { return regOptId; } public void setRegOptId(String regOptId) { this.regOptId = regOptId == null ? null : regOptId.trim(); } public String getRemarks() { return remarks; } public void setRemarks(String remarks) { this.remarks = remarks == null ? null : remarks.trim(); } public String getSignTime() { return signTime; } public void setSignTime(String signTime) { this.signTime = signTime; } public String getCircunurseId() { return circunurseId; } public void setCircunurseId(String circunurseId) { this.circunurseId = circunurseId; } public String getProcessState() { return processState; } public void setProcessState(String processState) { this.processState = processState == null ? null : processState.trim(); } public String getCircunurseName() { return circunurseName; } public void setCircunurseName(String circunurseName) { this.circunurseName = circunurseName; } }
[ "523595992@qq.com" ]
523595992@qq.com
452d598d13fd8ea36c684779940f3254807a1761
17a0a0934f604119d0e2267bee263b4a6ff80244
/app/src/main/java/com/innoviussoftwaresolution/tjss/view/fragment/BaseFragment.java
1150269bd9b68836fefe23382dd699a5d1ea4536
[]
no_license
iamRAJASHEKAR/TJSS_fixed
b9473c266fab341917716167e6661b1800f4e28b
e0ae291f8e760c3b549cd8df870a0d98d5db2dae
refs/heads/master
2020-03-24T20:42:19.219014
2018-07-31T09:32:18
2018-07-31T09:32:18
142,992,676
0
0
null
null
null
null
UTF-8
Java
false
false
5,462
java
package com.innoviussoftwaresolution.tjss.view.fragment; import android.app.ProgressDialog; import android.arch.lifecycle.Observer; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.Toolbar; import android.view.View; import android.view.inputmethod.InputMethodManager; import com.innoviussoftwaresolution.tjss.R; import com.innoviussoftwaresolution.tjss.utils.M; import com.innoviussoftwaresolution.tjss.view.activity.BaseActivity; import com.innoviussoftwaresolution.tjss.view.fragment.generalalerts.PermissionsDetailListDialog; import com.innoviussoftwaresolution.tjss.view.viewutils.Permissions; import java.util.ArrayList; import butterknife.BindView; /** * @author Sony Raj on 30/06/17. */ public abstract class BaseFragment extends Fragment { protected ProgressDialog mProgressDialog; private final Runnable mProgressDismissRunnable = new Runnable() { @Override public void run() { dismissDialog(); onDialogDismissed(); } }; protected Observer<String> mErrorObserver; @Nullable @BindView(R.id.toolBar) protected Toolbar mToolbar; private Handler mHandler; protected void initProgress() { if (mProgressDialog == null) { mProgressDialog = new ProgressDialog(getActivity()); mProgressDialog.setCancelable(false); mProgressDialog.setCanceledOnTouchOutside(false); mProgressDialog.setMessage("Please wait..."); } if (mHandler == null) mHandler = new Handler(); mProgressDialog.show(); mHandler.postDelayed(mProgressDismissRunnable, 30 * 1000);//30 seconds } protected void dismissDialog() { if (mProgressDialog != null && mProgressDialog.isShowing()) mProgressDialog.dismiss(); } /** * This default implementation shows a toast, * Override this message to show other alert types */ protected void initErrorObserver() { mErrorObserver = new Observer<String>() { @Override public void onChanged(@Nullable String s) { M.showToast(getActivity(), s); onDialogDismissed(); } }; } //Override this method to do anything after the dialog is dismissed //This method will be called only if the response is not received after 30 seconds protected void onDialogDismissed() { } protected Toolbar getToolbar() { return mToolbar; } public abstract void onBaseCreate(Bundle SavedInstanceState); @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); //Perform any app specific initializations here onBaseCreate(savedInstanceState); } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (mToolbar == null) return; BaseActivity activity = (BaseActivity) getActivity(); if (activity == null) return; activity.setSupportActionBar(mToolbar); activity.setHomeAsUp(); } protected void disableUp() { BaseActivity activity = (BaseActivity) getActivity(); if (activity == null) return; activity.hideHomeAsUp(); } protected void setTitle(String title) { if (mToolbar == null) return; BaseActivity activity = (BaseActivity) getActivity(); if (activity == null) return; activity.setTitle(title); } protected boolean havePermission(String... permissions) { return Permissions.havePermissionFor(getActivity(), permissions) == null; } protected ArrayList<String> shouldShowPermissionReationale(String... permissions) { return Permissions.shouldShowPermissionRequestRationale(getActivity(), permissions); } protected void requestPermission(int permissionRequestCode, String... permissions) { Permissions.requestPermissionFromFragment(this, permissionRequestCode, permissions); } protected void showPermissionDetails(ArrayList<String> details, PermissionsDetailListDialog.PermissionsDialogCallback callback) { PermissionsDetailListDialog dialog = PermissionsDetailListDialog.newInstance(details); dialog.setCallback(callback); dialog.setCancelable(false); dialog.show(getChildFragmentManager(), "PermissionDetailsDialog"); } protected void hideKeyboard() { InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); View view = getActivity().getCurrentFocus(); if (view != null) if (inputMethodManager != null) { inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } } protected void showKeyboard() { InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); View view = getActivity().getCurrentFocus(); if (view != null) if (inputMethodManager != null) inputMethodManager.showSoftInput(view, 0); } }
[ "rajashekar.reddy1995@gmail.com" ]
rajashekar.reddy1995@gmail.com
dd5111533d5cb3bd19b0615df97d96a9bd458d72
50fa234d9a7e965d77cf474b165aec8cd53960eb
/src/microsoft/CircleString.java
ca71898648cdb3f5cdc527fcb4a37e078db7ca55
[]
no_license
PasseRR/Examination
e849ea79fce348bbafddfcef2695f5746ea29555
f0a6f6069d94348ed25476d97522019d6d06eda7
refs/heads/master
2021-01-22T11:42:28.426016
2014-04-29T06:57:41
2014-04-29T06:57:41
null
0
0
null
null
null
null
GB18030
Java
false
false
1,307
java
package microsoft; /** * 判断一个字符串是否回文 * * @company 微软 * @author xiehai * @date 2014-2-18 下午03:47:46 */ public class CircleString { /** * 利用Java的API判断<BR> * 直接将所给的字符串倒置,看是否和原字符串相同 * * @param str * @return */ public boolean isCircleStringApi(String str) { String temp = new StringBuilder(str).reverse().toString(); return temp.equals(str) ? true : false; } public boolean isCircleString(String str) { char[] data = str.toCharArray(); int size = data.length; int i = 0;// 头遍历开始位置 int j = size - 1;// 尾遍历开始位置 boolean flg = true; int leftMid;// 前一段终点 int rightMid;// 后一段终点 leftMid = rightMid = size / 2; if (1 == size % 2) {// 若字母个数为奇数, rightMid = size / 2 + 1; } while (i < leftMid && j >= rightMid) {// 头尾比较,若所有均为相同则为true,否则为false char head = data[i]; char tail = data[j]; if (head != tail) { flg = false; break; } i++; j--; } return flg; } public static void main(String[] args) { String str = "cad"; CircleString cs = new CircleString(); System.out.println(cs.isCircleStringApi(str)); System.out.println(cs.isCircleString(str)); } }
[ "xie__hai@sina.com" ]
xie__hai@sina.com
b669bd572b7e3499b52faf0d3fd58358b754bd2b
852c1a6166177a25190f15d0ccc454112e03de69
/measurements-app/src/main/java/com/expidevapps/android/measurements/view/ExpandableStateImageView.java
fbe3eae5bf42164f81e87d8f77171d5df003ef0d
[ "MIT" ]
permissive
GlobalTechnology/gma-android
f765d83948fcf969261925384697523e30b7b5dd
0acd586ca309dc728f5c9aca53570efe1fcaa61e
refs/heads/master
2021-01-22T09:09:35.818788
2017-04-18T13:27:48
2017-04-18T13:27:48
28,961,327
2
1
MIT
2018-09-14T15:29:30
2015-01-08T10:40:50
Java
UTF-8
Java
false
false
2,399
java
package com.expidevapps.android.measurements.view; import static com.h6ah4i.android.widget.advrecyclerview.expandable.RecyclerViewExpandableItemManager.STATE_FLAG_IS_EXPANDED; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.View; import android.view.ViewParent; import android.widget.ImageView; import com.h6ah4i.android.widget.advrecyclerview.expandable.ExpandableItemViewHolder; public class ExpandableStateImageView extends ImageView { /** * State indicating the group is expanded. */ private static final int[] GROUP_EXPANDED_STATE_SET = {android.R.attr.state_expanded}; public ExpandableStateImageView(Context context) { super(context); } public ExpandableStateImageView(Context context, AttributeSet attrs) { super(context, attrs); } public ExpandableStateImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @TargetApi(Build.VERSION_CODES.LOLLIPOP) public ExpandableStateImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } @Override public int[] onCreateDrawableState(final int extraSpace) { final ExpandableItemViewHolder holder = findViewHolder(this); if (holder != null && (holder.getExpandStateFlags() & STATE_FLAG_IS_EXPANDED) != 0) { return mergeDrawableStates(super.onCreateDrawableState(extraSpace + 1), GROUP_EXPANDED_STATE_SET); } else { return super.onCreateDrawableState(extraSpace); } } @Nullable private ExpandableItemViewHolder findViewHolder(@Nullable View view) { while (view != null) { final ViewParent parent = view.getParent(); if (parent instanceof RecyclerView) { final RecyclerView.ViewHolder holder = ((RecyclerView) parent).getChildViewHolder(view); if (holder instanceof ExpandableItemViewHolder) { return (ExpandableItemViewHolder) holder; } } view = parent instanceof View ? (View) parent : null; } return null; } }
[ "daniel.frett@ccci.org" ]
daniel.frett@ccci.org
93baf82ab711e00a3e6315cbd02167e0b099c4a2
d110d51df5c59810142c907e7b4753812942d21a
/generator-spring-adapter/src/main/java/knorxx/framework/generator/springadapter/atmosphere/WebApplicationContextRetriever.java
8bae019ba679894f2d5d675d4911bc6e162f07e6
[ "MIT" ]
permissive
janScheible/knorxx
a1b3730e9d46f4c58a1cee42052d9c829e98c480
b0885eec7ffe3870c8ea4cd1566b26b744f34bab
refs/heads/master
2021-01-25T06:05:58.474442
2015-12-22T11:27:23
2015-12-22T11:27:23
17,491,095
2
1
null
null
null
null
UTF-8
Java
false
false
1,443
java
package knorxx.framework.generator.springadapter.atmosphere; import java.util.Enumeration; import javax.servlet.ServletContext; import org.atmosphere.di.ServletContextHolder; import org.springframework.web.context.WebApplicationContext; /** * * @author sj */ public class WebApplicationContextRetriever { public WebApplicationContext getWebApplicationContext() { ServletContext servletContext = ServletContextHolder.getServletContext(); WebApplicationContext webApplicationContext = null; for(Enumeration<String> enumeration = servletContext.getAttributeNames(); enumeration.hasMoreElements(); ) { String attributeName = enumeration.nextElement(); Object attributeValue = servletContext.getAttribute(attributeName); if(attributeValue instanceof WebApplicationContext) { if(webApplicationContext == null) { webApplicationContext = (WebApplicationContext) attributeValue; } else { throw new IllegalStateException("Found multiple instances of WebApplicationContext and was not able to choose one!"); } } } if(webApplicationContext != null) { return webApplicationContext; } else { throw new IllegalStateException("No instance of WebApplicationContext was found in the servlet context!"); } } }
[ "janScheible@users.noreply.github.com" ]
janScheible@users.noreply.github.com
6b74aeea69679933a1464ef87c53cdc0955a9d92
51c2a501abfdfc22b6ea1cda2328cc5310b16767
/src/test/java/com/alibaba/druid/bvt/filter/wall/MySqlWallTest124.java
b68ff894337ce8d1c740eacfab45f8b28ed211d0
[ "Apache-2.0" ]
permissive
dazen/druid
1e34bf07cb7a61122a4acf2da241860900878444
183572a9d330810dacabc9c729d8f666a6a67a93
refs/heads/master
2021-01-18T10:22:50.911316
2015-08-05T08:32:47
2015-08-05T08:32:47
40,251,980
1
0
null
2015-08-05T15:04:33
2015-08-05T15:04:33
null
UTF-8
Java
false
false
1,229
java
/* * Copyright 1999-2011 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.bvt.filter.wall; import junit.framework.TestCase; import org.junit.Assert; import com.alibaba.druid.wall.WallProvider; import com.alibaba.druid.wall.spi.MySqlWallProvider; public class MySqlWallTest124 extends TestCase { public void test_false() throws Exception { WallProvider provider = new MySqlWallProvider(); provider.getConfig().setCommentAllow(false); String sql = "SELECT name, '******' password, createTime from user where name like 'admin' AND 5859=5666 AND 'Cuqo' LIKE 'Cuqo'"; Assert.assertFalse(provider.checkValid(sql)); } }
[ "szujobs@hotmail.com" ]
szujobs@hotmail.com
85c4869d7400f19be1deab08c8d009e988d54548
1bcc0c33fb2cb55eb79db94a3a1e94e50c87d97c
/base-framework-common/src/main/java/com/towcent/base/common/excel/AbstractImportExcel.java
f1073c6e4ad1c13dae6405a0fdff2e62379c5201
[]
no_license
taohuanga/base-framework
82bc268dde4fb265ffa4e38c9a000bcd01993757
5757d7d4c081668bdff15550e338661119242027
refs/heads/master
2020-04-07T06:49:11.023793
2018-11-19T03:21:10
2018-11-19T03:21:10
158,151,535
2
0
null
null
null
null
UTF-8
Java
false
false
2,895
java
/** * */ package com.towcent.base.common.excel; import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Map; import org.apache.poi.ss.usermodel.Row; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.towcent.base.common.utils.BeanMapUtils; import com.towcent.base.common.utils.FileUtils; import com.towcent.base.common.utils.Img2Base64Util; import com.towcent.base.common.utils.excel.ImportExcel; /** * 导入工具类 * @author shiwei * */ public abstract class AbstractImportExcel<T> { /** * 日志对象 */ protected Logger logger = LoggerFactory.getLogger(getClass()); @Value("${excel.basePath}") private String basePath; /** * 设置excel头和实体对象的映射,头为key,实体对象的属性为value * @return */ protected abstract Map<String, String> getHeader(); /** * 解析数据 * @param fileName * @param clazz * @return */ @SuppressWarnings("unchecked") protected List<T> getData(String fileName, Class<T> clazz){ List<T> list = Lists.newArrayList(); try { Map<String, String> header = this.getHeader(); List<String> head = Lists.newArrayList(); ImportExcel ei = new ImportExcel(fileName, 1); Row row1 = ei.getRow(1); for (int j = 0; j < ei.getLastCellNum(); j++) { Object val = ei.getCellValue(row1, j); head.add(header.get(val.toString())); } T entity = null; for (int i = 2; i < ei.getLastDataRowNum(); i++) { Row row = ei.getRow(i); Map<String, Object> objMap = Maps.newHashMap(); for (int j = 0; j < ei.getLastCellNum(); j++) { Object val = ei.getCellValue(row, j); // 将每一行数据存入map中 objMap.put(head.get(j), val); } // 将map转换成为对象 entity = (T) BeanMapUtils.getMap2Bean(objMap, clazz); list.add(entity); } FileUtils.deleteFile(fileName); } catch (Exception e) { logger.error("解析excel文件出错", e.fillInStackTrace()); } return list; } /** * 将base64的数据转换成文件 * @param base64Data * @return */ protected String getFileName(String base64Data){ SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); String base = File.separator + "temp" + File.separator + format.format(new Date()) + File.separator; String fileName = System.currentTimeMillis() + ".xlsx"; String path = basePath + base + fileName; new File(basePath + base).mkdirs(); if (base64Data.indexOf("base64,") >= 0) { base64Data = base64Data.split("base64,")[1]; } if(Img2Base64Util.generateImage(base64Data, path)){ return path; }else{ return ""; } } public abstract void intoDb(String base64Data, Map<String, Object> map); }
[ "taohuanga@163.com" ]
taohuanga@163.com
6cdf8b6cc5e17f93eccddc5fc3d36b5505190ad1
07174aa43b1644b795e9d7dd6fc6a376669265c1
/library/src/main/java/com/tom_roush/pdfbox/text/PDFMarkedContentExtractor.java
d104fe06d80fe5282665bc98767e88941ac806b7
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "APAFML", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sbassomp/PdfBox-Android
a505a0afc930305544358d2b3d4b17eca70d2e4b
c9b99fa03e6f2cfca3574bceb763fbd54530c4c3
refs/heads/master
2020-03-13T22:47:16.923659
2018-04-27T16:53:02
2018-04-27T16:53:02
131,322,744
0
0
Apache-2.0
2018-04-27T16:53:04
2018-04-27T16:50:39
Java
UTF-8
Java
false
false
8,027
java
package com.tom_roush.pdfbox.text; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Stack; import com.tom_roush.pdfbox.contentstream.operator.markedcontent.BeginMarkedContentSequence; import com.tom_roush.pdfbox.contentstream.operator.markedcontent.BeginMarkedContentSequenceWithProperties; import com.tom_roush.pdfbox.contentstream.operator.markedcontent.EndMarkedContentSequence; import com.tom_roush.pdfbox.cos.COSDictionary; import com.tom_roush.pdfbox.cos.COSName; import com.tom_roush.pdfbox.pdmodel.documentinterchange.markedcontent.PDMarkedContent; import com.tom_roush.pdfbox.pdmodel.graphics.PDXObject; /** * This is an stream engine to extract the marked content of a pdf. * * @author Johannes Koch */ public class PDFMarkedContentExtractor extends PDFTextStreamEngine { private boolean suppressDuplicateOverlappingText = true; private List<PDMarkedContent> markedContents = new ArrayList<PDMarkedContent>(); private Stack<PDMarkedContent> currentMarkedContents = new Stack<PDMarkedContent>(); private Map<String, List<TextPosition>> characterListMapping = new HashMap<String, List<TextPosition>>(); /** * Instantiate a new PDFTextStripper object. */ public PDFMarkedContentExtractor() throws IOException { this(null); } /** * Constructor. Will apply encoding-specific conversions to the output text. * * @param encoding The encoding that the output will be written in. */ public PDFMarkedContentExtractor(String encoding) throws IOException { addOperator(new BeginMarkedContentSequenceWithProperties()); addOperator(new BeginMarkedContentSequence()); addOperator(new EndMarkedContentSequence()); // todo: DP - Marked Content Point // todo: MP - Marked Content Point with Properties } /** * This will determine of two floating point numbers are within a specified variance. * * @param first The first number to compare to. * @param second The second number to compare to. * @param variance The allowed variance. */ private boolean within( float first, float second, float variance ) { return second > first - variance && second < first + variance; } public void beginMarkedContentSequence(COSName tag, COSDictionary properties) { PDMarkedContent markedContent = PDMarkedContent.create(tag, properties); if (this.currentMarkedContents.isEmpty()) { this.markedContents.add(markedContent); } else { PDMarkedContent currentMarkedContent = this.currentMarkedContents.peek(); if (currentMarkedContent != null) { currentMarkedContent.addMarkedContent(markedContent); } } this.currentMarkedContents.push(markedContent); } public void endMarkedContentSequence() { if (!this.currentMarkedContents.isEmpty()) { this.currentMarkedContents.pop(); } } public void xobject(PDXObject xobject) { if (!this.currentMarkedContents.isEmpty()) { this.currentMarkedContents.peek().addXObject(xobject); } } /** * This will process a TextPosition object and add the * text to the list of characters on a page. It takes care of * overlapping text. * * @param text The text to process. */ @Override protected void processTextPosition( TextPosition text ) { boolean showCharacter = true; if( this.suppressDuplicateOverlappingText ) { showCharacter = false; String textCharacter = text.getUnicode(); float textX = text.getX(); float textY = text.getY(); List<TextPosition> sameTextCharacters = this.characterListMapping.get( textCharacter ); if( sameTextCharacters == null ) { sameTextCharacters = new ArrayList<TextPosition>(); this.characterListMapping.put( textCharacter, sameTextCharacters ); } // RDD - Here we compute the value that represents the end of the rendered // text. This value is used to determine whether subsequent text rendered // on the same line overwrites the current text. // // We subtract any positive padding to handle cases where extreme amounts // of padding are applied, then backed off (not sure why this is done, but there // are cases where the padding is on the order of 10x the character width, and // the TJ just backs up to compensate after each character). Also, we subtract // an amount to allow for kerning (a percentage of the width of the last // character). // boolean suppressCharacter = false; float tolerance = (text.getWidth()/textCharacter.length())/3.0f; for (TextPosition sameTextCharacter : sameTextCharacters) { TextPosition character = sameTextCharacter; String charCharacter = character.getUnicode(); float charX = character.getX(); float charY = character.getY(); //only want to suppress if( charCharacter != null && //charCharacter.equals( textCharacter ) && within( charX, textX, tolerance ) && within( charY, textY, tolerance ) ) { suppressCharacter = true; break; } } if( !suppressCharacter ) { sameTextCharacters.add( text ); showCharacter = true; } } if( showCharacter ) { List<TextPosition> textList = new ArrayList<TextPosition>(); /* In the wild, some PDF encoded documents put diacritics (accents on * top of characters) into a separate Tj element. When displaying them * graphically, the two chunks get overlayed. With text output though, * we need to do the overlay. This code recombines the diacritic with * its associated character if the two are consecutive. */ if(textList.isEmpty()) { textList.add(text); } else { /* test if we overlap the previous entry. * Note that we are making an assumption that we need to only look back * one TextPosition to find what we are overlapping. * This may not always be true. */ TextPosition previousTextPosition = textList.get(textList.size()-1); if(text.isDiacritic() && previousTextPosition.contains(text)) { previousTextPosition.mergeDiacritic(text); } /* If the previous TextPosition was the diacritic, merge it into this * one and remove it from the list. */ else if(previousTextPosition.isDiacritic() && text.contains(previousTextPosition)) { text.mergeDiacritic(previousTextPosition); textList.remove(textList.size()-1); textList.add(text); } else { textList.add(text); } } if (!this.currentMarkedContents.isEmpty()) { this.currentMarkedContents.peek().addText(text); } } } public List<PDMarkedContent> getMarkedContents() { return this.markedContents; } }
[ "birdbrain2@comcast.net" ]
birdbrain2@comcast.net
89e8dd3311bf517f9b2f185a69b7816c378c1a44
66ac0f0289e1c2308463f0422a04e100a9a14d98
/server/modules/platform/pipeline/src/org/labkey/pipeline/mule/JMSStatusWriter.java
d1b610b0b03db8259d6797f41aaa2bb38774a9ab
[ "MIT" ]
permissive
praveenmunagapati/ms-registration-server
b4f860978f4b371cfb1fcb3c794d1315298638c2
49a851285dfbccbd0dc667f4a5ba1fcdbb2f0665
refs/heads/master
2022-04-19T00:15:59.055397
2020-04-14T06:12:38
2020-04-14T06:12:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,023
java
/* * Copyright (c) 2008-2018 LabKey Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.labkey.pipeline.mule; import org.jetbrains.annotations.NotNull; import org.labkey.api.pipeline.PipelineStatusFile; import org.labkey.api.pipeline.PipelineJob; import org.mule.extras.client.MuleClient; import org.mule.impl.RequestContext; import org.mule.umo.UMOEvent; /** * Writes status information to the JMS queue to be processed by some other object, most likely on a different machine * User: jeckels * Date: Aug 27, 2008 */ public class JMSStatusWriter implements PipelineStatusFile.StatusWriter { public static final String STATUS_QUEUE_NAME = "StatusQueue"; private String hostName; @Override public void setHostName(@NotNull String hostName) { this.hostName = hostName; } public boolean setStatus(PipelineJob job, String status, String statusInfo, boolean allowInsert) throws Exception { if (job.getActiveTaskStatus() == PipelineJob.TaskStatus.complete) { // Don't bother setting the status, since the job will be immediately going onto the standard job queue // to determine if there's another task. return true; } final StatusChangeRequest s = new StatusChangeRequest(job, status, statusInfo, hostName); // Mule uses ThreadLocals to store the current event. Writing this status to the JMS queue will replace the // event, so we need to grab the current one so that we can restore it after queuing up the new status UMOEvent currentEvent = RequestContext.getEvent(); MuleClient client = null; try { client = new MuleClient(); client.dispatch(STATUS_QUEUE_NAME, s, null); } finally { if (client != null) { try { client.dispose(); } catch (Exception e) {} if (currentEvent == null) { RequestContext.clear(); } else { // Restore the event that we're processing RequestContext.setEvent(currentEvent); } } } return true; } public void ensureError(PipelineJob job) { throw new UnsupportedOperationException("Method supported only on web server"); } }
[ "risto.autio@wunderdog.fi" ]
risto.autio@wunderdog.fi
47fa2a7d5db169d7680cf6dc17e624b4d7b99577
c4623aa95fb8cdd0ee1bc68962711c33af44604e
/src/com/yelp/android/ui/activities/ActivityRecents$a.java
5d9bed32b41f04445268b876a31eebd0b656f0d5
[]
no_license
reverseengineeringer/com.yelp.android
48f7f2c830a3a1714112649a6a0a3110f7bdc2b1
b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8
refs/heads/master
2021-01-19T02:07:25.997811
2016-07-19T16:37:24
2016-07-19T16:37:24
38,555,675
1
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
package com.yelp.android.ui.activities; import com.yelp.android.appdata.AppData; import com.yelp.android.database.b; import com.yelp.android.database.g; import com.yelp.android.serializable.YelpBusiness; import com.yelp.android.ui.panels.businesssearch.BusinessAdapter; import com.yelp.android.ui.util.ScrollToLoadListView; import com.yelp.android.util.q; import java.util.ArrayList; public final class ActivityRecents$a extends q<ActivityRecents, Void, ArrayList<YelpBusiness>> { private ActivityRecents a; protected ArrayList<YelpBusiness> a(ActivityRecents... paramVarArgs) { a = paramVarArgs[0]; return AppData.b().i().d().a(); } protected void a(ArrayList<YelpBusiness> paramArrayList) { ActivityRecents.a(a, paramArrayList); ActivityRecents.a(a).a(paramArrayList); a.r().setEmptyView(ActivityRecents.a(a, a.r(), 2131165841)); a.disableLoading(); } } /* Location: * Qualified Name: com.yelp.android.ui.activities.ActivityRecents.a * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
b604287d46c9a2ef004694ecec05bc76841f373a
af0c4995d4bf5f76a6ca283fc55dfdca4e52ca3a
/user/src/main/java/com/whaley/biz/user/interactor/CaptchaSms.java
d30094b84db175deb5f3ca11da1cddbf1b32373d
[]
no_license
portal-io/portal-android
da60c4a7d54fb56fbc983c635bb1d2c4d542f78e
623757fbb4d7979745b4c8ee34cebbf395cbd249
refs/heads/master
2020-03-20T07:58:08.196164
2019-03-16T02:30:48
2019-03-16T02:30:48
137,295,692
1
0
null
null
null
null
UTF-8
Java
false
false
1,141
java
package com.whaley.biz.user.interactor; import com.whaley.biz.common.interactor.BaseUseCase; import com.whaley.biz.common.interactor.CommonFunction; import com.whaley.biz.common.interactor.UseCaseParam; import com.whaley.biz.user.model.response.WhaleyResponse; import com.whaley.biz.user.api.ForgotApi; import com.whaley.biz.user.model.response.WhaleyStringResponse; import com.whaley.core.repository.IRepositoryManager; import io.reactivex.Observable; import io.reactivex.Scheduler; /** * Author: qxw * Date:2017/7/19 * Introduction:忘记密码--获取短信验证码 */ public class CaptchaSms extends BaseUseCase<String, String> { public CaptchaSms(IRepositoryManager repositoryManager, Scheduler executeThread, Scheduler postExecutionThread) { super(repositoryManager, executeThread, postExecutionThread); } @Override public Observable<String> buildUseCaseObservable(UseCaseParam<String> param) { return getRepositoryManager() .obtainRemoteService(ForgotApi.class) .smsCaptcha() .map(new CommonFunction<WhaleyStringResponse, String>()); } }
[ "lizs@snailvr.com" ]
lizs@snailvr.com
33eccc4e4b3f472337968a13b06365761d78eb42
182d84979231402306a5c65e018d29fc1f601983
/src/main/java/com/leon/leetcodeleon/mainshi/q13/Q13MovingCount.java
a395bb0d1f028fe898cd9d1619bf3f4a5aecbbf6
[]
no_license
severalfly/leetcode-leon
b5aaa97dc1c6f14ce21ff7c1856593d9383f9078
d625e0977e78600215886db5d28e21bd835b9183
refs/heads/master
2021-07-08T05:25:25.599102
2020-11-23T14:40:02
2020-11-23T14:40:02
210,115,589
1
0
null
null
null
null
UTF-8
Java
false
false
1,456
java
package com.leon.leetcodeleon.mainshi.q13; import com.leon.leetcodeleon.util.ObjectUtils; import org.junit.Test; import java.util.LinkedList; import java.util.Queue; public class Q13MovingCount { @Test public void test() { assert movingCount(16, 8, 4) == 15; assert movingCount(11, 8, 16) == 88; assert movingCount(3, 2, 17) == 6; assert movingCount(2, 3, 1) == 3; assert movingCount(3, 1, 0) == 1; assert movingCount(0, 0, 0) == 0; } public int movingCount(int m, int n, int k) { if (m <= 0 || n <= 0 || k < 0) { return 0; } boolean[][] tmp = new boolean[m][n]; Queue<Integer> queue = new LinkedList<>(); queue.add(0); queue.add(0); int res = 0; while (queue.size() > 0) { int i = queue.poll(); int j = queue.poll(); if (tmp[i][j]) { continue; } if (sum(i) + sum(j) <= k) { res++; tmp[i][j] = true; } else { continue; } int ni = i + 1; int nj = j; if (limit(ni, nj, m, n) && !tmp[ni][nj]) { queue.add(ni); queue.add(nj); } ni = i; nj = j + 1; if (limit(ni, nj, m, n) && !tmp[ni][nj]) { queue.add(ni); queue.add(nj); } } return res; } private int sum(int c) { int res = 0; while (c > 0) { int t = c % 10; res += t; c = c / 10; } return res; } private boolean limit(int i, int j, int m, int n) { if (i >= 0 && i < m && j >= 0 && j < n) { return true; } return false; } }
[ "zhangsmile90@gmail.com" ]
zhangsmile90@gmail.com
b20f8fa0fa36aec36e220b00c70598291b666a84
fec6e538906151d436f9397d9c34f8b95463576d
/kernel-lppz-jstorm/src/main/java/com/alipay/dw/jstorm/example/TpsCounter.java
68443fd1ab34313e2fad94056fa42ead2313d63d
[]
no_license
VOsix/kernel-lppz-common
45c7f92753486368d2bb5ae2ae79aedf53148997
1ee7ae30681d728420b3895ba9e4ff820a4ee55f
refs/heads/master
2020-04-06T21:31:30.826694
2018-01-17T08:47:48
2018-01-17T08:47:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,792
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alipay.dw.jstorm.example; import java.io.Serializable; import java.util.concurrent.atomic.AtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TpsCounter implements Serializable { private static final long serialVersionUID = 2177944366059817622L; private AtomicLong total = new AtomicLong(0); private AtomicLong times = new AtomicLong(0); private AtomicLong values = new AtomicLong(0); private IntervalCheck intervalCheck; private final String id; private final Logger LOG; public TpsCounter() { this("", TpsCounter.class); } public TpsCounter(String id) { this(id, TpsCounter.class); } public TpsCounter(Class tclass) { this("", tclass); } public TpsCounter(String id, Class tclass) { this.id = id; this.LOG = LoggerFactory.getLogger(tclass); intervalCheck = new IntervalCheck(); intervalCheck.setInterval(60); } public Double count(long value) { long totalValue = total.incrementAndGet(); long timesValue = times.incrementAndGet(); long v = values.addAndGet(value); Double pass = intervalCheck.checkAndGet(); if (pass != null) { times.set(0); values.set(0); Double tps = timesValue / pass; StringBuilder sb = new StringBuilder(); sb.append(id); sb.append(", tps:" + tps); sb.append(", avg:" + ((double) v) / timesValue); sb.append(", total:" + totalValue); LOG.info(sb.toString()); return tps; } return null; } public Double count() { return count(1L); } public void cleanup() { LOG.info(id + ", total:" + total); } public IntervalCheck getIntervalCheck() { return intervalCheck; } }
[ "crazyb20933666@gmail.com" ]
crazyb20933666@gmail.com
96643b1df1917a6724418b2bdcc828825f754f2c
96a7d93cb61cef2719fab90742e2fe1b56356d29
/selected projects/desktop/mars-sim-v3.1.0/mars-sim-core/org/mars_sim/msp/core/UnitListener.java
ce0057c27437516d64c7730319507315f43eb3ff
[ "MIT" ]
permissive
danielogen/msc_research
cb1c0d271bd92369f56160790ee0d4f355f273be
0b6644c11c6152510707d5d6eaf3fab640b3ce7a
refs/heads/main
2023-03-22T03:59:14.408318
2021-03-04T11:54:49
2021-03-04T11:54:49
307,107,229
0
1
MIT
2021-03-04T11:54:49
2020-10-25T13:39:50
Java
UTF-8
Java
false
false
293
java
/** * Mars Simulation Project * UnitListener.java * @version 3.1.0 2017-09-14 * @author Scott Davis */ package org.mars_sim.msp.core; public interface UnitListener { /** * Catch unit update event. * * @param event the unit event. */ public void unitUpdate(UnitEvent event); }
[ "danielogen@gmail.com" ]
danielogen@gmail.com
5e757a16799d2a9bbcdd944aed48cd3980889b1c
ab2678c3d33411507d639ff0b8fefb8c9a6c9316
/jgralab/testit/de/uni_koblenz/jgralabtest/greql2/funlib/ComparisonFunctionTest.java
1f2e68390c74f9692693e44e81ceb56297ea89ea
[]
no_license
dmosen/wiki-analysis
b58c731fa2d66e78fe9b71699bcfb228f4ab889e
e9c8d1a1242acfcb683aa01bfacd8680e1331f4f
refs/heads/master
2021-01-13T01:15:10.625520
2013-10-28T13:27:16
2013-10-28T13:27:16
8,741,553
2
0
null
null
null
null
UTF-8
Java
false
false
7,140
java
/* * JGraLab - The Java Graph Laboratory * * Copyright (C) 2006-2011 Institute for Software Technology * University of Koblenz-Landau, Germany * ist@uni-koblenz.de * * For bug reports, documentation and further information, visit * * http://jgralab.uni-koblenz.de * * 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 3 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, see <http://www.gnu.org/licenses>. * * Additional permission under GNU GPL version 3 section 7 * * If you modify this Program, or any covered work, by linking or combining * it with Eclipse (or a modified version of that program or an Eclipse * plugin), containing parts covered by the terms of the Eclipse Public * License (EPL), the licensors of this Program grant you additional * permission to convey the resulting work. Corresponding Source for a * non-source form of such a combination shall include the source code for * the parts of JGraLab used as well as that of the covered work. */ package de.uni_koblenz.jgralabtest.greql2.funlib; import org.junit.Test; import de.uni_koblenz.jgralabtest.greql2.GenericTest; public class ComparisonFunctionTest extends GenericTest { @Test public void testEqualsInfix() throws Exception { assertQueryEquals("5 = 9", false); assertQueryEquals("'' = 'a'", false); assertQueryEquals("'a' = ''", false); assertQueryEquals("'' = ''", true); assertQueryEquals("'a' = 'a'", true); assertQueryEquals("99.001 = 99.001", true); assertQueryEquals("'Eckhard Großmann' = 'Eckhard Grossmann'", false); assertQueryEquals("'Eckhard Großmann' = 'Eckhard Großmann'", true); } @Test public void testEquals() throws Exception { assertQueryEquals("equals(5, 9)", false); assertQueryEquals("equals('', 'a')", false); assertQueryEquals("equals('a', '')", false); assertQueryEquals("equals('', '')", true); assertQueryEquals("equals('a', 'a')", true); assertQueryEquals("equals(99.001, 99.001)", true); assertQueryEquals("equals('Eckhard Großmann', 'Eckhard Grossmann')", false); assertQueryEquals("equals('Eckhard Großmann', 'Eckhard Großmann')", true); } @Test public void testNEqualsInfix() throws Exception { assertQueryEquals("5 <> 9", true); assertQueryEquals("'' <> 'a'", true); assertQueryEquals("'a' <> ''", true); assertQueryEquals("'' <> ''", false); assertQueryEquals("'a' <> 'a'", false); assertQueryEquals("99.001 <> 99.001", false); assertQueryEquals("'Eckhard Großmann' <> 'Eckhard Grossmann'", true); assertQueryEquals("'Eckhard Großmann' <> 'Eckhard Großmann'", false); } @Test public void testNEquals() throws Exception { assertQueryEquals("nequals(5, 9)", true); assertQueryEquals("nequals('', 'a')", true); assertQueryEquals("nequals('a', '')", true); assertQueryEquals("nequals('', '')", false); assertQueryEquals("nequals('a', 'a')", false); assertQueryEquals("nequals(99.001, 99.001)", false); assertQueryEquals("nequals('Eckhard Großmann', 'Eckhard Grossmann')", true); assertQueryEquals("nequals('Eckhard Großmann', 'Eckhard Großmann')", false); } @Test public void testGrEqualInfix() throws Exception { assertQueryEquals("3 >= 2", true); assertQueryEquals("17 >= 17", true); assertQueryEquals("0.000000000000001 >= 0", true); assertQueryEquals("17 >= 199", false); assertQueryEquals("5.50 >= 4.701", true); assertQueryEquals("33.1 >= 33.1", true); assertQueryEquals("117.4 >= 111", true); assertQueryEquals("3 >= 187.00001", false); } @Test public void testGrEqual() throws Exception { assertQueryEquals("grEqual(3, 2)", true); assertQueryEquals("grEqual(17, 17.0)", true); assertQueryEquals("grEqual(0.000000000000001, 0)", true); assertQueryEquals("grEqual(17, 199)", false); assertQueryEquals("grEqual(5.50, 4.701)", true); assertQueryEquals("grEqual(33.1, 33.1)", true); assertQueryEquals("grEqual(117.4, 111)", true); assertQueryEquals("grEqual(3, 187.00001)", false); } @Test public void testGrThanInfix() throws Exception { assertQueryEquals("3 > 2", true); assertQueryEquals("17 > 17", false); assertQueryEquals("0.000000000000001 > 0", true); assertQueryEquals("17 > 199", false); assertQueryEquals("5.50 > 4.701", true); assertQueryEquals("33.1 > 33.1", false); assertQueryEquals("117.4 > 111", true); assertQueryEquals("3 > 187.00001", false); } @Test public void testGrThan() throws Exception { assertQueryEquals("grThan(3, 2)", true); assertQueryEquals("grThan(17, 17.0)", false); assertQueryEquals("grThan(0.000000000000001, 0)", true); assertQueryEquals("grThan(17, 199)", false); assertQueryEquals("grThan(5.50, 4.701)", true); assertQueryEquals("grThan(33.1, 33.1)", false); assertQueryEquals("grThan(117.4, 111)", true); assertQueryEquals("grThan(3, 187.00001)", false); } @Test public void testLeEqualInfix() throws Exception { assertQueryEquals("3 <= 2", false); assertQueryEquals("17 <= 17", true); assertQueryEquals("0.000000000000001 <= 0", false); assertQueryEquals("17 <= 199", true); assertQueryEquals("5.50 <= 4.701", false); assertQueryEquals("33.1 <= 33.1", true); assertQueryEquals("117.4 <= 111", false); assertQueryEquals("3 <= 187.00001", true); } @Test public void testLeEqual() throws Exception { assertQueryEquals("leEqual(3, 2)", false); assertQueryEquals("leEqual(17, 17.0)", true); assertQueryEquals("leEqual(0.000000000000001, 0)", false); assertQueryEquals("leEqual(17, 199)", true); assertQueryEquals("leEqual(5.50, 4.701)", false); assertQueryEquals("leEqual(33.1, 33.1)", true); assertQueryEquals("leEqual(117.4, 111)", false); assertQueryEquals("leEqual(3, 187.00001)", true); } @Test public void testLeThanInfix() throws Exception { assertQueryEquals("3 < 2", false); assertQueryEquals("17 < 17", false); assertQueryEquals("0.000000000000001 < 0", false); assertQueryEquals("17 < 199", true); assertQueryEquals("5.50 < 4.701", false); assertQueryEquals("33.1 < 33.1", false); assertQueryEquals("117.4 < 111", false); assertQueryEquals("3 < 187.00001", true); } @Test public void testLeThan() throws Exception { assertQueryEquals("leThan(3, 2)", false); assertQueryEquals("leThan(17, 17.0)", false); assertQueryEquals("leThan(0.000000000000001, 0)", false); assertQueryEquals("leThan(17, 199)", true); assertQueryEquals("leThan(5.50, 4.701)", false); assertQueryEquals("leThan(33.1, 33.1)", false); assertQueryEquals("leThan(117.4, 111)", false); assertQueryEquals("leThan(3, 187.00001)", true); } }
[ "dmosen@uni-koblenz.de" ]
dmosen@uni-koblenz.de
9c705b55a85da17d4cae5ba04cfaef22f69ed250
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Ibotta_com.ibotta.android/javafiles/android/support/v7/util/ThreadUtil$BackgroundCallback.java
c9a38b220e8f8bcddc8b1bc8bbd73b825e92f49c
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
547
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package android.support.v7.util; // Referenced classes of package android.support.v7.util: // ThreadUtil public static interface ThreadUtil$BackgroundCallback { public abstract void loadTile(int i, int j); public abstract void recycleTile(TileList.Tile tile); public abstract void refresh(int i); public abstract void updateRange(int i, int j, int k, int l, int i1); }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
670cb843150debe728e29b092a3dad0800ec4647
4338580e7ee938dc2254cc97dd17a3e59dc52f50
/02. Spring Essentials/Exercises/exodia/src/main/java/org/softuni/exodia/repository/DocumentRepository.java
90663dee674305bec3e49dcbfd2039eace415124
[ "MIT" ]
permissive
Martin-BG/SoftUni-Java-MVC-Frameworks-Spring-Feb-2019
3b588c3acd69af070c9ca28f95c013459e8cc301
0d55098fe41cbea3c81ca2879f710418a4e7e2ed
refs/heads/master
2022-01-30T01:32:34.117843
2019-08-29T14:20:45
2019-08-29T14:20:45
172,678,699
1
2
MIT
2022-01-21T23:24:03
2019-02-26T09:21:11
Java
UTF-8
Java
false
false
605
java
package org.softuni.exodia.repository; import org.softuni.exodia.domain.entities.Document; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import org.springframework.validation.annotation.Validated; import javax.persistence.Tuple; import java.util.List; import java.util.UUID; @Validated @Repository public interface DocumentRepository extends JpaRepository<Document, UUID> { @Query("SELECT d.id as id, d.title as title FROM Document AS d") List<Tuple> findAllShortView(); }
[ "MartinBG@abv.bg" ]
MartinBG@abv.bg
deae96966018e65e2491f9ea3a41ab33cbd057b3
1d4ddeba3ddad4a36063e69d20ec655399497b72
/apps/src/com/webapp/util/freemarker/FreeMarker.java
29499fd5644bf2c8c4bcd9e63d075401f29f4d1e
[ "Apache-2.0" ]
permissive
cowthan/JavaWeb
9d09b27de3518f7229a5a2c14c9d6634ce6eff0b
6431f9c11608a99b16e46f0fd112872ef825656b
refs/heads/master
2022-12-25T02:37:54.841615
2019-06-27T14:12:15
2019-06-27T14:12:15
112,908,445
0
0
Apache-2.0
2022-12-16T00:44:25
2017-12-03T07:22:09
Java
UTF-8
Java
false
false
2,332
java
package com.webapp.util.freemarker; import freemarker.template.*; import javax.servlet.http.HttpServlet; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.util.Map; public class FreeMarker { public static String process(String templateFile, Map data){ return process(null, "resource/views", templateFile, data); } public static String process(HttpServlet servlet, String dir, String templateFile, Map data) { Configuration cfg = new Configuration(); StringWriter buf = new StringWriter(); PrintWriter out = new PrintWriter(buf); try { // 从哪里加载模板文件 if(servlet == null){ cfg.setDirectoryForTemplateLoading(new File(dir)); }else{ cfg.setServletContextForTemplateLoading(servlet.getServletContext(), "WEB-INF/ftl"); } cfg.setDefaultEncoding("utf-8"); // 定义模版的位置,从类路径中,相对于FreemarkerManager所在的路径加载模版 // cfg.setTemplateLoader(new ClassTemplateLoader(FreemarkerManager.class, "templates")) // 设置对象包装器 cfg.setObjectWrapper(new DefaultObjectWrapper()); // 设置异常处理器 cfg .setTemplateExceptionHandler(TemplateExceptionHandler.IGNORE_HANDLER); // 定义数据模型 // 通过freemarker解释模板,首先需要获得Template对象 Template template = cfg.getTemplate(templateFile); // 定义模板解释完成之后的输出 // PrintWriter out = new PrintWriter(new BufferedWriter( // new FileWriter(dir+"/out.txt"))); template.process(data, out); String result = buf.getBuffer().toString(); return result; } catch (IOException e) { e.printStackTrace(); throw new RuntimeException(e); } catch (TemplateException e) { e.printStackTrace(); throw new RuntimeException(e); } finally { try { buf.close(); } catch (IOException e) { e.printStackTrace(); } out.close(); } } }
[ "cowthan@163.com" ]
cowthan@163.com
d60a610aa01bb770ef0b2364d3e05c710e604d9f
0598d5a10feda646b2485b3131bd35a0b417f190
/src/main/java/com/waterelephant/sms/common/ApiToken.java
d36e6d7f3aeb794960768ce7ba42c1de3880905f
[]
no_license
merrybiao/beadwallet-sms
e4798520b2461caf26f6015770dc22f3fb0275ac
ab7fe37a6be9fd02f4128639ac6e29e5695b5367
refs/heads/master
2022-10-20T17:50:45.319460
2019-11-20T09:00:57
2019-11-20T09:00:57
222,893,779
0
2
null
2022-10-12T20:34:08
2019-11-20T08:58:49
JavaScript
UTF-8
Java
false
false
537
java
package com.waterelephant.sms.common; import lombok.Getter; /** * api调用令牌 * * @author Luyuan * @since 1.8 * @version 1.0 * @date 2019年1月29日17:37:21 */ public class ApiToken { @Getter private String appId; @Getter private String token; @Getter private int expTime; // 有效时间 30分钟 public static final int DEFAULT_EXP_TIME = 30 * 60; public ApiToken(String appId, String token) { this.appId = appId; this.token = token; this.expTime = DEFAULT_EXP_TIME; } }
[ "wurenbiao@beadwallet.com" ]
wurenbiao@beadwallet.com
9d7fb7df64e8fff869966faee0b67be39487d50d
0039dc07de2e539748e40db7b060367f0f2a3d99
/CreditAnalytics/2.3/src/org/drip/analytics/definition/FXBasisCurve.java
791f6dd43d5a584deb04a156b8b533cb85fa8af5
[ "Apache-2.0" ]
permissive
tech2bg/creditanalytics
a4318518e42a557ffb3396be9350a367d3a208b3
b24196a76f98b1c104f251d74ac22a213ae920cf
refs/heads/master
2020-04-05T23:46:29.529999
2015-05-07T01:40:52
2015-05-07T01:40:52
35,299,804
0
1
null
null
null
null
UTF-8
Java
false
false
3,021
java
package org.drip.analytics.definition; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! * Copyright (C) 2014 Lakshmi Krishnamurthy * Copyright (C) 2013 Lakshmi Krishnamurthy * Copyright (C) 2012 Lakshmi Krishnamurthy * Copyright (C) 2011 Lakshmi Krishnamurthy * * This file is part of DRIP, a free-software/open-source library for fixed income analysts and developers - * http://www.credit-trader.org/Begin.html * * DRIP is a free, full featured, fixed income rates, credit, and FX analytics library with a focus towards * pricing/valuation, risk, and market making. * * 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. */ /** * FXBasisCurve implements the curve representing the FXBasis nodes. It extends the Curve class, and exposes * the following functionality: * - Retrieve the spot parameters (FX Spot, Spot Date, and the currency pair) * - Indicate if the basis has been bootstrapped * - Calculate the Complete set of FX Forward corresponding to each basis node * * @author Lakshmi Krishnamurthy */ public abstract class FXBasisCurve extends org.drip.service.stream.Serializer implements org.drip.analytics.definition.Curve { /** * Returns the Spot Date * * @return Spot Date */ public abstract org.drip.analytics.date.JulianDate spotDate(); /** * Get the FX Spot * * @return FX Spot */ public abstract double fxSpot(); /** * Return the currency pair instance * * @return CurrencyPair object instance */ public abstract org.drip.product.params.CurrencyPair currencyPair(); /** * Return if the inputs are for bootstrapped FX basis * * @return True if the inputs are for bootstrapped FX basis */ public abstract boolean isBasisBootstrapped(); /** * Return the array of full FX Forwards * * @param valParam ValuationParams * @param dcNum Discount Curve Numerator * @param dcDenom Discount Curve Numerator * @param bBasisOnDenom True if the basis is on the denominator * @param bFwdAsPIP True if the FX Forwards are to represented as PIP * * @return Array of FXForward */ public abstract double[] fxForward ( final org.drip.param.valuation.ValuationParams valParam, final org.drip.analytics.rates.DiscountCurve dcNum, final org.drip.analytics.rates.DiscountCurve dcDenom, final boolean bBasisOnDenom, final boolean bFwdAsPIP); }
[ "OpenCredit@DRIP" ]
OpenCredit@DRIP
49f513810d3d02469bfad3c43aaae7d8dfaff04b
f7f5b3cc796148336c15969dc29048a109dbc743
/src/main/java/cn/ucaner/raspi/dao/RaspiDao.java
3022dcf8569559dea606823945914e27aadc3150
[ "Apache-2.0" ]
permissive
Jasonandy/Cloud-X
b209f4ffe1ce4b317daf7e9dc18cedf205802d17
7ff56d8965556d4b959bfe50ab7fa2794946f92f
refs/heads/master
2020-04-10T15:18:13.616679
2018-12-17T12:06:43
2018-12-17T12:06:43
161,105,026
2
1
null
null
null
null
UTF-8
Java
false
false
548
java
/** * <html> * <body> * <P> Copyright JasonInternational</p> * <p> All rights reserved.</p> * <p> Created on 2018年8月28日 下午1:49:14</p> * <p> Created by Jason </p> * </body> * </html> */ package cn.ucaner.raspi.dao; /** * @Package:cn.ucaner.raspi.dao * @ClassName:RaspiDao * @Description: <p> RaspiDao </p> * @Author: - Jason * @CreatTime:2018年8月28日 下午1:49:14 * @Modify By: * @ModifyTime: 2018年8月28日 * @Modify marker: * @version V1.0 */ public class RaspiDao { }
[ "jasonandy@hotmail.com" ]
jasonandy@hotmail.com
e7f5a51686b4e6ba6037030bae7bb01a0dd66c0c
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/xiaomi/push/providers/C4568a.java
86993e0b6fbdf44f67707b6447cb52cdb059339e
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,865
java
package com.xiaomi.push.providers; import android.content.Context; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.p118pd.sdk.C8912ooOO0o0; import com.taobao.accs.common.Constants; import com.xiaomi.channel.commonutils.logger.AbstractC4163b; /* renamed from: com.xiaomi.push.providers.a */ public class C4568a extends SQLiteOpenHelper { /* renamed from: a */ public static int f13063a = 1; /* renamed from: a */ public static final Object f13064a = new Object(); /* renamed from: a */ public static final String[] f13065a = {"package_name", "TEXT", "message_ts", " LONG DEFAULT 0 ", "bytes", " LONG DEFAULT 0 ", C8912ooOO0o0.OooOo00, " INT DEFAULT -1 ", "rcv", " INT DEFAULT -1 ", Constants.KEY_IMSI, "TEXT"}; public C4568a(Context context) { super(context, "traffic.db", (SQLiteDatabase.CursorFactory) null, f13063a); } /* renamed from: a */ private void m13743a(SQLiteDatabase sQLiteDatabase) { StringBuilder sb = new StringBuilder("CREATE TABLE traffic(_id INTEGER PRIMARY KEY ,"); for (int i = 0; i < f13065a.length - 1; i += 2) { if (i != 0) { sb.append(com.xiaomi.mipush.sdk.Constants.ACCEPT_TIME_SEPARATOR_SP); } sb.append(f13065a[i]); sb.append(" "); sb.append(f13065a[i + 1]); } sb.append(");"); sQLiteDatabase.execSQL(sb.toString()); } public void onCreate(SQLiteDatabase sQLiteDatabase) { synchronized (f13064a) { try { m13743a(sQLiteDatabase); } catch (SQLException e) { AbstractC4163b.m11303a(e); } } } public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) { } }
[ "593746220@qq.com" ]
593746220@qq.com
cb8941a98abb4b204e40f36c84eb23d8e4574b84
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/ahas-20180901/src/main/java/com/aliyun/ahas20180901/models/QueryAhasPostStatusResponse.java
4e2ab469278dd1ebfcee7354ca819adc59171130
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,408
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ahas20180901.models; import com.aliyun.tea.*; public class QueryAhasPostStatusResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public QueryAhasPostStatusResponseBody body; public static QueryAhasPostStatusResponse build(java.util.Map<String, ?> map) throws Exception { QueryAhasPostStatusResponse self = new QueryAhasPostStatusResponse(); return TeaModel.build(map, self); } public QueryAhasPostStatusResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public QueryAhasPostStatusResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public QueryAhasPostStatusResponse setBody(QueryAhasPostStatusResponseBody body) { this.body = body; return this; } public QueryAhasPostStatusResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
7d5355cb3a41a70efd89fb55d17f66845259a16a
8d3dcf19deb7f9869c6c05976418add7b4af179c
/app-wanda-credit-ds/src/main/java/com/wanda/credit/ds/dao/iface/pengyuan/IPyCarIllegalService.java
0386994b6045521ba81665b1f1e2ac2aeeee569c
[]
no_license
jianyking/credit-core
87fb22f1146303fa2a64e3f9519ca6231a4a452d
c0ba2a95919828bb0a55cb5f76c81418e6d38951
refs/heads/master
2022-04-07T05:41:19.684089
2020-02-14T05:29:10
2020-02-14T05:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
package com.wanda.credit.ds.dao.iface.pengyuan; import com.wanda.credit.base.service.IBaseService; import com.wanda.credit.ds.dao.domain.pengyuan.Py_car_illegal; public interface IPyCarIllegalService extends IBaseService<Py_car_illegal> { }
[ "liunan1944@163.com" ]
liunan1944@163.com
57d802c2bd2b0cb6c2669d3160721bd1e6a6487d
d6b69d58fca199496f14d7e2ff5a2bc7232b42e2
/src/main/java/com/alipay/api/domain/AlipayCommerceEducateTrainTagsQueryModel.java
d34bddf8f3a227bb5bfaf549eb9c58a862222457
[ "Apache-2.0" ]
permissive
Cong222/alipay-sdk-java-all
3cdc442b751b78bef271267419f9bc5900888d2b
57127af62fd6aabeb25dfcf303a0877e91612596
refs/heads/master
2023-04-13T17:55:17.768367
2021-04-12T04:41:18
2021-04-12T04:41:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
578
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 查询标签列表 * * @author auto create * @since 1.0, 2021-03-11 10:08:22 */ public class AlipayCommerceEducateTrainTagsQueryModel extends AlipayObject { private static final long serialVersionUID = 1895362745524839927L; /** * 场景类型 */ @ApiField("scene_code") private String sceneCode; public String getSceneCode() { return this.sceneCode; } public void setSceneCode(String sceneCode) { this.sceneCode = sceneCode; } }
[ "junying.wjy@alipay.com" ]
junying.wjy@alipay.com
4753454fc3861027d2324d1a108bc422221a81fc
e69fbe41b7f347d59c5c11580af5721688407378
/app/src/main/java/com/mobi/overseas/clearsafe/fragment/bean/SigninBean.java
76622b193d4a7f8b558533e11f9b10274ebad526
[]
no_license
ZhouSilverBullet/mobiclearsafe-overseas
578fa39a3a320e41c68e9c6f6703647b5f6d4fc8
f885469217c1942eb680da712f083bede8ee4fd7
refs/heads/master
2022-07-03T13:06:38.407425
2020-05-11T02:58:22
2020-05-11T02:58:22
261,681,978
0
0
null
null
null
null
UTF-8
Java
false
false
1,462
java
package com.mobi.overseas.clearsafe.fragment.bean; import com.google.gson.Gson; /** * 签到请求 数据 * author : liangning * date : 2019-11-01 18:27 */ public class SigninBean { /** * points : 10 * record_id : 41 */ private int continuity_signin_number;//连续签到次数 private int is_today_signin;//今日是否己签到 1己签到 0未签到 public int points; private int total_points; private float cash; public static SigninBean objectFromData(String str) { return new Gson().fromJson(str, SigninBean.class); } public int getPoints() { return points; } public void setPoints(int points) { this.points = points; } public int getTotal_points() { return total_points; } public void setTotal_points(int total_points) { this.total_points = total_points; } public float getCash() { return cash; } public void setCash(float cash) { this.cash = cash; } public int getContinuity_signin_number() { return continuity_signin_number; } public void setContinuity_signin_number(int continuity_signin_number) { this.continuity_signin_number = continuity_signin_number; } public int getIs_today_signin() { return is_today_signin; } public void setIs_today_signin(int is_today_signin) { this.is_today_signin = is_today_signin; } }
[ "zhousaito@163.com" ]
zhousaito@163.com
964c34ecd4ec632e73d4c75d38a3969124b63af2
b6acb787a644ab293e5a4c7a711ac7cdfca5d0df
/feesCommissionManager/src/test/java/com/electron/mfs/pg/feescommission/repository/timezone/DateTimeWrapper.java
ffd259add0850e69ae08865d2713b2a208b79112
[]
no_license
fsfish/electron-backend
3440089550a5222cfa5fa4855302a2404fa34577
dff5634d0f8e75c090eca3c66aad3c76883b1edd
refs/heads/master
2021-05-22T00:27:37.984536
2020-03-30T18:16:03
2020-03-30T18:16:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,092
java
package com.electron.mfs.pg.feescommission.repository.timezone; import javax.persistence.*; import java.io.Serializable; import java.time.*; import java.util.Objects; @Entity @Table(name = "jhi_date_time_wrapper") public class DateTimeWrapper implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "instant") private Instant instant; @Column(name = "local_date_time") private LocalDateTime localDateTime; @Column(name = "offset_date_time") private OffsetDateTime offsetDateTime; @Column(name = "zoned_date_time") private ZonedDateTime zonedDateTime; @Column(name = "local_time") private LocalTime localTime; @Column(name = "offset_time") private OffsetTime offsetTime; @Column(name = "local_date") private LocalDate localDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Instant getInstant() { return instant; } public void setInstant(Instant instant) { this.instant = instant; } public LocalDateTime getLocalDateTime() { return localDateTime; } public void setLocalDateTime(LocalDateTime localDateTime) { this.localDateTime = localDateTime; } public OffsetDateTime getOffsetDateTime() { return offsetDateTime; } public void setOffsetDateTime(OffsetDateTime offsetDateTime) { this.offsetDateTime = offsetDateTime; } public ZonedDateTime getZonedDateTime() { return zonedDateTime; } public void setZonedDateTime(ZonedDateTime zonedDateTime) { this.zonedDateTime = zonedDateTime; } public LocalTime getLocalTime() { return localTime; } public void setLocalTime(LocalTime localTime) { this.localTime = localTime; } public OffsetTime getOffsetTime() { return offsetTime; } public void setOffsetTime(OffsetTime offsetTime) { this.offsetTime = offsetTime; } public LocalDate getLocalDate() { return localDate; } public void setLocalDate(LocalDate localDate) { this.localDate = localDate; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DateTimeWrapper dateTimeWrapper = (DateTimeWrapper) o; return !(dateTimeWrapper.getId() == null || getId() == null) && Objects.equals(getId(), dateTimeWrapper.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "TimeZoneTest{" + "id=" + id + ", instant=" + instant + ", localDateTime=" + localDateTime + ", offsetDateTime=" + offsetDateTime + ", zonedDateTime=" + zonedDateTime + '}'; } }
[ "philippe.monsan@gmail.com" ]
philippe.monsan@gmail.com
991149e69bf51b284408e1fc16d8823e90e40e6d
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
/MarketBusinessInterface/src/main/java/com/newco/marketplace/vo/provider/PowerAuditorVendorInfoVO.java
21248a3042462c5e4f519cfebc498b11f525f832
[]
no_license
ssriha0/sl-b2b-platform
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
refs/heads/master
2023-01-06T18:32:24.623256
2020-11-05T12:23:26
2020-11-05T12:23:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,506
java
/** * */ package com.newco.marketplace.vo.provider; /** * @author hoza * */ public class PowerAuditorVendorInfoVO extends BaseVO { /** * */ private static final long serialVersionUID = 8615413610315424621L; private Integer vendorId; private Integer resourceId; private String businessName; private String businessPhoneNumber; private String vendorCity; private String vendorState; private String primaryAdminPhoneNumber; private Integer primaryAdminContactId; private String primaryAdminLastName; private String primaryAdminFirstName; private Integer primaryAdminId; private String resourceLastName; private String resourceFirstname; /** * @return the vendorId */ public Integer getVendorId() { return vendorId; } /** * @param vendorId the vendorId to set */ public void setVendorId(Integer vendorId) { this.vendorId = vendorId; } /** * @return the resourceId */ public Integer getResourceId() { return resourceId; } /** * @param resourceId the resourceId to set */ public void setResourceId(Integer resourceId) { this.resourceId = resourceId; } /** * @return the businessName */ public String getBusinessName() { return businessName; } /** * @param businessName the businessName to set */ public void setBusinessName(String businessName) { this.businessName = businessName; } /** * @return the businessPhoneNumber */ public String getBusinessPhoneNumber() { return businessPhoneNumber; } /** * @param businessPhoneNumber the businessPhoneNumber to set */ public void setBusinessPhoneNumber(String businessPhoneNumber) { this.businessPhoneNumber = businessPhoneNumber; } /** * @return the vendorCity */ public String getVendorCity() { return vendorCity; } /** * @param vendorCity the vendorCity to set */ public void setVendorCity(String vendorCity) { this.vendorCity = vendorCity; } /** * @return the vendorState */ public String getVendorState() { return vendorState; } /** * @param vendorState the vendorState to set */ public void setVendorState(String vendorState) { this.vendorState = vendorState; } /** * @return the primaryAdminPhoneNumber */ public String getPrimaryAdminPhoneNumber() { return primaryAdminPhoneNumber; } /** * @param primaryAdminPhoneNumber the primaryAdminPhoneNumber to set */ public void setPrimaryAdminPhoneNumber(String primaryAdminPhoneNumber) { this.primaryAdminPhoneNumber = primaryAdminPhoneNumber; } /** * @return the primaryAdminContactId */ public Integer getPrimaryAdminContactId() { return primaryAdminContactId; } /** * @param primaryAdminContactId the primaryAdminContactId to set */ public void setPrimaryAdminContactId(Integer primaryAdminContactId) { this.primaryAdminContactId = primaryAdminContactId; } /** * @return the primaryAdminLastName */ public String getPrimaryAdminLastName() { return primaryAdminLastName; } /** * @param primaryAdminLastName the primaryAdminLastName to set */ public void setPrimaryAdminLastName(String primaryAdminLastName) { this.primaryAdminLastName = primaryAdminLastName; } /** * @return the primaryAdminFirstName */ public String getPrimaryAdminFirstName() { return primaryAdminFirstName; } /** * @param primaryAdminFirstName the primaryAdminFirstName to set */ public void setPrimaryAdminFirstName(String primaryAdminFirstName) { this.primaryAdminFirstName = primaryAdminFirstName; } /** * @return the primaryAdminId */ public Integer getPrimaryAdminId() { return primaryAdminId; } /** * @param primaryAdminId the primaryAdminId to set */ public void setPrimaryAdminId(Integer primaryAdminId) { this.primaryAdminId = primaryAdminId; } /** * @return the resourceLastName */ public String getResourceLastName() { return resourceLastName; } /** * @param resourceLastName the resourceLastName to set */ public void setResourceLastName(String resourceLastName) { this.resourceLastName = resourceLastName; } /** * @return the resourceFirstname */ public String getResourceFirstname() { return resourceFirstname; } /** * @param resourceFirstname the resourceFirstname to set */ public void setResourceFirstname(String resourceFirstname) { this.resourceFirstname = resourceFirstname; } }
[ "Kunal.Pise@transformco.com" ]
Kunal.Pise@transformco.com
179b48622217308268a365afbdc5bd6b189258c3
004832e529873885f1559eb8c864384b3e1cda3f
/dist/gameserver/data/scripts/ai/QueenAntNurse.java
ad10e7f07da21e0db53747238b9e00d6369c5311
[]
no_license
wks1222/mobius-source
02323e79316eabd4ce7e5b29f8cd5749c930d098
325a49fa23035f4d529e5a34b809b83c68d19cad
refs/heads/master
2021-01-10T02:22:17.746138
2015-01-17T20:08:13
2015-01-17T20:08:13
36,601,733
1
0
null
null
null
null
UTF-8
Java
false
false
4,548
java
/* * 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 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package ai; import lineage2.commons.util.Rnd; import lineage2.gameserver.ThreadPoolManager; import lineage2.gameserver.ai.Priest; import lineage2.gameserver.model.Creature; import lineage2.gameserver.model.Skill; import lineage2.gameserver.model.instances.MinionInstance; import lineage2.gameserver.model.instances.NpcInstance; import lineage2.gameserver.network.serverpackets.MagicSkillUse; import lineage2.gameserver.utils.Location; import npc.model.QueenAntInstance; /** * @author Mobius * @version $Revision: 1.0 $ */ public final class QueenAntNurse extends Priest { /** * Constructor for QueenAntNurse. * @param actor NpcInstance */ public QueenAntNurse(NpcInstance actor) { super(actor); MAX_PURSUE_RANGE = 10000; } /** * Method thinkActive. * @return boolean */ @Override protected boolean thinkActive() { final NpcInstance actor = getActor(); if (actor.isDead()) { return true; } if (_def_think) { if (doTask()) { clearTasks(); } return true; } final Creature top_desire_target = getTopDesireTarget(); if (top_desire_target == null) { return false; } if ((actor.getDistance(top_desire_target) - top_desire_target.getColRadius() - actor.getColRadius()) > 200) { moveOrTeleportToLocation(Location.findFrontPosition(top_desire_target, actor, 100, 150)); return false; } if (!top_desire_target.isCurrentHpFull() && doTask()) { return createNewTask(); } return false; } /** * Method createNewTask. * @return boolean */ @Override protected boolean createNewTask() { clearTasks(); final NpcInstance actor = getActor(); final Creature top_desire_target = getTopDesireTarget(); if (actor.isDead() || (top_desire_target == null)) { return false; } if (!top_desire_target.isCurrentHpFull()) { final Skill skill = _healSkills[Rnd.get(_healSkills.length)]; if (skill.getAOECastRange() < actor.getDistance(top_desire_target)) { moveOrTeleportToLocation(Location.findFrontPosition(top_desire_target, actor, skill.getAOECastRange() - 30, skill.getAOECastRange() - 10)); } addTaskBuff(top_desire_target, skill); return true; } return false; } /** * Method isGlobalAI. * @return boolean */ @Override public boolean isGlobalAI() { return true; } /** * Method moveOrTeleportToLocation. * @param loc Location */ private void moveOrTeleportToLocation(Location loc) { final NpcInstance actor = getActor(); actor.setRunning(); if (actor.moveToLocation(loc, 0, true)) { return; } clientStopMoving(); _pathfindFails = 0; actor.broadcastPacketToOthers(new MagicSkillUse(actor, actor, 2036, 1, 500, 600000)); ThreadPoolManager.getInstance().schedule(new Teleport(loc), 500); } /** * Method getTopDesireTarget. * @return Creature */ private Creature getTopDesireTarget() { final NpcInstance actor = getActor(); final QueenAntInstance queen_ant = (QueenAntInstance) ((MinionInstance) actor).getLeader(); if (queen_ant == null) { return null; } final Creature Larva = queen_ant.getLarva(); if ((Larva != null) && (Larva.getCurrentHpPercents() < 5)) { return Larva; } return queen_ant; } /** * Method onIntentionAttack. * @param target Creature */ @Override protected void onIntentionAttack(Creature target) { // empty method } /** * Method onEvtClanAttacked. * @param attacked_member Creature * @param attacker Creature * @param damage int */ @Override protected void onEvtClanAttacked(Creature attacked_member, Creature attacker, int damage) { if (doTask()) { createNewTask(); } } }
[ "mobius@cyber-wizard.com" ]
mobius@cyber-wizard.com
6af8ca309a839b7b3de5d5e83ebf49623ade5617
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/346b1d3c1cdc3032d07222a8a5e0027a2abf95bb1697b9d367d7cca7db1af769d8298e232c56471a122f05e87e79f4bd965855c9c0f8b173ebc0ef5d0abebc7b/003/mutations/209/smallest_346b1d3c_003.java
269d1d59edf051897c4d80ecd18add7f3d031ed9
[]
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,534
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 smallest_346b1d3c_003 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_346b1d3c_003 mainClass = new smallest_346b1d3c_003 (); 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 (), d = new IntObj (), num_1 = new IntObj (), num_2 = new IntObj (), num_3 = new IntObj (), num_4 = new IntObj (); output += (String.format ("Please enter 4 numbers separated by spaces > ")); num_1.value = scanner.nextInt (); num_2.value = scanner.nextInt (); num_3.value = scanner.nextInt (); num_4.value = scanner.nextInt (); a.value = (num_1.value); b.value = (num_2.value); c.value = (num_3.value); d.value = (num_4.value); if (a.value < b.value && a.value < c.value && ((c.value) < (a.value)) && ((c.value) < (b.value))) { output += (String.format ("%d is the smallest\n", a.value)); } else if (b.value < a.value && b.value < c.value && b.value < d.value) { output += (String.format ("%d is the smalles\n", b.value)); } else if (c.value < a.value && c.value < b.value && c.value < d.value) { output += (String.format ("%d is the smallest\n", c.value)); } else if (d.value < a.value && d.value < b.value && d.value < c.value) { output += (String.format ("%d is the smallest\n", d.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
d5e87763f78ef890a024843427e8f91061a8acb6
9750d8bd08dfebcee1b0954da673838851b5b841
/common/src/main/java/com/xinlian/common/request/WithdrawBudgetServiceFeeRequest.java
ca33c20f74e86f890ea0a564cdc538953646d507
[]
no_license
wangxiang22/wallet
7f030eba292c12b6f5561b949b95d298aa7a7114
1a3909d115d8713c067659fee8b7e098fa07673e
refs/heads/main
2023-02-11T04:55:32.623925
2021-01-12T06:40:36
2021-01-12T06:40:36
328,890,500
0
3
null
null
null
null
UTF-8
Java
false
false
534
java
package com.xinlian.common.request; import lombok.Data; @Data public class WithdrawBudgetServiceFeeRequest { //币id private String coin_id; //提币地址 private String address; //地址id private String address_id; //提币数量 private String num; //客户id private Long userId; //客户所在节点id private Long serverNodeId; public static final String PARAMS = "{userId:客户id,coin_id:币id,address:提币地址,num:提币数量,serverNode:客户所在节点id}"; }
[ "2356807033@qq.com" ]
2356807033@qq.com
c3c8c8cc5105a359b3fdfb82d391aa56899dbcc3
5d6f0a5ff77a231ab9aaff08817ccf7f4eef1bda
/drools/gen/com/intellij/plugins/drools/lang/psi/impl/DroolsArrayInitializerImpl.java
0ffbdfa8f7b636cb73b41d3cd82071ff1e6c38da
[ "Apache-2.0" ]
permissive
vikrant21st/intellij-plugins
b62a71e3410bc0a96c4d42ecdc0271c2d7d5fd00
b3b1c5b9079cee182e04a561b9da9a76dd952760
refs/heads/master
2023-01-12T20:51:07.916439
2022-12-14T19:57:03
2022-12-14T22:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
true
1,107
java
// This is a generated file. Not intended for manual editing. package com.intellij.plugins.drools.lang.psi.impl; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import static com.intellij.plugins.drools.lang.lexer.DroolsTokenTypes.*; import com.intellij.plugins.drools.lang.psi.*; public class DroolsArrayInitializerImpl extends DroolsPsiCompositeElementImpl implements DroolsArrayInitializer { public DroolsArrayInitializerImpl(@NotNull ASTNode node) { super(node); } public void accept(@NotNull DroolsVisitor visitor) { visitor.visitArrayInitializer(this); } public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof DroolsVisitor) accept((DroolsVisitor)visitor); else super.accept(visitor); } @Override @NotNull public List<DroolsVariableInitializer> getVariableInitializerList() { return PsiTreeUtil.getChildrenOfTypeAsList(this, DroolsVariableInitializer.class); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
027a41d3c803347b4d33a9ee1f3710ce3ae4a6a4
324f6c696c6d0ff8e3df7a89c431c65bc19950ae
/src/main/java/org/onvif/ver10/advancedsecurity/wsdl/KeyStatus.java
d4f7846a45bec5561b42f3c55753d8c6b95a02db
[]
no_license
nightdeveloper/WebCamera
731ebd81341bc43a20740b10b39651ab5f1c9110
be69873691c669da8a1f7e0edd35cc6d985a7a86
refs/heads/master
2021-01-01T20:42:59.190684
2017-07-31T18:16:02
2017-07-31T18:16:02
98,915,806
2
1
null
null
null
null
UTF-8
Java
false
false
1,442
java
package org.onvif.ver10.advancedsecurity.wsdl; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for KeyStatus. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="KeyStatus"&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt; * &lt;enumeration value="ok"/&gt; * &lt;enumeration value="generating"/&gt; * &lt;enumeration value="corrupt"/&gt; * &lt;/restriction&gt; * &lt;/simpleType&gt; * </pre> * */ @XmlType(name = "KeyStatus") @XmlEnum public enum KeyStatus { /** * Key is ready for use * */ @XmlEnumValue("ok") OK("ok"), /** * Key is being generated * */ @XmlEnumValue("generating") GENERATING("generating"), /** * Key has not been successfully generated and cannot be used. * */ @XmlEnumValue("corrupt") CORRUPT("corrupt"); private final String value; KeyStatus(String v) { value = v; } public String value() { return value; } public static KeyStatus fromValue(String v) { for (KeyStatus c: KeyStatus.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "pri@vate.localhost" ]
pri@vate.localhost
653037275d724e756e74319aaf617652e67bb6a9
0e72060cb1b7651c9552af3e59786e9946a3d03f
/app/src/main/java/com/owo/module_b_home/recyclerview/normal/adapter/AdapterNormal.java
fdea068db8ce011e103c36b8035f3bfaf60ca692
[]
no_license
AlexCatP/YUP
f24a4d805b37c63a768bd6962c81395089271bbb
2a3f1a31c621e572a6790fc2e931d8439786357e
refs/heads/master
2021-09-08T03:09:45.256258
2018-03-06T13:34:58
2018-03-06T13:34:58
115,122,678
0
2
null
2018-03-06T13:34:59
2017-12-22T14:30:47
Java
UTF-8
Java
false
false
4,339
java
package com.owo.module_b_home.recyclerview.normal.adapter; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.DecelerateInterpolator; import com.wao.dogcat.R; import com.owo.base.BeanBase; import com.owo.module_b_home.bean.BeanTask; import com.owo.module_b_home.recyclerview.normal.bean.BeanActivityLabel; import com.owo.module_b_home.recyclerview.normal.holder.HolderActivity; import com.owo.module_b_home.recyclerview.normal.holder.HolderActivityLabel; import com.owo.utils.Constants; import java.util.ArrayList; import java.util.List; /** * @author XQF * @created 2017/5/25 */ public class AdapterNormal extends RecyclerView.Adapter<RecyclerView.ViewHolder> { List<BeanBase> mList; Context mContext; private int lastAnimatedPosition=-1; private boolean animationsLocked = false; private boolean delayEnterAnimation = true; public AdapterNormal(Context context) { mContext = context; mList = new ArrayList<>(); } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = null; if (viewType == Constants.BEAN_TYPE_TASK) { itemView = LayoutInflater.from(mContext).inflate(R.layout.frag_home_normal_recycler_activity_item, parent, false); return new HolderActivity(mContext, itemView); } else if (viewType == Constants.BEAN_TYPE_LABEL) { itemView = LayoutInflater.from(mContext).inflate(R.layout.frag_home_normal_recycler_label_item, parent, false); return new HolderActivityLabel(itemView); } return null; } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { runEnterAnimation(holder.itemView,position); BeanBase beanBase = mList.get(position); if (holder instanceof HolderActivity) { ((HolderActivity) holder).bind((BeanTask) beanBase); } else if (holder instanceof HolderActivityLabel) { ((HolderActivityLabel) holder).bind((BeanActivityLabel) beanBase); } } @Override public int getItemCount() { return mList.size(); } @Override public int getItemViewType(int position) { return mList.get(position).getBeanType(); } public void addItems(List<BeanBase> list) { mList.addAll(list); } private void runEnterAnimation(View view, int position) { if (animationsLocked) return;//animationsLocked是布尔类型变量,一开始为false,确保仅屏幕一开始能够显示的item项才开启动画 if (position > lastAnimatedPosition) {//lastAnimatedPosition是int类型变量,一开始为-1,这两行代码确保了recycleview滚动式回收利用视图时不会出现不连续的效果 lastAnimatedPosition = position; view.setTranslationY(500);//相对于原始位置下方500 view.setAlpha(0.f);//完全透明 //每个item项两个动画,从透明到不透明,从下方移动到原来的位置 //并且根据item的位置设置延迟的时间,达到一个接着一个的效果 view.animate() .translationY(0).alpha(1.f)//设置最终效果为完全不透明,并且在原来的位置 .setStartDelay(delayEnterAnimation ? 20 * (position) : 0)//根据item的位置设置延迟时间,达到依次动画一个接一个进行的效果 .setInterpolator(new DecelerateInterpolator(0.5f))//设置动画效果为在动画开始的地方快然后慢 .setDuration(400) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { animationsLocked = true;//确保仅屏幕一开始能够显示的item项才开启动画,也就是说屏幕下方还没有显示的item项滑动时是没有动画效果 } }) .start(); } } }
[ "847307933@qq.com" ]
847307933@qq.com
0a70ee680f0bf0078fcaffb84aba811e9dc5b941
fd023cbc46e998ef22e7da68799a25cdedd19cee
/src/com/situ/mall/controller/back/UploadController.java
962d7023ba7be91de9714ee2320cacc17b981562
[]
no_license
GaoChengQuan/Java1707Mall
3428fca466a774c6beb13b1b2e73513609c2b263
3f7c1717a7ca4c9dbe243d42ac9d71bffca8d0a2
refs/heads/master
2021-07-13T06:34:18.479388
2017-10-19T04:07:59
2017-10-19T04:07:59
104,844,078
0
3
null
null
null
null
UTF-8
Java
false
false
3,441
java
package com.situ.mall.controller.back; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.UUID; import org.apache.commons.io.FilenameUtils; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import com.situ.mall.constant.MallConstant; import com.situ.mall.util.JsonUtils; import com.situ.mall.util.QiniuUploadUtil; @Controller @RequestMapping("/upload") public class UploadController { /** * kindeditor上传使用 * @param pictureFile * @return */ @RequestMapping(value="/pic", produces=MediaType.TEXT_PLAIN_VALUE+";charset=utf-8") @ResponseBody public String uploadFile(MultipartFile pictureFile) { try { //为了防止重名生成一个随机的名字:aa4fb86a7896458a8c5b34c634011ae3 String name = UUID.randomUUID().toString().replace("-", ""); //jpg,png String ext = FilenameUtils.getExtension(pictureFile.getOriginalFilename()); String fileName = name + "." + ext; String filePath1 = "E:\\pic\\" + fileName; String filePath = MallConstant.SERVER_ADDRES + fileName; try { pictureFile.transferTo(new File(filePath1)); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } //封装到map中返回 Map result = new HashMap<>(); result.put("error", 0); result.put("url", filePath); //将object转换成json return JsonUtils.objectToJson(result); } catch (Exception e) { e.printStackTrace(); Map result = new HashMap<>(); result.put("error", 1); result.put("message", "图片上传失败"); return JsonUtils.objectToJson(result); } } /** * 自定义图片上传使用 * @param pictureFile * @return */ @RequestMapping(value="/uploadPic") @ResponseBody public Map<String, Object> uploadPic(MultipartFile pictureFile) { return upload(pictureFile); //上传到七牛 //return uploadByQiniu(pictureFile); } private Map<String, Object> upload(MultipartFile pictureFile) { //为了防止重名生成一个随机的名字:aa4fb86a7896458a8c5b34c634011ae3 String name = UUID.randomUUID().toString().replace("-", ""); //jpg,png String ext = FilenameUtils.getExtension(pictureFile.getOriginalFilename()); String fileName = name + "." + ext; String filePath = "E:\\pic\\" + fileName; try { pictureFile.transferTo(new File(filePath)); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Map<String, Object> map = new HashMap<String, Object>(); map.put("fileName", fileName); map.put("filePath", MallConstant.SERVER_ADDRES + fileName); return map; } private Map<String, Object> uploadByQiniu(MultipartFile pictureFile) { String fileName = ""; try { fileName = QiniuUploadUtil.upload(pictureFile.getBytes()); } catch (IOException e) { e.printStackTrace(); } Map<String, Object> map = new HashMap<String, Object>(); map.put("fileName", fileName); map.put("filePath", MallConstant.SERVER_ADDRES + fileName); return map; } public static void main(String[] args) { String name = UUID.randomUUID().toString().replace("-", ""); System.out.println(name); } }
[ "529390053@qq.com" ]
529390053@qq.com
6aded61996657a05cb4aa2794a256b53ef3b67a0
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/sdk/h/d.java
d0bc9976682acab9bf0515ef8568e5070e779bff
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
782
java
package com.tencent.mm.sdk.h; import android.content.Context; import android.content.pm.PackageManager; import com.tencent.matrix.trace.core.AppMethodBeat; public final class d { public static boolean ha(Context paramContext) { AppMethodBeat.i(65376); boolean bool; if (paramContext == null) { bool = false; AppMethodBeat.o(65376); } while (true) { return bool; bool = paramContext.getPackageManager().hasSystemFeature("com.oppo.feature.screen.heteromorphism"); AppMethodBeat.o(65376); } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes-dex2jar.jar * Qualified Name: com.tencent.mm.sdk.h.d * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
fbddf912b36019c120572d84bf2f7339d545da01
da5940bdc8045d60063c5e8e1cdce9e8d9bd977a
/Licenta/src/fields/f2_6/F2_6MultiplicationDetails.java
7e1d5043421a9d04e5b05ed697ee3f5f9c827d60
[]
no_license
dorapolicarp/MyRepo
a9afb3fae31bb067041a62d1369ccc7e1bb67134
937632317a3187e756bec021c0719e4c7ed5f5f7
refs/heads/master
2021-03-12T22:07:03.287136
2013-05-11T10:36:13
2013-05-11T10:36:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
304
java
package fields.f2_6; import fields.Field; public class F2_6MultiplicationDetails implements Field { private String value; public F2_6MultiplicationDetails(String value) { this.value = value; } @Override public void print() { System.out.println("F2_6MultiplicationDetails: " + value); } }
[ "dorapolicarp@gmail.com" ]
dorapolicarp@gmail.com
a5e5341034cf17f18056401b2ac7364392e0979b
e44c2ccffe53ea0c545bebe1b017670ee03d0f83
/nulidexiaoma-server/src/test/java/pattern/factory/IProduct.java
22db2cc7406acb92a5e11406c80372699a77a1db
[]
no_license
994108345/nulidexiaoma
32ee794243aa6121aa889ebe50ba3fce800cbb8b
a9d37406e7269d4db11884947ac20a41aea799a0
refs/heads/master
2018-10-31T07:15:49.723625
2018-07-30T01:06:06
2018-07-30T01:06:06
99,785,547
1
0
null
null
null
null
UTF-8
Java
false
false
221
java
package pattern.factory;/** * Created by wenzailong on 2018/7/19. */ /** * @author wenzailong * @create 2018-07-19 10:42 **/ public interface IProduct { void method1(); void method2(); void method3(); }
[ "994108345@qq.com" ]
994108345@qq.com
f23cd91bb9ede4a9aa11713b35c910d51470aaee
ae0ab07cc46b518a1ee9959248e845e0e7f5fbbb
/generator/schema2template/src/test/resources/test-reference/odf/generation/odfdom-java/odf-schema-1.0/org/odftoolkit/odfdom/dom/attribute/text/TextChapterAttribute.java
a4a577b401a562dfa5b76768ae02ab39887d3288
[ "Apache-2.0", "BSD-3-Clause", "MIT", "W3C", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-generic-cla" ]
permissive
tdf/odftoolkit
22c19bfadb6e5cba0176296ab51f963ab264b256
e38051da51b06d962a09012c765addeaae6e6874
refs/heads/master
2023-08-09T08:42:40.878413
2023-08-03T14:37:12
2023-08-04T08:32:14
161,654,269
95
52
Apache-2.0
2023-09-14T16:15:30
2018-12-13T14:57:43
Java
UTF-8
Java
false
false
2,957
java
/************************************************************************ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER * * Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved. * * Use is subject to license terms. * * 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. You can also * obtain a copy of the License at http://odftoolkit.org/docs/license.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. * ************************************************************************/ /* * This file is automatically generated. * Don't edit manually. */ package org.odftoolkit.odfdom.dom.attribute.text; import org.odftoolkit.odfdom.dom.OdfDocumentNamespace; import org.odftoolkit.odfdom.pkg.OdfAttribute; import org.odftoolkit.odfdom.pkg.OdfFileDom; import org.odftoolkit.odfdom.pkg.OdfName; /** * DOM implementation of OpenDocument attribute {@odf.attribute text:chapter}. * */ public class TextChapterAttribute extends OdfAttribute { public static final OdfName ATTRIBUTE_NAME = OdfName.newName(OdfDocumentNamespace.TEXT, "chapter"); /** * Create the instance of OpenDocument attribute {@odf.attribute text:chapter}. * * @param ownerDocument The type is <code>OdfFileDom</code> */ public TextChapterAttribute(OdfFileDom ownerDocument) { super(ownerDocument, ATTRIBUTE_NAME); } /** * Returns the attribute name. * * @return the <code>OdfName</code> for {@odf.attribute text:chapter}. */ @Override public OdfName getOdfName() { return ATTRIBUTE_NAME; } /** * @return Returns the name of this attribute. */ @Override public String getName() { return ATTRIBUTE_NAME.getLocalName(); } /** * Returns the default value of {@odf.attribute text:chapter}. * * @return the default value as <code>String</code> dependent of its element name * return <code>null</code> if the default value does not exist */ @Override public String getDefault() { return null; } /** * Default value indicator. As the attribute default value is dependent from its element, the attribute has only a default, when a parent element exists. * * @return <code>true</code> if {@odf.attribute text:chapter} has an element parent * otherwise return <code>false</code> as undefined. */ @Override public boolean hasDefault() { return false; } /** * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?) */ @Override public boolean isId() { return false; } }
[ "michael.stahl@allotropia.de" ]
michael.stahl@allotropia.de
7ff1ae39503e9c273c728949926f82234c7dcf63
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/com/whatsapp/BlockConfirmationDialogFragment.java
1922c1c6f0f4449f875ab6a2bf0723d2aac06eb2
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
2,076
java
package com.whatsapp; import X.AbstractC03740Hl; import X.AnonymousClass00T; import X.AnonymousClass01A; import X.AnonymousClass01X; import X.AnonymousClass02M; import X.AnonymousClass0GG; import X.C000300f; import X.C002101e; import X.C014308b; import X.C04360Kb; import X.C47282He; import android.content.Context; import com.whatsapp.base.WaDialogFragment; public class BlockConfirmationDialogFragment extends WaDialogFragment { public AbstractC03740Hl A00; public final AnonymousClass0GG A01 = AnonymousClass0GG.A00(); public final AnonymousClass02M A02 = AnonymousClass02M.A00(); public final C000300f A03 = C000300f.A00(); public final C04360Kb A04 = C04360Kb.A00(); public final AnonymousClass01A A05 = AnonymousClass01A.A00(); public final C014308b A06 = C014308b.A00(); public final C47282He A07 = C47282He.A00(); public final AnonymousClass01X A08 = AnonymousClass01X.A00(); public final AnonymousClass00T A09 = C002101e.A00(); @Override // X.AnonymousClass037, androidx.fragment.app.DialogFragment public void A0a(Context context) { super.A0a(context); if (context instanceof AbstractC03740Hl) { this.A00 = (AbstractC03740Hl) context; } } /* JADX DEBUG: Multi-variable search result rejected for r12v1, resolved type: java.lang.String[] */ /* JADX DEBUG: Multi-variable search result rejected for r5v2, resolved type: java.lang.String[] */ /* JADX WARN: Multi-variable type inference failed */ /* JADX WARNING: Code restructure failed: missing block: B:27:0x0165, code lost: if (r0 == false) goto L_0x0167; */ @Override // androidx.fragment.app.DialogFragment /* Code decompiled incorrectly, please refer to instructions dump. */ public android.app.Dialog A0p(android.os.Bundle r19) { /* // Method dump skipped, instructions count: 437 */ throw new UnsupportedOperationException("Method not decompiled: com.whatsapp.BlockConfirmationDialogFragment.A0p(android.os.Bundle):android.app.Dialog"); } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
04c9232a85112e2cb9ec61f92dd800a2335ded1d
12fcdfa41e36a3ea64e20bc3e98f6aaa8b3e66a4
/baselibrary/baseOldLib/src/main/java/com/infrastructure/base/BaseModel.java
ba595d04565dfbd14085ba115cfa84827078917f
[]
no_license
guojin2092/BusinessManagementProject
8265351a4b8f0860bc137b661463f63c3d35c0b9
9f51ed63dba83c755d258a47046e65efef23e955
refs/heads/master
2020-04-05T20:36:32.031207
2019-02-13T05:33:48
2019-02-13T05:33:48
157,188,062
3
0
null
null
null
null
UTF-8
Java
false
false
1,364
java
/*Copyright ©2015 TommyLemon(https://github.com/TommyLemon) 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.infrastructure.base; import java.io.Serializable; /**基础Model * *isCorrect可以用于BaseModel子类的数据校验 * *implements Serializable 是为了网络传输字节流转换 * @author Lemon * @use extends BaseModel */ public abstract class BaseModel implements Serializable { /** * default, 怎么设置子类都有warning */ private static final long serialVersionUID = 1L; //对子类不起作用 // /**默认构造方法,JSON等解析时必须要有 // */ // public BaseModel() { // } /**数据正确性校验 * @param data * @return */ public static boolean isCorrect(BaseModel data) { return data != null && data.isCorrect(); } /**数据正确性校验 * @return */ public abstract boolean isCorrect(); }
[ "317280902@qq.com" ]
317280902@qq.com
e94f717087c7cfc8d5de41dc9b20ee934d1897c0
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/DrJava/rev5266-5336-compilers-hj/base-trunk-5266/plt/src/edu/rice/cs/plt/io/LinkedReaderAndWriter.java
68a88ac8d77661add15965b22300495deea6ae69
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
2,545
java
package edu.rice.cs.plt.io; import java.io.Reader; import java.io.Writer; import java.io.IOException; public class LinkedReaderAndWriter { private final DirectReader _linkedReader; private final DirectWriter _linkedWriter; private long _readIndex; private boolean _eof; private long _writeIndex; public LinkedReaderAndWriter(final Reader r, final Writer w) { _readIndex = 0; _writeIndex = 0; _eof = false; final ExpandingCharBuffer buffer = new ExpandingCharBuffer(); final Reader fromBuffer = buffer.reader(); final DirectWriter toBuffer = buffer.writer(); _linkedReader = new DirectReader() { public int read(char[] cbuf, int offset, int chars) throws IOException { int read = 0; if (!buffer.isEmpty()) { int bufferReadResult = fromBuffer.read(cbuf, offset, chars); if (bufferReadResult < 0) { throw new IllegalStateException("Unexpected negative result from ExpandingCharBuffer read"); } else if (bufferReadResult > 0) { read += bufferReadResult; chars -= bufferReadResult; } } if (buffer.isEmpty() && chars >= 0) { int readResult = r.read(cbuf, offset + read, chars); if (readResult < 0) { _eof = true; return read > 0 ? read : readResult; } else { read += readResult; chars -= readResult; _readIndex += readResult; } } return read; } public void close() throws IOException { r.close(); } public boolean ready() throws IOException { return r.ready(); } }; _linkedWriter = new DirectWriter() { public void write(char[] cbuf, int offset, int chars) throws IOException { long newIndex = _writeIndex + chars; while (newIndex > _readIndex) { if (_eof) { _readIndex = newIndex; } else { int bufferWriteResult = toBuffer.write(r, (int) (newIndex - _readIndex)); if (bufferWriteResult < 0) { _eof = true; } else { _readIndex += bufferWriteResult; } } } w.write(cbuf, offset, chars); _writeIndex = newIndex; } public void close() throws IOException { w.close(); } public void flush() throws IOException { w.flush(); } }; } public DirectReader reader() { return _linkedReader; } public DirectWriter writer() { return _linkedWriter; } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
9157d5caeed3d046b9c40a2a0d1d5033ff8bc31f
5d2c516fca03be57874d53960419c51e59e0d231
/RasPISamples/src/raspisamples/adc/levelreader/manager/SevenADCChannelsManager.java
5aaf280e8063d07660c8718b713c9729657a3a65
[]
no_license
theendcomplete/raspberry-pi4j-samples
790632b09fbe8deac26605ca2ac1e75431917bc6
3c0b03546844c3023e5ea92db6c54b129c1790a0
refs/heads/master
2021-05-04T06:33:53.783962
2016-10-07T13:22:05
2016-10-07T13:22:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,063
java
package raspisamples.adc.levelreader.manager; import adc.ADCContext; import adc.ADCListener; import adc.ADCObserver; import adc.utils.EscapeSeq; import java.text.DecimalFormat; import java.text.Format; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.fusesource.jansi.AnsiConsole; public class SevenADCChannelsManager { private final static int WATER_THRESHOLD = Integer.parseInt(System.getProperty("water.threshold", "50")); private final static int OIL_THRESHOLD = Integer.parseInt(System.getProperty("oil.threshold", "30")); private final static Format DF4 = new DecimalFormat("#000"); private final static Format DF32 = new DecimalFormat("#0.00"); public enum Material { UNKNOWN, AIR, WATER, OIL } /* * Some samples: * - Water : above 50% * - Oil : 30-40% * - Air : less than 30% */ private static ADCObserver.MCP3008_input_channels channel[] = null; private final int[] channelValues = new int[] { 0, 0, 0, 0, 0, 0, 0 }; private final int[] channelVolumes = new int[] { 0, 0, 0, 0, 0, 0, 0 }; /* Used to smooth the values */ private final float[] smoothedChannelVolumes = new float[] { 0f, 0f, 0f, 0f, 0f, 0f, 0f }; private final List<Integer>[] smoothedChannel = new List[7]; private final static int WINDOW_WIDTH = Integer.parseInt(System.getProperty("smooth.width", "100")); // For smoothing //private int currentLevel = 0; final ADCObserver obs; /* Uses 7 channels among the 8 available */ public SevenADCChannelsManager(final AirWaterOilInterface client) throws Exception { for (int i=0; i<smoothedChannel.length; i++) smoothedChannel[i] = new ArrayList<Integer>(WINDOW_WIDTH); channel = new ADCObserver.MCP3008_input_channels[] { ADCObserver.MCP3008_input_channels.CH0, ADCObserver.MCP3008_input_channels.CH1, ADCObserver.MCP3008_input_channels.CH2, ADCObserver.MCP3008_input_channels.CH3, ADCObserver.MCP3008_input_channels.CH4, ADCObserver.MCP3008_input_channels.CH5, ADCObserver.MCP3008_input_channels.CH6 }; obs = new ADCObserver(channel); ADCContext.getInstance().addListener(new ADCListener() { @Override public void valueUpdated(ADCObserver.MCP3008_input_channels inputChannel, int newValue) { // if (inputChannel.equals(channel)) { int ch = inputChannel.ch(); int volume = (int)(newValue / 10.23); // [0, 1023] ~ [0x0000, 0x03FF] ~ [0&0, 0&1111111111] channelValues[ch] = newValue; channelVolumes[ch] = volume; smoothedChannel[ch].add(volume); while (smoothedChannel[ch].size() > WINDOW_WIDTH) smoothedChannel[ch].remove(0); smoothedChannelVolumes[ch] = smooth(ch); Material material = Material.UNKNOWN; float val = smoothedChannelVolumes[ch]; if (val > WATER_THRESHOLD) material = Material.WATER; else if (val > OIL_THRESHOLD) material = Material.OIL; else material = Material.AIR; client.setTypeOfChannel(ch, material, volume); // val); // int maxLevel = 0; // for (int chan=0; chan<channel.length; chan++) // { // if (channelVolumes[chan] > WATER_THRESHOLD) // maxLevel = Math.max(chan+1, maxLevel); // } // DEBUG { AnsiConsole.out.println(EscapeSeq.ansiLocate(1, 24 + ch)); AnsiConsole.out.print("Channel " + ch + ": Value " + lpad(Integer.toString(newValue), " ", 4) + ", " + lpad(Integer.toString(volume), " ", 3) + " (inst)" + ", " + lpad(DF32.format(val), " ", 6) + " (avg)" + ", " + smoothedChannel[ch].size() + " val. : "); for (int vol : smoothedChannel[ch]) AnsiConsole.out.print(DF4.format(vol) + " "); AnsiConsole.out.println(" "); } } } }); System.out.println("Start observing."); Thread observer = new Thread() { public void run() { obs.start(-1, 0L); // Tolerance -1: all values } }; observer.start(); } public void quit() { System.out.println("Stop observing."); if (obs != null) obs.stop(); } private float smooth(int ch) { float size = smoothedChannel[ch].size(); float sigma = 0; for (int v : smoothedChannel[ch]) sigma += v; return sigma / size; } private static String lpad(String str, String with, int len) { String s = str; while (s.length() < len) s = with + s; return s; } }
[ "olivier.lediouris@oracle.com" ]
olivier.lediouris@oracle.com
f7d8d4b3d6da36e07041a86c86d532522cde28f6
c036afc4ba9aeaaede13e4153a91718805de9ed6
/trunk/v1.0.0/src/com/youthor/bsp/view/urss/web/form/RegCompanyForm.java
bde53b747267b1a7d5b6fc56b0076b1a4a9e6c17
[]
no_license
BGCX262/zz-bsp-svn-to-git
c5713cd23c2423013b7515ecbc95415785f34c45
1c64b407aff1fc6632c93944cada76160c0f1423
refs/heads/master
2021-01-10T21:31:27.458998
2015-08-23T06:57:00
2015-08-23T06:57:00
41,245,256
0
0
null
null
null
null
UTF-8
Java
false
false
2,372
java
package com.youthor.bsp.view.urss.web.form; import java.util.Date; import com.youthor.bsp.view.abdf.common.base.BaseForm; public class RegCompanyForm extends BaseForm{ private static final long serialVersionUID = 8894727392583247285L; private String comId; //注册公司id private String regComName; //公司名称 private String regComCode; //公司编号 private String regComAddress; //公司地址 private String regComEmail; //公司email private String regComBoss; //公司法人 private double captil; //注册资金 private String userType; //用户类型 private Date endTime; //有效结束日期 private Date createTime;// 建立时间 public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public double getCaptil() { return captil; } public void setCaptil(double captil) { this.captil = captil; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public String getRegComAddress() { return regComAddress; } public void setRegComAddress(String regComAddress) { this.regComAddress = regComAddress; } public String getRegComBoss() { return regComBoss; } public void setRegComBoss(String regComBoss) { this.regComBoss = regComBoss; } public String getRegComCode() { return regComCode; } public void setRegComCode(String regComCode) { this.regComCode = regComCode; } public String getRegComEmail() { return regComEmail; } public void setRegComEmail(String regComEmail) { this.regComEmail = regComEmail; } public String getComId() { return comId; } public void setComId(String comId) { this.comId = comId; } public String getRegComName() { return regComName; } public void setRegComName(String regComName) { this.regComName = regComName; } public String getUserType() { return userType; } public void setUserType(String userType) { this.userType = userType; } }
[ "you@example.com" ]
you@example.com
1ff00efa1ab565c9c30435e91daead333451c4cc
4b85b961b9952dc31de96f179f62ade262527502
/FaultyVersions/AORB_103/ParkingFeeCalculator.java
ab63958db502496557791f61f090be4cdc4f261e
[]
no_license
liubaoli-and/ParkingFee
ab6d45bddf2a2b057b27310a26ec7d33a1e0a642
9d47df9e56f801aac2a6c041c3b3b237e47dba5c
refs/heads/main
2023-08-11T19:50:42.547938
2021-09-09T11:55:32
2021-09-09T11:55:32
306,792,224
3
3
null
null
null
null
UTF-8
Java
false
false
6,549
java
// This is a mutant program. // Author : ysma package com.lwf.ustb.www.FEE.mutant.AORB_103; import com.lwf.ustb.www.FEE.util.*; public class ParkingFeeCalculator { private double formatDouble( double d ) { java.lang.String t = String.format( "%.2f", d ); double r = new java.lang.Double( t ); return r; } private double parkingFeeWithoutDiscount( int typeOfVehicle, int typeOfCar, int dayOfWeek, double apd ) { double fee = 0.0; if (apd <= 0 || apd > 24) { return -1; } if (typeOfVehicle != com.lwf.ustb.www.FEE.util.Vehicle.MOTORCYCLE && typeOfVehicle != com.lwf.ustb.www.FEE.util.Vehicle.CAR) { return -1; } if (typeOfVehicle == com.lwf.ustb.www.FEE.util.Vehicle.CAR && typeOfCar != com.lwf.ustb.www.FEE.util.Car.TWO_DOOR_COUPE && typeOfCar != com.lwf.ustb.www.FEE.util.Car.OTHERS) { return -1; } if (dayOfWeek != com.lwf.ustb.www.FEE.util.Day.WEEKDAY && dayOfWeek != com.lwf.ustb.www.FEE.util.Day.WEEKEND) { return -1; } int parkingHours; if (apd % 1 == 0) { parkingHours = (int) apd; } else { parkingHours = (int) apd + 1; } switch (dayOfWeek) { case com.lwf.ustb.www.FEE.util.Day.WEEKDAY : if (parkingHours <= 2) { if (typeOfVehicle == com.lwf.ustb.www.FEE.util.Vehicle.MOTORCYCLE) { fee = parkingHours * 4; } else { if (typeOfCar == com.lwf.ustb.www.FEE.util.Car.TWO_DOOR_COUPE) { fee = parkingHours * 4.5; } else { fee = parkingHours * 5; } } } else { if (parkingHours <= 4) { if (typeOfVehicle == com.lwf.ustb.www.FEE.util.Vehicle.MOTORCYCLE) { fee = 2 * 4 + (parkingHours - 2) * 5; } else { if (typeOfCar == com.lwf.ustb.www.FEE.util.Car.TWO_DOOR_COUPE) { fee = 2 * 4.5 + (parkingHours - 2) * 5.5; } else { fee = 2 * 5 + (parkingHours - 2) * 6; } } } else { if (typeOfVehicle == com.lwf.ustb.www.FEE.util.Vehicle.MOTORCYCLE) { fee = 2 * 4 + 2 * 5 + (parkingHours - 4) * 6; } else { if (typeOfCar == com.lwf.ustb.www.FEE.util.Car.TWO_DOOR_COUPE) { fee = 2 * 4.5 % (2 * 5.5) + (parkingHours - 4) * 6.5; } else { fee = 2 * 5 + 2 * 6 + (parkingHours - 4) * 7; } } } } break; case com.lwf.ustb.www.FEE.util.Day.WEEKEND : if (parkingHours <= 2) { if (typeOfVehicle == com.lwf.ustb.www.FEE.util.Vehicle.MOTORCYCLE) { fee = parkingHours * 5; } else { if (typeOfCar == com.lwf.ustb.www.FEE.util.Car.TWO_DOOR_COUPE) { fee = parkingHours * 6; } else { fee = parkingHours * 7; } } } else { if (parkingHours <= 4) { if (typeOfVehicle == com.lwf.ustb.www.FEE.util.Vehicle.MOTORCYCLE) { fee = 2 * 5 + (parkingHours - 2) * 6.5; } else { if (typeOfCar == com.lwf.ustb.www.FEE.util.Car.TWO_DOOR_COUPE) { fee = 2 * 6 + (parkingHours - 2) * 7.5; } else { fee = 2 * 7 + (parkingHours - 2) * 8.5; } } } else { if (typeOfVehicle == com.lwf.ustb.www.FEE.util.Vehicle.MOTORCYCLE) { fee = 2 * 5 + 2 * 6.5 + (parkingHours - 4) * 8; } else { if (typeOfCar == com.lwf.ustb.www.FEE.util.Car.TWO_DOOR_COUPE) { fee = 2 * 6 + 2 * 7.5 + (parkingHours - 4) * 9; } else { fee = 2 * 7 + 2 * 8.5 + (parkingHours - 4) * 10; } } } } break; default : } return formatDouble( fee ); } private double parkingFeeWithDiscountCoupon( int typeOfVehicle, int typeOfCar, int dayOfWeek, double apd ) { return formatDouble( parkingFeeWithoutDiscount( typeOfVehicle, typeOfCar, dayOfWeek, apd ) * 0.5 ); } private double parkingFeeWithEstimation( int typeOfVehicle, int typeOfCar, int dayOfWeek, double apd, java.lang.String estimation ) { if (estimation.equals( "(0, 2]" ) && apd > 0 && apd <= 2 || estimation.equals( "(2, 4]" ) && apd > 2 && apd <= 4 || estimation.equals( "(4, 24]" ) && apd > 4 && apd <= 24) { return formatDouble( parkingFeeWithoutDiscount( typeOfVehicle, typeOfCar, dayOfWeek, apd ) * 0.4 ); } else { if (!estimation.equals( "(0, 2]" ) && !estimation.equals( "(2, 4]" ) && !estimation.equals( "(4, 24]" )) { return -1; } else { return formatDouble( parkingFeeWithoutDiscount( typeOfVehicle, typeOfCar, dayOfWeek, apd ) * 1.2 ); } } } public double parkingFee( int typeOfVehical, int typeOfCar, int dayOfWeek, double apd, boolean discountCoupon, java.lang.String estimation ) { double fee = -1; if (discountCoupon && estimation != null) { fee = -1; } else { if (discountCoupon) { fee = parkingFeeWithDiscountCoupon( typeOfVehical, typeOfCar, dayOfWeek, apd ); } else { if (estimation != null) { fee = parkingFeeWithEstimation( typeOfVehical, typeOfCar, dayOfWeek, apd, estimation ); } else { fee = parkingFeeWithoutDiscount( typeOfVehical, typeOfCar, dayOfWeek, apd ); } } } return fee; } }
[ "57534835+liubaoli-and@users.noreply.github.com" ]
57534835+liubaoli-and@users.noreply.github.com
77c92a5cb3a097de69d44d89de657be4334a5a29
ceab19a7632794a11896cdef7037725550b5269f
/src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/project/build/fix/SettingSimpleWordReplacer.java
2f5db9988127af53f9b650c65bc00842664f9aef
[ "Apache-2.0" ]
permissive
aihuasxy/RED
79729b0b8c9b8b3c837b7fc6eaff3010aaa25ebf
aab80218fa42656310ca1ee97b87c039ae988a0a
refs/heads/master
2021-01-13T04:25:20.808371
2017-01-10T13:28:14
2017-01-10T13:28:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,566
java
/* * Copyright 2016 Nokia Solutions and Networks * Licensed under the Apache License, Version 2.0, * see license.txt file for details. */ package org.robotframework.ide.eclipse.main.plugin.project.build.fix; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.contentassist.CompletionProposal; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.rf.ide.core.testdata.text.read.recognizer.RobotToken; import org.robotframework.ide.eclipse.main.plugin.RedImages; import org.robotframework.ide.eclipse.main.plugin.model.RobotElement; import org.robotframework.ide.eclipse.main.plugin.model.RobotKeywordCall; import org.robotframework.ide.eclipse.main.plugin.model.RobotSuiteFile; import org.robotframework.ide.eclipse.main.plugin.model.RobotSuiteFileSection; import org.robotframework.red.graphics.ImagesManager; import com.google.common.base.Optional; import com.google.common.collect.Range; public class SettingSimpleWordReplacer extends RedSuiteMarkerResolution { private final String toReplace; private final String replacement; private final Class<? extends RobotSuiteFileSection> sectionClass; private final String label; public SettingSimpleWordReplacer(final Class<? extends RobotSuiteFileSection> sectionClass, final String toReplace, final String replacement) { this.sectionClass = sectionClass; this.toReplace = toReplace; this.replacement = replacement; this.label = "Replace old style " + this.toReplace + " by " + this.replacement; } @Override public String getLabel() { return this.label; } @Override public Optional<ICompletionProposal> asContentProposal(final IMarker marker, final IDocument document, final RobotSuiteFile suiteModel) { Optional<ICompletionProposal> proposal = Optional.absent(); final Range<Integer> defRange = getRange(marker); final Optional<? extends RobotSuiteFileSection> section = suiteModel.findSection(sectionClass); if (section.isPresent()) { try { return createProposal(document, section.get().findElement(defRange.lowerEndpoint())); } catch (final BadLocationException e) { } } return proposal; } private Optional<ICompletionProposal> createProposal(final IDocument document, final Optional<? extends RobotElement> optional) throws BadLocationException { Optional<ICompletionProposal> proposal = Optional.absent(); if (optional.isPresent()) { RobotKeywordCall setting = (RobotKeywordCall) optional.get(); final RobotToken declaration = setting.getLinkedElement().getDeclaration(); final String declarationValue = declaration.getRaw(); String withoutSpaces = declarationValue.replaceAll("\\s+", ""); boolean containsSquareBracket = (withoutSpaces.indexOf('[') >= 0); boolean endsWithColon = (withoutSpaces.endsWith(":")); StringBuilder myReplacement = new StringBuilder(); if (containsSquareBracket) { myReplacement.append('['); } myReplacement.append(replacement); if (containsSquareBracket) { myReplacement.append(']'); } if (endsWithColon) { myReplacement.append(':'); } final String replacementString = myReplacement.toString(); final int offset = declaration.getStartOffset(); final ICompletionProposal fix = new CompletionProposal(replacementString, offset, declarationValue.length(), offset + replacementString.length(), ImagesManager.getImage(RedImages.getUserKeywordImage()), getLabel(), null, null); proposal = Optional.of(fix); } return proposal; } private Range<Integer> getRange(final IMarker marker) { try { return Range.closed((Integer) marker.getAttribute(IMarker.CHAR_START), (Integer) marker.getAttribute(IMarker.CHAR_END)); } catch (final CoreException e) { throw new IllegalStateException("Given marker should have offsets defined", e); } } }
[ "test009@nsn.com.not.available" ]
test009@nsn.com.not.available
34f67e6c9d0165e5e6be4a9ef09c4518c8ed797f
bd8d9f754deec2da1bb6405592d7aa54793e1c65
/src/main/java/model/Theater.java
1b82bedbc5fe82c2e8221730bd6eb6f7bb7e083c
[]
no_license
AJS-DMACC/junitMovie
028b1eef6c600d982612f7f2c03b5035fc67e78a
df06150a66fcc3e9dbd3b75b05697a6879f6f365
refs/heads/master
2022-12-11T18:55:21.183456
2020-09-08T19:52:24
2020-09-08T19:52:24
293,911,739
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package model; //created 9/8/20 by AJ Serck //this theater class has a field for seats (with getter/setter), and 2 methods to test an instance of the movie class public class Theater { private int seats;//seats field //constructors public Theater(int seats) { this.seats = seats; } public Theater() { } //public methods public String RunMovie(Movie mov) { return "Now Playing " + mov.getTitle(); } public boolean isEnoughSeats(Movie mov) { return (getSeats() > mov.getExpectedAudience()); } //getter/setter public int getSeats() { return seats; } public void setSeats(int seats) { this.seats = seats; } }
[ "you@example.com" ]
you@example.com
73e5cb333d645d9bbee92757cee5db28b186c62d
957a0671cb120f17112c1a7ad9c8142027e418d3
/manual_full/64/src/main/java/de/peass/C3_0.java
67323e0f5c1e4727cf02715fc4fbcfe3df22a367
[]
no_license
DaGeRe/opentelemetry-overhead-measurement
aae2790f84aeacdd3215415e404f09ef3f5d44b2
90455e315716e381febcf148919f22250200407c
refs/heads/main
2023-03-09T16:41:00.456770
2021-02-19T11:20:51
2021-02-19T11:20:51
325,526,855
0
0
null
null
null
null
UTF-8
Java
false
false
393
java
package de.peass; import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.Tracer; class C3_0{ public static final Tracer tracer = TraceUtil.openTelemetry.getTracer("de.peass.C3_0"); public int method0(){ Span span = tracer.spanBuilder("method0").startSpan(); C4_0 object = new C4_0(); int value = 0; value += object.method0(); span.end(); return value; } }
[ "davidgeorg_reichelt@dagere.de" ]
davidgeorg_reichelt@dagere.de
544d3419e8783974c0f6fbdf84000ef8498ac243
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/privacy-friendly-netmonitor-2.0/DecompiledCode/Fernflower/src/main/java/android/support/v4/app/BackStackState.java
2de072f45288b196b14ab4c01dd72b7f70d7d58e
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,601
java
package android.support.v4.app; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import android.text.TextUtils; import android.util.Log; import java.util.ArrayList; final class BackStackState implements Parcelable { public static final Creator CREATOR = new Creator() { public BackStackState createFromParcel(Parcel var1) { return new BackStackState(var1); } public BackStackState[] newArray(int var1) { return new BackStackState[var1]; } }; final int mBreadCrumbShortTitleRes; final CharSequence mBreadCrumbShortTitleText; final int mBreadCrumbTitleRes; final CharSequence mBreadCrumbTitleText; final int mIndex; final String mName; final int[] mOps; final boolean mReorderingAllowed; final ArrayList mSharedElementSourceNames; final ArrayList mSharedElementTargetNames; final int mTransition; final int mTransitionStyle; public BackStackState(Parcel var1) { this.mOps = var1.createIntArray(); this.mTransition = var1.readInt(); this.mTransitionStyle = var1.readInt(); this.mName = var1.readString(); this.mIndex = var1.readInt(); this.mBreadCrumbTitleRes = var1.readInt(); this.mBreadCrumbTitleText = (CharSequence)TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(var1); this.mBreadCrumbShortTitleRes = var1.readInt(); this.mBreadCrumbShortTitleText = (CharSequence)TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(var1); this.mSharedElementSourceNames = var1.createStringArrayList(); this.mSharedElementTargetNames = var1.createStringArrayList(); boolean var2; if (var1.readInt() != 0) { var2 = true; } else { var2 = false; } this.mReorderingAllowed = var2; } public BackStackState(BackStackRecord var1) { int var2 = var1.mOps.size(); this.mOps = new int[var2 * 6]; if (!var1.mAddToBackStack) { throw new IllegalStateException("Not on back stack"); } else { int var3 = 0; int var7; for(int var4 = 0; var3 < var2; var4 = var7 + 1) { BackStackRecord.Op var5 = (BackStackRecord.Op)var1.mOps.get(var3); int[] var6 = this.mOps; var7 = var4 + 1; var6[var4] = var5.cmd; var6 = this.mOps; int var8 = var7 + 1; if (var5.fragment != null) { var4 = var5.fragment.mIndex; } else { var4 = -1; } var6[var7] = var4; var6 = this.mOps; var7 = var8 + 1; var6[var8] = var5.enterAnim; var6 = this.mOps; var4 = var7 + 1; var6[var7] = var5.exitAnim; var6 = this.mOps; var7 = var4 + 1; var6[var4] = var5.popEnterAnim; this.mOps[var7] = var5.popExitAnim; ++var3; } this.mTransition = var1.mTransition; this.mTransitionStyle = var1.mTransitionStyle; this.mName = var1.mName; this.mIndex = var1.mIndex; this.mBreadCrumbTitleRes = var1.mBreadCrumbTitleRes; this.mBreadCrumbTitleText = var1.mBreadCrumbTitleText; this.mBreadCrumbShortTitleRes = var1.mBreadCrumbShortTitleRes; this.mBreadCrumbShortTitleText = var1.mBreadCrumbShortTitleText; this.mSharedElementSourceNames = var1.mSharedElementSourceNames; this.mSharedElementTargetNames = var1.mSharedElementTargetNames; this.mReorderingAllowed = var1.mReorderingAllowed; } } public int describeContents() { return 0; } public BackStackRecord instantiate(FragmentManagerImpl var1) { BackStackRecord var2 = new BackStackRecord(var1); int var3 = 0; int var7; for(int var4 = 0; var3 < this.mOps.length; var3 = var7 + 1) { BackStackRecord.Op var5 = new BackStackRecord.Op(); int[] var6 = this.mOps; var7 = var3 + 1; var5.cmd = var6[var3]; if (FragmentManagerImpl.DEBUG) { StringBuilder var8 = new StringBuilder(); var8.append("Instantiate "); var8.append(var2); var8.append(" op #"); var8.append(var4); var8.append(" base fragment #"); var8.append(this.mOps[var7]); Log.v("FragmentManager", var8.toString()); } var6 = this.mOps; var3 = var7 + 1; var7 = var6[var7]; if (var7 >= 0) { var5.fragment = (Fragment)var1.mActive.get(var7); } else { var5.fragment = null; } var6 = this.mOps; var7 = var3 + 1; var5.enterAnim = var6[var3]; var6 = this.mOps; var3 = var7 + 1; var5.exitAnim = var6[var7]; var6 = this.mOps; var7 = var3 + 1; var5.popEnterAnim = var6[var3]; var5.popExitAnim = this.mOps[var7]; var2.mEnterAnim = var5.enterAnim; var2.mExitAnim = var5.exitAnim; var2.mPopEnterAnim = var5.popEnterAnim; var2.mPopExitAnim = var5.popExitAnim; var2.addOp(var5); ++var4; } var2.mTransition = this.mTransition; var2.mTransitionStyle = this.mTransitionStyle; var2.mName = this.mName; var2.mIndex = this.mIndex; var2.mAddToBackStack = true; var2.mBreadCrumbTitleRes = this.mBreadCrumbTitleRes; var2.mBreadCrumbTitleText = this.mBreadCrumbTitleText; var2.mBreadCrumbShortTitleRes = this.mBreadCrumbShortTitleRes; var2.mBreadCrumbShortTitleText = this.mBreadCrumbShortTitleText; var2.mSharedElementSourceNames = this.mSharedElementSourceNames; var2.mSharedElementTargetNames = this.mSharedElementTargetNames; var2.mReorderingAllowed = this.mReorderingAllowed; var2.bumpBackStackNesting(1); return var2; } public void writeToParcel(Parcel var1, int var2) { var1.writeIntArray(this.mOps); var1.writeInt(this.mTransition); var1.writeInt(this.mTransitionStyle); var1.writeString(this.mName); var1.writeInt(this.mIndex); var1.writeInt(this.mBreadCrumbTitleRes); TextUtils.writeToParcel(this.mBreadCrumbTitleText, var1, 0); var1.writeInt(this.mBreadCrumbShortTitleRes); TextUtils.writeToParcel(this.mBreadCrumbShortTitleText, var1, 0); var1.writeStringList(this.mSharedElementSourceNames); var1.writeStringList(this.mSharedElementTargetNames); var1.writeInt(this.mReorderingAllowed); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
e8728dba8ffd402b7206a4968258a56ea27e1a0f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_3df4226489929e6ab565f99481826acd9e7a0b4f/MinimalGatewayTest/2_3df4226489929e6ab565f99481826acd9e7a0b4f_MinimalGatewayTest_s.java
817235a1aa8b633ccd9be35b4b4571f8d7af3ce6
[]
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,514
java
/* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ace.it.server; import java.util.ArrayList; import java.util.List; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.ops4j.pax.exam.Inject; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.Configuration; import org.ops4j.pax.exam.junit.JUnit4TestRunner; import static junit.framework.Assert.*; import static org.ops4j.pax.exam.CoreOptions.*; import static org.ops4j.pax.exam.OptionUtils.*; import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.*; /** * @author Toni Menzel * @since Dec 10, 2009 */ @RunWith( JUnit4TestRunner.class ) public class MinimalGatewayTest { @Configuration public Option[] config() { System.setProperty( "java.protocol.handler.pkgs", "org.ops4j.pax.url" ); return combine( options( felix().version( "2.0.1" ) ), AssemblyConfigure.get( "ace-gateway", "mvn:org.apache.ace/ace-target-devgateway/0.8.0-SNAPSHOT/zip/distribution" ) ); } @Inject BundleContext context; @Test public void resolve() { List<Bundle> notLoaded = new ArrayList<Bundle>(); // just check that all have been resolved. for( Bundle bundle : context.getBundles() ) { System.out.println( "+ " + bundle.getSymbolicName() ); if( bundle.getState() != Bundle.ACTIVE ) { System.err.println( "Bundle " + bundle.getLocation() + " has not been started." ); notLoaded.add( bundle ); } } if( notLoaded.size() > 0 ) { fail( "Some bundles have not been started properly. See Log Messages for details." ); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6429b660663bd578532bc5062a051fb301a09d08
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/ttpic/model/CaptureActItem.java
8ea95dffbb99107affc5e8f1b739c7ac07db0dce
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,768
java
package com.tencent.ttpic.model; import android.graphics.Bitmap; import android.graphics.PointF; import android.opengl.GLES20; import android.text.TextUtils; import com.tencent.filter.BaseFilter; import com.tencent.filter.C41672h; import com.tencent.filter.GLSLRender; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.ttpic.baseutils.BitmapUtils; import com.tencent.ttpic.gles.GlUtil; import com.tencent.ttpic.util.ActUtil; import com.tencent.ttpic.util.BenchUtil; import com.tencent.ttpic.util.VideoGlobalContext; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Random; public class CaptureActItem extends FrameSourceItem { private static final String TAG = CaptureActItem.class.getSimpleName(); private int[] captureTimes; private BaseFilter copyFilter = new BaseFilter(GLSLRender.bJB); private C41672h[] copyFrames; private String dataPath; private List<ExpressionItem> expressionList; private String imageId; private int lastCaptureIndex = -1; private int[] numTextures = new int[10]; private final Random random; private ScoreTag[] scores; private List<float[]> starFaceAngles; private List<List<PointF>> starFacePoints; static class ScoreTag { public boolean hasShowed; public int score; public int[] texId; private ScoreTag() { } } static { AppMethodBeat.m2504i(83477); AppMethodBeat.m2505o(83477); } public CaptureActItem(List<ExpressionItem> list, String str, String str2, BaseFilter baseFilter) { int i = 0; super(baseFilter); AppMethodBeat.m2504i(83473); this.expressionList = list; this.dataPath = str; this.imageId = str2; this.starFacePoints = new ArrayList(list.size()); this.starFaceAngles = new ArrayList(list.size()); this.captureTimes = new int[list.size()]; for (int i2 = 0; i2 < list.size(); i2++) { ExpressionItem expressionItem = (ExpressionItem) list.get(i2); this.starFacePoints.add(expressionItem.expressionFeat); this.starFaceAngles.add(expressionItem.expressionAngle); this.captureTimes[i2] = expressionItem.expressionTime; } this.scores = new ScoreTag[list.size()]; for (int i3 = 0; i3 < this.scores.length; i3++) { this.scores[i3] = new ScoreTag(); } this.copyFrames = new C41672h[list.size()]; while (i < this.copyFrames.length) { this.copyFrames[i] = new C41672h(); i++; } this.random = new Random(System.currentTimeMillis()); AppMethodBeat.m2505o(83473); } public void init() { int i; AppMethodBeat.m2504i(83474); this.copyFilter.ApplyGLSLFilter(); GLES20.glGenTextures(this.numTextures.length, this.numTextures, 0); for (i = 0; i < 10; i++) { Bitmap decodeSampleBitmap = BitmapUtils.decodeSampleBitmap(VideoGlobalContext.getContext(), this.dataPath + File.separator + ActUtil.EXPRESSION + File.separator + this.imageId + File.separator + this.imageId + "_" + i + ".png", 720, ActUtil.HEIGHT); if (BitmapUtils.isLegal(decodeSampleBitmap)) { GlUtil.loadTexture(this.numTextures[i], decodeSampleBitmap); decodeSampleBitmap.recycle(); } } for (int i2 = 0; i2 < this.expressionList.size(); i2++) { String str = ((ExpressionItem) this.expressionList.get(i2)).scoreImageID; if (!TextUtils.isEmpty(str)) { int[] iArr = new int[10]; GLES20.glGenTextures(10, iArr, 0); for (i = 0; i < 10; i++) { Bitmap decodeSampleBitmap2 = BitmapUtils.decodeSampleBitmap(VideoGlobalContext.getContext(), this.dataPath + File.separator + ActUtil.EXPRESSION + File.separator + str + File.separator + str + "_" + i + ".png", 720, ActUtil.HEIGHT); if (BitmapUtils.isLegal(decodeSampleBitmap2)) { GlUtil.loadTexture(iArr[i], decodeSampleBitmap2); decodeSampleBitmap2.recycle(); } } this.scores[i2].texId = iArr; } } AppMethodBeat.m2505o(83474); } public int getTexture(CanvasItem canvasItem, long j) { return this.copyFrames[canvasItem.index].texture[0]; } public void clear() { AppMethodBeat.m2504i(83475); this.copyFilter.ClearGLSL(); for (C41672h c41672h : this.copyFrames) { if (c41672h != null) { c41672h.clear(); } } for (ScoreTag scoreTag : this.scores) { if (scoreTag.texId != null) { GLES20.glDeleteTextures(scoreTag.texId.length, scoreTag.texId, 0); scoreTag.texId = null; } } AppMethodBeat.m2505o(83475); } public void reset() { this.lastCaptureIndex = -1; for (int i = 0; i < this.scores.length; i++) { this.scores[i].score = 0; this.scores[i].hasShowed = false; } } public int getOrigWidth(int i) { if (i < 0 || i >= this.copyFrames.length) { return -1; } return this.copyFrames[i].width; } public int getOrigHeight(int i) { if (i < 0 || i >= this.copyFrames.length) { return -1; } return this.copyFrames[i].height; } public void update(C41672h c41672h, long j, List<List<PointF>> list, List<float[]> list2, int i) { AppMethodBeat.m2504i(83476); super.update(c41672h, j, list, list2, i); int captureIndex = getCaptureIndex(j); if (captureIndex >= 0) { BenchUtil.benchStart(TAG + "[update]"); this.copyFilter.RenderProcess(c41672h.texture[0], c41672h.width, c41672h.height, -1, 0.0d, this.copyFrames[captureIndex]); BenchUtil.benchEnd(TAG + "[update]"); if (list.size() <= 0 || i != 0) { this.scores[captureIndex].score = this.random.nextInt(5) + 5; } else { BenchUtil.benchStart(TAG + "[calculate score]"); this.scores[captureIndex].score = (int) ActUtil.getExpressionSimilarity((List) this.starFacePoints.get(captureIndex), (List) list.get(0), (float[]) this.starFaceAngles.get(captureIndex), (float[]) list2.get(0), ((ExpressionItem) this.expressionList.get(captureIndex)).expressionWeight); BenchUtil.benchEnd(TAG + "[calculate score]"); AppMethodBeat.m2505o(83476); return; } } AppMethodBeat.m2505o(83476); } private int getCaptureIndex(long j) { if (this.lastCaptureIndex + 1 >= this.captureTimes.length || j < ((long) this.captureTimes[this.lastCaptureIndex + 1])) { return -1; } this.lastCaptureIndex++; return this.lastCaptureIndex; } public int getScore(CanvasItem canvasItem) { this.scores[canvasItem.index].hasShowed = true; return this.scores[canvasItem.index].score; } public int[] getScoreTexture(CanvasItem canvasItem) { if (this.scores[canvasItem.index].texId != null) { return this.scores[canvasItem.index].texId; } return this.numTextures; } public int getTotalScore() { int i = 0; for (ScoreTag scoreTag : this.scores) { if (scoreTag.hasShowed) { i += scoreTag.score; } } return i; } public int[] getTotalScoreTexture() { return this.numTextures; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
5c763ef066a0262c6f4624904fe6336bafa38bf4
3a2333d42e2198325302b64c6c9fa35b80e52cc7
/support/cas-server-support-couchbase-authentication/src/test/java/org/apereo/cas/AbstractCouchbaseTests.java
bfa8c3b7ad462332e95e0fa2c433f3031e77d8c3
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
antoine777/cas
4b78f80939c9b198e1265a27527b5aebbdab682d
7d0574350a03fffde419e0ee86eff5828ee29026
refs/heads/master
2023-04-04T23:56:51.627227
2023-03-20T05:16:55
2023-03-20T05:16:55
227,148,390
0
0
Apache-2.0
2022-02-26T00:53:30
2019-12-10T15:01:23
Java
UTF-8
Java
false
false
3,501
java
package org.apereo.cas; import org.apereo.cas.config.CasAuthenticationEventExecutionPlanTestConfiguration; import org.apereo.cas.config.CasCoreAuthenticationConfiguration; import org.apereo.cas.config.CasCoreAuthenticationPrincipalConfiguration; import org.apereo.cas.config.CasCoreAuthenticationServiceSelectionStrategyConfiguration; import org.apereo.cas.config.CasCoreAuthenticationSupportConfiguration; import org.apereo.cas.config.CasCoreConfiguration; import org.apereo.cas.config.CasCoreHttpConfiguration; import org.apereo.cas.config.CasCoreNotificationsConfiguration; import org.apereo.cas.config.CasCoreServicesConfiguration; import org.apereo.cas.config.CasCoreTicketCatalogConfiguration; import org.apereo.cas.config.CasCoreTicketIdGeneratorsConfiguration; import org.apereo.cas.config.CasCoreTicketsConfiguration; import org.apereo.cas.config.CasCoreTicketsSerializationConfiguration; import org.apereo.cas.config.CasCoreUtilConfiguration; import org.apereo.cas.config.CasCoreWebConfiguration; import org.apereo.cas.config.CasDefaultServiceTicketIdGeneratorsConfiguration; import org.apereo.cas.config.CasPersonDirectoryConfiguration; import org.apereo.cas.config.CasRegisteredServicesTestConfiguration; import org.apereo.cas.config.CouchbaseAuthenticationConfiguration; import org.apereo.cas.config.CouchbasePersonDirectoryConfiguration; import org.apereo.cas.config.support.CasWebApplicationServiceFactoryConfiguration; import org.apereo.cas.logout.config.CasCoreLogoutConfiguration; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.aop.AopAutoConfiguration; import org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration; import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration; import org.springframework.context.annotation.Import; /** * This is {@link AbstractCouchbaseTests}. * * @author Misagh Moayyed * @since 6.3.0 * @deprecated Since 7.0.0 */ @Deprecated(since = "7.0.0") public abstract class AbstractCouchbaseTests { @ImportAutoConfiguration({ RefreshAutoConfiguration.class, MailSenderAutoConfiguration.class, AopAutoConfiguration.class }) @SpringBootConfiguration @Import({ CouchbaseAuthenticationConfiguration.class, CouchbasePersonDirectoryConfiguration.class, CasCoreConfiguration.class, CasCoreTicketsConfiguration.class, CasCoreLogoutConfiguration.class, CasCoreServicesConfiguration.class, CasCoreTicketIdGeneratorsConfiguration.class, CasCoreTicketsSerializationConfiguration.class, CasCoreTicketCatalogConfiguration.class, CasCoreAuthenticationConfiguration.class, CasCoreAuthenticationSupportConfiguration.class, CasCoreAuthenticationServiceSelectionStrategyConfiguration.class, CasCoreHttpConfiguration.class, CasCoreNotificationsConfiguration.class, CasCoreWebConfiguration.class, CasPersonDirectoryConfiguration.class, CasCoreUtilConfiguration.class, CasRegisteredServicesTestConfiguration.class, CasWebApplicationServiceFactoryConfiguration.class, CasAuthenticationEventExecutionPlanTestConfiguration.class, CasDefaultServiceTicketIdGeneratorsConfiguration.class, CasCoreAuthenticationPrincipalConfiguration.class }) public static class SharedTestConfiguration { } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
1fe09b9b0abc192331349336b5d1e1e779169a40
56456387c8a2ff1062f34780b471712cc2a49b71
/android/support/design/widget/i.java
80cf70836be0d1026c81280518c9894a69ef8c21
[]
no_license
nendraharyo/presensimahasiswa-sourcecode
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
890fc86782e9b2b4748bdb9f3db946bfb830b252
refs/heads/master
2020-05-21T11:21:55.143420
2019-05-10T19:03:56
2019-05-10T19:03:56
186,022,425
1
0
null
null
null
null
UTF-8
Java
false
false
5,762
java
package android.support.design.widget; import android.content.Context; import android.graphics.Rect; import android.support.v4.e.a; import android.support.v4.view.d; import android.support.v4.view.r; import android.support.v4.view.z; import android.util.AttributeSet; import android.view.View; import android.view.View.MeasureSpec; import android.view.ViewGroup.LayoutParams; import java.util.List; abstract class i extends p { final Rect a; final Rect b; private int c; private int d; public i() { Rect localRect = new android/graphics/Rect; localRect.<init>(); this.a = localRect; localRect = new android/graphics/Rect; localRect.<init>(); this.b = localRect; this.c = 0; } public i(Context paramContext, AttributeSet paramAttributeSet) { super(paramContext, paramAttributeSet); Rect localRect = new android/graphics/Rect; localRect.<init>(); this.a = localRect; localRect = new android/graphics/Rect; localRect.<init>(); this.b = localRect; this.c = 0; } private static int c(int paramInt) { if (paramInt == 0) { paramInt = 8388659; } return paramInt; } float a(View paramView) { return 1.0F; } final int a() { return this.c; } public boolean a(CoordinatorLayout paramCoordinatorLayout, View paramView, int paramInt1, int paramInt2, int paramInt3, int paramInt4) { int i = -1; int j = 1; Object localObject = paramView.getLayoutParams(); int k = ((ViewGroup.LayoutParams)localObject).height; View localView; boolean bool; if (k != i) { int m = -2; if (k != m) {} } else { localObject = paramCoordinatorLayout.c(paramView); localView = b((List)localObject); if (localView != null) { bool = r.p(localView); if (bool) { bool = r.p(paramView); if (!bool) { r.b(paramView, j); bool = r.p(paramView); if (bool) { paramView.requestLayout(); bool = j; } } } } } for (;;) { return bool; int n = View.MeasureSpec.getSize(paramInt3); if (n == 0) { n = paramCoordinatorLayout.getHeight(); } int i1 = localView.getMeasuredHeight(); n -= i1; int i2 = b(localView) + n; if (k == i) {} for (n = 1073741824;; n = -1 << -1) { i = View.MeasureSpec.makeMeasureSpec(i2, n); localObject = paramCoordinatorLayout; i2 = paramInt1; i1 = paramInt2; paramCoordinatorLayout.a(paramView, paramInt1, paramInt2, i, paramInt4); n = j; break; } n = 0; localObject = null; } } int b(View paramView) { return paramView.getMeasuredHeight(); } abstract View b(List paramList); public final void b(int paramInt) { this.d = paramInt; } protected void b(CoordinatorLayout paramCoordinatorLayout, View paramView, int paramInt) { Object localObject = paramCoordinatorLayout.c(paramView); View localView = b((List)localObject); int i2; if (localView != null) { localObject = (CoordinatorLayout.e)paramView.getLayoutParams(); Rect localRect1 = this.a; int i = paramCoordinatorLayout.getPaddingLeft(); int j = ((CoordinatorLayout.e)localObject).leftMargin; i += j; j = localView.getBottom(); int m = ((CoordinatorLayout.e)localObject).topMargin; j += m; m = paramCoordinatorLayout.getWidth(); int n = paramCoordinatorLayout.getPaddingRight(); m -= n; n = ((CoordinatorLayout.e)localObject).rightMargin; m -= n; n = paramCoordinatorLayout.getHeight(); int i1 = localView.getBottom(); n += i1; i1 = paramCoordinatorLayout.getPaddingBottom(); n -= i1; i1 = ((CoordinatorLayout.e)localObject).bottomMargin; n -= i1; localRect1.set(i, j, m, n); z localz = paramCoordinatorLayout.getLastWindowInsets(); if (localz != null) { boolean bool = r.p(paramCoordinatorLayout); if (bool) { bool = r.p(paramView); if (!bool) { k = localRect1.left; m = localz.a(); k += m; localRect1.left = k; k = localRect1.right; i = localz.c(); i = k - i; localRect1.right = i; } } } Rect localRect2 = this.b; i2 = c(((CoordinatorLayout.e)localObject).c); i = paramView.getMeasuredWidth(); int k = paramView.getMeasuredHeight(); n = paramInt; d.a(i2, i, k, localRect1, localRect2, paramInt); i2 = c(localView); i = localRect2.left; k = localRect2.top - i2; int i3 = localRect2.right; n = localRect2.bottom; i2 = n - i2; paramView.layout(i, k, i3, i2); i2 = localRect2.top; i = localView.getBottom(); i2 -= i; } for (this.c = i2;; this.c = 0) { return; super.b(paramCoordinatorLayout, paramView, paramInt); i2 = 0; localObject = null; } } final int c(View paramView) { int i = 0; int j = this.d; if (j == 0) {} for (;;) { return i; float f1 = a(paramView); float f2 = this.d; f1 *= f2; j = (int)f1; int k = this.d; i = a.a(j, 0, k); } } public final int d() { return this.d; } } /* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\android\support\design\widget\i.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "haryo.nendra@gmail.com" ]
haryo.nendra@gmail.com
34ce833af59cdf020df36aacb14c2ad304d69881
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/hazelcast/internal/serialization/impl/SerializationUtilTest.java
141bc725e8e228ea1367b3bcbb94cb5f6e52d0b1
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,999
java
/** * Copyright (c) 2008-2019, 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.internal.serialization.impl; import com.hazelcast.nio.serialization.PortableReader; import com.hazelcast.nio.serialization.PortableWriter; import com.hazelcast.nio.serialization.Serializer; import com.hazelcast.nio.serialization.VersionedPortable; import com.hazelcast.test.HazelcastParallelClassRunner; import com.hazelcast.test.annotation.ParallelTest; import com.hazelcast.test.annotation.QuickTest; import java.io.IOException; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @RunWith(HazelcastParallelClassRunner.class) @Category({ QuickTest.class, ParallelTest.class }) public class SerializationUtilTest { @Test public void testIsNullData() { Assert.assertTrue(SerializationUtil.isNullData(new HeapData())); } @Test(expected = Error.class) public void testHandleException_OOME() { SerializationUtil.handleException(new OutOfMemoryError()); } @Test(expected = Error.class) public void testHandleException_otherError() { SerializationUtil.handleException(new UnknownError()); } @Test(expected = IllegalArgumentException.class) public void testCreateSerializerAdapter_invalidSerializer() { SerializationUtil.createSerializerAdapter(new SerializationUtilTest.InvalidSerializer(), null); } @Test(expected = IllegalArgumentException.class) public void testGetPortableVersion_negativeVersion() { SerializationUtil.getPortableVersion(new SerializationUtilTest.DummyVersionedPortable(), 1); } private class InvalidSerializer implements Serializer { @Override public int getTypeId() { return 0; } @Override public void destroy() { } } private class DummyVersionedPortable implements VersionedPortable { @Override public int getClassVersion() { return -1; } @Override public int getFactoryId() { return 0; } @Override public int getClassId() { return 0; } @Override public void writePortable(PortableWriter writer) throws IOException { } @Override public void readPortable(PortableReader reader) throws IOException { } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
d9eda89a90f9321688408929020399ee80d155a5
2bccf90697735f2a930dbf0fba261f7f2b424399
/com.io7m.jsamplebuffer.api/src/main/java/com/io7m/jsamplebuffer/api/SampleBufferType.java
5116e006ffe49d53aa54216070cd75a2bcd2607b
[]
no_license
io7m/jsamplebuffer
5568fe121ca9d9839773549308dfbdac33423beb
2da582efb78aa15acd5f7ee4636cc8792daf1ccb
refs/heads/master
2023-08-31T00:14:24.702367
2023-02-25T09:59:45
2023-02-25T09:59:45
168,845,028
0
0
null
null
null
null
UTF-8
Java
false
false
2,505
java
/* * Copyright © 2019 Mark Raynsford <code@io7m.com> https://www.io7m.com * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package com.io7m.jsamplebuffer.api; /** * <p>A readable and writable sample buffer.</p> * * <p>All methods that take sample/frame indices as arguments throw {@code * com.io7m.jranges.RangeCheckException} exceptions if the indices are out of * range.</p> */ public interface SampleBufferType extends SampleBufferReadableType { /** * Set the value of frame {@code index}. If the underlying buffer contains * more than one channel, then the given value is inserted into all channels * in the frame. * * @param index The frame index * @param value The input */ void frameSetAll( long index, double value); /** * Set the value of frame {@code index}. * * @param index The frame index * @param c0 The input for channel 0 * * @throws IllegalArgumentException If {@code channels() != 1} */ void frameSetExact( long index, double c0) throws IllegalArgumentException; /** * Set the value of frame {@code index}. * * @param index The frame index * @param c0 The input for channel 0 * @param c1 The input for channel 1 * * @throws IllegalArgumentException If {@code channels() != 2} */ void frameSetExact( long index, double c0, double c1) throws IllegalArgumentException; /** * Set the value of frame {@code index}. The input value is assumed to contain * one sample for each of the channels in the frame. * * @param index The frame index * @param value The input * * @throws IllegalArgumentException If {@code value.length != channels()} */ void frameSetExact( long index, double[] value) throws IllegalArgumentException; }
[ "code@io7m.com" ]
code@io7m.com
e5cffa854e2c8828b6f21822123a2eeb0a924992
22fbb6008ed25cd093d585e227271e733a9c1735
/greeting-service/src/main/java/io/openshift/booster/GreetingEndpoint.java
3491f0e23b30f61d05fcab7d47844a4d6c705fbf
[ "Apache-2.0" ]
permissive
sberyozkin/wfswarm-circuit-breaker
cb6a57adf59e279e8ffd36780b596ba05f0b267e
b0df230811dcce2b7fc40aadef97bb3ae1809bc2
refs/heads/master
2021-01-24T12:36:46.841191
2018-10-18T13:18:28
2018-10-19T09:51:53
123,141,971
0
0
Apache-2.0
2018-02-27T14:38:14
2018-02-27T14:38:14
null
UTF-8
Java
false
false
1,721
java
/* * * Copyright 2016-2017 Red Hat, Inc, and individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package io.openshift.booster; import java.time.LocalTime; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.client.Client; /** * * @author Martin Kouba */ @Path("/") public class GreetingEndpoint { @Inject Client client; @GET @Path("/greeting") @Produces("application/json") public Greeting greeting() { NameCommand command = new NameCommand(client); Greeting greeting = new Greeting(String.format("Hello, %s!", command.execute())); CircuitBreakerWebSocketEndpoint.send("isOpen:" + command.isCircuitBreakerOpen()); return greeting; } static class Greeting { private final String content; private final String time; public Greeting(String content) { this.content = content; this.time = LocalTime.now().toString(); } public String getContent() { return content; } public String getTime() { return time; } } }
[ "mkouba@redhat.com" ]
mkouba@redhat.com
2b32ef75fd1e7c00cfe8616176002bd8ed8160f4
db97ce70bd53e5c258ecda4c34a5ec641e12d488
/src/main/java/com/alipay/api/response/AlipayOpenMiniAmpeCategoryBatchqueryResponse.java
5e159f3d85c696b436fbb032357b6749f17e1e9c
[ "Apache-2.0" ]
permissive
smitzhang/alipay-sdk-java-all
dccc7493c03b3c937f93e7e2be750619f9bed068
a835a9c91e800e7c9350d479e84f9a74b211f0c4
refs/heads/master
2022-11-23T20:32:27.041116
2020-08-03T13:03:02
2020-08-03T13:03:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
909
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.AmpeCategoryInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.mini.ampe.category.batchquery response. * * @author auto create * @since 1.0, 2020-07-14 14:37:25 */ public class AlipayOpenMiniAmpeCategoryBatchqueryResponse extends AlipayResponse { private static final long serialVersionUID = 6859474944366226596L; /** * 可选行业列表 */ @ApiListField("category_list") @ApiField("ampe_category_info") private List<AmpeCategoryInfo> categoryList; public void setCategoryList(List<AmpeCategoryInfo> categoryList) { this.categoryList = categoryList; } public List<AmpeCategoryInfo> getCategoryList( ) { return this.categoryList; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
71c67bcbcbb78be0ee47a7bff5bd6f968bc85a2a
3feb42c2809a5fb2f63093148d97949060eff7a5
/mis/ecs-domain/src/main/java/cn/com/sinosoft/domain/system/GePermission.java
8e77542bd777a6d2ea260cca28613fff97bab7f0
[]
no_license
YiliaYilia/JXD-P
d9ddd40b171e7e6b0689906a878d2c8823367cd9
ec203fedf7fc6fa94317a821578804198e6425be
refs/heads/master
2021-03-06T20:11:11.611501
2019-11-24T05:27:56
2019-11-24T05:27:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,597
java
package cn.com.sinosoft.domain.system; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OrderBy; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.hibernate.annotations.GenericGenerator; /** * GePermission entity. @author MyEclipse Persistence Tools */ @Entity @Table(name = "ge_permission") public class GePermission implements java.io.Serializable { // Fields private String permissionid; private String permissionname; private String permissiondatadesc; private Date permissioncreatetime; private String operatorname; private Set<GeRole> geRoles = new HashSet<GeRole>(0); private Set<GeResources> geResources = new HashSet<GeResources>(0); // Constructors /** default constructor */ public GePermission() { } /** minimal constructor */ public GePermission(String permissionid, String permissionname, Date createtime) { this.permissionid = permissionid; this.permissionname = permissionname; this.permissioncreatetime = createtime; } /** full constructor */ public GePermission(String permissionid, String permissionname, String permissiondesc, Date createtime) { this.permissionid = permissionid; this.permissionname = permissionname; this.permissiondatadesc = permissiondesc; this.permissioncreatetime = createtime; } // Property accessors @Id @GenericGenerator(name = "idGenerator", strategy = "uuid") @GeneratedValue(generator = "idGenerator") @Column(name = "PERMISSIONID", unique = true, nullable = false) public String getPermissionid() { return this.permissionid; } public void setPermissionid(String permissionid) { this.permissionid = permissionid; } @Column(name = "PERMISSIONNAME", nullable = false) public String getPermissionname() { return this.permissionname; } public void setPermissionname(String permissionname) { this.permissionname = permissionname; } @Column(name = "PERMISSIONDESC") public String getPermissiondatadesc() { return this.permissiondatadesc; } public void setPermissiondatadesc(String permissiondesc) { this.permissiondatadesc = permissiondesc; } // @Column(name = "CREATETIME", nullable = false, length = 8) public Date getPermissioncreatetime() { return this.permissioncreatetime; } public void setPermissioncreatetime(Date createtime) { this.permissioncreatetime = createtime; } @Column(name = "OPERATORNAME", nullable = false) public String getOperatorname() { return operatorname; } public void setOperatorname(String operatorname) { this.operatorname = operatorname; } @ManyToMany(cascade=CascadeType.MERGE,fetch=FetchType.LAZY,mappedBy="gePermissions") public Set<GeRole> getGeRoles() { return geRoles; } public void setGeRoles(Set<GeRole> geRoles) { this.geRoles = geRoles; } @ManyToMany(cascade=CascadeType.MERGE,fetch=FetchType.LAZY) @JoinTable(name="ge_permission_resources",joinColumns={@JoinColumn(name="PERMISSIONID")}, inverseJoinColumns={@JoinColumn(name="RESOURCESID")}) @OrderBy("resourcesid ASC") public Set<GeResources> getGeResources() { return geResources; } public void setGeResources(Set<GeResources> geResources) { this.geResources = geResources; } }
[ "1264566874@qq.com" ]
1264566874@qq.com
f8866df6291f69ad17d595bd2624fc2c7da5f357
b0296d820c0400440232152485a0b3dff3e943be
/PDIPAppServices/GridForm/src/com/gridnode/pdip/app/gridform/xml/LayoutTemplateReader.java
e0772bab68f6a57c62607ab65d0d01914b136da2
[]
no_license
andytanoko/4.2.x_integration
74536c8933a98373b0118eeac66678b72b00aa8e
984842d92abaa797a19bd0f002ec45c9c37da288
refs/heads/master
2021-01-10T13:46:58.824451
2015-09-23T10:41:25
2015-09-23T10:41:25
46,325,977
0
1
null
null
null
null
UTF-8
Java
false
false
2,273
java
/** * This software is the proprietary information of GridNode Pte Ltd. * Use is subjected to license terms. * * Copyright 2001-2002 (C) GridNode Pte Ltd. All Rights Reserved. * * File: LayoutTemplateReader.java * **************************************************************************** * Date Author Changes **************************************************************************** * May 22 2002 Jared Low Created. * Jun 10 2002 Daniel D'Cotta Added functionality to return W3C Document */ package com.gridnode.pdip.app.gridform.xml; import com.gridnode.pdip.app.gridform.model.LayoutTemplate; import org.jdom.*; import org.jdom.input.*; import org.jdom.output.*; import javax.xml.parsers.*; import java.io.*; /** * Reader for parsing the layout template file. The template must be in XHTML * format, thus a well formed XML document. * * Scope is package level. Use <code>XMLFacade</code> instead. * * @version 2.0 * @since 2.0 * @author Jared Low */ class LayoutTemplateReader { private static final String PARSER = "org.apache.xerces.parsers.SAXParser"; public LayoutTemplateReader() { } public LayoutTemplate loadTemplate(File file) throws JDOMException, IOException { SAXBuilder b = new SAXBuilder(PARSER); Document doc = b.build(file); LayoutTemplate template = new LayoutTemplate(); template.setDocument(doc); template.parseDocument(); return template; } public String generateString(LayoutTemplate template) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLOutputter outputter = new XMLOutputter(); outputter.output(template.getDocument().getRootElement(), baos); return baos.toString(); } // 20020610 DDJ: Added method public org.w3c.dom.Document generateW3CDocument(LayoutTemplate template) throws org.jdom.JDOMException { org.jdom.Document jdomDoc = template.getDocument(); org.w3c.dom.Document w3cDoc = convertToDOM(jdomDoc); return w3cDoc; } // 20020610 DDJ: Added method protected org.w3c.dom.Document convertToDOM(org.jdom.Document jdomDoc) throws JDOMException { DOMOutputter outputter = new DOMOutputter(); return outputter.output(jdomDoc); } }
[ "muhamadnazir@gmail.com" ]
muhamadnazir@gmail.com
30196778204d2266c478ff481038a454f8fac804
05102319b57b59ac4c72296f126e7deab8aa4285
/src/main/java/net/imglib2/ops/relation/general/binary/AndRelation.java
9c915ef0308cc6827ca2985eb397d6fd790f5e45
[ "BSD-2-Clause" ]
permissive
imagej/imagej-deprecated
2874c811f0ac1056785903d337542a7745d53127
484e5885a23cdc43a746f08fbae6823dfda88d61
refs/heads/master
2023-09-05T17:46:38.321427
2023-04-21T21:21:42
2023-04-21T21:21:42
42,454,800
0
2
BSD-2-Clause
2023-04-21T21:19:58
2015-09-14T14:45:39
Java
UTF-8
Java
false
false
2,357
java
/* * #%L * ImageJ2 software for multidimensional image processing and analysis. * %% * Copyright (C) 2009 - 2023 ImageJ2 developers. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * #L% */ package net.imglib2.ops.relation.general.binary; import net.imglib2.ops.relation.BinaryRelation; /** * Combines two other {@link BinaryRelation}s in an AND fashion. The relation * holds if both of the child relations hold. * * @author Barry DeZonia * @deprecated Use net.imagej.ops instead. */ @Deprecated public final class AndRelation<T,U> implements BinaryRelation<T,U> { // -- instance variables -- private final BinaryRelation<T,U> rel1; private final BinaryRelation<T,U> rel2; // -- constructor -- public AndRelation(BinaryRelation<T,U> rel1,BinaryRelation<T,U> rel2) { this.rel1 = rel1; this.rel2 = rel2; } // -- BinaryRelation methods -- @Override public boolean holds(T val1, U val2) { return rel1.holds(val1, val2) && rel2.holds(val1, val2); } @Override public AndRelation<T,U> copy() { return new AndRelation<T,U>(rel1.copy(), rel2.copy()); } }
[ "ctrueden@wisc.edu" ]
ctrueden@wisc.edu
65d01387516bad2eb5c482d02ce5ed2c560ae3f3
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app99/source/org/apache/http/impl/EnglishReasonPhraseCatalogHC4.java
70d20e9dddc8d035cbfda5b1d9b369416a00665b
[ "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
3,092
java
package org.apache.http.impl; import java.util.Locale; import org.apache.http.ReasonPhraseCatalog; import org.apache.http.annotation.Immutable; import org.apache.http.util.Args; @Immutable public class EnglishReasonPhraseCatalogHC4 implements ReasonPhraseCatalog { public static final EnglishReasonPhraseCatalogHC4 INSTANCE = new EnglishReasonPhraseCatalogHC4(); private static final String[][] REASON_PHRASES = { null, new String[3], new String[8], new String[8], new String[25], new String[8] }; static { setReason(200, "OK"); setReason(201, "Created"); setReason(202, "Accepted"); setReason(204, "No Content"); setReason(301, "Moved Permanently"); setReason(302, "Moved Temporarily"); setReason(304, "Not Modified"); setReason(400, "Bad Request"); setReason(401, "Unauthorized"); setReason(403, "Forbidden"); setReason(404, "Not Found"); setReason(500, "Internal Server Error"); setReason(501, "Not Implemented"); setReason(502, "Bad Gateway"); setReason(503, "Service Unavailable"); setReason(100, "Continue"); setReason(307, "Temporary Redirect"); setReason(405, "Method Not Allowed"); setReason(409, "Conflict"); setReason(412, "Precondition Failed"); setReason(413, "Request Too Long"); setReason(414, "Request-URI Too Long"); setReason(415, "Unsupported Media Type"); setReason(300, "Multiple Choices"); setReason(303, "See Other"); setReason(305, "Use Proxy"); setReason(402, "Payment Required"); setReason(406, "Not Acceptable"); setReason(407, "Proxy Authentication Required"); setReason(408, "Request Timeout"); setReason(101, "Switching Protocols"); setReason(203, "Non Authoritative Information"); setReason(205, "Reset Content"); setReason(206, "Partial Content"); setReason(504, "Gateway Timeout"); setReason(505, "Http Version Not Supported"); setReason(410, "Gone"); setReason(411, "Length Required"); setReason(416, "Requested Range Not Satisfiable"); setReason(417, "Expectation Failed"); setReason(102, "Processing"); setReason(207, "Multi-Status"); setReason(422, "Unprocessable Entity"); setReason(419, "Insufficient Space On Resource"); setReason(420, "Method Failure"); setReason(423, "Locked"); setReason(507, "Insufficient Storage"); setReason(424, "Failed Dependency"); } protected EnglishReasonPhraseCatalogHC4() {} private static void setReason(int paramInt, String paramString) { int i = paramInt / 100; REASON_PHRASES[i][(paramInt - i * 100)] = paramString; } public String getReason(int paramInt, Locale paramLocale) { if ((paramInt >= 100) && (paramInt < 600)) {} for (boolean bool = true;; bool = false) { Args.check(bool, "Unknown category for status code " + paramInt); int i = paramInt / 100; paramInt -= i * 100; paramLocale = null; if (REASON_PHRASES[i].length > paramInt) { paramLocale = REASON_PHRASES[i][paramInt]; } return paramLocale; } } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
c868bfa70d9b2bd2e9f20bd5dded1bcd1a73eaf0
e5e048f1716e5d8e92023b6a9d4f80d9e6bd366b
/src/main/java/com/opengamma/analytics/financial/model/option/pricing/analytic/SupershareOptionModel.java
4cb659182d7959df85b30814788d7bc3ea609b93
[ "Apache-2.0" ]
permissive
jerome79/Analytics
e4dd03ae9d95a67f7ff36fb75bd5e268b87f2547
71ab1c7a88ed851c50a8de87af000155666f4894
refs/heads/master
2020-04-09T17:24:30.623733
2015-08-17T10:01:27
2015-08-17T10:01:27
42,441,934
1
0
null
2015-09-14T10:19:57
2015-09-14T10:19:56
null
UTF-8
Java
false
false
2,395
java
/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.model.option.pricing.analytic; import com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle; import com.opengamma.analytics.financial.model.option.definition.SupershareOptionDefinition; import com.opengamma.analytics.math.function.Function1D; import com.opengamma.analytics.math.statistics.distribution.NormalDistribution; import com.opengamma.analytics.math.statistics.distribution.ProbabilityDistribution; import com.opengamma.strata.collect.ArgChecker; /** * Class for pricing supershare options (see {@link SupershareOptionDefinition}). * <p> * The price is calculated using the formula: * $$ * \begin{align*} * w = \frac{S e^{(b-r)T}}{K_L}(N(d_1) - N(d_2)) * \end{align*} * $$ * where * $$ * \begin{align*} * d_1 &= \frac{\ln{\frac{S}{K_L}} + (b + \frac{\sigma^2}{2})T}{\sigma\sqrt{T}}\\ * d_2 &= \frac{\ln{\frac{S}{K_H}} + (b + \frac{\sigma^2}{2})T}{\sigma\sqrt{T}} * \end{align*} * $$ * */ public class SupershareOptionModel extends AnalyticOptionModel<SupershareOptionDefinition, StandardOptionDataBundle> { private static final ProbabilityDistribution<Double> NORMAL = new NormalDistribution(0, 1); /** * {@inheritDoc} */ @Override public Function1D<StandardOptionDataBundle, Double> getPricingFunction(final SupershareOptionDefinition definition) { ArgChecker.notNull(definition, "definition"); return new Function1D<StandardOptionDataBundle, Double>() { @SuppressWarnings("synthetic-access") @Override public Double evaluate(final StandardOptionDataBundle data) { ArgChecker.notNull(data, "data"); final double s = data.getSpot(); final double t = definition.getTimeToExpiry(data.getDate()); final double r = data.getInterestRate(t); final double b = data.getCostOfCarry(); final double lower = definition.getLowerBound(); final double upper = definition.getUpperBound(); final double sigma = data.getVolatility(t, lower); final double d1 = getD1(s, lower, t, sigma, b); final double d2 = getD1(s, upper, t, sigma, b); return s * Math.exp(t * (b - r)) * (NORMAL.getCDF(d1) - NORMAL.getCDF(d2)) / lower; } }; } }
[ "stephen@opengamma.com" ]
stephen@opengamma.com
f446f6922951b51a74c9289b012bff5740cb03f2
28570940f9dee73dee7a086fcd8b32f2a861b794
/app/src/main/java/com/yst/onecity/adapter/SpinnerAdapter.java
c1cba7af6406dd248d8248fa3f7593eaf4ad1b9b
[]
no_license
luxc1992/OptimalWorking
b0b0ec1eab68b02de826a6efe5b21769ed1a532b
434a23c09a30b909f4e85e729b6de92f78306cd6
refs/heads/master
2020-05-18T04:58:12.369288
2019-04-30T06:55:08
2019-04-30T06:55:08
184,185,029
4
0
null
null
null
null
UTF-8
Java
false
false
1,620
java
package com.yst.onecity.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.yst.onecity.R; import java.util.ArrayList; import java.util.List; /** * @author zhaiyanwu * @version v3.0.1 * @date 2018/2/26. */ public class SpinnerAdapter extends BaseAdapter { List<String> datas = new ArrayList<>(); Context mContext; public SpinnerAdapter(Context context) { this.mContext = context; } public void setDatas(List<String> datas) { this.datas = datas; notifyDataSetChanged(); } @Override public int getCount() { return datas==null?0:datas.size(); } @Override public Object getItem(int position) { return datas==null?null:datas.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHodler hodler = null; if (convertView == null) { hodler = new ViewHodler(); convertView = LayoutInflater.from(mContext).inflate(R.layout.item_spinner, null); hodler.mTextView = (TextView) convertView; convertView.setTag(hodler); } else { hodler = (ViewHodler) convertView.getTag(); } hodler.mTextView.setText(datas.get(position)); return convertView; } private static class ViewHodler{ TextView mTextView; } }
[ "15942932581@163.com" ]
15942932581@163.com
95e0b666c0f45349fbad88a58b664693b31e0e1f
8c2e243ce8bcfce4f67c50c7ba6340e874633cda
/com/google/android/gms/location/zzw.java
c5c05980d3bf66a880f22429e1bbf344bceed095
[]
no_license
atresumes/Tele-2
f84a095a48ccd5b423acf14268e600fc59635a36
e98d32baab40b8dfc7f2c30d165b73393a1b0dd9
refs/heads/master
2020-03-21T11:22:20.490680
2018-06-24T17:45:25
2018-06-24T17:45:25
138,503,432
0
1
null
null
null
null
UTF-8
Java
false
false
3,186
java
package com.google.android.gms.location; import android.app.PendingIntent; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zzb; import com.google.android.gms.common.internal.safeparcel.zzb.zza; import com.google.android.gms.common.internal.safeparcel.zzc; import java.util.List; public class zzw implements Creator<zzv> { static void zza(zzv com_google_android_gms_location_zzv, Parcel parcel, int i) { int zzaV = zzc.zzaV(parcel); zzc.zzb(parcel, 1, com_google_android_gms_location_zzv.zzHy(), false); zzc.zza(parcel, 2, com_google_android_gms_location_zzv.zzuT(), i, false); zzc.zza(parcel, 3, com_google_android_gms_location_zzv.getTag(), false); zzc.zzc(parcel, 1000, com_google_android_gms_location_zzv.getVersionCode()); zzc.zzJ(parcel, zzaV); } public /* synthetic */ Object createFromParcel(Parcel parcel) { return zzgO(parcel); } public /* synthetic */ Object[] newArray(int i) { return zzkm(i); } public zzv zzgO(Parcel parcel) { PendingIntent pendingIntent = null; int zzaU = zzb.zzaU(parcel); int i = 0; String str = ""; List list = null; while (parcel.dataPosition() < zzaU) { int i2; String str2; PendingIntent pendingIntent2; List list2; int zzaT = zzb.zzaT(parcel); String str3; switch (zzb.zzcW(zzaT)) { case 1: i2 = i; PendingIntent pendingIntent3 = pendingIntent; Object zzE = zzb.zzE(parcel, zzaT); str2 = str; pendingIntent2 = pendingIntent3; break; case 2: list2 = list; i2 = i; str3 = str; pendingIntent2 = (PendingIntent) zzb.zza(parcel, zzaT, PendingIntent.CREATOR); str2 = str3; break; case 3: str2 = zzb.zzq(parcel, zzaT); pendingIntent2 = pendingIntent; list2 = list; i2 = i; break; case 1000: str3 = str; pendingIntent2 = pendingIntent; list2 = list; i2 = zzb.zzg(parcel, zzaT); str2 = str3; break; default: zzb.zzb(parcel, zzaT); str2 = str; pendingIntent2 = pendingIntent; list2 = list; i2 = i; break; } i = i2; list = list2; pendingIntent = pendingIntent2; str = str2; } if (parcel.dataPosition() == zzaU) { return new zzv(i, list, pendingIntent, str); } throw new zza("Overread allowed size end=" + zzaU, parcel); } public zzv[] zzkm(int i) { return new zzv[i]; } }
[ "40494744+atresumes@users.noreply.github.com" ]
40494744+atresumes@users.noreply.github.com
3381ab928f0ca2d1ea99d69984cda77332dfa5cc
c89d945bf82472d5e2d4c449e0697d9d48fd9fda
/blade-core/src/main/java/com/blade/ioc/loader/IocAnnotationLoader.java
30a9ec184f1773c4e5166bb8702ca49bed0aa015
[ "Apache-2.0" ]
permissive
wenzhenxing/blade
374f406143ce706bbbc33a4916648cb4a16f0436
546acf76176f54eb28b10d2644c2f4bf3991efa7
refs/heads/master
2020-04-07T21:29:06.957563
2016-02-24T07:51:11
2016-02-24T07:51:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,451
java
/** * Copyright (c) 2016, biezhi 王爵 (biezhi.me@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.blade.ioc.loader; import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import com.blade.ioc.SampleIoc; import com.blade.ioc.annotation.Component; import blade.kit.resource.ClassPathClassReader; import blade.kit.resource.ClassReader; public final class IocAnnotationLoader implements IocLoader { private Collection<Class<?>> classes; private ClassReader classReader = new ClassPathClassReader(); public IocAnnotationLoader(String... packageNames) { List<Class<? extends Annotation>> annotations = new ArrayList<Class<? extends Annotation>>(1); annotations.add(Component.class); this.classes = finder(Arrays.asList(packageNames), annotations, true); } private Collection<Class<?>> finder(List<String> packageNames, List<Class<? extends Annotation>> annotations, boolean recursive){ Collection<Class<?>> classes = new ArrayList<Class<?>>(); for(String packageName : packageNames){ for(Class<? extends Annotation> annotation : annotations){ classes.addAll(classReader.getClassByAnnotation(packageName, annotation, recursive)); } } return classes; } public IocAnnotationLoader(Collection<Class<?>> classes) { this.classes = classes; } @Override public void load(SampleIoc ioc) { for (Class<?> cls : classes) { Component anno = cls.getAnnotation(Component.class); if (anno != null) { String name = anno.value().equals("") ? cls.getName() : anno.value(); ioc.addBean(name, cls, anno.singleton()); } } // free classes = null; } }
[ "biezhi.me@gmail.com" ]
biezhi.me@gmail.com
703254c5cc82584b238a59cfbb424220afe5c945
0e13da505af96d79a1f76d235aeaaa42800d93f8
/src/main/java/com/youzan/open/sdk/client/oauth/types/AuthorizationCode.java
c0acee8dd2f048bae8e956456ab260879c15949d
[]
no_license
giagiigi/youzan-sdk
430462c65463cd3efcb94cf81efc8a26fc81fa43
96e0695dbe86f1e885ca2d215552bf0fa43b90f0
refs/heads/master
2022-01-04T22:26:03.823201
2019-03-25T07:13:19
2019-03-25T07:13:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,002
java
package com.youzan.open.sdk.client.oauth.types; import com.fasterxml.jackson.core.type.TypeReference; import com.youzan.open.sdk.api.APIFactory; import com.youzan.open.sdk.client.oauth.OAuthFactory; import com.youzan.open.sdk.client.oauth.model.OAuthToken; import com.youzan.open.sdk.exception.KDTException; import com.youzan.open.sdk.util.http.DefaultHttpClient; import com.youzan.open.sdk.util.http.HttpClient; import com.youzan.open.sdk.util.json.JsonUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ContentType; import java.awt.*; import java.net.URI; /** * @link https://open.youzan.com/docs/guide/3399/3417 */ public class AuthorizationCode extends AbstractOAuth { private String redirectUrl; private String state; private String code; public AuthorizationCode(String clientId, String clientSecret, String redirectUrl, String state) { super(clientId, clientSecret); this.redirectUrl = redirectUrl; this.state = state; } public AuthorizationCode(String clientId, String clientSecret, String redirectUrl, String state, String code) { super(clientId, clientSecret); this.redirectUrl = redirectUrl; this.state = state; this.code = code; } /** * 该方法将跳转到浏览器,code将传入回调地址的queryString上 * @return */ public void getCode() { if (!Desktop.isDesktopSupported()) { throw new KDTException("无桌面情况下不支持获取code,请手工获取code,详情参见:https://www.youzanyun.com/docs/guide/common/680"); } try { Desktop.getDesktop().browse(new URI(APIFactory.SERVICE_HOST + "/oauth/authorize?client_id=" + clientId + "&response_type=code&state=" + state +"&redirect_uri=" + redirectUrl)); } catch (Exception e) { throw new KDTException(e); } } public void setCode(String code) { this.code = code; } /** * 根据用户获取的授权code,获取token * @return */ public OAuthToken getToken() { if (StringUtils.isBlank(code)) { throw new KDTException("授权码不能为空,详见https://open.youzan.com/docs/guide/3399/3417"); } HttpClient httpClient = new DefaultHttpClient(); HttpClient.Params params = HttpClient.Params.custom() .add("client_id", clientId) .add("client_secret", clientSecret) .add("grant_type", "authorization_code") .add("code", code) .add("redirect_uri", redirectUrl) .setContentType(ContentType.APPLICATION_FORM_URLENCODED).build(); String resp = httpClient.post(OAuthFactory.SERVICE_HOST + "/oauth/token", params); if (StringUtils.isBlank(resp) || !resp.contains("access_token")) { throw new KDTException(resp); } return JsonUtils.toBean(resp, new TypeReference<OAuthToken>() { }); } }
[ "flyingkeke@qq.com" ]
flyingkeke@qq.com
0302549798ac99c27437cfb31690a21c0bb26c09
e2fc116abc589fecc9f292c14abc7d6d8e6c0726
/joy-design-pattern-yanmo/src/main/java/cn/javass/dp/factorymethod/example3/ExportTxtFileOperate.java
15c4e6774b7e5ac54dbd6961f63c003f7b054064
[]
no_license
joycgj/smc-multi-project
00d918f84ff61c5092b83a8a54f31e7f57ea34f4
1d72b47e7d6e876df711b2bdfe883ec89546cf97
refs/heads/master
2021-06-02T16:32:52.882168
2016-04-18T12:40:52
2016-04-18T12:40:52
20,757,048
0
1
null
null
null
null
UTF-8
Java
false
false
354
java
package cn.javass.dp.factorymethod.example3; /** * 具体的创建器实现对象,实现创建导出成文本文件格式的对象 */ public class ExportTxtFileOperate extends ExportOperate { @Override protected ExportFileApi factoryMethod() { //创建导出成文本文件格式的对象 return new ExportTxtFile(); } }
[ "gaojiechen@sohu-inc.com" ]
gaojiechen@sohu-inc.com
2bbca449b0b87fb9e8c7c98d2f47040b6dfc4b3f
d620ab67aa540c7d8466325a39f962fcf074bd06
/modules/petals-messaging/src/main/java/org/ow2/petals/messaging/framework/utils/ReaderInputStream.java
92d825e38d5ef84ac863c0cdec10a80a9d6e19d0
[]
no_license
chamerling/petals-dsb
fa8439f28bb4077a9324371d7eb691b484a12d24
58b355b79f4a4d753a3c762f619ec2b32833549a
refs/heads/master
2016-09-05T20:44:59.125937
2012-03-27T10:28:37
2012-03-27T10:28:37
3,722,608
0
1
null
null
null
null
UTF-8
Java
false
false
5,464
java
/** * PETALS: PETALS Services Platform Copyright (C) 2009 EBM WebSourcing * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * Initial developer(s): EBM WebSourcing */ package org.ow2.petals.messaging.framework.utils; import java.io.IOException; import java.io.InputStream; import java.io.Reader; /** * @author chamerling - eBM WebSourcing * */ public class ReaderInputStream extends InputStream { /** * The initial {@link Reader}. */ private final Reader reader; /** * As a buffer reads from a Reader is bigger than a buffer reads from an * InputStream, we need to keep characters read from the Reader and not * returned to the client. They are stored in this buffer. * */ private byte[] internalBuffer = null; private int internalBufferPos = 0; /** * The constructor. * * @param reader * The <code>Reader</code> to wrap. Not null. */ public ReaderInputStream(final Reader reader) { if (reader == null) { throw new IllegalArgumentException("Reader cannot be null."); } this.reader = reader; } /** * Returns available bytes in the internal buffer incremented by one if the * reader is ready (see {@link Reader#ready()}). * * @see java.io.InputStream#available() */ @Override public int available() throws IOException { if (this.reader.ready()) { // A next read on the reader can be done withoutto be blocked. // We do the read to check if a character is available or EOF is // expected final int availableChar = this.reader.read(); if (availableChar != -1) { // We push the read character in the internal buffer if (this.internalBuffer != null) { final byte[] newBuffer = new byte[this.internalBuffer.length + 1]; System.arraycopy(this.internalBuffer, 0, newBuffer, 0, this.internalBuffer.length); newBuffer[newBuffer.length - 1] = (byte) availableChar; this.internalBuffer = newBuffer; } else { this.internalBuffer = new String( new char[] { (char) availableChar }).getBytes(); this.internalBufferPos = 0; } } } return this.internalBuffer == null ? 0 : (this.internalBuffer.length - this.internalBufferPos); } @Override public void close() throws IOException { this.reader.close(); } @Override public boolean markSupported() { return false; } @Override public int read() throws IOException { byte[] buffer = new byte[1]; int nbByteRead = this.read(buffer); if (nbByteRead != 1) { throw new IOException("No byte read."); } return buffer[0]; } @Override public int read(final byte[] cbuf) throws IOException { return this.read(cbuf, 0, cbuf.length); } @Override public int read(final byte[] cbuf, final int off, final int len) throws IOException { return this.localRead(cbuf, off, len, false); } @Override public long skip(long n) throws IOException, IllegalArgumentException { if (n > Long.MAX_VALUE) { throw new IllegalArgumentException("Only value lesser " + Integer.MAX_VALUE + "are accepted."); } return this.localRead(null, 0, (int) n, true); } private int localRead(final byte[] buf, final int off, final int len, final boolean skip) throws IOException { int remainingLen = len; int offset = off; // First we read from the internal buffer int bytesToReadInInternalBuffer = this.internalBuffer == null ? 0 : Math.min(len, this.internalBuffer.length - this.internalBufferPos); if (bytesToReadInInternalBuffer > 0) { if (!skip) { System.arraycopy(this.internalBuffer, this.internalBufferPos, buf, offset, bytesToReadInInternalBuffer); } remainingLen -= bytesToReadInInternalBuffer; this.internalBufferPos += bytesToReadInInternalBuffer; } if (remainingLen > 0) { offset += bytesToReadInInternalBuffer; // We must complete the provided buffer with bytes read from the // reader final char[] cbuf = new char[remainingLen]; int charRead = this.reader.read(cbuf, 0, remainingLen); if (charRead == -1) { // EOF: No more character in the reader if (len == remainingLen) { // No bytes available --> EOF return -1; } else { // Few characters bytes have read from the internal buffer return len - remainingLen; } } else { this.internalBuffer = new String(cbuf, 0, charRead).getBytes(); this.internalBufferPos = 0; bytesToReadInInternalBuffer = Math.min(remainingLen, charRead); if (!skip) { System.arraycopy(this.internalBuffer, 0, buf, offset, bytesToReadInInternalBuffer); } this.internalBufferPos += bytesToReadInInternalBuffer; // Now the provided buffer should be full return bytesToReadInInternalBuffer; } } else { // No more bytes to read, the provided buffer is full return len; } } }
[ "christophe.hamerling@gmail.com" ]
christophe.hamerling@gmail.com
b50cd865d9fd8376257a540aab78002aa64a6065
17717446dcd5494dd353b1ac036fcb9f9affaee9
/src/test/java/com/amir/utilities/ExtentManager.java
66e0382811c266f13675a9713d5addfa70b90e07
[]
no_license
amir-1915/Flipkart-Automate-Exercise
fa7a979cb1364cceae1dfa3bbb96b413d2e6d156
f7de8612b821a56dedaa21f2a2fd2d22d0b17c4c
refs/heads/master
2023-08-04T00:50:23.176699
2019-11-06T18:53:22
2019-11-06T18:53:22
220,065,540
0
0
null
2023-07-22T20:51:43
2019-11-06T18:40:50
Java
UTF-8
Java
false
false
608
java
package com.amir.utilities; import java.io.File; import com.relevantcodes.extentreports.DisplayOrder; import com.relevantcodes.extentreports.ExtentReports; public class ExtentManager { private static ExtentReports extent; public static ExtentReports getInstance(){ if(extent==null){ extent = new ExtentReports(System.getProperty("user.dir")+"\\target\\surefire-reports\\html\\extent.html",true,DisplayOrder.OLDEST_FIRST); extent.loadConfig(new File(System.getProperty("user.dir")+"\\src\\test\\resources\\extentconfig\\ReportsConfig.xml")); } return extent; } }
[ "you@example.com" ]
you@example.com
1ffe4dd93c02f9e2fba5bc7e70c5b16179614730
6dd0af4748bc3db1176e638819f3089f0b26e918
/hi-ws/src/com/hh/xml/internal/xsom/impl/IdentityConstraintImpl.java
14d5cbef8ccd5987c1f98123f0c886c4a12f6057
[]
no_license
ngocdon0127/core-hiendm
df13debcc8f1d3dfc421b57bd149a95d2a4cd441
46421fbd1868625b0a1c7b1447d4f882e37e6257
refs/heads/master
2022-11-17T11:50:16.145719
2020-07-14T10:55:22
2020-07-14T10:55:22
279,256,530
0
0
null
2020-07-13T09:24:43
2020-07-13T09:24:42
null
UTF-8
Java
false
false
2,813
java
/* * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.hh.xml.internal.xsom.impl; import com.hh.xml.internal.xsom.XSElementDecl; import com.hh.xml.internal.xsom.XSIdentityConstraint; import com.hh.xml.internal.xsom.XSXPath; import com.hh.xml.internal.xsom.impl.parser.SchemaDocumentImpl; import com.hh.xml.internal.xsom.visitor.XSFunction; import com.hh.xml.internal.xsom.visitor.XSVisitor; import org.xml.sax.Locator; import java.util.Collections; import java.util.List; /** * {@link XSIdentityConstraint} implementation. * * @author Kohsuke Kawaguchi */ public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityConstraint, Ref.IdentityConstraint { private XSElementDecl parent; private final short category; private final String name; private final XSXPath selector; private final List<XSXPath> fields; private final Ref.IdentityConstraint refer; public IdentityConstraintImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, short category, String name, XPathImpl selector, List<XPathImpl> fields, Ref.IdentityConstraint refer) { super(_owner, _annon, _loc, fa); this.category = category; this.name = name; this.selector = selector; selector.setParent(this); this.fields = Collections.unmodifiableList((List)fields); for( XPathImpl xp : fields ) xp.setParent(this); this.refer = refer; } public void visit(XSVisitor visitor) { visitor.identityConstraint(this); } public <T> T apply(XSFunction<T> function) { return function.identityConstraint(this); } public void setParent(ElementDecl parent) { this.parent = parent; parent.getOwnerSchema().addIdentityConstraint(this); } public XSElementDecl getParent() { return parent; } public String getName() { return name; } public String getTargetNamespace() { return getParent().getTargetNamespace(); } public short getCategory() { return category; } public XSXPath getSelector() { return selector; } public List<XSXPath> getFields() { return fields; } public XSIdentityConstraint getReferencedKey() { if(category==KEYREF) return refer.get(); else throw new IllegalStateException("not a keyref"); } public XSIdentityConstraint get() { return this; } }
[ "truongnx25@viettel.com.vn" ]
truongnx25@viettel.com.vn
dc2196940410c672ab6423e81bf317737fe3d3e9
58afe8815f26dd6d9703d1cd9131fc7a4bdba09a
/predavanja/primeri-java/src/rs/math/oop1/z180304/filterMapReduce/z06/folksSumiranje/Folks.java
08aa8f13e0d58819f0fff138279b3be5cfd16190
[ "MIT" ]
permissive
MatfOOP/OOP
098213709417006ccb13519eea7208d9e6f32900
98eea2bb90c23973ad80c56dfcba42eaf1757b71
refs/heads/master
2023-07-07T01:34:49.955311
2023-06-30T17:13:48
2023-06-30T17:13:48
138,500,698
7
0
null
null
null
null
UTF-8
Java
false
false
490
java
package rs.math.oop1.z180304.filterMapReduce.z06.folksSumiranje; import java.util.List; import java.util.Arrays; public class Folks { public static final List<String> friends = Arrays.asList("Brian", "Nate", "Neal", "Raju", "Sara", "Scott"); public static final List<String> editors = Arrays.asList("Brian", "Jackie", "John", "Mike"); public static final List<String> comrades = Arrays.asList("Kate", "Ken", "Nick", "Paula", "Zach"); }
[ "vladofilipovic@hotmail.com" ]
vladofilipovic@hotmail.com
84d6ad7eb2a8b317c7948dad7780329d20797b01
1064c459df0c59a4fb169d6f17a82ba8bd2c6c1a
/trunk/jszju/src/main/java/com/jsict/jszju/form/FrontHeadForm.java
dd7d016db6c0e31d629e8bed65d4f0647462bc68
[]
no_license
BGCX261/zju-svn-to-git
ad87ed4a95cea540299df6ce2d68b34093bcaef7
549378a9899b303cb7ac24a4b00da465b6ccebab
refs/heads/master
2021-01-20T05:53:28.829755
2015-08-25T15:46:49
2015-08-25T15:46:49
41,600,366
0
0
null
null
null
null
UTF-8
Java
false
false
423
java
/** * frontHeadForm.java 2009-11-10 下午07:57:03 * caie * 版权所有 (c) 2007-2008 江苏鸿信系统集成有限公司 */ package com.jsict.jszju.form; import com.jsict.base.form.BaseForm; /** * <p>Description: [描述该类概要功能介绍]</p> * @author <a href="mailto: caie@jsict.com">作者中文名</a> * @version 1.0 */ public class FrontHeadForm extends BaseForm { }
[ "you@example.com" ]
you@example.com
b5b589fca2517807678c803f81e00bfd06dda8d3
4d593b6dd55576e7d2301dfc91980442c872f882
/src/main/java/me/qyh/upload/server/UploadedResult.java
04a7d85ae266fc14d5d2c59e28c493837c7dfaa4
[]
no_license
lixinwei1230/blog
8ef2df69920cb10fcb1a7cc6b1436837327fd1bb
82e0cea0a180a09e95bb69ba7706bb13a0a7e2b0
refs/heads/master
2021-01-20T10:28:50.008297
2016-03-26T11:36:11
2016-03-26T11:36:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
951
java
package me.qyh.upload.server; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import me.qyh.bean.I18NMessage; public class UploadedResult implements Serializable { /** * */ private static final long serialVersionUID = 1L; private boolean success; private List<UploadedFile> files = new ArrayList<UploadedFile>(); private I18NMessage error; public void addFile(UploadedFile file){ files.add(file); } public List<UploadedFile> getFiles() { return files; } public void setFiles(List<UploadedFile> files) { this.files = files; } public UploadedResult() { super(); } public UploadedResult(boolean success) { this.success = success; } public I18NMessage getError() { return error; } public void setError(I18NMessage error) { this.error = error; } public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } }
[ "admin@qyh.me" ]
admin@qyh.me
6db9bfb7855e53f178393a275a90fa439eb3e8e4
89b54af238de94e87723a25fcde568a5aca010fb
/src/main/java/com/vdlogic/emr/domain/enumeration/ScheduleStatus.java
d09f84460d885a4481739f2ab5f01e5b4172854b
[]
no_license
kdhanarale/jhipster-sample-application
4127925435c513e5b1f619ea183be82ea9337b88
9639c6ebf3ad9cf952813f4d111ca150624e211e
refs/heads/master
2022-12-22T10:36:31.661211
2019-12-26T14:40:53
2019-12-26T14:40:53
229,946,871
0
0
null
2022-12-16T04:43:03
2019-12-24T13:28:50
Java
UTF-8
Java
false
false
155
java
package com.vdlogic.emr.domain.enumeration; /** * The ScheduleStatus enumeration. */ public enum ScheduleStatus { REQUESTED, CONFIRMED, CANCELLED }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
bf5476ff123e0368d3ff46e896ba28a9a1038cb8
330fb47f20c33657623db1c1477fe04d70280886
/dexlib2/org/jf/dexlib2/immutable/value/ImmutableEncodedValueFactory.java
a391abf752f898b921fda481681bd6b63b1fea9a
[]
no_license
350030173/ApkSignatureKiller
c45bc28e8e21f76967b3732d0dca7ebc884d5c05
9728831191eaf99ebe50ee6573cd42d1d60b4a4e
refs/heads/master
2021-07-23T22:17:30.731821
2017-11-01T10:35:39
2017-11-01T10:35:39
109,199,435
3
0
null
2017-11-02T00:39:10
2017-11-02T00:39:10
null
UTF-8
Java
false
false
5,398
java
package org.jf.dexlib2.immutable.value; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import org.jf.dexlib2.ValueType; import org.jf.dexlib2.iface.value.AnnotationEncodedValue; import org.jf.dexlib2.iface.value.ArrayEncodedValue; import org.jf.dexlib2.iface.value.BooleanEncodedValue; import org.jf.dexlib2.iface.value.ByteEncodedValue; import org.jf.dexlib2.iface.value.CharEncodedValue; import org.jf.dexlib2.iface.value.DoubleEncodedValue; import org.jf.dexlib2.iface.value.EncodedValue; import org.jf.dexlib2.iface.value.EnumEncodedValue; import org.jf.dexlib2.iface.value.FieldEncodedValue; import org.jf.dexlib2.iface.value.FloatEncodedValue; import org.jf.dexlib2.iface.value.IntEncodedValue; import org.jf.dexlib2.iface.value.LongEncodedValue; import org.jf.dexlib2.iface.value.MethodEncodedValue; import org.jf.dexlib2.iface.value.ShortEncodedValue; import org.jf.dexlib2.iface.value.StringEncodedValue; import org.jf.dexlib2.iface.value.TypeEncodedValue; import org.jf.util.ExceptionWithContext; import org.jf.util.ImmutableConverter; public class ImmutableEncodedValueFactory { @NonNull public static ImmutableEncodedValue of(@NonNull EncodedValue encodedValue) { switch (encodedValue.getValueType()) { case ValueType.BYTE: return ImmutableByteEncodedValue.of((ByteEncodedValue) encodedValue); case ValueType.SHORT: return ImmutableShortEncodedValue.of((ShortEncodedValue) encodedValue); case ValueType.CHAR: return ImmutableCharEncodedValue.of((CharEncodedValue) encodedValue); case ValueType.INT: return ImmutableIntEncodedValue.of((IntEncodedValue) encodedValue); case ValueType.LONG: return ImmutableLongEncodedValue.of((LongEncodedValue) encodedValue); case ValueType.FLOAT: return ImmutableFloatEncodedValue.of((FloatEncodedValue) encodedValue); case ValueType.DOUBLE: return ImmutableDoubleEncodedValue.of((DoubleEncodedValue) encodedValue); case ValueType.STRING: return ImmutableStringEncodedValue.of((StringEncodedValue) encodedValue); case ValueType.TYPE: return ImmutableTypeEncodedValue.of((TypeEncodedValue) encodedValue); case ValueType.FIELD: return ImmutableFieldEncodedValue.of((FieldEncodedValue) encodedValue); case ValueType.METHOD: return ImmutableMethodEncodedValue.of((MethodEncodedValue) encodedValue); case ValueType.ENUM: return ImmutableEnumEncodedValue.of((EnumEncodedValue) encodedValue); case ValueType.ARRAY: return ImmutableArrayEncodedValue.of((ArrayEncodedValue) encodedValue); case ValueType.ANNOTATION: return ImmutableAnnotationEncodedValue.of((AnnotationEncodedValue) encodedValue); case ValueType.NULL: return ImmutableNullEncodedValue.INSTANCE; case ValueType.BOOLEAN: return ImmutableBooleanEncodedValue.of((BooleanEncodedValue) encodedValue); default: Preconditions.checkArgument(false); return null; } } @NonNull public static EncodedValue defaultValueForType(String type) { switch (type.charAt(0)) { case 'Z': return ImmutableBooleanEncodedValue.FALSE_VALUE; case 'B': return new ImmutableByteEncodedValue((byte) 0); case 'S': return new ImmutableShortEncodedValue((short) 0); case 'C': return new ImmutableCharEncodedValue((char) 0); case 'I': return new ImmutableIntEncodedValue(0); case 'J': return new ImmutableLongEncodedValue(0); case 'F': return new ImmutableFloatEncodedValue(0); case 'D': return new ImmutableDoubleEncodedValue(0); case 'L': case '[': return ImmutableNullEncodedValue.INSTANCE; default: throw new ExceptionWithContext("Unrecognized type: %s", type); } } @Nullable public static ImmutableEncodedValue ofNullable(@Nullable EncodedValue encodedValue) { if (encodedValue == null) { return null; } return of(encodedValue); } @NonNull public static ImmutableList<ImmutableEncodedValue> immutableListOf (@Nullable Iterable<? extends EncodedValue> list) { return CONVERTER.toList(list); } private static final ImmutableConverter<ImmutableEncodedValue, EncodedValue> CONVERTER = new ImmutableConverter<ImmutableEncodedValue, EncodedValue>() { @Override protected boolean isImmutable(@NonNull EncodedValue item) { return item instanceof ImmutableEncodedValue; } @NonNull @Override protected ImmutableEncodedValue makeImmutable(@NonNull EncodedValue item) { return of(item); } }; }
[ "921558445@qq.com" ]
921558445@qq.com
59b9e7ecc28ffca52603a2019e56d96c38dddfde
3637342fa15a76e676dbfb90e824de331955edb5
/2s/pojo/src/main/java/com/bcgogo/enums/app/ObdUserVehicleStatus.java
2471e733d6e3787085c2f05c37c27fa176372a4b
[]
no_license
BAT6188/bo
6147f20832263167101003bea45d33e221d0f534
a1d1885aed8cf9522485fd7e1d961746becb99c9
refs/heads/master
2023-05-31T03:36:26.438083
2016-11-03T04:43:05
2016-11-03T04:43:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
204
java
package com.bcgogo.enums.app; /** * User: ZhangJuntao * Date: 13-8-22 * Time: 下午2:45 */ public enum ObdUserVehicleStatus { BUNDLING, //绑定 UN_BUNDLING,//解绑 DELETED //删除 }
[ "ndong211@163.com" ]
ndong211@163.com
89b6fe5a7e72b3c0050ef18ecbea539528c9aa59
0bb292a10b8b4215c9f5d3b38921a5350a5c735c
/src/main/java/ch/bergturbenthal/hs485/frontend/gwtfrontend/server/running/solution/SoftwareEventSourceSolutionPrimitive.java
82946454fd526ec2720c1ac629f84d80523fe366
[]
no_license
koa/hs485-gwtfrontend
0b186b69ec752988bf8b1b2ae6e6157b03db655b
d618d13428708278591c4581a86c02e1cb2af074
refs/heads/master
2022-09-05T15:21:02.226242
2022-08-19T13:42:10
2022-08-19T13:42:10
2,295,307
0
0
null
null
null
null
UTF-8
Java
false
false
194
java
package ch.bergturbenthal.hs485.frontend.gwtfrontend.server.running.solution; public interface SoftwareEventSourceSolutionPrimitive extends ConfigSolutionPrimitive, KeyEventSourceSolution { }
[ "andreas.koenig@berg-turbenthal.ch" ]
andreas.koenig@berg-turbenthal.ch
ced035f7d26770408258d31c20571ac97b51f38b
2c8931832908c4cdd18b0eb5aa314300449588b7
/src/Day012_controlFlowStatements/Assessment_3.java
b51ba03f794411677eb85151414854e59771472b
[]
no_license
KailibinuerAbuduaini/JavaStudyByKalbi
46b3f4e4bb40230da73bf0b66309967e1afe40a2
37790f00294cb66ef61860bf91b5d7a73d5e0663
refs/heads/master
2020-09-08T22:40:30.172367
2020-05-03T22:22:27
2020-05-03T22:22:27
221,262,371
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package Day012_controlFlowStatements; public class Assessment_3 { public static void main(String[] args) { int counter=4; outer: for(int i=0;i<4;i++) { middle: for(int j=0;j<4;j++) { innner: for(int k=0;k<4;k++) { if(k-j>0) { break middle; } counter++; } } } System.out.println(counter); } }
[ "myEmail@Gmail.com" ]
myEmail@Gmail.com
4c73078cb9127ffb4697ca52f83c1656ae7fb0e4
55aca439e180a9bcf0a36f60320013979905d1e5
/efreight-ws/src/main/java/com/efreight/ws/afbase/pojo/order/detail/ShipperLetter.java
c883289906e50aaef44a97cb87cf0a4a14a01fb4
[]
no_license
zhoudy-github/efreight-cloud
1a8f791f350a37c1f2828985ebc20287199a8027
fc669facfdc909b51779a88575ab4351e275bd25
refs/heads/master
2023-03-18T07:24:18.001404
2021-03-23T06:55:54
2021-03-23T06:55:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.efreight.ws.afbase.pojo.order.detail; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; @Data public class ShipperLetter implements Serializable { private String hawbNumber; private String arrivalStation; private String goodsNameCn; private Integer planPieces; private BigDecimal planWeight; }
[ "yeliang_sun@163.com" ]
yeliang_sun@163.com
f94ce7407e6c344d0d68403d1ae3438dc6e26b36
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/domain/src/main/java/org/gradle/testdomain/performancenull_45/Productionnull_4435.java
02e77ca70cf2f3d3276fbb9f850aed9a866b2ce3
[]
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
591
java
package org.gradle.testdomain.performancenull_45; public class Productionnull_4435 { private final String property; public Productionnull_4435(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
eeee7404361c8d59756d451d703fcef256fafd92
3d28dda200ed01e9fa99326eb3adfc713cda0aa5
/datagr4m-drawing/src/main/java/org/datagr4m/drawing/layout/runner/LayoutRunnerListenerAdapter.java
95dd347fdc609f2ffce7ab9a0dee4026ed12a852
[ "BSD-2-Clause" ]
permissive
archenroot/org.datagr4m
ca88bdde3f6a4dc0d385f5969c554dab2d91a74e
1d4c73686749ba47e98a4b76b90355b60960adb3
refs/heads/master
2020-07-20T17:48:07.958011
2014-01-13T21:53:06
2014-01-13T21:53:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
package org.datagr4m.drawing.layout.runner; public class LayoutRunnerListenerAdapter implements ILayoutRunnerListener{ @Override public void runnerStarted() { } @Override public void runnerStopped() { } @Override public void runnerFinished() { } @Override public void runnerFailed(String message, Exception e) { } }
[ "martin.pernollet@calliandra-networks.com" ]
martin.pernollet@calliandra-networks.com
1b7715060ab37b39c661424d7aa5e011c03674ae
59b95d96094685f53389237e55ec1cafa32c1aae
/app/src/main/java/com/colorceramics/soft_it_care/Network/response/AuthResponse.java
ea0a7d65b99eab01fc647086cbfd23a00b7bf730
[]
no_license
alamincse6615/Color-Ceramics
7b26619d48283a2a6d80c2e0c232a8814cc895f0
7c558c571fdc2290eb512202a06c2efaa8922068
refs/heads/master
2023-03-26T00:55:47.083646
2021-03-23T07:56:03
2021-03-23T07:56:03
345,002,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,203
java
package com.colorceramics.soft_it_care.Network.response; import com.colorceramics.soft_it_care.Models.User; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.io.Serializable; public class AuthResponse implements Serializable { @SerializedName("access_token") @Expose private String accessToken; @SerializedName("token_type") @Expose private String tokenType; @SerializedName("expires_at") @Expose private String expiresAt; @SerializedName("user") @Expose private User user; public String getAccessToken() { return accessToken; } public void setAccessToken(String accessToken) { this.accessToken = accessToken; } public String getTokenType() { return tokenType; } public void setTokenType(String tokenType) { this.tokenType = tokenType; } public String getExpiresAt() { return expiresAt; } public void setExpiresAt(String expiresAt) { this.expiresAt = expiresAt; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } }
[ "alamincse6615@gmail.com" ]
alamincse6615@gmail.com
5847f12c931cdf28503ff6448245f842e8fc7f2c
2bdedcda705f6dcf45a1e9a090377f892bcb58bb
/src/main/output/lombok/money_temp_way/case/issue/area.java
e7a64294160eec2455b811aa7d0180d30e0de148
[]
no_license
matkosoric/GenericNameTesting
860a22af1098dda9ea9e24a1fc681bb728aa2d69
03f4a38229c28bc6d83258e5a84fce4b189d5f00
refs/heads/master
2021-01-08T22:35:20.022350
2020-02-21T11:28:21
2020-02-21T11:28:21
242,123,053
1
0
null
null
null
null
UTF-8
Java
false
false
1,424
java
const request = require('request'); const uuidv4 = require('uuid/v4'); /* Checks to see if the subscription key is available as an environment variable. If you are setting your subscription key as a string, then comment these lines out. If you want to set your subscription key as a string, replace the value for the Ocp-Apim-Subscription-Key header as a string. */ const subscriptionKey="936399a744b47cdbfd194d0f3bedc209"; if (!subscriptionKey) { throw new Error('Environment variable for your subscription key is not set.') }; /* If you encounter any issues with the base_url or path, make sure that you are using the latest endpoint: https://docs.microsoft.com/azure/cognitive-services/translator/reference/v3-0-translate */ function translateText(){ let options = { method: 'POST', baseUrl: 'https://api.cognitive.microsofttranslator.com/', url: 'translate', qs: { 'api-version': '3.0', 'to': [''] }, headers: { 'd15968d8fdb562a5ad84eef0cd4b97a0': subscriptionKey, 'Content-type': 'application/json', 'X-ClientTraceId': uuidv4().toString() }, body: [{ 'text': 'Hello World!' }], json: true, }; request(options, function(err, res, body){ console.log(JSON.stringify(body, null, 4)); }); }; // Call the function to translate text. translateText();
[ "soric.matko@gmail.com" ]
soric.matko@gmail.com