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
2d971af0fbdda4ed2eb6982620441c904b0881de
c75e79bb255ebc8e019eec465a0a7f4eb2520f6f
/src/chap12/lecture/threadClass/ThreadClassEx1.java
268dabb8a306b62f6907f31ee8b6b237df298b31
[]
no_license
sebaek/java20200929
49790fe0b65a7f31c24170ac934b188441d6aa86
4006f44fb286f6f97f6a348c7dfcf3ecdcb2b421
refs/heads/master
2023-02-17T06:13:16.575816
2021-01-15T03:23:19
2021-01-15T03:23:19
299,485,640
0
1
null
null
null
null
UTF-8
Java
false
false
456
java
package chap12.lecture.threadClass; public class ThreadClassEx1 { public static void main(String[] args) { for (int i = 0; i < 5; i++) { System.out.println(i); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } } for (int i = 0; i < 5; i++) { System.out.println((char) ('a' + i)); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } } } }
[ "sebaek@gmail.com" ]
sebaek@gmail.com
a2a22bd7c3291a6f0471494236d6c247f923b482
df6f96898184729604068a013622c5a3b0833c03
/app/src/main/java/com/rose/guojiangzhibo/activity/BalanceActivity.java
3abb25b9771406ffe8d395aced56b225b14e96a6
[]
no_license
cherry98/huahua
bd0ab7bcc2b304d7f7c1f44afbaeb0aa38f6d934
73ce804da1f0f28f17a57b8eaed376d9d3301ddd
refs/heads/master
2020-12-30T13:09:29.585800
2017-05-15T15:24:58
2017-05-15T15:24:58
91,336,211
0
0
null
null
null
null
UTF-8
Java
false
false
3,837
java
package com.rose.guojiangzhibo.activity; import android.annotation.SuppressLint; import android.os.Handler; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Toast; import com.alipay.sdk.app.PayTask; import com.rose.guojiangzhibo.R; import com.rose.guojiangzhibo.Result.PayResult; import com.rose.guojiangzhibo.server.ServerDo; public class BalanceActivity extends AppCompatActivity { private ServerDo serverDo; //支付1、 导入jar包 2、 清单文件配置 3、 混淆 4、发起支付宝支付 post 请求 服务期响应(response(payinfo)) //5、通过payTask调用支付宝客户端进行支付 6、支付宝的响应 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_balance); serverDo = new ServerDo(); } @SuppressLint("HandlerLeak") private Handler mHandler = new Handler() { @SuppressWarnings("unused") public void handleMessage(Message msg) { switch (msg.what) { case 0: { PayResult payResult = new PayResult((String) msg.obj); /** * 同步返回的结果必须放置到服务端进行验证(验证的规则请看https://doc.open.alipay.com/doc2/ * detail.htm?spm=0.0.0.0.xdvAU6&treeId=59&articleId=103665& * docType=1) 建议商户依赖异步通知 */ String resultInfo = payResult.getResult();// 同步返回需要验证的信息 String resultStatus = payResult.getResultStatus(); // 判断resultStatus 为“9000”则代表支付成功,具体状态码代表含义可参考接口文档 if (TextUtils.equals(resultStatus, "9000")) { Toast.makeText(BalanceActivity.this, "支付成功", Toast.LENGTH_SHORT).show(); //TODO 界面跳转 或者其他的业务逻辑 } else { // 判断resultStatus 为非"9000"则代表可能支付失败 // "8000"代表支付结果因为支付渠道原因或者系统原因还在等待支付结果确认,最终交易是否成功以服务端异步通知为准(小概率状态) if (TextUtils.equals(resultStatus, "8000")) { Toast.makeText(BalanceActivity.this, "支付结果确认中", Toast.LENGTH_SHORT).show(); } else { // 其他值就可以判断为支付失败,包括用户主动取消支付,或者系统返回的错误 Toast.makeText(BalanceActivity.this, "支付失败", Toast.LENGTH_SHORT).show(); } } break; } default: break; } } }; public void onClick(View view) { final String payinfo = serverDo.doPay(); Runnable payRunnable = new Runnable() { @Override public void run() { // 构造PayTask 对象 PayTask alipay = new PayTask(BalanceActivity.this); // 调用支付接口,获取支付结果 String result = alipay.pay(payinfo, true); Message msg = new Message(); msg.what = 0; msg.obj = result; mHandler.sendMessage(msg); } }; // 必须异步调用 Thread payThread = new Thread(payRunnable); payThread.start(); } }
[ "cherry18515@163.com" ]
cherry18515@163.com
b5233d559a72b2c7bdf4aa9872915fe65a04da62
2e9f17bb2d90d79d2d34f5f928c93ec264ab8a95
/src/test/java/com/melardev/cloud/eureka/FeignApplicationTests.java
2597b7932a7cea1dd6b839f0c5c2ab39a21fae60
[]
no_license
melardev/SpringCloudFeign
ec294966c251f846218f6d82e55e177190004904
872b5c212600973b6bc185ccaedbbc9d360d7d0b
refs/heads/master
2020-04-24T00:36:32.663038
2019-03-03T08:41:55
2019-03-03T08:41:55
171,570,990
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.melardev.cloud.eureka; 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 FeignApplicationTests { @Test public void contextLoads() { } }
[ "melardev@users.noreply.github.com" ]
melardev@users.noreply.github.com
5903ca49656a85d08bdf561029df166ee8dcadd4
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/protocal/protobuf/act.java
cdcf33277fd42986c8cecb3475bae162a01cc6cc
[]
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
1,745
java
package com.tencent.mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.bt.a; public final class act extends a { public int pvD; public int wkw; public final int op(int i, Object... objArr) { AppMethodBeat.i(60036); int bs; if (i == 0) { e.a.a.c.a aVar = (e.a.a.c.a) objArr[0]; aVar.iz(1, this.wkw); aVar.iz(2, this.pvD); AppMethodBeat.o(60036); return 0; } else if (i == 1) { bs = (e.a.a.b.b.a.bs(1, this.wkw) + 0) + e.a.a.b.b.a.bs(2, this.pvD); AppMethodBeat.o(60036); return bs; } else if (i == 2) { e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (bs = a.getNextFieldNumber(aVar2); bs > 0; bs = a.getNextFieldNumber(aVar2)) { if (!super.populateBuilderWithField(aVar2, this, bs)) { aVar2.ems(); } } AppMethodBeat.o(60036); return 0; } else if (i == 3) { e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0]; act act = (act) objArr[1]; switch (((Integer) objArr[2]).intValue()) { case 1: act.wkw = aVar3.BTU.vd(); AppMethodBeat.o(60036); return 0; case 2: act.pvD = aVar3.BTU.vd(); AppMethodBeat.o(60036); return 0; default: AppMethodBeat.o(60036); return -1; } } else { AppMethodBeat.o(60036); return -1; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
c3a86a5a7c08a6428b07ffd492f841200d5a810a
c156463cf82d43fff75cd484b0884a6b99404aa2
/ZeroToHero1/src/Date_And_Time_package/LOCAL_DATE.java
e102b5394fc0a5a9291f60bbb3c40a95c0134991
[]
no_license
bamboo1991/ZeroToHero1
39d71380d5e8f96beb4c4301cb3571b759d48a55
84402e09e63e176d5129f0460fd6087d218dabd8
refs/heads/master
2022-07-10T19:30:33.958922
2020-04-04T04:33:01
2020-04-04T04:33:01
241,712,319
0
1
null
2020-10-13T20:23:23
2020-02-19T19:56:37
Java
UTF-8
Java
false
false
1,627
java
package Date_And_Time_package; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.Month; public class LOCAL_DATE { public static void main(String[] args) { LocalDate date1 = LocalDate.of(2020,Month.JANUARY,15); System.out.println("today is "+date1); LocalTime time = LocalTime.of(4,20); System.out.println("current time "+time); LocalTime time1 = LocalTime.of(1,2,22,22222); System.out.println("exact time is "+time1); //WE CAN NOT DIRECTLY GIVE THE CALUE AS A LOCALdATEtIME.now(); bc in implementation for a mehtod in localdatetime // there is not of mentod accept the localDateTime as a parameter. System.out.println(time1); LocalDateTime dateTime = LocalDateTime.of(2020, Month.JANUARY,15,12,20); System.out.println(dateTime); LocalDateTime timeAndDate = LocalDateTime.of(LocalDate.now(), LocalTime.now()); System.out.println(timeAndDate); //all time methods plusHour, plusMin, PlusSecond, PlusNanos is available for LocalTime objects. // all date mehtods plus Year, PlusMonth, PlusDay // LocalDate date3 = LocalDate.now(); date3=date3.plusDays(40); System.out.println(date3); // Date and Time objects are immutable, once you use the method it will not change your original value. // you need to reassing them again. LocalDate date5=LocalDate.now(); date5=date5.minusYears(28); date5=date5.minusMonths(2); date5=date5.plusDays(18); System.out.println(date5); } }
[ "stamovuber@gmail.com" ]
stamovuber@gmail.com
c0f700f24f1441979e4ee82730a51ffaf3ea55de
8a7aa1b580e1df339eebf3ae5d21d63849eb702d
/app/src/main/java/jc/sky/modules/download/SKYDownloadRequestQueue.java
8e325bf138a1609da126d9ccac7932e3962ff1ed
[]
no_license
zhe8300975/sky
396e9f369cbafde4800f8c7c80d67475da0e6736
fcea0517fa23b2fbd42d08b8f2d29b32abdde9c8
refs/heads/master
2021-01-17T23:56:56.384916
2016-08-16T03:01:54
2016-08-16T03:01:54
65,887,633
0
1
null
2016-08-17T07:53:56
2016-08-17T07:53:56
null
UTF-8
Java
false
false
4,768
java
package jc.sky.modules.download; import android.text.format.DateUtils; import java.util.HashSet; import java.util.Set; import java.util.concurrent.PriorityBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import okhttp3.OkHttpClient; /** * @创建人 sky * @创建时间 15/4/3 下午12:11 * @类描述 请求队列 */ public class SKYDownloadRequestQueue { /** 调度的线程数量 */ private static final int DEFAULT_DOWNLOAD_THREAD_POOL_SIZE = 1; /** * 请求集合 */ private Set<SKYBaseRequest> mCurrentRequests = new HashSet<>(); /** 阻塞队列. */ private PriorityBlockingQueue<SKYBaseRequest> mDownloadQueue = new PriorityBlockingQueue<>(); /** 调度线程 */ private SKYDownloadDispatcher[] mDownloadDispatchers; /** * 用于生成单调增加的序列号 */ private AtomicInteger mSequenceGenerator = new AtomicInteger(); /** 超时时间 */ private static final int DEFAULT_TIMEOUT = (int) (20 * DateUtils.SECOND_IN_MILLIS); /** * 底层网络协议 */ private OkHttpClient okHttpClient; /** * 创建工作线程 DEFAULT_DOWNLOAD_THREAD_POOL_SIZE */ public SKYDownloadRequestQueue() { okHttpClient = getOkHttpClient(); mDownloadDispatchers = new SKYDownloadDispatcher[DEFAULT_DOWNLOAD_THREAD_POOL_SIZE]; } /** * 创建工作线程 * * @param threadPoolSize * 工作线程数量 */ public SKYDownloadRequestQueue(int threadPoolSize) { okHttpClient = getOkHttpClient(); if (threadPoolSize > 0 && threadPoolSize <= 4) { mDownloadDispatchers = new SKYDownloadDispatcher[threadPoolSize]; } else { mDownloadDispatchers = new SKYDownloadDispatcher[DEFAULT_DOWNLOAD_THREAD_POOL_SIZE]; } } /** * 启动工作线程 */ public void start() { stop();// 停止 for (int i = 0; i < mDownloadDispatchers.length; i++) { SKYDownloadDispatcher downloadDispatcher = new SKYDownloadDispatcher(mDownloadQueue, okHttpClient); mDownloadDispatchers[i] = downloadDispatcher; downloadDispatcher.start(); } } /** * 添加请求 * * @param request * 请求 * @return 请求ID */ int add(SKYBaseRequest request) { int downloadId = getDownloadId(); request.setDownloadRequestQueue(this); synchronized (mCurrentRequests) { mCurrentRequests.add(request); } request.setRequestId(downloadId); request.setRequestTag(String.valueOf(downloadId)); mDownloadQueue.add(request); return downloadId; } /** * 获取下载状态 */ int query(int downloadId) { synchronized (mCurrentRequests) { for (SKYBaseRequest request : mCurrentRequests) { if (request.getRequestId() == downloadId) { return request.getDownloadState(); } } } return SKYDownloadManager.STATUS_NOT_FOUND; } /** * 取消所有请求 */ void cancelAll() { synchronized (mCurrentRequests) { for (SKYBaseRequest request : mCurrentRequests) { request.cancel(); } mCurrentRequests.clear(); } } /** * 取消请求 */ int cancel(int downloadId) { synchronized (mCurrentRequests) { for (SKYBaseRequest request : mCurrentRequests) { if (request.getRequestId() == downloadId) { request.cancel(); return 1; } } } return 0; } /** * 从队列中删除 * * @param request * 请求 */ void finish(SKYBaseRequest request) { if (mCurrentRequests != null) { synchronized (mCurrentRequests) { mCurrentRequests.remove(request); } } } /** * 取消所有待决运行的请求,并释放所有的工作线程 */ void release() { if (mCurrentRequests != null) { synchronized (mCurrentRequests) { mCurrentRequests.clear(); mCurrentRequests = null; } } if (mDownloadQueue != null) { mDownloadQueue = null; } if (mDownloadDispatchers != null) { stop(); for (int i = 0; i < mDownloadDispatchers.length; i++) { mDownloadDispatchers[i] = null; } mDownloadDispatchers = null; } } /** * 停止所有工作线程 */ private void stop() { for (int i = 0; i < mDownloadDispatchers.length; i++) { if (mDownloadDispatchers[i] != null) { mDownloadDispatchers[i].quit(); } } } /** * 获取下载ID */ private int getDownloadId() { return mSequenceGenerator.incrementAndGet(); } /** * 获取底层网络协议 * * @return 网络协议 */ public final OkHttpClient getOkHttpClient() { okHttpClient = new OkHttpClient.Builder().connectTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)// 连接超时 .readTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)// 读取超时 .writeTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)// 写入超时 .build(); return okHttpClient; } }
[ "jincan0213@hotmail.com" ]
jincan0213@hotmail.com
ebedd3cd36bd623f0afb127f582bba6c900e9b7f
43f13025478cbff9fe2796e71a3f8faaf4ed6902
/gulimall-sms/src/main/java/com/atguigu/gulimall/sms/service/CategoryBoundsService.java
705ecf6edb2685506f85d4ce0f6781a74e807008
[ "Apache-2.0" ]
permissive
zhangbuyi1/gulimall
8653f498888b1746f00d795eaddd86ea1f332d89
5b8dab7690b431f5d5848ad6b5e0871da57dcee0
refs/heads/master
2022-07-31T12:53:44.875053
2019-08-01T14:17:36
2019-08-01T14:17:36
200,013,928
0
0
Apache-2.0
2022-06-21T01:35:11
2019-08-01T08:51:16
JavaScript
UTF-8
Java
false
false
520
java
package com.atguigu.gulimall.sms.service; import com.baomidou.mybatisplus.extension.service.IService; import com.atguigu.gulimall.sms.entity.CategoryBoundsEntity; import com.atguigu.gulimall.commons.bean.PageVo; import com.atguigu.gulimall.commons.bean.QueryCondition; /** * 商品分类积分设置 * * @author zhangshaohu * @email 1362048417@qq.com * @date 2019-08-01 21:38:18 */ public interface CategoryBoundsService extends IService<CategoryBoundsEntity> { PageVo queryPage(QueryCondition params); }
[ "1362048417@qq.com" ]
1362048417@qq.com
33f9740358d3d7fb7d7c8d661df9b456f5d92c7a
4cebe0d2407e5737a99d67c99ab84ca093f11cff
/src/multithread/chapter7/demo14SimpleDateFormat3/MyThread.java
97e6f740c9f1303d339137913710f0c890aef6eb
[]
no_license
MoXiaogui0301/MultiThread-Program
049be7ca7084955cb2a2372bf5acb3e9584f4086
1492e1add980342fbbcc2aed7866efca119998c9
refs/heads/master
2020-04-28T00:14:37.871448
2019-04-02T04:20:04
2019-04-02T04:20:04
174,808,187
1
0
null
null
null
null
UTF-8
Java
false
false
874
java
package multithread.chapter7.demo14SimpleDateFormat3; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class MyThread extends Thread { private String dateString; public MyThread(String dateString) { this.dateString = dateString; } @Override public void run() { try { Date dateRef = DateTools.getSimpleDateFormat("yyyy-MM-dd").parse(dateString); String newDateString = DateTools.getSimpleDateFormat("yyyy-MM-dd").format(dateRef).toString(); if (!newDateString.equals(dateString)) { System.out.println("ThreadName=" + this.getName() + " 报错了 日期字符串:" + dateString + " 转换成的日期为:" + newDateString); } } catch (ParseException e) { e.printStackTrace(); } } }
[ "361941176@qq.com" ]
361941176@qq.com
bce70af4728c1ffe33c928b7bf9850f046715670
f673856d905c8dd32dd16f1c77d539e8aa025860
/app/src/main/java/com/lulian/Zaiyunbao/common/widget/InvitationCode.java
e87767f3a3c3979ece2f231b8be25f3f169175d8
[]
no_license
sy707919626/Zaiyunbao
ea28c05ec2c45ae7597d35283132c4d639d6cdbc
0b9944ff48fbc9ac83b2810bf622119cb11dc8ac
refs/heads/master
2020-04-19T09:54:54.352638
2019-09-09T09:38:27
2019-09-09T09:38:27
168,124,197
0
0
null
null
null
null
UTF-8
Java
false
false
5,332
java
package com.lulian.Zaiyunbao.common.widget; import android.content.Context; import android.graphics.Color; import android.text.Editable; import android.text.TextWatcher; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.RelativeLayout; import android.widget.TextView; import com.lulian.Zaiyunbao.R; import java.util.ArrayList; import java.util.List; /** * 类:PhoneCode * 作者: qxc * 日期:2018/3/14. */ public class InvitationCode extends RelativeLayout { private Context context; private TextView tv_code1; private TextView tv_code2; private TextView tv_code3; private TextView tv_code4; private View v1; private View v2; private View v3; private View v4; private EditText et_code; private List<String> codes = new ArrayList<>(); private InputMethodManager imm; public InvitationCode(Context context) { super(context); this.context = context; loadView(); } public InvitationCode(Context context, AttributeSet attrs) { super(context, attrs); this.context = context; loadView(); } private void loadView() { imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); View view = LayoutInflater.from(context).inflate(R.layout.invitation_code, this); initView(view); initEvent(); } private void initView(View view) { tv_code1 = view.findViewById(R.id.tv_code1); tv_code2 = view.findViewById(R.id.tv_code2); tv_code3 = view.findViewById(R.id.tv_code3); tv_code4 = view.findViewById(R.id.tv_code4); et_code = view.findViewById(R.id.et_code); v1 = view.findViewById(R.id.v1); v2 = view.findViewById(R.id.v2); v3 = view.findViewById(R.id.v3); v4 = view.findViewById(R.id.v4); } private void initEvent() { //验证码输入 et_code.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void afterTextChanged(Editable editable) { if (editable != null && editable.length() > 0) { et_code.setText(""); if (codes.size() < 4) { codes.add(editable.toString()); showCode(); } } } }); // 监听验证码删除按键 et_code.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { if (keyCode == KeyEvent.KEYCODE_DEL && keyEvent.getAction() == KeyEvent.ACTION_DOWN && codes.size() > 0) { codes.remove(codes.size() - 1); showCode(); return true; } return false; } }); } /** * 显示输入的验证码 */ private void showCode() { String code1 = ""; String code2 = ""; String code3 = ""; String code4 = ""; if (codes.size() >= 1) { code1 = codes.get(0); } if (codes.size() >= 2) { code2 = codes.get(1); } if (codes.size() >= 3) { code3 = codes.get(2); } if (codes.size() >= 4) { code4 = codes.get(3); } tv_code1.setText(code1); tv_code2.setText(code2); tv_code3.setText(code3); tv_code4.setText(code4); setColor(); } /** * 设置高亮颜色 */ private void setColor() { int color_default = Color.parseColor("#999999"); int color_focus = Color.parseColor("#3F8EED"); v1.setBackgroundColor(color_default); v2.setBackgroundColor(color_default); v3.setBackgroundColor(color_default); v4.setBackgroundColor(color_default); if (codes.size() == 0) { v1.setBackgroundColor(color_focus); } if (codes.size() == 1) { v2.setBackgroundColor(color_focus); } if (codes.size() == 2) { v3.setBackgroundColor(color_focus); } if (codes.size() >= 3) { v4.setBackgroundColor(color_focus); } } /** * 显示键盘 */ public void showSoftInput() { //显示软键盘 if (imm != null && et_code != null) { et_code.postDelayed(new Runnable() { @Override public void run() { imm.showSoftInput(et_code, 0); } }, 200); } } /** * 获得邀请码 * * @return 验证码 */ public String getInvitation() { StringBuilder sb = new StringBuilder(); for (String code : codes) { sb.append(code); } return sb.toString(); } }
[ "707919626@qq.com" ]
707919626@qq.com
c6e6f10eec9d055c62ff23ff22620b273a45f5ae
f90e76a7e774811a6505a0ed0c3f27724a7bfeb2
/API/src/main/java/org/sikuli/android/ADBScreen.java
2b5337e38664cdcfc0536040d92ced495e60b6b6
[ "MIT" ]
permissive
gilb771/SikuliX1
267154cb8b722b8df61b044310fc31ee580f750e
99e62e7a68ec53a3f780883404b2ca0ee08764cf
refs/heads/master
2020-04-14T08:56:32.444752
2018-12-31T16:22:20
2018-12-31T16:22:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,121
java
/* * Copyright (c) 2010-2018, sikuli.org, sikulix.com - MIT license */ package org.sikuli.android; import org.sikuli.basics.Debug; import org.sikuli.basics.Settings; import org.sikuli.script.*; import org.sikuli.util.*; import java.awt.*; import java.util.ArrayList; import java.util.List; /** * Created by Törcsi on 2016. 06. 26. * Revised by RaiMan */ //TODO possible to use https://github.com/Genymobile/scrcpy? public class ADBScreen extends Region implements EventObserver, IScreen { private static String me = "ADBScreen: "; private static void log(int level, String message, Object... args) { Debug.logx(level, me + message, args); } private static boolean isFake = false; protected IRobot robot = null; private static int logLvl = 3; private ScreenImage lastScreenImage = null; private Rectangle bounds; private boolean waitPrompt = false; protected OverlayCapturePrompt prompt; private String promptMsg = "Select a region on the screen"; private static int waitForScreenshot = 300; public boolean needsUnLock = false; public int waitAfterAction = 1; //---------------------------Inits private ADBDevice device = null; private static ADBScreen screen = null; public static ADBScreen start() { return start(""); } public static ADBScreen start(String adbExec) { if (screen == null) { try { screen = new ADBScreen(adbExec); } catch (Exception e) { log(-1, "start: No devices attached"); screen = null; } } return screen; } public static void stop() { if (null != screen) { Debug.log(3, "ADBScreen: stopping android support"); ADBDevice.reset(); screen = null; } } public ADBScreen() { this(""); } public ADBScreen(String adbExec) { super(); setOtherScreen(this); device = ADBDevice.init(adbExec); init(); } private ADBScreen(int id) { super(); setOtherScreen(this); device = ADBDevice.init(id); init(); } private void init() { if (device != null) { robot = device.getRobot(this); robot.setAutoDelay(10); bounds = device.getBounds(); w = bounds.width; h = bounds.height; } } public boolean isValid() { return null != device; } public ADBDevice getDevice() { return device; } public List<ADBDevice> getDevices() { List<ADBDevice> devices = new ArrayList<>(); if (device != null) { } return devices; } public ADBScreen getScreenWithDevice(int id) { if (screen == null) { log(-1, "getScreenWithDevice: Android support not started"); return null; } ADBScreen multiScreen = new ADBScreen(id); if (!multiScreen.isValid()) { log(-1, "getScreenWithDevice: no device with id = %d", id); return null; } return multiScreen; } public String toString() { if (null == device) { return "Android:INVALID"; } else { return String.format("Android %s", getDeviceDescription()); } } public String getDeviceDescription() { return String.format("%s (%d x %d)", device.getDeviceSerial(), bounds.width, bounds.height); } public void wakeUp(int seconds) { if (null == device) { return; } if (null == device.isDisplayOn()) { log(-1, "wakeUp: not possible - see log"); return; } if (!device.isDisplayOn()) { device.wakeUp(seconds); if (needsUnLock) { aSwipeUp(); } } } public String exec(String command, String... args) { if (device == null) { return null; } return device.exec(command, args); } //-----------------------------Overrides @Override public IScreen getScreen() { return this; } @Override public void update(EventSubject s) { waitPrompt = false; } @Override public IRobot getRobot() { return robot; } @Override public Rectangle getBounds() { return bounds; } @Override public ScreenImage capture() { return capture(x, y, -1, -1); } @Override public ScreenImage capture(int x, int y, int w, int h) { ScreenImage simg = null; if (device != null) { log(logLvl, "ADBScreen.capture: (%d,%d) %dx%d", x, y, w, h); simg = device.captureScreen(new Rectangle(x, y, w, h)); } else { log(-1, "capture: no ADBRobot available"); } lastScreenImage = simg; return simg; } @Override public ScreenImage capture(Region reg) { return capture(reg.x, reg.y, reg.w, reg.h); } @Override public ScreenImage capture(Rectangle rect) { return capture(rect.x, rect.y, rect.width, rect.height); } public void showTarget(Location loc) { showTarget(loc, Settings.SlowMotionDelay); } protected void showTarget(Location loc, double secs) { if (Settings.isShowActions()) { ScreenHighlighter overlay = new ScreenHighlighter(this, null); overlay.showTarget(loc, (float) secs); } } @Override public int getID() { return 0; } public String getIDString() { return "Android " + getDeviceDescription(); } @Override public ScreenImage getLastScreenImageFromScreen() { return lastScreenImage; } private EventObserver captureObserver = null; @Override public ScreenImage userCapture(final String msg) { if (robot == null) { return null; } waitPrompt = true; Thread th = new Thread() { @Override public void run() { prompt = new OverlayCapturePrompt(ADBScreen.this); prompt.prompt(msg); } }; th.start(); ScreenImage simg = null; int count = 0; while (true) { this.wait(0.1f); if (count++ > waitForScreenshot) { break; } if (prompt == null) { continue; } if (prompt.isComplete()) { simg = prompt.getSelection(); if (simg != null) { lastScreenImage = simg; } break; } } if (null != prompt) { prompt.close(); prompt = null; } return simg; } @Override public int getIdFromPoint(int srcx, int srcy) { return 0; } public Region set(Region element) { return setOther(element); } public Location set(Location element) { return setOther(element); } @Override public Region setOther(Region element) { return element.setOtherScreen(this); } @Override public Location setOther(Location element) { return element.setOtherScreen(this); } @Override public Region newRegion(Location loc, int width, int height) { return new Region(loc.x, loc.y, width, height, this); } @Override public Region newRegion(Region reg) { return new Region(reg).setOtherScreen(this); } @Override public Region newRegion(int _x, int _y, int width, int height) { return new Region(_x, _y, width, height, this); } @Override public Location newLocation(int _x, int _y) { return new Location(_x, _y).setOtherScreen(this); } @Override public Location newLocation(Location loc) { return new Location(loc).setOtherScreen(this); } }
[ "rmhdevelop@me.com" ]
rmhdevelop@me.com
5020c78039792ee3c0c3416be52ea5db08f4314d
c260cdee9ce414a63774e07d7a0c4a7cdf55c960
/app/src/main/java/com/example/muslim/quran_text_86_adapter.java
f58ccec78243b456fac52cdda5a24dcdf9d0ef79
[]
no_license
Mohammedomargallya39/Muslim
15aac37a979163fef3697fdc75b274b9b87ca7d2
612d57a64d29158f513fbfcabf9e5debd0928bc0
refs/heads/master
2023-04-09T03:33:22.699380
2021-04-14T11:37:25
2021-04-14T11:37:25
357,877,819
0
0
null
null
null
null
UTF-8
Java
false
false
1,620
java
package com.example.muslim; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; public class quran_text_86_adapter extends RecyclerView.Adapter<quran_text_86_adapter.quranText86Holder> { ArrayList<Altarek> altareks ; Context context ; public quran_text_86_adapter(ArrayList<Altarek> altareks, Context context) { this.altareks = altareks; this.context = context; } class quranText86Holder extends RecyclerView.ViewHolder { TextView textViewText86; LinearLayout linearLayout; public quranText86Holder(@NonNull View itemView) { super(itemView); textViewText86 = itemView.findViewById(R.id.text86_item); linearLayout = itemView.findViewById(R.id.ayat_item_86); } } @NonNull @Override public quranText86Holder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(context).inflate(R.layout.activity_quran_text_86_item, parent , false); return new quranText86Holder(view); } @Override public void onBindViewHolder(@NonNull quranText86Holder holder, int position) { Altarek altarek = altareks.get(position); holder.textViewText86.setText(altarek.getAyat()); } @Override public int getItemCount() { return altareks.size(); } }
[ "shakalo789@gmail.com" ]
shakalo789@gmail.com
23146b4dd7154d951056aa0feaf0cae6aaba591a
41fdf9d9623a4ac496cc0f2e506469a2b44c0721
/src/leetcode/_1sttime/no233/Solution.java
5c52b5aecd0d03cc41af16e7848a4d50d4b53c13
[]
no_license
COFFEE-ZJU/OnlineJudge
67ac39f074c73a4320b1c944331611035d43e807
61d0760e788e002b03573d564259e2ed0f4be3c8
refs/heads/master
2020-05-21T20:23:58.465379
2016-10-21T15:24:05
2016-10-21T15:24:05
65,429,689
0
0
null
null
null
null
UTF-8
Java
false
false
993
java
package leetcode._1sttime.no233; public class Solution { public int countDigitOne(int n) { if (n <= 0) return 0; long cnt = 0, norm = 0; for (long di = 1; n / di != 0; ){ long cd = n / di % 10; cnt += cd * norm; if (cd > 1) cnt += di; else if (cd == 1) cnt += (n % di) + 1; norm = 10 * norm + di; di *= 10; } return (int)cnt; } public static void main(String[] args) { Solution sol = new Solution(); System.out.println(sol.countDigitOne(1)); System.out.println(sol.countDigitOne(2)); System.out.println(sol.countDigitOne(10)); System.out.println(sol.countDigitOne(13)); System.out.println(sol.countDigitOne(20)); System.out.println(sol.countDigitOne(99)); System.out.println(sol.countDigitOne(100)); System.out.println(sol.countDigitOne(101)); System.out.println(Integer.MAX_VALUE); } }
[ "zhangkf92@gmail.com" ]
zhangkf92@gmail.com
e08b4a5bf7daf19a9c9be2f0910625fa1d0984ec
a24789efd2cb74131111acf2baf3ffff2d6e8280
/JavaCode/binary_search/more_practices_ii/FindDuplicate.java
56fe8cc65e18da2654866c58af499bcb34712776
[ "Apache-2.0" ]
permissive
MikuSugar/LeetCode
15e6c7a73b296a74f4c86435c832f99021a3b6d7
e9cf36e52ae38d92b97e3c5c026c97e300c07971
refs/heads/master
2023-06-26T10:39:50.001158
2023-06-21T08:31:37
2023-06-21T08:31:37
164,054,066
6
0
null
null
null
null
UTF-8
Java
false
false
1,166
java
package JavaCode.binary_search.more_practices_ii; import java.util.HashSet; import java.util.Set; public class FindDuplicate { public int findDuplicate(int[] nums) { int slow=0; int fast=0; while (true) { slow=nums[slow]; fast=nums[nums[fast]]; if(slow==fast)break; } fast=0; while (true) { slow=nums[slow]; fast=nums[fast]; if(slow==fast) return slow; } } } /** * https://leetcode-cn.com/explore/learn/card/binary-search/215/more-practices-ii/858/ * 寻找重复数 * 给定一个包含 n + 1 个整数的数组 nums,其数字都在 1 到 n 之间(包括 1 和 n),可知至少存在一个重复的整数。假设只有一个重复的整数,找出这个重复的数。 * * 示例 1: * * 输入: [1,3,4,2,2] * 输出: 2 * 示例 2: * * 输入: [3,1,3,4,2] * 输出: 3 * 说明: * * 不能更改原数组(假设数组是只读的)。 * 只能使用额外的 O(1) 的空间。 * 时间复杂度小于 O(n2) 。 * 数组中只有一个重复的数字,但它可能不止重复出现一次。 */
[ "syfangjie@live.cn" ]
syfangjie@live.cn
6332d560ba20249ddd041087458f3a805452f8a8
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p042cz/msebera/android/httpclient/cookie/SetCookie2.java
c922184594cb68f758cc8e55b86dd783754e9f15
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package p042cz.msebera.android.httpclient.cookie; /* renamed from: cz.msebera.android.httpclient.cookie.SetCookie2 */ public interface SetCookie2 extends SetCookie { void setCommentURL(String str); void setDiscard(boolean z); void setPorts(int[] iArr); }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
35d24772aa107baf19dcd30f5e2ca6e358fbc717
094d929c094909378e5a6e3cba9962792addcc7c
/examples/src/boofcv/examples/features/ExampleTemplateMatching.java
c7ea012e75b91c3bd9bccd91adf56b3d0b57d796
[ "Apache-2.0" ]
permissive
marsPure/BoofCV
ca28345fcced383352929c47bbb5dd0f4f1d49f6
c4655b8cf296d12c4d16a3224d19bf5a640773c6
refs/heads/master
2020-04-06T06:51:40.998390
2015-06-06T17:17:07
2015-06-06T17:17:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,987
java
/* * Copyright (c) 2011-2014, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.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 boofcv.examples.features; import boofcv.alg.feature.detect.template.TemplateMatching; import boofcv.alg.feature.detect.template.TemplateMatchingIntensity; import boofcv.alg.misc.ImageStatistics; import boofcv.alg.misc.PixelMath; import boofcv.factory.feature.detect.template.FactoryTemplateMatching; import boofcv.factory.feature.detect.template.TemplateScoreType; import boofcv.gui.image.ShowImages; import boofcv.gui.image.VisualizeImageData; import boofcv.io.image.ConvertBufferedImage; import boofcv.io.image.UtilImageIO; import boofcv.struct.feature.Match; import boofcv.struct.image.ImageFloat32; import java.awt.*; import java.awt.image.BufferedImage; import java.util.List; /** * Example of how to find objects inside an image using template matching. Template matching works * well when there is little noise in the image and the object's appearance is known and static. * * @author Peter Abeles */ public class ExampleTemplateMatching { /** * Demonstrates how to search for matches of a template inside an image * * @param image Image being searched * @param template Template being looked for * @param expectedMatches Number of expected matches it hopes to find * @return List of match location and scores */ private static List<Match> findMatches(ImageFloat32 image, ImageFloat32 template, int expectedMatches) { // create template matcher. TemplateMatching<ImageFloat32> matcher = FactoryTemplateMatching.createMatcher(TemplateScoreType.SUM_DIFF_SQ, ImageFloat32.class); // Find the points which match the template the best matcher.setTemplate(template, expectedMatches); matcher.process(image); return matcher.getResults().toList(); } /** * Computes the template match intensity image and displays the results. Brighter intensity indicates * a better match to the template. */ public static void showMatchIntensity(ImageFloat32 image, ImageFloat32 template) { // create algorithm for computing intensity image TemplateMatchingIntensity<ImageFloat32> matchIntensity = FactoryTemplateMatching.createIntensity(TemplateScoreType.SUM_DIFF_SQ, ImageFloat32.class); // apply the template to the image matchIntensity.process(image, template); // get the results ImageFloat32 intensity = matchIntensity.getIntensity(); // adjust the intensity image so that white indicates a good match and black a poor match // the scale is kept linear to highlight how ambiguous the solution is float min = ImageStatistics.min(intensity); float max = ImageStatistics.max(intensity); float range = max - min; PixelMath.plus(intensity, -min, intensity); PixelMath.divide(intensity, range, intensity); PixelMath.multiply(intensity, 255.0f, intensity); BufferedImage output = new BufferedImage(image.width, image.height, BufferedImage.TYPE_INT_BGR); VisualizeImageData.grayMagnitude(intensity, output, -1); ShowImages.showWindow(output, "Match Intensity"); } public static void main(String args[]) { // Load image and templates String directory = "../data/applet/template/"; ImageFloat32 image = UtilImageIO.loadImage(directory + "desktop.png", ImageFloat32.class); ImageFloat32 templateX = UtilImageIO.loadImage(directory + "x.png", ImageFloat32.class); ImageFloat32 templatePaint = UtilImageIO.loadImage(directory + "paint.png", ImageFloat32.class); ImageFloat32 templateBrowser = UtilImageIO.loadImage(directory + "browser.png", ImageFloat32.class); // create output image to show results BufferedImage output = new BufferedImage(image.width, image.height, BufferedImage.TYPE_INT_BGR); ConvertBufferedImage.convertTo(image, output); Graphics2D g2 = output.createGraphics(); // Searches for a small 'x' that indicates where a window can be closed // Only two such objects are in the image so at best there will be one false positive g2.setColor(Color.RED); drawRectangles(g2, image, templateX, 3); // show match intensity image for this template showMatchIntensity(image, templateX); // Now it searches for a specific icon for which there is only one match g2.setColor(Color.BLUE); drawRectangles(g2, image, templatePaint, 1); // Look for the Google Chrome browser icon. There is no match for this icon.. g2.setColor(Color.ORANGE); drawRectangles(g2, image, templateBrowser, 1); // False positives can some times be pruned using the error score. In photographs taken // in the real world template matching tends to perform very poorly ShowImages.showWindow(output, "Found Matches"); } /** * Helper function will is finds matches and displays the results as colored rectangles */ private static void drawRectangles(Graphics2D g2, ImageFloat32 image, ImageFloat32 template, int expectedMatches) { List<Match> found = findMatches(image, template, expectedMatches); int r = 2; int w = template.width + 2 * r; int h = template.height + 2 * r; g2.setStroke(new BasicStroke(3)); for (Match m : found) { // the return point is the template's top left corner int x0 = m.x - r; int y0 = m.y - r; int x1 = x0 + w; int y1 = y0 + h; g2.drawLine(x0, y0, x1, y0); g2.drawLine(x1, y0, x1, y1); g2.drawLine(x1, y1, x0, y1); g2.drawLine(x0, y1, x0, y0); } } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
81af1f5681af35092ff26bd77eb4dcc1ede44f35
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
/src/main/java/io/grpc/internal/SharedResourcePool.java
81c9057954873e3d32b0f3ab6fa1689eb06b0889
[]
no_license
redpicasso/fluffy-octo-robot
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
b2b62d7344da65af7e35068f40d6aae0cd0835a6
refs/heads/master
2022-11-15T14:43:37.515136
2020-07-01T22:19:16
2020-07-01T22:19:16
276,492,708
0
0
null
null
null
null
UTF-8
Java
false
false
665
java
package io.grpc.internal; import io.grpc.internal.SharedResourceHolder.Resource; public final class SharedResourcePool<T> implements ObjectPool<T> { private final Resource<T> resource; private SharedResourcePool(Resource<T> resource) { this.resource = resource; } public static <T> SharedResourcePool<T> forResource(Resource<T> resource) { return new SharedResourcePool(resource); } public T getObject() { return SharedResourceHolder.get(this.resource); } public T returnObject(Object obj) { SharedResourceHolder.release(this.resource, obj); return null; } }
[ "aaron@goodreturn.org" ]
aaron@goodreturn.org
3757d4f422002c72bc7010704cb508aaa572846c
24d5a57399ded51f4f734f93d69ebe3e07178f40
/src/main/java/com/lab/jpa/entities/Club.java
51532d7ee8364d9fb7c3808c0651abae27e517a1
[]
no_license
vincenttuan/SpringMVC1102
acbbabd5eb55ba850c3c8af14e7649b82b13b012
ea3f6e9150cd761b56de74ad94b42e1cc6c736da
refs/heads/master
2023-02-06T17:15:50.723949
2020-12-25T16:24:39
2020-12-25T16:24:39
319,298,116
2
1
null
null
null
null
UTF-8
Java
false
false
1,420
java
package com.lab.jpa.entities; import java.util.LinkedHashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Entity @Table(name = "clubs") public class Club { @Id @GeneratedValue private Integer id; @Column @NotNull @Size(min = 1, max = 20, message = "請輸入社團名稱") private String name; // 注意, cascade = CascadeType.REMOVE 會把員工也一並刪除 //@ManyToMany(mappedBy = "clubs", cascade = CascadeType.REMOVE) @ManyToMany(mappedBy = "clubs") private Set<Employee> employees = new LinkedHashSet<>(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<Employee> getEmployees() { return employees; } public void setEmployees(Set<Employee> employees) { this.employees = employees; } }
[ "teacher@192.168.1.180" ]
teacher@192.168.1.180
c7bfb1bd1827a8ab8137a406c803935de26af5d6
a03ddb4111faca852088ea25738bc8b3657e7b5c
/TestTransit/src/android/support/v4/app/NotificationCompatApi20.java
63b9a16e66a235cade4bf6c200b95f6600d320bb
[]
no_license
randhika/TestMM
5f0de3aee77b45ca00f59cac227450e79abc801f
4278b34cfe421bcfb8c4e218981069a7d7505628
refs/heads/master
2020-12-26T20:48:28.446555
2014-09-29T14:37:51
2014-09-29T14:37:51
24,874,176
2
0
null
null
null
null
UTF-8
Java
false
false
7,599
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package android.support.v4.app; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.graphics.Bitmap; import android.os.Bundle; import android.widget.RemoteViews; import java.util.ArrayList; // Referenced classes of package android.support.v4.app: // RemoteInputCompatApi20, NotificationBuilderWithBuilderAccessor, NotificationBuilderWithActions class NotificationCompatApi20 { public static class Builder implements NotificationBuilderWithBuilderAccessor, NotificationBuilderWithActions { private android.app.Notification.Builder b; public void addAction(NotificationCompatBase.Action action) { android.app.Notification.Action.Builder builder = new android.app.Notification.Action.Builder(action.getIcon(), action.getTitle(), action.getActionIntent()); if (action.getRemoteInputs() != null) { android.app.RemoteInput aremoteinput[] = RemoteInputCompatApi20.fromCompat(action.getRemoteInputs()); int i = aremoteinput.length; for (int j = 0; j < i; j++) { builder.addRemoteInput(aremoteinput[j]); } } if (action.getExtras() != null) { builder.addExtras(action.getExtras()); } b.addAction(builder.build()); } public Notification build() { return b.build(); } public android.app.Notification.Builder getBuilder() { return b; } public Builder(Context context, Notification notification, CharSequence charsequence, CharSequence charsequence1, CharSequence charsequence2, RemoteViews remoteviews, int i, PendingIntent pendingintent, PendingIntent pendingintent1, Bitmap bitmap, int j, int k, boolean flag, boolean flag1, int l, CharSequence charsequence3, boolean flag2, Bundle bundle, String s, boolean flag3, String s1) { android.app.Notification.Builder builder = (new android.app.Notification.Builder(context)).setWhen(notification.when).setSmallIcon(notification.icon, notification.iconLevel).setContent(notification.contentView).setTicker(notification.tickerText, remoteviews).setSound(notification.sound, notification.audioStreamType).setVibrate(notification.vibrate).setLights(notification.ledARGB, notification.ledOnMS, notification.ledOffMS); boolean flag4; android.app.Notification.Builder builder1; boolean flag5; android.app.Notification.Builder builder2; boolean flag6; android.app.Notification.Builder builder3; boolean flag7; if ((2 & notification.flags) != 0) { flag4 = true; } else { flag4 = false; } builder1 = builder.setOngoing(flag4); if ((8 & notification.flags) != 0) { flag5 = true; } else { flag5 = false; } builder2 = builder1.setOnlyAlertOnce(flag5); if ((0x10 & notification.flags) != 0) { flag6 = true; } else { flag6 = false; } builder3 = builder2.setAutoCancel(flag6).setDefaults(notification.defaults).setContentTitle(charsequence).setContentText(charsequence1).setSubText(charsequence3).setContentInfo(charsequence2).setContentIntent(pendingintent).setDeleteIntent(notification.deleteIntent); if ((0x80 & notification.flags) != 0) { flag7 = true; } else { flag7 = false; } b = builder3.setFullScreenIntent(pendingintent1, flag7).setLargeIcon(bitmap).setNumber(i).setUsesChronometer(flag1).setPriority(l).setProgress(j, k, flag).setLocalOnly(flag2).setExtras(bundle).setGroup(s).setGroupSummary(flag3).setSortKey(s1); } } NotificationCompatApi20() { } public static NotificationCompatBase.Action getAction(Notification notification, int i, NotificationCompatBase.Action.Factory factory, RemoteInputCompatBase.RemoteInput.Factory factory1) { return getActionCompatFromAction(notification.actions[i], factory, factory1); } private static NotificationCompatBase.Action getActionCompatFromAction(android.app.Notification.Action action, NotificationCompatBase.Action.Factory factory, RemoteInputCompatBase.RemoteInput.Factory factory1) { RemoteInputCompatBase.RemoteInput aremoteinput[] = RemoteInputCompatApi20.toCompat(action.getRemoteInputs(), factory1); return factory.build(action.icon, action.title, action.actionIntent, action.getExtras(), aremoteinput); } private static android.app.Notification.Action getActionFromActionCompat(NotificationCompatBase.Action action) { android.app.Notification.Action.Builder builder = (new android.app.Notification.Action.Builder(action.getIcon(), action.getTitle(), action.getActionIntent())).addExtras(action.getExtras()); RemoteInputCompatBase.RemoteInput aremoteinput[] = action.getRemoteInputs(); if (aremoteinput != null) { android.app.RemoteInput aremoteinput1[] = RemoteInputCompatApi20.fromCompat(aremoteinput); int i = aremoteinput1.length; for (int j = 0; j < i; j++) { builder.addRemoteInput(aremoteinput1[j]); } } return builder.build(); } public static NotificationCompatBase.Action[] getActionsFromParcelableArrayList(ArrayList arraylist, NotificationCompatBase.Action.Factory factory, RemoteInputCompatBase.RemoteInput.Factory factory1) { NotificationCompatBase.Action aaction[]; if (arraylist == null) { aaction = null; } else { aaction = factory.newArray(arraylist.size()); int i = 0; while (i < aaction.length) { aaction[i] = getActionCompatFromAction((android.app.Notification.Action)arraylist.get(i), factory, factory1); i++; } } return aaction; } public static String getGroup(Notification notification) { return notification.getGroup(); } public static boolean getLocalOnly(Notification notification) { return (0x100 & notification.flags) != 0; } public static ArrayList getParcelableArrayListForActions(NotificationCompatBase.Action aaction[]) { ArrayList arraylist; if (aaction == null) { arraylist = null; } else { arraylist = new ArrayList(aaction.length); int i = aaction.length; int j = 0; while (j < i) { arraylist.add(getActionFromActionCompat(aaction[j])); j++; } } return arraylist; } public static String getSortKey(Notification notification) { return notification.getSortKey(); } public static boolean isGroupSummary(Notification notification) { return (0x200 & notification.flags) != 0; } }
[ "metromancn@gmail.com" ]
metromancn@gmail.com
832beb51682f7332377dd875d221dad96a5191fe
9a6bce80b588e355725e03a81285c49c19c6962c
/app/build/generated/source/buildConfig/androidTest/debug/com/example/sampletransitionactivity/test/BuildConfig.java
0277f0bddc0b9ffd8a2f6aa6c0a3c8393dfcb9e0
[]
no_license
dongja94/SampleTransitionActivity
e3e1371880ad112f543bbf80e6026643d29c26a3
66790b19895ebd36145cf126723055c7af33a036
refs/heads/master
2021-01-23T13:47:40.971280
2015-09-14T14:04:00
2015-09-14T14:04:00
42,452,252
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
/** * Automatically generated file. DO NOT MODIFY */ package com.example.sampletransitionactivity.test; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "com.example.sampletransitionactivity.test"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = ""; public static final int VERSION_CODE = -1; public static final String VERSION_NAME = ""; }
[ "dongja94@gmail.com" ]
dongja94@gmail.com
d2b2986ca3af4d1b05c894534bfeeecd43e1ce06
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_153/Productionnull_15259.java
d65d75e46da7f39a32eb4fa82096380891b0172a
[]
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
588
java
package org.gradle.test.performancenull_153; public class Productionnull_15259 { private final String property; public Productionnull_15259(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
5f07fb0ac1c4ad0bd49f6e895055df0c21cb6a90
f7160c0f0526cc5afc0fe4e6f06d384394059aa1
/cellang/cl-core/src/main/java/org/cellang/commons/transfer/DefaultCometManager.java
003310713679561258deba82ad56e7de006f610b
[]
no_license
o1711/somecode
e2461c4fb51b3d75421c4827c43be52885df3a56
a084f71786e886bac8f217255f54f5740fa786de
refs/heads/master
2021-09-14T14:51:58.704495
2018-05-15T07:51:05
2018-05-15T07:51:05
112,574,683
0
0
null
null
null
null
UTF-8
Java
false
false
2,241
java
/** * Dec 11, 2012 */ package org.cellang.commons.transfer; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; /** * @author wuzhen * <p> * 1-1 mapping to Servlet */ public class DefaultCometManager implements CometManager, CometListener { protected CollectionCometListener listeners;// user listener protected String name; protected Map<String, Comet> cometMap; public DefaultCometManager(String name) { this.name = name; this.listeners = new CollectionCometListener(); this.cometMap = Collections.synchronizedMap(new HashMap<String, Comet>()); } @Override public void addListener(CometListener ln) { this.listeners.add(ln); } @Override public String getName() { return name; } /* * Dec 11, 2012 */ @Override public Comet getComet(String id) { // return this.getComet(id, false); } @Override public Comet getComet(String id, boolean force) { Comet rt = this.cometMap.get(id); if (rt == null && force) { throw new RuntimeException("no websocket:" + id); } return rt; } protected String nextId() { UUID uuid = UUID.randomUUID(); return uuid.toString(); } /* * Dec 12, 2012 */ @Override public List<Comet> getCometList() { // return new ArrayList<Comet>(this.cometMap.values()); } /* * Dec 12, 2012 */ /* * Dec 12, 2012 */ @Override public void onClose(Comet ws, int statusCode, String reason) { // Comet old = this.cometMap.remove(ws.getId()); if (old == null) { throw new RuntimeException("bug,no this websocket:" + ws.getId()); } this.listeners.onClose(ws, statusCode, reason); } /* * Dec 12, 2012 */ @Override public void onMessage(Comet ws, String ms) { this.listeners.onMessage(ws, ms); } /* * Dec 12, 2012 */ @Override public void onException(Comet ws, Throwable t) { // this.listeners.onException(ws, t); } /* * Dec 12, 2012 */ @Override public void onConnect(Comet ws) { this.cometMap.put(ws.getId(), ws);// this.listeners.onConnect(ws); } }
[ "wkz808@163.com" ]
wkz808@163.com
4c3edbfd96e1f02e1c90cb6956ac6c4d6581d61f
ba7fdd337b05f7c5b719ffb377303766fe8e1726
/FundamentosJava/Leccion19/EjemploHerenciaN2/src/EjemploHerenciaN2/A.java
265e28392bf731b4162271e26258ac2c281c9343
[]
no_license
RicardoPavezCatrileo/JavaNetBeans
a8149701d934369fb97271c41f07a308274f6bbe
717c6854a9548746e1a9eeebc1c150fc74fbca9a
refs/heads/master
2021-04-27T01:07:24.134153
2018-06-26T16:20:20
2018-06-26T16:20:20
122,668,436
0
0
null
null
null
null
UTF-8
Java
false
false
198
java
package EjemploHerenciaN2; public class A { //Metodo Constructor Vacio de la clase A public A(){ } public void saludo(){ System.out.println("Hola desde A"); } }
[ "john@sample.com" ]
john@sample.com
59852d38ccb70c290ec7b2446c29388c7f98fd30
0102d91ff7527832d3194d7dfcc8aa006dac86a1
/src/main/java/com/vencislav/datamanagementgw/config/DateTimeFormatConfiguration.java
1106771c1acfcb6703172768d89320ac0cbbc227
[]
no_license
BulkSecurityGeneratorProject/datamanagement
bf9f88e8caf49461625ad53599bbc51028afdd22
95dc55270a070e59bbc9f122aac19ace8aa9e188
refs/heads/master
2022-12-23T11:05:37.838294
2018-12-02T10:12:44
2018-12-02T10:12:44
296,636,643
0
0
null
2020-09-18T13:59:12
2020-09-18T13:59:11
null
UTF-8
Java
false
false
737
java
package com.vencislav.datamanagementgw.config; import org.springframework.context.annotation.Configuration; import org.springframework.format.FormatterRegistry; import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * Configure the converters to use the ISO format for dates by default. */ @Configuration public class DateTimeFormatConfiguration implements WebMvcConfigurer { @Override public void addFormatters(FormatterRegistry registry) { DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); registrar.setUseIsoFormat(true); registrar.registerFormatters(registry); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
eed137bf3733fb767cb9a0edd2ae41e10d3b3679
f79c4b7a24f4871030620e1886e5e749e04f52a9
/pax-cdi-web-weld/src/main/java/org/ops4j/pax/cdi/web/weld/impl/WeldServletContextListener.java
10303878cdf48a8063880f4882b47e1f5727bc5e
[ "Apache-2.0" ]
permissive
gnodet/org.ops4j.pax.cdi
2a7f283882223c04d95ac2e96dbc90d890f2b611
5d51fc6283bed8d46a522b39856a8e9155400969
refs/heads/master
2021-01-22T12:13:11.262784
2016-08-29T13:51:28
2016-08-31T09:07:50
67,021,981
0
0
null
2016-08-31T09:08:44
2016-08-31T09:08:44
null
UTF-8
Java
false
false
3,114
java
/* * Copyright 2012 Harald Wellmann. * * 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.ops4j.pax.cdi.web.weld.impl; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.jsp.JspApplicationContext; import javax.servlet.jsp.JspFactory; import org.jboss.weld.el.WeldELContextListener; import org.jboss.weld.manager.api.WeldManager; import org.jboss.weld.servlet.WeldInitialListener; import org.jboss.weld.servlet.api.ServletListener; import org.jboss.weld.servlet.api.helpers.ForwardingServletListener; import org.ops4j.pax.cdi.spi.CdiContainer; import org.ops4j.pax.cdi.spi.Injector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Servlet context listener for starting and stopping the Weld CDI container. * * @author Harald Wellmann * */ public class WeldServletContextListener extends ForwardingServletListener { private static Logger log = LoggerFactory.getLogger(WeldServletContextListener.class); private ServletListener weldListener; private CdiContainer cdiContainer; /** * Creates a listener. */ public WeldServletContextListener() { weldListener = new WeldInitialListener(); } @Override public void contextInitialized(ServletContextEvent sce) { ServletContext context = sce.getServletContext(); cdiContainer = (CdiContainer) context .getAttribute("org.ops4j.pax.cdi.container"); cdiContainer.start(context); WeldManager manager = cdiContainer.unwrap(WeldManager.class); Injector injector = new Injector(cdiContainer); context.setAttribute(JettyDecorator.INJECTOR_KEY, injector); JettyDecorator.process(context); log.info("registered Jetty decorator for JSR-299 injection"); JspFactory jspFactory = JspFactory.getDefaultFactory(); if (jspFactory != null) { JspApplicationContext jspApplicationContext = jspFactory .getJspApplicationContext(context); jspApplicationContext.addELResolver(manager.getELResolver()); jspApplicationContext.addELContextListener(new WeldELContextListener()); } super.contextInitialized(sce); } @Override public void contextDestroyed(ServletContextEvent sce) { log.info("servlet context destroyed"); cdiContainer.stop(); sce.getServletContext().removeAttribute(JettyDecorator.INJECTOR_KEY); super.contextDestroyed(sce); } @Override protected ServletListener delegate() { return weldListener; } }
[ "harald.wellmann@gmx.de" ]
harald.wellmann@gmx.de
5eaa182745ac59505b93c4cb88ee135da6118da0
6e1f1af36bf3921018d587b6f72c35a7f07d8d67
/src/main/java/java/nio/channels/spi/AbstractSelector.java
69aa3f2a175f2405abbe210c0e5fd34be208e506
[]
no_license
yangfancoming/gdk
09802bd6b37466b38bf96771a201e6193bb06172
c20c38f018aa34e07cdf26a8899d3126129f5d6a
refs/heads/master
2021-07-07T13:06:15.193492
2020-04-16T01:04:40
2020-04-16T01:04:40
200,798,650
0
0
null
null
null
null
UTF-8
Java
false
false
6,866
java
package java.nio.channels.spi; import java.io.IOException; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.util.HashSet; import java.util.Set; import sun.nio.ch.Interruptible; import java.util.concurrent.atomic.AtomicBoolean; /** * Base implementation class for selectors. * * <p> This class encapsulates the low-level machinery required to implement * the interruption of selection operations. A concrete selector class must * invoke the {@link #begin begin} and {@link #end end} methods before and * after, respectively, invoking an I/O operation that might block * indefinitely. In order to ensure that the {@link #end end} method is always * invoked, these methods should be used within a * <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block: * * <blockquote><pre> * try { * begin(); * // Perform blocking I/O operation here * ... * } finally { * end(); * }</pre></blockquote> * * <p> This class also defines methods for maintaining a selector's * cancelled-key set and for removing a key from its channel's key set, and * declares the abstract {@link #register register} method that is invoked by a * selectable channel's {@link AbstractSelectableChannel#register register} * method in order to perform the actual work of registering a channel. </p> * * * @author Mark Reinhold * @author JSR-51 Expert Group * @since 1.4 */ public abstract class AbstractSelector extends Selector { private AtomicBoolean selectorOpen = new AtomicBoolean(true); // The provider that created this selector private final SelectorProvider provider; /** * Initializes a new instance of this class. * * @param provider * The provider that created this selector */ protected AbstractSelector(SelectorProvider provider) { this.provider = provider; } private final Set<SelectionKey> cancelledKeys = new HashSet<SelectionKey>(); void cancel(SelectionKey k) { // package-private synchronized (cancelledKeys) { cancelledKeys.add(k); } } /** * Closes this selector. * * <p> If the selector has already been closed then this method returns * immediately. Otherwise it marks the selector as closed and then invokes * the {@link #implCloseSelector implCloseSelector} method in order to * complete the close operation. </p> * * @throws IOException * If an I/O error occurs */ public final void close() throws IOException { boolean open = selectorOpen.getAndSet(false); if (!open) return; implCloseSelector(); } /** * Closes this selector. * * <p> This method is invoked by the {@link #close close} method in order * to perform the actual work of closing the selector. This method is only * invoked if the selector has not yet been closed, and it is never invoked * more than once. * * <p> An implementation of this method must arrange for any other thread * that is blocked in a selection operation upon this selector to return * immediately as if by invoking the {@link * java.nio.channels.Selector#wakeup wakeup} method. </p> * * @throws IOException * If an I/O error occurs while closing the selector */ protected abstract void implCloseSelector() throws IOException; public final boolean isOpen() { return selectorOpen.get(); } /** * Returns the provider that created this channel. * * @return The provider that created this channel */ public final SelectorProvider provider() { return provider; } /** * Retrieves this selector's cancelled-key set. * * <p> This set should only be used while synchronized upon it. </p> * * @return The cancelled-key set */ protected final Set<SelectionKey> cancelledKeys() { return cancelledKeys; } /** * Registers the given channel with this selector. * * <p> This method is invoked by a channel's {@link * AbstractSelectableChannel#register register} method in order to perform * the actual work of registering the channel with this selector. </p> * * @param ch * The channel to be registered * * @param ops * The initial interest set, which must be valid * * @param att * The initial attachment for the resulting key * * @return A new key representing the registration of the given channel * with this selector */ protected abstract SelectionKey register(AbstractSelectableChannel ch, int ops, Object att); /** * Removes the given key from its channel's key set. * * <p> This method must be invoked by the selector for each channel that it * deregisters. </p> * * @param key * The selection key to be removed */ protected final void deregister(AbstractSelectionKey key) { ((AbstractSelectableChannel)key.channel()).removeKey(key); } // -- Interruption machinery -- private Interruptible interruptor = null; /** * Marks the beginning of an I/O operation that might block indefinitely. * * <p> This method should be invoked in tandem with the {@link #end end} * method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as * shown <a href="#be">above</a>, in order to implement interruption for * this selector. * * <p> Invoking this method arranges for the selector's {@link * Selector#wakeup wakeup} method to be invoked if a thread's {@link * Thread#interrupt interrupt} method is invoked while the thread is * blocked in an I/O operation upon the selector. </p> */ protected final void begin() { if (interruptor == null) { interruptor = new Interruptible() { public void interrupt(Thread ignore) { AbstractSelector.this.wakeup(); }}; } AbstractInterruptibleChannel.blockedOn(interruptor); Thread me = Thread.currentThread(); if (me.isInterrupted()) interruptor.interrupt(me); } /** * Marks the end of an I/O operation that might block indefinitely. * * <p> This method should be invoked in tandem with the {@link #begin begin} * method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as * shown <a href="#be">above</a>, in order to implement interruption for * this selector. </p> */ protected final void end() { AbstractInterruptibleChannel.blockedOn(null); } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
1e321de2009defc23a6c399e1d5adcc57dbfe606
4a2e3981e758b46ac2e22e7e9e62f3050e5fe074
/Chapter12/src/main/java/com/course/restassureddemo/GetUserInfoListTest.java
a0b3f484f8711e29cb17b83da71a034c3100fdbc
[]
no_license
hi-cbh/AutoTest
0bfc779ca1a9b1f43e2c2d9c44453e17dd2a1811
ec31423732b5e26880181f8181bdac9aa6d3f641
refs/heads/master
2022-12-23T07:37:23.381236
2019-08-19T15:05:43
2019-08-19T15:05:43
203,195,635
0
0
null
2022-12-10T04:39:39
2019-08-19T15:03:43
Java
UTF-8
Java
false
false
2,862
java
package com.course.restassureddemo; import com.course.config.TestConfig; import com.course.model.GetUserListCase; import com.course.model.User; import com.course.utils.DatabaseUtil; import com.jayway.jsonpath.JsonPath; import io.restassured.response.Response; import org.apache.ibatis.session.SqlSession; import org.json.JSONArray; import org.testng.Assert; import org.testng.annotations.Test; import java.io.IOException; import org.json.JSONObject; import java.util.HashMap; import java.util.List; import java.util.Map; import static com.course.utils.RestAssuredUtil.getResultRestAssured; public class GetUserInfoListTest { @Test(dependsOnGroups="loginTrueRest",description = "获取性别为男的用户信息") public void getUserListInfo() throws IOException, InterruptedException { SqlSession session = DatabaseUtil.getSqlSession(); System.out.println("start -----getUserListCase--------"); GetUserListCase getUserListCase = session.selectOne("getUserListCase",1); System.out.println(getUserListCase.toString()); System.out.println(TestConfig.getUserListUrl); System.out.println(" end -----getUserListCase--------"); Thread.sleep(2000); System.out.println(" start ----- getUserList --------"); System.out.println("查找表名 - getUserListCase.getExpected():"+ getUserListCase.getExpected()); System.out.println("查找数据:"+getUserListCase); List<User> userList = session.selectList(getUserListCase.getExpected(),getUserListCase); // for(User u : userList){ // System.out.println("数据库返回的数据list:"+u.toString()); // } System.out.println(" end ----- getUserList --------"); //----------------------- Map<String, Object> jsonAsMap = new HashMap<String, Object>(); jsonAsMap.put("sex", getUserListCase.getSex()); //下边为写完接口的代码 Response resultJson = getResultRestAssured(jsonAsMap,TestConfig.getUserListUrl,TestConfig.cookiess); //----------------------- //转为string类型 String jsonStr = resultJson.asString(); System.out.println("接口数据转换为String类型"+jsonStr); System.out.println("----------"); JSONArray userListJson = new JSONArray(userList); JSONArray jsonStrArray = new JSONArray(jsonStr); Assert.assertEquals(userListJson.length()+"", JsonPath.read(jsonStr,"$.length()")+""); for(int i = 0;i<userListJson.length();i++){ JSONObject expect = (JSONObject) jsonStrArray.get(i); JSONObject actual = (JSONObject) userListJson.get(i); Assert.assertEquals(expect.toString(), actual.toString()); } System.out.println(" end ----- 获取数据对比 --------"); } }
[ "1" ]
1
00437e1e37c280e14146f3cfacdb3a227084b887
a4456b9182a0d43325b9966ca812cb67fe92f8ef
/jodd-petite/src/test/java/jodd/petite/fixtures/data/DefaultBiz.java
276d1db5053e5cc133eb3341b1a6b599c7523286
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
nicky-chen/jodd
94a5c56eb50f7964ef234e9856ce9adb8fb1c079
4bba7643c564a5a3fb54397208666b9f82a0446d
refs/heads/master
2021-04-06T20:22:51.057076
2018-03-15T07:28:59
2018-03-15T07:29:25
125,328,836
1
0
null
null
null
null
UTF-8
Java
false
false
1,795
java
// Copyright (c) 2003-present, Jodd Team (http://jodd.org) // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. package jodd.petite.fixtures.data; import jodd.petite.fixtures.tst.Foo; import jodd.petite.meta.PetiteBean; @PetiteBean("biz") public class DefaultBiz implements Biz { Foo foo; public Foo getFoo() { return foo; } public int initCount; public void init() { initCount++; } public void init2() { initCount++; } public void calculate() { System.out.println("DefaultBizImpl.calculate"); } }
[ "cx52018761@hotmail.com" ]
cx52018761@hotmail.com
b0caf60629d6e8552f40066a8f2b759c2d50506c
855b4041b6a7928988a41a5f3f7e7c7ae39565e4
/hk/src/com/hk/web/cmpunion/valuecreater/req/JoinInCmpUnionReqValueCreater.java
0d4d51c7365e038829e23a4b0b5aaf459333f190
[]
no_license
mestatrit/newbyakwei
60dca96c4c21ae5fcf6477d4627a0eac0f76df35
ea9a112ac6fcbc2a51dbdc79f417a1d918aa4067
refs/heads/master
2021-01-10T06:29:50.466856
2013-03-07T08:09:58
2013-03-07T08:09:58
36,559,185
0
1
null
null
null
null
UTF-8
Java
false
false
627
java
package com.hk.web.cmpunion.valuecreater.req; import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.hk.bean.CmpUnionReq; import com.hk.frame.util.DataUtil; import com.hk.frame.util.ResourceConfig; import com.hk.web.cmpunion.valuecreater.ValueCreater; public class JoinInCmpUnionReqValueCreater implements ValueCreater { public String getValue(HttpServletRequest request, Object obj) { CmpUnionReq req = (CmpUnionReq) obj; Map<String, String> map = DataUtil.getMapFromJson(req.getData()); return ResourceConfig.getText("view.cmpunionreq.reqflg1", map .get("name")); } }
[ "ak478288@gmail.com" ]
ak478288@gmail.com
5390b1baceba1d5ac73ed58abd1d692e3ce10266
ef44d044ff58ebc6c0052962b04b0130025a102b
/com.freevisiontech.fvmobile_source_from_JADX/sources/com/googlecode/mp4parser/util/RangeStartMap.java
5b06c4284332f780f9439c195d4b2807b574a9e8
[]
no_license
thedemoncat/FVShare
e610bac0f2dc394534ac0ccec86941ff523e2dfd
bd1e52defaec868f0d1f9b4f2039625c8ff3ee4a
refs/heads/master
2023-08-06T04:11:16.403943
2021-09-25T10:11:13
2021-09-25T10:11:13
410,232,121
2
0
null
null
null
null
UTF-8
Java
false
false
2,531
java
package com.googlecode.mp4parser.util; import java.lang.Comparable; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeMap; public class RangeStartMap<K extends Comparable, V> implements Map<K, V> { TreeMap<K, V> base = new TreeMap<>(new Comparator<K>() { public int compare(K o1, K o2) { return -o1.compareTo(o2); } }); public RangeStartMap() { } public RangeStartMap(K k, V v) { put(k, v); } public int size() { return this.base.size(); } public boolean isEmpty() { return this.base.isEmpty(); } public boolean containsKey(Object key) { return this.base.get(key) != null; } public boolean containsValue(Object value) { return false; } public V get(Object k) { if (!(k instanceof Comparable)) { return null; } Comparable<K> key = (Comparable) k; if (isEmpty()) { return null; } Iterator<K> keys = this.base.keySet().iterator(); K a = keys.next(); while (true) { K a2 = (Comparable) a; if (!keys.hasNext()) { return this.base.get(a2); } if (key.compareTo(a2) >= 0) { return this.base.get(a2); } a = keys.next(); } } public V put(K key, V value) { return this.base.put(key, value); } public V remove(Object k) { if (!(k instanceof Comparable)) { return null; } Comparable<K> key = (Comparable) k; if (isEmpty()) { return null; } Iterator<K> keys = this.base.keySet().iterator(); K a = keys.next(); while (true) { K a2 = (Comparable) a; if (!keys.hasNext()) { return this.base.remove(a2); } if (key.compareTo(a2) >= 0) { return this.base.remove(a2); } a = keys.next(); } } public void putAll(Map<? extends K, ? extends V> m) { this.base.putAll(m); } public void clear() { this.base.clear(); } public Set<K> keySet() { return this.base.keySet(); } public Collection<V> values() { return this.base.values(); } public Set<Map.Entry<K, V>> entrySet() { return this.base.entrySet(); } }
[ "nl.ruslan@yandex.ru" ]
nl.ruslan@yandex.ru
b56721eb8a900a29445aa4b5faa84300b2a63d2e
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/eaa38ca2a7283013430aa6b18d64d20243e47c39/before/AntFileReferenceSet.java
2d38e07894a736a6b0e2197622df8a0c6d6e19ab
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,624
java
/* * Copyright 2000-2009 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intellij.lang.ant.psi.impl.reference; import com.intellij.lang.ant.psi.*; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.newvfs.ManagingFS; import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiFileSystemItem; import com.intellij.psi.PsiReferenceProvider; import com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet; import com.intellij.psi.xml.XmlAttributeValue; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; import java.util.Collection; import java.util.Collections; public class AntFileReferenceSet extends FileReferenceSet { private final XmlAttributeValue myValue; public AntFileReferenceSet(final AntStructuredElement element, final XmlAttributeValue value, final PsiReferenceProvider provider) { super(cutTrailingSlash(FileUtil.toSystemIndependentName(StringUtil.stripQuotesAroundValue(value.getText()))), element, value.getTextRange().getStartOffset() - element.getTextRange().getStartOffset() + 1, provider, SystemInfo.isFileSystemCaseSensitive); myValue = value; } private static String cutTrailingSlash(String path) { if (path.endsWith("/")) { return path.substring(0, path.length() - 1); } return path; } protected boolean isSoft() { final AntStructuredElement element = getElement(); if (!(element instanceof AntImport || element instanceof AntTypeDef || element instanceof AntProperty || element instanceof AntAnt)) { return true; } if (element instanceof AntProperty) { return ((AntProperty)element).getFileName() != null; } return false; } public AntFileReference createFileReference(final TextRange range, final int index, final String text) { return new AntFileReference(this, range, index, text); } public AntStructuredElement getElement() { return (AntStructuredElement)super.getElement(); } @Nullable public String getPathString() { return getElement().computeAttributeValue(super.getPathString()); } public boolean isAbsolutePathReference() { if (super.isAbsolutePathReference()) { return true; } final String pathString = getPathString(); if (SystemInfo.isWindows && pathString.length() == 2 && Character.isLetter(pathString.charAt(0)) && pathString.charAt(1) == ':') { return true; } return new File(pathString).isAbsolute(); } // todo: correct context for "output" attribute file reference of the "ant" task @NotNull public Collection<PsiFileSystemItem> computeDefaultContexts() { final AntStructuredElement element = getElement(); final AntFile antFile = element.getAntFile(); if (antFile != null) { VirtualFile vFile = antFile.getContainingPath(); if (isAbsolutePathReference()) { if (SystemInfo.isWindows) { vFile = ManagingFS.getInstance().findRoot("", LocalFileSystem.getInstance()); } else { vFile = LocalFileSystem.getInstance().findFileByPath("/"); } } else { if (!(element instanceof AntImport)) { final String basedir = element.computeAttributeValue("${basedir}"); assert basedir != null; vFile = LocalFileSystem.getInstance().findFileByPath(FileUtil.toSystemIndependentName(basedir)); } } if (vFile != null) { final PsiDirectory directory = antFile.getViewProvider().getManager().findDirectory(vFile); if (directory != null) { return Collections.<PsiFileSystemItem>singleton(directory); } } } return super.computeDefaultContexts(); } XmlAttributeValue getManipulatorElement() { return myValue; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
9d7baa1817981faa8f14f771187aa4e60f7367d5
3370a0d2a9e3c73340b895de3566f6e32aa3ca4a
/alwin-middleware-grapescode/alwin-core/src/main/java/com/codersteam/alwin/core/service/impl/auth/JwtServiceImpl.java
176b38976ae1e6dd3e9d7a7d7eadeff6d1882907
[]
no_license
Wilczek01/alwin-projects
8af8e14601bd826b2ec7b3a4ce31a7d0f522b803
17cebb64f445206320fed40c3281c99949c47ca3
refs/heads/master
2023-01-11T16:37:59.535951
2020-03-24T09:01:01
2020-03-24T09:01:01
249,659,398
0
0
null
2023-01-07T16:18:14
2020-03-24T09:02:28
Java
UTF-8
Java
false
false
2,413
java
package com.codersteam.alwin.core.service.impl.auth; import com.codersteam.alwin.core.api.model.user.OperatorType; import com.codersteam.alwin.core.api.service.auth.JwtService; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; import io.jsonwebtoken.Jwts; import javax.ejb.Stateless; import java.time.Instant; import java.util.Date; /** * @author Tomasz Sliwinski */ @Stateless public class JwtServiceImpl implements JwtService { @Override public String createToken(final String subject, final String operatorType, final Long operatorId, final String firstName, final String lastName) { final Instant now = Instant.now(); final Date expiryDate = Date.from(now.plus(TOKEN_VALIDITY)); return Jwts.builder() .setSubject(subject) .claim(OPERATOR_TYPE, operatorType) .claim(USER_ID, operatorId.toString()) .claim(OPERATOR_FULL_NAME, String.format("%s %s", firstName, lastName)) .setExpiration(expiryDate) .setIssuedAt(Date.from(now)) .signWith(SIGNATURE_ALGORITHM, SECRET_KEY) .compact(); } @Override public Jws<Claims> parseToken(final String token) { return Jwts.parser() .setSigningKey(SECRET_KEY) .parseClaimsJws(token); } @Override public Long getLoggedOperatorId(final String token) { final String tokenValue = extractToken(token); final Claims body = parseToken(tokenValue).getBody(); return Long.valueOf(body.get(JwtService.USER_ID, String.class)); } @Override public OperatorType getLoggedOperatorType(final String token) { final String tokenValue = extractToken(token); final Claims body = parseToken(tokenValue).getBody(); return OperatorType.valueOf(body.get(JwtService.OPERATOR_TYPE, String.class)); } @Override public String getLoggedOperatorFullName(final String token) { final String tokenValue = extractToken(token); final Claims body = parseToken(tokenValue).getBody(); return body.get(JwtService.OPERATOR_FULL_NAME, String.class); } private String extractToken(final String token) { if (token.startsWith(BEARER_HEADER_PREFIX)) { return token.substring(BEARER_HEADER_PREFIX.length()).trim(); } return token; } }
[ "grogus@ad.aliorleasing.pl" ]
grogus@ad.aliorleasing.pl
327794886b6e8fdf4c8db2bfe0ac6b69cf995a95
5e34c548f8bbf67f0eb1325b6c41d0f96dd02003
/dataset/smallest_818f8cf4_003/mutations/106/smallest_818f8cf4_003.java
d14f471b26ae5b1e6ce7c22d8a299967344418aa
[]
no_license
mou23/ComFix
380cd09d9d7e8ec9b15fd826709bfd0e78f02abc
ba9de0b6d5ea816eae070a9549912798031b137f
refs/heads/master
2021-07-09T15:13:06.224031
2020-03-10T18:22:56
2020-03-10T18:22:56
196,382,660
1
1
null
2020-10-13T20:15:55
2019-07-11T11:37:17
Java
UTF-8
Java
false
false
2,681
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_818f8cf4_003 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_818f8cf4_003 mainClass = new smallest_818f8cf4_003 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj num1 = new IntObj (), num2 = new IntObj (), num3 = new IntObj (), num4 = new IntObj (), num_smallest = new IntObj (); output += (String.format ("Please enter 4 numbers separated by spaces > ")); num1.value = scanner.nextInt (); num2.value = scanner.nextInt (); num3.value = scanner.nextInt (); num4.value = scanner.nextInt (); if ((num1.value <= num2.value) && (num1.value <= num3.value) && (num1.value <= num4.value)) { num_smallest.value = num1.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } else if ((num2.value <= num1.value) && (num2.value <= num3.value) && (num2.value <= num4.value)) { num_smallest.value = num2.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } else if ((num3.value <= num1.value) && (num3.value <= num2.value) && (num3.value <= num4.value)) { num_smallest.value = num3.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } else if ((num2.value) <= (num1.value) && (num4.value <= num3.value)) { num_smallest.value = num1.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } if (true) return;; } }
[ "bsse0731@iit.du.ac.bd" ]
bsse0731@iit.du.ac.bd
77b2242d900077963559af07c81db1175ee03272
8795f8d83d503685181f859222cf749591a1ecd5
/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/qrreader/QrCodeReader.java
c275809ba044447ac43364e741a9a6cd6cd07f9c
[ "MIT", "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
bossenti/incubator-streampipes-extensions
4547f6fa69b52b8843ee0b7948faa23cb0dad956
e186f3dd61edc1865b8764a457dd4d83d96c1fba
refs/heads/dev
2023-03-13T07:54:52.749901
2020-12-17T09:00:38
2020-12-17T09:00:38
268,799,825
0
0
Apache-2.0
2020-12-17T09:00:39
2020-06-02T12:50:52
Java
UTF-8
Java
false
false
3,536
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.streampipes.processors.imageprocessing.jvm.processor.qrreader; import boofcv.abst.fiducial.QrCodeDetector; import boofcv.alg.fiducial.qrcode.QrCode; import boofcv.factory.fiducial.FactoryFiducial; import boofcv.io.image.ConvertBufferedImage; import boofcv.struct.image.GrayU8; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.streampipes.model.runtime.Event; import org.apache.streampipes.processors.imageprocessing.jvm.processor.commons.PlainImageTransformer; import org.apache.streampipes.wrapper.context.EventProcessorRuntimeContext; import org.apache.streampipes.wrapper.routing.SpOutputCollector; import org.apache.streampipes.wrapper.runtime.EventProcessor; import java.awt.image.BufferedImage; import java.util.List; import java.util.Optional; public class QrCodeReader implements EventProcessor<QrCodeReaderParameters> { private QrCodeReaderParameters params; private Boolean sendIfNoResult; private String placeholderValue; private static final Logger LOG = LoggerFactory.getLogger(QrCodeReader.class); @Override public void onInvocation(QrCodeReaderParameters qrCodeReaderParameters, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) { this.params = qrCodeReaderParameters; this.sendIfNoResult = qrCodeReaderParameters.getSendIfNoResult(); this.placeholderValue = qrCodeReaderParameters.getPlaceholderValue(); } @Override public void onEvent(Event in, SpOutputCollector out) { PlainImageTransformer<QrCodeReaderParameters> imageTransformer = new PlainImageTransformer<> (in, params); Optional<BufferedImage> imageOpt = imageTransformer.getImage(params.getImagePropertyName()); if (imageOpt.isPresent()) { BufferedImage input = imageOpt.get(); GrayU8 gray = ConvertBufferedImage.convertFrom(input, (GrayU8) null); QrCodeDetector<GrayU8> detector = FactoryFiducial.qrcode(null, GrayU8.class); detector.process(gray); List<QrCode> detections = detector.getDetections(); List<QrCode> failures = detector.getFailures(); if (detections.size() > 0) { LOG.info(detections.get(0).message); Event event = makeEvent(detections.get(0).message); out.collect(event); } else { LOG.info("Could not find any QR code"); if (sendIfNoResult) { Event event = makeEvent(placeholderValue); out.collect(event); } } } } private Event makeEvent(String qrCodeValue) { Event event = new Event(); event.addField("qrvalue", qrCodeValue); event.addField("timestamp", System.currentTimeMillis()); return event; } @Override public void onDetach() { } }
[ "riemer@fzi.de" ]
riemer@fzi.de
24668b9a8f0060a5b608fe3821c93f66b06a7c83
9a748dba7670f7f2690a7def2c038c3dece0c55b
/responding/responding-core/src/main/java/uk/co/gresearch/siembol/response/common/ProvidedEvaluators.java
f47f4c4ede9e278673a5fb34c88e87e886410eca
[ "Apache-2.0" ]
permissive
76creates/siembol
e3bd1b7400771a9a5bea8c5608e02f0be6b6135e
15021abc5761490980b314994b8f3e52da4fd172
refs/heads/master
2023-07-13T08:12:33.482767
2021-08-10T11:25:06
2021-08-10T11:25:06
375,778,175
0
0
Apache-2.0
2021-07-14T16:38:10
2021-06-10T17:27:58
Java
UTF-8
Java
false
false
2,336
java
package uk.co.gresearch.siembol.response.common; import uk.co.gresearch.siembol.response.evaluators.arrayreducers.ArrayReducerEvaluatorFactory; import uk.co.gresearch.siembol.response.evaluators.assignment.JsonPathAssignmentEvaluatorFactory; import uk.co.gresearch.siembol.response.evaluators.fixed.FixedResultEvaluatorFactory; import uk.co.gresearch.siembol.response.evaluators.markdowntable.ArrayTableFormatterEvaluatorFactory; import uk.co.gresearch.siembol.response.evaluators.markdowntable.TableFormatterEvaluatorFactory; import uk.co.gresearch.siembol.response.evaluators.matching.MatchingEvaluatorFactory; import uk.co.gresearch.siembol.response.evaluators.sleep.SleepEvaluatorFactory; import uk.co.gresearch.siembol.response.evaluators.throttling.AlertThrottlingEvaluatorFactory; import java.util.Arrays; import java.util.List; import static uk.co.gresearch.siembol.response.common.RespondingResult.StatusCode.OK; public enum ProvidedEvaluators { FIXED_RESULT_EVALUATOR("fixed_result"), MATCHING_EVALUATOR("matching"), JSON_PATH_ASSIGNMENT_EVALUATOR("json_path_assignment"), MARKDOWN_TABLE_FORMATTER_EVALUATOR("markdown_table_formatter"), ARRAY_MARKDOWN_TABLE_FORMATTER_EVALUATOR("array_markdown_table_formatter"), ARRAY_REDUCER_EVALUATOR("array_reducer"), ALERT_THROTTLING_EVALUATOR("alert_throttling"), SLEEP_EVALUATOR("sleep"); private final String name; ProvidedEvaluators(String name) { this.name = name; } @Override public String toString() { return name; } public static RespondingResult getRespondingEvaluatorFactories() throws Exception{ List<RespondingEvaluatorFactory> factories = Arrays.asList( new FixedResultEvaluatorFactory(), new MatchingEvaluatorFactory(), new JsonPathAssignmentEvaluatorFactory(), new TableFormatterEvaluatorFactory(), new ArrayTableFormatterEvaluatorFactory(), new ArrayReducerEvaluatorFactory(), new AlertThrottlingEvaluatorFactory(), new SleepEvaluatorFactory()); RespondingResultAttributes attributes = new RespondingResultAttributes(); attributes.setRespondingEvaluatorFactories(factories); return new RespondingResult(OK, attributes); } }
[ "noreply-git@uberit.net" ]
noreply-git@uberit.net
a2386a7d8d4e0a852a5ec12266e489ddd3e28258
49cbccf46f6326ecbba3aa539e07a7a1c3513137
/khem-joelib/src/main/java/joelib2/molecule/types/ExternalBond.java
c0242c45834df76f6058f7bc0042bb16058e8083
[ "Apache-2.0" ]
permissive
ggreen/khem
1bbd4b3c1990c884a4f8daa73bfd281dbf49d951
966a6858d0dd0a9776db7805ee6b21a7304bbcc6
refs/heads/master
2021-01-02T22:45:40.833322
2018-06-27T13:51:04
2018-06-27T13:51:04
31,036,095
0
0
null
null
null
null
UTF-8
Java
false
false
2,535
java
/////////////////////////////////////////////////////////////////////////////// //Filename: $RCSfile: ExternalBond.java,v $ //Purpose: TODO description. //Language: Java //Compiler: JDK 1.5 //Created: Jan 15, 2005 //Authors: Joerg Kurt Wegner //Version: $Revision: 1.3 $ // $Date: 2005/02/17 16:48:37 $ // $Author: wegner $ // // Copyright OELIB: OpenEye Scientific Software, Santa Fe, // U.S.A., 1999,2000,2001 // Copyright JOELIB/JOELib2: Dept. Computer Architecture, University of // Tuebingen, Germany, 2001,2002,2003,2004,2005 // Copyright JOELIB/JOELib2: ALTANA PHARMA AG, Konstanz, Germany, // 2003,2004,2005 // //This program is free software; you can redistribute it and/or modify //it under the terms of the GNU General Public License as published by //the Free Software Foundation version 2 of the License. // //This program is distributed in the hope that it will be useful, //but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //GNU General Public License for more details. /////////////////////////////////////////////////////////////////////////////// package joelib2.molecule.types; import joelib2.molecule.Atom; import joelib2.molecule.Bond; /** * TODO description. * * @.author wegnerj * @.license GPL * @.cvsversion $Revision: 1.3 $, $Date: 2005/02/17 16:48:37 $ */ public interface ExternalBond { //~ Methods //////////////////////////////////////////////////////////////// Atom getAtom(); /** * Gets the bond attribute of the JOEExternalBond object * * @return The bond value */ Bond getBond(); /** * Gets the idx attribute of the JOEExternalBond object * * @return The idx value */ int getIndex(); /** * Sets the atom attribute of the JOEExternalBond object * * @param atom The new atom value */ void setAtom(Atom atom); /** * Sets the bond attribute of the JOEExternalBond object * * @param bond The new bond value */ void setBond(Bond bond); /** * Sets the idx attribute of the JOEExternalBond object * * @param idx The new idx value */ void setIndex(int idx); } /////////////////////////////////////////////////////////////////////////////// //END OF FILE. ///////////////////////////////////////////////////////////////////////////////
[ "ggreen@pivotal.io" ]
ggreen@pivotal.io
9ce122ec72a9c3b54fdd3962682132004015a143
9792c834619e299231c513d8497b6ccbf17d26f5
/service/src/main/java/com/rishiqing/dingtalk/dingpush/handler/CorpSyncActionManager.java
5e6eaab2b7ef1ff16231c8495856711b6ff1ecce
[]
no_license
AI2Hub/dingtalk-isv-access-v2
5df896a2a2795cae5f916880156b0d0feee6f819
1d912256daf91694e890cfe451fa7b97b31e6e92
refs/heads/master
2022-09-13T06:55:57.968306
2019-01-10T13:10:03
2019-01-10T13:10:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,431
java
package com.rishiqing.dingtalk.dingpush.handler; import com.alibaba.fastjson.JSONObject; import com.rishiqing.dingtalk.biz.converter.suite.SuiteDbCheckConverter; import com.rishiqing.dingtalk.isv.api.exception.BizRuntimeException; import com.rishiqing.dingtalk.isv.api.model.dingpush.OpenSyncBizDataVO; import java.util.Map; /** * syncActionMap中记录了syncAction对应的handler的映射关系。 * handleSyncData方法,负责将指定syncAction的数据指派给相应的handler解决 * @author Wallace Mao * Date: 2018-11-10 13:56 */ public class CorpSyncActionManager { private Map<String, SyncActionHandler> syncActionMap; public Map<String, SyncActionHandler> getSyncActionMap() { return syncActionMap; } public void setSyncActionMap(Map<String, SyncActionHandler> syncActionMap) { this.syncActionMap = syncActionMap; } /** * 用来分发handler的主方法 * @param data */ public void handleSyncData(OpenSyncBizDataVO data){ JSONObject json = JSONObject.parseObject(data.getBizData()); String type = SuiteDbCheckConverter.json2SyncActionString(json); SyncActionHandler handler = syncActionMap.get(type); if(handler == null){ throw new BizRuntimeException("no handler found for corp sync action: " + type); } handler.handleSyncAction(data); } }
[ "maowenqiang0752@163.com" ]
maowenqiang0752@163.com
18619a3a8c082d10e1e02f5383199e002db84406
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/response/MybankCreditSupplychainTradeBillrepaybudgetQueryResponse.java
21ba36546730ac95e5c5e125e1c20b5b798b2140
[ "Apache-2.0" ]
permissive
WQmmm/alipay-sdk-java-all
57974d199ee83518523e8d354dcdec0a9ce40a0c
66af9219e5ca802cff963ab86b99aadc59cc09dd
refs/heads/master
2023-06-28T03:54:17.577332
2021-08-02T10:05:10
2021-08-02T10:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,702
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.CustScpBillAmtVO; import com.alipay.api.domain.CustScpInstallmentBudgetVO; import com.alipay.api.AlipayResponse; /** * ALIPAY API: mybank.credit.supplychain.trade.billrepaybudget.query response. * * @author auto create * @since 1.0, 2021-07-14 10:13:17 */ public class MybankCreditSupplychainTradeBillrepaybudgetQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8671276711445636493L; /** * 账单金额明细 */ @ApiField("bill_amt_detail") private CustScpBillAmtVO billAmtDetail; /** * 是否可以还款 */ @ApiField("can_repay") private Boolean canRepay; /** * exempt_amt:减免金额 */ @ApiField("exempt_amt") private String exemptAmt; /** * 分期明细 */ @ApiListField("install_budget_detail_list") @ApiField("cust_scp_installment_budget_v_o") private List<CustScpInstallmentBudgetVO> installBudgetDetailList; /** * 外部账款编号 */ @ApiField("out_order") private String outOrder; /** * 账单状态:WAIT_RECEIPT:待供应商收款,RECEIPTED:供应商已收款,CLEAR:已结清,OVERDUE:逾期 ,INVALID:失效 ,CANCEL:取消 */ @ApiField("status") private String status; /** * 账单总金额 */ @ApiField("total_amt") private String totalAmt; public void setBillAmtDetail(CustScpBillAmtVO billAmtDetail) { this.billAmtDetail = billAmtDetail; } public CustScpBillAmtVO getBillAmtDetail( ) { return this.billAmtDetail; } public void setCanRepay(Boolean canRepay) { this.canRepay = canRepay; } public Boolean getCanRepay( ) { return this.canRepay; } public void setExemptAmt(String exemptAmt) { this.exemptAmt = exemptAmt; } public String getExemptAmt( ) { return this.exemptAmt; } public void setInstallBudgetDetailList(List<CustScpInstallmentBudgetVO> installBudgetDetailList) { this.installBudgetDetailList = installBudgetDetailList; } public List<CustScpInstallmentBudgetVO> getInstallBudgetDetailList( ) { return this.installBudgetDetailList; } public void setOutOrder(String outOrder) { this.outOrder = outOrder; } public String getOutOrder( ) { return this.outOrder; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } public void setTotalAmt(String totalAmt) { this.totalAmt = totalAmt; } public String getTotalAmt( ) { return this.totalAmt; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ddbb92e7aeb5f9b76068132defec18980e34c7d6
91cc93f18148ed3c19892054eb3a1a6fd1210842
/com/etsy/android/lib/models/apiv3/LocalDeliveryEstimate$$Parcelable.java
9dc1a2e346c7203414c26530c82ff09a7a43b744
[]
no_license
zickieloox/EtsyAndroidApp
9a2729995fb3510d020b203de5cff5df8e73bcfe
5d9df4e7e639a6aebc10fe0dbde3b6169d074a84
refs/heads/master
2021-12-10T02:57:10.888170
2016-07-11T11:57:53
2016-07-11T11:57:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
783
java
package com.etsy.android.lib.models.apiv3; import android.os.Parcel; import android.os.Parcelable.Creator; /* renamed from: com.etsy.android.lib.models.apiv3.y */ final class LocalDeliveryEstimate$$Parcelable implements Creator<LocalDeliveryEstimate$$Parcelable> { private LocalDeliveryEstimate$$Parcelable() { } public /* synthetic */ Object createFromParcel(Parcel parcel) { return m2567a(parcel); } public /* synthetic */ Object[] newArray(int i) { return m2568a(i); } public LocalDeliveryEstimate$$Parcelable m2567a(Parcel parcel) { return new LocalDeliveryEstimate$$Parcelable(parcel); } public LocalDeliveryEstimate$$Parcelable[] m2568a(int i) { return new LocalDeliveryEstimate$$Parcelable[i]; } }
[ "pink2mobydick@gmail.com" ]
pink2mobydick@gmail.com
269871cbd8fcb71c2f227b79f1c18a41eb5e16af
13015c0f9fce7bed3d3a0e5620c6c8422096722b
/src/main/java/mb/resource/hierarchical/walk/ResourceWalker.java
50ee90a5cf0b1d4705a793fcc1790ab5668bd65d
[ "Apache-2.0" ]
permissive
AZWN/resource
e6067ba18a9b7dd584355637c4bdd44d0ce7e689
33183562f9c5ba1ddb57bdf96b501f9e19e32d53
refs/heads/master
2022-11-12T00:59:37.645042
2020-06-09T14:00:06
2020-06-09T14:00:06
275,124,180
0
0
Apache-2.0
2020-06-26T09:55:31
2020-06-26T09:55:30
null
UTF-8
Java
false
false
340
java
package mb.resource.hierarchical.walk; import mb.resource.hierarchical.HierarchicalResource; import java.io.IOException; import java.io.Serializable; @FunctionalInterface public interface ResourceWalker extends Serializable { boolean traverse(HierarchicalResource directory, HierarchicalResource rootDirectory) throws IOException; }
[ "gabrielkonat@gmail.com" ]
gabrielkonat@gmail.com
2e2f2ba9e4f4f4f7ce66e3aa87ab372026851722
96f7f6322c3e3a5f009dad9bce1e231b5a57a5e8
/ProjectDesignPartners/src/main/java/Pack20DesignPatterns/ArchitecturalStandards/flux/action/Content.java
ec11f389c739317299e30408eb092e91a9ed7fca
[]
no_license
weder96/javaaula21
09cb63a2e6f3fe7ac34f166315ae3024113a4dd3
8f4245a922eea74747644ad2f4a0f2b3396c319e
refs/heads/main
2023-08-23T10:47:43.216438
2021-10-27T21:46:45
2021-10-27T21:46:45
421,982,565
3
0
null
null
null
null
UTF-8
Java
false
false
406
java
package Pack20DesignPatterns.ArchitecturalStandards.flux.action; /** * * Content items. * */ public enum Content { PRODUCTS("Products - This page lists the company's products."), COMPANY("Company - This page displays information about the company."); private String title; private Content(String title) { this.title = title; } @Override public String toString() { return title; } }
[ "weder96@gmail.com" ]
weder96@gmail.com
a5a647d96bff3142028b5bafb697742ae4f8f605
d794aac6f7a32e7d76972718c9b94d54d809adab
/optaplanner-core/src/main/java/org/optaplanner/core/impl/constructionheuristic/placer/value/ValuePlacer.java
1675868846849e9dc578da141be5ad70d5e55279
[ "Apache-2.0" ]
permissive
terry-yip/optaplanner
01e16cf8ae919a18657ccd37738672b21041575d
0ae1083df77fd8c45d692b6e368f044158217487
refs/heads/master
2021-04-09T13:12:10.911341
2013-07-02T12:27:24
2013-07-02T12:27:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,749
java
package org.optaplanner.core.impl.constructionheuristic.placer.value; import java.util.Iterator; import org.optaplanner.core.impl.constructionheuristic.placer.AbstractPlacer; import org.optaplanner.core.impl.constructionheuristic.scope.ConstructionHeuristicMoveScope; import org.optaplanner.core.impl.constructionheuristic.scope.ConstructionHeuristicSolverPhaseScope; import org.optaplanner.core.impl.constructionheuristic.scope.ConstructionHeuristicStepScope; import org.optaplanner.core.impl.domain.variable.PlanningVariableDescriptor; import org.optaplanner.core.impl.heuristic.selector.move.generic.ChangeMove; import org.optaplanner.core.impl.heuristic.selector.move.generic.chained.ChainedChangeMove; import org.optaplanner.core.impl.heuristic.selector.value.ValueSelector; import org.optaplanner.core.impl.move.Move; import org.optaplanner.core.api.score.Score; import org.optaplanner.core.impl.score.director.ScoreDirector; import org.optaplanner.core.impl.termination.Termination; public class ValuePlacer extends AbstractPlacer { protected final Termination termination; protected final ValueSelector valueSelector; protected final PlanningVariableDescriptor variableDescriptor; protected final int selectedCountLimit; protected boolean assertMoveScoreFromScratch = false; protected boolean assertExpectedUndoMoveScore = false; public ValuePlacer(Termination termination, ValueSelector valueSelector, int selectedCountLimit) { this.termination = termination; this.valueSelector = valueSelector; variableDescriptor = valueSelector.getVariableDescriptor(); this.selectedCountLimit = selectedCountLimit; solverPhaseLifecycleSupport.addEventListener(valueSelector); // TODO don't use Integer.MAX_VALUE as a magical value if (valueSelector.isNeverEnding() && selectedCountLimit == Integer.MAX_VALUE) { throw new IllegalStateException("The placer (" + this + ") with selectedCountLimit (" + selectedCountLimit + ") has valueSelector (" + valueSelector + ") with neverEnding (" + valueSelector.isNeverEnding() + ")."); } } public PlanningVariableDescriptor getVariableDescriptor() { return variableDescriptor; } public void setAssertMoveScoreFromScratch(boolean assertMoveScoreFromScratch) { this.assertMoveScoreFromScratch = assertMoveScoreFromScratch; } public void setAssertExpectedUndoMoveScore(boolean assertExpectedUndoMoveScore) { this.assertExpectedUndoMoveScore = assertExpectedUndoMoveScore; } public ConstructionHeuristicMoveScope nominateMove(ConstructionHeuristicStepScope stepScope) { Object entity = stepScope.getEntity(); if (variableDescriptor.isInitialized(entity)) { return null; } // TODO extract to PlacerForager Score maxScore = null; ConstructionHeuristicMoveScope nominatedMoveScope = null; int moveIndex = 0; for (Iterator it = valueSelector.iterator(entity); it.hasNext(); ) { Object value = it.next(); // TODO check terminator ConstructionHeuristicMoveScope moveScope = new ConstructionHeuristicMoveScope(stepScope); moveScope.setMoveIndex(moveIndex); Move move; if (variableDescriptor.isChained()) { move = new ChainedChangeMove(entity, variableDescriptor, value); } else { move = new ChangeMove(entity, variableDescriptor, value); } moveScope.setMove(move); if (!move.isMoveDoable(stepScope.getScoreDirector())) { logger.trace(" Move index ({}) not doable, ignoring move ({}).", moveScope.getMoveIndex(), move); } else { doMove(moveScope); // TODO extract to PlacerForager if (maxScore == null || moveScope.getScore().compareTo(maxScore) > 0) { maxScore = moveScope.getScore(); // TODO for non explicit Best Fit *, default to random picking from a maxMoveScopeList nominatedMoveScope = moveScope; } if (moveIndex >= selectedCountLimit) { break; } } moveIndex++; if (termination.isPhaseTerminated(stepScope.getPhaseScope())) { break; } } return nominatedMoveScope; } private void doMove(ConstructionHeuristicMoveScope moveScope) { ScoreDirector scoreDirector = moveScope.getScoreDirector(); Move move = moveScope.getMove(); Move undoMove = move.createUndoMove(scoreDirector); moveScope.setUndoMove(undoMove); move.doMove(scoreDirector); processMove(moveScope); undoMove.doMove(scoreDirector); if (assertExpectedUndoMoveScore) { ConstructionHeuristicSolverPhaseScope phaseScope = moveScope.getStepScope().getPhaseScope(); phaseScope.assertExpectedUndoMoveScore(move, undoMove); } logger.trace(" Move index ({}), score ({}) for move ({}).", moveScope.getMoveIndex(), moveScope.getScore(), moveScope.getMove()); } private void processMove(ConstructionHeuristicMoveScope moveScope) { Score score = moveScope.getStepScope().getPhaseScope().calculateScore(); if (assertMoveScoreFromScratch) { moveScope.getStepScope().getPhaseScope().assertWorkingScoreFromScratch(score, moveScope.getMove()); } moveScope.setScore(score); // TODO work with forager // forager.addMove(moveScope); } }
[ "gds.geoffrey.de.smet@gmail.com" ]
gds.geoffrey.de.smet@gmail.com
7a82d69549f64292889347c009d359f32e692c32
1dfd0e45975f1cf7ff9f9561ff2cc18559e5c7df
/Projects/AMS/ams-common/src/main/java/com/zzjs/common/utils/LogUtils.java
16b63b60de95983efaaee0a7f6008e3d6191cf9e
[]
no_license
fengmoboygithub/main_respository
20434a7a676707916a035d4f19f40dba56f26186
c17bc196ae606ce4af503b68af7a926a8e677986
refs/heads/master
2023-01-12T23:43:15.501710
2020-11-18T15:48:48
2020-11-18T15:48:48
313,973,726
0
0
null
null
null
null
UTF-8
Java
false
false
287
java
package com.zzjs.common.utils; /** * 处理并记录日志文件 * * @author yangyc */ public class LogUtils { public static String getBlock(Object msg) { if (msg == null) { msg = ""; } return "[" + msg.toString() + "]"; } }
[ "yangyanchao@otc-tech.cn" ]
yangyanchao@otc-tech.cn
587c2c7eaee001edf8961f493faa14743ce245ca
d11508b8cc91d7ebb1c4d7022939079d5995de1f
/LightHtppClient/src/main/java/com/ebrightmoon/htppclient/api/AppConfig.java
782377f6fea760b8ae21a8ca7329582058d2a04d
[]
no_license
ebrightmoon/LightHttpClient
4f9d5a9ce5b6e76b419e86cee37cbb4a2cc4fb60
01ea9077f9d449a1721160e03dc841b70c88fabb
refs/heads/master
2020-07-23T06:40:32.494418
2019-09-10T06:54:26
2019-09-10T06:54:26
207,476,277
0
0
null
null
null
null
UTF-8
Java
false
false
1,895
java
package com.ebrightmoon.htppclient.api; /** * Created by wyy on 2018/1/26. */ public class AppConfig { private AppConfig() { /* cannot be instantiated */ throw new UnsupportedOperationException("cannot be instantiated"); } public static final String BASE_URL = "https://t3.fsyuncai.com/"; public static final int DEFAULT_RETRY_COUNT = 0;//默认重试次数 public static final int DEFAULT_RETRY_DELAY_MILLIS = 3000;//默认重试间隔时间(毫秒) public static final int MAX_AGE_ONLINE = 60;//默认最大在线缓存时间(秒) public static final int MAX_AGE_OFFLINE = 24 * 60 * 60;//默认最大离线缓存时间(秒) public static final String dirName = "download"; public static final String fileName = "lantern-installer.apk"; public static final String CACHE_SP_NAME = "sp_cache";//默认SharedPreferences缓存文件名 public static final String CACHE_DISK_DIR = "disk_cache";//默认磁盘缓存目录 public static final String CACHE_HTTP_DIR = "http_cache";//默认HTTP缓存目录 public static final long CACHE_NEVER_EXPIRE = -1;//永久不过期 public static final String COOKIE_PREFS = "Cookies_Prefs";//默认Cookie缓存目录 public static final String API_HOST = "https://t3.fsyuncai.com/";//默认API主机地址 public static final String DEFAULT_DOWNLOAD_DIR = "download";//默认下载目录 public static final String DEFAULT_DOWNLOAD_FILE_NAME = "download_file.tmp";//默认下载文件名称 public static final int DEFAULT_TIMEOUT = 60;//默认超时时间(秒) public static final int DEFAULT_MAX_IDLE_CONNECTIONS = 5;//默认空闲连接数 public static final long DEFAULT_KEEP_ALIVE_DURATION = 8;//默认心跳间隔时长(秒) public static final long CACHE_MAX_SIZE = 10 * 1024 * 1024;//默认最大缓存大小(字节) }
[ "jinsedeyuzhou@gmail.com" ]
jinsedeyuzhou@gmail.com
c4a4b7cb3857a047a0e5cc35d05881902a82993a
adbd51b4b99aece431dbfa4d5828291152872cca
/src/main/java/com/lucas/erp/util/EntityManagerProducer.java
cc2faa8b592e36b1563f58d05f992ed6efe647b4
[]
no_license
lucasbarrossantos/cestaBasica
875ec2d6ab03c5d3108717d5ab187042f2762463
fc0d2101b5f30a347a05b0a5eb8057f5bfcb201f
refs/heads/master
2021-01-20T21:12:03.822476
2016-07-28T22:59:33
2016-07-28T22:59:33
63,510,003
0
0
null
null
null
null
UTF-8
Java
false
false
758
java
package com.lucas.erp.util; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.RequestScoped; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Produces; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; @ApplicationScoped public class EntityManagerProducer { private EntityManagerFactory factory; public EntityManagerProducer() { this.factory = Persistence.createEntityManagerFactory("cestaBasica"); } @Produces @RequestScoped public EntityManager createEntityManager() { return this.factory.createEntityManager(); } public void closeEntityManager(@Disposes EntityManager manager) { manager.close(); } }
[ "lucas-barros28@hotmail.com" ]
lucas-barros28@hotmail.com
73d4d347ae8408d1242520858e99d900956dda3a
ec5ee0c75640206efcb7f7bc4a3f46f0a55b7652
/src/main/java/com/bitmovin/api/sdk/encoding/manifests/dash/periods/adaptationsets/representations/chunkedText/ChunkedTextApi.java
4230b7b281bbcd3cdc3928be37d32d0c4463f07d
[ "MIT" ]
permissive
mcherif/bitmovinexp
eb831c18b041c9c86f6d9520b1028dc9b2ea72f6
d4d746794f26c8e9692c834e63d5d19503693bbf
refs/heads/main
2023-04-30T08:14:33.171375
2021-05-11T11:19:04
2021-05-11T11:19:04
368,218,598
0
0
null
null
null
null
UTF-8
Java
false
false
7,401
java
package com.bitmovin.api.sdk.encoding.manifests.dash.periods.adaptationsets.representations.chunkedText; import java.util.Date; import java.util.List; import java.util.Map; import java.util.HashMap; import feign.Param; import feign.QueryMap; import feign.RequestLine; import feign.Body; import feign.Headers; import com.bitmovin.api.sdk.model.*; import com.bitmovin.api.sdk.common.BitmovinException; import static com.bitmovin.api.sdk.common.BitmovinExceptionFactory.buildBitmovinException; import com.bitmovin.api.sdk.common.BitmovinDateExpander; import com.bitmovin.api.sdk.common.QueryMapWrapper; import com.bitmovin.api.sdk.common.BitmovinApiBuilder; import com.bitmovin.api.sdk.common.BitmovinApiClientFactory; public class ChunkedTextApi { private final ChunkedTextApiClient apiClient; public ChunkedTextApi(BitmovinApiClientFactory clientFactory) { if (clientFactory == null) { throw new IllegalArgumentException("Parameter 'clientFactory' may not be null."); } this.apiClient = clientFactory.createApiClient(ChunkedTextApiClient.class); } /** * Fluent builder for creating an instance of ChunkedTextApi */ public static BitmovinApiBuilder<ChunkedTextApi> builder() { return new BitmovinApiBuilder<>(ChunkedTextApi.class); } /** * Add Chunked Text Representation * * @param manifestId Id of the manifest (required) * @param periodId Id of the period (required) * @param adaptationsetId Id of the adaptation set (required) * @param dashChunkedTextRepresentation The Chunked Text Representation to be added to the adaptation set (required) * @return DashChunkedTextRepresentation * @throws BitmovinException if fails to make API call */ public DashChunkedTextRepresentation create(String manifestId, String periodId, String adaptationsetId, DashChunkedTextRepresentation dashChunkedTextRepresentation) throws BitmovinException { try { return this.apiClient.create(manifestId, periodId, adaptationsetId, dashChunkedTextRepresentation).getData().getResult(); } catch (Exception ex) { throw buildBitmovinException(ex); } } /** * Delete Chunked Text Representation * * @param manifestId Id of the manifest (required) * @param periodId Id of the period (required) * @param adaptationsetId Id of the adaptation set (required) * @param representationId Id of the Chunked Text Representation to be deleted (required) * @return BitmovinResponse * @throws BitmovinException if fails to make API call */ public BitmovinResponse delete(String manifestId, String periodId, String adaptationsetId, String representationId) throws BitmovinException { try { return this.apiClient.delete(manifestId, periodId, adaptationsetId, representationId).getData().getResult(); } catch (Exception ex) { throw buildBitmovinException(ex); } } /** * Chunked Text Representation Details * * @param manifestId Id of the manifest (required) * @param periodId Id of the period (required) * @param adaptationsetId Id of the adaptation set (required) * @param representationId Id of the representation (required) * @return DashChunkedTextRepresentation * @throws BitmovinException if fails to make API call */ public DashChunkedTextRepresentation get(String manifestId, String periodId, String adaptationsetId, String representationId) throws BitmovinException { try { return this.apiClient.get(manifestId, periodId, adaptationsetId, representationId).getData().getResult(); } catch (Exception ex) { throw buildBitmovinException(ex); } } /** * List all Chunked Text Representations * * @param manifestId Id of the manifest (required) * @param periodId Id of the period (required) * @param adaptationsetId Id of the adaptation set (required) * @return List&lt;DashChunkedTextRepresentation&gt; * @throws BitmovinException if fails to make API call */ public PaginationResponse<DashChunkedTextRepresentation> list(String manifestId, String periodId, String adaptationsetId) throws BitmovinException { try { return this.apiClient.list(manifestId, periodId, adaptationsetId, new QueryMapWrapper()).getData().getResult(); } catch (Exception ex) { throw buildBitmovinException(ex); } } /** * List all Chunked Text Representations * * @param manifestId Id of the manifest (required) * @param periodId Id of the period (required) * @param adaptationsetId Id of the adaptation set (required) * @param queryParams The query parameters for sorting, filtering and paging options (optional) * @return List&lt;DashChunkedTextRepresentation&gt; * @throws BitmovinException if fails to make API call */ public PaginationResponse<DashChunkedTextRepresentation> list(String manifestId, String periodId, String adaptationsetId, DashChunkedTextRepresentationListQueryParams queryParams) throws BitmovinException { try { return this.apiClient.list(manifestId, periodId, adaptationsetId, new QueryMapWrapper(queryParams)).getData().getResult(); } catch (Exception ex) { throw buildBitmovinException(ex); } } interface ChunkedTextApiClient { @RequestLine("POST /encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text") ResponseEnvelope<DashChunkedTextRepresentation> create(@Param(value = "manifest_id") String manifestId, @Param(value = "period_id") String periodId, @Param(value = "adaptationset_id") String adaptationsetId, DashChunkedTextRepresentation dashChunkedTextRepresentation) throws BitmovinException; @RequestLine("DELETE /encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text/{representation_id}") ResponseEnvelope<BitmovinResponse> delete(@Param(value = "manifest_id") String manifestId, @Param(value = "period_id") String periodId, @Param(value = "adaptationset_id") String adaptationsetId, @Param(value = "representation_id") String representationId) throws BitmovinException; @RequestLine("GET /encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text/{representation_id}") ResponseEnvelope<DashChunkedTextRepresentation> get(@Param(value = "manifest_id") String manifestId, @Param(value = "period_id") String periodId, @Param(value = "adaptationset_id") String adaptationsetId, @Param(value = "representation_id") String representationId) throws BitmovinException; @RequestLine("GET /encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text") ResponseEnvelope<PaginationResponse<DashChunkedTextRepresentation>> list(@Param(value = "manifest_id") String manifestId, @Param(value = "period_id") String periodId, @Param(value = "adaptationset_id") String adaptationsetId, @QueryMap QueryMapWrapper queryParams) throws BitmovinException; } }
[ "openapi@bitmovin.com" ]
openapi@bitmovin.com
fca51b68a974a8248c2e6a413908fc73d2d0e212
cd48551346edeef17d95527f1acd78bb3d4c47f3
/src/main/java/org/openide/explorer/view/VisualizerEvent.java
558c7dc90bcb738925184eaee76d92e0226413ee
[ "Apache-2.0" ]
permissive
tszielin/q-lab-editor
56c387f5a8f2437857813754b1e17fcc9ecd4411
eaf1baa4373d8ee476c0b8cfbc30c54fe0afbd46
refs/heads/master
2021-01-10T02:23:49.816445
2016-03-02T16:56:10
2016-03-02T16:56:10
52,768,617
1
0
null
null
null
null
UTF-8
Java
false
false
5,258
java
/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.openide.explorer.view; import java.util.LinkedList; import java.util.EventObject; import org.openide.nodes.*; /** Event describing change in a visualizer. Runnable to be added into * the event queue. * * @author Jaroslav Tulach */ abstract class VisualizerEvent extends EventObject { /** indicies */ private int[] array; public VisualizerEvent (VisualizerChildren ch, int[] array) { super (ch); this.array = array; } /** Getter for changed indexes */ public final int[] getArray () { return array; } /** Getter for the children list. */ public final VisualizerChildren getChildren () { return (VisualizerChildren)getSource (); } /** Getter for the visualizer. */ public final VisualizerNode getVisualizer () { return getChildren ().parent; } /** Class for notification of adding of nodes that can be passed into * the event queue and in such case notifies all listeners in Swing Dispatch Thread */ static final class Added extends VisualizerEvent implements Runnable { /** array of newly added nodes */ private Node[] added; static final long serialVersionUID =5906423476285962043L; /** Constructor for add of nodes notification. * @param ch children * @param n array of added nodes * @param indx indicies of added nodes */ public Added ( VisualizerChildren ch, Node[] n, int[] indx ) { super (ch, indx); added = n; } /** Getter for added nodes. */ public Node[] getAdded () { return added; } /** Process the event */ public void run() { super.getChildren ().added (this); } } /** Class for notification of removing of nodes that can be passed into * the event queue and in such case notifies all listeners in Swing Dispatch Thread */ static final class Removed extends VisualizerEvent implements Runnable { /** linked list of removed nodes, that is filled in getChildren ().removed () method */ public LinkedList removed = new LinkedList (); private Node[]removedNodes; static final long serialVersionUID =5102881916407672392L; /** Constructor for add of nodes notification. * @param ch children * @param n array of added nodes * @param indx indicies of added nodes */ public Removed ( VisualizerChildren ch, Node[] removedNodes ) { super (ch, null); this.removedNodes = removedNodes; } public Node[] getRemovedNodes () { return removedNodes; } public void setRemovedIndicies (int[] arr) { super.array = arr; } /** Process the event */ public void run() { super.getChildren ().removed (this); } } /** Class for notification of reordering of nodes that can be passed into * the event queue and in such case notifies all listeners in Swing Dispatch Thread */ static final class Reordered extends VisualizerEvent implements Runnable { /** indices */ private int[] changedIndices; static final long serialVersionUID =-4572356079752325870L; /** Constructor for add of nodes notification. * @param ch children * @param n array of added nodes * @param indx indicies of added nodes */ public Reordered ( VisualizerChildren ch, int[] indx ) { super (ch, indx); } // /** Prepares list of changed indices for use in tree model. // */ // public int[] getChangedIndices () { // if (changedIndices == null) { // int[] permutation = super.getArray (); // int size = permutation.length; // int changes = 0; // for (int i = 0; i < size; i++) { // if (permutation[i] != i) // changes++; // } // // int[] indices = new int[changes]; // // int current = 0; // for (int i = 0; i < size; i++) { // if (permutation[i] != i) { // indices[current++] = i; // } // } // // changedIndices = indices; // } // return changedIndices; // } /** Process the event */ public void run() { super.getChildren ().reordered (this); } } }
[ "thomas.zielinski@cognizant.com" ]
thomas.zielinski@cognizant.com
231d61cca222b538e0af01b3f0b4768095ce3b58
e70abc02efbb8a7637eb3655f287b0a409cfa23b
/hyjf-wechat/src/main/java/com/hyjf/wechat/service/find/operationalData/PlatDataStatisticsServiceImpl.java
47ee0e669d171e4e133a0294bbbbab073fc1ecf3
[]
no_license
WangYouzheng1994/hyjf
ecb221560460e30439f6915574251266c1a49042
6cbc76c109675bb1f120737f29a786fea69852fc
refs/heads/master
2023-05-12T03:29:02.563411
2020-05-19T13:49:56
2020-05-19T13:49:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,897
java
package com.hyjf.wechat.service.find.operationalData; import java.math.BigDecimal; import java.util.List; import com.hyjf.mongo.operationreport.dao.TotalInvestAndInterestMongoDao; import com.hyjf.mongo.operationreport.entity.TotalInvestAndInterestEntity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.query.Query; import org.springframework.stereotype.Service; import com.hyjf.mybatis.model.auto.BorrowUserStatistic; import com.hyjf.mybatis.model.auto.BorrowUserStatisticExample; import com.hyjf.mybatis.model.auto.CalculateInvestInterest; import com.hyjf.mybatis.model.auto.CalculateInvestInterestExample; import com.hyjf.wechat.base.BaseServiceImpl; /** * 平台数据统计Service实现类 * * @author liuyang */ @Service public class PlatDataStatisticsServiceImpl extends BaseServiceImpl implements PlatDataStatisticsService { @Autowired private TotalInvestAndInterestMongoDao totalInvestAndInterestMongoDao; /** * 获取累计出借累计收益 * * @return */ @Override public CalculateInvestInterest selectCalculateInvestInterest() { CalculateInvestInterestExample example = new CalculateInvestInterestExample(); CalculateInvestInterestExample.Criteria cra = example.createCriteria(); List<CalculateInvestInterest> list = this.calculateInvestInterestMapper.selectByExample(example); if (list != null && list.size() > 0) { return list.get(0); } return null; } /** * 检索运营统计数据 * @return */ @Override public BorrowUserStatistic selectBorrowUserStatistic(){ BorrowUserStatisticExample example = new BorrowUserStatisticExample(); List<BorrowUserStatistic> list = borrowUserStatisticMapper.selectByExample(example); if(list == null || list.isEmpty()){ return null; } return list.get(0); } @Override public BigDecimal selectTotalInvest() { TotalInvestAndInterestEntity entity = getTotalInvestAndInterestEntity(); if (entity != null) { return entity.getTotalInvestAmount(); } return BigDecimal.ZERO; } @Override public BigDecimal selectTotalInterest() { TotalInvestAndInterestEntity entity = getTotalInvestAndInterestEntity(); if (entity != null) { return entity.getTotalInterestAmount(); } return BigDecimal.ZERO; } @Override public Integer selectTotalTradeSum() { TotalInvestAndInterestEntity entity = getTotalInvestAndInterestEntity(); if (entity != null) { return entity.getTotalInvestNum(); } return 0; } private TotalInvestAndInterestEntity getTotalInvestAndInterestEntity() { return totalInvestAndInterestMongoDao.findOne(new Query()); } }
[ "heshuying@hyjf.com" ]
heshuying@hyjf.com
77885cd097e2205c83f1ec0b48a96375a8ce6185
ca3a2e1c83fadf39d53b0a24bc7a18a8b0e377e9
/src/text/Work02.java
de6082e0318c03970dbd1cabb0b6758bb27d39df
[]
no_license
SmallRed-hsl/One
3599c199306e18df197898a67f070beed7d311b0
78b0c444d9003e4362a533be0b20c892b3837c61
refs/heads/master
2022-12-29T15:02:57.385548
2020-10-19T07:28:05
2020-10-19T07:28:05
305,453,407
0
0
null
null
null
null
UTF-8
Java
false
false
1,304
java
package text; import java.util.Scanner; public class Work02 { public static void main(String[] args) { Scanner input=new Scanner(System.in); int num=0; do { System.out.println("请输入数字1~7(输入0结束)"); num=input.nextInt(); switch (num){ case 1: System.out.println("今天是星期一"); break; case 2: System.out.println("今天是星期二"); break; case 3: System.out.println("今天是星期三"); break; case 4: System.out.println("今天是星期四"); break; case 5: System.out.println("今天是星期五"); break; case 6: System.out.println("今天是星期六"); break; case 7: System.out.println("今天是星期天"); break; } }while (num!=0); System.out.println("程序结束"); } }
[ "you@example.com" ]
you@example.com
19139fb62cd6f28915a2179c69dbc2a6190c2c4c
f68012957a525271d820cdab67256cf460e31625
/com/drturner/Howi/HJ105.java
1a9a306f725e257a5d8ecfb0696afb96b5d48d46
[]
no_license
Turnarde/leetcode
d6091322d385dccdf4040a73ac7d8f9175129aa7
23ac7bd25aaf65faa460a66caf6fa2d83733fa0f
refs/heads/master
2021-05-18T07:08:08.484102
2020-07-18T01:24:38
2020-07-18T01:24:38
251,171,988
1
0
null
2020-07-18T01:24:39
2020-03-30T01:29:40
Java
UTF-8
Java
false
false
734
java
package com.drturner.Howi; import java.util.Scanner; /** * ClassName: HJ105 * Description: TO DO * Author: Drturner * Date: 2020/6/21 * Version: 1.0 */ public class HJ105 { public static void main(String[] args) { Scanner sc =new Scanner(System.in); int total=0; int count=0; int poscount=0; while (sc.hasNext()){ int num = sc.nextInt(); if (num<0) count++; else { poscount++; total+=num; } } System.out.println(count); if (poscount==0){ System.out.println(0.0); } else { System.out.format("%.1f",total*1.0/poscount); } } }
[ "you@example.comliu" ]
you@example.comliu
84397110d75ffd4ecb4e0b485ccb2c8cffef874b
36fea8025460bd257c753a93dd3f27472892b4bc
/root/prj/sol/projects/renew2.5source/renew2.5/src/Refactoring/src/de/renew/refactoring/search/range/FileSearchRange.java
2b39b8cf1e69b8837e7ca2b5d8b96b1e8e7dbb7c
[]
no_license
Glost/db_nets_renew_plugin
ac84461e7779926b7ad70b2c7724138dc0d7242f
def4eaf7e55d79b9093bd59c5266804b345e8595
refs/heads/master
2023-05-05T00:02:12.504536
2021-05-25T22:36:13
2021-05-25T22:36:13
234,759,037
0
0
null
2021-05-04T23:37:39
2020-01-18T15:59:33
Java
UTF-8
Java
false
false
513
java
package de.renew.refactoring.search.range; import java.io.File; import java.util.Iterator; /** * Interface for file search ranges. * * @author 2mfriedr */ public interface FileSearchRange extends SearchRange { /** * Returns the number of files in the search range. * * @return the number of files */ public int numberOfFiles(); /** * Returns an iterator of all files in the search range. * * @return an iterator */ public Iterator<File> files(); }
[ "anton19979@yandex.ru" ]
anton19979@yandex.ru
c198a41506af740ba1f6151d48ab91cd5ce3d4ca
4902adfb7a5b6347121b0ea8e46a87e32b453981
/app/src/main/java/com/weizhan/superlook/widget/banners/transformer/RotateDownTransformer.java
f8f65df972a9768d98abb99522eeb0048a488813
[]
no_license
cherry-cheng/PlayDemo
5098cd8f8062fc267e26858114bdf1440b9c62de
d3d1b55f8c96f7d2f4b9393fb261cd088b04920e
refs/heads/master
2020-04-06T09:58:49.223906
2018-11-19T10:51:25
2018-11-19T10:51:25
157,364,178
0
0
null
null
null
null
UTF-8
Java
false
false
1,160
java
/* * Copyright 2014 Toxic Bakery * * 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.weizhan.superlook.widget.banners.transformer; import android.view.View; public class RotateDownTransformer extends ABaseTransformer { private static final float ROT_MOD = -15f; @Override protected void onTransform(View view, float position) { final float width = view.getWidth(); final float height = view.getHeight(); final float rotation = ROT_MOD * position * -1.25f; view.setPivotX(width * 0.5f); view.setPivotY(height); view.setRotation(rotation); } @Override protected boolean isPagingEnabled() { return true; } }
[ "chengyonghui@yizhanit.com" ]
chengyonghui@yizhanit.com
fbca586ce0d1da34b845710b1cabf7001bca2a59
1b523bf1b3bfd9782227ca394ac20143baf4974c
/official/chapter05/phoneme/phoneme_feature-mr3-rel-src-b01-17_jul_2008/cldc/src/tools/jcc/runtime/CCodeWriter.java
383779b9772817d551dd07466f81b99c097cbc96
[]
no_license
Joyounger/armlinuxbook
66c80192a2d4ea068bba2e21c92067705da08949
b7fea1d8c235cbd1f4551b5495bbacc777d91916
refs/heads/master
2021-05-06T10:17:58.433025
2018-03-31T09:14:02
2018-03-31T09:14:02
114,165,147
1
1
null
null
null
null
UTF-8
Java
false
false
6,045
java
/* * * * Copyright 1990-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER * * This program 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. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License version 2 for more details (a copy is * included at /legal/license.txt). * * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa * Clara, CA 95054 or visit www.sun.com if you need additional * information or have any questions. */ package runtime; import util.BufferedPrintStream; import java.io.*; import java.lang.reflect.Array; /* * An I/O abstraction that adds a few often-used function * to the basic PrintStream. Implemented on top of the BufferedPrintStream. */ public class CCodeWriter { BufferedPrintStream out; public CCodeWriter( java.io.OutputStream file ){ out = new BufferedPrintStream(file); } private static String hexString[]; static { hexString = new String[0x100]; for(int i = 0; i < 256; i++){ hexString[i] = Integer.toHexString(i + 256).substring(1); } } public final void printHexInt( int v ) { int a, b, c, d; a = v>>>24; b = (v>>>16) & 0xff; c = (v>>>8) & 0xff; d = v & 0xff; print("0x"); if ( a != 0 ){ print(hexString[ a ]); print(hexString[ b ]); print(hexString[ c ]); print(hexString[ d ]); } else if ( b != 0 ){ print(hexString[ b ]); print(hexString[ c ]); print(hexString[ d ]); } else if ( c != 0 ){ print(hexString[ c ]); print(hexString[ d ]); } else { print(hexString[ d ]); } } void printSafeString(String x) { final int STRING_PURE = 0; final int STRING_SOME_BAD = 1; final int STRING_ALL_BAD = 2; // STRING_PURE means there are no problematic characters. // // STRING_SOME_BAD means that we should print out the string // normally, but escape the uncertain characters. // // STRING_ALL_BAD means that we encountered a character that makes // us believe that this is an encoded string, and we should print // out everything except letters using escape sequences. int stringType = STRING_PURE; int length = x.length(); for (int i = 0; i < length; i++) { char c = x.charAt(i); if (c < ' ' || c > '~') { stringType = STRING_ALL_BAD; break; } if (c == '"' || c == '\\' || c == '/') { stringType = STRING_SOME_BAD; } } write ('"'); if (stringType == STRING_PURE) { // There were no bad characters whatsoever. Just print it print(x); write('"'); return; } for (int i = 0; i < length; i++) { char c = x.charAt(i); if (Character.isLetterOrDigit(c) && c < 128) { write(c); } else if ((stringType != STRING_ALL_BAD) && ( c >= (byte)' ' ) && ( c <= (byte)'~' ) && ( c != (byte)'"') && (c != (byte)'\\' ) && ( c != (byte)'/')) { // the only dangers between space and ~ are " and \ // We must also be careful about writing */ by accident. write(c); } else { switch ( c ){ case '\\': print("\\\\"); break; case '\n': print("\\n"); break; case '\r': print("\\r"); break; case '\t': print("\\t"); break; case '"': print("\\\""); break; case '/': // we only have a problem if the previous char was an // asterisk. It looks like we're ending the comment. if (i > 0 && x.charAt(i - 1) == (byte)'*') write('\\'); write('/'); break; default: int temp = (c & 0xFF) + 01000; print("\\"); print(Integer.toOctalString(temp).substring(1)); break; // end of switch } } } // end of for write('"'); } public void print(Object x) { print(x.toString()); } public void print(String x) { int length = x.length(); for (int i = 0; i < length; i++) { write(x.charAt(i)); } } public void println(String x) { print(x); write('\n'); } public void println() { write('\n'); } public void print(int x) { print(Integer.toString(x)); } private int column = 0; public void write(int x) { if (x == '\n') { out.write(x); column = 0; } else if (x == '\t') { do { out.write(' '); column++; } while ((column % 4) != 0); } else { out.write(x); column++; } } public boolean checkError() { return out.checkError(); } public void flush() { out.flush(); } public void close() { out.close(); } }
[ "942510346@qq.com" ]
942510346@qq.com
652413ff93e520541d8c00ba9a2ddd816c8d910f
380d1187ac2cebd2a33827790913ff3d8d6be17b
/src/main/java/generics/watercolors/Watercolors.java
c766c50d8362225102f79c5b01b756ab993c8791
[]
no_license
XingxianDeng/ThinkingInJavaSample
eb9340fed48af79c60fdddcc6272c5d2d4d17538
f3414c706c19020cf348461242956bfdac743c9b
refs/heads/master
2021-06-22T01:41:04.337907
2017-08-30T14:06:43
2017-08-30T14:06:43
84,512,283
0
0
null
null
null
null
UTF-8
Java
false
false
433
java
package generics.watercolors; /** * @author Dylan * @version 1.00 7/24/2016 18:23 */ public enum Watercolors { ZINC, LEMON_YELLOW, MEDIUM_YELLOW, DEEP_YELLOW, ORANGE, BRILLIANT_RED, CRIMSON, MAGENTA, ROSE_MADDER, VIOLET, CERULEAN_BLUE_HUE, PHTHALO_BLUE, ULTRAMARINE, COBALT_BLUE_HUE, PERMANENT_GREEN, VIRIDIAN_HUE, SAP_GREEN, YELLOW_OCHRE, BURNT_SIENNA, RAW_UMBER, BURNT_UMBER, PAYNES_GRAY, IVORY_BLACK }
[ "dxx1104@gmail.com" ]
dxx1104@gmail.com
ad9b951aacb9c28a634e3c3c5b1178b46348f8bb
df041848c8465b01393e01e8178067b94af79af5
/src/main/java/com/speedment/internal/core/field/StringFieldImpl.java
4c835d8c10da66822f1f4a25467c9dde386498ab
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference" ]
permissive
valery1707/speedment
aafebab189aa07daaca1dc31478f70c6d8490dde
16025c57b228cd1a40d8e14df11c5d0a1a5e5c8a
refs/heads/master
2021-01-17T18:44:31.153259
2016-03-22T20:53:23
2016-03-22T20:53:23
54,530,998
0
0
null
2016-03-23T04:32:39
2016-03-23T04:32:38
null
UTF-8
Java
false
false
6,591
java
/** * * Copyright (c) 2006-2015, Speedment, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); You may not * use this file except in compliance with the License. You may obtain a copy of * the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.speedment.internal.core.field; import com.speedment.field.Inclusion; import com.speedment.internal.core.field.trait.ComparableFieldTraitImpl; import com.speedment.internal.core.field.trait.FieldTraitImpl; import com.speedment.internal.core.field.trait.ReferenceFieldTraitImpl; import com.speedment.field.methods.Getter; import com.speedment.field.methods.Setter; import java.util.Set; import com.speedment.field.StringField; import com.speedment.field.methods.FieldSetter; import com.speedment.field.predicate.ComparableSpeedmentPredicate; import com.speedment.field.predicate.SpeedmentPredicate; import com.speedment.internal.core.field.trait.StringFieldTraitImpl; import java.util.Comparator; import com.speedment.field.trait.ComparableFieldTrait; import com.speedment.field.trait.FieldTrait; import com.speedment.field.trait.ReferenceFieldTrait; import com.speedment.field.trait.StringFieldTrait; import com.speedment.field.predicate.StringSpeedmentPredicate; import static java.util.Objects.requireNonNull; /** * This class represents a Comparable Reference Field. A Reference Field is * something that extends {@link Comparable}. * * @author pemi * @param <ENTITY> The entity type */ public class StringFieldImpl<ENTITY> implements StringField<ENTITY> { private final FieldTrait field; private final ReferenceFieldTrait<ENTITY, String> referenceField; private final ComparableFieldTrait<ENTITY, String> comparableField; private final StringFieldTrait<ENTITY> stringField; public StringFieldImpl( String columnName, Getter<ENTITY, String> getter, Setter<ENTITY, String> setter ) { field = new FieldTraitImpl(requireNonNull(columnName)); referenceField = new ReferenceFieldTraitImpl<>(field, requireNonNull(getter), requireNonNull(setter)); comparableField = new ComparableFieldTraitImpl<>(field, referenceField); stringField = new StringFieldTraitImpl<>(field, referenceField); } @Override public String getColumnName() { return field.getColumnName(); } @Override public Setter<ENTITY, String> setter() { return referenceField.setter(); } @Override public Getter<ENTITY, String> getter() { return referenceField.getter(); } @Override public FieldSetter<ENTITY, String> setTo(String value) { return referenceField.setTo(value); } @Override public Comparator<ENTITY> comparator() { return comparableField.comparator(); } @Override public Comparator<ENTITY> comparatorNullFieldsFirst() { return comparableField.comparatorNullFieldsFirst(); } @Override public Comparator<ENTITY> comparatorNullFieldsLast() { return comparableField.comparatorNullFieldsLast(); } @Override public SpeedmentPredicate<ENTITY, String> isNull() { return referenceField.isNull(); } @Override public SpeedmentPredicate<ENTITY, String> isNotNull() { return referenceField.isNotNull(); } @Override public ComparableSpeedmentPredicate<ENTITY, String> equal(String value) { return comparableField.equal(value); } @Override public ComparableSpeedmentPredicate<ENTITY, String> notEqual(String value) { return comparableField.notEqual(value); } @Override public ComparableSpeedmentPredicate<ENTITY, String> lessThan(String value) { return comparableField.lessThan(value); } @Override public ComparableSpeedmentPredicate<ENTITY, String> lessOrEqual(String value) { return comparableField.lessOrEqual(value); } @Override public ComparableSpeedmentPredicate<ENTITY, String> greaterThan(String value) { return comparableField.greaterThan(value); } @Override public ComparableSpeedmentPredicate<ENTITY, String> greaterOrEqual(String value) { return comparableField.greaterOrEqual(value); } @Override public ComparableSpeedmentPredicate<ENTITY, String> between(String start, String end) { return comparableField.between(start, end); } @Override public ComparableSpeedmentPredicate<ENTITY, String> between(String start, String end, Inclusion inclusion) { return comparableField.between(start, end, inclusion); } @Override public ComparableSpeedmentPredicate<ENTITY, String> in(String... values) { return comparableField.in(values); } @Override public ComparableSpeedmentPredicate<ENTITY, String> in(Set<String> values) { return comparableField.in(values); } @SafeVarargs @SuppressWarnings("varargs") // delegator is safe @Override public final ComparableSpeedmentPredicate<ENTITY, String> notIn(String... values) { return comparableField.notIn(values); } @Override public ComparableSpeedmentPredicate<ENTITY, String> notIn(Set<String> values) { return comparableField.notIn(values); } @Override public StringSpeedmentPredicate<ENTITY> equalIgnoreCase(String value) { return stringField.equalIgnoreCase(value); } @Override public StringSpeedmentPredicate<ENTITY> notEqualIgnoreCase(String value) { return stringField.notEqualIgnoreCase(value); } @Override public StringSpeedmentPredicate<ENTITY> startsWith(String value) { return stringField.startsWith(value); } @Override public StringSpeedmentPredicate<ENTITY> endsWith(String value) { return stringField.endsWith(value); } @Override public StringSpeedmentPredicate<ENTITY> contains(String value) { return stringField.contains(value); } @Override public StringSpeedmentPredicate<ENTITY> isEmpty() { return stringField.isEmpty(); } @Override public StringSpeedmentPredicate<ENTITY> isNotEmpty() { return stringField.isNotEmpty(); } }
[ "minborg@speedment.com" ]
minborg@speedment.com
90df69b4ba02ea35599e27aeeeea17d1b155b1b6
0e7ce4fc03db33c16c932061559f054a44effcfa
/005-4-implementacao/005-4-1-workspace/brewer/src/main/java/com/algaworks/brewer/model/validation/ClienteGroupSequenceProvider.java
375121b66365bd522807a7c6bb1831bba75a3d3f
[]
no_license
Udinei/005-brewer
4522bdc647e83686078cb4e1d478d0b80fb38cae
5355b83107452b6f2cb18c38d81456528f9cad7b
refs/heads/master
2021-01-18T16:38:56.316271
2017-06-19T22:00:05
2017-06-19T22:00:05
86,723,749
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package com.algaworks.brewer.model.validation; import java.util.ArrayList; import java.util.List; import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider; import com.algaworks.brewer.model.Cliente; public class ClienteGroupSequenceProvider implements DefaultGroupSequenceProvider<Cliente>{ @Override public List<Class<?>> getValidationGroups(Cliente cliente) { List<Class<?>> grupos = new ArrayList<>(); grupos.add(Cliente.class); if(isPessoaSelecionada(cliente)){ grupos.add(cliente.getTipoPessoa().getGrupo()); } return grupos; } private boolean isPessoaSelecionada(Cliente cliente) { return cliente != null && cliente.getTipoPessoa() != null; } }
[ "ukaliko@gmail.com" ]
ukaliko@gmail.com
1a88043b5e5c9d0dd56d028e75d16578b5edd833
5e4c6e116d426bca2b77d4e56d6acf5fcfd1cce1
/H05/7.Release/QA/BackEnd/BE-Service/QA-services/QA-services-api/src/main/java/com/ecoit/qa/service/service/CategoryServiceWrapper.java
5f92f1762496e02c0b48e34536e30f9c8cbda55b
[]
no_license
tayduivn/Ecoit-code
736a1cad571e4100e34ee87832176fc21fb7470f
641ac4d0b249d2f4b20316331a1a2d55d31a6635
refs/heads/master
2023-01-10T16:08:22.646887
2020-11-16T12:02:30
2020-11-16T12:02:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,490
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * 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 (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.ecoit.qa.service.service; import com.liferay.portal.kernel.service.ServiceWrapper; /** * Provides a wrapper for {@link CategoryService}. * * @author Brian Wing Shun Chan * @see CategoryService * @generated */ public class CategoryServiceWrapper implements CategoryService, ServiceWrapper<CategoryService> { public CategoryServiceWrapper(CategoryService categoryService) { _categoryService = categoryService; } /** * Returns the OSGi service identifier. * * @return the OSGi service identifier */ @Override public String getOSGiServiceIdentifier() { return _categoryService.getOSGiServiceIdentifier(); } @Override public CategoryService getWrappedService() { return _categoryService; } @Override public void setWrappedService(CategoryService categoryService) { _categoryService = categoryService; } private CategoryService _categoryService; }
[ "ln8070389@gmail.com" ]
ln8070389@gmail.com
512785d7f7033ad53aef2910a5c3376e945f7f72
f97f165843da813b2f04c6bccedb9980b8d664b6
/lesley_gumbo/src/main/java/com/cadastore/lesley_gumbo/security/SecurityAdapter.java
708be5740bcbf67c737820704dbce65e8d4ffadc
[]
no_license
gumbogarnnet/working-examples
f94fef6ceff7b6ba9ff16e1310b6a0007d3862e1
aa848b01f70ae61a0d56ab6b63cbb5b4e29d1375
refs/heads/master
2022-12-22T09:12:38.285035
2022-12-15T13:46:35
2022-12-15T13:46:35
233,857,109
0
0
null
2022-06-21T02:47:32
2020-01-14T14:16:08
JavaScript
UTF-8
Java
false
false
4,681
java
package com.cadastore.lesley_gumbo.security; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.Authentication; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.NoOpPasswordEncoder; import org.springframework.security.provisioning.InMemoryUserDetailsManager; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; /** * * @author garnnet */ @Configuration @EnableWebSecurity public class SecurityAdapter extends WebSecurityConfigurerAdapter { @Autowired CustomUserDetaledService customUserDetaledService; @Bean public AuthenticationProvider authenticationProvider() { DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider(); daoAuthenticationProvider.setUserDetailsService(customUserDetaledService); daoAuthenticationProvider.setPasswordEncoder(passwordEncoder()); return daoAuthenticationProvider; } @Bean public BCryptPasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable() .authorizeRequests() // .antMatchers("/login").permitAll() .antMatchers("/register").permitAll() .antMatchers("/forgot-password").permitAll() .antMatchers("/postregisteruser").permitAll() .antMatchers("/360_F_275471448_JVqZr4pwfoqFMo5KXTaaXAAt0tlcQvSZ.jpg").permitAll() .antMatchers("/*.jpg").permitAll() .antMatchers("/**/*.js").permitAll() .antMatchers("/**.js").permitAll() .antMatchers("/resources/**").permitAll() .antMatchers("/*.js").permitAll() .antMatchers("/vendor/fontawesome-free/css/all.min.css").permitAll() .antMatchers("/css/sb-admin-2.min.css").permitAll() .antMatchers("/vendor/fontawesome-free/webfonts/fa-brands-400.woff2").permitAll() .antMatchers("/vendor/fontawesome-free/webfonts/fa-brands-400.woff").permitAll() .anyRequest().authenticated() .and() .formLogin() .loginPage("/login") .usernameParameter("userName") // .defaultSuccessUrl("/pages",true).permitAll() // .successHandler(appAuthenticationSuccessHandler()) .permitAll() .and() .logout() .permitAll(); } @Bean public AuthenticationSuccessHandler appAuthenticationSuccessHandler() { return new AppAuthenticationSuccessHandler(); } static class AppAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { protected void handle(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { } } @Bean @Override protected UserDetailsService userDetailsService() { List<UserDetails> user = new ArrayList<>(); user.add(User.withDefaultPasswordEncoder().username("user").password("password").roles("user").build()); return new InMemoryUserDetailsManager(user); } }
[ "you@example.com" ]
you@example.com
d8dd55774f9146dd06a48c1e97474e0c1d1ed81c
25586116169a4805a6011e08e47c187096cb5fb4
/fili-core/src/main/java/com/yahoo/bard/webservice/druid/model/datasource/TableDataSource.java
378e5edce4c77b6036d39d94dddca7c69cd87fc4
[ "Apache-2.0" ]
permissive
venisa/fili
a54b1184678420c9eb2588e348e91564f01b87db
ec2c7d0373c3156b880cccebf22c411ceb88f8ec
refs/heads/master
2020-12-02T19:45:03.518305
2016-08-31T15:18:11
2016-09-08T19:16:02
67,046,802
0
0
null
2016-08-31T14:51:04
2016-08-31T14:51:04
null
UTF-8
Java
false
false
1,106
java
// Copyright 2016 Yahoo Inc. // Licensed under the terms of the Apache license. Please see LICENSE file distributed with this work for terms. package com.yahoo.bard.webservice.druid.model.datasource; import com.yahoo.bard.webservice.druid.model.query.DruidQuery; import com.yahoo.bard.webservice.table.PhysicalTable; import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.Collections; import java.util.Set; /** * TableDataSource class. */ public class TableDataSource extends DataSource { private final String name; /** * Constructor. * * @param physicalTable The physical table of the data source */ public TableDataSource(PhysicalTable physicalTable) { super(DefaultDataSourceType.TABLE, Collections.singleton(physicalTable)); this.name = physicalTable.getName(); } public String getName() { return name; } @Override @JsonIgnore public Set<String> getNames() { return super.getNames(); } @Override @JsonIgnore public DruidQuery<?> getQuery() { return null; } }
[ "mclawhor@yahoo-inc.com" ]
mclawhor@yahoo-inc.com
7b3a5a3b6c1309c67853911e55a5e1c364476241
719206f4df3e5b627ef16f27bf659c36397f5d6f
/hybris/bin/custom/petshop/petshopstorefront/web/src/de/hybris/petshop/storefront/checkout/steps/validation/impl/DefaultSummaryCheckoutStepValidator.java
2e1c56575ff2f2f5bcc0f3917d06169981f816b2
[]
no_license
rpalacgi/hybris_petshop_v2
60cac5081148a65db03eead3118e06d85cd3e952
449220feebb66a495ca3c23c7707d53b74c1e3e6
refs/heads/master
2021-06-13T01:36:13.345225
2017-04-06T14:01:34
2017-04-06T14:01:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,376
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.petshop.storefront.checkout.steps.validation.impl; import de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.validation.ValidationResults; import de.hybris.platform.acceleratorstorefrontcommons.controllers.util.GlobalMessages; import de.hybris.platform.commercefacades.order.data.CartData; import de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.validation.AbstractCheckoutStepValidator; import org.springframework.web.servlet.mvc.support.RedirectAttributes; public class DefaultSummaryCheckoutStepValidator extends AbstractCheckoutStepValidator { @Override public ValidationResults validateOnEnter(final RedirectAttributes redirectAttributes) { if (!getCheckoutFlowFacade().hasValidCart()) { LOG.info("Missing, empty or unsupported cart"); return ValidationResults.REDIRECT_TO_CART; } if (getCheckoutFlowFacade().hasNoDeliveryAddress()) { GlobalMessages.addFlashMessage(redirectAttributes, GlobalMessages.INFO_MESSAGES_HOLDER, "checkout.multi.deliveryAddress.notprovided"); return ValidationResults.REDIRECT_TO_DELIVERY_ADDRESS; } if (getCheckoutFlowFacade().hasNoDeliveryMode()) { GlobalMessages.addFlashMessage(redirectAttributes, GlobalMessages.INFO_MESSAGES_HOLDER, "checkout.multi.deliveryMethod.notprovided"); return ValidationResults.REDIRECT_TO_DELIVERY_METHOD; } if (getCheckoutFlowFacade().hasNoPaymentInfo()) { GlobalMessages.addFlashMessage(redirectAttributes, GlobalMessages.INFO_MESSAGES_HOLDER, "checkout.multi.paymentDetails.notprovided"); return ValidationResults.REDIRECT_TO_PAYMENT_METHOD; } final CartData cartData = getCheckoutFacade().getCheckoutCart(); if (!getCheckoutFacade().hasShippingItems()) { cartData.setDeliveryAddress(null); } if (!getCheckoutFacade().hasPickUpItems() && cartData.getDeliveryMode().getCode().equals("pickup")) { return ValidationResults.REDIRECT_TO_PICKUP_LOCATION; } return ValidationResults.SUCCESS; } }
[ "redchush@gmail.com" ]
redchush@gmail.com
b0075e8c2cc72b9386be9f83e386fa2e942ded62
74acea1b7f2a3a509b9ead48f186c9349bf55cc8
/framework/src/main/java/com/enjoyf/platform/service/event/EventConstants.java
348a2449d8bdac1fc1b576e477327d9c01910f1c
[]
no_license
liu67224657/besl-platform
6cd2bfcc7320a4039e61b114173d5f350345f799
68c126bea36c289526e0cc62b9d5ce6284353d11
refs/heads/master
2022-04-16T02:23:40.178907
2020-04-17T09:00:01
2020-04-17T09:00:01
109,520,110
1
1
null
null
null
null
UTF-8
Java
false
false
6,521
java
/** * CopyRight 2007 Fivewh.com */ package com.enjoyf.platform.service.event; import com.enjoyf.platform.service.service.TransProfile; import com.enjoyf.platform.service.service.TransProfileContainer; /** * @Auther: <a mailto:yinpengyi@fivewh.com>Yin Pengyi</a> */ public class EventConstants { public static final String SERVICE_SECTION = "eventservice"; public static final String SERVICE_PREFIX = "eventserver"; public static final String SERVICE_TYPE = "eventserver"; // private static TransProfileContainer transProfileContainer = new TransProfileContainer(); public static final byte EVENT_WRITE = 1; public static final byte RECEIVE_TASK_EVENT = 2; public static final byte PAGEVIEW_LOCATION_GET = 11; public static final byte PAGEVIEW_LOCATION_QUERY = 12; // public static final byte PAGEVIEW_STATS_PAGEVIEW = 21; public static final byte PAGEVIEW_STATS_UNIQUEUSER = 22; public static final byte ACTIVITY_CREATE = 23; public static final byte ACTIVITY_MODIFY = 24; public static final byte ACTIVITY_QUERY_BY_PAGE = 25; public static final byte ACTIVITY_GET_BY_ID = 26; public static final byte ACTIVITYLOG_CREATE = 27; public static final byte ACTIVITYLOG_QUERY = 28; public static final byte CREATE_TASK = 29; public static final byte GET_TASK = 30; public static final byte QUERY_TASK = 31; public static final byte QUERY_TASK_BY_PAGE = 32; public static final byte MODIFY_TASK = 33; public static final byte CREATE_TASK_LOG = 34; public static final byte GET_TASK_LOG = 35; public static final byte QUERY_TASK_LOG = 36; public static final byte QUERY_TASK_LOG_BY_PAGE = 37; public static final byte MODIFY_TASK_LOG = 38; public static final byte CREATE_TASK_GROUP = 39; public static final byte GET_TASK_GROUP = 40; public static final byte QUERY_TASK_GROUP = 41; public static final byte MODIFY_TASK_GROUP = 42; public static final byte QUERY_TASK_BY_GROUPID_PROFILEID = 43; public static final byte GET_TASKLOG_BY_GROUPID_PROFILEID = 44; public static final byte CHECK_COMPLETE_TASK = 45; // public static final byte QUERY_TASK_BY_APPKEY_PLATFORM = 46; public static final byte QUERY_TASK_BY_GROUPIDS = 47; public static final byte GET_TASK_AWARD = 48; // public static final byte GET_TASK_AWARD_WANBA_GROUP_ID = 49; public static final byte QUERY_TASKLOG_SIGN_SUM_BY_PROFILEID_GROUPID = 50; public static final byte QUERY_COMPLETE_GROUP_BY_PROFILEID_GROUPID = 51; public static final byte SET_COMPLETE_GROUP_BY_PROFILEID_GROUPID = 52; public static final byte QUERY_TASK_LIST_BY_GROUPID = 53; static { transProfileContainer.put(new TransProfile(EVENT_WRITE, "EVENT_WRITE")); transProfileContainer.put(new TransProfile(RECEIVE_TASK_EVENT, "RECEIVE_TASK_EVENT")); transProfileContainer.put(new TransProfile(PAGEVIEW_LOCATION_GET, "PAGEVIEW_LOCATION_GET")); transProfileContainer.put(new TransProfile(PAGEVIEW_LOCATION_QUERY, "PAGEVIEW_LOCATION_QUERY")); transProfileContainer.put(new TransProfile(PAGEVIEW_STATS_PAGEVIEW, "PAGEVIEW_STATS_PAGEVIEW")); transProfileContainer.put(new TransProfile(PAGEVIEW_STATS_UNIQUEUSER, "PAGEVIEW_STATS_UNIQUEUSER")); transProfileContainer.put(new TransProfile(ACTIVITY_CREATE, "ACTIVITY_CREATE")); transProfileContainer.put(new TransProfile(ACTIVITY_MODIFY, "ACTIVITY_MODIFY")); transProfileContainer.put(new TransProfile(ACTIVITY_QUERY_BY_PAGE, "ACTIVITY_QUERY_BY_PAGE")); transProfileContainer.put(new TransProfile(ACTIVITY_GET_BY_ID, "ACTIVITY_GET_BY_ID")); transProfileContainer.put(new TransProfile(ACTIVITYLOG_CREATE, "ACTIVITYLOG_CREATE")); transProfileContainer.put(new TransProfile(ACTIVITYLOG_QUERY, "ACTIVITYLOG_QUERY")); transProfileContainer.put(new TransProfile(CREATE_TASK, "CREATE_TASK")); transProfileContainer.put(new TransProfile(GET_TASK, "GET_TASK")); transProfileContainer.put(new TransProfile(QUERY_TASK, "QUERY_TASK")); transProfileContainer.put(new TransProfile(QUERY_TASK_BY_PAGE, "QUERY_TASK_BY_PAGE")); transProfileContainer.put(new TransProfile(MODIFY_TASK, "MODIFY_TASK")); transProfileContainer.put(new TransProfile(CREATE_TASK_LOG, "CREATE_TASK_LOG")); transProfileContainer.put(new TransProfile(GET_TASK_LOG, "GET_TASK_LOG")); transProfileContainer.put(new TransProfile(QUERY_TASK_LOG, "QUERY_TASK_LOG")); transProfileContainer.put(new TransProfile(QUERY_TASK_LOG_BY_PAGE, "QUERY_TASK_LOG_BY_PAGE")); transProfileContainer.put(new TransProfile(MODIFY_TASK_LOG, "MODIFY_TASK_LOG")); transProfileContainer.put(new TransProfile(CREATE_TASK_GROUP, "CREATE_TASK_GROUP")); transProfileContainer.put(new TransProfile(GET_TASK_GROUP, "GET_TASK_GROUP")); transProfileContainer.put(new TransProfile(QUERY_TASK_GROUP, "QUERY_TASK_GROUP")); transProfileContainer.put(new TransProfile(MODIFY_TASK_GROUP, "MODIFY_TASK_GROUP")); transProfileContainer.put(new TransProfile(QUERY_TASK_BY_GROUPID_PROFILEID, "QUERY_TASK_BY_GROUPID_PROFILEID")); transProfileContainer.put(new TransProfile(GET_TASKLOG_BY_GROUPID_PROFILEID, "QUERY_TASKLOG_BY_GROUPID_PROFILEID")); transProfileContainer.put(new TransProfile(CHECK_COMPLETE_TASK, "CHECK_COMPLETE_TASK")); // transProfileContainer.put(new TransProfile(QUERY_TASK_BY_APPKEY_PLATFORM, "QUERY_TASK_BY_APPKEY_PLATFORM")); transProfileContainer.put(new TransProfile(QUERY_TASK_BY_GROUPIDS, "QUERY_TASK_BY_GROUPIDS")); transProfileContainer.put(new TransProfile(GET_TASK_AWARD, "GET_TASK_AWARD")); // transProfileContainer.put(new TransProfile(GET_TASK_AWARD_WANBA_GROUP_ID, "GET_TASK_AWARD_WANBA_GROUP_ID")); transProfileContainer.put(new TransProfile(QUERY_TASKLOG_SIGN_SUM_BY_PROFILEID_GROUPID, "QUERY_TASKLOG_SIGN_SUM_BY_PROFILEID_GROUPID")); transProfileContainer.put(new TransProfile(QUERY_COMPLETE_GROUP_BY_PROFILEID_GROUPID, "QUERY_COMPLETE_GROUP_BY_PROFILEID_GROUPID")); transProfileContainer.put(new TransProfile(SET_COMPLETE_GROUP_BY_PROFILEID_GROUPID, "SET_COMPLETE_GROUP_BY_PROFILEID_GROUPID")); transProfileContainer.put(new TransProfile(QUERY_TASK_LIST_BY_GROUPID, "QUERY_TASK_LIST_BY_GROUPID")); } public static TransProfileContainer getTransContainer() { return transProfileContainer; } }
[ "ericliu@staff.joyme.com" ]
ericliu@staff.joyme.com
e292ad59e407d61013cc7b24ded9a15d8cfb9e80
72d75321938b65ec0eb86685f5c539fd6a50a67c
/src/main/java/org/decimal4j/arithmetic/BigIntegerConversion.java
5611ca51fea2220925daf5671fa72e9185296d2f
[ "MIT" ]
permissive
tools4j/decimal4j
01178aef39fefff0174abaae9a98c8d940886f67
a2f36d70c126f9b28b439e9e071f6ff956f06ac0
refs/heads/master
2023-09-02T01:21:25.448872
2022-08-06T05:39:03
2022-08-06T05:39:03
30,149,926
140
19
null
2015-05-26T01:33:34
2015-02-01T15:26:28
Java
UTF-8
Java
false
false
2,279
java
/* * The MIT License (MIT) * * Copyright (c) 2015-2022 decimal4j (tools4j), Marco Terzer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.decimal4j.arithmetic; import java.math.BigInteger; import org.decimal4j.scale.ScaleMetrics; /** * Contains methods to convert from and to {@link BigInteger}. */ final class BigIntegerConversion { /** * Converts the specified big integer value to an unscaled decimal value. An exception is thrown if the value * exceeds the valid Decimal range. * * @param scaleMetrics * the scale metrics of the result value * @param value * the big integer value to convert * @return the decimal value of the scale as defined by {@code ScaleMetrics} * @throws IllegalArgumentException * if the value is outside of the valid Decimal range */ public static final long bigIntegerToUnscaled(ScaleMetrics scaleMetrics, BigInteger value) { if (value.bitLength() <= 63) { return LongConversion.longToUnscaled(scaleMetrics, value.longValue()); } throw new IllegalArgumentException("Overflow: cannot convert " + value + " to Decimal with scale " + scaleMetrics.getScale()); } // no instances private BigIntegerConversion() { super(); } }
[ "terzerm@gmail.com" ]
terzerm@gmail.com
7ed6f67fae7cb94f8e5d64ad548d9d3bd55b9bbc
267a2858bc1823f71ceea66a603d5f880afb9fb8
/app/src/main/java/com/example/smartclass/entity/TodayCourseIDEntity.java
d26d8e789ac80ee01d30c17f49559d5147967b02
[]
no_license
zsp19931222/LiGongApp
ad1d61f352481bb2ebecd059d0674f48e1ab6bef
1bc158c6c615afca490edc9ce229e8ad4f3ff35f
refs/heads/master
2020-03-23T07:21:09.914957
2018-08-13T03:05:27
2018-08-13T03:05:34
141,266,143
0
0
null
null
null
null
UTF-8
Java
false
false
1,101
java
package com.example.smartclass.entity; /** * Created by Administrator on 2018/1/11 0011. */ public class TodayCourseIDEntity { /** * code : 40001 * message : 成功 * content : {"zhktid":"762bdce965784d238b90a56ed6d67ff4"} */ private String code; private String message; private ContentBean content; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public ContentBean getContent() { return content; } public void setContent(ContentBean content) { this.content = content; } public static class ContentBean { /** * zhktid : 762bdce965784d238b90a56ed6d67ff4 */ private String zhktid; public String getZhktid() { return zhktid; } public void setZhktid(String zhktid) { this.zhktid = zhktid; } } }
[ "872126510@qq.com" ]
872126510@qq.com
bd14aae692a96ded09b322c66462cb38acce9ebf
c2fb6846d5b932928854cfd194d95c79c723f04c
/java_backup/my java/soumyadeep_iX_adamas/series2.java
0902cf637874f35027211e4717106a3c4a5d909e
[ "MIT" ]
permissive
Jimut123/code-backup
ef90ccec9fb6483bb6dae0aa6a1f1cc2b8802d59
8d4c16b9e960d352a7775786ea60290b29b30143
refs/heads/master
2022-12-07T04:10:59.604922
2021-04-28T10:22:19
2021-04-28T10:22:19
156,666,404
9
5
MIT
2022-12-02T20:27:22
2018-11-08T07:22:48
Jupyter Notebook
UTF-8
Java
false
false
386
java
import java.util.*; class series2 { public static void main (String args[]) { int j, i; Scanner SC = new Scanner(System.in); System.out.println("Enter the limit: "); int n = SC.nextInt(); for(i=1;i<=n;i++) { int k=97; for(j=1;j<=i;j++) {System.out.print((char)k); k++; } System.out.println(""); } } }
[ "jimutbahanpal@yahoo.com" ]
jimutbahanpal@yahoo.com
902e10a84892400755ccf7eb878f0591fb3fb960
ddb2afa070e2ab1953f6ed14fbe45112b85517a1
/src/main/java/com/mayakplay/payment/validation/AccountExistsById.java
cb8b754e4328411cab9d40dd95810c6252097968
[]
no_license
mayakplay/PaymentService
8ddc2023e68fed9369a18a2c562d7f80cad932ee
5004aa3f4c3c0f5819d59bbdb7971783178e8f06
refs/heads/master
2022-04-19T16:52:25.568308
2020-04-23T12:19:43
2020-04-23T12:19:43
258,189,164
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
package com.mayakplay.payment.validation; import javax.validation.Constraint; import javax.validation.Payload; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @SuppressWarnings("unused") @Target({ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Constraint(validatedBy = AccountExistsByIdConstraintValidator.class) public @interface AccountExistsById { String message() default "Аккаунт не существует"; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
dd6ae3d4ce0cc81119c2244ac8991be9797114e1
5fd010782dad2fab44b0a11fd6069ef16edc6b6e
/07-CART/CartGateway/src/com/farbig/cart/services/gateway/GatewayMDB.java
9b774c880c137d69b8bba0c758e41139bf43f0a3
[]
no_license
harrhys/ECLIPSE_WS
49c3c5eb7cde2994cfcc59007288a0d10a47b130
3acfcad03a1c2020f4ec45d26dd163dc9bde69e8
refs/heads/master
2022-11-30T09:58:37.640705
2020-08-13T04:05:24
2020-08-13T04:05:24
276,666,955
0
0
null
null
null
null
UTF-8
Java
false
false
1,928
java
package com.farbig.cart.services.gateway; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.ObjectMessage; import com.farbig.cart.services.gateway.util.GatewayConstants; import com.farbig.cart.services.gateway.util.GatewayMessage; import com.farbig.cart.services.gateway.util.ReturnHandlerService; import com.farbig.cart.services.gateway.util.ServiceHelper; import com.farbig.cart.services.gateway.util.ServiceProxy; /** * Message-Driven Bean implementation class for: GatewayMDB */ @MessageDriven(mappedName = "CARTJMSDQ", activationConfig = { @ActivationConfigProperty(propertyName = "destination", propertyValue = "CARTJMSDQ"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) public class GatewayMDB implements MessageListener { /** * Default constructor. */ public GatewayMDB() { } /** * @see MessageListener#onMessage(Message) */ public void onMessage(Message message) { ObjectMessage msg = null; try { System.out.println("Message Recived.."); msg = (ObjectMessage) message; GatewayMessage request = (GatewayMessage) msg.getObject(); System.out.println(request .get(GatewayConstants.MESSAGE_PARAMETER_SERVICE_NAME)); Object resp = ServiceProxy.callService(request); Class srcServiceClass = Class.forName(request.get( GatewayConstants.MESSAGE_PARAMETER_SOURCE_SERVICE_NAME) .toString()); Object proxy = ServiceHelper.getServiceProxy(srcServiceClass); if (proxy instanceof ReturnHandlerService) { ReturnHandlerService srcService = (ReturnHandlerService) proxy; srcService.handleReturnService(request, resp); } //message.acknowledge(); } catch (JMSException e) { e.printStackTrace(); } catch (Throwable e) { e.printStackTrace(); } } }
[ "harrhys@gmail.com" ]
harrhys@gmail.com
d7ddf42460c8ef206c9af2381a01355077ebf195
63f751519e64ac067e11189edaf6a34aeb3e5dba
/2.JavaCore/src/com/javarush/task/task12/task1225/Solution.java
2e389392277820e1ee59c3c6b45188a40f2760e6
[]
no_license
sharygin-vic/JavaRushTasks
8507b96c2103828be4c8c3de29f6ad446b33b9df
88e383a10a64286a2750bd67ec7f27d1a10a21dd
refs/heads/master
2021-01-21T18:25:20.400669
2017-08-01T22:50:45
2017-08-01T22:50:45
92,046,759
1
0
null
null
null
null
UTF-8
Java
false
false
1,324
java
package com.javarush.task.task12.task1225; /* Что это? «Кот», «Тигр», «Лев», «Бык», «Корова», «Животное» */ public class Solution { public static void main(String[] args) { System.out.println(getObjectType(new Cat())); System.out.println(getObjectType(new Tiger())); System.out.println(getObjectType(new Lion())); System.out.println(getObjectType(new Bull())); System.out.println(getObjectType(new Cow())); System.out.println(getObjectType(new Animal())); } public static String getObjectType(Object o) { //напишите тут ваш код if (o instanceof Lion) return "Лев"; else if (o instanceof Tiger) return "Тигр"; else if (o instanceof Cat) return "Кот"; else if (o instanceof Bull) return "Бык"; else if (o instanceof Cow) return "Корова"; else return "Животное"; } public static class Cat extends Animal //<--Классы наследуются!! { } public static class Tiger extends Cat { } public static class Lion extends Cat { } public static class Bull extends Animal { } public static class Cow extends Animal { } public static class Animal { } }
[ "lasprog@mail.ru" ]
lasprog@mail.ru
44de37a2c1e2ab804892797fdb5821e48585ac13
a3e9577a3a63746c0f80363fe3a472945ff8d0c3
/src/main/java/com/calsched/config/AsyncConfiguration.java
2972f49f7110843fd6156e5f5d9b43af41901a33
[]
no_license
aravindsaraff/calendar-scheduler
41690291fabfeb5f7b38fafe36e8c6162235e233
e6a9e57c52869b72a14275493d20f15abfee335a
refs/heads/main
2023-05-08T18:32:58.910441
2021-05-31T04:15:07
2021-05-31T04:15:07
372,379,570
0
0
null
null
null
null
UTF-8
Java
false
false
1,990
java
package com.calsched.config; import java.util.concurrent.Executor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.boot.autoconfigure.task.TaskExecutionProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import tech.jhipster.async.ExceptionHandlingAsyncTaskExecutor; @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer { private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); private final TaskExecutionProperties taskExecutionProperties; public AsyncConfiguration(TaskExecutionProperties taskExecutionProperties) { this.taskExecutionProperties = taskExecutionProperties; } @Override @Bean(name = "taskExecutor") public Executor getAsyncExecutor() { log.debug("Creating Async Task Executor"); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(taskExecutionProperties.getPool().getCoreSize()); executor.setMaxPoolSize(taskExecutionProperties.getPool().getMaxSize()); executor.setQueueCapacity(taskExecutionProperties.getPool().getQueueCapacity()); executor.setThreadNamePrefix(taskExecutionProperties.getThreadNamePrefix()); return new ExceptionHandlingAsyncTaskExecutor(executor); } @Override public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { return new SimpleAsyncUncaughtExceptionHandler(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0c64fd69afd4609278a3affd2c870720392f2621
700844af879b3b23e1eafa4b3e3caec1a3fc8b0e
/core/src/main/java/com/google/errorprone/bugpatterns/MissingDefault.java
8ccc9c56becf18d2e48213aa17d1018111157185
[ "Apache-2.0" ]
permissive
liuyong240/error-prone
6d22c77611d4dbb8baf9479c6b6da5e6de008894
786684b6fb391864db6d74b08235f2283f4f55d0
refs/heads/master
2021-01-19T17:14:45.985927
2017-02-18T01:32:05
2017-02-18T03:46:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,900
java
/* * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.bugpatterns; import static com.google.common.collect.Iterables.getLast; import static com.google.errorprone.BugPattern.Category.JDK; import static com.google.errorprone.BugPattern.SeverityLevel.WARNING; import static com.google.errorprone.matchers.Description.NO_MATCH; import com.google.errorprone.BugPattern; import com.google.errorprone.VisitorState; import com.google.errorprone.bugpatterns.BugChecker.SwitchTreeMatcher; import com.google.errorprone.fixes.SuggestedFix; import com.google.errorprone.matchers.Description; import com.google.errorprone.util.ASTHelpers; import com.google.errorprone.util.ErrorProneTokens; import com.sun.source.tree.CaseTree; import com.sun.source.tree.SwitchTree; import com.sun.tools.javac.code.Type; import com.sun.tools.javac.tree.JCTree; import java.util.Optional; import javax.lang.model.element.ElementKind; /** @author cushon@google.com (Liam Miller-Cushon) */ @BugPattern( name = "MissingDefault", category = JDK, summary = "The Google Java Style Guide requires each switch statement includes a default statement" + " group, even if it contains no code.", severity = WARNING ) public class MissingDefault extends BugChecker implements SwitchTreeMatcher { @Override public Description matchSwitch(SwitchTree tree, VisitorState state) { Type switchType = ASTHelpers.getType(tree.getExpression()); if (switchType.asElement().getKind() == ElementKind.ENUM) { // enum switches can omit the default if they're exhaustive, which is enforced separately // by MissingCasesInEnumSwitch return NO_MATCH; } Optional<? extends CaseTree> maybeDefault = tree.getCases().stream().filter(c -> c.getExpression() == null).findFirst(); if (!maybeDefault.isPresent()) { Description.Builder description = buildDescription(tree); if (!tree.getCases().isEmpty()) { // Inserting the default after the last case is easier than finding the closing brace // for the switch statement. Hopefully we don't often see switches with zero cases. description.addFix( SuggestedFix.postfixWith(getLast(tree.getCases()), "\ndefault: // fall out\n")); } return description.build(); } CaseTree defaultCase = maybeDefault.get(); if (!defaultCase.getStatements().isEmpty()) { return NO_MATCH; } int idx = tree.getCases().indexOf(defaultCase); // The default case may appear before a non-default case, in which case the documentation // should say "fall through" instead of "fall out". boolean isLast = idx == tree.getCases().size() - 1; int end = isLast ? state.getEndPosition(tree) : ((JCTree) tree.getCases().get(idx + 1)).getStartPosition(); if (ErrorProneTokens.getTokens( state.getSourceCode().subSequence(state.getEndPosition(defaultCase), end).toString(), state.context) .stream() .anyMatch(t -> !t.comments().isEmpty())) { return NO_MATCH; } return buildDescription(defaultCase) .setMessage("Default case should be documented with a comment") .addFix(SuggestedFix.postfixWith(defaultCase, isLast ? " // fall out" : " // fall through")) .build(); } }
[ "cushon@google.com" ]
cushon@google.com
30c048db7a57d68f3887994366f1749f2ec6410f
af7b8bbe77461e59f32ba746f4bb055620a5c110
/dubbo/dubbo-demo/src/main/java/com/hz/yk/dubbo/provider/api/service/LogService.java
29ecf55c9493b50ad08412c545c788fae274334f
[]
no_license
ykdsg/MyJavaProject
3e51564a3fb57ab4ae043c9112e1936ccc179dd5
a7d88aee2f58698aed7d497c2cf6e23a605ebb59
refs/heads/master
2023-06-26T02:23:33.812330
2023-06-12T11:28:23
2023-06-12T11:28:23
1,435,034
4
6
null
2022-12-01T15:21:01
2011-03-03T13:30:03
Java
UTF-8
Java
false
false
213
java
package com.hz.yk.dubbo.provider.api.service; import com.hz.yk.dubbo.provider.api.model.LogReq; /** * @author wuzheng.yk * @date 2018/11/8 */ public interface LogService { Long create(LogReq logReq); }
[ "17173as@163.com" ]
17173as@163.com
97a55592ed3a84f4a4e9c0f27c53c6b116eedcf7
ebfff291a6ee38646c4d4e176f5f2eddf390ace4
/orange-demo-multi/orange-demo-multi-service/application/course-class/course-class-api/src/main/java/com/orange/demo/courseclassapi/vo/ClassCourseVo.java
c4c01062eaf9748564dbc2c46b33f5b92b067e5f
[ "Apache-2.0" ]
permissive
jiazhizhong/orange-admin
a9d6b5b97cbea72e8fcb55c081b7dc6a523847df
bbe737d540fb670fd4ed5514f7faed4f076ef3d4
refs/heads/master
2023-08-21T11:31:22.188591
2021-10-30T06:06:40
2021-10-30T06:06:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package com.orange.demo.courseclassapi.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * ClassCourseVO视图对象。 * * @author Jerry * @date 2020-08-08 */ @ApiModel("ClassCourseVO视图对象") @Data public class ClassCourseVo { /** * 班级Id。 */ @ApiModelProperty(value = "班级Id") private Long classId; /** * 课程Id。 */ @ApiModelProperty(value = "课程Id") private Long courseId; /** * 课程顺序(数值越小越靠前)。 */ @ApiModelProperty(value = "课程顺序(数值越小越靠前)") private Integer courseOrder; }
[ "707344974@qq.com" ]
707344974@qq.com
35447c06f6a3dce9b26f3756a9d3f653c58a4d28
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_1a6b8b5bf3c33e342260758dce26b187510edd17/LastFMTest/26_1a6b8b5bf3c33e342260758dce26b187510edd17_LastFMTest_t.java
9888f2ffd0b8359a6f73dcfac24ef89c8b1e5ce2
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,761
java
package nl.vincentkriek.lastfm; import java.io.IOException; import org.json.JSONException; import android.app.WallpaperManager; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Handler; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.PreferenceActivity; import android.preference.Preference.OnPreferenceClickListener; import android.util.Log; import android.widget.Toast; public class LastFMTest extends PreferenceActivity { public static final String TAG = "nl.vincentkriek.lastfm.LastFMTest"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.settings); Preference setNow = findPreference("set_now"); setNow.setOnPreferenceClickListener(setNowListener); CheckBoxPreference enableTimer = (CheckBoxPreference)findPreference("refresh"); enableTimer.setOnPreferenceChangeListener(enableTimerListener); } private OnPreferenceClickListener setNowListener = new OnPreferenceClickListener() { public boolean onPreferenceClick(Preference preference) { setWallpaperTask.run(); return true; } }; private OnPreferenceChangeListener enableTimerListener = new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { Boolean isChecked = (Boolean)newValue; ((CheckBoxPreference)preference).setChecked(isChecked); handler.removeCallbacks(setWallpaperTask); if(isChecked) { handler.postDelayed(setWallpaperTask, 100); } return false; } }; private Handler handler = new Handler(); private Runnable setWallpaperTask = new Runnable() { public void run() { EditTextPreference user = (EditTextPreference)findPreference("username"); Bitmap background; try { background = LastFM.getAlbumArtByUser(user.getText().toString()); WallpaperManager.getInstance(getApplicationContext()).setBitmap(background); } catch (JSONException e) { Log.e(TAG, e.getMessage()); } catch (IOException e) { Log.e(TAG, e.getMessage()); } EditTextPreference intervalPreference = (EditTextPreference)findPreference("interval"); String interval_string = intervalPreference.getText(); int interval = Integer.parseInt(interval_string); handler.postDelayed(setWallpaperTask, (interval * 60 * 60) * 1000); } }; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c483e78fbc7634931e0f65dd4e9838d942bff395
c4623aa95fb8cdd0ee1bc68962711c33af44604e
/src/com/yelp/android/ui/util/r.java
21fb920f8635e70e99baf2b9ec56697a23745d67
[]
no_license
reverseengineeringer/com.yelp.android
48f7f2c830a3a1714112649a6a0a3110f7bdc2b1
b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8
refs/heads/master
2021-01-19T02:07:25.997811
2016-07-19T16:37:24
2016-07-19T16:37:24
38,555,675
1
0
null
null
null
null
UTF-8
Java
false
false
2,949
java
package com.yelp.android.ui.util; import android.animation.ValueAnimator; import android.content.res.Resources; import android.view.MotionEvent; import android.view.View; import com.yelp.android.appdata.AppData; import java.util.Arrays; import java.util.Iterator; import java.util.List; public class r extends ad { private List<View> a; private float b = AppData.b().getResources().getDimension(2131361892); private boolean c; private float d; public r(View paramView1, View paramView2, View... paramVarArgs) { super(paramView1, paramView2); a = Arrays.asList(paramVarArgs); d = o.getTranslationY(); } protected void a() { c = false; } protected void a(float paramFloat) { o.setTranslationY(-paramFloat); Iterator localIterator = a.iterator(); while (localIterator.hasNext()) { ((View)localIterator.next()).setTranslationY(-paramFloat); } } public void b() { a(0.0F); d(); } public void b(float paramFloat) { if (o.getTranslationY() == -b) {} do { return; if (o.getTranslationY() > -b) { a(Math.abs(d - paramFloat)); } } while (o.getTranslationY() > -b); a(b); a(); d = o.getTranslationY(); } public void c() { a(b); a(); } public void c(float paramFloat) { if (o.getTranslationY() == 0.0F) {} do { return; if (o.getTranslationY() < 0.0F) { a(-d - paramFloat); } } while (o.getTranslationY() < 0.0F); a(0.0F); d(); } protected void d() { c = false; } protected void e() { if (c) { return; } ValueAnimator localValueAnimator = ValueAnimator.ofFloat(new float[] { -o.getTranslationY(), b }).setDuration(av.a); localValueAnimator.addUpdateListener(new r.1(this)); localValueAnimator.addListener(new r.2(this)); c = true; localValueAnimator.start(); } public void f() { if (c) { return; } ValueAnimator localValueAnimator = ValueAnimator.ofFloat(new float[] { -o.getTranslationY(), 0.0F }).setDuration(av.a); localValueAnimator.addUpdateListener(new r.3(this)); localValueAnimator.addListener(new r.4(this)); c = true; localValueAnimator.start(); } protected void g() { d = o.getTranslationY(); } public boolean onTouch(View paramView, MotionEvent paramMotionEvent) { switch (paramMotionEvent.getAction()) { } for (;;) { return super.onTouch(paramView, paramMotionEvent); if ((-o.getTranslationY() > b / 1.25D) && (-o.getTranslationY() != b)) { e(); } else if ((-o.getTranslationY() != b) && (o.getTranslationY() != 0.0F)) { f(); continue; d = o.getTranslationY(); } } } } /* Location: * Qualified Name: com.yelp.android.ui.util.r * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
80a97d09da70adec4d17cd046f1ab54d5229b127
022d4f81f6a8cf58d6d7cb14c876bc8bfe961cd8
/test/level19/lesson05/task02/Solution.java
844f8775bc096f36a0cde650ccb21d9508636d2f
[]
no_license
SergiiShukaiev/JavaRush
85a69eab172653bd98a0c92149543c10eb60b7f8
28d0b787631e8f570a3f2023803044019f5149d8
refs/heads/master
2021-04-29T06:06:39.535115
2017-01-04T11:12:00
2017-01-04T11:12:00
77,604,670
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package com.javarush.test.level19.lesson05.task02; /* Считаем слово Считать с консоли имя файла. Файл содержит слова, разделенные знаками препинания. Вывести в консоль количество слов "world", которые встречаются в файле. Закрыть потоки. Не использовать try-with-resources */ import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); FileReader input=new FileReader(reader.readLine()); reader.close(); char current=' '; String str=""; int count=0; while(input.ready()){ current=(char)input.read(); str=str+current; } String replaceStr=str.replaceAll("\\p{P}"," ").toLowerCase(); replaceStr=replaceStr.replaceAll("\\s", " "); String[] rS=replaceStr.split(" "); for(String s:rS){ if(s.equals("world")) count++; } System.out.println(count); input.close(); } }
[ "Sergii" ]
Sergii
2e322fe686f40dbe3fe47f465fdf11334a389feb
ab3eccd0be02fb3ad95b02d5b11687050a147bce
/apis/browser-api/src/main/java/fr/lteconsulting/jsinterop/browser/MapConstructor.java
3dad5f8904f72fa7239185ec6c1de61563d63661
[]
no_license
ibaca/typescript2java
263fd104a9792e7be2a20ab95b016ad694a054fe
0b71b8a3a4c43df1562881f0816509ca4dafbd7e
refs/heads/master
2021-04-27T10:43:14.101736
2018-02-23T11:37:16
2018-02-23T11:37:18
122,543,398
0
0
null
2018-02-22T22:33:30
2018-02-22T22:33:29
null
UTF-8
Java
false
false
720
java
package fr.lteconsulting.jsinterop.browser; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; /** * base type: MapConstructor * flags: 32768 * declared in: apis/browser-api/tsd/lib.es6.d.ts:215354 * declared in: apis/browser-api/tsd/lib.es6.d.ts:219784 * */ @JsType(isNative=true, namespace=JsPackage.GLOBAL, name="MapConstructor") public class MapConstructor { /* Properties */ public Map<Object, Object> prototype; @JsProperty( name = "prototype") public native Map<Object, Object> getPrototype(); @JsProperty( name = "prototype") public native void setPrototype( Map<Object, Object> value ); }
[ "ltearno@gmail.com" ]
ltearno@gmail.com
903d6dc2e9b0dbeb238a2e249eb5c592700a0a46
dffa08c41685bdb6fb523bda03f3970e360bbd94
/src/main/java/org/dominokit/domino/ui/media/MediaObject.java
7fa1213aa347a1a9fbefe068e189b9f9f61ef599
[ "Apache-2.0" ]
permissive
gitter-badger/domino-ui
cdca25cc36f9442e3237da8e56e2e2baf4533987
c8621b5fe619fe2768cf7dc708d142ecc077cc3a
refs/heads/master
2020-03-19T07:15:46.118794
2018-06-03T19:39:44
2018-06-03T19:39:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,936
java
package org.dominokit.domino.ui.media; import org.dominokit.domino.ui.utils.ElementUtil; import elemental2.dom.HTMLDivElement; import elemental2.dom.HTMLHeadingElement; import elemental2.dom.Node; import org.jboss.gwt.elemento.core.IsElement; import org.jboss.gwt.elemento.template.DataElement; import org.jboss.gwt.elemento.template.Templated; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static org.jboss.gwt.elemento.core.Elements.div; @Templated public abstract class MediaObject implements IsElement<HTMLDivElement> { @DataElement HTMLDivElement mediaBody; @DataElement HTMLHeadingElement mediaHeader; private HTMLDivElement leftMedia; private HTMLDivElement rightMedia; private MediaAlign leftAlign = MediaAlign.TOP; private MediaAlign rightAlign = MediaAlign.TOP; public static MediaObject create() { return new Templated_MediaObject(); } public MediaObject setHeader(String header) { mediaHeader.textContent = header; return this; } public MediaObject setLeftMedia(Node content) { if (isNull(leftMedia)) { leftMedia = div().css("media-left").asElement(); asElement().insertBefore(leftMedia, mediaBody); } ElementUtil.clear(leftMedia); leftMedia.appendChild(content); return this; } public MediaObject setRightMedia(Node content) { if (isNull(rightMedia)) { rightMedia = div().css("media-right").asElement(); asElement().appendChild(rightMedia); } ElementUtil.clear(rightMedia); rightMedia.appendChild(content); return this; } public MediaObject appendContent(Node content) { mediaBody.appendChild(content); return this; } public MediaObject alignLeftMedia(MediaAlign align) { if (nonNull(leftMedia)) { leftMedia.classList.remove(leftAlign.style); leftMedia.classList.add(align.style); this.leftAlign = align; } return this; } public MediaObject alignRightMedia(MediaAlign align) { if (nonNull(rightMedia)) { rightMedia.classList.remove(rightAlign.style); rightMedia.classList.add(align.style); this.rightAlign = align; } return this; } public HTMLDivElement getMediaBody() { return mediaBody; } public HTMLHeadingElement getMediaHeader() { return mediaHeader; } public HTMLDivElement getLeftMedia() { return leftMedia; } public HTMLDivElement getRightMedia() { return rightMedia; } public enum MediaAlign { MIDDLE("media-middle"), BOTTOM("media-bottom"), TOP("media-top"); private final String style; MediaAlign(String style) { this.style = style; } } }
[ "akabme@gmail.com" ]
akabme@gmail.com
d65a8a5e408a887280a64d28e0a34e89bd60060c
9358108f386b8c718f10c0150043f3af60e64712
/integrella-microservices-producer-fpml/src/main/java/com/integrella/fpML/schema/CollateralResponseReason.java
5fac33e9f4b898c68f359c72257cc091514394ea
[]
no_license
kashim-git/integrella-microservices
6148b7b1683ff6b787ff5d9dba7ef0b15557caa4
f92d6a2ea818267364f90f2f1b2d373fbab37cfc
refs/heads/master
2021-01-20T02:53:03.118896
2017-04-28T13:31:55
2017-04-28T13:31:55
89,459,083
0
0
null
null
null
null
UTF-8
Java
false
false
3,717
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.04.26 at 04:37:38 PM BST // package com.integrella.fpML.schema; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementRefs; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CollateralResponseReason complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="CollateralResponseReason"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;choice> * &lt;sequence> * &lt;element name="reasonCode" type="{http://www.fpml.org/FpML-5/master}CollateralResponseReasonCode"/> * &lt;element name="description" type="{http://www.fpml.org/FpML-5/master}String" minOccurs="0"/> * &lt;/sequence> * &lt;element name="description" type="{http://www.fpml.org/FpML-5/master}String"/> * &lt;/choice> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CollateralResponseReason", propOrder = { "content" }) public class CollateralResponseReason { @XmlElementRefs({ @XmlElementRef(name = "description", namespace = "http://www.fpml.org/FpML-5/master", type = JAXBElement.class, required = false), @XmlElementRef(name = "reasonCode", namespace = "http://www.fpml.org/FpML-5/master", type = JAXBElement.class, required = false) }) protected List<JAXBElement<?>> content; /** * Gets the rest of the content model. * * <p> * You are getting this "catch-all" property because of the following reason: * The field name "Description" is used by two different parts of a schema. See: * line 241 of file:/C:/DEV/git/integrella/integrella-microservices-producer-fpml/src/main/xsd/schema/fpml-collateral-processes.xsd * line 239 of file:/C:/DEV/git/integrella/integrella-microservices-producer-fpml/src/main/xsd/schema/fpml-collateral-processes.xsd * <p> * To get rid of this property, apply a property customization to one * of both of the following declarations to change their names: * Gets the value of the content property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the content property. * * <p> * For example, to add a new item, do as follows: * <pre> * getContent().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link CollateralResponseReasonCode }{@code >} * * */ public List<JAXBElement<?>> getContent() { if (content == null) { content = new ArrayList<JAXBElement<?>>(); } return this.content; } }
[ "Kashim@192.168.47.69" ]
Kashim@192.168.47.69
82877b812ee03a4b2b1316c1ca00375bc65367fd
5b6917820c2b3b13d98da5aab92551457b5094c8
/AndroidCommon/src/oz/common/toast/niftynotification/effects/BaseEffect.java
7cdd1e80de4e2f70c3532c3e6a266e0cd6b7e8c1
[]
no_license
ozcoco/android-pro
72d8355827e0885c2dddec2418466302aa0eb57c
9191ebc721c0b9c6451d6f55bea4978c67929ec3
refs/heads/master
2021-05-29T01:36:40.583624
2015-05-14T09:40:52
2015-05-14T09:40:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,946
java
package oz.common.toast.niftynotification.effects; /* * Copyright 2014 gitonway * * 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. */ import oz.common.toast.niftynotification.Configuration; import android.view.View; import com.nineoldandroids.animation.AnimatorSet; import com.nineoldandroids.view.ViewHelper; public abstract class BaseEffect { public static final int DURATION; static { DURATION = Configuration.ANIM_DURATION; } public long mDuration=DURATION ; private AnimatorSet mAnimatorSet; { mAnimatorSet = new AnimatorSet(); } protected abstract void setInAnimation(View view); protected abstract void setOutAnimation(View view); protected abstract long getAnimDuration(long duration); public void in(View view) { reset(view); setInAnimation(view); mAnimatorSet.start(); } public void out(View view) { reset(view); setOutAnimation(view); mAnimatorSet.start(); } public void reset(View view) { ViewHelper.setPivotX(view, view.getWidth() / 2.0f); ViewHelper.setPivotY(view, view.getHeight() / 2.0f); } public BaseEffect setDuration(long duration) { this.mDuration = duration; return this; } public long getDuration(){ return getAnimDuration(mDuration); } public AnimatorSet getAnimatorSet() { return mAnimatorSet; } }
[ "857527916@qq.com" ]
857527916@qq.com
f82b156ddb7db92fdf1a0318c825c7f360365495
04a12720462c0cfce091e25b8cdaedb13f921b61
/javaAdvance/day06-Collections,Set,Map,斗地主排序/代码/day06_02Set接口/src/com/itheima04TreeSet存储自定义元素/Teacher.java
b0acdaba8945b70cc05c0bead22ab88f995a67d9
[]
no_license
haoxiangjiao/Java20210921
31662732e44b248208b21f6f1aaf18e6335b398c
6edcbd081d33bace427fdc6041e9eeaac89def8a
refs/heads/main
2023-07-19T03:42:17.498075
2021-09-25T15:06:11
2021-09-25T15:06:11
409,024,583
0
0
null
2021-09-22T01:19:43
2021-09-22T01:19:43
null
UTF-8
Java
false
false
714
java
package com.itheima04TreeSet存储自定义元素; public class Teacher { private String name; private int age; public Teacher() { } public Teacher(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public String toString() { return "Teacher{" + "name='" + name + '\'' + ", age=" + age + '}'; } }
[ "70306977+liufanpy@users.noreply.github.com" ]
70306977+liufanpy@users.noreply.github.com
a87a4843fdc2f2920413e624eae1a25ea67090d0
fbeeb4cc331c5618ff96e15dfe91bc5271a3b687
/workspace/demos/demo-dolphin/src/java/com/xt/gt/demo/po/NewMain.java
d3b4485c11ed61140c0db5bcc9146375c889cd58
[]
no_license
AlbertZheng66/B-Cloud
3d01bd1708455548bd169bb9d74f85cba9fd2f6b
a3f8d380b6a9e08005c56122a505e2fd19ff2a6a
refs/heads/master
2021-01-22T07:38:59.181855
2015-02-09T07:58:17
2015-02-09T07:58:17
29,894,799
0
0
null
null
null
null
UTF-8
Java
false
false
397
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.xt.gt.demo.po; /** * * @author albert */ public class NewMain { /** * @param args the command line arguments */ public static void main(String[] args) { Object[] bs = new Object[12]; System.out.println("bs=" + bs.getClass().getName()); } }
[ "albert_zheng66@hotmail.com" ]
albert_zheng66@hotmail.com
c9a6d4b8325db7635a405f4cf0e77a868d021fe6
7d273fda87d2fd5aa8ce8233254cfb1d2da18fc0
/com/jidesoft/plaf/vsnet/HeaderCellBorder.java
acc7e46f306b3c4b9b82ee1b87092c93ac19adf3
[]
no_license
fusionmc-evilscoop/FusionInstalle.Src
493f3a471d9e8e05cc4fda6aca48f030770e2271
2051a55e65ebaaacffb8d0eafe44d28d55a566e1
refs/heads/master
2020-05-31T19:59:37.516487
2012-08-29T09:59:06
2012-08-29T09:59:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,284
java
/* */ package com.jidesoft.plaf.vsnet; /* */ /* */ import java.awt.Color; /* */ import java.awt.Component; /* */ import java.awt.Graphics; /* */ import java.awt.Insets; /* */ import javax.swing.border.Border; /* */ import javax.swing.plaf.UIResource; /* */ /* */ public class HeaderCellBorder /* */ implements Border, UIResource /* */ { /* */ public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) /* */ { /* 20 */ g.setColor(new Color(0, 0, 0, 27)); /* 21 */ g.drawLine(0, height - 3, width, height - 3); /* */ /* 23 */ g.setColor(new Color(0, 0, 0, 37)); /* 24 */ g.drawLine(0, height - 2, width, height - 2); /* */ /* 26 */ g.setColor(new Color(0, 0, 0, 52)); /* 27 */ g.drawLine(0, height - 1, width, height - 1); /* 28 */ g.drawLine(width - 1, 0, width - 1, height - 1); /* */ } /* */ /* */ public Insets getBorderInsets(Component c) { /* 32 */ return new Insets(0, 0, 3, 1); /* */ } /* */ /* */ public boolean isBorderOpaque() { /* 36 */ return false; /* */ } /* */ } /* Location: D:\test\Fusion Installer.jar * Qualified Name: com.jidesoft.plaf.vsnet.HeaderCellBorder * JD-Core Version: 0.6.0 */
[ "evilscoop@gmail.com" ]
evilscoop@gmail.com
9aee232257c65909c41cc5b3359e9e3a1afd961d
447520f40e82a060368a0802a391697bc00be96f
/apks/comparison_androart/GROUPE SOCIETE GENERALE SA/source/com/google/android/gms/plus/PlusClient.java
61776457b9b4c0ee2b7a9cd8c64d39c02e107c1e
[ "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
7,066
java
package com.google.android.gms.plus; import android.content.Context; import android.net.Uri; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesClient; import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks; import com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener; import com.google.android.gms.internal.bt; import com.google.android.gms.plus.model.moments.Moment; import com.google.android.gms.plus.model.moments.MomentBuffer; import com.google.android.gms.plus.model.people.Person; import com.google.android.gms.plus.model.people.PersonBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; public class PlusClient implements GooglePlayServicesClient { @Deprecated public static final String KEY_REQUEST_VISIBLE_ACTIVITIES = "request_visible_actions"; final bt hU; PlusClient(bt paramBt) { this.hU = paramBt; } bt bu() { return this.hU; } public void clearDefaultAccount() { this.hU.clearDefaultAccount(); } public void connect() { this.hU.connect(); } public void disconnect() { this.hU.disconnect(); } public String getAccountName() { return this.hU.getAccountName(); } public Person getCurrentPerson() { return this.hU.getCurrentPerson(); } public boolean isConnected() { return this.hU.isConnected(); } public boolean isConnecting() { return this.hU.isConnecting(); } public boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks) { return this.hU.isConnectionCallbacksRegistered(paramConnectionCallbacks); } public boolean isConnectionFailedListenerRegistered(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener) { return this.hU.isConnectionFailedListenerRegistered(paramOnConnectionFailedListener); } public void loadMoments(OnMomentsLoadedListener paramOnMomentsLoadedListener) { this.hU.loadMoments(paramOnMomentsLoadedListener); } public void loadMoments(OnMomentsLoadedListener paramOnMomentsLoadedListener, int paramInt, String paramString1, Uri paramUri, String paramString2, String paramString3) { this.hU.loadMoments(paramOnMomentsLoadedListener, paramInt, paramString1, paramUri, paramString2, paramString3); } public void loadPeople(OnPeopleLoadedListener paramOnPeopleLoadedListener, Collection<String> paramCollection) { this.hU.a(paramOnPeopleLoadedListener, paramCollection); } public void loadPeople(OnPeopleLoadedListener paramOnPeopleLoadedListener, String... paramVarArgs) { this.hU.a(paramOnPeopleLoadedListener, paramVarArgs); } public void loadVisiblePeople(OnPeopleLoadedListener paramOnPeopleLoadedListener, int paramInt, String paramString) { this.hU.loadVisiblePeople(paramOnPeopleLoadedListener, paramInt, paramString); } public void loadVisiblePeople(OnPeopleLoadedListener paramOnPeopleLoadedListener, String paramString) { this.hU.loadVisiblePeople(paramOnPeopleLoadedListener, paramString); } public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks) { this.hU.registerConnectionCallbacks(paramConnectionCallbacks); } public void registerConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener) { this.hU.registerConnectionFailedListener(paramOnConnectionFailedListener); } public void removeMoment(String paramString) { this.hU.removeMoment(paramString); } public void revokeAccessAndDisconnect(OnAccessRevokedListener paramOnAccessRevokedListener) { this.hU.revokeAccessAndDisconnect(paramOnAccessRevokedListener); } public void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks) { this.hU.unregisterConnectionCallbacks(paramConnectionCallbacks); } public void unregisterConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener) { this.hU.unregisterConnectionFailedListener(paramOnConnectionFailedListener); } public void writeMoment(Moment paramMoment) { this.hU.writeMoment(paramMoment); } public static class Builder { private GooglePlayServicesClient.OnConnectionFailedListener e; private String g; private GooglePlayServicesClient.ConnectionCallbacks hV; private ArrayList<String> hW; private String[] hX; private String[] hY; private String hZ; private String ia; private String ib; private Context mContext; public Builder(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener) { this.mContext = paramContext; this.hV = paramConnectionCallbacks; this.e = paramOnConnectionFailedListener; this.hW = new ArrayList(); this.ia = this.mContext.getPackageName(); this.hZ = this.mContext.getPackageName(); this.hW.add("https://www.googleapis.com/auth/plus.login"); } public PlusClient build() { if (this.g == null) { this.g = "<<default account>>"; } Object localObject = (String[])this.hW.toArray(new String[this.hW.size()]); localObject = new a(this.g, (String[])localObject, this.hX, this.hY, this.hZ, this.ia, this.ib); return new PlusClient(new bt(this.mContext, (a)localObject, this.hV, this.e)); } public Builder clearScopes() { this.hW.clear(); return this; } public Builder setAccountName(String paramString) { this.g = paramString; return this; } public Builder setActions(String... paramVarArgs) { this.hX = paramVarArgs; return this; } public Builder setScopes(String... paramVarArgs) { this.hW.clear(); this.hW.addAll(Arrays.asList(paramVarArgs)); return this; } @Deprecated public Builder setVisibleActivities(String... paramVarArgs) { setActions(paramVarArgs); return this; } } public static abstract interface OnAccessRevokedListener { public abstract void onAccessRevoked(ConnectionResult paramConnectionResult); } public static abstract interface OnMomentsLoadedListener { public abstract void onMomentsLoaded(ConnectionResult paramConnectionResult, MomentBuffer paramMomentBuffer, String paramString1, String paramString2); } public static abstract interface OnPeopleLoadedListener { public abstract void onPeopleLoaded(ConnectionResult paramConnectionResult, PersonBuffer paramPersonBuffer, String paramString); } public static abstract interface OrderBy { public static final int ALPHABETICAL = 0; public static final int BEST = 1; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
24ccaf6b16d7f51433f12bd5a004ad278e7db40f
178cb3c5735b0b5e11a030fb5c276ac88f94e701
/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/navigation/GotoSuperTestGenerated.java
ef3b017e3e0494bb3e41fe3718b4b552464bcf2b
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
michaelsiepmann/intellij-community
6b4495f5ee3399c28eff9f22a4773dd24d8abb20
9539e7b156f3f4b2fcde5e6160798e29abcc1aaf
refs/heads/master
2022-01-23T18:34:40.332804
2022-01-04T10:10:46
2022-01-04T10:37:19
136,669,423
0
0
Apache-2.0
2019-05-21T21:54:03
2018-06-08T21:56:11
null
UTF-8
Java
false
false
3,423
java
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.jetbrains.kotlin.idea.navigation; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestRoot; import org.junit.runner.RunWith; /** * This class is generated by {@link org.jetbrains.kotlin.testGenerator.generator.TestGenerator}. * DO NOT MODIFY MANUALLY. */ @SuppressWarnings("all") @TestRoot("idea/tests") @TestDataPath("$CONTENT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/navigation/gotoSuper") public class GotoSuperTestGenerated extends AbstractGotoSuperTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @TestMetadata("BadPositionLambdaParameter.test") public void testBadPositionLambdaParameter() throws Exception { runTest("testData/navigation/gotoSuper/BadPositionLambdaParameter.test"); } @TestMetadata("ClassSimple.test") public void testClassSimple() throws Exception { runTest("testData/navigation/gotoSuper/ClassSimple.test"); } @TestMetadata("DelegatedFun.test") public void testDelegatedFun() throws Exception { runTest("testData/navigation/gotoSuper/DelegatedFun.test"); } @TestMetadata("DelegatedProperty.test") public void testDelegatedProperty() throws Exception { runTest("testData/navigation/gotoSuper/DelegatedProperty.test"); } @TestMetadata("FakeOverrideFun.test") public void testFakeOverrideFun() throws Exception { runTest("testData/navigation/gotoSuper/FakeOverrideFun.test"); } @TestMetadata("FakeOverrideFunWithMostRelevantImplementation.test") public void testFakeOverrideFunWithMostRelevantImplementation() throws Exception { runTest("testData/navigation/gotoSuper/FakeOverrideFunWithMostRelevantImplementation.test"); } @TestMetadata("FakeOverrideProperty.test") public void testFakeOverrideProperty() throws Exception { runTest("testData/navigation/gotoSuper/FakeOverrideProperty.test"); } @TestMetadata("FunctionSimple.test") public void testFunctionSimple() throws Exception { runTest("testData/navigation/gotoSuper/FunctionSimple.test"); } @TestMetadata("ObjectSimple.test") public void testObjectSimple() throws Exception { runTest("testData/navigation/gotoSuper/ObjectSimple.test"); } @TestMetadata("PropertySimple.test") public void testPropertySimple() throws Exception { runTest("testData/navigation/gotoSuper/PropertySimple.test"); } @TestMetadata("SuperWithNativeToGenericMapping.test") public void testSuperWithNativeToGenericMapping() throws Exception { runTest("testData/navigation/gotoSuper/SuperWithNativeToGenericMapping.test"); } @TestMetadata("TraitSimple.test") public void testTraitSimple() throws Exception { runTest("testData/navigation/gotoSuper/TraitSimple.test"); } @TestMetadata("TypeAliasInSuperType.test") public void testTypeAliasInSuperType() throws Exception { runTest("testData/navigation/gotoSuper/TypeAliasInSuperType.test"); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
3ffc8d7c6ea979b4f63d8421f0c50cc04f0a629e
4dd22e45d6216df9cd3b64317f6af953f53677b7
/LMS/src/main/java/com/ulearning/ulms/content/dao/PhysicsResDAO.java
27a6140975a31437a08a1f10f481bbcf6bb51ace
[]
no_license
tianpeijun198371/flowerpp
1325344032912301aaacd74327f24e45c32efa1e
169d3117ee844594cb84b2114e3fd165475f4231
refs/heads/master
2020-04-05T23:41:48.254793
2008-02-16T18:03:08
2008-02-16T18:03:08
40,278,397
0
0
null
null
null
null
GB18030
Java
false
false
1,311
java
/** * PhysicsResDAO.java. * User: liz Date: 2006-2-16 * * Copyright (c) 2000-2004.Huaxia Dadi Distance Learning Services Co.,Ltd. * All rights reserved. */ package com.ulearning.ulms.content.dao; import com.ulearning.ulms.content.model.RPhysicsresModel; import com.ulearning.ulms.core.exceptions.ULMSException; import java.util.List; public interface PhysicsResDAO { /** * 添加资源 * * @param mod * @return * @throws ULMSException */ public int addRes(RPhysicsresModel mod) throws ULMSException; /** * 更新资源 * * @param mod * @throws ULMSException */ public void updateRes(RPhysicsresModel mod) throws ULMSException; /** * 取资源数据 * * @param hql * @return * @throws ULMSException */ public List getData(String hql, String startDateTime, String endDateTime, int firstResult, int maxResults) throws ULMSException; /** * 删除资源数据 * * @param hql * @throws ULMSException */ public void removeRes(String hql) throws ULMSException; }
[ "flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626" ]
flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626
1b55ce3a4c42579f4bd6406596bd568ef01e9e93
7d2b200db2c005f39edbe6e85facf2d2f308b550
/app/src/main/java/com/xuechuan/xcedu/mvp/presenter/SpecailDetailPresenter.java
ca66018a3849c52e4ab1a9a0ef9b60b814e5f680
[]
no_license
yufeilong92/tushday
872f54cd05d3cf8441d6f47d2a35ffda96f19edf
7d463709de92e6c719557f4c5cba13676ed4b988
refs/heads/master
2020-04-13T08:38:43.435530
2018-12-25T14:02:12
2018-12-25T14:02:12
163,087,412
0
1
null
null
null
null
UTF-8
Java
false
false
1,385
java
package com.xuechuan.xcedu.mvp.presenter; import android.content.Context; import com.xuechuan.xcedu.mvp.model.SpecailDetailModel; import com.xuechuan.xcedu.mvp.view.RequestResulteView; import com.xuechuan.xcedu.mvp.view.SpecailDetailView; /** * @version V 1.0 xxxxxxxx * @Title: xcedu * @Package com.xuechuan.xcedu.mvp.presenter * @Description: 根据 tagid 获取下面所有题号 * @author: L-BackPacker * @date: 2018/5/5 19:01 * @verdescript 版本号 修改时间 修改人 修改的概要说明 * @Copyright: 2018 */ public class SpecailDetailPresenter { private SpecailDetailModel model; private SpecailDetailView view; public SpecailDetailPresenter(SpecailDetailModel model, SpecailDetailView view) { this.model = model; this.view = view; } public void requestSpecailDetail(Context context, String coureid, String tagid) { if (coureid == null) { return; } if (tagid == null) { return; } model.requestSpecailDetail(context, coureid, tagid, new RequestResulteView() { @Override public void success(String result) { view.SuccessSpecatilDetail(result); } @Override public void error(String result) { view.ErrorSpecatilDetail(result); } }); } }
[ "931697478@qq.com" ]
931697478@qq.com
b1cd5348c931e2a4bf7397efafb4fc6ebf016b27
52a61700be74ae1a5fd1a7b4d2bdfe632015ecb8
/src/generated/java/org/sarge/jove/platform/vulkan/VkPhysicalDeviceCooperativeMatrixPropertiesNV.java
9a4cdac95e6159f7f4be60fa81fceb3acd731059
[]
no_license
stridecolossus/JOVE
60c248a09171827b049b599e8006a7e558f8b3ba
690f01a8a4464c967781c3d7a53a8866be00793b
refs/heads/master
2023-07-20T07:40:09.165408
2023-07-08T16:21:22
2023-07-08T16:21:22
17,083,829
1
0
null
2014-03-23T18:00:38
2014-02-22T11:51:16
Java
UTF-8
Java
false
false
850
java
package org.sarge.jove.platform.vulkan; import org.sarge.jove.platform.vulkan.common.VulkanStructure; import com.sun.jna.Pointer; import com.sun.jna.Structure; import com.sun.jna.Structure.FieldOrder; /** * Vulkan structure. * This class has been code-generated. */ @FieldOrder({ "sType", "pNext", "cooperativeMatrixSupportedStages" }) public class VkPhysicalDeviceCooperativeMatrixPropertiesNV extends VulkanStructure { public static class ByValue extends VkPhysicalDeviceCooperativeMatrixPropertiesNV implements Structure.ByValue { } public static class ByReference extends VkPhysicalDeviceCooperativeMatrixPropertiesNV implements Structure.ByReference { } public VkStructureType sType = VkStructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV; public Pointer pNext; public VkShaderStage cooperativeMatrixSupportedStages; }
[ "chris.sarge@gmail.com" ]
chris.sarge@gmail.com
8ae1a04039d0acf39f8f74e41571c1ff50233c44
9ebfc5540b0c3596b9f945823cdd65ee3077b9c2
/jupiter-transport/jupiter-transport-netty/src/main/java/org/jupiter/transport/netty/AffinityNettyThreadFactory.java
06c174eaaf229ca56167515403dc6bc295addcfa
[ "Apache-2.0" ]
permissive
leoge0113/Jupiter
d53c5aefa5753cd8fd0246a4a8c3f870c714b366
43524029c26597942adf335d9a05c1d91c8bb17c
refs/heads/master
2021-09-04T18:00:27.607076
2018-01-20T22:21:20
2018-01-20T22:21:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,866
java
/* * Copyright (c) 2015 The Jupiter Project * * Licensed under the Apache License, version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jupiter.transport.netty; import io.netty.util.concurrent.FastThreadLocal; import io.netty.util.concurrent.FastThreadLocalThread; import net.openhft.affinity.AffinityLock; import net.openhft.affinity.AffinityStrategies; import net.openhft.affinity.AffinityStrategy; import org.jupiter.common.util.ClassUtil; import org.jupiter.common.util.internal.logging.InternalLogger; import org.jupiter.common.util.internal.logging.InternalLoggerFactory; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; import static org.jupiter.common.util.Preconditions.checkNotNull; /** * This is a ThreadFactory which assigns threads based the strategies provided. * <p> * If no strategies are provided AffinityStrategies.ANY is used. * * jupiter * org.jupiter.transport.netty * * @author jiachun.fjc */ public class AffinityNettyThreadFactory implements ThreadFactory { private static final InternalLogger logger = InternalLoggerFactory.getInstance(AffinityNettyThreadFactory.class); static { // 检查是否存在slf4j, 使用Affinity必须显式引入slf4j依赖 ClassUtil.classCheck("org.slf4j.Logger"); } private final AtomicInteger id = new AtomicInteger(); private final String name; private final boolean daemon; private final int priority; private final ThreadGroup group; private final AffinityStrategy[] strategies; private AffinityLock lastAffinityLock = null; public AffinityNettyThreadFactory(String name, AffinityStrategy... strategies) { this(name, false, Thread.NORM_PRIORITY, strategies); } public AffinityNettyThreadFactory(String name, boolean daemon, AffinityStrategy... strategies) { this(name, daemon, Thread.NORM_PRIORITY, strategies); } public AffinityNettyThreadFactory(String name, int priority, AffinityStrategy... strategies) { this(name, false, priority, strategies); } public AffinityNettyThreadFactory(String name, boolean daemon, int priority, AffinityStrategy... strategies) { this.name = "affinity." + name + " #"; this.daemon = daemon; this.priority = priority; SecurityManager s = System.getSecurityManager(); group = (s == null) ? Thread.currentThread().getThreadGroup() : s.getThreadGroup(); this.strategies = strategies.length == 0 ? new AffinityStrategy[] { AffinityStrategies.ANY } : strategies; } @Override public Thread newThread(Runnable r) { checkNotNull(r, "runnable"); String name2 = name + id.getAndIncrement(); final Runnable r2 = new DefaultRunnableDecorator(r); Runnable r3 = new Runnable() { @Override public void run() { AffinityLock al; synchronized (AffinityNettyThreadFactory.this) { al = lastAffinityLock == null ? AffinityLock.acquireLock() : lastAffinityLock.acquireLock(strategies); if (al.cpuId() >= 0) { if (!al.isBound()) { al.bind(); } lastAffinityLock = al; } } try { r2.run(); } finally { al.release(); } } }; Thread t = new FastThreadLocalThread(group, r3, name2); try { if (t.isDaemon() != daemon) { t.setDaemon(daemon); } if (t.getPriority() != priority) { t.setPriority(priority); } } catch (Exception ignored) { /* doesn't matter even if failed to set. */ } logger.debug("Creates new {}.", t); return t; } public ThreadGroup getThreadGroup() { return group; } private static final class DefaultRunnableDecorator implements Runnable { private final Runnable r; DefaultRunnableDecorator(Runnable r) { this.r = r; } @Override public void run() { try { r.run(); } finally { FastThreadLocal.removeAll(); } } } }
[ "jiachun.fjc@alibaba-inc.com" ]
jiachun.fjc@alibaba-inc.com
83ee6010974733ae461b44d42e0ab237d63c9db5
a5be151a654a28f02e58c1e360917fa459d188d4
/core/src/main/java/org/carrot2/clustering/lingo/LingoClusteringAlgorithm.java
90e3f5b3a72144a2d216ae68150e1925d44396ed
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-bsd-ack-carrot2" ]
permissive
EJHortala/carrot2
5d73429b0b05f22594af30fbfdb2853ef0bbbaf9
524fc48835ff5309df905b46de135e7d4a2c9ba8
refs/heads/master
2020-08-30T03:31:59.142006
2019-10-24T11:46:34
2019-10-24T11:46:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,974
java
/* * Carrot2 project. * * Copyright (C) 2002-2019, Dawid Weiss, Stanisław Osiński. * All rights reserved. * * Refer to the full license file "carrot2.LICENSE" * in the root folder of the repository checkout or at: * https://www.carrot2.org/carrot2.LICENSE */ package org.carrot2.clustering.lingo; import com.carrotsearch.hppc.BitSet; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; import org.carrot2.attrs.AttrComposite; import org.carrot2.attrs.AttrDouble; import org.carrot2.attrs.AttrInteger; import org.carrot2.attrs.AttrObject; import org.carrot2.attrs.AttrString; import org.carrot2.clustering.Cluster; import org.carrot2.clustering.ClusteringAlgorithm; import org.carrot2.clustering.Document; import org.carrot2.clustering.SharedInfrastructure; import org.carrot2.language.LanguageComponents; import org.carrot2.language.LexicalData; import org.carrot2.language.Stemmer; import org.carrot2.language.Tokenizer; import org.carrot2.text.preprocessing.CompletePreprocessingPipeline; import org.carrot2.text.preprocessing.LabelFormatter; import org.carrot2.text.preprocessing.PreprocessingContext; import org.carrot2.text.vsm.ReducedVectorSpaceModelContext; import org.carrot2.text.vsm.TermDocumentMatrixBuilder; import org.carrot2.text.vsm.TermDocumentMatrixReducer; import org.carrot2.text.vsm.VectorSpaceModelContext; /** * Lingo clustering algorithm. Implementation as described in: <i> "Stanisław Osiński, Dawid Weiss: * A Concept-Driven Algorithm for Clustering Search Results. IEEE Intelligent Systems, May/June, 3 * (vol. 20), 2005, pp. 48—54."</i>. */ public class LingoClusteringAlgorithm extends AttrComposite implements ClusteringAlgorithm { public static final String NAME = "Lingo"; private static final Set<Class<?>> REQUIRED_LANGUAGE_COMPONENTS = new HashSet<>( Arrays.asList(Stemmer.class, Tokenizer.class, LexicalData.class, LabelFormatter.class)); /** * Balance between cluster score and size during cluster sorting. Value equal to 0.0 will cause * Lingo to sort clusters based only on cluster size. Value equal to 1.0 will cause Lingo to sort * clusters based only on cluster score. */ public AttrDouble scoreWeight = attributes.register( "scoreWeight", AttrDouble.builder().label("Size-score sorting ratio").min(0).max(1).defaultValue(0.)); /** * Desired cluster count base. Base factor used to calculate the number of clusters based on the * number of documents on input. The larger the value, the more clusters will be created. The * number of clusters created by the algorithm will be proportionally adjusted to the cluster * count base, but may be different. */ public AttrInteger desiredClusterCount = attributes.register( "desiredClusterCount", AttrInteger.builder().label("Cluster count base").min(2).max(100).defaultValue(30)); /** Preprocessing pipeline. */ public CompletePreprocessingPipeline preprocessing; { attributes.register( "preprocessing", AttrObject.builder(CompletePreprocessingPipeline.class) .label("Input preprocessing components") .getset(() -> preprocessing, (v) -> preprocessing = v) .defaultValue(CompletePreprocessingPipeline::new)); } /** Term-document matrix builder for the algorithm. */ public TermDocumentMatrixBuilder matrixBuilder; { attributes.register( "matrixBuilder", AttrObject.builder(TermDocumentMatrixBuilder.class) .label("Term-document matrix builder") .getset(() -> matrixBuilder, (v) -> matrixBuilder = v) .defaultValue(TermDocumentMatrixBuilder::new)); } /** Term-document matrix reducer for the algorithm. */ public TermDocumentMatrixReducer matrixReducer; { attributes.register( "matrixReducer", AttrObject.builder(TermDocumentMatrixReducer.class) .label("Term-document matrix reducer") .getset(() -> matrixReducer, (v) -> matrixReducer = v) .defaultValue(TermDocumentMatrixReducer::new)); } /** Cluster label builder, contains bindable attributes. */ public ClusterBuilder clusterBuilder; { attributes.register( "clusterBuilder", AttrObject.builder(ClusterBuilder.class) .label("Cluster label supplier") .getset(() -> clusterBuilder, (v) -> clusterBuilder = v) .defaultValue(ClusterBuilder::new)); } /** * Query terms used to retrieve documents. The query is used as a hint to avoid trivial clusters. */ public final AttrString queryHint = attributes.register("queryHint", SharedInfrastructure.queryHintAttribute()); @Override public boolean supports(LanguageComponents languageComponents) { return languageComponents.components().containsAll(REQUIRED_LANGUAGE_COMPONENTS); } /** Performs Lingo clustering of documents. */ @Override public <T extends Document> List<Cluster<T>> cluster( Stream<? extends T> docStream, LanguageComponents languageComponents) { List<T> documents = docStream.collect(Collectors.toList()); // Preprocessing of documents final PreprocessingContext context = preprocessing.preprocess(documents.stream(), queryHint.get(), languageComponents); // Further processing only if there are words to process List<Cluster<T>> clusters = new ArrayList<>(); if (context.hasLabels()) { // Term-document matrix building and reduction final VectorSpaceModelContext vsmContext = new VectorSpaceModelContext(context); final ReducedVectorSpaceModelContext reducedVsmContext = new ReducedVectorSpaceModelContext(vsmContext); LingoProcessingContext lingoContext = new LingoProcessingContext(reducedVsmContext); TermDocumentMatrixBuilder matrixBuilder = this.matrixBuilder; matrixBuilder.buildTermDocumentMatrix(vsmContext); matrixBuilder.buildTermPhraseMatrix(vsmContext); matrixReducer.reduce( reducedVsmContext, computeClusterCount(desiredClusterCount.get(), documents.size())); // Cluster label building clusterBuilder.buildLabels(lingoContext, matrixBuilder.termWeighting); // Document assignment clusterBuilder.assignDocuments(lingoContext); // Cluster merging clusterBuilder.merge(lingoContext); // Format final clusters final LabelFormatter labelFormatter = lingoContext.preprocessingContext.languageComponents.get(LabelFormatter.class); final int[] clusterLabelIndex = lingoContext.clusterLabelFeatureIndex; final BitSet[] clusterDocuments = lingoContext.clusterDocuments; final double[] clusterLabelScore = lingoContext.clusterLabelScore; for (int i = 0; i < clusterLabelIndex.length; i++) { final Cluster<T> cluster = new Cluster<>(); final int labelFeature = clusterLabelIndex[i]; if (labelFeature < 0) { // Cluster removed during merging continue; } // Add label and score cluster.addLabel(context.format(labelFormatter, labelFeature)); cluster.setScore(clusterLabelScore[i]); // Add documents final BitSet bs = clusterDocuments[i]; for (int bit = bs.nextSetBit(0); bit >= 0; bit = bs.nextSetBit(bit + 1)) { cluster.addDocument(documents.get(bit)); } // Add cluster clusters.add(cluster); } } clusters = SharedInfrastructure.reorderByWeightedScoreAndSize(clusters, this.scoreWeight.get()); return clusters; } /** * Computes the number of clusters to create based on a very simple heuristic based on the number * of documents on input. */ static int computeClusterCount(int desiredClusterCountBase, int documentCount) { return Math.min( (int) ((desiredClusterCountBase / 10.0) * Math.sqrt(documentCount)), documentCount); } }
[ "dawid.weiss@carrotsearch.com" ]
dawid.weiss@carrotsearch.com
38176664bad91f2353ba5fb8afa5c3190db6e4d3
dff87e0aeab85d4e41cd7850dc2b159262a28468
/bean/src/main/java/com/example/entity/pack/NewProtocolPackSubject.java
ad2e66dea9628e82f8be3099483422b0921b21d5
[]
no_license
BlueJack1984/hardware
1df14cfe5b105cd442ce8c2ad7810e98df705443
fbc2fc0d6f50baf0040275b3428f8558705194a8
refs/heads/master
2022-06-21T21:22:11.197071
2019-10-15T11:28:34
2019-10-15T11:28:34
211,654,177
0
0
null
2022-06-17T02:33:08
2019-09-29T11:43:16
Java
UTF-8
Java
false
false
384
java
package com.example.entity.pack; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import java.io.Serializable; /** * 上行消息的通用实体头部 * @author lushusheng * @date 2019-09-19 * @description */ @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = false) public class NewProtocolPackSubject implements Serializable { }
[ "lushushen8@163.com" ]
lushushen8@163.com
d18ff8607e1edc1a2358f362372e094310069c16
5e2cab8845e635b75f699631e64480225c1cf34d
/modules/core/org.jowidgets.logging.api/src/main/java/org/jowidgets/logging/tools/ConsoleWarnLoggerAdapter.java
eb55058710dfd8b67aba7ffef8c8a1f960a5e36f
[ "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,995
java
/* * Copyright (c) 2016, 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 jo-widgets.org 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.logging.tools; public class ConsoleWarnLoggerAdapter extends ConsoleErrorLoggerAdapter { public ConsoleWarnLoggerAdapter(final String name) { super(name); } @Override public boolean isWarnEnabled() { return true; } @Override public void warn(final String wrapperFQCN, final String message, final Throwable throwable) { logMessage(LogLevel.WARN, message, throwable); } }
[ "herr.grossmann@gmx.de" ]
herr.grossmann@gmx.de
4ff997b7675e6e31758d707e144ac8ef106fcedc
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/94/org/apache/commons/math/util/MathUtils_factorialLog_387.java
b5ef0265ee697944a99ccf3d1534b97f80eb47e8
[]
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
1,474
java
org apach common math util addit built function link math version revis date math util mathutil return natur logarithm strong precondit strong code code code illeg argument except illegalargumentexcept code thrown param argument code code illeg argument except illegalargumentexcept precondit met factori log factoriallog illeg argument except illegalargumentexcept log sum logsum log sum logsum math log log sum logsum
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
110ef177e091a94e09b228d2ce0908b735285deb
e32b96008337c3917f42289d146e59b1b8b69b49
/repox2/repoxGUI/trunk/src/main/java/harvesterUI/client/panels/harvesting/calendar/CalendarTaskManager.java
d4948587cfd880f03eef18325f7cb5659350c74a
[]
no_license
europeana/contrib
7aed4293d46ee1729a5e5857a72d74ac8d3fc4ae
68cb95d3b7abd61135c70e92d07c22ecde35d126
refs/heads/master
2020-05-31T01:40:10.693422
2019-01-10T10:30:20
2019-01-10T10:30:20
11,665,046
3
8
null
2014-01-16T15:26:49
2013-07-25T16:12:50
Java
UTF-8
Java
false
false
4,071
java
package harvesterUI.client.panels.harvesting.calendar; //import com.bradrydzewski.gwt.calendar.client.Calendar; //import com.bradrydzewski.gwt.calendar.client.CalendarViews; import com.bradrydzewski.gwt.calendar.client.Appointment; import com.extjs.gxt.ui.client.Registry; import com.extjs.gxt.ui.client.Style; import com.extjs.gxt.ui.client.data.ModelData; import com.extjs.gxt.ui.client.widget.ContentPanel; import com.extjs.gxt.ui.client.widget.Dialog; import com.google.gwt.user.client.rpc.AsyncCallback; import harvesterUI.client.HarvesterUI; import harvesterUI.client.panels.browse.BrowseFilterPanel; import harvesterUI.client.servlets.harvest.TaskManagementServiceAsync; import harvesterUI.client.util.ServerExceptionDialog; import harvesterUI.shared.filters.FilterQuery; import harvesterUI.shared.tasks.OldTaskUI; import harvesterUI.shared.tasks.ScheduledTaskUI; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; /** * Created to REPOX. * User: Edmundo * Date: 23-03-2011 * Time: 12:28 */ public class CalendarTaskManager extends ContentPanel { private GoogleCalendarPanel calendarPanel; private CalendarAppointmentManager calendarAppointmentManager; public CalendarTaskManager(){ setScrollMode(Style.Scroll.AUTO); setHeading(HarvesterUI.CONSTANTS.calendar()); setIcon(HarvesterUI.ICONS.calendar()); calendarPanel = new GoogleCalendarPanel(this); add(calendarPanel); calendarAppointmentManager = new CalendarAppointmentManager(calendarPanel.getCalendar()); } public void updateScheduleTasks(){ AsyncCallback<ModelData> callback = new AsyncCallback<ModelData>() { public void onFailure(Throwable caught) { new ServerExceptionDialog("Failed to get response from server",caught.getMessage()).show(); } public void onSuccess(ModelData calendarData) { calendarAppointmentManager.resetCalendarTasks(); List<ScheduledTaskUI> scheduledTaskUIs = calendarData.get("schedules"); erasePastScheduleTasks(scheduledTaskUIs, new Date()); List<OldTaskUI> oldTaskUIs = calendarData.get("oldTasks"); calendarAppointmentManager.addCalendarTasks(scheduledTaskUIs); calendarAppointmentManager.addOldCalendarTasks(oldTaskUIs); ArrayList<Appointment> appts = new ArrayList<Appointment>(); appts.addAll(calendarAppointmentManager.getCalendarTasksList()); calendarPanel.getCalendar().suspendLayout(); calendarPanel.getCalendar().addAppointments(appts); calendarPanel.getCalendar().resumeLayout(); } }; List<FilterQuery> filterQueries = ((BrowseFilterPanel) Registry.get("browseFilterPanel")).getAllQueries(); String username = HarvesterUI.UTIL_MANAGER.getLoggedUserName(); ((TaskManagementServiceAsync) Registry.get(HarvesterUI.TASK_MANAGEMENT_SERVICE)).getCalendarTasks(filterQueries,username,callback); } private void erasePastScheduleTasks(List<ScheduledTaskUI> scheduleTaskUIs, Date today) { Iterator iter = scheduleTaskUIs.iterator(); while(iter.hasNext()) { ScheduledTaskUI scheduledTaskUI = (ScheduledTaskUI) iter.next(); if(scheduledTaskUI == null || scheduledTaskUI.getDate().before(today) && scheduledTaskUI.getType().equals("ONCE")) iter.remove(); } } @Override protected void onAttach() { super.onAttach(); updateScheduleTasks(); } public Dialog getDpDialog() { return getCalendarPanel().getDatePickerDialog(); } public GoogleCalendarPanel getCalendarPanel() { return calendarPanel; } public CalendarAppointmentManager getCalendarAppointmentManager() { return calendarAppointmentManager; } }
[ "jaclu@JacMac.local" ]
jaclu@JacMac.local
978637888fc1e88d7bf841d5f91ad608e393d3d1
1c8ef4a59ce03ca7a32c3bb90b99405c79c22a75
/smallrye-reactive-messaging-provider/src/test/java/io/smallrye/reactive/messaging/providers/MyDummyFactories.java
553b55039eed7f03f6114e9cd977a0a214aa1183
[ "Apache-2.0" ]
permissive
michalszynkiewicz/smallrye-reactive-messaging
1fa017a66d49ecfd0b523f1dee7fede5a1b453b9
532833838c99d94e0b5237a1078a8d41419af978
refs/heads/master
2020-05-23T21:53:14.884269
2019-05-15T16:29:28
2019-05-15T16:29:28
186,963,658
0
0
Apache-2.0
2019-05-16T06:17:33
2019-05-16T06:17:32
null
UTF-8
Java
false
false
1,799
java
package io.smallrye.reactive.messaging.providers; import io.reactivex.Flowable; import io.smallrye.reactive.messaging.spi.IncomingConnectorFactory; import io.smallrye.reactive.messaging.spi.OutgoingConnectorFactory; import org.eclipse.microprofile.config.Config; import org.eclipse.microprofile.reactive.messaging.Message; import org.eclipse.microprofile.reactive.messaging.MessagingProvider; import org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder; import org.eclipse.microprofile.reactive.streams.operators.ReactiveStreams; import org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder; import javax.enterprise.context.ApplicationScoped; import java.util.ArrayList; import java.util.List; import java.util.Map; @ApplicationScoped public class MyDummyFactories implements IncomingConnectorFactory, OutgoingConnectorFactory { private final List<String> list = new ArrayList<>(); private boolean completed = false; @Override public Class<? extends MessagingProvider> type() { return Dummy.class; } public void reset() { list.clear(); completed = false; } public List<String> list() { return list; } @Override public SubscriberBuilder<? extends Message, Void> getSubscriberBuilder(Config config) { return ReactiveStreams.<Message>builder() .peek(x -> list.add(x.getPayload().toString())) .onComplete(() -> completed = true) .ignore(); } @Override public PublisherBuilder<? extends Message> getPublisherBuilder(Config config) { int increment = config.getOptionalValue("increment", Integer.class).orElse(1); return ReactiveStreams .fromPublisher(Flowable.just(1, 2, 3).map(i -> i + increment).map(Message::of)); } public boolean gotCompletion() { return completed; } }
[ "clement.escoffier@gmail.com" ]
clement.escoffier@gmail.com
872ef941bdc7d9c77f178da3d7e1069c4bfa796b
7a3234d282fda192fed2c0aacc57c79477a27074
/net/minecraft/block/BlockGrass.java
ab450249aa90ff52414a762f28a6e83211c80750
[]
no_license
mjuniper/mod-design
88a70724730492f9637f210410bcb128b7f7fe8d
9106cbffb1eb8113add8da7cfbb2bf37e9f1b38c
refs/heads/master
2021-01-10T06:46:12.944366
2016-10-03T21:59:05
2016-10-03T21:59:05
44,486,038
1
0
null
null
null
null
UTF-8
Java
false
false
5,424
java
package net.minecraft.block; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.Icon; import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockGrass extends Block { @SideOnly(Side.CLIENT) private Icon iconGrassTop; @SideOnly(Side.CLIENT) private Icon iconSnowSide; @SideOnly(Side.CLIENT) private Icon iconGrassSideOverlay; protected BlockGrass(int par1) { super(par1, Material.grass); this.setTickRandomly(true); this.setCreativeTab(CreativeTabs.tabBlock); } @SideOnly(Side.CLIENT) /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public Icon getIcon(int par1, int par2) { return par1 == 1 ? this.iconGrassTop : (par1 == 0 ? Block.dirt.getBlockTextureFromSide(par1) : this.blockIcon); } /** * Ticks the block if it's been scheduled */ public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2) { par1World.setBlock(par2, par3, par4, Block.dirt.blockID); } else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { for (int l = 0; l < 4; ++l) { int i1 = par2 + par5Random.nextInt(3) - 1; int j1 = par3 + par5Random.nextInt(5) - 3; int k1 = par4 + par5Random.nextInt(3) - 1; int l1 = par1World.getBlockId(i1, j1 + 1, k1); if (par1World.getBlockId(i1, j1, k1) == Block.dirt.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && par1World.getBlockLightOpacity(i1, j1 + 1, k1) <= 2) { par1World.setBlock(i1, j1, k1, Block.grass.blockID); } } } } } /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return Block.dirt.idDropped(0, par2Random, par3); } @SideOnly(Side.CLIENT) /** * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side */ public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { if (par5 == 1) { return this.iconGrassTop; } else if (par5 == 0) { return Block.dirt.getBlockTextureFromSide(par5); } else { Material material = par1IBlockAccess.getBlockMaterial(par2, par3 + 1, par4); return material != Material.snow && material != Material.craftedSnow ? this.blockIcon : this.iconSnowSide; } } @SideOnly(Side.CLIENT) /** * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */ public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon(this.getTextureName() + "_side"); this.iconGrassTop = par1IconRegister.registerIcon(this.getTextureName() + "_top"); this.iconSnowSide = par1IconRegister.registerIcon(this.getTextureName() + "_side_snowed"); this.iconGrassSideOverlay = par1IconRegister.registerIcon(this.getTextureName() + "_side_overlay"); } @SideOnly(Side.CLIENT) public int getBlockColor() { double d0 = 0.5D; double d1 = 1.0D; return ColorizerGrass.getGrassColor(d0, d1); } @SideOnly(Side.CLIENT) /** * Returns the color this block should be rendered. Used by leaves. */ public int getRenderColor(int par1) { return this.getBlockColor(); } @SideOnly(Side.CLIENT) /** * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called * when first determining what to render. */ public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { int l = 0; int i1 = 0; int j1 = 0; for (int k1 = -1; k1 <= 1; ++k1) { for (int l1 = -1; l1 <= 1; ++l1) { int i2 = par1IBlockAccess.getBiomeGenForCoords(par2 + l1, par4 + k1).getBiomeGrassColor(); l += (i2 & 16711680) >> 16; i1 += (i2 & 65280) >> 8; j1 += i2 & 255; } } return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; } @SideOnly(Side.CLIENT) public static Icon getIconSideOverlay() { return Block.grass.iconGrassSideOverlay; } }
[ "mjuniper@gmail.com" ]
mjuniper@gmail.com
9adf30ce00b61109c98ee001d0abf2658817c8fa
2c9e0541ed8a22bcdc81ae2f9610a118f62c4c4d
/harmony/tests/functional/src/test/functional/org/apache/harmony/test/func/reg/jit/btest5570/Btest5570.java
08c22a5311bc9c69479b3e002dc8981942b9092e
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
JetBrains/jdk8u_tests
774de7dffd513fd61458b4f7c26edd7924c7f1a5
263c74f1842954bae0b34ec3703ad35668b3ffa2
refs/heads/master
2023-08-07T17:57:58.511814
2017-03-20T08:13:25
2017-03-20T08:16:11
70,048,797
11
9
null
null
null
null
UTF-8
Java
false
false
1,733
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.harmony.test.func.reg.jit.btest5570; public class Btest5570 extends Thread { public static int intValue; public static boolean pr = false; public static int step; public static void main(String [] args) { new Btest5570().start(); while (true) { int ii = intValue; if ((ii != 777) && (ii != -1l)) { System.err.println("Unknown value in ii: " + ii); pr = true; System.exit(0); } step++; if (!pr && step > 1000000) { System.err.println("Finish"); System.err.println("PASSED!"); System.exit(0); } } } public void run() { step = 0; while (true) { intValue = 777; intValue = -1; } } }
[ "vitaly.provodin@jetbrains.com" ]
vitaly.provodin@jetbrains.com
6464b6a16e095c8d22a8dbaef2bfb68768d4c74e
0ba946d5fcf43ed12961cf8aca31abd1264d3e40
/src/org/xdty/smilehelper/FloatWindowService.java
a6580733e24c2506e65db1a88945a1ee422c8dc3
[]
no_license
xdtianyu/SmileHelper
0f4fb86f31ed9759d1950be6c271ab10ca2b0ca6
763b91e99878866a09b10533e0bd317713f93a08
refs/heads/master
2020-04-06T07:00:57.151850
2013-09-23T08:46:11
2013-09-23T08:46:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,078
java
package org.xdty.smilehelper; import java.util.ArrayList; import java.util.List; import java.util.Timer; import java.util.TimerTask; import android.app.ActivityManager; import android.app.ActivityManager.RunningTaskInfo; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.database.Cursor; import android.os.Handler; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class FloatWindowService extends Service { /** * 用于在线程中创建或移除悬浮窗。 */ private Handler handler = new Handler(); /** * 定时器,定时进行检测当前应该创建还是移除悬浮窗。 */ private Timer timer; /** * 数据库存储 */ private DatabaseHelper mDatabaseHelper; /** * 数据库信息保存到数组中 */ private static ArrayList<String> mAppList; @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int flags, int startId) { // 获取数据库列表,保存到mAppList中 mDatabaseHelper = new DatabaseHelper(getApplicationContext()); Cursor cursor = mDatabaseHelper.selectForChecked(true); mAppList = new ArrayList<String>(); if (cursor.getCount()==0) { mAppList.add("null"); } else { while (cursor.moveToNext()) { mAppList.add(cursor.getString(2)); } } // 开启定时器,每隔0.5秒刷新一次 if (timer == null) { timer = new Timer(); timer.scheduleAtFixedRate(new RefreshTask(), 0, 500); } new RefreshTask(); return super.onStartCommand(intent, flags, startId); } /** * 获取当前界面顶部的Acivity名称 * @return 返回完整的类名 */ private String getTopAppName() { ActivityManager mActivityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List<RunningTaskInfo> rti = mActivityManager.getRunningTasks(1); return rti.get(0).topActivity.getClassName(); } /** * 获取当前界面顶部的Acivity包名称 * @return 返回包名 */ private String getTopPackageName() { ActivityManager mActivityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List<RunningTaskInfo> rti = mActivityManager.getRunningTasks(1); return rti.get(0).topActivity.getPackageName(); } /** * 判断是否为被添加进appList */ private boolean isInList() { return mAppList.isEmpty() ? false : mAppList.contains(getTopAppName()); } @Override public void onDestroy() { super.onDestroy(); // Service被终止的同时也停止定时器继续运行 timer.cancel(); timer = null; } class RefreshTask extends TimerTask { @Override public void run() { if (!isHome() && !MyWindowManager.isWindowShowing() && !isClose()) { handler.post(new Runnable() { @Override public void run() { if (MyWindowManager.getAddState()) { MyWindowManager.createAddWindow(getApplicationContext()); } else if (isInList()) { MyWindowManager.createSmallWindow(getApplicationContext()); } } }); } else if ((!isInList()||isHome()) && MyWindowManager.isWindowShowing()) { handler.post(new Runnable() { @Override public void run() { MyWindowManager.removeSmallWindow(getApplicationContext()); MyWindowManager.removeBigWindow(getApplicationContext()); if (isHome()) { MyWindowManager.removeAddWindow(getApplicationContext()); } } }); } //闪动效果 // else { // MyWindowManager.removeSmallWindow(getApplicationContext()); // MyWindowManager.removeBigWindow(getApplicationContext()); // MyWindowManager.removeAddWindow(getApplicationContext()); // } // // 当前界面是桌面,且有悬浮窗显示,则更新内存数据。 // else if (isHome() && MyWindowManager.isWindowShowing()) { // handler.post(new Runnable() { // @Override // public void run() { // MyWindowManager.updateUsedPercent(getApplicationContext()); // } // }); // } } } private boolean isClose() { return FloatWindowSmallView.close; } /** * 判断当前界面是否是桌面 */ private boolean isHome() { return getHomes().contains(getTopPackageName()); } /** * 获得属于桌面的应用的应用包名称 * * @return 返回包含所有包名的字符串列表 */ private List<String> getHomes() { List<String> names = new ArrayList<String>(); PackageManager packageManager = this.getPackageManager(); Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); List<ResolveInfo> resolveInfo = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); for (ResolveInfo ri : resolveInfo) { names.add(ri.activityInfo.packageName); } return names; } }
[ "xdtianyu@gmail.com" ]
xdtianyu@gmail.com
41168105c416e150e67a443c9ebb1ad08fb76e22
57bccc9613f4d78acd0a6ede314509692f2d1361
/pbk-report-lib/src/main/java/ru/armd/pbk/aspose/plan/TimesheetReportType.java
0b5324d70a8e6358d5218fb336bcbe1b9cf504c4
[]
no_license
mannyrobin/Omnecrome
70f27fd80a9150b89fe3284d5789e4348cba6a11
424d484a9858b30c11badae6951bccf15c2af9cb
refs/heads/master
2023-01-06T16:20:50.181849
2020-11-06T14:37:14
2020-11-06T14:37:14
310,620,098
0
0
null
null
null
null
UTF-8
Java
false
false
740
java
package ru.armd.pbk.aspose.plan; import ru.armd.pbk.aspose.core.AbstractReportProcessor; import ru.armd.pbk.aspose.core.AbstractReportType; import ru.armd.pbk.aspose.core.IReportType; import ru.armd.pbk.aspose.core.ReportFormat; /** * Тип выгружаемой формы "Табель". */ public class TimesheetReportType extends AbstractReportType implements IReportType { /** * Конструктор по умолчанию. */ public TimesheetReportType() { super("pbk_timesheets.xlsx", "Табель ", "pbk_timesheets.xlsx", "pbk_timesheets", ReportFormat.XLSX, ReportFormat.XLSX); } @Override public AbstractReportProcessor instantiateProcessor() { return new TimesheetReportProcessor(); } }
[ "malike@hipcreativeinc.com" ]
malike@hipcreativeinc.com
0fc397c943f37ad96d45869559f0747000f0deaa
90a46fe343f52c9ab944400e8e95f98168ad38fb
/app/src/main/java/com/mobss/islamic/namesofAllah/views/fragments/slidingviewpager/SlidingViewPagerMvpView.java
addc9a42da72724ff2ed53fd5a6eea1479b34cbc
[]
no_license
ilkayaktas/NamesOfAllah
ab31984bec27413d2962a833966a0679b3885b77
85e671dd76ce76d5a7b0b6044ab5206ba5fb9850
refs/heads/master
2020-11-30T00:32:42.721767
2018-07-27T14:30:45
2018-07-27T14:30:45
95,926,479
1
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.mobss.islamic.namesofAllah.views.fragments.slidingviewpager; import com.mobss.islamic.namesofAllah.model.app.AllahinIsimleri; import com.mobss.islamic.namesofAllah.views.activities.base.MvpView; /** * Created by iaktas on 14.03.2017. */ public interface SlidingViewPagerMvpView extends MvpView { void drawIsim(AllahinIsimleri isim); }
[ "ilkayaktas@gmail.com" ]
ilkayaktas@gmail.com
ad1339058297e50309af6d73c1475b7fcf90d0d7
27f314a71ed6535fef35da963a95a738f01ff395
/keystone4j-entity/src/main/java/com/infinities/keystone4j/model/policy/wrapper/PoliciesWrapper.java
17ebb05825d119b4524b4e0d458dcd0397001b93
[ "Apache-2.0" ]
permissive
infinitiessoft/keystone4j
5b7b49dfe97c99a0ec0ff6a02a181fd1d7d06c74
ed53db75ab07bee229f1a0760e9299080ced0447
refs/heads/master
2021-01-10T09:47:39.637547
2018-07-20T02:34:39
2018-07-20T02:34:39
45,724,159
3
0
null
null
null
null
UTF-8
Java
false
false
1,883
java
/******************************************************************************* * # Copyright 2015 InfinitiesSoft Solutions Inc. * # * # Licensed under the Apache License, Version 2.0 (the "License"); you may * # not use this file except in compliance with the License. You may obtain * # a copy of the License at * # * # http://www.apache.org/licenses/LICENSE-2.0 * # * # Unless required by applicable law or agreed to in writing, software * # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * # License for the specific language governing permissions and limitations * # under the License. *******************************************************************************/ package com.infinities.keystone4j.model.policy.wrapper; import java.util.List; import javax.xml.bind.annotation.XmlElement; import com.infinities.keystone4j.model.CollectionWrapper; import com.infinities.keystone4j.model.common.CollectionLinks; import com.infinities.keystone4j.model.policy.Policy; public class PoliciesWrapper implements CollectionWrapper<Policy> { private List<Policy> policies; private boolean truncated; private CollectionLinks links = new CollectionLinks(); public PoliciesWrapper() { } public PoliciesWrapper(List<Policy> policies) { this.policies = policies; } @Override public CollectionLinks getLinks() { return links; } @Override public void setLinks(CollectionLinks links) { this.links = links; } @Override public boolean isTruncated() { return truncated; } @Override public void setTruncated(boolean truncated) { this.truncated = truncated; } @Override public void setRefs(List<Policy> refs) { this.policies = refs; } @XmlElement(name = "policies") public List<Policy> getRefs() { return policies; } }
[ "pohsun@infinitiesoft.com" ]
pohsun@infinitiesoft.com
f6e4d285726f3afb5a63850c5cc236f9c4206195
ad64a14fac1f0d740ccf74a59aba8d2b4e85298c
/linkwee-supermarket/src/main/java/com/linkwee/act/redpacket/model/ActRedpacketRuleDetail.java
9d42635d945971c844128b2911f09c2524a877a2
[]
no_license
zhangjiayin/supermarket
f7715aa3fdd2bf202a29c8683bc9322b06429b63
6c37c7041b5e1e32152e80564e7ea4aff7128097
refs/heads/master
2020-06-10T16:57:09.556486
2018-10-30T07:03:15
2018-10-30T07:03:15
193,682,975
0
1
null
2019-06-25T10:03:03
2019-06-25T10:03:03
null
UTF-8
Java
false
false
1,369
java
package com.linkwee.act.redpacket.model; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; /** * * @描述: 实体Bean * * @创建人: ch * * @创建时间:2016年08月19日 15:52:59 * * Copyright (c) 深圳领会科技有限公司-版权所有 */ public class ActRedpacketRuleDetail extends ActRedpacketRuleBrief{ private static final long serialVersionUID = -8555010219597816915L; /** * */ private Integer id; /** *创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8") private Date createTime; /** *修改时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8") private Date updateTime; /** * */ private String operator; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getOperator() { return operator; } public void setOperator(String operator) { this.operator = operator; } }
[ "liqimoon@qq.com" ]
liqimoon@qq.com
90c658cbc191e8d4d737e1d8f8a052605973bb0c
2d1042d6ba6d760eba3aa46cb715084b51ea9505
/work/decompile-78ce18fa/net/minecraft/server/NBTBase.java
8170a842808d40bc6a88d6fca56bdaa3ed699b19
[]
no_license
edgars-eizvertins/raspberry-pi-minecraft-server
9d3e2eea683ee860917f9201634df81a7cc87008
3c004a73d284f17c4de4c6696edb0c1c661138c5
refs/heads/master
2020-04-09T10:00:50.523774
2018-12-03T21:20:19
2018-12-03T21:20:19
160,246,576
0
0
null
null
null
null
UTF-8
Java
false
false
2,560
java
package net.minecraft.server; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; public interface NBTBase { String[] a = new String[] { "END", "BYTE", "SHORT", "INT", "LONG", "FLOAT", "DOUBLE", "BYTE[]", "STRING", "LIST", "COMPOUND", "INT[]", "LONG[]"}; EnumChatFormat b = EnumChatFormat.AQUA; EnumChatFormat c = EnumChatFormat.GREEN; EnumChatFormat d = EnumChatFormat.GOLD; EnumChatFormat e = EnumChatFormat.RED; void write(DataOutput dataoutput) throws IOException; void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException; String toString(); byte getTypeId(); static default NBTBase createTag(byte b0) { switch (b0) { case 0: return new NBTTagEnd(); case 1: return new NBTTagByte(); case 2: return new NBTTagShort(); case 3: return new NBTTagInt(); case 4: return new NBTTagLong(); case 5: return new NBTTagFloat(); case 6: return new NBTTagDouble(); case 7: return new NBTTagByteArray(); case 8: return new NBTTagString(); case 9: return new NBTTagList(); case 10: return new NBTTagCompound(); case 11: return new NBTTagIntArray(); case 12: return new NBTTagLongArray(); default: return null; } } static default String n(int i) { switch (i) { case 0: return "TAG_End"; case 1: return "TAG_Byte"; case 2: return "TAG_Short"; case 3: return "TAG_Int"; case 4: return "TAG_Long"; case 5: return "TAG_Float"; case 6: return "TAG_Double"; case 7: return "TAG_Byte_Array"; case 8: return "TAG_String"; case 9: return "TAG_List"; case 10: return "TAG_Compound"; case 11: return "TAG_Int_Array"; case 12: return "TAG_Long_Array"; case 99: return "Any Numeric Tag"; default: return "UNKNOWN"; } } NBTBase clone(); default String b_() { return this.toString(); } default IChatBaseComponent k() { return this.a("", 0); } IChatBaseComponent a(String s, int i); }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org