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
79f954d48aad9e94c240673fee26f039ed6e62ab
75f783d1960f90b8c76fa6277da5b2f8c0bae7aa
/marathon-core/src/main/java/net/sourceforge/marathon/runtime/http/LogEntry.java
a4f6de04776665c2744eba90a0d0b1bd1ed7134d
[ "Apache-2.0" ]
permissive
paul-hammant/MarathonManV4
572d1de4ccf67c4a7b2779cc0fff2ace24aeee06
5df4650ae1cdd24a2a077e2cfb96695538864845
refs/heads/master
2023-08-27T10:36:39.310075
2016-06-30T05:13:31
2016-06-30T05:13:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,359
java
/******************************************************************************* * Copyright 2016 Jalian Systems Pvt. 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 net.sourceforge.marathon.runtime.http; import java.util.Date; import java.util.logging.Level; public class LogEntry { private final Level level; private final long timestamp; private final String message; public LogEntry(Level level, String message) { this.level = level; this.message = message; this.timestamp = new Date().getTime(); } public String getLevel() { return level.toString(); } public long getTimestamp() { return timestamp; } public String getMessage() { return message; } }
[ "dakshinamurthy.karra@jaliansystems.com" ]
dakshinamurthy.karra@jaliansystems.com
3c397a1f19f351c9c7032efdbba33bc5df329a43
865640b2376330621b80293e8abca0f5a5173666
/SZ/suizhi/src/main/java/cn/com/pyc/drm/ui/ListAlbumContentActivity.java
e4796f8ecb012c38c89cef6a0aa123da2dcf59f9
[ "MIT" ]
permissive
lhc180/Android_DRM
ff2c9336a4086d6bf272e8486ac20bc3b63bc7b9
0fd80f281562b591dee1c1074447485436288a72
refs/heads/master
2020-03-12T00:42:00.289559
2017-12-08T11:11:07
2017-12-08T11:11:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,210
java
package cn.com.pyc.drm.ui; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import java.util.List; import cn.com.pyc.drm.R; import cn.com.pyc.drm.common.DrmPat; import cn.com.pyc.drm.common.ViewHolder; import cn.com.pyc.drm.model.db.bean.AlbumContent; import cn.com.pyc.drm.model.right.SZContent; import cn.com.pyc.drm.utils.ValidDateUtil; import cn.com.pyc.drm.utils.help.KeyHelp; import cn.com.pyc.drm.utils.help.UIHelper; import cn.com.pyc.drm.utils.manager.ActicityManager; import cn.com.pyc.drm.widget.ToastShow; /** * 展示已下载文件list视图 * * @author hudq */ public class ListAlbumContentActivity extends BaseActivity implements OnClickListener, OnItemClickListener { String myProId; String productName; String fileId; String category; String album_pic; List<AlbumContent> contents; private ListView mListView; private MyAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_list_albumcontent); getValue(); initView(); loadData(); } @SuppressWarnings("unchecked") @Override protected void getValue() { Intent intent = getIntent(); myProId = intent.getStringExtra(KeyHelp.KEY_MYPRO_ID); productName = intent.getStringExtra(KeyHelp.KEY_PRO_NAME); fileId = intent.getStringExtra(KeyHelp.KEY_FILE_ID); category = intent.getStringExtra(KeyHelp.KEY_PRO_CATEGORY); album_pic = intent.getStringExtra(KeyHelp.KEY_PRO_URL); // 音乐的时候使用 contents = (List<AlbumContent>) intent.getSerializableExtra(KeyHelp.KEY_SAVE_CONTENT); if (contents == null || category == null) { finish(); ToastShow.getToast().showFail(getApplicationContext(), "无资源记录"); return; } } @Override protected void initView() { UIHelper.showTintStatusBar(this); ActicityManager.getInstance().add(this); ((TextView) findViewById(R.id.title_tv)).setText(productName); findViewById(R.id.back_img).setOnClickListener(this); mListView = (ListView) findViewById(R.id.ac_listview); mListView.setOnItemClickListener(this); } @Override protected void loadData() { adapter = new MyAdapter(this, contents); mListView.setAdapter(adapter); adapter.setContentId(fileId); adapter.notifyDataSetChanged(); } private class MyAdapter extends BaseAdapter { private Context mContext; private List<AlbumContent> contents; private String contentId; private int selectColorId; private int unSelectNameColorId; private int unSelectTimeColorId; private Drawable selectDrawable; private Drawable unSelectDrawable; public void setContentId(String contentId) { this.contentId = contentId; } private MyAdapter(Context mContext, List<AlbumContent> contents) { super(); this.mContext = mContext; this.contents = contents; Resources resources = this.mContext.getResources(); this.selectColorId = resources.getColor(R.color.brilliant_blue); this.unSelectNameColorId = resources.getColor(R.color.black_aa); this.unSelectTimeColorId = resources.getColor(R.color.gray); this.selectDrawable = resources.getDrawable(R.drawable.ic_validate_time_select); this.unSelectDrawable = resources.getDrawable(R.drawable.ic_validate_time_nor); } @Override public int getCount() { return contents != null ? contents.size() : 0; } @Override public AlbumContent getItem(int position) { return contents.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = View.inflate(mContext, R.layout.item_albumcontent_list, null); } TextView tvName = ViewHolder.get(convertView, R.id.tv_ac_name); TextView tvTime = ViewHolder.get(convertView, R.id.tv_ac_status); TextView tvLabel = ViewHolder.get(convertView, R.id.tv_ac_status_lable); ImageView ivTime = ViewHolder.get(convertView, R.id.iv_ac_status); AlbumContent ac = contents.get(position); boolean equals = TextUtils.equals(contentId, ac.getContent_id()); tvName.setTextColor(equals ? selectColorId : unSelectNameColorId); tvTime.setTextColor(equals ? selectColorId : unSelectTimeColorId); tvLabel.setTextColor(equals ? selectColorId : unSelectTimeColorId); ivTime.setImageDrawable(equals ? selectDrawable : unSelectDrawable); tvName.setText(ac.getName()); SZContent szcont = new SZContent(ac.getAsset_id()); if (szcont.isInEffective()) { //文件未生效 tvTime.setText(mContext.getString(R.string.file_ineffective)); } else { tvTime.setText(ValidDateUtil.getValidTime(mContext, szcont.getAvailbaleTime(), szcont.getOdd_datetime_end())); } return convertView; } } @Override public void onClick(View v) { switch (v.getId()) { case R.id.back_img: UIHelper.finishActivity(this); break; default: break; } } @Override public void onBackPressed() { UIHelper.finishActivity(this); } @Override protected void onDestroy() { super.onDestroy(); ActicityManager.getInstance().remove(this); } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { AlbumContent ac = (AlbumContent) mListView.getItemAtPosition(position); if (ac == null) return; SZContent szContent = new SZContent(ac.getAsset_id()); if (!szContent.checkOpen()) { showToast(getString(R.string.file_expired)); return; } if (szContent.isInEffective()) { showToast(getString(R.string.file_ineffective)); return; } adapter.setContentId(ac.getContent_id()); adapter.notifyDataSetChanged(); OpenPage(ac); } private void OpenPage(AlbumContent ac) { Bundle bundle = new Bundle(); bundle.putString(KeyHelp.KEY_MYPRO_ID, myProId); bundle.putString(KeyHelp.KEY_PRO_NAME, productName); bundle.putString(KeyHelp.KEY_FILE_ID, ac.getContent_id()); ////bundle.putSerializable(KeyHelp.KEY_SAVE_CONTENT, (ArrayList<AlbumContent>) this // .contents); switch (this.category) { case DrmPat.BOOK: { Intent data = new Intent(); data.putExtras(bundle); setResult(Activity.RESULT_OK, data); // OpenPageUtil.openActivity(this, MuPDFActivity.class, bundle); UIHelper.finishActivity(ListAlbumContentActivity.this); } break; default: break; } } }
[ "leeqiang250@163.com" ]
leeqiang250@163.com
29353ca1ff8151f4fd8528ebb81bd2bb75c1a7c3
52b6a8aebfc24018b68bad856fd6ffc9820d9b82
/solvers/src/main/java/solvers/CLTLocsolver.java
e3e06a446318a3eef329894c27e751fd6f8c1009
[]
no_license
rpgoldman/checkerForHybridAutomata
f7a8d4871cfd6766c76025cf2ba790fb1b248938
62603287e5eabd0847b576f35a99f9f2873b0b40
refs/heads/master
2021-01-23T10:34:22.818624
2017-06-01T11:23:22
2017-06-01T11:23:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,688
java
package solvers; import java.io.IOException; import java.io.PrintStream; import formulae.cltloc.CLTLocFormula; import formulae.cltloc.converters.CLTLoc2Ae2zot; import formulae.cltloc.converters.CLTLoc2ZotDReal; import formulae.cltloc.visitor.CLTLoc2StringVisitor; import zotrunner.ZotException; import zotrunner.ZotRunner; public class CLTLocsolver { private final CLTLocFormula formula; private final PrintStream out; private final int bound; private float checkingtime; private long checkingspace; private String zotEncoding; public String getZotEncoding() { return zotEncoding; } public CLTLocsolver(CLTLocFormula formula, PrintStream out, int bound) { this.formula = formula; this.out = out; this.bound = bound; } public boolean solve() throws IOException, ZotException { out.println("Converting the following CLTLoc formula in zot"); out.println(formula.accept(new CLTLoc2StringVisitor()).getKey()); String zotEncoding = new CLTLoc2Ae2zot(bound).apply(formula); //String zotEncoding = new CLTLoc2ZotDReal(bound).apply(formula); out.println("************************************************"); out.println("ZOT ENCODING"); out.println(zotEncoding); out.println("************************************************"); out.println("Formula converted in zot"); ZotRunner zotRunner=new ZotRunner(zotEncoding, out); boolean sat = zotRunner.run(); this.checkingtime=zotRunner.getCheckingtime(); this.checkingspace=zotRunner.getCheckingspace(); this.zotEncoding=zotRunner.getZotEncoding(); return sat; } public float getCheckingtime() { return checkingtime; } public long getCheckingspace() { return checkingspace; } }
[ "cla.menghi@gmail.com" ]
cla.menghi@gmail.com
83af8640ffb5b4843b123c04c2dc83d66f0cc1cf
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
/sources/com/google/android/gms/common/api/internal/zzc.java
5077e079b256972c1397100f182af819d6260644
[]
no_license
niravrathod/car_details
f979de0b857f93efe079cd8d7567f2134755802d
398897c050436f13b7160050f375ec1f4e05cdf8
refs/heads/master
2020-04-13T16:36:29.854057
2018-12-27T19:03:46
2018-12-27T19:03:46
163,325,703
0
0
null
null
null
null
UTF-8
Java
false
false
4,963
java
package com.google.android.gms.common.api.internal; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Looper; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.p017f.C3131a; import com.google.android.gms.internal.common.zze; import java.io.FileDescriptor; import java.io.PrintWriter; import java.lang.ref.WeakReference; import java.util.Map; import java.util.Map.Entry; import java.util.WeakHashMap; public final class zzc extends Fragment implements LifecycleFragment { private static WeakHashMap<FragmentActivity, WeakReference<zzc>> zzbd = new WeakHashMap(); private Map<String, LifecycleCallback> zzbe = new C3131a(); private int zzbf = 0; private Bundle zzbg; public static zzc zza(FragmentActivity fragmentActivity) { zzc zzc; WeakReference weakReference = (WeakReference) zzbd.get(fragmentActivity); if (weakReference != null) { zzc = (zzc) weakReference.get(); if (zzc != null) { return zzc; } } try { zzc = (zzc) fragmentActivity.m28707f().mo291a("SupportLifecycleFragmentImpl"); if (zzc == null || zzc.isRemoving()) { zzc = new zzc(); fragmentActivity.m28707f().mo292a().mo271a((Fragment) zzc, "SupportLifecycleFragmentImpl").mo280d(); } zzbd.put(fragmentActivity, new WeakReference(zzc)); return zzc; } catch (FragmentActivity fragmentActivity2) { throw new IllegalStateException("Fragment with tag SupportLifecycleFragmentImpl is not a SupportLifecycleFragmentImpl", fragmentActivity2); } } public final <T extends LifecycleCallback> T getCallbackOrNull(String str, Class<T> cls) { return (LifecycleCallback) cls.cast(this.zzbe.get(str)); } public final void addCallback(String str, LifecycleCallback lifecycleCallback) { if (this.zzbe.containsKey(str)) { StringBuilder stringBuilder = new StringBuilder(String.valueOf(str).length() + 59); stringBuilder.append("LifecycleCallback with tag "); stringBuilder.append(str); stringBuilder.append(" already added to this fragment."); throw new IllegalArgumentException(stringBuilder.toString()); } this.zzbe.put(str, lifecycleCallback); if (this.zzbf > 0) { new zze(Looper.getMainLooper()).post(new zzd(this, lifecycleCallback, str)); } } public final boolean isCreated() { return this.zzbf > 0; } public final boolean isStarted() { return this.zzbf >= 2; } public final void onCreate(Bundle bundle) { super.onCreate(bundle); this.zzbf = 1; this.zzbg = bundle; for (Entry entry : this.zzbe.entrySet()) { ((LifecycleCallback) entry.getValue()).onCreate(bundle != null ? bundle.getBundle((String) entry.getKey()) : null); } } public final void onStart() { super.onStart(); this.zzbf = 2; for (LifecycleCallback onStart : this.zzbe.values()) { onStart.onStart(); } } public final void onResume() { super.onResume(); this.zzbf = 3; for (LifecycleCallback onResume : this.zzbe.values()) { onResume.onResume(); } } public final void onActivityResult(int i, int i2, Intent intent) { super.onActivityResult(i, i2, intent); for (LifecycleCallback onActivityResult : this.zzbe.values()) { onActivityResult.onActivityResult(i, i2, intent); } } public final void onSaveInstanceState(Bundle bundle) { super.onSaveInstanceState(bundle); if (bundle != null) { for (Entry entry : this.zzbe.entrySet()) { Bundle bundle2 = new Bundle(); ((LifecycleCallback) entry.getValue()).onSaveInstanceState(bundle2); bundle.putBundle((String) entry.getKey(), bundle2); } } } public final void onStop() { super.onStop(); this.zzbf = 4; for (LifecycleCallback onStop : this.zzbe.values()) { onStop.onStop(); } } public final void onDestroy() { super.onDestroy(); this.zzbf = 5; for (LifecycleCallback onDestroy : this.zzbe.values()) { onDestroy.onDestroy(); } } public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) { super.dump(str, fileDescriptor, printWriter, strArr); for (LifecycleCallback dump : this.zzbe.values()) { dump.dump(str, fileDescriptor, printWriter, strArr); } } public final /* synthetic */ Activity getLifecycleActivity() { return getActivity(); } }
[ "niravrathod473@gmail.com" ]
niravrathod473@gmail.com
7e9f7f1f7199d7732a7e96f99c721a179526ec73
deb3a451da04b11f413425b93dea69d14f777ab2
/src/com/javarush/test/level09/lesson08/task04/Solution.java
3c9e105c7177cec6aeb230f4bf650e68386f2723
[]
no_license
kelebro13/JavaRushHomeWork
59d1cd8c9aad715eb518b26d76b4e5a125308caa
5ae4cf7cdeb5bbb97bdbda8832fb41faab370434
refs/heads/master
2020-09-22T08:25:56.755170
2016-08-17T12:26:34
2016-08-17T12:26:34
65,905,504
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package com.javarush.test.level09.lesson08.task04; import java.io.IOException; import java.rmi.RemoteException; /* Перехват checked исключений В методе processExceptions обработайте все checked исключения. Нужно вывести на экран каждое возникшее checked исключение. Можно использовать только один блок try.. */ public class Solution { public static void main(String[] args){ processExceptions(new Solution()); } public static void processExceptions(Solution obj){ try { obj.method1(); obj.method2(); obj.method3(); } catch (RemoteException e) { System.out.println(e); } catch (IOException e) { System.out.println(e); } catch (NoSuchFieldException e) { System.out.println(e); } } public void method1() throws IOException { throw new IOException(); } public void method2() throws NoSuchFieldException { throw new NoSuchFieldException(); } public void method3() throws RemoteException { throw new RemoteException(); } }
[ "tgumerov@gmail.com" ]
tgumerov@gmail.com
2a11b7a996cb1d2a688f938b132047be0cc1b2ef
38c43db49a388986a260aab4f1e31576f7e2c991
/src/main/java/org/donald/curator/get/GetDataSample.java
c16ceacfaae413adbfefd8a58f23d7e38beee1e6
[ "Apache-2.0" ]
permissive
cxbn12/zookeeper-demo
193b0c88f82df5da8551a5569e0fb0002e7d6242
3b8494e61dcfbba9c307aac2837485244cdf958d
refs/heads/master
2021-09-16T01:29:33.869629
2018-06-14T09:32:50
2018-06-14T09:32:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,473
java
package org.donald.curator.get; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.apache.curator.RetryPolicy; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.retry.ExponentialBackoffRetry; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.data.Stat; import org.donald.constant.ConfigConstant; /** * @ClassName: GetDataSample * @Description: 使用Curator获取数据内容 * @Author: Donaldhan * @Date: 2018-05-14 9:16 */ @Slf4j public class GetDataSample { private static CuratorFramework client; public static void main(String[] args) { String path = "/zk-book/c1"; try { RetryPolicy retryPolicy = new ExponentialBackoffRetry(ConfigConstant.BASE_SLEEP_TIMES, ConfigConstant.MAX_RETRIES); client = CuratorFrameworkFactory.builder() .connectString(ConfigConstant.IP) .sessionTimeoutMs(ConfigConstant.SESSION_TIMEOUT) .connectionTimeoutMs(ConfigConstant.CONNETING_TIMEOUT) .retryPolicy(retryPolicy) .build(); log.info("success connected..."); client.start(); //如果需要创建父节点,需要注意一个问题,创建的父节点是持久化的 client.create() .creatingParentsIfNeeded() .withMode(CreateMode.EPHEMERAL) .forPath(path, "init".getBytes()); Stat stat = new Stat(); String value = new String(client.getData().storingStatIn(stat).forPath(path), ConfigConstant.CHAR_SET_NAME); log.info("{} value :{} , stat:{}", new Object[]{path, value, JSONObject.toJSONString(stat)}); //如果需要删除子节点 client.delete().deletingChildrenIfNeeded() .withVersion(stat.getVersion()).forPath(path); log.info("success delete :{}, stat :{}...",path, JSONObject.toJSONString(stat)); Thread.sleep(3000); Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } finally { if (client != null) { client.close(); } } } }
[ "shaoqinghan@aliyun.com" ]
shaoqinghan@aliyun.com
9019fca74f0af53fb42c2fded0532fcbfef7212f
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/Interview/.interviewBit.com/3-sum.java
cf6ce6451dbb455d667c0ce8b649e42d80475460
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
814
java
public class Solution { public int threeSumClosest(ArrayList<Integer> a, int target) { Collections.sort(a); int bestDiff = Integer.MAX_VALUE; final int size = a.size(); for (int prev = 0; prev < size - 2; ++ prev) { int left = prev + 1; int right = size - 1; while (left < right) { final int currentSum = a.get(prev) + a.get(left) + a.get(right); final int diff = currentSum - target; if (Math.abs(diff) < Math.abs(bestDiff)) { bestDiff = diff; } if (currentSum > target) { -- right; } else { ++ left; } } } return target + bestDiff; } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
e64b5e86dfd9ab84b4ec73a6b92f2b2a2d80efac
60b3aa0ae501058f26326b77bc5292e1c3a72859
/ClassDemo/collectionTest/src/linkedHashSetTest/demo1.java
a917df3dc4e920d4aa8e71c3d2c1fc1696743a0c
[]
no_license
puyanLiu/javaAndAndroidDemo
36ea3538ded86be3ad70202f09276e324b4ba173
b4c1b8623f6c25fb80c4a1f405c9664f5b399baa
refs/heads/master
2021-09-28T20:12:23.145754
2018-11-20T02:33:13
2018-11-20T02:33:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
523
java
package linkedHashSetTest; import java.util.LinkedHashSet; /** * @author liupuyan * LinkedHashSet 底层数据结构由哈希表和链表组成 * 哈希表保证元素的唯一性 * 链表保证元素的有序性(存储顺序) * * 哈希表:是一个元素为链表的数组 */ public class demo1 { public static void main(String[] args) { LinkedHashSet<String> lhs1 = new LinkedHashSet<>(); lhs1.add("hello"); lhs1.add("world"); lhs1.add("java"); lhs1.add("hello"); System.out.println(lhs1); } }
[ "814168332@qq.com" ]
814168332@qq.com
d9bea2fa78c6b9164368690e6d4550d6a035006c
bff6e0ca606ac7c4a59a63929fe00670357e1a76
/src/molab/main/java/dao/CrDeviceDao.java
8471b19855e5f5167b50104a2e981d4c3e470879
[]
no_license
cocoy2006/ats_admin
0b5d48dccaf335d7a3e66bc68b06d6d4c92615aa
635f5fad6405734104f737ed521d4034e7d55afe
refs/heads/master
2021-08-19T14:09:46.819741
2017-11-26T14:42:54
2017-11-26T14:42:54
112,090,294
0
0
null
null
null
null
UTF-8
Java
false
false
4,194
java
package molab.main.java.dao; import java.util.List; import molab.main.java.entity.CrDevice; import org.hibernate.LockMode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Repository; /** * A data access object (DAO) providing persistence and search support for * CrDevice entities. Transaction control of the save(), update() and delete() * operations can directly support Spring container-managed transactions or they * can be augmented to handle user-managed Spring transactions. Each of these * methods provides additional information for how to configure it for the * desired type of transaction control. * * @see molab.main.java.entity.CrDevice * @author MyEclipse Persistence Tools */ @Repository public class CrDeviceDao extends BaseDao<CrDevice> { private static final Logger log = LoggerFactory .getLogger(CrDeviceDao.class); // property constants public static final String SERVER = "server"; public static final String PORT = "port"; public static final String SN = "sn"; public static final String OS = "os"; public static final String WIDTH = "width"; public static final String HEIGHT = "height"; public static final String STATE = "state"; public CrDevice findById(java.lang.Integer id) { log.debug("getting CrDevice instance with id: " + id); try { CrDevice instance = (CrDevice) getHibernateTemplate().get( "molab.main.java.entity.CrDevice", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public List<CrDevice> findByExample(CrDevice instance) { log.debug("finding CrDevice instance by example"); try { List<CrDevice> results = (List<CrDevice>) getHibernateTemplate() .findByExample(instance); log.debug("find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { log.error("find by example failed", re); throw re; } } public List findByProperty(String propertyName, Object value) { log.debug("finding CrDevice instance with property: " + propertyName + ", value: " + value); try { String queryString = "from CrDevice as model where model." + propertyName + "= ?"; return getHibernateTemplate().find(queryString, value); } catch (RuntimeException re) { log.error("find by property name failed", re); throw re; } } public List<CrDevice> findByServer(Object server) { return findByProperty(SERVER, server); } public List<CrDevice> findByPort(Object port) { return findByProperty(PORT, port); } public List<CrDevice> findBySn(Object sn) { return findByProperty(SN, sn); } public List<CrDevice> findByOs(Object os) { return findByProperty(OS, os); } public List<CrDevice> findByWidth(Object width) { return findByProperty(WIDTH, width); } public List<CrDevice> findByHeight(Object height) { return findByProperty(HEIGHT, height); } public List<CrDevice> findByState(Object state) { return findByProperty(STATE, state); } public List findAll() { log.debug("finding all CrDevice instances"); try { String queryString = "from CrDevice"; return getHibernateTemplate().find(queryString); } catch (RuntimeException re) { log.error("find all failed", re); throw re; } } public CrDevice merge(CrDevice detachedInstance) { log.debug("merging CrDevice instance"); try { CrDevice result = (CrDevice) getHibernateTemplate().merge(detachedInstance); log.debug("merge successful"); return result; } catch (RuntimeException re) { log.error("merge failed", re); throw re; } } public void attachDirty(CrDevice instance) { log.debug("attaching dirty CrDevice instance"); try { getHibernateTemplate().saveOrUpdate(instance); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void attachClean(CrDevice instance) { log.debug("attaching clean CrDevice instance"); try { getHibernateTemplate().lock(instance, LockMode.NONE); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } }
[ "yekk@molab.com" ]
yekk@molab.com
204d4c48935944a25fd44f138582c0650658d937
13a6678e1c08afb2d7a487022682817e484541bf
/weining_v0.6/src/com/lssl/utils/CacheManager.java
d37ad55994a4088e1a3580649cad31d168b405c0
[]
no_license
gangt/TidomWN
535c6c95fa08be44e3faf9d0341b5f3cf9693231
9eaf1d6f8a4efe8598507da95fe883407464e70f
refs/heads/master
2020-03-21T04:46:53.899074
2018-06-21T06:22:50
2018-06-21T06:22:50
138,126,780
0
0
null
null
null
null
UTF-8
Java
false
false
7,591
java
/* ShengDao Android Client, CacheManager Copyright (c) 2014 ShengDao Tech Company Limited */ package com.lssl.utils; import android.os.Environment; import android.text.TextUtils; import android.util.Log; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OptionalDataException; import java.io.StreamCorruptedException; import java.util.List; /** * 序列化缓存类,该类主要提供了序列化缓存数据,读取数据,缓存有效性检查,清除缓存方法; * 使用该类中的对象必须实现序列化接口,且必须在Application中初始化sysCachePath缓存路径。 * * @author huxinwu * @version 1.0 * @date 2014-3-5 * **/ public class CacheManager { /** 日志对象 **/ private static final String tag = CacheManager.class.getSimpleName(); /** * 缓存路径, 建议在BaseApplication中设置 建议设置为getCacheDir().getPath() **/ private static String sysCachePath; public static String getSysCachePath() { return sysCachePath; } public static void setSysCachePath(String sysCachePath) { CacheManager.sysCachePath = sysCachePath; } /** * 在debug模式下保存测试数据到磁盘上,路径为SD卡下面的testData文件 * * @param xmlResult * @param fileName */ public static <T> void saveTestData(String xmlResult, String fileName) { try { String state = Environment.getExternalStorageState(); // 判断如果有SD卡且是Debug模式 if (Environment.MEDIA_MOUNTED.equals(state) ) { String sdCardPath = Environment.getExternalStorageDirectory() .getPath(); StringBuilder path = new StringBuilder(sdCardPath).append( File.separator).append("testData"); File file = new File(path.toString()); if (!file.exists()) { file.mkdirs(); } path = path.append(File.separator).append(fileName) .append(".txt"); file = new File(path.toString()); FileOutputStream output = new FileOutputStream(file); BufferedOutputStream os = new BufferedOutputStream(output); os.write(xmlResult.getBytes()); os.flush(); os.close(); Log.e(tag, "saveTestData success: " + path); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } /** * 保存缓存对象 * * @param object * 缓存对象 * @param key * 对应的key * @return true表示成功,false表示失败 */ public static <T> boolean writeObject(Object object, String key) { try { String path = getCachePath(key); if(!TextUtils.isEmpty(path)){ FileOutputStream fos = new FileOutputStream(path); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(object); oos.flush(); oos.close(); // update LastModified File file = new File(path); if (file.exists()) { file.setLastModified(System.currentTimeMillis()); Log.e(tag, "writeObject object success : " + path); return true; } } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return false; } /** * 根据key获取缓存对象 * * @param key * @return */ @SuppressWarnings("unchecked") public static <T> T readObject(String key) { T obj = null; try { String cachePath = getCachePath(key); File file = new File(cachePath); if (file.exists()) { FileInputStream fis = new FileInputStream(cachePath); ObjectInputStream ois = new ObjectInputStream(fis); obj = (T) ois.readObject(); ois.close(); } } catch (StreamCorruptedException e) { e.printStackTrace(); } catch (OptionalDataException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } return obj; } /** * 保存缓存list对象 * * @param list * 缓存对象 * @param key * 对应的key * @return true表示成功,false表示失败 */ public static <T> boolean writeObjectList(List<T> list, String key) { try { String path = getCachePath(key); if(!TextUtils.isEmpty(path)){ FileOutputStream fos = new FileOutputStream(path); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(list); oos.flush(); oos.close(); // update LastModified File file = new File(path); if (file.exists()) { file.setLastModified(System.currentTimeMillis()); Log.e(tag, "writeObject object success : " + path); return true; } } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return false; } /** * 根据key获取缓存对象 * * @param key * @return */ @SuppressWarnings("unchecked") public static <T> List<T> readObjectList(String key) { List<T> obj = null; try { String cachePath = getCachePath(key); File file = new File(cachePath); if (file.exists()) { FileInputStream fis = new FileInputStream(cachePath); ObjectInputStream ois = new ObjectInputStream(fis); obj = (List)ois.readObject(); ois.close(); } } catch (StreamCorruptedException e) { e.printStackTrace(); } catch (OptionalDataException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } return obj; } /** * 检查缓存是否有效 * * @param key * 缓存key * @param timeout * 超时时间 * @return true表示有效,false表示无锡 */ public static boolean isInvalidCache(String key, long timeout) { String path = getCachePath(key); File file = new File(path); if (file.exists()) { long last = file.lastModified(); long current = System.currentTimeMillis(); if (current - last < timeout * 1000) { Log.e(tag, "the cahce is effect : " + path); return true; } } Log.e(tag, "the cahce is invalid : " + path); return false; } /** * 根据key得到缓存路径 * * @param key * @return */ public static String getCachePath(String key) { if (TextUtils.isEmpty(sysCachePath)) { Log.e(tag, "CacheManager sysCachePath is not null."); return ""; } StringBuilder path = new StringBuilder(); path.append(sysCachePath); path.append(File.separator); path.append(key); return path.toString(); } /** * 根据key清除对应缓存 * * @param <T> * @return boolean */ public static <T> boolean clearCache(String key) { File file = new File(getCachePath(key)); if (file.exists()) { return file.delete(); } return false; } /** * 清楚所有缓存 * * @return */ public static boolean clearAll() { if (!TextUtils.isEmpty(sysCachePath)) { File file = new File(sysCachePath); return removeDir(file); } else { Log.e(tag, "sysCachePath is null"); } return false; } public static boolean removeDir(File file) { File[] files = file.listFiles(); for (File f : files) { if (f.isDirectory())// 递归调用 { removeDir(f); } else { f.delete(); } } // 一层目录下的内容都删除以后,删除掉这个文件夹 return file.delete(); } }
[ "18271817996@163.com" ]
18271817996@163.com
aedb05fc1569669152a948d582482e4c8426991e
1e212405cd1e48667657045ad91fb4dc05596559
/lib/openflowj-3.3.0-SNAPSHOT-sources (copy)/org/projectfloodlight/openflow/protocol/ver15/OFGroupBucketPropWatchGroupVer15.java
705327dee511af4d4f65411e4a8c24105ddf89bb
[ "Apache-2.0" ]
permissive
aamorim/floodlight
60d4ef0b6d7fe68b8b4688f0aa610eb23dd790db
1b7d494117f3b6b9adbdbcf23e6cb3cc3c6187c9
refs/heads/master
2022-07-10T21:50:11.130010
2019-09-03T19:02:41
2019-09-03T19:02:41
203,223,614
1
0
Apache-2.0
2022-07-06T20:07:15
2019-08-19T18:00:01
Java
UTF-8
Java
false
false
7,997
java
// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University // Copyright (c) 2011, 2012 Open Networking Foundation // Copyright (c) 2012, 2013 Big Switch Networks, Inc. // This library was generated by the LoxiGen Compiler. // See the file LICENSE.txt which should have been included in the source distribution // Automatically generated by LOXI from template of_class.java // Do not modify package org.projectfloodlight.openflow.protocol.ver15; import org.projectfloodlight.openflow.protocol.*; import org.projectfloodlight.openflow.protocol.action.*; import org.projectfloodlight.openflow.protocol.actionid.*; import org.projectfloodlight.openflow.protocol.bsntlv.*; import org.projectfloodlight.openflow.protocol.errormsg.*; import org.projectfloodlight.openflow.protocol.meterband.*; import org.projectfloodlight.openflow.protocol.instruction.*; import org.projectfloodlight.openflow.protocol.instructionid.*; import org.projectfloodlight.openflow.protocol.match.*; import org.projectfloodlight.openflow.protocol.stat.*; import org.projectfloodlight.openflow.protocol.oxm.*; import org.projectfloodlight.openflow.protocol.oxs.*; import org.projectfloodlight.openflow.protocol.queueprop.*; import org.projectfloodlight.openflow.types.*; import org.projectfloodlight.openflow.util.*; import org.projectfloodlight.openflow.exceptions.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Set; import io.netty.buffer.ByteBuf; import com.google.common.hash.PrimitiveSink; import com.google.common.hash.Funnel; class OFGroupBucketPropWatchGroupVer15 implements OFGroupBucketPropWatchGroup { private static final Logger logger = LoggerFactory.getLogger(OFGroupBucketPropWatchGroupVer15.class); // version: 1.5 final static byte WIRE_VERSION = 6; final static int LENGTH = 8; private final static long DEFAULT_WATCH = 0x0L; // OF message fields private final long watch; // // Immutable default instance final static OFGroupBucketPropWatchGroupVer15 DEFAULT = new OFGroupBucketPropWatchGroupVer15( DEFAULT_WATCH ); // package private constructor - used by readers, builders, and factory OFGroupBucketPropWatchGroupVer15(long watch) { this.watch = watch; } // Accessors for OF message fields @Override public int getType() { return 0x2; } @Override public long getWatch() { return watch; } @Override public OFVersion getVersion() { return OFVersion.OF_15; } public OFGroupBucketPropWatchGroup.Builder createBuilder() { return new BuilderWithParent(this); } static class BuilderWithParent implements OFGroupBucketPropWatchGroup.Builder { final OFGroupBucketPropWatchGroupVer15 parentMessage; // OF message fields private boolean watchSet; private long watch; BuilderWithParent(OFGroupBucketPropWatchGroupVer15 parentMessage) { this.parentMessage = parentMessage; } @Override public int getType() { return 0x2; } @Override public long getWatch() { return watch; } @Override public OFGroupBucketPropWatchGroup.Builder setWatch(long watch) { this.watch = watch; this.watchSet = true; return this; } @Override public OFVersion getVersion() { return OFVersion.OF_15; } @Override public OFGroupBucketPropWatchGroup build() { long watch = this.watchSet ? this.watch : parentMessage.watch; // return new OFGroupBucketPropWatchGroupVer15( watch ); } } static class Builder implements OFGroupBucketPropWatchGroup.Builder { // OF message fields private boolean watchSet; private long watch; @Override public int getType() { return 0x2; } @Override public long getWatch() { return watch; } @Override public OFGroupBucketPropWatchGroup.Builder setWatch(long watch) { this.watch = watch; this.watchSet = true; return this; } @Override public OFVersion getVersion() { return OFVersion.OF_15; } // @Override public OFGroupBucketPropWatchGroup build() { long watch = this.watchSet ? this.watch : DEFAULT_WATCH; return new OFGroupBucketPropWatchGroupVer15( watch ); } } final static Reader READER = new Reader(); static class Reader implements OFMessageReader<OFGroupBucketPropWatchGroup> { @Override public OFGroupBucketPropWatchGroup readFrom(ByteBuf bb) throws OFParseError { int start = bb.readerIndex(); // fixed value property type == 0x2 short type = bb.readShort(); if(type != (short) 0x2) throw new OFParseError("Wrong type: Expected=0x2(0x2), got="+type); int length = U16.f(bb.readShort()); if(length != 8) throw new OFParseError("Wrong length: Expected=8(8), got="+length); if(bb.readableBytes() + (bb.readerIndex() - start) < length) { // Buffer does not have all data yet bb.readerIndex(start); return null; } if(logger.isTraceEnabled()) logger.trace("readFrom - length={}", length); long watch = U32.f(bb.readInt()); OFGroupBucketPropWatchGroupVer15 groupBucketPropWatchGroupVer15 = new OFGroupBucketPropWatchGroupVer15( watch ); if(logger.isTraceEnabled()) logger.trace("readFrom - read={}", groupBucketPropWatchGroupVer15); return groupBucketPropWatchGroupVer15; } } public void putTo(PrimitiveSink sink) { FUNNEL.funnel(this, sink); } final static OFGroupBucketPropWatchGroupVer15Funnel FUNNEL = new OFGroupBucketPropWatchGroupVer15Funnel(); static class OFGroupBucketPropWatchGroupVer15Funnel implements Funnel<OFGroupBucketPropWatchGroupVer15> { private static final long serialVersionUID = 1L; @Override public void funnel(OFGroupBucketPropWatchGroupVer15 message, PrimitiveSink sink) { // fixed value property type = 0x2 sink.putShort((short) 0x2); // fixed value property length = 8 sink.putShort((short) 0x8); sink.putLong(message.watch); } } public void writeTo(ByteBuf bb) { WRITER.write(bb, this); } final static Writer WRITER = new Writer(); static class Writer implements OFMessageWriter<OFGroupBucketPropWatchGroupVer15> { @Override public void write(ByteBuf bb, OFGroupBucketPropWatchGroupVer15 message) { // fixed value property type = 0x2 bb.writeShort((short) 0x2); // fixed value property length = 8 bb.writeShort((short) 0x8); bb.writeInt(U32.t(message.watch)); } } @Override public String toString() { StringBuilder b = new StringBuilder("OFGroupBucketPropWatchGroupVer15("); b.append("watch=").append(watch); b.append(")"); return b.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; OFGroupBucketPropWatchGroupVer15 other = (OFGroupBucketPropWatchGroupVer15) obj; if( watch != other.watch) return false; return true; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * (int) (watch ^ (watch >>> 32)); return result; } }
[ "alex@VM-UFS-001" ]
alex@VM-UFS-001
15465840c5d65bc0fbc1b1fbe2469ea2590f921a
fdc1a3e6e6746ca53739a489ef3a662dd05c3c60
/src/main/java/com/mrbonono63/create/compat/jei/category/PackingCategory.java
f42a84dbcdd4ad1f7b76cf9562463adedad697a7
[ "MIT" ]
permissive
Bonono63/Create---Fabric-Edition
197babf8a008144e742616a7f8a6c7a19b61d307
94d03047a9fba5d4346e0be91353a8d7dbd3a709
refs/heads/master
2023-04-04T17:17:59.443779
2021-04-17T00:54:39
2021-04-17T00:54:39
249,259,508
9
3
null
null
null
null
UTF-8
Java
false
false
2,847
java
package com.mrbonono63.create.compat.jei.category; import java.util.Arrays; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlocks; import com.mrbonono63.create.animations.AnimatedPress; import com.mrbonono63.create.content.contraptions.processing.BasinRecipe; import com.mrbonono63.create.foundation.gui.AllGuiTextures; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; import mezz.jei.api.ingredients.IIngredients; import net.minecraft.block.Blocks; import net.minecraft.item.crafting.Ingredient; import net.minecraft.util.IItemProvider; import net.minecraft.util.NonNullList; public class PackingCategory extends BasinCategory { private AnimatedPress press = new AnimatedPress(true); private PackingType type; enum PackingType { AUTO_SQUARE, COMPACTING; } public static PackingCategory standard() { return new PackingCategory(PackingType.COMPACTING, AllBlocks.BASIN.get(), 103); } public static PackingCategory autoSquare() { return new PackingCategory(PackingType.AUTO_SQUARE, Blocks.CRAFTING_TABLE, 85); } protected PackingCategory(PackingType type, IItemProvider icon, int height) { super(type != PackingType.AUTO_SQUARE, doubleItemIcon(AllBlocks.MECHANICAL_PRESS.get(), icon), emptyBackground(177, height)); this.type = type; } @Override public void setRecipe(IRecipeLayout recipeLayout, BasinRecipe recipe, IIngredients ingredients) { if (type == PackingType.COMPACTING) { super.setRecipe(recipeLayout, recipe, ingredients); return; } IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); int i = 0; NonNullList<Ingredient> ingredients2 = recipe.getIngredients(); int size = ingredients2.size(); int rows = size == 4 ? 2 : 3; while (i < size) { Ingredient ingredient = ingredients2.get(i); itemStacks.init(i, true, (rows == 2 ? 26 : 17) + (i % rows) * 19, 50 - (i / rows) * 19); itemStacks.set(i, Arrays.asList(ingredient.getMatchingStacks())); i++; } itemStacks.init(i, false, 141, 50); itemStacks.set(i, recipe.getRecipeOutput()); } @Override public void draw(BasinRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) { if (type == PackingType.COMPACTING) { super.draw(recipe, matrixStack, mouseX, mouseY); } else { NonNullList<Ingredient> ingredients2 = recipe.getIngredients(); int size = ingredients2.size(); int rows = size == 4 ? 2 : 3; for (int i = 0; i < size; i++) AllGuiTextures.JEI_SLOT.draw(matrixStack, (rows == 2 ? 26 : 17) + (i % rows) * 19, 50 - (i / rows) * 19); AllGuiTextures.JEI_SLOT.draw(matrixStack, 141, 50); AllGuiTextures.JEI_DOWN_ARROW.draw(matrixStack, 136, 32); AllGuiTextures.JEI_SHADOW.draw(matrixStack, 81, 68); } press.draw(matrixStack, getBackground().getWidth() / 2 + 6, 40); } }
[ "bonoria63@gmail.com" ]
bonoria63@gmail.com
b48cda41fb60c7185314f811701907c1092dca90
607224e023e4bf33a2be619262e1d8b55c2a3e08
/jars/worldwind/src/gov/nasa/worldwind/formats/nmea/NmeaReader.java
6d8eda72cafb472634822f1745e97d3878ca3bcd
[]
no_license
haldean/droidcopter
54511d836762f41b23670447f79e7457d67a216d
2a25c5eade55e68037001fbfdba3b0f975c70e25
refs/heads/master
2020-05-16T22:18:53.581797
2013-01-27T03:58:24
2013-01-27T03:58:24
755,362
3
1
null
null
null
null
UTF-8
Java
false
false
7,756
java
/* Copyright (C) 2001, 2006 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved. */ package gov.nasa.worldwind.formats.nmea; import gov.nasa.worldwind.tracks.*; import gov.nasa.worldwind.util.Logging; import gov.nasa.worldwind.geom.Position; import java.util.Iterator; // TODO: exception handling /** * @author Tom Gaskins * @version $Id: NmeaReader.java 11324 2009-05-27 00:53:36Z tgaskins $ */ public class NmeaReader implements Track, TrackSegment { private java.util.List<Track> tracks = new java.util.ArrayList<Track>(); private java.util.List<TrackSegment> segments = new java.util.ArrayList<TrackSegment>(); private java.util.List<TrackPoint> points = new java.util.ArrayList<TrackPoint>(); private String name; private int sentenceNumber = 0; public NmeaReader() { this.tracks.add(this); this.segments.add(this); } public java.util.List<TrackSegment> getSegments() { return this.segments; } public String getName() { return this.name; } public int getNumPoints() { return this.points.size(); } public java.util.List<TrackPoint> getPoints() { return this.points; } /** * @param path * @throws IllegalArgumentException if <code>path</code> is null * @throws java.io.IOException */ public void readFile(String path) throws java.io.IOException { if (path == null) { String msg = Logging.getMessage("nullValue.PathIsNull"); Logging.logger().severe(msg); throw new IllegalArgumentException(msg); } this.name = path; java.io.File file = new java.io.File(path); if (!file.exists()) { String msg = Logging.getMessage("generic.FileNotFound", path); Logging.logger().severe(msg); throw new java.io.FileNotFoundException(path); } java.io.FileInputStream fis = new java.io.FileInputStream(file); this.doReadStream(fis); if (this.tracks.isEmpty() || this.tracks.get(0).getNumPoints() == 0) throw new IllegalArgumentException(Logging.getMessage("formats.notNMEA", path)); // java.nio.ByteBuffer buffer = this.doReadFile(fis); // this.parseBuffer(buffer); } /** * @param stream * @param name * @throws IllegalArgumentException if <code>stream</code> is null * @throws java.io.IOException */ public void readStream(java.io.InputStream stream, String name) throws java.io.IOException { if (stream == null) { String msg = Logging.getMessage("nullValue.InputStreamIsNull"); Logging.logger().severe(msg); throw new IllegalArgumentException(msg); } this.name = name != null ? name : "Un-named stream"; this.doReadStream(stream); } public java.util.List<Track> getTracks() { return this.tracks; } public Iterator<Position> getTrackPositionIterator() { return new Iterator<Position>() { private TrackPointIterator trackPoints = new TrackPointIteratorImpl(NmeaReader.this.tracks); public boolean hasNext() { return this.trackPoints.hasNext(); } public Position next() { return this.trackPoints.next().getPosition(); } public void remove() { this.trackPoints.remove(); } }; } private void doReadStream(java.io.InputStream stream) { String sentence; try { do { sentence = this.readSentence(stream); if (sentence != null) { ++this.sentenceNumber; this.parseSentence(sentence); } } while (sentence != null); } catch (java.io.IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } // // private static final int PAGE_SIZE = 4096; // // private java.nio.ByteBuffer doReadFile(java.io.FileInputStream fis) throws java.io.IOException // { // java.nio.channels.ReadableByteChannel channel = java.nio.channels.Channels.newChannel(fis); // java.nio.ByteBuffer buffer = java.nio.ByteBuffer.allocate(PAGE_SIZE); // // int count = 0; // while (count >= 0) // { // count = channel.read(buffer); // if (count > 0 && !buffer.hasRemaining()) // { // java.nio.ByteBuffer biggerBuffer = java.nio.ByteBuffer.allocate(buffer.limit() + PAGE_SIZE); // biggerBuffer.put((java.nio.ByteBuffer) buffer.rewind()); // buffer = biggerBuffer; // } // } // // if (buffer != null) // buffer.flip(); // // return buffer; // } // // private void parseBuffer(java.nio.ByteBuffer buffer) // { // while (buffer.hasRemaining()) // { // byte b = buffer.get(); // if (b == '$') // { // String sentence = this.readSentence(buffer); // if (sentence.length() > 0) // { // this.parseSentence(sentence); // } // } // } // } private String readSentence(java.io.InputStream stream) throws java.io.IOException, InterruptedException { StringBuilder sb = null; boolean endOfSentence = false; while (!endOfSentence && !Thread.currentThread().isInterrupted()) { int b = stream.read(); if (b < 0) return null; else if (b == 0) Thread.sleep(200); else if (b == '$') sb = new StringBuilder(100); else if (b == '\r') endOfSentence = true; else if (sb != null) sb.append((char) b); } // TODO: check checksum return sb != null ? sb.toString() : null; } private String readSentence(java.nio.ByteBuffer buffer) { StringBuilder sb = new StringBuilder(100); boolean endOfSentence = false; while (!endOfSentence) { byte b = buffer.get(); if (b == '\r') endOfSentence = true; else sb.append((char) b); } return sb.toString(); } private void parseSentence(String sentence) { String[] words = sentence.split("[,*]"); if (words[0].equalsIgnoreCase("GPGGA")) this.doTrackPoint(words); // else if (words[0].equalsIgnoreCase("GPRMC")) // this.doTrackPoint(words); } private void doTrackPoint(String[] words) { try { gov.nasa.worldwind.formats.nmea.NmeaTrackPoint point = new gov.nasa.worldwind.formats.nmea.NmeaTrackPoint( words); this.points.add(point); } catch (Exception e) { System.out.printf("Exception %s at sentence number %d for %s\n", e.getMessage(), this.sentenceNumber, this.name); } } }
[ "will.h.brown@gmail.com" ]
will.h.brown@gmail.com
6630e93d7eb6fee042cc4683dc860f18d954e6fe
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
/Research_Bucket/Completed_Archived/dropboxbackup_9_1_18/AndroidData/old/Notsure/data/realvsfake/coinpirates/fakea7f94d45c7e1de8033db7f064189f89e82ac12c1%apk/com/admob/android/ads/AdView$c.java
fe1404d2fc51128924506f61d67a9c960d96ceb8
[]
no_license
dan7800/Research
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
f68ea72c599f74e88dd44d85503cc672474ec12a
refs/heads/master
2021-01-23T09:50:47.744309
2018-09-01T14:56:01
2018-09-01T14:56:01
32,521,867
1
1
null
null
null
null
UTF-8
Java
false
false
1,211
java
package com.admob.android.ads; import android.util.Log; import java.lang.ref.WeakReference; final class AdView$c implements Runnable { private WeakReference<AdView> a; public AdView$c(AdView paramAdView) { this.a = new WeakReference(paramAdView); } public final void run() { AdView localAdView = (AdView)this.a.get(); if ((localAdView == null) || (((AdView.a(localAdView) == null) || (AdView.a(localAdView).getParent() == null)) && (AdView.b(localAdView) != null))) try { AdView.b(localAdView).onFailedToReceiveAd(localAdView); return; } catch (Exception localException2) { Log.w("AdMobSDK", "Unhandled exception raised in your AdListener.onFailedToReceiveAd.", localException2); return; } try { AdView.b(localAdView).onFailedToReceiveRefreshedAd(localAdView); return; } catch (Exception localException1) { Log.w("AdMobSDK", "Unhandled exception raised in your AdListener.onFailedToReceiveRefreshedAd.", localException1); } } } /* Location: * Qualified Name: com.admob.android.ads.AdView.c * Java Class Version: 6 (50.0) * JD-Core Version: 0.6.1-SNAPSHOT */
[ "dan@go.com" ]
dan@go.com
011ddbe694836593e8c92f4360a5ed8692593634
ed882885b1f9760d85dfb3125477aecc0e63d6a5
/net/minecraft/network/rcon/RConConsoleSource.java
a2a5af25e5b975cdd1f92a2246e361d882addc69
[]
no_license
UserNumberOne/Nothing
6c43dd3c92e568252c3873859320b40e10d4a920
7d9a8a40599353cd6f5199653dbecee93b2df7c9
refs/heads/master
2021-01-10T15:25:23.957005
2017-09-13T15:55:46
2017-09-13T15:55:46
46,665,593
0
0
null
null
null
null
UTF-8
Java
false
false
1,745
java
package net.minecraft.network.rcon; import net.minecraft.command.CommandResultStats; import net.minecraft.command.ICommandSender; import net.minecraft.entity.Entity; import net.minecraft.src.MinecraftServer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; public class RConConsoleSource implements ICommandSender { private final StringBuffer buffer = new StringBuffer(); private final MinecraftServer server; public RConConsoleSource(MinecraftServer var1) { this.server = var1; } public void resetLog() { this.buffer.setLength(0); } public String getLogContents() { return this.buffer.toString(); } public String getName() { return "Rcon"; } public ITextComponent getDisplayName() { return new TextComponentString(this.getName()); } public void sendMessage(String var1) { this.buffer.append(var1); } public void sendMessage(ITextComponent var1) { this.buffer.append(var1.getUnformattedText()); } public boolean canUseCommand(int var1, String var2) { return true; } public BlockPos getPosition() { return BlockPos.ORIGIN; } public Vec3d getPositionVector() { return Vec3d.ZERO; } public World getEntityWorld() { return this.server.getEntityWorld(); } public Entity getCommandSenderEntity() { return null; } public boolean sendCommandFeedback() { return true; } public void setCommandStat(CommandResultStats.Type var1, int var2) { } public MinecraftServer h() { return this.server; } }
[ "hazeevaidar@yandex.ru" ]
hazeevaidar@yandex.ru
f9739b294451aef256a0e6b4774ffed924682bfd
be300ca839f4d98da2a7c4f13d45b24d449fdca5
/coupons/src/main/java/top/aprilyolies/coupons/mapper/UserCouponsMapper.java
b1ffcc1b65a701cf1ea50c71e320b1b666715c2b
[]
no_license
hyx-jetbrains/coupons-keeper
7ab7004b447413ffe267f7f68af51c244e423e9f
e04b28b32dab942ea551bf7ee3a46aeb8c5acd90
refs/heads/master
2020-06-30T07:49:54.288720
2019-07-31T08:10:37
2019-07-31T08:10:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,604
java
package top.aprilyolies.coupons.mapper; import org.apache.ibatis.annotations.Mapper; import top.aprilyolies.coupons.pojo.UserCoupon; import java.util.List; /** * @Author EvaJohnson * @Date 2019-07-30 * @Email g863821569@gmail.com */ /** * 用户优惠券 mapper */ @Mapper public interface UserCouponsMapper { /** * 存储用户优惠券信息 * * @param userCoupon 用户优惠券实例 * @return 影响的记录数 */ int saveUserCoupon(UserCoupon userCoupon); /** * 根据用户 id 获取该用户领取的全部优惠券 * * @param userId 用户 id * @return 查询的用户优惠券结果 */ List<UserCoupon> findAllByUserId(int userId); /** * 根据用户 id 获取该用户使用过的全部优惠券 * * @param userId 用户 id * @return 查询的用户使用过的优惠券结果 */ List<UserCoupon> findUsedByUserId(int userId); /** * 根据 userCouponId 查询用户优惠券 * * @param userCouponId 用户优惠券 id * @return 查询的用户优惠券信息 */ UserCoupon findById(int userCouponId); /** * 更新用户优惠券信息 * * @param userCoupon 更新的用户优惠券信息 * @return 影响的记录数 */ int updateUserCoupon(UserCoupon userCoupon); /** * 根据 userId 和 couponId 获取优惠券信息 * * @param userId 用户 id * @param couponId 优惠券 id * @return 优惠券结果 */ UserCoupon findByUserIDAndCouponId(int userId, int couponId); }
[ "863821569@qq.com" ]
863821569@qq.com
61027f547500b84e493461a083bc9a97cb115579
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/cab.snapp.passenger.play_184.apk-decompiled/sources/com/google/android/gms/location/v.java
9df317712989fbe742b7be75b7e9adac07df3942
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
915
java
package com.google.android.gms.location; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.internal.ej; public final class v implements Parcelable.Creator<DetectedActivity> { public final /* synthetic */ Object createFromParcel(Parcel parcel) { int zzd = ej.zzd(parcel); int i = 0; int i2 = 0; while (parcel.dataPosition() < zzd) { int readInt = parcel.readInt(); int i3 = 65535 & readInt; if (i3 == 1) { i = ej.zzg(parcel, readInt); } else if (i3 != 2) { ej.zzb(parcel, readInt); } else { i2 = ej.zzg(parcel, readInt); } } ej.zzaf(parcel, zzd); return new DetectedActivity(i, i2); } public final /* synthetic */ Object[] newArray(int i) { return new DetectedActivity[i]; } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
47e3b3cc0ee53f3301f1ff0daf216a3d02d4b28d
c29612c1cfa7edfa94597545c1e1d7e99d446131
/src/main/java/mods/railcraft/common/gui/containers/ContainerCokeOven.java
13eb3d83f8d8699a47e15af3d9b38abc8f60548f
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
Cchenxinran/Railcraft
657af37fae5122d3c735359a7d31684c579c667b
b73597ce0fb9ad2aaa962f2e912108ef5e8689fc
refs/heads/master
2021-01-17T05:23:46.565588
2015-05-31T23:26:10
2015-05-31T23:26:10
37,012,840
1
0
null
2015-06-07T10:40:49
2015-06-07T10:40:49
null
UTF-8
Java
false
false
4,080
java
/* * Copyright (c) CovertJaguar, 2014 http://railcraft.info * * This code is the property of CovertJaguar * and may only be used with explicit written * permission unless otherwise specified on the * license page at http://railcraft.info/wiki/info:license. */ package mods.railcraft.common.gui.containers; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import mods.railcraft.api.crafting.RailcraftCraftingManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import mods.railcraft.common.blocks.machine.alpha.TileCokeOven; import mods.railcraft.common.gui.slots.SlotFluidContainerEmpty; import mods.railcraft.common.gui.slots.SlotOutput; import mods.railcraft.common.gui.widgets.FluidGaugeWidget; import mods.railcraft.common.fluids.TankManager; import mods.railcraft.common.gui.slots.SlotRailcraft; import mods.railcraft.common.util.inventory.InvTools; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; public class ContainerCokeOven extends RailcraftContainer { private TileCokeOven tile; private int lastCookTime, lastCookTimeTotal; public ContainerCokeOven(InventoryPlayer inventoryplayer, TileCokeOven tile) { super(tile); lastCookTime = 0; this.tile = tile; addWidget(new FluidGaugeWidget(tile.getTankManager().get(0), 90, 24, 176, 0, 48, 47)); addSlot(new SlotCokeOven(tile, 0, 16, 43)); addSlot(new SlotOutput(tile, 1, 62, 43)); addSlot(new SlotOutput(tile, 2, 149, 57)); addSlot(new SlotFluidContainerEmpty(tile, 3, 149, 22)); for (int i = 0; i < 3; i++) { for (int k = 0; k < 9; k++) { addSlot(new Slot(inventoryplayer, k + i * 9 + 9, 8 + k * 18, 84 + i * 18)); } } for (int j = 0; j < 9; j++) { addSlot(new Slot(inventoryplayer, j, 8 + j * 18, 142)); } } @Override public void detectAndSendChanges() { super.detectAndSendChanges(); TankManager tMan = tile.getTankManager(); if (tMan != null) tMan.updateGuiData(this, crafters, 0); for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); int cookTime = tile.getCookTime(); if (lastCookTime != cookTime) icrafting.sendProgressBarUpdate(this, 10, cookTime); int cookTimeTotal = tile.getTotalCookTime(); if (lastCookTimeTotal != cookTimeTotal) icrafting.sendProgressBarUpdate(this, 11, cookTimeTotal); } lastCookTime = tile.getCookTime(); lastCookTimeTotal = tile.getTotalCookTime(); } @Override public void addCraftingToCrafters(ICrafting icrafting) { super.addCraftingToCrafters(icrafting); TankManager tMan = tile.getTankManager(); if (tMan != null) tMan.initGuiData(this, icrafting, 0); icrafting.sendProgressBarUpdate(this, 10, tile.getCookTime()); icrafting.sendProgressBarUpdate(this, 11, tile.getTotalCookTime()); } @Override @SideOnly(Side.CLIENT) public void updateProgressBar(int id, int data) { TankManager tMan = tile.getTankManager(); if (tMan != null) tMan.processGuiUpdate(id, data); switch (id) { case 10: tile.setCookTime(data); break; case 11: tile.cookTimeTotal = data; } } private class SlotCokeOven extends SlotRailcraft { public SlotCokeOven(IInventory iinventory, int slotIndex, int posX, int posY) { super(iinventory, slotIndex, posX, posY); } @Override public boolean isItemValid(ItemStack stack) { if (stack != null && !InvTools.isSynthetic(stack) && RailcraftCraftingManager.cokeOven.getRecipe(stack) != null) return true; return false; } } }
[ "covertjaguar@gmail.com" ]
covertjaguar@gmail.com
fa6a11764341b59a828f338a39630dc0c03af6fc
41f83367f430b77a52fa0bf4d2ac0960d5a6b88b
/app/src/main/java/com/example/customize/HomeFragment.java
aecb1a73984e1d938e621e894e46881ea043a4a6
[]
no_license
anaszia15/Customize
9330de0775389868a3104430a6acc4c818eb9a78
8fef4d1be3f05d1a1605025b59b285ff02dbba65
refs/heads/master
2022-12-30T23:57:06.704466
2020-10-24T15:53:05
2020-10-24T15:53:05
306,917,929
1
0
null
null
null
null
UTF-8
Java
false
false
2,018
java
package com.example.customize; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; /** * A simple {@link Fragment} subclass. * Use the {@link HomeFragment#newInstance} factory method to * create an instance of this fragment. */ public class HomeFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; public HomeFragment() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment HomeFragment. */ // TODO: Rename and change types and number of parameters public static HomeFragment newInstance(String param1,String param2) { HomeFragment fragment = new HomeFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1,param1); args.putString(ARG_PARAM2,param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_home,container,false); } }
[ "you@example.com" ]
you@example.com
623db0d45982eb09f5fca12ab89de147a43124cb
5e2cab8845e635b75f699631e64480225c1cf34d
/modules/core/org.jowidgets.api/src/main/java/org/jowidgets/api/widgets/descriptor/setup/ISplitCompositeSetup.java
f2ddf729286a8c480cb2dfe4a6d915711472a67f
[ "BSD-3-Clause" ]
permissive
alec-liu/jo-widgets
2277374f059500dfbdb376333743d5507d3c57f4
a1dde3daf1d534cb28828795d1b722f83654933a
refs/heads/master
2022-04-18T02:36:54.239029
2018-06-08T13:08:26
2018-06-08T13:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,824
java
/* * Copyright (c) 2010, Michael Grossmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the jo-widgets.org nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ package org.jowidgets.api.widgets.descriptor.setup; import org.jowidgets.common.widgets.descriptor.setup.ISplitCompositeSetupCommon; public interface ISplitCompositeSetup extends ISplitCompositeSetupCommon, IComponentSetup { }
[ "herrgrossmann@users.noreply.github.com" ]
herrgrossmann@users.noreply.github.com
b0485d820b2dddb5a416cb396fc6e551785a5780
c6ed09339ff21fa70f154f34328e869f0dd8e394
/java/spring/annotation_noxml/src/main/java/fits/sample/Sample.java
2e6188d48ce3431f2f3acb59320767ebfdc509f5
[]
no_license
fits/try_samples
f9b15b309a67f7274b505669db4486b17bd1678b
0986e22d78f35d57fe1dd94673b68a4723cb3177
refs/heads/master
2023-08-22T14:35:40.838419
2023-08-07T12:25:07
2023-08-07T12:25:07
642,078
30
19
null
2022-12-28T06:31:24
2010-05-02T02:23:55
Java
UTF-8
Java
false
false
322
java
package fits.sample; import org.springframework.stereotype.Component; @Component public class Sample { private String name; public String getName() { return this.name; } public void setName(String name) { this.name = name; } public void printMessage() { System.out.println("sample : " + this.name); } }
[ "wadays_wozx@nifty.com" ]
wadays_wozx@nifty.com
3b3eb7d466840721917a5f25352e2ce05491a671
e49ddf6e23535806c59ea175b2f7aa4f1fb7b585
/tags/release-7.1.1/src/gov/nih/mipav/model/file/FileInfoJP2.java
5cace2c13bca7986c49c6cb3382f9df30b5524a7
[ "MIT" ]
permissive
svn2github/mipav
ebf07acb6096dff8c7eb4714cdfb7ba1dcace76f
eb76cf7dc633d10f92a62a595e4ba12a5023d922
refs/heads/master
2023-09-03T12:21:28.568695
2019-01-18T23:13:53
2019-01-18T23:13:53
130,295,718
1
0
null
null
null
null
UTF-8
Java
false
false
1,949
java
package gov.nih.mipav.model.file; import gov.nih.mipav.model.structures.*; import gov.nih.mipav.view.dialogs.*; /** * This structures contains the information that describes how a JP2 compressed image of 3D medical image is stored on disk. * * @version 0.1 Mar *, 2007 * @author Dzung Nguyen * @see FileJP2 */ public class FileInfoJP2 extends FileInfoBase { //~ Static fields/initializers ------------------------------------------------------------------------------------- // /** Use serialVersionUID for interoperability. */ // private static final long serialVersionUID = 7421068113479441629L; //~ Instance fields ------------------------------------------------------------------------------------------------ /** DOCUMENT ME! */ String imageDescription = null; //~ Constructors --------------------------------------------------------------------------------------------------- /** * File info storage constructor. * * @param name file name * @param directory directory * @param format file format */ public FileInfoJP2(String name, String directory, int format) { super(name, directory, format); } //~ Methods -------------------------------------------------------------------------------------------------------- /** * Displays the file information. * * @param dlog dialog box that is written to * @param matrix transformation matrix */ public void displayAboutInfo(JDialogBase dlog, TransMatrix matrix) { JDialogText dialog = (JDialogText) dlog; displayPrimaryInfo(dialog, matrix); } /** * DOCUMENT ME! * * @param imageDescription DOCUMENT ME! */ public void setImageDescription(String imageDescription) { this.imageDescription = imageDescription; } }
[ "mccreedy@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96" ]
mccreedy@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96
7b2ba7c5fbc02eb6e48a54c9c6c86e0a20b97f8b
0517f7577c86a69d8fd5a0a96b226167455bcf65
/litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/completion/FromParameterProvider.java
b66ec32123c9c425f46a6f607df9ebee5e4cbae5
[ "Apache-2.0" ]
permissive
facebook/litho
5dea712a19a546af8a36fafcad3bc8cc25bf7aed
7123ae7c7b646d35b92a4f0b5de4f642e9ebe28f
refs/heads/master
2023-09-04T01:44:39.326239
2023-09-02T10:42:41
2023-09-02T10:42:41
80,179,724
8,207
894
Apache-2.0
2023-09-09T05:09:05
2017-01-27T03:59:11
Java
UTF-8
Java
false
false
4,949
java
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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.facebook.litho.intellij.completion; import com.facebook.litho.intellij.LithoPluginUtils; import com.facebook.litho.intellij.extensions.EventLogger; import com.facebook.litho.intellij.logging.LithoLoggerProvider; import com.intellij.codeInsight.completion.CompletionParameters; import com.intellij.codeInsight.completion.CompletionProvider; import com.intellij.codeInsight.completion.CompletionResultSet; import com.intellij.codeInsight.completion.PrioritizedLookupElement; import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.codeInsight.lookup.LookupElementBuilder; import com.intellij.psi.PsiAnnotation; import com.intellij.psi.PsiAnnotationParameterList; import com.intellij.psi.PsiClass; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiField; import com.intellij.psi.PsiJavaCodeReferenceElement; import com.intellij.psi.PsiMethod; import com.intellij.psi.PsiReference; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.util.ProcessingContext; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; public class FromParameterProvider extends CompletionProvider<CompletionParameters> { private final String allowedMethodAnnotation; private final String parameterAnnotation; public FromParameterProvider(String allowedMethodAnnotation, String parameterAnnotation) { this.allowedMethodAnnotation = allowedMethodAnnotation; this.parameterAnnotation = parameterAnnotation; } @Override protected void addCompletions( CompletionParameters completionParameters, ProcessingContext processingContext, CompletionResultSet completionResultSet) { if (completionResultSet == null) { return; } if (completionParameters == null) { return; } if (!LithoPluginUtils.isLithoSpec(completionParameters.getOriginalFile())) { return; } final PsiElement element = completionParameters.getPosition(); final PsiMethod psiMethod = PsiTreeUtil.getParentOfType(element, PsiMethod.class); if (psiMethod == null) { return; } PsiAnnotation annotation = Arrays.stream(psiMethod.getAnnotations()) .filter( methodAnnotation -> allowedMethodAnnotation.contains(methodAnnotation.getQualifiedName())) .findAny() .orElse(null); if (annotation == null) { return; } final PsiAnnotationParameterList annotationParamList = annotation.getParameterList(); if (annotationParamList == null) { return; } final PsiJavaCodeReferenceElement eventClass = PsiTreeUtil.findChildOfType(annotationParamList, PsiJavaCodeReferenceElement.class); // Annotation `Event` class is expected so that its fields can be extracted. if (eventClass == null) { return; } final PsiReference eventReferenceElement = eventClass.getReference(); if (eventReferenceElement == null) { return; } final PsiElement eventReference = eventReferenceElement.resolve(); if (!(eventReference instanceof PsiClass)) { return; } final List<PsiField> eventFields = Arrays.asList(((PsiClass) eventReference).getFields()); eventFields.stream() .map(field -> createLookupElement(field)) .map( lookupElement -> PrioritizedLookupElement.withPriority(lookupElement, Integer.MAX_VALUE)) .forEach(completionResultSet::addElement); } private LookupElement createLookupElement(PsiField eventField) { String fieldType = eventField.getType().getPresentableText(); String fieldName = eventField.getName(); return LookupElementBuilder.create(parameterAnnotation + " " + fieldType + " " + fieldName) .withLookupStrings(Arrays.asList(fieldType, fieldName)) .withPresentableText("@" + parameterAnnotation + " " + fieldType + " " + fieldName) .withInsertHandler( (context, elem) -> { final Map<String, String> data = new HashMap<>(); data.put(EventLogger.KEY_TARGET, EventLogger.VALUE_COMPLETION_TARGET_ARGUMENT); data.put(EventLogger.KEY_CLASS, parameterAnnotation); LithoLoggerProvider.getEventLogger().log(EventLogger.EVENT_COMPLETION, data); }); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
7ed9721efd950c75d7cfb923e6d7c6ea7a2468aa
ad8711303e2a79a322e833da9803a3f18db3b0e5
/EZJava/Intetfaces/src/remocon/RemoteExample2.java
6f4521def6d23b85582f7d93f4a2f24b08780a89
[]
no_license
jsb5589/JAVAStudy
be2f7de7339301c3ce88abd1ef737eab6f3bb15b
efeac440b02a5670c1bf848f41b2fac57f05f3f9
refs/heads/master
2023-07-11T13:24:42.827122
2021-08-18T06:12:24
2021-08-18T06:12:24
395,255,932
0
0
null
null
null
null
UHC
Java
false
false
414
java
package remocon; public class RemoteExample2 { public static void main(String[] args) { // 인터페이스는 객체로 생성할 수 없다. // RemoteControl rc = new RemoteControl(); RemoteControl tv = new Television("삼성"); RemoteControl audio = new Audio(); control(tv); control(audio); } static void control(RemoteControl rc) { rc.turnOn(); rc.setVolume(5); rc.turnOff(); } }
[ "jsb5589@naver.com" ]
jsb5589@naver.com
65755deeade770541f239eb20d5fd8306de349d3
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
/ETforum/src/et/bo/forum/common/io/IO.java
584b3bdb64886e5b888d282765083dfcfb504a00
[]
no_license
sensui74/legacy-project
4502d094edbf8964f6bb9805be88f869bae8e588
ff8156ae963a5c61575ff34612c908c4ccfc219b
refs/heads/master
2020-03-17T06:28:16.650878
2016-01-08T03:46:00
2016-01-08T03:46:00
null
0
0
null
null
null
null
GB18030
Java
false
false
2,590
java
package et.bo.forum.common.io; /** * <p>Title: </p> * <p>Description: 详细见 class :RW</p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: forecast</p> * @author 辜小峰 * @version 1.0 */ //import java.io.*; import et.bo.forum.common.io.basic.*; public class IO { private int buffereSize=1024*5; public IO() { } public static void main(String[] args) { IO io = new IO(); //String s=io.read("c:/sqlnet.log"); String s = "hello guxiaofeng!"; //System.out.println(s); long lB=System.currentTimeMillis(); io.write("c:/ha-io",s,true); io.write("haha",s,true); long lE=System.currentTimeMillis(); System.out.println((lE-lB)); } //将str write File(or append it to FileString absFileName,String str) public void write(String fileName,String str,boolean append){ try { /* FileOutputStream out = new FileOutputStream(FileName,append);//--------java 1.4才有 BufferedOutputStream bufOut = new BufferedOutputStream(out); DataOutputStream dos=new DataOutputStream(bufOut); */ OutFile dos=new OutFile(fileName,append); dos.writeBytes(str); dos.close(); } catch (java.io.FileNotFoundException fnf) { System.out.println("FileNotFoundException"); fnf.printStackTrace(); } catch (java.io.IOException ioe){ System.out.println("IOException"); ioe.printStackTrace(); } } public String read(String fileName){ StringBuffer sb=new StringBuffer(); try{ /* FileInputStream in=new FileInputStream(FileName); BufferedInputStream bufIn=new BufferedInputStream(in,buffereSize); DataInputStream dis=new DataInputStream(bufIn); */ InFile dis=new InFile(fileName); int i; while((i=dis.read())!=-1)sb.append((char)i); dis.close(); }catch (java.io.FileNotFoundException fnf) { System.out.println("FileNotFoundException"); fnf.printStackTrace(); }catch(java.io.EOFException eofe){ eofe.getMessage(); eofe.printStackTrace(); }catch (java.io.IOException ioe){ ioe.getMessage(); ioe.printStackTrace(); } return sb.toString(); } public void setBuffereSize(int buffereSize) { this.buffereSize = buffereSize; } public int getBuffereSize() { return buffereSize; } }
[ "wow_fei@163.com" ]
wow_fei@163.com
d764dc348fe8e1e9ec62c000d1bdaf9e9484f96b
d1d41358e20a9deff0b2ba57b27585e0825be504
/greeting-service/src/main/java/io/openshift/booster/GreetingEndpoint.java
5663aa4b937f82a17b527d930a2b5c46c7b6fbf8
[ "Apache-2.0" ]
permissive
mkouba/wfswarm-circuit-breaker
ab40f8e9e2ec7310ba6fb765939beab009bf1e7c
ca30961f35c7863d6f689f8d8aa394e0168a2318
refs/heads/master
2021-01-09T22:38:25.389329
2017-05-30T14:38:19
2017-05-30T14:38:19
92,735,388
0
0
null
null
null
null
UTF-8
Java
false
false
1,881
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.net.URI; import java.time.LocalDateTime; 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; import javax.ws.rs.core.Response; @Path("/") public class GreetingEndpoint { @Inject URI nameServiceUri; @Inject Client client; @GET @Path("/greeting") @Produces("application/json") public Greeting greeting() { return new Greeting(String.format("Hello, %s!", new NameCommand(nameServiceUri, client).execute())); } /** * This endpoint is used as Kubernetes liveness and readiness probe. * * @return the response */ @GET @Path("/ping") public Response ping() { return Response.ok().build(); } static class Greeting { private final String content; private final String timestamp; public Greeting(String content) { this.content = content; this.timestamp = LocalDateTime.now().toString(); } public String getContent() { return content; } public String getTimestamp() { return timestamp; } } }
[ "mkouba@redhat.com" ]
mkouba@redhat.com
4e11154d347497f8cdfa92814a6648b286cadea5
e26b552cbdae26e099f9f011eb8ed08cfba41315
/bootstrapProject/saludcoop/commons/src/main/java/com/conexia/saludcoop/common/entity/maestro/TipoPlanContrato.java
34e1c7e4ddcc10c15ac6e0e362a9b4239639d8cf
[]
no_license
maes0186/ABBAPrototipo1
3c9575b66360b1960eec0b63e8c549dbbf6c14a5
2d0de9a18b54ee8a17a2ba10a25a4357a6708cd5
refs/heads/master
2021-01-10T07:44:58.067830
2015-11-08T00:38:39
2015-11-08T00:38:39
45,358,707
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
package com.conexia.saludcoop.common.entity.maestro; import javax.persistence.Entity; import javax.persistence.Table; import ar.com.conexia.generic.annotations.Mappeable; import com.conexia.saludcoop.common.dto.TipoPlanContratoDto; @Entity @Table(name = "tipo_plan_contrato", schema="maestros") @Mappeable(mappedTo=TipoPlanContratoDto.class) public class TipoPlanContrato extends Descriptivo { }
[ "maes0186@aa3da725-fa38-4a37-849c-0e1cb1b97359" ]
maes0186@aa3da725-fa38-4a37-849c-0e1cb1b97359
5d743a16217e3d49e88096719e8aba93f05a222a
cb77dcbbce6c480f68c3dcb8610743f027bee95c
/android/art/test/616-cha-interface-default/src/Main.java
951607d2cf892a7bb647df95380fc102db2a22b0
[ "MIT", "Apache-2.0", "NCSA" ]
permissive
fengjixuchui/deoptfuscator
c888b93361d837ef619b9eb95ffd4b01a4bef51a
dec8fbf2b59f8dddf2dbd10868726b255364e1c5
refs/heads/master
2023-03-17T11:49:00.988260
2023-03-09T02:01:47
2023-03-09T02:01:47
333,074,914
0
0
MIT
2023-03-09T02:01:48
2021-01-26T12:16:31
null
UTF-8
Java
false
false
5,524
java
/* * Copyright (C) 2017 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. */ class Main1 implements Base { } class Main2 extends Main1 { public void foobar() {} } class Main3 implements Base { public int foo(int i) { if (i != 3) { printError("error3"); } return -(i + 10); } } public class Main { static Base sMain1; static Base sMain2; static Base sMain3; static boolean sIsOptimizing = true; static boolean sHasJIT = true; static volatile boolean sOtherThreadStarted; private static void assertSingleImplementation(Class<?> clazz, String method_name, boolean b) { if (hasSingleImplementation(clazz, method_name) != b) { System.out.println(clazz + "." + method_name + " doesn't have single implementation value of " + b); } } static int getValue(Class<?> cls) { if (cls == Main1.class || cls == Main2.class) { return 1; } return 3; } // sMain1.foo()/sMain2.foo() will be always be Base.foo() before Main3 is loaded/linked. // So sMain1.foo() can be devirtualized to Base.foo() and be inlined. // After Dummy.createMain3() which links in Main3, live testImplement() on stack // should be deoptimized. static void testImplement(boolean createMain3, boolean wait, boolean setHasJIT) { if (setHasJIT) { if (isInterpreted()) { sHasJIT = false; } return; } if (createMain3 && (sIsOptimizing || sHasJIT)) { assertIsManaged(); } if (sMain1.foo(getValue(sMain1.getClass())) != 11) { System.out.println("11 expected."); } if (sMain1.$noinline$bar() != -1) { System.out.println("-1 expected."); } if (sMain2.foo(getValue(sMain2.getClass())) != 11) { System.out.println("11 expected."); } if (createMain3) { // Wait for the other thread to start. while (!sOtherThreadStarted); // Create an Main2 instance and assign it to sMain2. // sMain1 is kept the same. sMain3 = Dummy.createMain3(); // Wake up the other thread. synchronized(Main.class) { Main.class.notify(); } } else if (wait) { // This is the other thread. synchronized(Main.class) { sOtherThreadStarted = true; // Wait for Main2 to be linked and deoptimization is triggered. try { Main.class.wait(); } catch (Exception e) { } } } // There should be a deoptimization here right after Main3 is linked by // calling Dummy.createMain3(), even though sMain1 didn't change. // The behavior here would be different if inline-cache is used, which // doesn't deoptimize since sMain1 still hits the type cache. if (sMain1.foo(getValue(sMain1.getClass())) != 11) { System.out.println("11 expected."); } if ((createMain3 || wait) && sHasJIT && !sIsOptimizing) { // This method should be deoptimized right after Main3 is created. assertIsInterpreted(); } if (sMain3 != null) { if (sMain3.foo(getValue(sMain3.getClass())) != -13) { System.out.println("-13 expected."); } } } // Test scenarios under which CHA-based devirtualization happens, // and class loading that implements a method can invalidate compiled code. public static void main(String[] args) { System.loadLibrary(args[0]); if (isInterpreted()) { sIsOptimizing = false; } // sMain1 is an instance of Main1. // sMain2 is an instance of Main2. // Neither Main1 nor Main2 override default method Base.foo(). // Main3 hasn't bee loaded yet. sMain1 = new Main1(); sMain2 = new Main2(); ensureJitCompiled(Main.class, "testImplement"); testImplement(false, false, true); if (sHasJIT && !sIsOptimizing) { assertSingleImplementation(Base.class, "foo", true); assertSingleImplementation(Main1.class, "foo", true); } else { // Main3 is verified ahead-of-time so it's linked in already. } // Create another thread that also calls sMain1.foo(). // Try to test suspend and deopt another thread. new Thread() { public void run() { testImplement(false, true, false); } }.start(); // This will create Main3 instance in the middle of testImplement(). testImplement(true, false, false); assertSingleImplementation(Base.class, "foo", false); assertSingleImplementation(Main1.class, "foo", true); assertSingleImplementation(sMain3.getClass(), "foo", true); } private static native void ensureJitCompiled(Class<?> itf, String method_name); private static native void assertIsInterpreted(); private static native void assertIsManaged(); private static native boolean isInterpreted(); private static native boolean hasSingleImplementation(Class<?> clazz, String method_name); } // Put createMain3() in another class to avoid class loading due to verifier. class Dummy { static Base createMain3() { return new Main3(); } }
[ "gyoonus@gmail.com" ]
gyoonus@gmail.com
2b1aa329e7ad0581b9257e742bd5857bc32fc323
3d68de2ad5d8ec4344fc2945cfeb2bd93b40a6e3
/src/main/java/svenhjol/charm/tweaks/item/CharmMusicDiscItem.java
d9248e4ea1a5b10beddb553c62bb2fbe6a718af2
[ "MIT" ]
permissive
pom0328tw/Charm
8fa6602ba450956934079510d7994761af0d00ab
0027843838a2d56b13f7def57ed229130f72c8b7
refs/heads/master
2020-09-29T08:13:35.334664
2019-12-09T21:37:39
2019-12-09T21:37:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,009
java
package svenhjol.charm.tweaks.item; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.item.MusicDiscItem; import net.minecraft.util.NonNullList; import net.minecraft.util.SoundEvent; import svenhjol.meson.MesonModule; import svenhjol.meson.iface.IMesonItem; public class CharmMusicDiscItem extends MusicDiscItem implements IMesonItem { protected String name; protected MesonModule module; public CharmMusicDiscItem(MesonModule module, String name, SoundEvent sound, Properties props, int comparatorValue) { super(comparatorValue, sound, props); this.name = name; this.module = module; register(module, name); } @Override public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) { if (group == ItemGroup.SEARCH) { super.fillItemGroup(group, items); } } @Override public boolean isEnabled() { return module.isEnabled(); } }
[ "sven.hjol@protonmail.com" ]
sven.hjol@protonmail.com
27d5f93f907bba26564c04cb02969a258b825710
47e06c0ab9499bb71a42692666fa312eeac72488
/app/src/main/java/com/kingja/cardpackage/adapter/CarPerAdapter.java
2a41da324b5e19bf78b8eece1db74307ea138920
[]
no_license
KingJA/WisdomE
c1d37693b81c50467015d53c1fdf37011e4bf35c
3bd9b1352d1b29340b7372a4897584b6999f9cb0
refs/heads/master
2020-12-06T17:06:04.240185
2018-06-14T07:31:26
2018-06-14T07:31:26
67,383,264
0
0
null
null
null
null
UTF-8
Java
false
false
3,326
java
package com.kingja.cardpackage.adapter; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.kingja.cardpackage.entiy.IndexData; import com.kingja.cardpackage.util.NoDoubleClickListener; import com.tdr.wisdome.R; import com.tdr.wisdome.actvitiy.CarQrActivity; import java.util.List; /** * Description:TODO * Create Time:2016/8/5 14:32 * Author:KingJA * Email:kingjavip@gmail.com */ public class CarPerAdapter extends BaseLvAdapter<IndexData.ContentBean.PreRateBean> { private OnPreRecordDeleteListener onPreRecordDeleteListener; public CarPerAdapter(Context context, List<IndexData.ContentBean.PreRateBean> list) { super(context, list); } @Override public View simpleGetView(final int position, View convertView, ViewGroup parent) { ViewHolder viewHolder = null; if (convertView == null) { convertView = View .inflate(context, R.layout.item_left_right_del, null); viewHolder = new ViewHolder(convertView); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } viewHolder.name.setText(list.get(position).getPrerateName()); if (list.get(position).getState() == 0) { viewHolder.tvoperation.setText("去登记"); viewHolder.tvoperation.setTextColor(context.getResources().getColor(R.color.colorStatus)); } else if (list.get(position).getState() == 1) { viewHolder.tvoperation.setText("失效"); viewHolder.tvoperation.setTextColor(context.getResources().getColor(R.color.colorHint)); } else { viewHolder.tvoperation.setText("已使用"); viewHolder.tvoperation.setTextColor(context.getResources().getColor(R.color.colorHint)); } viewHolder.tv_delete.setOnClickListener(new NoDoubleClickListener() { @Override public void onNoDoubleClick(View v) { if (onPreRecordDeleteListener != null) { onPreRecordDeleteListener.onPreRecordDelete(list.get(position), position); } } }); viewHolder.tvoperation.setOnClickListener(new NoDoubleClickListener() { @Override public void onNoDoubleClick(View v) { CarQrActivity.goActivity(context, list.get(position)); } }); return convertView; } public interface OnPreRecordDeleteListener { void onPreRecordDelete(IndexData.ContentBean.PreRateBean preRateBean, int position); } public void setOnPreRecordDeleteListener(OnPreRecordDeleteListener onPreRecordDeleteListener) { this.onPreRecordDeleteListener = onPreRecordDeleteListener; } public class ViewHolder { public final TextView name; public final TextView tvoperation; public final TextView tv_delete; public final View root; public ViewHolder(View root) { name = (TextView) root.findViewById(R.id.name); tvoperation = (TextView) root.findViewById(R.id.tv_operation); tv_delete = (TextView) root.findViewById(R.id.tv_delete); this.root = root; } } }
[ "kingjavip@gmail.com" ]
kingjavip@gmail.com
dbba68d9a7cd93ec147f3eca2be3cb0bf3443faa
cacd87f8831b02e254d65c5e86d48264c7493d78
/pc/financesystem/financesystem/src/main/java/com/manji/financesystem/vo/ExcelVO.java
57e96a0586382fdb56a018b42c18ef98a7f71836
[]
no_license
lichaoqian1992/beautifulDay
1a5a30947db08d170968611068673d2f0b626eb2
44e000ecd47099dc5342ab8a208edea73602760b
refs/heads/master
2021-07-24T22:48:33.067359
2017-11-03T09:06:15
2017-11-03T09:06:15
108,791,908
0
3
null
null
null
null
UTF-8
Java
false
false
202
java
package com.manji.financesystem.vo; import lombok.Data; /** * Created by pudding on 2017-2-6. */ @Data public class ExcelVO { private double money; private String userKey; }
[ "1015598423@qq.com" ]
1015598423@qq.com
b12d93503e6fd4d987a7b1b3f6bf68a30b86f8df
12c88da0d397d808bb39d3dd686406eb0b67e38d
/src/zigbo/model/dao/SellingDAO.java
583c0fd0efac5efc51b928ee2672b5782bab0001
[]
no_license
inayun/zigbbo_project
b864aec6e6638411ec6189e8a32043c7336c3c60
2532ac65ceb244765aba26cd39747e8ae3b7ec65
refs/heads/master
2021-01-24T20:25:06.593543
2018-03-27T10:59:06
2018-03-27T10:59:06
123,249,937
1
0
null
null
null
null
UTF-8
Java
false
false
6,879
java
package zigbo.model.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.ResourceBundle; import zigbo.model.dto.SellingDTO; import zigbo.model.dto.SellingMemberDTO; import zigbo.model.util.DBUtil; import java.util.Date; public class SellingDAO { static ResourceBundle sql = DBUtil.getResourceBundle(); /* * CRUD - Create(add/insert), * - Read(one/all) * - Update * - Delete * addSelling //�Ǹű� �ۼ��� getSelling //id�� �Ǹű� �˻� getAllSelling //��� �Ǹű� �˻� updateSellingViews //��ȸ�� ���� updateSellingProgress //������� ���� deleteSelling //�� ���� getMostViews //View ������ 6�� �ҷ����� getMostRecent //�ֽż� 6�� �ҷ����� getMostInterest //������ 6�� �ҷ����� */ public static boolean addSelling(SellingDTO selling) throws SQLException { Connection con = null; PreparedStatement pstmt = null; try { con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("addSelling")); pstmt.setInt(1, selling.getMemberCode()); pstmt.setInt(2, selling.getItemCode()); pstmt.setInt(3, selling.getViews()); pstmt.setString(4, selling.getLocation()); int result = pstmt.executeUpdate(); if(result == 1){ return true; } } finally { DBUtil.close(con, pstmt); } return false; } public static SellingDTO getSelling(int sellingCode) throws SQLException{ Connection con = null; PreparedStatement pstmt = null; ResultSet rset = null; SellingDTO selling = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("getSelling")); pstmt.setInt(1, sellingCode); rset = pstmt.executeQuery(); if (rset.next()) { selling = new SellingDTO(rset.getInt(1), rset.getInt(2), rset.getInt(3), rset.getInt(4), rset.getDate(5), rset.getString(6), rset.getString(7)); } } finally { DBUtil.close(con, pstmt, rset); } return selling; } public static ArrayList<SellingDTO> getAllSelling() throws SQLException{ Connection con = null; PreparedStatement pstmt = null; ResultSet rset = null; ArrayList<SellingDTO> list = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("getAllSelling")); rset = pstmt.executeQuery(); list = new ArrayList<SellingDTO>(); while(rset.next()) { list.add(new SellingDTO(rset.getInt(1), rset.getInt(2), rset.getInt(3), rset.getInt(4), rset.getDate(5), rset.getString(6), rset.getString(7))); } }finally{ DBUtil.close(con, pstmt, rset); } return list; } public static boolean updateSellingViews(int sellingCode) throws SQLException{ Connection con = null; PreparedStatement pstmt = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("updateSellingViews")); pstmt.setInt(1, sellingCode); int result = pstmt.executeUpdate(); if(result == 1){ return true; } }finally{ DBUtil.close(con, pstmt); } return false; } public static boolean updateSellingProgress(int sellingCode) throws SQLException{ Connection con = null; PreparedStatement pstmt = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("updateSellingProgress")); pstmt.setInt(1, sellingCode); int result = pstmt.executeUpdate(); if(result == 1){ return true; } }finally{ DBUtil.close(con, pstmt); } return false; } public static ArrayList<SellingDTO> getMostViews() throws SQLException{ Connection con = null; PreparedStatement pstmt = null; ResultSet rset = null; ArrayList<SellingDTO> list = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("getMostViews")); rset = pstmt.executeQuery(); list = new ArrayList<SellingDTO>(); while(rset.next()){ list.add(new SellingDTO(rset.getInt(1), rset.getInt(2), rset.getInt(3), rset.getInt(4), rset.getDate(5), rset.getString(6), rset.getString(7))); } }finally{ DBUtil.close(con, pstmt, rset); } return list; } public static ArrayList<SellingDTO> getMostRecent() throws SQLException{ Connection con = null; PreparedStatement pstmt = null; ResultSet rset = null; ArrayList<SellingDTO> list = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("getMostRecent")); rset = pstmt.executeQuery(); list = new ArrayList<SellingDTO>(); while(rset.next()){ list.add(new SellingDTO(rset.getInt(1), rset.getInt(2), rset.getInt(3), rset.getInt(4), rset.getDate(5), rset.getString(6), rset.getString(7))); } }finally{ DBUtil.close(con, pstmt, rset); } return list; } public static ArrayList<SellingDTO> getMostInterest() throws SQLException{ Connection con = null; PreparedStatement pstmt = null; ResultSet rset = null; ArrayList<SellingDTO> list = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("getMostInterest")); rset = pstmt.executeQuery(); list = new ArrayList<SellingDTO>(); while(rset.next()){ list.add(new SellingDTO(rset.getInt(1), rset.getInt(2), rset.getInt(3), rset.getInt(4), rset.getDate(5), rset.getString(6), rset.getString(7))); } }finally{ DBUtil.close(con, pstmt, rset); } return list; } public static ArrayList<SellingDTO> getSellingofMember(int memberCode) throws SQLException{ Connection con = null; PreparedStatement pstmt = null; ResultSet rset = null; ArrayList<SellingDTO> list = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("getSellingofMember")); pstmt.setInt(1, memberCode); rset = pstmt.executeQuery(); list = new ArrayList<SellingDTO>(); while(rset.next()){ list.add(new SellingDTO(rset.getInt(1), rset.getInt(2), rset.getInt(3), rset.getInt(4), rset.getDate(5), rset.getString(6), rset.getString(7))); } }finally{ DBUtil.close(con, pstmt, rset); } return list; } public static ArrayList<SellingMemberDTO> getAllSellingMember() throws SQLException{ Connection con = null; PreparedStatement pstmt = null; ResultSet rset = null; ArrayList<SellingMemberDTO> list = null; try{ con = DBUtil.getConnection(); pstmt = con.prepareStatement(sql.getString("getAllSellingMember")); rset = pstmt.executeQuery(); list = new ArrayList<SellingMemberDTO>(); while(rset.next()) { list.add(new SellingMemberDTO(rset.getInt(1), rset.getInt(2), rset.getInt(3), rset.getInt(4), rset.getDate(5), rset.getString(6), rset.getString(7), rset.getString(8))); } }finally{ DBUtil.close(con, pstmt, rset); } return list; } }
[ "ina-yun@hanmail.net" ]
ina-yun@hanmail.net
6f9b8223801518e51a57801cbec3aedb49223e79
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_2751486_0/java/abhishekbiyala/Consonants.java
38ef758798b683d893d163305e29d0950cfa4248
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
1,572
java
package abhi; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Collections; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Scanner; public class Consonants { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(new FileInputStream("A-small-attempt0.in")); PrintWriter out = new PrintWriter(new FileWriter("A-small-attempt0.out")); int totalCases = sc.nextInt(); String name; int n; //For each case for(int i = 1; i <= totalCases; i++) { name = sc.next(); n = sc.nextInt(); out.println("Case #"+i+": "+getNValue(name, n)); } out.close(); } private static long getNValue(String name, int n) { System.out.println("name: " + name); int nValue = 0; for(int i = 0; i < name.length(); i ++) { for(int j = n; j <= name.length() - i; j++) { String sub = name.substring(i, i+j); System.out.print("substring: " + sub); if(matches(sub, n)) { nValue++; } } } return nValue; } private static boolean matches(String sub, int n) { int counter = 0; for(char c: sub.toCharArray()) { if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') { counter = 0; continue; } counter ++; if(counter == n) { System.out.println(". " + true); return true; } } System.out.println(". " + false); return false; } }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
8e5efa425e614de4b84831aec8a6a64a2b39fecf
d3926524e5924b28f31801c6b91bb18991bcd333
/subscription/redis/spring/blocking-position-storage/src/main/java/org/occurrent/subscription/redis/spring/blocking/SpringBlockingSubscriptionPositionStorageForRedis.java
f3b6a8dd698530829159591decefb35d7aa715b3
[]
no_license
Hc747/occurrent
e545cab7839354900adf5c849a08e2418cb02651
50e0db5bdf79d9f4168dd5b5ed4e9ea7761f7751
refs/heads/master
2022-12-27T07:43:16.361342
2020-09-27T06:21:54
2020-09-27T06:21:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,612
java
/* * Copyright 2020 Johan Haleby * * 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.occurrent.subscription.redis.spring.blocking; import org.occurrent.subscription.StringBasedSubscriptionPosition; import org.occurrent.subscription.SubscriptionPosition; import org.occurrent.subscription.api.blocking.BlockingSubscriptionPositionStorage; import org.springframework.data.redis.core.RedisOperations; import static java.util.Objects.requireNonNull; /** * A Spring implementation of {@link BlockingSubscriptionPositionStorage} that stores {@link SubscriptionPosition} in Redis. */ public class SpringBlockingSubscriptionPositionStorageForRedis implements BlockingSubscriptionPositionStorage { private final RedisOperations<String, String> redis; /** * Create a {@link BlockingSubscriptionPositionStorage} that uses the Native sync Java MongoDB driver to persists the subscription position in Redis. * * @param redis The {@link RedisOperations} that'll be used to store the subscription position */ public SpringBlockingSubscriptionPositionStorageForRedis(RedisOperations<String, String> redis) { requireNonNull(redis, "Redis operations cannot be null"); this.redis = redis; } @Override public SubscriptionPosition read(String subscriptionId) { String subscriptionPosition = redis.opsForValue().get(subscriptionId); if (subscriptionPosition == null) { return null; } return new StringBasedSubscriptionPosition(subscriptionPosition); } @Override public SubscriptionPosition save(String subscriptionId, SubscriptionPosition subscriptionPosition) { requireNonNull(subscriptionPosition, SubscriptionPosition.class.getSimpleName() + " cannot be null"); String changeStreamPositionAsString = subscriptionPosition.asString(); redis.opsForValue().set(subscriptionId, changeStreamPositionAsString); return subscriptionPosition; } @Override public void delete(String subscriptionId) { redis.delete(subscriptionId); } }
[ "johan.haleby@gmail.com" ]
johan.haleby@gmail.com
1e23cd0b8eb5eb6743f028def57db5d896f014f9
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/14/org/jfree/chart/plot/CategoryPlot_setDomainAxisLocation_780.java
c6bbde49f95b188c45277b808ab62e366241ef54
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
4,622
java
org jfree chart plot gener plot data link categori dataset categorydataset render data item link categori item render categoryitemrender categori plot categoryplot plot axi plot valueaxisplot set locat domain axi send link plot chang event plotchangeev regist listen param index axi index param locat locat domain axi locat getdomainaxisloc set rang axi locat setrangeaxisloc axi locat axisloc set domain axi locat setdomainaxisloc index axi locat axisloc locat deleg set domain axi locat setdomainaxisloc index locat
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
1f3ccd15df4ce5fe708ad4b7947425604fa2638c
b4c47b649e6e8b5fc48eed12fbfebeead32abc08
/android/provider/UserDictionary.java
bda53cb7b1a0d2f92066e9e01fecfe6b121e12ff
[]
no_license
neetavarkala/miui_framework_clover
300a2b435330b928ac96714ca9efab507ef01533
2670fd5d0ddb62f5e537f3e89648d86d946bd6bc
refs/heads/master
2022-01-16T09:24:02.202222
2018-09-01T13:39:50
2018-09-01T13:39:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,967
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package android.provider; import android.content.*; import android.net.Uri; import android.text.TextUtils; import java.util.Locale; // Referenced classes of package android.provider: // BaseColumns public class UserDictionary { public static class Words implements BaseColumns { public static void addWord(Context context, String s, int i, int j) { if(j != 0 && j != 1) return; Locale locale; if(j == 1) locale = Locale.getDefault(); else locale = null; addWord(context, s, i, null, locale); } public static void addWord(Context context, String s, int i, String s1, Locale locale) { Object obj = null; ContentResolver contentresolver = context.getContentResolver(); if(TextUtils.isEmpty(s)) return; int j = i; if(i < 0) j = 0; i = j; if(j > 255) i = 255; ContentValues contentvalues = new ContentValues(5); contentvalues.put("word", s); contentvalues.put("frequency", Integer.valueOf(i)); if(locale == null) context = obj; else context = locale.toString(); contentvalues.put("locale", context); contentvalues.put("appid", Integer.valueOf(0)); contentvalues.put("shortcut", s1); contentresolver.insert(CONTENT_URI, contentvalues); } public static final String APP_ID = "appid"; public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.google.userword"; public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.google.userword"; public static final Uri CONTENT_URI = Uri.parse("content://user_dictionary/words"); public static final String DEFAULT_SORT_ORDER = "frequency DESC"; public static final String FREQUENCY = "frequency"; public static final String LOCALE = "locale"; public static final int LOCALE_TYPE_ALL = 0; public static final int LOCALE_TYPE_CURRENT = 1; public static final String SHORTCUT = "shortcut"; public static final String WORD = "word"; public static final String _ID = "_id"; public Words() { } } public UserDictionary() { } public static final String AUTHORITY = "user_dictionary"; public static final Uri CONTENT_URI = Uri.parse("content://user_dictionary"); private static final int FREQUENCY_MAX = 255; private static final int FREQUENCY_MIN = 0; }
[ "hosigumayuugi@gmail.com" ]
hosigumayuugi@gmail.com
77ee969f3f41525169acb2bbe1a79d93f7f64d23
1bbfeca83bac53d22b1110ca7f6c9a28bc46c22e
/ru-olymp-regional-2010/problems/triangle/triangle_sm_wrong1.java
77fe33d88caa1bc2c5834790040da199a223470c
[]
no_license
stden/olymp
a633c1dfb1dd8d184a123d6da89f46163d5fad93
d85a4bb0b88797ec878b64db86ad8ec8854a63cd
refs/heads/master
2016-09-06T06:30:56.466755
2013-07-13T08:48:16
2013-07-13T08:48:16
5,158,472
1
0
null
null
null
null
UTF-8
Java
false
false
1,730
java
// забыли последнюю итерацию import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.StringTokenizer; public class triangle_sm_wrong1 { void solve() { int n = nextInt(); assert 2 <= n && n <= 1000; double l = 30; double r = 4000; double prev = nextDouble(); for (int it = 0; it < n - 2; it++) { double cur = nextDouble(); assert 30 <= cur && cur <= 4000; String outcome = nextToken(); assert outcome.equals("closer") || outcome.equals("further"); if (Math.abs(prev - cur) < 1e-6) continue; if (outcome.equals("closer")) { if (cur > prev) { l = Math.max(l, (cur + prev) / 2); } else { r = Math.min(r, (cur + prev) / 2); } } else { if (cur < prev) { l = Math.max(l, (cur + prev) / 2); } else { r = Math.min(r, (cur + prev) / 2); } } prev = cur; } assert r >= l; out.println(l + " " + r); } BufferedReader br; PrintWriter out; StringTokenizer st; void run() { try { br = new BufferedReader(new FileReader("triangle.in")); out = new PrintWriter(new FileWriter("triangle.out")); solve(); out.close(); } catch (IOException e) { e.printStackTrace(); System.exit(1); } } String nextToken() { try { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } catch (Exception e) { return "0"; } } int nextInt() { return Integer.parseInt(nextToken()); } double nextDouble() { return Double.parseDouble(nextToken()); } public static void main(String[] args) { new triangle_sm_wrong1().run(); } }
[ "super.denis@gmail.com" ]
super.denis@gmail.com
19c135844c3f12ba23c57cd92c27b1c387671b8b
3446120c21c6da9653ca410da7f26f30f0061189
/ITTalents/src/homework17/AllWork.java
a1fbc21beed30997427898346c5caa2ac69e6952
[]
no_license
BlagoyNikolov/ITTalentsWorkspace
32eed3c9fc88b241dd92c92334da153a3636100c
af7bd75d444cfc4274a641354788ca7cd2e77068
refs/heads/master
2021-01-23T05:35:30.607462
2018-01-18T20:05:29
2018-01-18T20:05:29
92,970,410
0
0
null
null
null
null
UTF-8
Java
false
false
1,628
java
package homework17; public class AllWork { private Task[] tasks; private int freePlacesForTasks; private int currentUnassignedTask; public Task[] getTasks() { return tasks; } public void setTasks(Task[] tasks) { this.tasks = tasks; } public int getFreePlacesForTasks() { return freePlacesForTasks; } public void setFreePlacesForTasks(int freePlacesForTasks) { this.freePlacesForTasks = freePlacesForTasks; } public void setCurrentUnassignedTask(int currentUnassignedTask) { this.currentUnassignedTask = currentUnassignedTask; } public AllWork() { this.setTasks(new Task[10]); this.setFreePlacesForTasks(10); this.setCurrentUnassignedTask(0); } public void addTask(Task task) { if (task != null) { this.getTasks()[this.getTasks().length - freePlacesForTasks--] = task; } else { System.out.println("Invalid task"); } } public Task getNextTask() { if (currentUnassignedTask == -1) { return null; } for (int i = currentUnassignedTask; i < tasks.length - 1; i++) { if (tasks[i] != null) { Task task = tasks[i]; //tasks[i]= null; currentUnassignedTask++; return task; } } if (tasks[tasks.length - 1] != null) { Task task = tasks[tasks.length - 1]; //tasks[tasks.length - 1] = null; currentUnassignedTask = -1; return task; } return null; } public boolean isAllWorkDone() { boolean flag = false; for (int i = 0; i < this.getTasks().length; i++) { //this.getTasks()[i] == null || if (this.getTasks()[i].getWorkingHours() == 0) { flag = true; } else { flag = false; break; } } return flag; } }
[ "nikolovblagoy@gmail.com" ]
nikolovblagoy@gmail.com
60d95892d594ca71e8d3d0f210e06272e12bd162
04b1803adb6653ecb7cb827c4f4aa616afacf629
/third_party/android_29_sdk/public/sources/android-29/com/android/ex/photo/PhotoViewPager.java
4004a2a5c56e5ced62ebb15d3c42da5da9a5b8e8
[ "Apache-2.0", "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
7,429
java
/* * Copyright (C) 2011 Google Inc. * Licensed to 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 com.android.ex.photo; import android.content.Context; import androidx.core.view.MotionEventCompat; import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; /** * View pager for photo view fragments. Define our own class so we can specify the * view pager in XML. */ public class PhotoViewPager extends ViewPager { /** * A type of intercept that should be performed */ public static enum InterceptType { NONE, LEFT, RIGHT, BOTH } /** * Provides an ability to intercept touch events. * <p> * {@link ViewPager} intercepts all touch events and we need to be able to override this * behavior. Instead, we could perform a similar function by declaring a custom * {@link android.view.ViewGroup} to contain the pager and intercept touch events at a higher * level. */ public static interface OnInterceptTouchListener { /** * Called when a touch intercept is about to occur. * * @param origX the raw x coordinate of the initial touch * @param origY the raw y coordinate of the initial touch * @return Which type of touch, if any, should should be intercepted. */ public InterceptType onTouchIntercept(float origX, float origY); } private static final int INVALID_POINTER = -1; private float mLastMotionX; private int mActivePointerId; /** The x coordinate where the touch originated */ private float mActivatedX; /** The y coordinate where the touch originated */ private float mActivatedY; private OnInterceptTouchListener mListener; public PhotoViewPager(Context context) { super(context); initialize(); } public PhotoViewPager(Context context, AttributeSet attrs) { super(context, attrs); initialize(); } private void initialize() { // Set the page transformer to perform the transition animation // for each page in the view. setPageTransformer(true, new PageTransformer() { @Override public void transformPage(View page, float position) { // The >= 1 is needed so that the page // (page A) that transitions behind the newly visible // page (page B) that comes in from the left does not // get the touch events because it is still on screen // (page A is still technically on screen despite being // invisible). This makes sure that when the transition // has completely finished, we revert it to its default // behavior and move it off of the screen. if (position < 0 || position >= 1.f) { page.setTranslationX(0); page.setAlpha(1.f); page.setScaleX(1); page.setScaleY(1); } else { page.setTranslationX(-position * page.getWidth()); page.setAlpha(Math.max(0,1.f - position)); final float scale = Math.max(0, 1.f - position * 0.3f); page.setScaleX(scale); page.setScaleY(scale); } } }); } /** * {@inheritDoc} * <p> * We intercept touch event intercepts so we can prevent switching views when the * current view is internally scrollable. */ @Override public boolean onInterceptTouchEvent(MotionEvent ev) { final InterceptType intercept = (mListener != null) ? mListener.onTouchIntercept(mActivatedX, mActivatedY) : InterceptType.NONE; final boolean ignoreScrollLeft = (intercept == InterceptType.BOTH || intercept == InterceptType.LEFT); final boolean ignoreScrollRight = (intercept == InterceptType.BOTH || intercept == InterceptType.RIGHT); // Only check ability to page if we can't scroll in one / both directions final int action = ev.getAction() & MotionEventCompat.ACTION_MASK; if (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP) { mActivePointerId = INVALID_POINTER; } switch (action) { case MotionEvent.ACTION_MOVE: { if (ignoreScrollLeft || ignoreScrollRight) { final int activePointerId = mActivePointerId; if (activePointerId == INVALID_POINTER) { // If we don't have a valid id, the touch down wasn't on content. break; } final int pointerIndex = MotionEventCompat.findPointerIndex(ev, activePointerId); final float x = MotionEventCompat.getX(ev, pointerIndex); if (ignoreScrollLeft && ignoreScrollRight) { mLastMotionX = x; return false; } else if (ignoreScrollLeft && (x > mLastMotionX)) { mLastMotionX = x; return false; } else if (ignoreScrollRight && (x < mLastMotionX)) { mLastMotionX = x; return false; } } break; } case MotionEvent.ACTION_DOWN: { mLastMotionX = ev.getX(); // Use the raw x/y as the children can be located anywhere and there isn't a // single offset that would be meaningful mActivatedX = ev.getRawX(); mActivatedY = ev.getRawY(); mActivePointerId = MotionEventCompat.getPointerId(ev, 0); break; } case MotionEventCompat.ACTION_POINTER_UP: { final int pointerIndex = MotionEventCompat.getActionIndex(ev); final int pointerId = MotionEventCompat.getPointerId(ev, pointerIndex); if (pointerId == mActivePointerId) { // Our active pointer going up; select a new active pointer final int newPointerIndex = pointerIndex == 0 ? 1 : 0; mLastMotionX = MotionEventCompat.getX(ev, newPointerIndex); mActivePointerId = MotionEventCompat.getPointerId(ev, newPointerIndex); } break; } } return super.onInterceptTouchEvent(ev); } /** * sets the intercept touch listener. */ public void setOnInterceptTouchListener(OnInterceptTouchListener l) { mListener = l; } }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
50c0ada0773e98e69494e2e9f85b5282477db64f
e47823f99752ec2da083ac5881f526d4add98d66
/test_data/09_Xerces2.7.0/src/org/apache/xml/serialize/Encodings.java
2a61b68e465af64b8a0ae920ba952b09d6d83706
[]
no_license
Echtzeitsysteme/hulk-ase-2016
1dee8aca80e2425ab6acab18c8166542dace25cd
fbfb7aee1b9f29355a20e365f03bdf095afe9475
refs/heads/master
2020-12-24T05:31:49.671785
2017-05-04T08:18:32
2017-05-04T08:18:32
56,681,308
2
0
null
null
null
null
UTF-8
Java
false
false
4,659
java
/* * Copyright 1999-2002,2004 The Apache Software Foundation. * * 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.xml.serialize; import java.io.UnsupportedEncodingException; import java.util.Hashtable; import java.util.Locale; import org.apache.xerces.util.EncodingMap; /** * Provides information about encodings. Depends on the Java runtime * to provides writers for the different encodings, but can be used * to override encoding names and provide the last printable character * for each encoding. * * @version $Id: Encodings.java,v 1.10 2005/06/24 01:32:04 mrglavas Exp $ * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a> */ public class Encodings { /** * The last printable character for unknown encodings. */ static final int DEFAULT_LAST_PRINTABLE = 0x7F; // last printable character for Unicode-compatible encodings static final int LAST_PRINTABLE_UNICODE = 0xffff; // unicode-compliant encodings; can express plane 0 static final String[] UNICODE_ENCODINGS = { "Unicode", "UnicodeBig", "UnicodeLittle", "GB2312", "UTF8", "UTF-16", }; // default (Java) encoding if none supplied: static final String DEFAULT_ENCODING = "UTF8"; // note that the size of this Hashtable // is bounded by the number of encodings recognized by EncodingMap; // therefore it poses no static mutability risk. static Hashtable _encodings = new Hashtable(); /** * @param encoding a MIME charset name, or null. */ static EncodingInfo getEncodingInfo(String encoding, boolean allowJavaNames) throws UnsupportedEncodingException { EncodingInfo eInfo = null; if (encoding == null) { if((eInfo = (EncodingInfo)_encodings.get(DEFAULT_ENCODING)) != null) return eInfo; eInfo = new EncodingInfo(EncodingMap.getJava2IANAMapping(DEFAULT_ENCODING), DEFAULT_ENCODING, LAST_PRINTABLE_UNICODE); _encodings.put(DEFAULT_ENCODING, eInfo); return eInfo; } // need to convert it to upper case: encoding = encoding.toUpperCase(Locale.ENGLISH); String jName = EncodingMap.getIANA2JavaMapping(encoding); if(jName == null) { // see if the encoding passed in is a Java encoding name. if(allowJavaNames ) { EncodingInfo.testJavaEncodingName(encoding); if((eInfo = (EncodingInfo)_encodings.get(encoding)) != null) return eInfo; // is it known to be unicode-compliant? int i=0; for(; i<UNICODE_ENCODINGS.length; i++) { if(UNICODE_ENCODINGS[i].equalsIgnoreCase(encoding)) { eInfo = new EncodingInfo(EncodingMap.getJava2IANAMapping(encoding), encoding, LAST_PRINTABLE_UNICODE); break; } } if(i == UNICODE_ENCODINGS.length) { eInfo = new EncodingInfo(EncodingMap.getJava2IANAMapping(encoding), encoding, DEFAULT_LAST_PRINTABLE); } _encodings.put(encoding, eInfo); return eInfo; } else { throw new UnsupportedEncodingException(encoding); } } if ((eInfo = (EncodingInfo)_encodings.get(jName)) != null) return eInfo; // have to create one... // is it known to be unicode-compliant? int i=0; for(; i<UNICODE_ENCODINGS.length; i++) { if(UNICODE_ENCODINGS[i].equalsIgnoreCase(jName)) { eInfo = new EncodingInfo(encoding, jName, LAST_PRINTABLE_UNICODE); break; } } if(i == UNICODE_ENCODINGS.length) { eInfo = new EncodingInfo(encoding, jName, DEFAULT_LAST_PRINTABLE); } _encodings.put(jName, eInfo); return eInfo; } static final String JIS_DANGER_CHARS = "\\\u007e\u007f\u00a2\u00a3\u00a5\u00ac" +"\u2014\u2015\u2016\u2026\u203e\u203e\u2225\u222f\u301c" +"\uff3c\uff5e\uffe0\uffe1\uffe2\uffe3"; }
[ "sven.peldszus@stud.tu-darmstadt.de" ]
sven.peldszus@stud.tu-darmstadt.de
6079b6b68293e6c1113822a3136e50c36a113783
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/apollographql/apollo/internal/field/MapFieldValueResolver.java
9b8e33a7b5090ad2e61aa9551587f7f6e5ea58f0
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
330
java
package com.apollographql.apollo.internal.field; import com.apollographql.apollo.api.Field; import java.util.Map; public final class MapFieldValueResolver implements FieldValueResolver<Map<String, Object>> { public <T> T valueFor(Map<String, Object> map, Field field) { return map.get(field.responseName()); } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
8f17172e93f226cfb42b12088456320a4b53ecad
1302a788aa73d8da772c6431b083ddd76eef937f
/WORKING_DIRECTORY/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/TvAppVerifierActivity.java
cb50fac7a245f33f7d935e961fecd0bf14a38918
[]
no_license
rockduan/androidN-android-7.1.1_r28
b3c1bcb734225aa7813ab70639af60c06d658bf6
10bab435cd61ffa2e93a20c082624954c757999d
refs/heads/master
2021-01-23T03:54:32.510867
2017-03-30T07:17:08
2017-03-30T07:17:08
86,135,431
2
1
null
null
null
null
UTF-8
Java
false
false
4,573
java
/* * Copyright (C) 2014 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 com.android.cts.verifier.tv; import com.android.cts.verifier.PassFailButtons; import com.android.cts.verifier.R; import android.content.Intent; import android.media.tv.TvContract; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; /** * Base class for TV app tests. */ public abstract class TvAppVerifierActivity extends PassFailButtons.Activity { private static final String TAG = "TvAppVerifierActivity"; private LayoutInflater mInflater; private ViewGroup mItemList; private View mPostTarget; protected View getPostTarget() { return mPostTarget; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mInflater = getLayoutInflater(); // Reusing location_mode_main. View view = mInflater.inflate(R.layout.location_mode_main, null); mPostTarget = mItemList = (ViewGroup) view.findViewById(R.id.test_items); createTestItems(); setContentView(view); setPassFailButtonClickListeners(); setInfoResources(); getPassButton().setEnabled(false); } protected void setButtonEnabled(View item, boolean enabled) { View button = item.findViewById(R.id.user_action_button); button.setFocusable(enabled); button.setClickable(enabled); button.setEnabled(enabled); } protected void setPassState(View item, boolean passed) { ImageView status = (ImageView) item.findViewById(R.id.status); status.setImageResource(passed ? R.drawable.fs_good : R.drawable.fs_error); setButtonEnabled(item, false); status.invalidate(); } protected abstract void createTestItems(); protected abstract void setInfoResources(); /** * Call this to create a test step where the user must perform some action. */ protected View createUserItem(int instructionTextId, int buttonTextId, View.OnClickListener l) { View item = mInflater.inflate(R.layout.tv_item, mItemList, false); TextView instructions = (TextView) item.findViewById(R.id.instructions); instructions.setText(instructionTextId); Button button = (Button) item.findViewById(R.id.user_action_button); button.setVisibility(View.VISIBLE); button.setText(buttonTextId); button.setOnClickListener(l); mItemList.addView(item); return item; } /** * Call this to create a test step where the test automatically evaluates whether * an expected condition is satisfied. */ protected View createAutoItem(int stringId) { View item = mInflater.inflate(R.layout.tv_item, mItemList, false); TextView instructions = (TextView) item.findViewById(R.id.instructions); instructions.setText(stringId); mItemList.addView(item); return item; } /** * Call this to create alternative choice for the previous test step. */ protected View createButtonItem(int buttonTextId, View.OnClickListener l) { View item = mInflater.inflate(R.layout.tv_item, mItemList, false); Button button = (Button) item.findViewById(R.id.user_action_button); button.setVisibility(View.VISIBLE); button.setText(buttonTextId); button.setOnClickListener(l); ImageView status = (ImageView) item.findViewById(R.id.status); status.setVisibility(View.INVISIBLE); TextView instructions = (TextView) item.findViewById(R.id.instructions); instructions.setVisibility(View.GONE); mItemList.addView(item); return item; } static boolean containsButton(View item, View button) { return item == null ? false : item.findViewById(R.id.user_action_button) == button; } }
[ "duanliangsilence@gmail.com" ]
duanliangsilence@gmail.com
ade08bc1e2d85f808d648a4d326fff0e9097d7f8
bde8dfc2cab9852f11167ea1fba072718efd7eeb
/acris-showcase/acris-showcase-appconstructor/src/main/java/sk/seges/acris/scaffold/mvp/Slot.java
196e69c2a334f0d856ae1a9041d06f331987ee0b
[]
no_license
seges/acris
1051395f8900dce44cbaabf373538de6d4a5c565
db8bd8f1533a767a4e43b4b8cc1039b0c8882e70
refs/heads/master
2020-12-13T02:18:28.968038
2015-08-29T13:28:07
2015-08-29T13:28:07
41,421,718
4
1
null
2018-08-21T18:08:35
2015-08-26T11:22:52
Java
UTF-8
Java
false
false
603
java
/** * */ package sk.seges.acris.scaffold.mvp; import sk.seges.acris.mvp.AbstractDisplayAwareActivity; import com.google.gwt.user.client.ui.IsWidget; /** * @author ladislav.gazo */ public class Slot { private String name; private final AbstractDisplayAwareActivity<IsWidget> presenter; public Slot(AbstractDisplayAwareActivity<IsWidget> presenter) { super(); this.presenter = presenter; } public String getName() { return name; } public void setName(String name) { this.name = name; } public AbstractDisplayAwareActivity<IsWidget> getPresenter() { return presenter; } }
[ "sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54" ]
sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54
b7b33c40b6da34f0f2e7116792e386ea7e960af0
2f26ed6f6dac814ebd04548b2cd274246e8c9326
/WEB-INF/src/com/yhaguy/gestion/articulos/ArticuloBrowser.java
1960e42133a751e3de81f9a7378afe4894d98013
[]
no_license
sraul/yhaguy-baterias
ecbac89f922fc88c5268102025affc0a6d07ffb5
7aacfdd3fbca50f9d71c940ba083337a2c80e899
refs/heads/master
2023-08-19T05:21:03.565167
2023-08-18T15:33:08
2023-08-18T15:33:08
144,028,474
0
0
null
null
null
null
UTF-8
Java
false
false
1,642
java
package com.yhaguy.gestion.articulos; import java.util.ArrayList; import java.util.List; import com.coreweb.extras.browser.Browser; import com.coreweb.extras.browser.ColumnaBrowser; import com.yhaguy.domain.Articulo; public class ArticuloBrowser extends Browser { @Override public List<ColumnaBrowser> getColumnasBrowser() { // TODO Auto-generated method stub ColumnaBrowser codInterno = new ColumnaBrowser(); ColumnaBrowser colOriginal = new ColumnaBrowser(); ColumnaBrowser colProveedor = new ColumnaBrowser(); ColumnaBrowser colDescripcion = new ColumnaBrowser(); codInterno.setCampo("codigoInterno"); codInterno.setTitulo("Cod. Interno"); codInterno.setWidthColumna("130px"); colOriginal.setCampo("codigoOriginal"); colOriginal.setTitulo("Cod. Original"); colOriginal.setWidthColumna("130px"); colProveedor.setCampo("codigoProveedor"); colProveedor.setTitulo("Cod. Proveedor"); colProveedor.setWidthColumna("130px"); colDescripcion.setCampo("descripcion"); colDescripcion.setTitulo("Descripción"); List<ColumnaBrowser> columnas = new ArrayList<ColumnaBrowser>(); columnas.add(codInterno); columnas.add(colProveedor); columnas.add(colOriginal); columnas.add(colDescripcion); return columnas; } @SuppressWarnings("rawtypes") @Override public Class getEntidadPrincipal() { // TODO Auto-generated method stub return Articulo.class; } @Override public void setingInicial() { this.addOrden("descripcion"); this.setWidthWindows("900px"); this.setHigthWindows("80%"); } @Override public String getTituloBrowser() { return "Artículo"; } }
[ "sraul@users.noreply.github.com" ]
sraul@users.noreply.github.com
fb176985fdf22c2ebeba662a9c8a1ab3c24ca9f4
7774c3f37fe58c39e502f60b829e33dc98fc0857
/app/src/main/java/com/cvnavi/app/analysis/DeviceTestAnalysisData.java
26736e06506c9ef176c6060ac2703b8b77e0e7c7
[]
no_license
ChenJun1/VehicleTerminalSystem1
3b092f443044faf64bb306499b91d60c776467ab
2a780080be922f27a97a3e85f3562ed831e753d3
refs/heads/master
2021-05-08T00:18:48.276023
2017-10-20T01:39:46
2017-10-20T01:39:46
107,619,362
0
0
null
null
null
null
UTF-8
Java
false
false
7,945
java
package com.cvnavi.app.analysis; import com.cvnavi.app.bean.BaseBean; import com.cvnavi.app.bean.DeviceTestBean; import com.cvnavi.app.commanage.ListenerManager; import com.cvnavi.app.utils.AgreementUtils; import com.cvnavi.app.utils.TextTransformationUtils; import static com.cvnavi.app.utils.TextTransformationUtils.decode; /** * Created by zww on 2017/8/14. */ public class DeviceTestAnalysisData extends AnalysisUiData { private static DeviceTestAnalysisData deviceTestAnalysisData; private static DeviceTestBean deviceTestBean = new DeviceTestBean(); private static BaseBean baseBean = new BaseBean(); private DeviceTestAnalysisData(byte[] datas) { super(datas); } public static DeviceTestAnalysisData getInstance(byte[] datas) { if (deviceTestAnalysisData == null) { deviceTestAnalysisData = new DeviceTestAnalysisData(datas); } deviceTestAnalysisData.setDatas(datas); return deviceTestAnalysisData; } private void setDatas(byte[] datas) { this.datas = datas; } public void sendUi() { String[] value = TextTransformationUtils.bytesToHexStrings(datas); String code = AgreementUtils.agreement_50; short length =TextTransformationUtils.getShort(datas, 3); switch (value[6]+value[7]) { case "0000": //摄像头1状态 int start=7; int cameraState1Size = datas[8]; int cameraState1SizeStart = start + 2; int cameraState1SizeEnd = start + 1 + cameraState1Size; String cameraState1 = decode(TextTransformationUtils.getGbkValue(value, cameraState1SizeStart, cameraState1Size)); deviceTestBean.setCameraState1(cameraState1); //摄像头2状态 int cameraState2Size = datas[cameraState1SizeEnd+1]; int cameraState2SizeStart = cameraState1SizeEnd + 2; int cameraState2SizeEnd = cameraState1SizeEnd + 1 + cameraState1Size; String cameraState2 = decode(TextTransformationUtils.getGbkValue(value, cameraState2SizeStart, cameraState2Size)); deviceTestBean.setCameraState2(cameraState2); //摄像头3状态 int cameraState3Size = datas[cameraState2SizeEnd+1]; int cameraState3SizeStart = cameraState2SizeEnd + 2; int cameraState3SizeEnd = cameraState2SizeEnd + 1 + cameraState2Size; String cameraState3 = decode(TextTransformationUtils.getGbkValue(value, cameraState3SizeStart, cameraState3Size)); deviceTestBean.setCameraState3(cameraState3); //摄像头4状态 int cameraState4Size = datas[cameraState3SizeEnd+1]; int cameraState4SizeStart = cameraState3SizeEnd + 2; int cameraState4SizeEnd = cameraState3SizeEnd + 1 + cameraState3Size; String cameraState4 = decode(TextTransformationUtils.getGbkValue(value, cameraState4SizeStart, cameraState4Size)); deviceTestBean.setCameraState4(cameraState4); //cpu使用率 int cpuUtilizationRateSize = datas[cameraState4SizeEnd+1]; int cpuUtilizationRateSizeStart = cameraState4SizeEnd + 2; int cpuUtilizationRateSizeEnd = cameraState4SizeEnd + 1 + cpuUtilizationRateSize; String cpuUtilizationRate = decode(TextTransformationUtils.getGbkValue(value, cpuUtilizationRateSizeStart, cpuUtilizationRateSize)); deviceTestBean.setCpuUtilizationRate(cpuUtilizationRate); //核心温度 int coreTemperatureSize = datas[cpuUtilizationRateSizeEnd+1]; int coreTemperatureSizeStart = cpuUtilizationRateSizeEnd + 2; int coreTemperatureSizeEnd = cpuUtilizationRateSizeEnd + 1 + coreTemperatureSize; String coreTemperature = decode(TextTransformationUtils.getGbkValue(value, coreTemperatureSizeStart, coreTemperatureSize)); deviceTestBean.setCoreTemperature(coreTemperature); //外部电压 int externalVoltageSize = datas[coreTemperatureSizeEnd+1]; int externalVoltageSizeStart = coreTemperatureSizeEnd + 2; int externalVoltageSizeEnd = coreTemperatureSizeEnd + 1 + externalVoltageSize; String externalVoltage = decode(TextTransformationUtils.getGbkValue(value, externalVoltageSizeStart, externalVoltageSize)); deviceTestBean.setExternalVoltage(externalVoltage); //锂电电压 int batteryVoltageSize = datas[externalVoltageSizeEnd+1]; int batteryVoltageSizeStart = externalVoltageSizeEnd + 2; int batteryVoltageSizeEnd = externalVoltageSizeEnd + 1 + batteryVoltageSize; String batteryVoltage = decode(TextTransformationUtils.getGbkValue(value, batteryVoltageSizeStart, batteryVoltageSize)); deviceTestBean.setBatteryVoltage(batteryVoltage); //容量 int capacitySize = datas[batteryVoltageSizeEnd+1]; int capacitySizeStart = batteryVoltageSizeEnd + 2; int capacitySizeEnd = batteryVoltageSizeEnd + 1 + capacitySize; String capacity = decode(TextTransformationUtils.getGbkValue(value, capacitySizeStart, capacitySize)); deviceTestBean.setCapacity(capacity); //可用 int isAbleSize = datas[capacitySizeEnd+1]; int isAbleSizeStart = capacitySizeEnd + 2; int isAbleSizeEnd = capacitySizeEnd + 1 + isAbleSize; String isAble = decode(TextTransformationUtils.getGbkValue(value, isAbleSizeStart, isAbleSize)); deviceTestBean.setIsAble(isAble); //存贮卡速率 int sdRateSize = datas[isAbleSizeEnd+1]; int sdRateSizeStart = isAbleSizeEnd + 2; int sdRateSizeEnd = isAbleSizeEnd + 1 + sdRateSize; String sdRate = decode(TextTransformationUtils.getGbkValue(value, sdRateSizeStart, sdRateSize)); deviceTestBean.setSdRate(sdRate); //主机总线速率 int hostBusRateSize = datas[sdRateSizeEnd+1]; int hostBusRateSizeStart = sdRateSizeEnd + 2; int hostBusRateSizeEnd = sdRateSizeEnd + 1 + hostBusRateSize; String hostBusRate = decode(TextTransformationUtils.getGbkValue(value, hostBusRateSizeStart, hostBusRateSize)); deviceTestBean.setHostBusRate(hostBusRate); //属性 int attributeSize = datas[hostBusRateSizeEnd+1]; int attributeSizeStart = hostBusRateSizeEnd + 2; int attributeSizeEnd = hostBusRateSizeEnd + 1 + attributeSize; String attribute = decode(TextTransformationUtils.getGbkValue(value, attributeSizeStart, attributeSize)); deviceTestBean.setHostBusRate(attribute); break; case "0001": break; case "0002": break; case "0003": break; case "0004": break; case "0005": break; case "0006": break; case "0007": break; } baseBean.setModel(deviceTestBean); ListenerManager.getInstance(). sendBroadCast(baseBean, code); } }
[ "791954958@qq.com" ]
791954958@qq.com
fe30294a4b8d35f7bf8ea6b64c3d3563f8331129
904837cb17a6fa24f46e33f40e2a0fb2971a3fa5
/spring-data-mongodb-benchmarks/src/main/java/org/springframework/data/mongodb/microbenchmark/MongoResultsWriter.java
4c069a7c60de9c72553fc12bef35aaba5970b1b1
[ "LicenseRef-scancode-generic-cla" ]
no_license
zeau/spring-data-mongodb
0aaa70236d6b74daa270eddd2ec5bc2f748573d1
3d248d1aa650bc1bd3cd86697a125f76cc954f55
refs/heads/master
2021-05-07T15:20:36.390017
2017-11-07T11:47:44
2017-11-07T11:47:44
109,935,821
1
0
null
2017-11-08T06:18:37
2017-11-08T06:18:36
null
UTF-8
Java
false
false
3,775
java
/* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.mongodb.microbenchmark; import java.util.Collection; import java.util.Date; import java.util.List; import org.bson.Document; import org.openjdk.jmh.results.RunResult; import org.springframework.core.env.StandardEnvironment; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import com.mongodb.BasicDBObject; import com.mongodb.MongoClient; import com.mongodb.MongoClientURI; import com.mongodb.client.MongoDatabase; import com.mongodb.util.JSON; /** * MongoDB specific {@link ResultsWriter} implementation. * * @author Christoph Strobl * @since 2.0 */ class MongoResultsWriter implements ResultsWriter { private final String uri; MongoResultsWriter(String uri) { this.uri = uri; } @Override public void write(Collection<RunResult> results) { Date now = new Date(); StandardEnvironment env = new StandardEnvironment(); String projectVersion = env.getProperty("project.version", "unknown"); String gitBranch = env.getProperty("git.branch", "unknown"); String gitDirty = env.getProperty("git.dirty", "no"); String gitCommitId = env.getProperty("git.commit.id", "unknown"); MongoClientURI uri = new MongoClientURI(this.uri); MongoClient client = new MongoClient(uri); String dbName = StringUtils.hasText(uri.getDatabase()) ? uri.getDatabase() : "spring-data-mongodb-benchmarks"; MongoDatabase db = client.getDatabase(dbName); for (BasicDBObject dbo : (List<BasicDBObject>) JSON.parse(ResultsWriter.jsonifyResults(results))) { String collectionName = extractClass(dbo.get("benchmark").toString()); Document sink = new Document(); sink.append("_version", projectVersion); sink.append("_branch", gitBranch); sink.append("_commit", gitCommitId); sink.append("_dirty", gitDirty); sink.append("_method", extractBenchmarkName(dbo.get("benchmark").toString())); sink.append("_date", now); sink.append("_snapshot", projectVersion.toLowerCase().contains("snapshot")); sink.putAll(dbo); db.getCollection(collectionName).insertOne(fixDocumentKeys(sink)); } client.close(); } /** * Replace {@code .} by {@code ,}. * * @param doc * @return */ private Document fixDocumentKeys(Document doc) { Document sanitized = new Document(); for (Object key : doc.keySet()) { Object value = doc.get(key); if (value instanceof Document) { value = fixDocumentKeys((Document) value); } else if (value instanceof BasicDBObject) { value = fixDocumentKeys(new Document((BasicDBObject) value)); } if (key instanceof String) { String newKey = (String) key; if (newKey.contains(".")) { newKey = newKey.replace('.', ','); } sanitized.put(newKey, value); } else { sanitized.put(ObjectUtils.nullSafeToString(key).replace('.', ','), value); } } return sanitized; } private static String extractClass(String source) { String tmp = source.substring(0, source.lastIndexOf('.')); return tmp.substring(tmp.lastIndexOf(".") + 1); } private static String extractBenchmarkName(String source) { return source.substring(source.lastIndexOf(".") + 1); } }
[ "mpaluch@pivotal.io" ]
mpaluch@pivotal.io
fac04828ee6e954f5751c6761575899f0773003a
821ed0666d39420d2da9362d090d67915d469cc5
/web/api/src/test/java/org/onosproject/rest/ResourceTest.java
097d42f124a1d01c753813aa6d8d9c8a2d9483ca
[ "Apache-2.0" ]
permissive
LenkayHuang/Onos-PNC-for-PCEP
03b67dcdd280565169f2543029279750da0c6540
bd7d201aba89a713f5ba6ffb473aacff85e4d38c
refs/heads/master
2021-01-01T05:19:31.547809
2016-04-12T07:25:13
2016-04-12T07:25:13
56,041,394
1
0
null
null
null
null
UTF-8
Java
false
false
2,290
java
/* * Copyright 2015 Open Networking Laboratory * * 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.onosproject.rest; import java.io.IOException; import java.net.ServerSocket; import com.sun.jersey.spi.container.servlet.ServletContainer; import com.sun.jersey.test.framework.AppDescriptor; import com.sun.jersey.test.framework.JerseyTest; import com.sun.jersey.test.framework.WebAppDescriptor; /** * Base class for REST API tests. Performs common configuration operations. */ public class ResourceTest extends JerseyTest { /** * Creates a new web-resource test. */ public ResourceTest() { super(); } /** * Creates a new web-resource test initialized according to the specified * web application class. */ protected ResourceTest(Class<?> webAppClass) { super(new WebAppDescriptor.Builder("javax.ws.rs.Application", webAppClass.getCanonicalName()) .servletClass(ServletContainer.class).build()); } /** * Assigns an available port for the test. * * @param defaultPort If a port cannot be determined, this one is used. * @return free port */ @Override public int getPort(int defaultPort) { try { ServerSocket socket = new ServerSocket(0); socket.setReuseAddress(true); int port = socket.getLocalPort(); socket.close(); return port; } catch (IOException ioe) { return defaultPort; } } @Override public AppDescriptor configure() { return new WebAppDescriptor.Builder("org.onosproject.rest").build(); } }
[ "826080529@qq.com" ]
826080529@qq.com
9742d703a9666cf8ca0dc7b504ce83d312acfc45
7f20b1bddf9f48108a43a9922433b141fac66a6d
/cytoscape/branches/Cyto-2_3_x-release-branch/src/cytoscape/visual/GlobalAppearance.java
33dd1d68fd9f9cd137b82ef32bfcd8e6dffb253d
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,353
java
/* File: GlobalAppearance.java Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org) The Cytoscape Consortium is: - Institute for Systems Biology - University of California San Diego - Memorial Sloan-Kettering Cancer Center - Institut Pasteur - Agilent Technologies 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. The software and documentation provided hereunder is on an "as is" basis, and the Institute for Systems Biology and the Whitehead Institute have no obligations to provide maintenance, support, updates, enhancements or modifications. In no event shall the Institute for Systems Biology and the Whitehead Institute be liable to any party for direct, indirect, special, incidental or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if the Institute for Systems Biology and the Whitehead Institute have been advised of the possibility of such damage. 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. */ //---------------------------------------------------------------------------- // $Revision$ // $Date$ // $Author$ //---------------------------------------------------------------------------- package cytoscape.visual; //---------------------------------------------------------------------------- import java.awt.Color; //---------------------------------------------------------------------------- /** * Objects of this class hold data describing global appearance attributes of * the graph window. */ public class GlobalAppearance { Color backgroundColor; Color sloppySelectionColor; private Color nodeSelectionColor; private Color nodeReverseSelectionColor; private Color edgeSelectionColor; private Color edgeReverseSelectionColor; public GlobalAppearance() { } public Color getBackgroundColor() { return backgroundColor; } public void setBackgroundColor(Color c) { backgroundColor = c; } public Color getSloppySelectionColor() { return sloppySelectionColor; } public void setSloppySelectionColor(Color c) { sloppySelectionColor = c; } public Color getNodeSelectionColor() { return nodeSelectionColor; } public void setNodeSelectionColor(Color c) { nodeSelectionColor = c; } public Color getNodeReverseSelectionColor() { return nodeReverseSelectionColor; } public void setNodeReverseSelectionColor(Color c) { nodeReverseSelectionColor = c; } public Color getEdgeSelectionColor() { return edgeSelectionColor; } public void setEdgeSelectionColor(Color c) { edgeSelectionColor = c; } public Color getEdgeReverseSelectionColor() { return edgeReverseSelectionColor; } public void setEdgeReverseSelectionColor(Color c) { edgeReverseSelectionColor = c; } }
[ "mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
737325ea1e2ee2dbea4c6e2481eefbfb8ead34b4
97d748f3b74945fe9852c327e01c02f86cf008fb
/Misc/StackOnQueueApp.java
77755ccb61db55d6b44ac15c196bb2796bd962c5
[]
no_license
SRELETI/AlgosAndDS
929ac8619307cae5a809fde1731787cd5a11f212
299001f6344feeaae309c94def2122e195435766
refs/heads/master
2021-01-20T22:10:42.148411
2016-07-11T00:26:44
2016-07-11T00:26:44
63,024,640
1
0
null
null
null
null
UTF-8
Java
false
false
251
java
public class StackOnQueueApp { public static void main(String args[]) { int length=5; StackOnQueue sd=new StackOnQueue(length); sd.push(5); sd.push(4); sd.push(3); sd.push(2); sd.push(1); sd.push(0); sd.pop(); } }
[ "sudeepreddyeleti@gmail.com" ]
sudeepreddyeleti@gmail.com
1ac158666e84736e67801254a46e0b9e61ae2b2a
35ca1144aaa0405079b59c2fcbcd726f2472246d
/src/main/java/us/fok/lenzenslijper/models/jooq/routines/GeometryOverright.java
fcc62c5121f1853c68e15d5753cadd1c647b08a2
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
fokus-llc/lenzenslijper
a1e152fdb0a808f97496e7b09b609b7101a1e956
861d741a739c976c96b2821d0b5361c8aae99f69
refs/heads/master
2021-01-16T00:22:18.583402
2014-10-28T02:39:16
2014-10-28T02:39:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,329
java
/** * This class is generated by jOOQ */ package us.fok.lenzenslijper.models.jooq.routines; /** * This class is generated by jOOQ. */ @javax.annotation.Generated(value = { "http://www.jooq.org", "3.3.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class GeometryOverright extends org.jooq.impl.AbstractRoutine<java.lang.Boolean> { private static final long serialVersionUID = 1435094069; /** * The parameter <code>public.geometry_overright.RETURN_VALUE</code>. */ public static final org.jooq.Parameter<java.lang.Boolean> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BOOLEAN); /** * The parameter <code>public.geometry_overright.geom1</code>. */ public static final org.jooq.Parameter<java.lang.Object> GEOM1 = createParameter("geom1", org.jooq.impl.DefaultDataType.getDefaultDataType("USER-DEFINED")); /** * The parameter <code>public.geometry_overright.geom2</code>. */ public static final org.jooq.Parameter<java.lang.Object> GEOM2 = createParameter("geom2", org.jooq.impl.DefaultDataType.getDefaultDataType("USER-DEFINED")); /** * Create a new routine call instance */ public GeometryOverright() { super("geometry_overright", us.fok.lenzenslijper.models.jooq.Public.PUBLIC, org.jooq.impl.SQLDataType.BOOLEAN); setReturnParameter(RETURN_VALUE); addInParameter(GEOM1); addInParameter(GEOM2); } /** * Set the <code>geom1</code> parameter IN value to the routine */ public void setGeom1(java.lang.Object value) { setValue(us.fok.lenzenslijper.models.jooq.routines.GeometryOverright.GEOM1, value); } /** * Set the <code>geom1</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setGeom1(org.jooq.Field<java.lang.Object> field) { setField(GEOM1, field); } /** * Set the <code>geom2</code> parameter IN value to the routine */ public void setGeom2(java.lang.Object value) { setValue(us.fok.lenzenslijper.models.jooq.routines.GeometryOverright.GEOM2, value); } /** * Set the <code>geom2</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setGeom2(org.jooq.Field<java.lang.Object> field) { setField(GEOM2, field); } }
[ "oss+fokus@teleological.net" ]
oss+fokus@teleological.net
9a465d1ae9f6c9532a179cd974a0136f186fe3a1
3bb932947a00b2f77deb1f9294340710f30ed2e0
/data/comp-changes-old/src/main/fieldStaticAndOverridesStatic/FieldStaticAndOverridesStaticMultiS.java
57cc4476ac888dea63d7d65ce0f9a5c67ba1aec0
[ "MIT" ]
permissive
crossminer/maracas
17684657b29293d82abe50249798e10312d192d6
4cb6fa22d8186d09c3bba6f5da0c548a26d044e1
refs/heads/master
2023-03-05T20:34:36.083662
2023-02-22T12:21:47
2023-02-22T12:21:47
175,425,329
8
0
null
2021-02-25T13:19:15
2019-03-13T13:21:53
Java
UTF-8
Java
false
false
144
java
package main.fieldStaticAndOverridesStatic; public class FieldStaticAndOverridesStaticMultiS extends FieldStaticAndOverridesStaticMultiSS { }
[ "lina.m8a@gmail.com" ]
lina.m8a@gmail.com
5b09c2d90fe9f44e0f42475c90b7e5bf8ac2b05b
dea96d9c6f510d759bb00cb214c4fcd1ac7b32cd
/ElasticStack/Study_ElasticSearch_Code/src/main/java/ESHightApi.java
04e2dae88c06935edc3c9418181713ae59764f68
[ "MIT" ]
permissive
moxi624/LearningNotes
cf92103f6a2592b9017f27bdfac57459ef8e1f6a
bb62ae291955944d4d73acaaf4531786314214ac
refs/heads/master
2023-03-08T03:59:32.137474
2022-10-10T15:21:48
2022-10-10T15:21:59
229,531,057
618
156
MIT
2023-03-07T02:14:59
2019-12-22T07:03:57
Java
UTF-8
Java
false
false
7,204
java
import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpHost; import org.apache.http.util.EntityUtils; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.delete.DeleteRequest; import org.elasticsearch.action.delete.DeleteResponse; import org.elasticsearch.action.get.GetRequest; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.action.update.UpdateResponse; import org.elasticsearch.client.*; import org.elasticsearch.common.Strings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; /** * ES高级客户端 * * @author: 陌溪 * @create: 2020-09-23-16:56 */ public class ESHightApi { private RestHighLevelClient client; public void init() { RestClientBuilder restClientBuilder = RestClient.builder( new HttpHost("202.193.56.222", 9200, "http")); this.client = new RestHighLevelClient(restClientBuilder); } public void after() throws Exception { this.client.close(); } /** * 新增文档,同步操作 * * @throws Exception */ public void testCreate() throws Exception { Map<String, Object> data = new HashMap<>(); data.put("id", "2002"); data.put("title", "南京西路 拎包入住 一室一厅"); data.put("price", "4500"); IndexRequest indexRequest = new IndexRequest("haoke", "house") .source(data); IndexResponse indexResponse = this.client.index(indexRequest, RequestOptions.DEFAULT); System.out.println("id->" + indexResponse.getId()); System.out.println("index->" + indexResponse.getIndex()); System.out.println("type->" + indexResponse.getType()); System.out.println("version->" + indexResponse.getVersion()); System.out.println("result->" + indexResponse.getResult()); System.out.println("shardInfo->" + indexResponse.getShardInfo()); } /** * 异步创建文档 * @throws Exception */ public void testCreateAsync() throws Exception { Map<String, Object> data = new HashMap<>(); data.put("id", "2003"); data.put("title", "南京东路 最新房源 二室一厅"); data.put("price", "5500"); IndexRequest indexRequest = new IndexRequest("haoke", "house") .source(data); this.client.indexAsync(indexRequest, RequestOptions.DEFAULT, new ActionListener<IndexResponse>() { @Override public void onResponse(IndexResponse indexResponse) { System.out.println("id->" + indexResponse.getId()); System.out.println("index->" + indexResponse.getIndex()); System.out.println("type->" + indexResponse.getType()); System.out.println("version->" + indexResponse.getVersion()); System.out.println("result->" + indexResponse.getResult()); System.out.println("shardInfo->" + indexResponse.getShardInfo()); } @Override public void onFailure(Exception e) { System.out.println(e); } }); System.out.println("ok"); Thread.sleep(20000); } /** * 查询 * @throws Exception */ public void testQuery() throws Exception { GetRequest getRequest = new GetRequest("haoke", "house", "GkpdE2gBCKv8opxuOj12"); // 指定返回的字段 String[] includes = new String[]{"title", "id"}; String[] excludes = Strings.EMPTY_ARRAY; FetchSourceContext fetchSourceContext = new FetchSourceContext(true, includes, excludes); getRequest.fetchSourceContext(fetchSourceContext); GetResponse response = this.client.get(getRequest, RequestOptions.DEFAULT); System.out.println("数据 -> " + response.getSource()); } /** * 判断是否存在 * * @throws Exception */ public void testExists() throws Exception { GetRequest getRequest = new GetRequest("haoke", "house", "GkpdE2gBCKv8opxuOj12"); // 不返回的字段 getRequest.fetchSourceContext(new FetchSourceContext(false)); boolean exists = this.client.exists(getRequest, RequestOptions.DEFAULT); System.out.println("exists -> " + exists); } /** * 删除数据 * * @throws Exception */ public void testDelete() throws Exception { DeleteRequest deleteRequest = new DeleteRequest("haoke", "house", "GkpdE2gBCKv8opxuOj12"); DeleteResponse response = this.client.delete(deleteRequest, RequestOptions.DEFAULT); System.out.println(response.status());// OK or NOT_FOUND } /** * 更新数据 * * @throws Exception */ public void testUpdate() throws Exception { UpdateRequest updateRequest = new UpdateRequest("haoke", "house", "G0pfE2gBCKv8opxuRz1y"); Map<String, Object> data = new HashMap<>(); data.put("title", "张江高科2"); data.put("price", "5000"); updateRequest.doc(data); UpdateResponse response = this.client.update(updateRequest, RequestOptions.DEFAULT); System.out.println("version -> " + response.getVersion()); } /** * 测试搜索 * * @throws Exception */ public void testSearch() throws Exception { SearchRequest searchRequest = new SearchRequest("haoke"); searchRequest.types("house"); SearchSourceBuilder sourceBuilder = new SearchSourceBuilder(); sourceBuilder.query(QueryBuilders.matchQuery("title", "拎包入住")); sourceBuilder.from(0); sourceBuilder.size(5); sourceBuilder.timeout(new TimeValue(60, TimeUnit.SECONDS)); searchRequest.source(sourceBuilder); SearchResponse search = this.client.search(searchRequest, RequestOptions.DEFAULT); System.out.println("搜索到 " + search.getHits().totalHits + " 条数据."); SearchHits hits = search.getHits(); for (SearchHit hit : hits) { System.out.println(hit.getSourceAsString()); } } public static void main(String[] args) throws Exception { ESHightApi esHightApi = new ESHightApi(); esHightApi.init(); esHightApi.testCreate(); } }
[ "xzx19950624@qq.com" ]
xzx19950624@qq.com
53324227a81190f93ab0ac06d1d4e80a4b1fb8db
aaa9649c3e52b2bd8e472a526785f09e55a33840
/EquationCommonStubs/src/com/misys/equation/common/test/pv/AMMR10R.java
c26a02fb37262723afde1a02392b1f0a3d364cdb
[]
no_license
jcmartin2889/Repo
dbfd02f000e65c96056d4e6bcc540e536516d775
259c51703a2a50061ad3c99b8849477130cde2f4
refs/heads/master
2021-01-10T19:34:17.555112
2014-04-29T06:01:01
2014-04-29T06:01:01
19,265,367
1
0
null
null
null
null
UTF-8
Java
false
false
440
java
package com.misys.equation.common.test.pv; import com.misys.equation.common.test.EquationTestCasePVMetaData; public class AMMR10R extends EquationTestCasePVMetaData { // This attribute is used to store cvs version information. public static final String _revision = "$Id: AMMR10R.java 7610 2010-06-01 17:10:41Z MACDONP1 $"; @Override public void setUp() throws Exception { super.setUp(); validCCN = "A"; invalidCCN = "Z"; } }
[ "jomartin@MAN-D7R8ZYY1.misys.global.ad" ]
jomartin@MAN-D7R8ZYY1.misys.global.ad
05e8ff4ad7ac91103c602ad3bfc320e76d8ee283
4881de9676e55f336ec29a5d70e8e788168d891d
/modules/flowable5-cxf-test/src/test/java/org/activiti/engine/impl/webservice/WebServiceMockImpl.java
7d691dff647f3a82d9b2f607872671837cdde6ad
[ "Apache-2.0" ]
permissive
627721565/flowable-engine
2bad6cd80a3f4d78e0c5979a2ebf8e61c36b92da
35e9b1121bf141732ab7e08a8f09a9c9c123ef00
refs/heads/master
2021-01-13T06:49:08.750402
2017-02-06T19:20:10
2017-02-06T19:20:10
81,152,995
3
0
null
2017-02-07T01:39:58
2017-02-07T01:39:58
null
UTF-8
Java
false
false
2,483
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.activiti.engine.impl.webservice; import java.util.Date; import javax.jws.WebService; /** * An implementation of a Counter WS * * @author Esteban Robles Luna */ @WebService(endpointInterface = "org.activiti.engine.impl.webservice.WebServiceMock", serviceName = "WebServiceMock") public class WebServiceMockImpl implements WebServiceMock { protected int count; protected WebServiceDataStructure dataStructure = new WebServiceDataStructure(); public WebServiceMockImpl() { this.count = -1; this.dataStructure = new WebServiceDataStructure(); } /** * {@inheritDoc} */ public int getCount() { return this.count; } /** * {@inheritDoc} */ public void inc() throws MaxValueReachedFault { if (this.count == 123456) { throw new RuntimeException("A runtime exception not expected in the processing of the web-service"); } else if (this.count != Integer.MAX_VALUE) { this.count++; } else { throw new MaxValueReachedFault(); } } /** * {@inheritDoc} */ public void reset() { this.setTo(0); } /** * {@inheritDoc} */ public void setTo(int value) { this.count = value; } /** * {@inheritDoc} */ public String prettyPrintCount(String prefix, String suffix) { return prefix + this.getCount() + suffix; } /** * {@inheritDoc} */ public void setDataStructure(String str, Date date) { this.dataStructure.eltString = str; this.dataStructure.eltDate = date; } /** * {@inheritDoc} */ public WebServiceDataStructure getDataStructure() { return this.dataStructure; } /** * {@inheritDoc} */ public String noNameResult(String prefix, String suffix) { return prefix + this.getCount() + suffix; } /** * {@inheritDoc} */ public String reservedWordAsName(String prefix, String suffix) { return prefix + this.getCount() + suffix; } }
[ "tijs.rademakers@gmail.com" ]
tijs.rademakers@gmail.com
f8c70070da3df5dee88f3f024d9f8021c531fbc5
cb2eb1134e25724a20e656570678ddcdff3357b7
/src/test/java/com/devops/pgr301/ApplicationTests.java
9b2b6dfefdf3a78a0f7596abb0845389e91ce6ad
[]
no_license
thatra94/Devops-Exam-2019-Application
a643dc10d1f4350198013847d42dee1bc2a4ed91
5960dac4e2973473047e051aab6e5f3c3b715fba
refs/heads/master
2022-03-29T08:23:47.561688
2020-01-13T15:46:11
2020-01-13T15:46:11
216,653,878
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
package com.devops.pgr301; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class ApplicationTests { @Test void contextLoads() { } }
[ "you@example.com" ]
you@example.com
c0cafdeca1888ca6ad4c5142ed3c8e21dd2470dd
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/MATH-81b-6-18-Single_Objective_GGA-WeightedSum/org/apache/commons/math/linear/EigenDecompositionImpl_ESTest_scaffolding.java
cfaf70778939f33822c25b18f897efa291d3e745
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
3,096
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Mar 30 14:52:01 UTC 2020 */ package org.apache.commons.math.linear; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class EigenDecompositionImpl_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.linear.EigenDecompositionImpl"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(EigenDecompositionImpl_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.MathException", "org.apache.commons.math.linear.EigenDecompositionImpl", "org.apache.commons.math.linear.DecompositionSolver", "org.apache.commons.math.ConvergenceException", "org.apache.commons.math.linear.AnyMatrix", "org.apache.commons.math.MathRuntimeException", "org.apache.commons.math.linear.InvalidMatrixException", "org.apache.commons.math.linear.RealVector", "org.apache.commons.math.MathRuntimeException$1", "org.apache.commons.math.linear.RealMatrix", "org.apache.commons.math.MathRuntimeException$2", "org.apache.commons.math.MaxIterationsExceededException", "org.apache.commons.math.MathRuntimeException$3", "org.apache.commons.math.MathRuntimeException$4", "org.apache.commons.math.MathRuntimeException$5", "org.apache.commons.math.linear.EigenDecomposition", "org.apache.commons.math.MathRuntimeException$6", "org.apache.commons.math.MathRuntimeException$7", "org.apache.commons.math.MathRuntimeException$8", "org.apache.commons.math.MathRuntimeException$10", "org.apache.commons.math.MathRuntimeException$9" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3283041fbc6e79e50358b3bb0bf5703435242eee
ba931fecd41afe86af67e76278f80c89fb3b660f
/gradingsystem/feedbackprototype/ProtoSubmissionsManager.java
403c34077628831e1af3b504d69ceb7075539926
[]
no_license
Abedoy/Homework-Grading-System
c51a602ab6416789fc389578e7e26119f360fec7
a4e2083f35134e6e06a312edfb9f42ee308b6964
refs/heads/master
2020-03-26T23:10:34.257924
2016-11-04T05:54:02
2016-11-04T05:54:02
62,358,785
0
0
null
null
null
null
UTF-8
Java
false
false
1,665
java
package edu.csustan.gradingsystem.feedbackprototype; import java.io.File; import java.io.FileNotFoundException; import java.util.*; import edu.csustan.gradingsystem.domain.StudentSubmission; public class ProtoSubmissionsManager { public List<StudentSubmission> loadedSubmissions; public ProtoSubmissionsManager() { this.loadedSubmissions = new ArrayList<>(); } public void instantiateFromCSV() throws FileNotFoundException { int submissionID; int submissionCount; Date submissionDate; String sourceFile; String instructorFeedback; int studentID; int facultyID; int assignmentNo; try (Scanner scanner = new Scanner(new File("submissions.csv"))) { scanner.useDelimiter(","); //Get all tokens and store them in some data structure //I am just printing them while (scanner.hasNext()) { submissionID = Integer.parseInt(scanner.next().trim()); submissionDate = java.sql.Date.valueOf(scanner.next()); instructorFeedback = "notUsed"; studentID = scanner.nextInt(); facultyID = scanner.nextInt(); assignmentNo= scanner.nextInt(); loadedSubmissions.add(new StudentSubmission(studentID,facultyID,assignmentNo )); } } } //right now for prototype purposes submission count is submission ID public StudentSubmission getSubmissionByID(int tID) { for (StudentSubmission S: loadedSubmissions) { if (S.getSubmissionCount() == tID) { return S; } } return null; } }
[ "a" ]
a
24cfff50fbf8c41e2ca1d760a951f25892c08ef0
3b510e7c35a0d6d10131436f09fb81a3f9414c13
/randoop/src/main/java/randoop/operation/TypeArguments.java
99f8a822033cc300f305eea3322e7f96444789f7
[ "MIT", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
Groostav/CMPT880-term-project
f9e680b5d54f6ff18ee2e21f091b0732bb831220
6120c4de0780aaea78870c3842be9a299b9e3100
refs/heads/master
2016-08-12T22:05:57.654319
2016-04-19T08:13:43
2016-04-19T08:13:43
55,188,786
0
1
null
null
null
null
UTF-8
Java
false
false
2,277
java
package randoop.operation; import randoop.types.TypeNames; /** * TypeArguments provides static methods for creating and recognizing strings * representing the type arguments of a method or constructor. * <p> * Type arguments are given as comma separated lists of fully qualified class * and primitive type names. For example: * <ul> * <li><code>int</code> * <li><code>int,double,java.lang.String</code> * <li><code>randoop.operation.Operation</code> * </ul> * * @see MethodSignatures * @see ConstructorSignatures * */ public class TypeArguments { /** * Parses type argument string as generated by * {@link TypeArguments#getTypeArgumentsForString(String)} and returns a list * of types. * * @param argStr * the string containing type arguments for a signature. * @return the array of {@link Class} objects for the type arguments in * argStr. * @throws OperationParseException * if a type name in the string is not a valid type. */ public static Class<?>[] getTypeArgumentsForString(String argStr) throws OperationParseException { Class<?>[] argTypes = new Class<?>[0]; if (argStr.trim().length() > 0) { String[] argsStrs = argStr.split(","); argTypes = new Class<?>[argsStrs.length]; for (int i = 0; i < argsStrs.length; i++) { String typeName = argsStrs[i].trim(); Class<?> c; try { c = TypeNames.getTypeForName(typeName); } catch (ClassNotFoundException e) { throw new OperationParseException( "Argument type \"" + typeName + "\" not recognized in arguments " + argStr); } argTypes[i] = c; } } return argTypes; } /** * Adds the type names for the arguments of a signature to the * {@code StringBuilder}. * * @param sb * the {@link StringBuilder} to which type names are added. * @param params * the array of {@link Class} objects representing the types of * signature arguments. */ public static void getTypeArgumentString(StringBuilder sb, Class<?>[] params) { for (int j = 0; j < params.length; j++) { sb.append(params[j].getName()); if (j < (params.length - 1)) sb.append(","); } } }
[ "geoff_groos@msn.com" ]
geoff_groos@msn.com
a8a053410df292c594ec937dcbf23ecd74289eb6
3a8b56d3e74730ecf9c16783f78157d20d10d05b
/biz.aQute.bndlib.tests/compilerversions/src/sun_1_3/ClassRef.java
b62a7de5078bbad9ae67c3b8b912317f9fd09da7
[ "Apache-2.0" ]
permissive
gdams/bnd
a90ca3d4714d30869c5a7c41376e13b7ecc95d23
82822deee69453df66bd68f67f9cbf431e33e76f
refs/heads/master
2020-04-08T17:14:02.120465
2018-11-27T23:56:03
2018-11-27T23:56:03
159,557,976
1
1
Apache-2.0
2018-11-29T14:08:17
2018-11-28T20:03:07
Java
UTF-8
Java
false
false
189
java
package sun_1_3; public class ClassRef { class Inner { }; static { System.out.println(Inner.class); } public static void main() { System.out.println(javax.swing.Box.class); } }
[ "peter.kriens@aqute.biz" ]
peter.kriens@aqute.biz
1af8a75290b19dfeba16b74ad0a33bdd6a39adf0
e3d0f7f75e4356413d05ba78e14c484f8555b2b5
/azure-resourcemanager-hybrid/src/main/java/com/azure/resourcemanager/hybrid/appservice/models/WebJobType.java
001d72f35d0ff3e4a990765fa4791f13c9b58b7c
[ "MIT" ]
permissive
weidongxu-microsoft/azure-stack-java-samples
1df227502c367f128916f121ccc0f5bc77b045e5
afdfd0ed220f2f8a603c6fa5e16311a7842eb31c
refs/heads/main
2023-04-04T12:24:07.405360
2021-04-07T08:06:00
2021-04-07T08:06:00
337,593,216
0
1
null
null
null
null
UTF-8
Java
false
false
1,282
java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybrid.appservice.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; /** Defines values for WebJobType. */ public enum WebJobType { /** Enum value Continuous. */ CONTINUOUS("Continuous"), /** Enum value Triggered. */ TRIGGERED("Triggered"); /** The actual serialized value for a WebJobType instance. */ private final String value; WebJobType(String value) { this.value = value; } /** * Parses a serialized value to a WebJobType instance. * * @param value the serialized value to parse. * @return the parsed WebJobType object, or null if unable to parse. */ @JsonCreator public static WebJobType fromString(String value) { WebJobType[] items = WebJobType.values(); for (WebJobType item : items) { if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } @JsonValue @Override public String toString() { return this.value; } }
[ "weidxu@microsoft.com" ]
weidxu@microsoft.com
2b61e78566fe8f68f9f4d3ef6af64cb39a3b8847
e46e89eef878908b3de0e160865925cda4d896f9
/src/main/java/org/lastaflute/core/magic/async/ConcurrentAsyncExecutorProvider.java
fa3b1036306c4685ffef6bce78c386950039ef09
[ "Apache-2.0" ]
permissive
t-kameyama/lastaflute
f0bebeca8b0f243d101987070a582820970fac79
cd62cb004d44d8257b1df0b6b5edf951cde4dc7b
refs/heads/master
2020-04-03T11:14:03.820968
2018-10-11T05:34:30
2018-10-11T05:34:30
155,215,393
0
0
null
2018-10-29T13:20:19
2018-10-29T13:20:18
null
UTF-8
Java
false
false
1,091
java
/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.lastaflute.core.magic.async; /** * @author jflute */ public interface ConcurrentAsyncExecutorProvider { /** * @return The default option of concurrent asynchronous process. (NullAllowed: if null, as no option) */ ConcurrentAsyncOption provideDefaultOption(); /** * @return The max pool size of one thread pool. (NullAllowed: if null, as default) */ default Integer provideMaxPoolSize() { return null; } }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
09118b5c97b368d53216c85a4c3c2f1c3a63da7a
5f55639e8be17f5bef8bdec161ca2a86b10cdf4e
/vod/src/main/java/cn/ogsu/vod/controller/BehaviorStatisticsController.java
6f30ebdbb86ca53abe93ee326d2e47822bf47ffe
[]
no_license
yangwu203x/enter_old
e6142364ae6d1b131b56648f83c9e0c1b1ff5535
64ea8268cb00b3c34af333fd3995b074216b426f
refs/heads/master
2021-01-01T18:06:05.162618
2017-07-25T02:43:00
2017-07-25T02:43:00
98,249,779
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
java
package cn.ogsu.vod.controller; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import cn.ogsu.vod.service.IBehaviorStatisticsService; import cn.ogsu.vod.util.Page; import cn.ogsu.vod.util.PageData; import net.sf.json.JSONArray; /** * 用户行为统计的controller * @author albert * @time 2016年9月22日 */ @Controller @RequestMapping("/behavior") public class BehaviorStatisticsController extends ControllerBase{ @Resource private IBehaviorStatisticsService behaviorStatisticsService; @RequestMapping("/showUserStatistics") public ModelAndView showUserStatistics(Page page) throws Exception{ ModelAndView mv=new ModelAndView(); //分页显示歌曲的点击量,下载量 List<PageData> userStatistics=behaviorStatisticsService.userSongStatistics(page); mv.addObject("statistics", userStatistics); mv.setViewName("statistic_list"); return mv; } @RequestMapping("/singleUserStatistics") public ModelAndView singleUserStatistics(Page page) throws Exception{ ModelAndView mv=new ModelAndView(); PageData pd=getPageData(); page.setPd(pd); //根据客户统计表的主键获取那个用户对那首歌的点击量,下载量 List<PageData> userStatistics=behaviorStatisticsService.userSongStatisticsById(page); mv.addObject("statistics", userStatistics); mv.setViewName("songStatic_list"); return mv; } /** * 显示关注歌星列表 */ @RequestMapping("/showAttentionSinger") public ModelAndView showAttentionSinger(Page page) throws Exception{ ModelAndView mv=new ModelAndView(); //获取请求参数 PageData pd=getPageData(); page.setPd(pd); //获取分页数据 List<PageData> attentionList=behaviorStatisticsService.obtianAttentionSinger(page); //添加模型数据 mv.addObject("attentionList", attentionList); mv.addObject("attention", pd); mv.setViewName("attention_list"); return mv; } /** * 自动补全功能 * @return * @throws Exception */ @ResponseBody @RequestMapping("/autoSearch") public Object autoSearch()throws Exception{ List<String> results=behaviorStatisticsService.autoSearch(getPageData()); JSONArray json=JSONArray.fromObject(results); return json.toString(); } }
[ "125667528@qq.com" ]
125667528@qq.com
847a496fc74d34156274655eb8eb37bb0994900a
ad6434dc113e22e64f0709c95099babe6b2cc854
/src/CombinationSumIII/CombinationSumIII.java
ba8efd7d1f62300bb962a5443f4de1fea3eb59fc
[]
no_license
shiyanch/Leetcode_Java
f8b7807fbbc0174d45127b65b7b48d836887983c
20df421f44b1907af6528578baf53efddfee48b1
refs/heads/master
2023-05-28T00:40:30.569992
2023-05-17T03:51:34
2023-05-17T03:51:34
48,945,641
9
2
null
null
null
null
UTF-8
Java
false
false
1,016
java
package CombinationSumIII; import java.util.ArrayList; import java.util.List; /** * 216. Combination Sum III * * Find all possible combinations of k numbers that add up to a number n, * given that only numbers from 1 to 9 can be used * and each combination should be a unique set of numbers. */ public class CombinationSumIII { public List<List<Integer>> combinationSum3(int k, int n) { List<List<Integer>> res = new ArrayList<>(); for(int i=1;i<10;i++) { dfs_helper(k, n, i, res, new ArrayList<>()); } return res; } private void dfs_helper(int k, int n, int start, List<List<Integer>> res, List<Integer> list) { if (k < 0) { return; } if (k == 0 && n == 0) res.add(new ArrayList<Integer>(list)); for (int i = start; i < Math.min(10, n + 1); i++) { list.add(start); dfs_helper(k-1, n - start, i+1, res, list); list.remove(list.size() - 1); } } }
[ "shiyanch@gmail.com" ]
shiyanch@gmail.com
85f759ea04ee509432298a421b5640eea5cad007
f7c63ea42e45132a3c54ee8c6c27fac77d27e2c6
/CoreUtilities/src/org/apache/commons/math3/optimization/linear/copy/UnboundedSolutionException.java
3a2854740d0461b857bba33abce4e667376ca6f0
[ "Apache-2.0" ]
permissive
the1mills/CoreUtilities
dc79851385497e5453aac7a83ab040ade9a08e9d
5d1f7a114c182801d2ef7338958661b660e4132c
refs/heads/master
2016-09-02T05:08:52.356646
2013-02-11T01:47:39
2013-02-11T01:47:39
5,914,118
1
0
null
null
null
null
UTF-8
Java
false
false
1,566
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math3.optimization.linear.copy; import org.apache.commons.math3.exception.MathIllegalStateException; import org.apache.commons.math3.exception.util.LocalizedFormats; /** * This class represents exceptions thrown by optimizers when a solution * escapes to infinity. * @version $Id: UnboundedSolutionException.java 1244107 2012-02-14 16:17:55Z erans $ * @since 2.0 */ public class UnboundedSolutionException extends MathIllegalStateException { /** Serializable version identifier. */ private static final long serialVersionUID = 940539497277290619L; /** * Simple constructor using a default message. */ public UnboundedSolutionException() { super(LocalizedFormats.UNBOUNDED_SOLUTION); } }
[ "denman@denman-PC" ]
denman@denman-PC
bd29dc7e0326184f08e26850add9e166402e0354
712265cb3db8126d4aa64c08abc57a6cb1fdef46
/security-oauth2-jwt/authenticate-server/src/test/java/top/kwseeker/security/oauth2/authenticateserver/AuthenticateServerApplicationTests.java
1900e2d56fbbc9528a4511011e8941f676afb079
[]
no_license
kwseeker/security-model
963f43844918f6a2571a89a08801d4eb3cc92c57
ecba82579bdf46959a4c9dc917fc7490dcdc0fb0
refs/heads/master
2023-05-27T23:00:32.862862
2023-05-19T14:28:20
2023-05-19T14:28:20
139,137,074
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package top.kwseeker.security.oauth2.authenticateserver; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class AuthenticateServerApplicationTests { @Test public void contextLoads() { } }
[ "xiaohuileee@gmail.com" ]
xiaohuileee@gmail.com
40b55540bd1fa4a9aff2f17704eb0189cb0429db
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/tencent/im/oidb/cmd0x7d7/oidb_cmd0x7d7$recommendinfo.java
9080f3a65a02159d67c770d93b788f8edeec8d87
[]
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
838
java
package tencent.im.oidb.cmd0x7d7; import com.tencent.mobileqq.pb.MessageMicro; import com.tencent.mobileqq.pb.MessageMicro.FieldMap; import com.tencent.mobileqq.pb.PBField; import com.tencent.mobileqq.pb.PBUInt64Field; public final class oidb_cmd0x7d7$recommendinfo extends MessageMicro { public static final int UINT64_UIN_FIELD_NUMBER = 1; static final MessageMicro.FieldMap __fieldMap__ = MessageMicro.initFieldMap(new int[] { 8 }, new String[] { "uint64_uin" }, new Object[] { Long.valueOf(0L) }, recommendinfo.class); public final PBUInt64Field uint64_uin = PBField.initUInt64(0L); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar * Qualified Name: tencent.im.oidb.cmd0x7d7.oidb_cmd0x7d7.recommendinfo * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
0fb2f4b96f7f2ae5718482a83b2392948793e8c0
198f1d82f691ccb1c99705f67cb09f995b6f097b
/jdk.localedata/sun/text/resources/cldr/ext/FormatData_kw.java
1c694f41896acc191d55625277f14d17a75393c2
[]
no_license
todayido/Java-src
2a6c9b525f2b100797cc1e4f5807c0202aa0ddd1
2b333d3dee5f02e2d1958cbd4537232faf61677b
refs/heads/master
2023-02-07T20:46:49.325290
2020-12-24T03:28:36
2020-12-24T03:28:36
320,173,437
1
0
null
null
null
null
UTF-8
Java
false
false
8,061
java
/* * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * COPYRIGHT AND PERMISSION NOTICE * * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved. * Distributed under the Terms of Use in * http://www.unicode.org/copyright.html. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of the Unicode data files and any associated documentation * (the "Data Files") or Unicode software and any associated documentation * (the "Software") to deal in the Data Files or Software * without restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, and/or sell copies of * the Data Files or Software, and to permit persons to whom the Data Files * or Software are furnished to do so, provided that * (a) this copyright and permission notice appear with all copies * of the Data Files or Software, * (b) this copyright and permission notice appear in associated * documentation, and * (c) there is clear notice in each modified Data File or in the Software * as well as in the documentation associated with the Data File(s) or * Software that the data or software has been modified. * * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT OF THIRD PARTY RIGHTS. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 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 THE DATA FILES OR SOFTWARE. * * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, * use or other dealings in these Data Files or Software without prior * written authorization of the copyright holder. */ package sun.text.resources.cldr.ext; import java.util.ListResourceBundle; public class FormatData_kw extends ListResourceBundle { @Override protected final Object[][] getContents() { final String[] metaValue_MonthNames = new String[] { "mis Genver", "mis Hwevrer", "mis Meurth", "mis Ebrel", "mis Me", "mis Metheven", "mis Gortheren", "mis Est", "mis Gwynngala", "mis Hedra", "mis Du", "mis Kevardhu", "", }; final String[] metaValue_MonthAbbreviations = new String[] { "Gen", "Hwe", "Meu", "Ebr", "Me", "Met", "Gor", "Est", "Gwn", "Hed", "Du", "Kev", "", }; final String[] metaValue_DayNames = new String[] { "dy Sul", "dy Lun", "dy Meurth", "dy Merher", "dy Yow", "dy Gwener", "dy Sadorn", }; final String[] metaValue_DayAbbreviations = new String[] { "Sul", "Lun", "Mth", "Mhr", "Yow", "Gwe", "Sad", }; final String[] metaValue_AmPmMarkers = new String[] { "a.m.", "p.m.", }; final String[] metaValue_long_Eras = new String[] { "RC", "AD", }; final Object[][] data = new Object[][] { { "MonthNames", metaValue_MonthNames }, { "roc.DayAbbreviations", metaValue_DayAbbreviations }, { "japanese.AmPmMarkers", metaValue_AmPmMarkers }, { "islamic.AmPmMarkers", metaValue_AmPmMarkers }, { "AmPmMarkers", metaValue_AmPmMarkers }, { "japanese.DayNames", metaValue_DayNames }, { "japanese.DayAbbreviations", metaValue_DayAbbreviations }, { "DayNames", metaValue_DayNames }, { "roc.MonthNames", metaValue_MonthNames }, { "narrow.Eras", metaValue_long_Eras }, { "DayAbbreviations", metaValue_DayAbbreviations }, { "abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "japanese.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "buddhist.narrow.AmPmMarkers", metaValue_AmPmMarkers }, { "buddhist.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "Eras", metaValue_long_Eras }, { "japanese.MonthNames", metaValue_MonthNames }, { "roc.DayNames", metaValue_DayNames }, { "standalone.DayAbbreviations", metaValue_DayAbbreviations }, { "roc.MonthAbbreviations", metaValue_MonthAbbreviations }, { "roc.AmPmMarkers", metaValue_AmPmMarkers }, { "islamic.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, { "long.Eras", metaValue_long_Eras }, { "islamic.DayNames", metaValue_DayNames }, { "buddhist.MonthAbbreviations", metaValue_MonthAbbreviations }, { "buddhist.DayAbbreviations", metaValue_DayAbbreviations }, { "buddhist.MonthNames", metaValue_MonthNames }, { "MonthAbbreviations", metaValue_MonthAbbreviations }, { "standalone.DayNames", metaValue_DayNames }, { "narrow.AmPmMarkers", metaValue_AmPmMarkers }, { "latn.NumberElements", new String[] { ".", ",", ";", "%", "0", "#", "-", "E", "\u2030", "\u221e", "NaN", } }, { "japanese.MonthAbbreviations", metaValue_MonthAbbreviations }, { "buddhist.DayNames", metaValue_DayNames }, { "standalone.MonthNames", metaValue_MonthNames }, { "standalone.MonthAbbreviations", metaValue_MonthAbbreviations }, { "islamic.DayAbbreviations", metaValue_DayAbbreviations }, { "buddhist.AmPmMarkers", metaValue_AmPmMarkers }, { "latn.NumberPatterns", new String[] { "#,##0.###", "\u00a4#,##0.00", "#,##0%", "", } }, { "roc.abbreviated.AmPmMarkers", metaValue_AmPmMarkers }, }; return data; } }
[ "2227800977@qq.com" ]
2227800977@qq.com
0195bdf5d3f61f1fe01afa2fccab503bd73d78e1
bf7b4c21300a8ccebb380e0e0a031982466ccd83
/middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/CosNotifyChannelAdmin/SequenceProxyPushSupplierPOATie.java
42aa0bdb05f69e4c75b16e2ebde4992328b74da2
[]
no_license
Puriakshat/Tuberlin
3fe36b970aabad30ed95e8a07c2f875e4912a3db
28dcf7f7edfe7320c740c306b1c0593a6c1b3115
refs/heads/master
2021-01-19T07:30:16.857479
2014-11-06T18:49:16
2014-11-06T18:49:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,543
java
package org.omg.CosNotifyChannelAdmin; import org.omg.PortableServer.POA; /** * Generated from IDL interface "SequenceProxyPushSupplier". * * @author JacORB IDL compiler V @project.version@ * @version generated at 27-May-2014 20:14:30 */ public class SequenceProxyPushSupplierPOATie extends SequenceProxyPushSupplierPOA { private SequenceProxyPushSupplierOperations _delegate; private POA _poa; public SequenceProxyPushSupplierPOATie(SequenceProxyPushSupplierOperations delegate) { _delegate = delegate; } public SequenceProxyPushSupplierPOATie(SequenceProxyPushSupplierOperations delegate, POA poa) { _delegate = delegate; _poa = poa; } public org.omg.CosNotifyChannelAdmin.SequenceProxyPushSupplier _this() { org.omg.CORBA.Object __o = _this_object() ; org.omg.CosNotifyChannelAdmin.SequenceProxyPushSupplier __r = org.omg.CosNotifyChannelAdmin.SequenceProxyPushSupplierHelper.narrow(__o); return __r; } public org.omg.CosNotifyChannelAdmin.SequenceProxyPushSupplier _this(org.omg.CORBA.ORB orb) { org.omg.CORBA.Object __o = _this_object(orb) ; org.omg.CosNotifyChannelAdmin.SequenceProxyPushSupplier __r = org.omg.CosNotifyChannelAdmin.SequenceProxyPushSupplierHelper.narrow(__o); return __r; } public SequenceProxyPushSupplierOperations _delegate() { return _delegate; } public void _delegate(SequenceProxyPushSupplierOperations delegate) { _delegate = delegate; } public POA _default_POA() { if (_poa != null) { return _poa; } return super._default_POA(); } public int[] get_all_filters() { return _delegate.get_all_filters(); } public org.omg.CosNotification.Property[] get_qos() { return _delegate.get_qos(); } public void suspend_connection() throws org.omg.CosNotifyChannelAdmin.NotConnected,org.omg.CosNotifyChannelAdmin.ConnectionAlreadyInactive { _delegate.suspend_connection(); } public org.omg.CosNotifyFilter.MappingFilter lifetime_filter() { return _delegate.lifetime_filter(); } public org.omg.CosNotifyChannelAdmin.ProxyType MyType() { return _delegate.MyType(); } public org.omg.CosNotifyFilter.MappingFilter priority_filter() { return _delegate.priority_filter(); } public org.omg.CosNotifyFilter.Filter get_filter(int filter) throws org.omg.CosNotifyFilter.FilterNotFound { return _delegate.get_filter(filter); } public void disconnect_sequence_push_supplier() { _delegate.disconnect_sequence_push_supplier(); } public void set_qos(org.omg.CosNotification.Property[] qos) throws org.omg.CosNotification.UnsupportedQoS { _delegate.set_qos(qos); } public void connect_sequence_push_consumer(org.omg.CosNotifyComm.SequencePushConsumer push_consumer) throws org.omg.CosEventChannelAdmin.AlreadyConnected,org.omg.CosEventChannelAdmin.TypeError { _delegate.connect_sequence_push_consumer(push_consumer); } public void resume_connection() throws org.omg.CosNotifyChannelAdmin.ConnectionAlreadyActive,org.omg.CosNotifyChannelAdmin.NotConnected { _delegate.resume_connection(); } public org.omg.CosNotification.EventType[] obtain_offered_types(org.omg.CosNotifyChannelAdmin.ObtainInfoMode mode) { return _delegate.obtain_offered_types(mode); } public int add_filter(org.omg.CosNotifyFilter.Filter new_filter) { return _delegate.add_filter(new_filter); } public void subscription_change(org.omg.CosNotification.EventType[] added, org.omg.CosNotification.EventType[] removed) throws org.omg.CosNotifyComm.InvalidEventType { _delegate.subscription_change(added,removed); } public void priority_filter(org.omg.CosNotifyFilter.MappingFilter a) { _delegate.priority_filter(a); } public void validate_event_qos(org.omg.CosNotification.Property[] required_qos, org.omg.CosNotification.NamedPropertyRangeSeqHolder available_qos) throws org.omg.CosNotification.UnsupportedQoS { _delegate.validate_event_qos(required_qos,available_qos); } public void remove_filter(int filter) throws org.omg.CosNotifyFilter.FilterNotFound { _delegate.remove_filter(filter); } public void remove_all_filters() { _delegate.remove_all_filters(); } public void validate_qos(org.omg.CosNotification.Property[] required_qos, org.omg.CosNotification.NamedPropertyRangeSeqHolder available_qos) throws org.omg.CosNotification.UnsupportedQoS { _delegate.validate_qos(required_qos,available_qos); } public void lifetime_filter(org.omg.CosNotifyFilter.MappingFilter a) { _delegate.lifetime_filter(a); } public org.omg.CosNotifyChannelAdmin.ConsumerAdmin MyAdmin() { return _delegate.MyAdmin(); } }
[ "puri.akshat@gmail.com" ]
puri.akshat@gmail.com
b22673f79ccc001f99e26afd349e6d7b82c48ec0
cbd57ee5187e9d0bc9822b8b9ae3aa225729eb7a
/samples/core-animation/src/main/java/jos/samples/animation/screens/CustomizableAnimationViewerScreen.java
fcb315ac1b6de4c188e658cac4a7edc2e9593721
[]
no_license
rwl/jOS
f718260625f373ce2069105f926b621861a7b43a
1dabdefc497550e1c783e2f16ddb4aa5fd85166c
refs/heads/master
2020-12-24T16:50:21.705703
2013-03-14T20:34:50
2013-03-14T20:34:50
10,584,162
2
0
null
null
null
null
UTF-8
Java
false
false
5,290
java
package jos.samples.animation.screens; import static jos.api.graphicsimaging.CGGeometry.makeRect; import jos.api.foundation.NSObject; import jos.api.uikit.UIBarButtonItem; import jos.api.uikit.UIButton; import jos.api.uikit.UIControlEvent; import jos.api.uikit.UIEvent; import jos.api.uikit.UIImageView; import jos.api.uikit.UISegmentedControl; import jos.api.uikit.UISlider; import jos.api.uikit.UISwitch; import jos.api.uikit.UITextField; import jos.api.uikit.UIToolbar; import jos.api.uikit.UIView; import jos.api.uikit.UIViewAnimationCurve; import jos.api.uikit.UIViewController; import com.google.j2objc.annotations.Export; import com.google.j2objc.annotations.Outlet; import com.google.j2objc.annotations.Selector; public class CustomizableAnimationViewerScreen extends UIViewController implements IDetailView { @Outlet UIButton btnStart; @Outlet UIImageView imgToAnimate; @Outlet UISegmentedControl sgmtCurves; @Outlet UISlider sldrDelay; @Outlet UISlider sldrDuration; @Outlet UITextField txtRepeateCount; @Outlet UIToolbar tlbrMain; @Outlet UISwitch swtchAutoReverse; public CustomizableAnimationViewerScreen() { super("CustomizableAnimationViewerScreen", null); } @Override public void viewDidLoad() { super.viewDidLoad(); btnStart.addTarget(new EventListener() { @Override public void onEvent(NSObject sender, UIEvent event) { /*double duration = (double) sldrDuration.getValue(); double delay = (double) sldrDelay.getValue(); UIViewAnimationOptions animationOptions = UIViewAnimationOptions.CurveEaseIn | UIViewAnimationOptions.Repeat; UIView.animate(duration, delay, animationOptions, new NSAction() { @Override public void action() { // move the image one way or the other if(imgToAnimate.Frame.Y == 190) { imgToAnimate.Frame = new System.Drawing.RectangleF( imgToAnimate.Frame.X, imgToAnimate.Frame.Y + 400, imgToAnimate.Frame.Size.Width, imgToAnimate.Frame.Size.Height); } else { imgToAnimate.Frame = new System.Drawing.RectangleF( imgToAnimate.Frame.X, imgToAnimate.Frame.Y - 400, imgToAnimate.Frame.Size.Width, imgToAnimate.Frame.Size.Height); } } }, null);*/ // begin our animation block. the name allows us to refer to it later UIView.beginAnimations("ImageMove", null); UIView.setAnimationDidStopSelector(new Selector("AnimationStopped")); UIView.setAnimationDelegate(this); // NOTE: you need this for the selector to work // animation delay UIView.setAnimationDelay((double) sldrDelay.getValue()); // animation duration UIView.setAnimationDuration((double) sldrDuration.getValue()); // animation curve UIViewAnimationCurve curve = UIViewAnimationCurve.EASE_IN_OUT; switch (sgmtCurves.getSelectedSegment()) { case 0: curve = UIViewAnimationCurve.EASE_IN_OUT; break; case 1: curve = UIViewAnimationCurve.EASE_IN; break; case 2: curve = UIViewAnimationCurve.EASE_OUT; break; case 3: curve = UIViewAnimationCurve.LINEAR; break; } UIView.setAnimationCurve (curve); // repeat count UIView.setAnimationRepeatCount(Float.valueOf(txtRepeateCount.getText())); // autorevese when repeating UIView.setAnimationRepeatAutoreverses(swtchAutoReverse.isOn()); // move the image one way or the other if (imgToAnimate.getFrame().origin.y == 190) { imgToAnimate.setFrame(makeRect( imgToAnimate.getFrame().origin.x, imgToAnimate.getFrame().origin.y + 400, imgToAnimate.getFrame().size.width, imgToAnimate.getFrame().size.height)); } else { imgToAnimate.setFrame(makeRect( imgToAnimate.getFrame().origin.x, imgToAnimate.getFrame().origin.y - 400, imgToAnimate.getFrame().size.width, imgToAnimate.getFrame().size.height)); } // finish our animation block UIView.commitAnimations(); }; }, UIControlEvent.TOUCH_UP_INSIDE); } @Export public void animationStopped(String name, int numFinished, Object context) { System.out.println("Animation completed"); } @Override public void addContentsButton(UIBarButtonItem button) { button.setTitle("Contents"); tlbrMain.setItems(new UIBarButtonItem[] { button }, false ); } @Override public void removeContentsButton() { tlbrMain.setItems(new UIBarButtonItem[0], false); } }
[ "r.w.lincoln@gmail.com" ]
r.w.lincoln@gmail.com
c875ba106d863d510b3b0d9d8f815e77bcc8bc68
b81d1df0562de9d4ff5c30bec90647402972f478
/src/test/java/pl/pancordev/leak/seven/one/DummyControllerTest10.java
6cd3818b84be24c50c3145de2b64eac9684a413e
[]
no_license
Pancor/leak
eea9fe401a7c9b543bf95a929f0bbf7ee6113dc9
f060ff6a1a8c829b287cffb35b9d63040ca3c7ec
refs/heads/master
2023-01-30T17:14:38.463089
2020-12-14T12:01:00
2020-12-14T12:01:00
321,322,490
0
2
null
null
null
null
UTF-8
Java
false
false
1,972
java
package pl.pancordev.leak.seven.one; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; import pl.pancordev.leak.services.Service10; import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @SpringBootTest @WebAppConfiguration @RunWith(SpringRunner.class) public class DummyControllerTest10 { @Autowired private WebApplicationContext webApplicationContext; @MockBean private Service10 service10; private MockMvc mvc; @Before public void setUp() { mvc = MockMvcBuilders.webAppContextSetup(webApplicationContext) .defaultRequest(delete("/").contentType(MediaType.APPLICATION_JSON)) .alwaysDo(print()) .apply(springSecurity()) .build(); } @Test public void shouldReturnProperResponseFromIndexPage() throws Exception { mvc.perform(delete("/")) .andExpect(status().isOk()) .andExpect(content().string("It's dummy response from server")); } }
[ "pancordev@gmail.com" ]
pancordev@gmail.com
c4c1bca583c872f1e9f59430c8a6ca4b7e60c6fd
c89821386c9f2e6fefdd073016c37084a5bcda62
/src/main/java/org/aopalliance/intercept/Joinpoint.java
0268ed49624ed8e87ee162bc695c8e7a403f11a6
[]
no_license
ZephyrJung/MiniSpring
9b95285def5d559764ff380c6c96256a11b8bc53
a7a93a5c98695e0efbd80a80e16abd0ec624d408
refs/heads/master
2020-04-01T20:06:33.653492
2018-10-29T01:47:58
2018-10-29T01:47:58
153,588,815
0
0
null
null
null
null
UTF-8
Java
false
false
2,325
java
/* * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.aopalliance.intercept; import java.lang.reflect.AccessibleObject; /** * This interface represents a generic runtime joinpoint (in the AOP * terminology). * * <p>A runtime joinpoint is an <i>event</i> that occurs on a static * joinpoint (i.e. a location in a the program). For instance, an * invocation is the runtime joinpoint on a method (static joinpoint). * The static part of a given joinpoint can be generically retrieved * using the {@link #getStaticPart()} method. * * <p>In the context of an interception framework, a runtime joinpoint * is then the reification of an access to an accessible object (a * method, a constructor, a field), i.e. the static part of the * joinpoint. It is passed to the interceptors that are installed on * the static joinpoint. * * @author Rod Johnson * @see Interceptor */ public interface Joinpoint { /** * Proceed to the next interceptor in the chain. * <p>The implementation and the semantics of this method depends * on the actual joinpoint type (see the children interfaces). * @return see the children interfaces' proceed definition * @throws Throwable if the joinpoint throws an exception */ Object proceed() throws Throwable; /** * Return the object that holds the current joinpoint's static part. * <p>For instance, the target object for an invocation. * @return the object (can be null if the accessible object is static) */ Object getThis(); /** * Return the static part of this joinpoint. * <p>The static part is an accessible object on which a chain of * interceptors are installed. */ AccessibleObject getStaticPart(); }
[ "zephyrjung@126.com" ]
zephyrjung@126.com
38bceb3ad14d274de27c6d087466fa1ae6cb63d5
0175a417f4b12b80cc79edbcd5b7a83621ee97e5
/flexodesktop/model/flexofoundation/src/main/java/org/openflexo/foundation/param/DynamicDropDownParameter.java
a360d5ab040ce5d56b3bf9356b2b25d55d0ca40e
[]
no_license
agilebirds/openflexo
c1ea42996887a4a171e81ddbd55c7c1e857cbad0
0250fc1061e7ae86c9d51a6f385878df915db20b
refs/heads/master
2022-08-06T05:42:04.617144
2013-05-24T13:15:58
2013-05-24T13:15:58
2,372,131
11
6
null
2022-07-06T19:59:55
2011-09-12T15:44:45
Java
UTF-8
Java
false
false
1,849
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenFlexo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.foundation.param; import java.util.List; import java.util.Vector; import org.openflexo.inspector.widget.DenaliWidget; public class DynamicDropDownParameter<T> extends ParameterDefinition<T> { private List<T> _availableValues; public DynamicDropDownParameter(String name, String label, List<T> availableValues, T defaultValue) { super(name, label, defaultValue); addParameter("dynamiclist", "params." + name + ".availableValues"); _availableValues = availableValues; } public DynamicDropDownParameter(String name, String label, T defaultValue) { this(name, label, null, defaultValue); } public void setShowReset(boolean showReset) { addParameter("showReset", "" + showReset); } @Override public String getWidgetName() { return DenaliWidget.DROPDOWN; } // Override this if list not defined in constructor public List<T> getAvailableValues() { return _availableValues; } public void setAvailableValues(Vector<T> availableValues) { _availableValues = availableValues; } public void setStringFormatter(String formatter) { addParameter("format", formatter); } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
230df56ead43b43049685dc0936c04dc9b50f13b
882e77219bce59ae57cbad7e9606507b34eebfcf
/mi2s_10_miui12/src/main/java/miui/telephony/Rlog.java
a8921e8e5cbb2cf80704dba505796bcb9d42e162
[]
no_license
CrackerCat/XiaomiFramework
17a12c1752296fa1a52f61b83ecf165f328f4523
0b7952df317dac02ebd1feea7507afb789cef2e3
refs/heads/master
2022-06-12T03:30:33.285593
2020-05-06T11:30:54
2020-05-06T11:30:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
package miui.telephony; import miui.provider.MiCloudSmsCmd; import miui.reflect.Method; class Rlog { private Rlog() { } public static void i(String tag, String msg) { try { Class cls = Class.forName("android.telephony.Rlog"); Method.of(cls, "i", Integer.TYPE, new Class[]{String.class, String.class}).invoke(cls, (Object) null, new Object[]{tag, msg}); } catch (ClassNotFoundException e) { e.printStackTrace(); } } public static void w(String tag, String msg) { try { Class cls = Class.forName("android.telephony.Rlog"); Method.of(cls, MiCloudSmsCmd.TYPE_WIPE, Integer.TYPE, new Class[]{String.class, String.class}).invoke(cls, (Object) null, new Object[]{tag, msg}); } catch (ClassNotFoundException e) { e.printStackTrace(); } } public static void e(String tag, String msg) { try { Class cls = Class.forName("android.telephony.Rlog"); Method.of(cls, "e", Integer.TYPE, new Class[]{String.class, String.class}).invoke(cls, (Object) null, new Object[]{tag, msg}); } catch (ClassNotFoundException e) { e.printStackTrace(); } } }
[ "sanbo.xyz@gmail.com" ]
sanbo.xyz@gmail.com
53fd905bbc26c8579c5eb4a4e85be425ad7fe72b
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Codec-14/org.apache.commons.codec.language.bm.PhoneticEngine/BBC-F0-opt-30/tests/21/org/apache/commons/codec/language/bm/PhoneticEngine_ESTest_scaffolding.java
2a7bf5468920aaa1268705351c2cf83a65d068be
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
5,165
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Oct 24 03:47:26 GMT 2021 */ package org.apache.commons.codec.language.bm; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class PhoneticEngine_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.codec.language.bm.PhoneticEngine"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(PhoneticEngine_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.codec.language.bm.Rule", "org.apache.commons.codec.language.bm.PhoneticEngine$RulesApplication", "org.apache.commons.codec.language.bm.Rule$Phoneme$1", "org.apache.commons.codec.language.bm.Rule$RPattern", "org.apache.commons.codec.language.bm.PhoneticEngine", "org.apache.commons.codec.language.bm.PhoneticEngine$1", "org.apache.commons.codec.language.bm.Rule$PhonemeExpr", "org.apache.commons.codec.language.bm.Rule$Phoneme", "org.apache.commons.codec.language.bm.Languages$LanguageSet", "org.apache.commons.codec.language.bm.Languages$2", "org.apache.commons.codec.language.bm.PhoneticEngine$PhonemeBuilder", "org.apache.commons.codec.language.bm.Lang", "org.apache.commons.codec.language.bm.Languages", "org.apache.commons.codec.language.bm.NameType", "org.apache.commons.codec.language.bm.Languages$1", "org.apache.commons.codec.language.bm.Rule$PhonemeList", "org.apache.commons.codec.language.bm.RuleType", "org.apache.commons.codec.language.bm.Languages$SomeLanguages" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(PhoneticEngine_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.codec.language.bm.NameType", "org.apache.commons.codec.language.bm.PhoneticEngine", "org.apache.commons.codec.language.bm.PhoneticEngine$PhonemeBuilder", "org.apache.commons.codec.language.bm.PhoneticEngine$RulesApplication", "org.apache.commons.codec.language.bm.RuleType", "org.apache.commons.codec.language.bm.Languages", "org.apache.commons.codec.language.bm.Lang", "org.apache.commons.codec.language.bm.Rule$Phoneme$1", "org.apache.commons.codec.language.bm.Rule$Phoneme", "org.apache.commons.codec.language.bm.Rule$1", "org.apache.commons.codec.language.bm.Rule", "org.apache.commons.codec.language.bm.PhoneticEngine$1", "org.apache.commons.codec.language.bm.Languages$LanguageSet", "org.apache.commons.codec.language.bm.Languages$SomeLanguages", "org.apache.commons.codec.language.bm.Rule$PhonemeList" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
467c40730fec1c7eb2da20e293ebae83eafa233d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_28b7a0061c6a95b8a7cabae02f94bc899d5b081c/Client/7_28b7a0061c6a95b8a7cabae02f94bc899d5b081c_Client_t.java
d123953fe47a6c9639eb5ed90a1f6fb799b6eb7d
[]
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
6,407
java
package client; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; import java.util.List; import model.Card; import model.FriendCards; import model.Game; import model.GameProperties; import model.Play; import model.Player; import view.View; public class Client { private Socket socket; private List<Player> players; private ObjectOutputStream out; private View view; private Game game; public Client(View view) { this.players = new ArrayList<Player>(); this.view = view; } /** * Connects to the server at the specified port and address. * * @throws IOException */ public void connect(int port, byte[] address) throws IOException { socket = new Socket(); socket.connect(new InetSocketAddress(InetAddress.getByAddress(address), port), 30000); new Thread() { public void run() { try { out = new ObjectOutputStream(socket.getOutputStream()); ObjectInputStream in = new ObjectInputStream( socket.getInputStream()); request("HELLO", view.name); while (true) processMessage((Object[]) in.readObject()); } catch (Exception e) { e.printStackTrace(); } finally { System.out.println("client has closed input stream"); close(); } } }.start(); System.out.println("client has connected input stream"); view.joinRoom(); } public void close() { try { if (socket != null) socket.close(); } catch (IOException e) { e.printStackTrace(); } view.leaveRoom(); } /* Methods called by controller */ public synchronized void requestStartGame(GameProperties properties) { request("STARTGAME", properties); view.requestStartGame(); } public synchronized void requestStartRound() { request("STARTROUND"); view.requestStartRound(); } public synchronized void requestShowCards(List<Card> cards) { Play play = new Play(view.getPlayerID(), cards); if (game.canShowCards(play)) request("SHOW", play); else view.notify("Invalid show."); } public synchronized void requestFriendCards(FriendCards friendCards) { if (game.canSelectFriendCards(view.getPlayerID(), friendCards)) request("SELECTFRIEND", view.getPlayerID(), friendCards); } public synchronized void requestMakeKitty(List<Card> cards) { Play play = new Play(view.getPlayerID(), cards); if (game.canMakeKitty(play)) request("MAKEKITTY", play); else view.notify("Incorrect number of cards."); } public synchronized void requestPlayCards(List<Card> cards) { Play play = new Play(view.getPlayerID(), cards); if (game.canPlay(play)) request("PLAY", play); else view.notify("Invalid play."); } private synchronized void request(Object... args) { try { out.writeObject(args); } catch (IOException e) { e.printStackTrace(); } } /* Called after a response from the server */ private synchronized void processMessage(Object... data) { String command = (String) data[0]; if (command.equals("ADDPLAYER")) { /* ADDPLAYER [player] */ Player player = (Player) data[1]; players.add(player); } else if (command.equals("YOU")) { /* YOU [playerID] */ view.setPlayerID((Integer) data[1]); } else if (command.equals("REMOVEPLAYER")) { // TODO the following code is incorrect. /* REMOVEPLAYER [playerID] */ Player removedPlayer = null; for (Player player : players) if (players.remove(removedPlayer = player)) break; if (game != null) game.removePlayer(removedPlayer); } else if (command.equals("STARTGAME")) { /* STARTGAME [properties] */ game = new Game((GameProperties) data[1]); game.setView(view); game.addPlayers(players); } else if (command.equals("GAMESTATE")) { /* GAMESTATE [game] */ game = (Game) data[1]; game.setView(view); } else if (command.equals("STARTROUND")) { /* STARTROUND [random seed] */ game.startRound((Long) data[1]); } else if (command.equals("NOTIFICATION")) { // TODO notify the view. } else if (command.equals("DRAW")) { /* DRAW [player ID] */ game.drawFromDeck((Integer) data[1]); } else if (command.equals("TAKEKITTY")) { /* TAKEKITTY */ game.takeKittyCards(); } else if (command.equals("SHOW")) { /* SHOW [cards] */ game.showCards((Play) data[1]); } else if (command.equals("SELECTFRIEND")) { /* SELECTFRIEND [player ID] [friend cards] */ game.selectFriendCards((Integer) data[1], (FriendCards) data[2]); } else if (command.equals("MAKEKITTY")) { /* MAKEKITTY [cards] */ game.makeKitty((Play) data[1]); } else if (command.equals("PLAY")) { /* PLAY [cards] */ game.play((Play) data[1]); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
71b7f539ea4236bf2c0abda23878ec739fe80cb2
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/shopee/app/ui/chat/cell/a.java
54221ecb7640036358738e7ff16b5edc923bec05
[]
no_license
BharathPalanivelu/repotest
ddaf56a94eb52867408e0e769f35bef2d815da72
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
refs/heads/master
2020-09-30T18:55:04.802341
2019-12-02T10:52:08
2019-12-02T10:52:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,773
java
package com.shopee.app.ui.chat.cell; import android.content.Context; import android.net.Uri; import android.text.TextUtils; import android.view.View; import com.afollestad.materialdialogs.f; import com.garena.android.appkit.b.b; import com.garena.android.appkit.tools.b; import com.shopee.app.data.viewmodel.chat.ChatMessage; import com.shopee.app.g.m; import com.shopee.app.ui.dialog.a; import com.shopee.app.ui.webview.WebPageActivity_; import com.shopee.app.ui.webview.simpleweb.SimpleWebPageActivity_; import com.shopee.app.util.bm; import com.shopee.app.util.i; import com.shopee.app.web.WebRegister; import com.shopee.app.web.protocol.NavbarMessage; import com.shopee.id.R; public class a { /* renamed from: a reason: collision with root package name */ private static CharSequence[] f20023a = new CharSequence[2]; /* renamed from: b reason: collision with root package name */ private static CharSequence[] f20024b = new CharSequence[1]; /* renamed from: c reason: collision with root package name */ private static CharSequence[] f20025c = new CharSequence[2]; /* renamed from: d reason: collision with root package name */ private static CharSequence[] f20026d = new CharSequence[3]; static { f20023a[0] = b.e(R.string.sp_label_resend); f20023a[1] = b.e(R.string.sp_label_delete); f20024b[0] = b.e(R.string.sp_label_copy_text); f20025c[0] = b.e(R.string.sp_label_copy_text); f20025c[1] = b.e(R.string.sp_go_to_link); f20026d[0] = b.e(R.string.sp_label_resend); f20026d[1] = b.e(R.string.sp_label_copy_text); f20026d[2] = b.e(R.string.sp_label_delete); } public static void a(View view, final ChatMessage chatMessage) { a(view, f20023a, new a.c() { public void a(f fVar, View view, int i, CharSequence charSequence) { if (i != 0) { if (i == 1 && !TextUtils.isEmpty(chatMessage.getRequestId())) { com.garena.android.appkit.b.b.a("CHAT_MSG_DELETE", new com.garena.android.appkit.b.a(chatMessage), b.a.NETWORK_BUS); } } else if (!TextUtils.isEmpty(chatMessage.getRequestId())) { com.garena.android.appkit.b.b.a("CHAT_MSG_RESEND", new com.garena.android.appkit.b.a(chatMessage), b.a.NETWORK_BUS); } fVar.dismiss(); } }); } public static void b(View view, final ChatMessage chatMessage) { a(view, f20024b, new a.c() { public void a(f fVar, View view, int i, CharSequence charSequence) { if (!TextUtils.isEmpty(chatMessage.getText())) { m.a(chatMessage.getText(), com.garena.android.appkit.tools.b.e(R.string.sp_copy_text_done)); } fVar.dismiss(); } }); } public static void c(final View view, final ChatMessage chatMessage) { a(view, f20025c, new a.c() { public void a(f fVar, View view, int i, CharSequence charSequence) { if (i != 0) { if (i == 1) { Context context = view.getContext(); NavbarMessage navbarMessage = new NavbarMessage(); navbarMessage.setTitle(chatMessage.getLinkUrl()); if (chatMessage.isWhitelistCensored()) { bm.a(context, chatMessage.getLinkUrl()); } else { boolean z = false; try { if (Uri.parse(chatMessage.getLinkUrl()).getHost().endsWith(i.f7042e)) { try { WebPageActivity_.a(context).a(WebRegister.GSON.b((Object) navbarMessage)).b(chatMessage.getLinkUrl()).a(); } catch (Exception unused) { } z = true; } } catch (Exception unused2) { } if (!z) { SimpleWebPageActivity_.a(context).a(WebRegister.GSON.b((Object) navbarMessage)).b(chatMessage.getLinkUrl()).a(true).a(); } } } } else if (!TextUtils.isEmpty(chatMessage.getText())) { if (chatMessage.getLinkUrl() == null || chatMessage.getLinkUrl().isEmpty() || !chatMessage.isWhitelistCensored()) { m.a(chatMessage.getText(), com.garena.android.appkit.tools.b.e(R.string.sp_copy_text_done)); } else { a.a(view.getContext(), chatMessage.getText()); } } fVar.dismiss(); } }); } public static void a(Context context, final String str) { com.shopee.app.ui.dialog.a.a(context, com.garena.android.appkit.tools.b.e(R.string.sp_title_copy_text_alert), com.garena.android.appkit.tools.b.e(R.string.sp_label_copy_text_alert_content), com.garena.android.appkit.tools.b.e(R.string.sp_label_cancel), com.garena.android.appkit.tools.b.e(R.string.sp_label_yes_i_am_sure), (a.C0318a) new a.C0318a() { public void onNegative() { } public void onPositive() { m.a(str, com.garena.android.appkit.tools.b.e(R.string.sp_copy_text_done)); } }); } private static void a(View view, CharSequence[] charSequenceArr, a.c cVar) { com.shopee.app.ui.dialog.a.a(view.getContext(), charSequenceArr, cVar); } }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
b8dd3180370f4c43c60e117878810533824ae75f
0e72060cb1b7651c9552af3e59786e9946a3d03f
/app/src/main/java/com/owo/module_b_personal/view/ViewPersonalDownViewpagerActivity.java
338dae61d15fcc9ea8c7bcf804f9150ecbc251d1
[]
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
428
java
package com.owo.module_b_personal.view; import com.owo.module_b_home.bean.BeanTask; import com.owo.module_b_personal.bean.BeanUser; import java.util.List; /** * Created by XQF on 2017/5/21. */ public interface ViewPersonalDownViewpagerActivity { //void getTasksIApplied(List<BeanTask> taskList,int code); void getTasksIPublished(List<BeanTask> taskList,int code); //void getPersonalInfo(BeanUser beanUser); }
[ "847307933@qq.com" ]
847307933@qq.com
8d757ca3750960fa912173e76bd077bd10453eda
ac99013de89ecfdfe776f3a0008126c60f618ddd
/src/main/java/af/gov/anar/hooks/hook/handler/UpdateHookCommandHandler.java
5352e21fcc136648cd8f5dd569273ad02fb511fb
[]
no_license
Anar-Framework/anar-lib-hooks
bb399a7ca2cf006ce14e5a8beb58981d8a517612
5ef68772d597ab8566cffac01beb62dae3a0abd2
refs/heads/master
2020-12-21T02:23:16.690862
2020-02-05T04:30:55
2020-02-05T04:30:55
236,278,421
0
0
null
null
null
null
UTF-8
Java
false
false
1,103
java
package af.gov.anar.hooks.hook.handler; import af.gov.anar.hooks.infrastructure.common.annotation.CommandType; import af.gov.anar.hooks.infrastructure.common.command.JsonCommand; import af.gov.anar.hooks.infrastructure.common.command.NewCommandSourceHandler; import af.gov.anar.hooks.hook.service.HookWritePlatformService; import af.gov.anar.lang.data.CommandProcessingResult; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service @CommandType(entity = "HOOK", action = "UPDATE") public class UpdateHookCommandHandler implements NewCommandSourceHandler { private final HookWritePlatformService writePlatformService; @Autowired public UpdateHookCommandHandler( final HookWritePlatformService writePlatformService) { this.writePlatformService = writePlatformService; } @Transactional @Override public CommandProcessingResult processCommand(final JsonCommand command) { return this.writePlatformService .updateHook(command.entityId(), command); } }
[ "mohammadbadarhashimi@gmail.com" ]
mohammadbadarhashimi@gmail.com
03f04d2c55b3204f9ef32dc8e455d973f35797a0
2292fede67397ba1a99d5f74f9e3c0882f1b857a
/qvcse-qvcslib/src/main/java/com/qumasoft/qvcslib/DefaultServedProjectProperties.java
89b5b573ea31fb35eac114559ffa04f95ba6738c
[ "Apache-2.0" ]
permissive
joshualambert/qvcsos
cbc294942c7edeb2ac9552ea8a01e55ce5c677b2
a3529b44c97ac0b2104a5a60650dd3305262891a
refs/heads/master
2021-01-18T08:42:53.467413
2014-04-15T00:45:53
2014-04-15T00:45:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,856
java
// Copyright 2004-2014 Jim Voris // // 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.qumasoft.qvcslib; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; /** * Default served project properties. * @author Jim Voris */ public final class DefaultServedProjectProperties extends AbstractProjectProperties { // Create our logger object private static final Logger LOGGER = Logger.getLogger("com.qumasoft.qvcslib"); private static final DefaultServedProjectProperties SINGLETON_PROPERTIES = new DefaultServedProjectProperties(); /** * Creates new DefaultServedProjectProperties. */ private DefaultServedProjectProperties() { super(QVCSConstants.QWIN_DEFAULT_PROJECT_PROPERTIES_NAME, QVCSConstants.QVCS_SERVED_PROJECTNAME_PREFIX); loadProperties(); } /** * Load the properties for the default project. */ private void loadProperties() { FileInputStream inStream = null; java.util.Properties defaultProperties = new java.util.Properties(); // Define some default values ArchiveAttributes defaultAttributes = new ArchiveAttributes(); defaultProperties.put(getReferenceLocationTag(), ""); defaultProperties.put(getAttributesTag(), defaultAttributes.toPropertyString()); defaultProperties.put(getTempfilePathTag(), System.getProperty("user.home") + System.getProperty("file.separator") + "qvcs_tempfiles"); defaultProperties.put(getServerNameTag(), QVCSConstants.QVCS_DEFAULT_SERVER_NAME); setActualProperties(new java.util.Properties(defaultProperties)); try { inStream = new FileInputStream(new File(getPropertyFileName())); getActualProperties().load(inStream); } catch (IOException e) { // Catch any exception. If the property file is missing, we'll just go // with the defaults. LOGGER.log(Level.INFO, "Default served project properties file is missing. Using hard-coded default values. " + e.getLocalizedMessage()); } finally { if (inStream != null) { try { inStream.close(); } catch (IOException e) { LOGGER.log(Level.WARNING, "Exception in closing project properties file: " + getPropertyFileName() + ". Exception: " + e.getClass().toString() + ": " + e.getLocalizedMessage()); } } } } /** * Get the singleton object that defines our default project properties. * @return the singleton object that defines our default project properties. */ public static DefaultServedProjectProperties getInstance() { return SINGLETON_PROPERTIES; } @Override public String toString() { return QVCSConstants.QWIN_DEFAULT_PROJECT_NAME; } @Override public String getArchiveLocation() { return null; } @Override public String getProjectType() { return QVCSConstants.QVCS_SERVED_PROJECT_TYPE; } @Override public boolean getDefineAlternateReferenceLocationFlag() { return getBooleanValue(getDefineAlternateReferenceLocationFlagTag()); } }
[ "jimv@comcast.net" ]
jimv@comcast.net
9b686c1d7c1b14115e983042ffcd1f87ec9d61b7
b64a90e655efcb964ead7044fb26e19e61bc06f0
/app/src/main/java/lib/ycble/BgService.java
591f11ea686411904ad5f0b7f6b3369dfe843785
[]
no_license
Fengshaoyuan/npLog
f996541d307614e2048b4a5363a24884c3fb00d5
b0c8d35d995d8da7ea46cfbf3fd58e42319fc54a
refs/heads/master
2020-12-05T06:33:11.962153
2020-01-04T16:15:53
2020-01-04T16:15:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,508
java
package lib.ycble; import android.app.Service; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothGatt; import android.bluetooth.BluetoothGattCallback; import android.content.Intent; import android.os.Handler; import android.os.IBinder; import android.support.annotation.Nullable; import npLog.nopointer.core.npLog; public class BgService extends Service { @Nullable @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int flags, int startId) { new Handler().postDelayed(new Runnable() { @Override public void run() { npLog.e("3分钟后,开始扫描"); conn(); } }, 1000 * 60 * 5); return super.onStartCommand(intent, flags, startId); } private void conn() { String mac = "D2:A6:3E:E0:B6:1E"; BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); BluetoothDevice bluetoothDevice = bluetoothAdapter.getRemoteDevice(mac); bluetoothDevice.connectGatt(this, false, new BluetoothGattCallback() { @Override public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { super.onConnectionStateChange(gatt, status, newState); npLog.e("status:" + status + "/newState:" + newState); } }); } }
[ "857508412@qq.com" ]
857508412@qq.com
38197a10681a14b356da69d16b51c30ea2259948
e3e193d5256970360b8f8a576acfdf7be5be6f1d
/it.ltc.clienti.ynap-dao/src/main/java/it/ltc/clienti/ynap/model/Marchio.java
ac11fd15eb51ad91d342e6968c68056c07b1d3bf
[]
no_license
Dufler/clienti
6181c8860bb291705ab58e5c3f826f57daee46fc
a0c2dc11097a48a35a84d5b18010084a09172c76
refs/heads/master
2021-08-22T17:39:59.869055
2019-06-04T13:29:57
2019-06-04T13:29:57
130,670,213
0
0
null
2021-06-04T21:58:05
2018-04-23T09:08:27
Java
UTF-8
Java
false
false
1,220
java
package it.ltc.clienti.ynap.model; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQuery; import javax.persistence.Table; @Entity @Table(name="Marchi") @NamedQuery(name="Marchi.progressivo", query="SELECT MAX(m.codice) FROM Marchio m") public class Marchio implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="IdMarchio", unique=true, nullable=false) private int id; @Column(name="Codice", nullable=false) private int codice; @Column(name="Descrizione", nullable=false, length=50, columnDefinition="varchar(50)") private String nome; public Marchio() {} public int getId() { return id; } public void setId(int id) { this.id = id; } public int getCodice() { return codice; } public void setCodice(int codice) { this.codice = codice; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } }
[ "Damiano@Damiano-PC" ]
Damiano@Damiano-PC
334119a2c66a20be5503a215fd8ec7e41ac95fd3
b55cfcbd782c2f5881981699ca8ec1f9761ec73e
/2004/CollaborationClient/appClientModule/com/hps/july/sync/msaccess/adapters/ForNRITableAdaptor.java
725fde8d7060e1b256e8785a96c706b2c80ce524
[]
no_license
ildar66/collaboration
6202cf1ce03d0703207c17e9052f132c2f83b711
a290af9334aa833192a1216a7876a9781975feb7
refs/heads/master
2020-12-02T23:53:33.475663
2017-07-01T10:50:30
2017-07-01T10:50:30
95,958,112
0
0
null
null
null
null
WINDOWS-1251
Java
false
false
5,005
java
package com.hps.july.sync.msaccess.adapters; import java.sql.*; import java.util.Properties; import com.hps.july.sync.*; import com.hps.july.cdbc.lib.CDBCResultSet; /** * @author Shafigullin Ildar * * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. * To enable and disable the creation of type comments go to * Window>Preferences>Java>Code Generation. */ public class ForNRITableAdaptor extends SimpleCollaboration { Properties prop = null; public ForNRITableAdaptor(DB argConNRI, DB argConNFS, Properties prop) { super(argConNRI, argConNFS, "dbspositions", "Данные_NRI_mdb", "Посл_изм", new ForNRITableMap()); this.prop = prop; } private static class ForNRITableMap extends ColumnMap { /** * Конструктор */ ForNRITableMap() { super(); // addMap( MSAccess, NRI, isKey) addMap("Код", "idrecord", true); addMap("№DAMPS", "dampsid", false); addMap("№GSM", "gsmid", false); //addMap("%WLAM", "wlanid", false); addMap("Название", "name", false); addMap("Название2", "name2", false); addMap("Разм_БС", "apparattype", false); addMap("Завод", "containertype", false); addMap("Тип_БС", "placetype", false); addMap("Где_БС", "apparatplace", false); addMap("Разм_опор", "antennaplace", false); //oporaplace addMap("Сущ", "isouropora", false); addMap("Тип_опор", "oporatype", false); addMap("Где_ант", "oporaplace", false); //antennaplace addMap("Высота", "heightopora", false); addMap("Отв_Фиш", "fiootvexpl", false); addMap("Тав№", "tabnumotvexpl", false); addMap("Эфир", "statebs", false); addMap("Демонтаж", "datederrick", false); addMap("Выезд", "dateonsitereview", false); addMap("Дата_марш_карт", "lastupdmarshkarta", false); addMap("Дата_список", "lastupdlistprohod", false); addMap("Посл_изм", "lastupdposition", false); // Колонки, предопределенные в таблице NRI //addPredefinedColumnNRI("", ""); } } /** * @see com.hps.july.sync.SimpleCollaboration#doPostTask() */ protected boolean doPostTask(Query qry) { Statement st = null; ResultSet rs = null; String procedureName = null; try { st = getConTARGET_DB().createStatement(); rs = st.executeQuery("EXECUTE PROCEDURE dbsLoadSprav('ALL', " + qry.getQueryId() + ")"); procedureName = "dbsLoadSprav"; if (rs.next()) { int resCode = rs.getInt(1); if (resCode != 0) { String resMsg = rs.getString(2); QueryProcessing.addLogMessage(getConTARGET_DB(), getQuery(), QueryProcessing.MSG_ERROR, resMsg); } } procedureName = "dbsLoadPositions"; rs = st.executeQuery("EXECUTE PROCEDURE dbsLoadPositions(" + qry.getQueryId() + ")"); if (rs.next()) { int resCode = rs.getInt(1); if (resCode != 0) { String resMsg = rs.getString(2); QueryProcessing.addLogMessage(getConTARGET_DB(), getQuery(), QueryProcessing.MSG_ERROR, resMsg); } } } catch (SQLException e) { System.out.println("Error executing procedures in ForNRITableAdaptor.doPostTask(): " + procedureName); System.out.println("ERROR: code=" + e.getErrorCode() + ", msg=" + e.getMessage()); return false; } catch (Exception e) { System.out.println("ERROR: " + e.getMessage()); e.printStackTrace(System.out); return false; } finally { try { if (rs != null) rs.close(); if (st != null) st.close(); } catch (Exception e) { } } //Вызов сторонней процедуры: //long time = System.currentTimeMillis() - 2 * (24 * 60 * 60 * 1000); //минус два дня //Date lastUpdateDate = new Date(time); long time; if (getLastUpdateDate() != null) { time = getLastUpdateDate().getTime(); } else { System.out.println("getLastUpdateDate() == null"); time = System.currentTimeMillis() - 2 * (24 * 60 * 60 * 1000); //минус два дня; } java.sql.Date lastUpdateDate = new java.sql.Date(time); System.out.println("init lastUpdateDate="+lastUpdateDate); try { String blobDirPath = prop.getProperty("loadWayMapsDirPath"); System.out.println("Вызов сторонней процедуры loadWayMaps:"); com.hps.beeline.loader.MainProcessor.loadWayMaps(new Integer(qry.getQueryId()), getConTARGET_DB(), getConLOG_DB(), lastUpdateDate, blobDirPath); blobDirPath = prop.getProperty("loadPassListsDirPath"); System.out.println("Вызов сторонней процедуры loadPassLists:"); com.hps.beeline.loader.MainProcessor.loadPassLists(new Integer(qry.getQueryId()), getConTARGET_DB(), getConLOG_DB(), lastUpdateDate, blobDirPath); } catch (Exception e) { System.out.println("Вызов сторонней процедуры ERROR: " + e.getMessage()); e.printStackTrace(System.out); return false; } return true; } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
f84312b31ba4bb45c968f91bc6e8540a3a8b3408
92f7ba1ebc2f47ecb58581a2ed653590789a2136
/src/com/infodms/dms/po/TmAreaGroupPO.java
3b5d346c7d06afd6658c70ebb472ec2dcb22ff6a
[]
no_license
dnd2/CQZTDMS
504acc1883bfe45842c4dae03ec2ba90f0f991ee
5319c062cf1932f8181fdd06cf7e606935514bf1
refs/heads/master
2021-01-23T15:30:45.704047
2017-09-07T07:47:51
2017-09-07T07:47:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
/* * Copyright (c) 2005 Infoservice, Inc. All Rights Reserved. * This software is published under the terms of the Infoservice Software * License version 1.0, a copy of which has been included with this * distribution in the LICENSE.txt file. * * CreateDate : 2010-07-06 10:17:46 * CreateBy : Arthur_Liu * Comment : generate by com.sgm.po.POGen */ package com.infodms.dms.po; import java.util.Date; import com.infoservice.po3.bean.PO; @SuppressWarnings("serial") public class TmAreaGroupPO extends PO{ private Long updateBy; private Date updateDate; private Long createBy; private Date createDate; private Long areaId; private Long materialGroupId; private Long relationId; public void setUpdateBy(Long updateBy){ this.updateBy=updateBy; } public Long getUpdateBy(){ return this.updateBy; } public void setUpdateDate(Date updateDate){ this.updateDate=updateDate; } public Date getUpdateDate(){ return this.updateDate; } public void setCreateBy(Long createBy){ this.createBy=createBy; } public Long getCreateBy(){ return this.createBy; } public void setCreateDate(Date createDate){ this.createDate=createDate; } public Date getCreateDate(){ return this.createDate; } public void setAreaId(Long areaId){ this.areaId=areaId; } public Long getAreaId(){ return this.areaId; } public void setMaterialGroupId(Long materialGroupId){ this.materialGroupId=materialGroupId; } public Long getMaterialGroupId(){ return this.materialGroupId; } public void setRelationId(Long relationId){ this.relationId=relationId; } public Long getRelationId(){ return this.relationId; } }
[ "wanghanxiancn@gmail.com" ]
wanghanxiancn@gmail.com
d7ab65fd1d61bb9f2c253d829d02551583690ce3
87450e64ebde67082cf4777fd21c73e8f7e4e619
/Day25/src/test07/Test.java
934ae78102fbeccab67b963ca035b37d3dfa3829
[]
no_license
GoodPineApple/MulcamJavaWorkspace
fbbaf5f30336303830479abb2cf906b09a0bfd88
5d358665451e082860d2941a63fe73ae3d54eabb
refs/heads/master
2021-01-12T08:36:25.504272
2017-05-09T15:10:22
2017-05-09T15:10:22
76,628,272
0
0
null
null
null
null
UHC
Java
false
false
573
java
package test07; public class Test { public static void main(String[] args) throws InterruptedException { System.out.println("main이 시작되었습니다."); MyThread t = new MyThread(); System.out.println("10카운트 쓰레드를 시작합니다"); t.start(); System.out.println("2초만 기다리고 쓰레드를 방해하겠습니다."); //메인 쓰레드가 interrupt 당할일 거의 없어서 예외 던짐 Thread.sleep(2000); t.interrupt(); t.join(); // main종료 표시 마지막에 System.out.println("main종료"); } }
[ "taemin3000@naver.com" ]
taemin3000@naver.com
5e6e1eab0525f5b4eb0fec62c718e2997082b2e7
d431b36970023985c40437fdbe64ceeb5539ecfc
/java-oop-advanced/enums-and-annotations/enums-and-annotations-homework/src/P07DeckOfCards/CardRank.java
59b90e0ac891595a11b858e40583d640fc1d6917
[]
no_license
HristoRaykov/JavaOOP-05.2018
4cb10766c309f4611c99743f11ef4e3ff341ebf4
cab2c0cdd35c15312329a2681f9969d8a9276d14
refs/heads/master
2021-06-27T21:15:59.601826
2019-06-06T11:42:50
2019-06-06T11:42:50
163,294,049
0
0
null
2020-10-13T11:35:51
2018-12-27T12:49:21
Java
UTF-8
Java
false
false
293
java
package P07DeckOfCards; public enum CardRank { ACE(14), TWO(2), THREE(3), FOUR(4), FIVE(5), SIX(6), SEVEN(7), EIGHT(8), NINE(9), TEN(10), JACK(11), QUEEN(12), KING(13); private int power; CardRank(int power) { this.power = power; } public int getPower() { return power; } }
[ "hristocr@gmail.com" ]
hristocr@gmail.com
e780ddc752cbaaf8acf0e24a254c1166417e001b
c6f81b80ccb910e1af2997474fa217fe45a42d01
/nettosphere-samples/socketio-chat/src/main/java/org/nettosphere/samples/chat/NettosphereChat.java
5272c2fadecc05fb40b06f4c0748316820188aa2
[ "Apache-2.0" ]
permissive
sdecoppet/atmosphere-samples
7552afeb1101c71a323c1a3e0db963ac0aaed5c1
b555d55bb5f83d0de6fcfd91e478755172a4a715
refs/heads/master
2021-01-24T05:24:46.305378
2016-02-08T21:41:47
2016-02-08T21:41:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,354
java
/* * Copyright 2015 Async-IO.org * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.nettosphere.samples.chat; import org.atmosphere.nettosphere.Config; import org.atmosphere.nettosphere.Nettosphere; import org.atmosphere.socketio.cpr.SocketIOAtmosphereInterceptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * A bootstrap class that start Nettosphere and the Atmosphere Chat samples. */ public class NettosphereChat { private static final Logger logger = LoggerFactory.getLogger(Nettosphere.class); public static void main(String[] args) throws IOException { Config.Builder b = new Config.Builder(); b.resource(SocketIOChatAtmosphereHandler.class) // For *-distrubution .resource("./webapps") // For mvn exec:java .resource("./src/main/resources") // For running inside an IDE .resource("./nettosphere-samples/socketio-chat/src/main/resources") .initParam(SocketIOAtmosphereInterceptor.SOCKETIO_TRANSPORT, "websocket,xhr-polling,jsonp-polling") .mappingPath("/chat") .interceptor(new SocketIOAtmosphereInterceptor()) .port(8080) .host("127.0.0.1") .build(); Nettosphere s = new Nettosphere.Builder().config(b.build()).build(); s.start(); String a = ""; logger.info("NettoSphere Chat Server started on port {}", 8080); logger.info("Type quit to stop the server"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while (!(a.equals("quit"))) { a = br.readLine(); } System.exit(-1); } }
[ "jfarcand@apache.org" ]
jfarcand@apache.org
08bad4bbd181612ad657fa3abdd4e381c1ae1b42
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/protocal/protobuf/cyj.java
7aba4a7b8e15e08b8989c62ffa88f68c0d522557
[]
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
2,728
java
package com.tencent.p177mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.p205bt.C1331a; import p690e.p691a.p692a.C6092b; import p690e.p691a.p692a.p693a.C6086a; import p690e.p691a.p692a.p695b.p697b.C6091a; import p690e.p691a.p692a.p698c.C6093a; /* renamed from: com.tencent.mm.protocal.protobuf.cyj */ public final class cyj extends C1331a { public int timestamp; public String username; /* renamed from: op */ public final int mo4669op(int i, Object... objArr) { AppMethodBeat.m2504i(28772); C6092b c6092b; int bs; if (i == 0) { C6093a c6093a = (C6093a) objArr[0]; if (this.username == null) { c6092b = new C6092b("Not all required fields were included: username"); AppMethodBeat.m2505o(28772); throw c6092b; } c6093a.mo13480iz(1, this.timestamp); if (this.username != null) { c6093a.mo13475e(2, this.username); } AppMethodBeat.m2505o(28772); return 0; } else if (i == 1) { bs = C6091a.m9572bs(1, this.timestamp) + 0; if (this.username != null) { bs += C6091a.m9575f(2, this.username); } AppMethodBeat.m2505o(28772); return bs; } else if (i == 2) { C6086a c6086a = new C6086a((byte[]) objArr[0], unknownTagHandler); for (bs = C1331a.getNextFieldNumber(c6086a); bs > 0; bs = C1331a.getNextFieldNumber(c6086a)) { if (!super.populateBuilderWithField(c6086a, this, bs)) { c6086a.ems(); } } if (this.username == null) { c6092b = new C6092b("Not all required fields were included: username"); AppMethodBeat.m2505o(28772); throw c6092b; } AppMethodBeat.m2505o(28772); return 0; } else if (i == 3) { C6086a c6086a2 = (C6086a) objArr[0]; cyj cyj = (cyj) objArr[1]; switch (((Integer) objArr[2]).intValue()) { case 1: cyj.timestamp = c6086a2.BTU.mo13458vd(); AppMethodBeat.m2505o(28772); return 0; case 2: cyj.username = c6086a2.BTU.readString(); AppMethodBeat.m2505o(28772); return 0; default: AppMethodBeat.m2505o(28772); return -1; } } else { AppMethodBeat.m2505o(28772); return -1; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
f8a51fabb1d12ac2fccd051aea3af2a470ef1c35
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/xweb/i.java
bc20f5d6220c495f3bfaab911b9293c8d0604cde
[]
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
5,946
java
package com.tencent.xweb; import android.content.Context; import android.webkit.ValueCallback; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.xweb.x5.a.e; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.json.JSONException; import org.json.JSONObject; import org.xwalk.core.Log; public final class i { private static Map<String, Integer> rXP; static { AppMethodBeat.i(156755); rXP = new HashMap(); AppMethodBeat.o(156755); } private static void a(Context paramContext, String paramString1, String paramString2, String paramString3, int paramInt, boolean paramBoolean, HashMap<String, String> paramHashMap, ValueCallback<String> paramValueCallback, ValueCallback<Integer> paramValueCallback1) { AppMethodBeat.i(156750); HashMap localHashMap = new HashMap(2); localHashMap.put("local", "true"); localHashMap.put("style", "1"); if (paramHashMap != null) { try { paramHashMap = paramHashMap.entrySet().iterator(); while (paramHashMap.hasNext()) { Map.Entry localEntry = (Map.Entry)paramHashMap.next(); localHashMap.put((String)localEntry.getKey(), (String)localEntry.getValue()); } try { paramHashMap = new JSONObject(); paramHashMap.put("path", paramString1); paramHashMap.put("ext", paramString2); paramHashMap.put("token", paramString3); paramHashMap = paramHashMap.toString(); int i = e.startMiniQBToLoadUrl(paramContext, paramHashMap, localHashMap, paramValueCallback); rXP.put(paramString3 + paramString1, Integer.valueOf(i)); Log.i("FileReaderX5", "loadByMiniQB, ret = " + i + ", isSecondTime = " + String.valueOf(paramBoolean)); a(paramString2, paramValueCallback1, i, paramInt); AppMethodBeat.o(156750); return; } finally { Log.e("FileReaderX5", "loadByMiniQB jsonObject error, isSecondTime = " + String.valueOf(paramBoolean) + ", msg: " + paramContext.getMessage()); b(paramString2, paramValueCallback1, -100001, paramInt); AppMethodBeat.o(156750); } } finally { Log.e("FileReaderX5", "loadByMiniQB extraParams error, isSecondTime = " + String.valueOf(paramBoolean) + ", msg: " + paramHashMap.getMessage()); } } } private static void a(String paramString, ValueCallback<Integer> paramValueCallback, int paramInt1, int paramInt2) { AppMethodBeat.i(156751); h.b(paramString, paramInt1, false, paramInt2); paramValueCallback.onReceiveValue(Integer.valueOf(paramInt1)); AppMethodBeat.o(156751); } private static void b(String paramString, ValueCallback<Integer> paramValueCallback, int paramInt1, int paramInt2) { AppMethodBeat.i(156752); h.b(paramString, paramInt1, true, paramInt2); paramValueCallback.onReceiveValue(Integer.valueOf(-102)); AppMethodBeat.o(156752); } public static void e(final int paramInt, final Context paramContext, final String paramString1, String paramString2, final String paramString3, boolean paramBoolean, final HashMap<String, String> paramHashMap, final ValueCallback<String> paramValueCallback, final ValueCallback<Integer> paramValueCallback1) { AppMethodBeat.i(156748); if (paramBoolean) { Log.i("FileReaderX5", "readFile by x5, second time, skip all report except failure, directly go to loadByMiniQB"); a(paramContext, paramString1, paramString2, paramString3, paramInt, true, paramHashMap, paramValueCallback, paramValueCallback1); AppMethodBeat.o(156748); return; } Object localObject2 = new StringBuilder("readFile by x5, fileExt: "); if (paramString2 != null) {} for (Object localObject1 = paramString2;; localObject1 = "null") { Log.i("FileReaderX5", (String)localObject1); h.qR(paramString2, h.a.aiev.name()); h.jH(paramString2, paramInt); try { localObject1 = new JSONObject(); ((JSONObject)localObject1).putOpt("path", paramString1); ((JSONObject)localObject1).putOpt("ext", paramString2); localObject1 = ((JSONObject)localObject1).toString(); localObject2 = paramContext.getApplicationContext(); e.disableAutoCreateX5Webview(); e.a((Context)localObject2, (String)localObject1, new ValueCallback() {}); AppMethodBeat.o(156748); return; } catch (JSONException paramContext) { Log.e("FileReaderX5", "readFile jsonObject error" + paramContext.getMessage()); b(paramString2, paramValueCallback1, -100001, paramInt); AppMethodBeat.o(156748); } } } public static void t(Context paramContext, String paramString1, String paramString2) { AppMethodBeat.i(156749); try { Integer localInteger = (Integer)rXP.get(paramString1 + paramString2); if (localInteger == null) { AppMethodBeat.o(156749); return; } rXP.remove(paramString1 + paramString2); if (localInteger.intValue() == 0) { Log.i("FileReaderX5", "finishReadFile"); e.closeFileReader(paramContext); AppMethodBeat.o(156749); return; } } finally { Log.e("FileReaderX5", "finishReadFile error:".concat(String.valueOf(paramContext))); AppMethodBeat.o(156749); return; } Log.i("FileReaderX5", "finishReadFile ret != 0, skip"); AppMethodBeat.o(156749); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes7.jar * Qualified Name: com.tencent.xweb.i * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
50348dc1c14e5661d7e88f0c7fbe33056cf04999
ac65916b13b4a9c6c07f1801d881da466329ed25
/ex/app/extended/module-fixtures/src/main/java/org/incode/domainapp/extended/module/fixtures/shared/simple/dom/SimpleObjectRepository.java
beddb56c9b2e0904de227058d7f2beb4caf87c6e
[ "Apache-2.0" ]
permissive
bradh/incode-platform
a7486ae8606d08de6704ccb26907d31b07c2e6cb
65c6b0b7066ae46b8e00326b49cd316b54932cb0
refs/heads/master
2020-03-25T09:21:10.562393
2018-08-01T19:02:25
2018-08-01T19:02:25
143,661,541
0
0
null
2018-08-06T01:30:18
2018-08-06T01:30:18
null
UTF-8
Java
false
false
1,295
java
package org.incode.domainapp.extended.module.fixtures.shared.simple.dom; import java.util.List; import org.apache.isis.applib.annotation.DomainService; import org.apache.isis.applib.annotation.NatureOfService; import org.apache.isis.applib.query.QueryDefault; import org.apache.isis.applib.services.registry.ServiceRegistry2; import org.apache.isis.applib.services.repository.RepositoryService; @DomainService( nature = NatureOfService.DOMAIN, repositoryFor = SimpleObject.class ) public class SimpleObjectRepository { public List<SimpleObject> listAll() { return repositoryService.allInstances(SimpleObject.class); } public List<SimpleObject> findByName(final String name) { return repositoryService.allMatches( new QueryDefault<>( SimpleObject.class, "findByName", "name", name)); } public SimpleObject create(final String name) { final SimpleObject object = new SimpleObject(name); serviceRegistry.injectServicesInto(object); repositoryService.persist(object); return object; } @javax.inject.Inject RepositoryService repositoryService; @javax.inject.Inject ServiceRegistry2 serviceRegistry; }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
6042e9d578d5daf231ecfbd6314ac355689baa50
5d144176610070cdd63abdf92403c01506bce070
/app/src/main/java/com/example/demo/Test.java
e821484bd355f5bd645a1fa700c167b165719702
[]
no_license
huanglonghu/Demo
cc6c974ea084be8f3860725a5467f8a2c6d016c9
aa0f42dad733193219d61761d390208bb6408caf
refs/heads/master
2021-05-24T00:51:30.578271
2020-05-07T09:55:32
2020-05-07T09:55:32
74,112,585
0
0
null
null
null
null
UTF-8
Java
false
false
935
java
package com.example.demo; public class Test { public void a() { } public static void main(String[] arges) { Test test = new Test(); int a[]={49,38,65,97,76,13,27,49,78,34,12,64,5,4,62,99,98,54,56,17,18,23,34,15,35,25,53,51}; test.sort(a); for(int i=0;i<a.length;i++){ System.out.println(a[i]); } } public void sort(int[] arr) { int tmp; for(int i = 1; i < arr.length; i++) { // 待插入数据 tmp = arr[i]; int j; for(j = i - 1; j >= 0; j--) { // 判断是否大于tmp,大于则后移一位 if(arr[j] > tmp) { arr[j+1] = arr[j]; }else{ break; } } System.out.println(i+"===============i====j==========="+j); arr[j+1] = tmp; } } }
[ "952204748@qq.com" ]
952204748@qq.com
d27555a0c52313bcb3a54679fc6935966780cbdb
bfed0d992f925ee137eb94026f0283724eba17fa
/V4.0/ZENN/src/nl/zeesoft/zenn/test/TestEnvironment.java
ed7e9c2ba5f8d5a2c235703efb81420f0227a6ec
[]
no_license
DyzLecticus/Zeesoft
c17c469b000f15301ff2be6c19671b12bba25f99
b5053b762627762ffeaa2de4f779d6e1524a936d
refs/heads/master
2023-04-15T01:42:36.260351
2023-04-10T06:50:40
2023-04-10T06:50:40
28,697,832
7
2
null
2023-02-27T16:30:37
2015-01-01T22:57:39
Java
UTF-8
Java
false
false
2,870
java
package nl.zeesoft.zenn.test; import nl.zeesoft.zdk.ZStringBuilder; import nl.zeesoft.zdk.json.JsFile; import nl.zeesoft.zdk.test.TestObject; import nl.zeesoft.zdk.test.Tester; import nl.zeesoft.zenn.environment.EnvironmentConfig; import nl.zeesoft.zenn.environment.EnvironmentState; public class TestEnvironment extends TestObject { public TestEnvironment(Tester tester) { super(tester); } public static void main(String[] args) { (new TestEnvironment(new Tester())).test(args); } @Override protected void describe() { /* TODO: describe System.out.println("This test shows how to create an *AnimalNN* and an *AnimalTestCycleSet* to test its functioning."); System.out.println(); System.out.println("**Example implementation** "); System.out.println("~~~~"); System.out.println("// Create the animal neural network"); System.out.println("AnimalNN nn = new AnimalNN();"); System.out.println("// Initialize the animal neural network"); System.out.println("ZStringBuilder err = nn.initialize();"); System.out.println("// Create the animal test cycle set"); System.out.println("AnimalTestCycleSet tcs = AnimalTestCycleSet();"); System.out.println("// Initialize the animal test cycle set"); System.out.println("tcs.initialize(nn,true);"); System.out.println("// Run the animal test cycle set"); System.out.println("nn.runTestCycleSet(tcs);"); System.out.println("~~~~"); System.out.println(); getTester().describeMock(MockAnimalNN.class.getName()); System.out.println(); System.out.println("Class references; "); System.out.println(" * " + getTester().getLinkForClass(TestEvolver.class)); System.out.println(" * " + getTester().getLinkForClass(MockAnimalNN.class)); System.out.println(" * " + getTester().getLinkForClass(AnimalNN.class)); System.out.println(" * " + getTester().getLinkForClass(AnimalTestCycleSet.class)); System.out.println(); System.out.println("**Test output** "); System.out.println("The output of this test shows; "); System.out.println(" * The time it took to generate a trainable animal neural network "); System.out.println(" * The neural network state after running the final test cycle "); System.out.println(" * The test cycle set results "); */ } @Override protected void test(String[] args) { EnvironmentConfig env = new EnvironmentConfig(); JsFile json = env.toJson(); ZStringBuilder oriStr = json.toStringBuilderReadFormat(); System.out.println(oriStr); testJsAble(env,new EnvironmentConfig(),"The environment configuration JSON does not match expectation"); EnvironmentState envS = new EnvironmentState(); envS.initialize(env); json = envS.toJson(); oriStr = json.toStringBuilderReadFormat(); System.out.println(oriStr); testJsAble(envS,new EnvironmentState(),"The environment state JSON does not match expectation"); } }
[ "dyz@xs4all.nl" ]
dyz@xs4all.nl
0a0a8abbd0e25346abbde8bca99543e861bab145
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project35/src/main/java/org/gradle/test/performance35_3/Production35_294.java
b213b9d6cbed55dcc45a602f05dc7645a609ce4a
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance35_3; public class Production35_294 extends org.gradle.test.performance13_3.Production13_294 { private final String property; public Production35_294() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c93b63bbafb6cd7f3bf3934a46199863ab6ab177
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app49/source/com/google/android/gms/maps/model/m.java
350cf211767d4c60218b31ca2743943ac33a9b77
[ "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
763
java
package com.google.android.gms.maps.model; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.c; public final class m implements Parcelable.Creator<PolylineOptions> { public m() {} static void a(PolylineOptions paramPolylineOptions, Parcel paramParcel) { int i = c.a(paramParcel); c.a(paramParcel, 1, paramPolylineOptions.a()); c.b(paramParcel, 2, paramPolylineOptions.b(), false); c.a(paramParcel, 3, paramPolylineOptions.c()); c.a(paramParcel, 4, paramPolylineOptions.d()); c.a(paramParcel, 5, paramPolylineOptions.e()); c.a(paramParcel, 6, paramPolylineOptions.f()); c.a(paramParcel, 7, paramPolylineOptions.g()); c.a(paramParcel, i); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
f56d23c8d16bb004efa2902751d195eaf54893c1
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
/src/main/java/com/alipay/api/domain/AdUserQualification.java
25ab98e53373868f7353b1c8707bd91e22bf053d
[ "Apache-2.0" ]
permissive
cc-shifo/alipay-sdk-java-all
38b23cf946b73768981fdeee792e3dae568da48c
938d6850e63160e867d35317a4a00ed7ba078257
refs/heads/master
2022-12-22T14:06:26.961978
2020-09-23T04:00:10
2020-09-23T04:00:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,178
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 广告主资质 * * @author auto create * @since 1.0, 2018-10-22 15:17:02 */ public class AdUserQualification extends AlipayObject { private static final long serialVersionUID = 1132121338955299315L; /** * 审核人员id */ @ApiField("approver") private String approver; /** * 审核原因 */ @ApiField("audit_reason") private String auditReason; /** * 审核状态:0 审核通过、1 库存校验中、2运营审核中、3 审核拒绝 */ @ApiField("audit_status") private Long auditStatus; /** * 审核日期 */ @ApiField("audit_time") private Long auditTime; /** * 资质文件列表 */ @ApiListField("file_url") @ApiField("string") private List<String> fileUrl; /** * 资质id */ @ApiField("id") private Long id; /** * 资质名称 */ @ApiField("qualification_name") private String qualificationName; public String getApprover() { return this.approver; } public void setApprover(String approver) { this.approver = approver; } public String getAuditReason() { return this.auditReason; } public void setAuditReason(String auditReason) { this.auditReason = auditReason; } public Long getAuditStatus() { return this.auditStatus; } public void setAuditStatus(Long auditStatus) { this.auditStatus = auditStatus; } public Long getAuditTime() { return this.auditTime; } public void setAuditTime(Long auditTime) { this.auditTime = auditTime; } public List<String> getFileUrl() { return this.fileUrl; } public void setFileUrl(List<String> fileUrl) { this.fileUrl = fileUrl; } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getQualificationName() { return this.qualificationName; } public void setQualificationName(String qualificationName) { this.qualificationName = qualificationName; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8f9f2ce030b11f7baa0a45fbd8e28c74071f7c6b
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project205/src/main/java/org/gradle/test/performance/largejavamultiproject/project205/p1028/Production20560.java
294e3393f7213c8f0b12bf26e3f06f66dd8e2596
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,245
java
package org.gradle.test.performance.largejavamultiproject.project205.p1028; import org.gradle.test.performance.largejavamultiproject.project205.p1027.Production20557; import org.gradle.test.performance.largejavamultiproject.project205.p1027.Production20558; import org.gradle.test.performance.largejavamultiproject.project205.p1027.Production20559; public class Production20560 { private Production20557 property0; public Production20557 getProperty0() { return property0; } public void setProperty0(Production20557 value) { property0 = value; } private Production20558 property1; public Production20558 getProperty1() { return property1; } public void setProperty1(Production20558 value) { property1 = value; } private Production20559 property2; public Production20559 getProperty2() { return property2; } public void setProperty2(Production20559 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
bfe3bfe17f60e5a6445329fc19843215c6189bcb
ed604b012ff7040db218efd1b9b49c514e15e14c
/src/main/java/com/desgreen/education/siapp/backend/jpa_repository/FSiswaJPARepository.java
44c77bcb26f8193693b215acc549a967cce8a3a4
[ "Unlicense" ]
permissive
bagus-stimata/siapp
2f2edf0be9c00c629faffa050bf060ccd3d3c0c7
67f6ddde5efcf01959100f084da402453d7a419d
refs/heads/master
2022-12-25T09:05:36.261606
2020-10-11T11:28:03
2020-10-11T11:28:03
284,419,437
1
0
null
null
null
null
UTF-8
Java
false
false
1,399
java
package com.desgreen.education.siapp.backend.jpa_repository; import com.desgreen.education.siapp.backend.model.FDivision; import com.desgreen.education.siapp.backend.model.FSiswa; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import java.util.List; public interface FSiswaJPARepository extends JpaRepository<FSiswa, Long> { FSiswa findById(long id); List<FSiswa> findByNis(String nis); @Query("SELECT u FROM FSiswa u WHERE u.nis LIKE :nis AND u.fullName LIKE :fullName") List<FSiswa> findAll(String nis, String fullName); @Query("SELECT u FROM FSiswa u WHERE u.nis LIKE :nis AND u.fullName LIKE :fullName AND u.address1 LIKE :address1 AND u.city LIKE :city ") List<FSiswa> findAll(String nis, String fullName, String address1, String city); @Query("SELECT u FROM FSiswa u WHERE u.fdivisionBean = :fdivisionBean" ) List<FSiswa> findAllByDivision(FDivision fdivisionBean); @Query("SELECT u FROM FSiswa u WHERE u.fdivisionBean IN :listFdivision" ) List<FSiswa> findAllByDivision(List<FDivision> listFdivision); @Query("SELECT u FROM FSiswa u WHERE u.fdivisionBean = :fdivisionBean" ) Page<FSiswa> findAllByDivision(FDivision fdivisionBean, Pageable pageable); }
[ "bagus.stimata@gmail.com" ]
bagus.stimata@gmail.com
c02f6508892dacd7ab3b601ba955e89633aeb854
bb85a06d3fff8631f5dca31a55831cd48f747f1f
/src/main/business/com/goisan/educational/orderwork/service/impl/OtherWorkloadServiceImpl.java
d7feaae8416b08143d6f4a431926deeae5408473
[]
no_license
lqj12267488/Gemini
01e2328600d0dfcb25d1880e82c30f6c36d72bc9
e1677dc1006a146e60929f02dba0213f21c97485
refs/heads/master
2022-12-23T10:55:38.115096
2019-12-05T01:51:26
2019-12-05T01:51:26
229,698,706
0
0
null
2022-12-16T11:36:09
2019-12-23T07:20:16
Java
UTF-8
Java
false
false
1,160
java
package com.goisan.educational.orderwork.service.impl; import com.goisan.educational.orderwork.bean.OtherWorkload; import com.goisan.educational.orderwork.dao.OtherWorkloadDao; import com.goisan.educational.orderwork.service.OtherWorkloadService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; @Service public class OtherWorkloadServiceImpl implements OtherWorkloadService{ @Resource private OtherWorkloadDao otherWorkloadDao; public List<OtherWorkload> otherWorkloadAction(OtherWorkload otherWorkload){ return otherWorkloadDao.otherWorkloadAction(otherWorkload); } public void deleteOtherWorkloadById(String id){ otherWorkloadDao.deleteOtherWorkloadById(id); } public OtherWorkload getOtherWorkloadById(String id){ return otherWorkloadDao.getOtherWorkloadById(id); } public void updateOtherWorkloadById(OtherWorkload otherWorkload){ otherWorkloadDao.updateOtherWorkloadById(otherWorkload); } public void insertOtherWorkload(OtherWorkload otherWorkload){ otherWorkloadDao.insertOtherWorkload(otherWorkload); } }
[ "1240414272" ]
1240414272
84dbf388ef4325c9bc2a523a41d985604f0ea142
83d56024094d15f64e07650dd2b606a38d7ec5f1
/sicc_druida/fuentes/java/CccCuentCorriBancaConectorCreate.java
1ca5aea65e66a20a4ca3eea9a1b43e57f5ff7561
[]
no_license
cdiglesias/SICC
bdeba6af8f49e8d038ef30b61fcc6371c1083840
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
refs/heads/master
2021-01-19T19:45:14.788800
2016-04-07T16:20:51
2016-04-07T16:20:51
null
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
1,942
java
import org.w3c.dom.*; import java.util.ArrayList; public class CccCuentCorriBancaConectorCreate implements es.indra.druida.base.ObjetoXML { private ArrayList v = new ArrayList(); public Element getXML (Document doc){ getXML0(doc); return (Element)v.get(0); } /* Primer nodo */ private void getXML0(Document doc) { v.add(doc.createElement("CONECTOR")); ((Element)v.get(0)).setAttribute("TIPO","EJB" ); ((Element)v.get(0)).setAttribute("NOMBRE","mare.mln.BusinessFacade" ); ((Element)v.get(0)).setAttribute("METODO","execute" ); ((Element)v.get(0)).setAttribute("REVISION","3.1" ); ((Element)v.get(0)).setAttribute("OBSERVACIONES","Conector para la inserción de un nuevo elemento sobre la entidad CccCuentCorriBanca" ); /* Empieza nodo:1 / Elemento padre: 0 */ v.add(doc.createElement("ENTRADA")); ((Element)v.get(0)).appendChild((Element)v.get(1)); /* Empieza nodo:2 / Elemento padre: 1 */ v.add(doc.createElement("CAMPO")); ((Element)v.get(2)).setAttribute("NOMBRE","MMGCccCuentCorriBancaCreateID" ); ((Element)v.get(2)).setAttribute("TIPO","OBJETO" ); ((Element)v.get(2)).setAttribute("LONGITUD","50" ); ((Element)v.get(1)).appendChild((Element)v.get(2)); /* Termina nodo:2 */ /* Empieza nodo:3 / Elemento padre: 1 */ v.add(doc.createElement("CAMPO")); ((Element)v.get(3)).setAttribute("NOMBRE","MMGCccCuentCorriBancaCreateDTO" ); ((Element)v.get(3)).setAttribute("TIPO","OBJETO" ); ((Element)v.get(3)).setAttribute("LONGITUD","50" ); ((Element)v.get(1)).appendChild((Element)v.get(3)); /* Termina nodo:3 */ /* Termina nodo:1 */ /* Empieza nodo:4 / Elemento padre: 0 */ v.add(doc.createElement("SALIDA")); ((Element)v.get(0)).appendChild((Element)v.get(4)); /* Termina nodo:4 */ } }
[ "hp.vega@hotmail.com" ]
hp.vega@hotmail.com
2eb4bcf4ba61b3b90b49159b9b02eeb28e06d2c2
7f51f95e60d78402467a47194ddc15cb478a2bae
/src/main/java/com/company/Node.java
e22255addb85f0e7faa6e90eafe4f7671d519c7a
[]
no_license
KevinW831205/PracticeProblems
163035ffb0db43c4448001bace435c1fbc2ce1ff
be956b9d898116d6c38b9e44305a244f9b8466ef
refs/heads/master
2022-10-25T14:38:51.727065
2022-10-11T21:55:24
2022-10-11T21:55:24
226,859,926
0
0
null
2020-10-13T18:05:19
2019-12-09T11:54:58
Java
UTF-8
Java
false
false
215
java
package com.company; public class Node { public Node left; public Node right; public int value; public Node(Node l, Node r, int v) { left = l; right = r; value = v; } }
[ "bird831205@hotmail.com" ]
bird831205@hotmail.com
4f1c5cf2cf85f4f7a6ba30353a40a6d5b9cd742d
09e03ba73062c62c1d3389cdecb94f68430cd82d
/base/config/src/main/java/org/artifactory/version/ConfigVersion.java
40102bded86338678415054ba9b3a42c682a8a35
[ "Apache-2.0" ]
permissive
alancnet/artifactory
1ee6183301b581e60f67691d7fa025b0fb44b118
7ac3ea76471a00543eaf60e82b554d8edd894c0f
refs/heads/master
2021-01-10T14:58:53.769805
2015-10-07T16:46:14
2015-10-07T16:46:14
43,829,862
3
6
null
2016-03-09T18:30:58
2015-10-07T16:38:51
Java
UTF-8
Java
false
false
3,088
java
/* * Artifactory is a binaries repository manager. * Copyright (C) 2012 JFrog Ltd. * * Artifactory is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Artifactory 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 Artifactory. If not, see <http://www.gnu.org/licenses/>. */ package org.artifactory.version; /** * Holds the various Artifactory configuration versions. Each configuration version represents a range of versions that * use the same underlying sub-config versions (of metadata, security etc.). Config versions can be used to determine if * conversion from one version to another is needed (different sub config elements), if such conversion is possible, and * whether it can be done automatically. * * @author Yossi Shaul */ public enum ConfigVersion implements SubConfigElementVersion { v1(ArtifactoryVersion.v122rc0, ArtifactoryVersion.v130beta2, false), v2(ArtifactoryVersion.v130beta3, ArtifactoryVersion.v130beta5, false), v3(ArtifactoryVersion.v130beta6, ArtifactoryVersion.v130beta61, false), v4(ArtifactoryVersion.v130rc1, ArtifactoryVersion.v208), v5(ArtifactoryVersion.v210, ArtifactoryVersion.getCurrent()); private final VersionComparator comparator; private final boolean autoUpdateCapable; ConfigVersion(ArtifactoryVersion from, ArtifactoryVersion until) { this(from, until, true); } ConfigVersion(ArtifactoryVersion from, ArtifactoryVersion until, boolean autoUpdateCapable) { this.comparator = new VersionComparator( from, until); this.autoUpdateCapable = autoUpdateCapable; } public boolean isAutoUpdateCapable() { return autoUpdateCapable; } public boolean isCurrent() { return comparator.isCurrent(); } public boolean isCompatibleWith(ArtifactoryVersion version) { return comparator.supports(version); } public boolean isBefore(ArtifactoryVersion version) { return comparator.isBefore(version); } public boolean isAfter(ArtifactoryVersion version) { return comparator.isAfter(version); } @Override public VersionComparator getComparator() { return comparator; } public static ConfigVersion findCompatibleVersion(ArtifactoryVersion version) { for (ConfigVersion configVersion : values()) { if (configVersion.isCompatibleWith(version)) { return configVersion; } } throw new IllegalArgumentException( "No compatible storage version found for exiting Artifactory storage version: " + version + "."); } }
[ "github@alanc.net" ]
github@alanc.net