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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
63e4811afdde16fead7fbdfc45ee1ba1b483e0b2
|
7559bead0c8a6ad16f016094ea821a62df31348a
|
/src/com/vmware/vim25/HostPortGroupProfile.java
|
698ebe009dd7ae3460ac4aed3bfb77891a9a068d
|
[] |
no_license
|
ZhaoxuepengS/VsphereTest
|
09ba2af6f0a02d673feb9579daf14e82b7317c36
|
59ddb972ce666534bf58d84322d8547ad3493b6e
|
refs/heads/master
| 2021-07-21T13:03:32.346381
| 2017-11-01T12:30:18
| 2017-11-01T12:30:18
| 109,128,993
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,490
|
java
|
package com.vmware.vim25;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for HostPortGroupProfile complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="HostPortGroupProfile">
* <complexContent>
* <extension base="{urn:vim25}PortGroupProfile">
* <sequence>
* <element name="ipConfig" type="{urn:vim25}IpAddressProfile"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "HostPortGroupProfile", propOrder = {
"ipConfig"
})
public class HostPortGroupProfile
extends PortGroupProfile
{
@XmlElement(required = true)
protected IpAddressProfile ipConfig;
/**
* Gets the value of the ipConfig property.
*
* @return
* possible object is
* {@link IpAddressProfile }
*
*/
public IpAddressProfile getIpConfig() {
return ipConfig;
}
/**
* Sets the value of the ipConfig property.
*
* @param value
* allowed object is
* {@link IpAddressProfile }
*
*/
public void setIpConfig(IpAddressProfile value) {
this.ipConfig = value;
}
}
|
[
"495149700@qq.com"
] |
495149700@qq.com
|
fb53dd1eb3aed3a57a95bbc8dc2618004e6e14ca
|
17c30fed606a8b1c8f07f3befbef6ccc78288299
|
/Mate10_8_1_0/src/main/java/com/huawei/android/smcs/SmartTrimProcessPkgResume.java
|
fbf86e4f04ded704d3990679709a73cabba43104
|
[] |
no_license
|
EggUncle/HwFrameWorkSource
|
4e67f1b832a2f68f5eaae065c90215777b8633a7
|
162e751d0952ca13548f700aad987852b969a4ad
|
refs/heads/master
| 2020-04-06T14:29:22.781911
| 2018-11-09T05:05:03
| 2018-11-09T05:05:03
| 157,543,151
| 1
| 0
| null | 2018-11-14T12:08:01
| 2018-11-14T12:08:01
| null |
UTF-8
|
Java
| false
| false
| 3,024
|
java
|
package com.huawei.android.smcs;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.util.Log;
import java.util.StringTokenizer;
public final class SmartTrimProcessPkgResume extends SmartTrimProcessEvent {
public static final Creator<SmartTrimProcessPkgResume> CREATOR = new Creator<SmartTrimProcessPkgResume>() {
public SmartTrimProcessPkgResume createFromParcel(Parcel source) {
return new SmartTrimProcessPkgResume(source);
}
public SmartTrimProcessPkgResume[] newArray(int size) {
return new SmartTrimProcessPkgResume[size];
}
};
private static final String TAG = "SmartTrimProcessPkgResume";
private static final boolean mDebugLocalClass = false;
public String mPkgName = null;
public String mProcessName = null;
SmartTrimProcessPkgResume(Parcel source) {
super(source);
readFromParcel(source);
}
SmartTrimProcessPkgResume(Parcel source, int event) {
super(event);
readFromParcel(source);
}
public SmartTrimProcessPkgResume(String sPkg, String processName) {
super(1);
this.mPkgName = sPkg;
this.mProcessName = processName;
}
SmartTrimProcessPkgResume(StringTokenizer stzer) {
super(1);
}
public int hashCode() {
try {
String sHashCode = this.mProcessName + "_" + this.mPkgName;
if (sHashCode == null || sHashCode.length() <= 0) {
return -1;
}
return sHashCode.hashCode();
} catch (Exception e) {
Log.e(TAG, "SmartTrimProcessPkgResume.hashCode: catch exception " + e.toString());
return -1;
}
}
public boolean equals(Object o) {
if (o == null) {
return false;
}
try {
if (!(o instanceof SmartTrimProcessPkgResume)) {
return false;
}
SmartTrimProcessPkgResume input = (SmartTrimProcessPkgResume) o;
if (input.mProcessName.equals(this.mProcessName) && input.mPkgName.equals(this.mPkgName)) {
return true;
}
return false;
} catch (Exception e) {
Log.e(TAG, "SmartTrimProcessPkgResume.equals: catch exception " + e.toString());
return false;
}
}
public String toString() {
StringBuffer sb = new StringBuffer("SmartTrimProcessPkgResume:\n");
sb.append("process: " + this.mProcessName + "\n");
sb.append("pkg: " + this.mPkgName + "\n");
return sb.toString();
}
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeString(this.mProcessName);
dest.writeString(this.mPkgName);
}
public int describeContents() {
return 0;
}
public void readFromParcel(Parcel source) {
this.mProcessName = source.readString();
this.mPkgName = source.readString();
}
}
|
[
"lygforbs0@mail.com"
] |
lygforbs0@mail.com
|
f3909c0dc17a6c0d3675bd880c56b07ec8851824
|
631afd8bb77a19ac0f0604c41176d11f63e90c7d
|
/kie-wb-common-stunner-sets/kie-wb-common-stunner-basicset/kie-wb-common-stunner-basicset-api/src/main/java/org/kie/workbench/common/stunner/basicset/definition/property/font/FontFamily.java
|
32d76604ae5eb4f70c34a50a2a96ed3c11a995c0
|
[] |
no_license
|
tsurdilo/wirez
|
86aaf88fcf412cfa1b03a9cfa8e81503b52439bc
|
fd8963cdd0dd6ec916b051dc5759f23bd6fe2074
|
refs/heads/master
| 2020-12-29T03:07:36.637532
| 2016-10-04T01:44:36
| 2016-10-04T02:29:18
| 68,604,988
| 0
| 0
| null | 2016-09-19T12:46:45
| 2016-09-19T12:46:45
| null |
UTF-8
|
Java
| false
| false
| 2,463
|
java
|
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kie.workbench.common.stunner.basicset.definition.property.font;
import org.jboss.errai.common.client.api.annotations.Portable;
import org.jboss.errai.databinding.client.api.Bindable;
import org.kie.workbench.common.stunner.core.definition.annotation.Description;
import org.kie.workbench.common.stunner.core.definition.annotation.Property;
import org.kie.workbench.common.stunner.core.definition.annotation.property.*;
import org.kie.workbench.common.stunner.core.definition.property.PropertyType;
import org.kie.workbench.common.stunner.core.definition.property.type.StringType;
@Portable
@Bindable
@Property
public class FontFamily {
@Caption
public static final transient String caption = "Font Family";
@Description
public static final transient String description = "The Font Family";
@ReadOnly
public static final Boolean readOnly = false;
@Optional
public static final Boolean optional = false;
@Type
public static final PropertyType type = new StringType();
@DefaultValue
public static final transient String defaultValue = "Verdana";
@Value
private String value = defaultValue;
public FontFamily() {
}
public FontFamily( final String value ) {
this.value = value;
}
public String getCaption() {
return caption;
}
public String getDescription() {
return description;
}
public boolean isReadOnly() {
return readOnly;
}
public boolean isOptional() {
return optional;
}
public PropertyType getType() {
return type;
}
public String getDefaultValue() {
return defaultValue;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
|
[
"roger600@gmail.com"
] |
roger600@gmail.com
|
74bc00a560407fd446c9e8d4dca2272b117ba14d
|
3d5a4e32fb95d5a80d126ef0a6ba04b6d8a1eb1b
|
/app/src/main/java/com/xk/mall/view/widget/TabEntity.java
|
9d16978607c2358c25e1420b98f848f87c90afc8
|
[] |
no_license
|
18236905854/XiKouShangCheng
|
691fdd5056e35d8218bdb57be4f01cac185dd3e1
|
015bbcdb0199a9f04f57cc693a252eb687c43e2e
|
refs/heads/master
| 2022-11-03T12:33:35.955106
| 2020-06-17T08:37:19
| 2020-06-17T08:37:19
| 272,629,839
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 682
|
java
|
package com.xk.mall.view.widget;
import com.flyco.tablayout.listener.CustomTabEntity;
public class TabEntity implements CustomTabEntity {
public String title;
public int selectedIcon;
public int unSelectedIcon;
public TabEntity(String title, int selectedIcon, int unSelectedIcon) {
this.title = title;
this.selectedIcon = selectedIcon;
this.unSelectedIcon = unSelectedIcon;
}
@Override
public String getTabTitle() {
return title;
}
@Override
public int getTabSelectedIcon() {
return selectedIcon;
}
@Override
public int getTabUnselectedIcon() {
return unSelectedIcon;
}
}
|
[
"1071048617@qq.com"
] |
1071048617@qq.com
|
d48bbde943f28342f82bead3e7e03d599024c1f1
|
6c8e077c219a94497faef3678df5c25764e8f9c9
|
/bll2/src/main/java/com/maoding/hxIm/constDefine/ImQueueStatus.java
|
9b762a47c23aa0d238c3a809473144c9fc198639
|
[] |
no_license
|
chengliangzhang/maoding-web
|
af30195f42de58191fb704bd9bb71a88ebd6e53c
|
acc39723ffe897f7ec5baa2c009642386acbbeaa
|
refs/heads/master
| 2021-05-02T12:48:12.210561
| 2018-09-26T06:49:14
| 2018-09-26T06:49:14
| 120,746,771
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package com.maoding.hxIm.constDefine;
public class ImQueueStatus {
/** 待处理 **/
public final static int Waiting = 0;
/** 处理中 **/
public final static int PROCESSING = 1;
/** 已终止 **/
public final static int END = 2;
}
|
[
"zhangchengliang@imaoding.com"
] |
zhangchengliang@imaoding.com
|
fce140e71b320d0a06309827a73c85b3accdb2a0
|
5762268907dc4d9f025b7d8e42ae58b944fb98aa
|
/sys_biz/src/main/java/org/jeecgframework/core/common/exception/GlobalExceptionResolver.java
|
7e2e592c4df82dfec9cc520c4085de8ab9a317c7
|
[] |
no_license
|
lotte0326/cloudPlatform
|
d132866fb2b3dcc74043d6e42ec4bc4392b9f91b
|
02bc258f876d9f549fe8ce89fae19634fbcce725
|
refs/heads/master
| 2020-03-22T10:53:51.374352
| 2017-10-16T06:49:59
| 2017-10-16T06:49:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,406
|
java
|
package org.jeecgframework.core.common.exception;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.util.JSONHelper;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.modules.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;
/**
* spring mvc 全局处理异常捕获 根据请求区分ajax和普通请求,分别进行响应.
* 第一、异常信息输出到日志中。
* 第二、截取异常详细信息的前50个字符,写入日志表中t_s_log。
*/
@Component
public class GlobalExceptionResolver implements HandlerExceptionResolver {
@Autowired
private SystemService systemService;
//记录日志信息
private static final Logger log = Logger
.getLogger(GlobalExceptionResolver.class);
//记录数据库最大字符长度
private static final int WIRTE_DB_MAX_LENGTH = 1500;
//记录数据库最大字符长度
private static final short LOG_LEVEL = 6;
//记录数据库最大字符长度
private static final short LOG_OPT = 3;
/**
* 对异常信息进行统一处理,区分异步和同步请求,分别处理
*/
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) {
boolean isajax = isAjax(request,response);
Throwable deepestException = deepestException(ex);
return processException(request, response, handler, deepestException, isajax);
}
/**
* 判断当前请求是否为异步请求.
*/
private boolean isAjax(HttpServletRequest request, HttpServletResponse response){
return oConvertUtils.isNotEmpty(request.getHeader("X-Requested-With"));
}
/**
* 获取最原始的异常出处,即最初抛出异常的地方
*/
private Throwable deepestException(Throwable e){
Throwable tmp = e;
int breakPoint = 0;
while(tmp.getCause()!=null){
if(tmp.equals(tmp.getCause())){
break;
}
tmp=tmp.getCause();
breakPoint++;
if(breakPoint>1000){
break;
}
}
return tmp;
}
/**
* 处理异常.
* @param request
* @param response
* @param handler
* @param deepestException
* @param isajax
* @return
*/
private ModelAndView processException(HttpServletRequest request,
HttpServletResponse response, Object handler,
Throwable ex, boolean isajax) {
//步骤一、异常信息记录到日志文件中.
log.error("全局处理异常捕获:", ex);
//步骤二、异常信息记录截取前50字符写入数据库中.
logDb(ex);
//步骤三、分普通请求和ajax请求分别处理.
if(isajax){
return processAjax(request,response,handler,ex);
}else{
return processNotAjax(request,response,handler,ex);
}
}
/**
* 异常信息记录截取前50字符写入数据库中
* @param ex
*/
private void logDb(Throwable ex) {
//String exceptionMessage = getThrowableMessage(ex);
String exceptionMessage = "错误异常: "+ex.getClass().getSimpleName()+",错误描述:"+ex.getMessage();
if(oConvertUtils.isNotEmpty(exceptionMessage)){
if(exceptionMessage.length() > WIRTE_DB_MAX_LENGTH){
exceptionMessage = exceptionMessage.substring(0,WIRTE_DB_MAX_LENGTH);
}
}
systemService.addLog(exceptionMessage, LOG_LEVEL, LOG_OPT);
}
/**
* ajax异常处理并返回.
* @param request
* @param response
* @param handler
* @param deepestException
* @return
*/
private ModelAndView processAjax(HttpServletRequest request,
HttpServletResponse response, Object handler,
Throwable deepestException){
ModelAndView empty = new ModelAndView();
//response.setContentType("application/json");
response.setHeader("Cache-Control", "no-store");
AjaxJson json = new AjaxJson();
json.setSuccess(true);
json.setMsg(deepestException.getMessage());
PrintWriter pw = null;
try {
pw=response.getWriter();
pw.write(JSONHelper.bean2json(json));
pw.flush();
} catch (IOException e) {
e.printStackTrace();
}finally{
pw.close();
}
empty.clear();
return empty;
}
/**
* 普通页面异常处理并返回.
* @param request
* @param response
* @param handler
* @param deepestException
* @return
*/
private ModelAndView processNotAjax(HttpServletRequest request,
HttpServletResponse response, Object handler, Throwable ex) {
String exceptionMessage = getThrowableMessage(ex);
Map<String, Object> model = new HashMap<String, Object>();
model.put("exceptionMessage", exceptionMessage);
model.put("ex", ex);
return new ModelAndView("common/error", model);
}
/**
* 返回错误信息字符串
*
* @param ex
* Exception
* @return 错误信息字符串
*/
public String getThrowableMessage(Throwable ex) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
ex.printStackTrace(pw);
return sw.toString();
}
}
|
[
"gaofen_888@163.com"
] |
gaofen_888@163.com
|
e5b02d62726fd3626bea52617321751bfda6f605
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_93c31193a93b6a0afad18abb4ef31509974612f1/MainMenu/31_93c31193a93b6a0afad18abb4ef31509974612f1_MainMenu_s.java
|
094f4026c49a360daac011d5ea288616246e0a03
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,088
|
java
|
package com.chess.genesis;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
public class MainMenu extends Activity implements OnClickListener, OnTouchListener
{
private static MainMenu self;
private final Handler handle = new Handler()
{
public void handleMessage(final Message msg)
{
switch (msg.what) {
case LogoutConfirm.MSG:
final Editor pref = PreferenceManager.getDefaultSharedPreferences(self).edit();
pref.putBoolean("isLoggedIn", false);
pref.putString("username", "!error!");
pref.putString("passhash", "!error!");
pref.commit();
final TextView text = (TextView) findViewById(R.id.welcome);
text.setText("");
final ImageView button = (ImageView) findViewById(R.id.login);
button.setVisibility(View.VISIBLE);
break;
}
}
};
@Override
public void onCreate(final Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
self = this;
// set only portrait
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// set content view
setContentView(R.layout.mainmenu);
// setup click listeners
ImageView button = (ImageView) findViewById(R.id.local_game);
button.setOnClickListener(this);
button.setOnTouchListener(this);
button = (ImageView) findViewById(R.id.online_game);
button.setOnClickListener(this);
button.setOnTouchListener(this);
button = (ImageView) findViewById(R.id.archive_game);
button.setOnClickListener(this);
button.setOnTouchListener(this);
button = (ImageView) findViewById(R.id.howtoplay);
button.setOnClickListener(this);
button.setOnTouchListener(this);
button = (ImageView) findViewById(R.id.likefacebook);
button.setOnClickListener(this);
button.setOnTouchListener(this);
button = (ImageView) findViewById(R.id.login);
button.setOnClickListener(this);
button.setOnTouchListener(this);
}
@Override
public void onResume()
{
super.onResume();
String welcome = "";
int visible = View.VISIBLE;
final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
if (pref.getBoolean("isLoggedIn", false)) {
welcome = "Welcome " + pref.getString("username", "");
visible = View.GONE;
}
final TextView text = (TextView) findViewById(R.id.welcome);
text.setText(welcome);
final MyImageView button = (MyImageView) findViewById(R.id.login);
button.setVisibility(visible);
}
@Override
public void onBackPressed()
{
moveTaskToBack(true);
}
@Override
public boolean onCreateOptionsMenu(final Menu menu)
{
getMenuInflater().inflate(R.menu.mainmenu_options, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(final MenuItem item)
{
switch (item.getItemId()) {
case R.id.logout:
(new LogoutConfirm(this, handle)).show();
break;
default:
return super.onOptionsItemSelected(item);
}
return true;
}
@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data)
{
if (resultCode == RESULT_OK) {
final Bundle bundle = new Bundle();
bundle.putInt("type", Enums.ONLINE_GAME);
final Intent intent = new Intent(this, GameList.class);
intent.putExtras(bundle);
startActivity(intent);
}
}
public boolean onTouch(final View v, final MotionEvent event)
{
switch (v.getId()) {
case R.id.local_game:
if (event.getAction() == MotionEvent.ACTION_DOWN)
((ImageView) v).setImageResource(R.drawable.localplay_pressed);
else if (event.getAction() == MotionEvent.ACTION_UP)
((ImageView) v).setImageResource(R.drawable.localplay);
break;
case R.id.online_game:
if (event.getAction() == MotionEvent.ACTION_DOWN)
((ImageView) v).setImageResource(R.drawable.onlinematches_pressed);
else if (event.getAction() == MotionEvent.ACTION_UP)
((ImageView) v).setImageResource(R.drawable.onlinematches);
break;
case R.id.archive_game:
if (event.getAction() == MotionEvent.ACTION_DOWN)
((ImageView) v).setImageResource(R.drawable.recordedgames_pressed);
else if (event.getAction() == MotionEvent.ACTION_UP)
((ImageView) v).setImageResource(R.drawable.recordedgames);
break;
case R.id.howtoplay:
if (event.getAction() == MotionEvent.ACTION_DOWN)
((ImageView) v).setImageResource(R.drawable.howtoplay_pressed);
else if (event.getAction() == MotionEvent.ACTION_UP)
((ImageView) v).setImageResource(R.drawable.howtoplay);
break;
case R.id.login:
if (event.getAction() == MotionEvent.ACTION_DOWN)
((ImageView) v).setImageResource(R.drawable.mainlogin_pressed);
else if (event.getAction() == MotionEvent.ACTION_UP)
((ImageView) v).setImageResource(R.drawable.mainlogin);
break;
case R.id.likefacebook:
if (event.getAction() == MotionEvent.ACTION_DOWN)
((ImageView) v).setImageResource(R.drawable.facebook_pressed);
else if (event.getAction() == MotionEvent.ACTION_UP)
((ImageView) v).setImageResource(R.drawable.facebook);
break;
}
return false;
}
public void onClick(final View v)
{
Bundle bundle;
Intent intent;
switch (v.getId()) {
case R.id.local_game:
bundle = new Bundle();
bundle.putInt("type", Enums.LOCAL_GAME);
intent = new Intent(this, GameList.class);
intent.putExtras(bundle);
startActivity(intent);
break;
case R.id.online_game:
final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
if (!pref.getBoolean("isLoggedIn", false)) {
startActivityForResult(new Intent(this, Login.class), 1);
return;
}
bundle = new Bundle();
bundle.putInt("type", Enums.ONLINE_GAME);
intent = new Intent(this, GameList.class);
intent.putExtras(bundle);
startActivity(intent);
break;
case R.id.archive_game:
bundle = new Bundle();
bundle.putInt("type", Enums.ARCHIVE_GAME);
intent = new Intent(this, GameList.class);
intent.putExtras(bundle);
startActivity(intent);
break;
case R.id.howtoplay:
Uri uri = Uri.parse("http://goo.gl/eyLYY");
startActivity(new Intent(Intent.ACTION_VIEW, uri));
break;
case R.id.likefacebook:
uri = Uri.parse("http://goo.gl/tQVOh");
startActivity(new Intent(Intent.ACTION_VIEW, uri));
break;
case R.id.login:
startActivity(new Intent(this, Login.class));
break;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
895f0e13930926fe5fd8406a207ff72d09db5402
|
c41d43113db4276ccd266192448fd9a03f977b7e
|
/1.JavaSyntax/src/com/javarush/task/task05/task0516/Friend.java
|
e9485113798519adb2316391313aa034bd15c4ab
|
[
"MIT"
] |
permissive
|
wldzam/JavaRushTasks
|
b799eceaa8430fba21dfc9fd1ee7591c07d58bb0
|
eb0371e1b363955ec113671816fb36a5ce1f73a0
|
refs/heads/master
| 2020-04-08T17:08:12.477998
| 2018-04-04T04:11:08
| 2018-04-04T04:11:08
| 159,552,468
| 1
| 0
| null | 2018-11-28T19:18:00
| 2018-11-28T19:18:00
| null |
UTF-8
|
Java
| false
| false
| 550
|
java
|
package com.javarush.task.task05.task0516;
/*
Друзей не купишь
*/
public class Friend {
//напишите тут ваш код
String name;
int age;
char sex;
public Friend(String name, int age, char sex) {
this.name = name;
this.age = age;
this.sex = sex;
}
public Friend(String name, int age) {
this.name = name;
this.age = age;
}
public Friend(String name) {
this.name = name;
}
public static void main(String[] args) {
}
}
|
[
"stasiksukora@mail.ru"
] |
stasiksukora@mail.ru
|
313c1c8475aa8fc3411594c412acd5b07eab8885
|
8f4ac74a4a678c460d3be4c41c670e96cd0b8e65
|
/src/main/java/com/shevtsou/system/domain/Employee.java
|
8a3dcd9e7b6a3468830308ac20c0c2a4b3d27f41
|
[] |
no_license
|
shevtsou/system-projects-3
|
6dca8da09140e3258ade21210b8706a4f2f8a9b9
|
3d83d8f1113162d5ff96477fac446506280406fe
|
refs/heads/master
| 2020-05-02T20:44:59.374602
| 2019-03-28T12:45:49
| 2019-03-28T12:45:49
| 178,200,722
| 0
| 0
| null | 2019-03-28T12:45:50
| 2019-03-28T12:38:39
|
Java
|
UTF-8
|
Java
| false
| false
| 5,846
|
java
|
package com.shevtsou.system.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.DBRef;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
/**
* The Employee entity.
*/
@ApiModel(description = "The Employee entity.")
@Document(collection = "employee")
public class Employee implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String id;
/**
* The firstname attribute.
*/
@ApiModelProperty(value = "The firstname attribute.")
@Field("first_name")
private String firstName;
@Field("last_name")
private String lastName;
@Field("email")
private String email;
@Field("phone_number")
private String phoneNumber;
@Field("hire_date")
private Instant hireDate;
@Field("salary")
private Long salary;
@Field("commission_pct")
private Long commissionPct;
@DBRef
@Field("department")
@JsonIgnoreProperties("employees")
private Department department;
@DBRef
@Field("job")
private Set<Job> jobs = new HashSet<>();
@DBRef
@Field("manager")
@JsonIgnoreProperties("employees")
private Employee manager;
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public Employee firstName(String firstName) {
this.firstName = firstName;
return this;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public Employee lastName(String lastName) {
this.lastName = lastName;
return this;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public Employee email(String email) {
this.email = email;
return this;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhoneNumber() {
return phoneNumber;
}
public Employee phoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
return this;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public Instant getHireDate() {
return hireDate;
}
public Employee hireDate(Instant hireDate) {
this.hireDate = hireDate;
return this;
}
public void setHireDate(Instant hireDate) {
this.hireDate = hireDate;
}
public Long getSalary() {
return salary;
}
public Employee salary(Long salary) {
this.salary = salary;
return this;
}
public void setSalary(Long salary) {
this.salary = salary;
}
public Long getCommissionPct() {
return commissionPct;
}
public Employee commissionPct(Long commissionPct) {
this.commissionPct = commissionPct;
return this;
}
public void setCommissionPct(Long commissionPct) {
this.commissionPct = commissionPct;
}
public Department getDepartment() {
return department;
}
public Employee department(Department department) {
this.department = department;
return this;
}
public void setDepartment(Department department) {
this.department = department;
}
public Set<Job> getJobs() {
return jobs;
}
public Employee jobs(Set<Job> jobs) {
this.jobs = jobs;
return this;
}
public Employee addJob(Job job) {
this.jobs.add(job);
job.setEmployee(this);
return this;
}
public Employee removeJob(Job job) {
this.jobs.remove(job);
job.setEmployee(null);
return this;
}
public void setJobs(Set<Job> jobs) {
this.jobs = jobs;
}
public Employee getManager() {
return manager;
}
public Employee manager(Employee employee) {
this.manager = employee;
return this;
}
public void setManager(Employee employee) {
this.manager = employee;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Employee employee = (Employee) o;
if (employee.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), employee.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "Employee{" +
"id=" + getId() +
", firstName='" + getFirstName() + "'" +
", lastName='" + getLastName() + "'" +
", email='" + getEmail() + "'" +
", phoneNumber='" + getPhoneNumber() + "'" +
", hireDate='" + getHireDate() + "'" +
", salary=" + getSalary() +
", commissionPct=" + getCommissionPct() +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
95cf3223cbcef95336b4b32e2e637ba084078c74
|
a5161c5e7ceda6bb7e9ecf4252d64ca1776043c5
|
/java-method-example/MethodOverloadingAndVarargsEmp.java
|
a033b07d53f112ecab8e989a818d178486367a2b
|
[] |
no_license
|
vaithwee/java-tutorial-demo
|
ca4a1c971eb368f7c195153f47c8d6b6a5a7783d
|
936be64ead9b6aa897d95da657d85a7e7be5442f
|
refs/heads/master
| 2020-03-31T17:59:00.868644
| 2018-11-28T15:34:33
| 2018-11-28T15:34:33
| 152,441,537
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 971
|
java
|
public class MethodOverloadingAndVarargsEmp {
static void vaTest(int... no) {
System.out.print("vaTest(int...) " + "params number: " + no.length + " content: ");
for (int n : no) {
System.out.print(n + " ");
}
System.out.println();
}
static void vaTest(boolean... bl) {
System.out.print("vaTest(boolean...) params number: " + bl.length + " content: ");
for (boolean b : bl) {
System.out.print(b + " ");
}
System.out.println();
}
static void vaTest(String msg, int... no) {
System.out.print("vaTest(String, int...) message: " + msg + " params number: " + no.length + " content:");
for (int b : no) {
System.out.print(b + " ");
}
System.out.println();
}
public static void main(String[] args) {
vaTest(1, 2, 3);
vaTest("测试", 10, 20);
vaTest(true, false, false);
}
}
|
[
"vaithwee@yeah.net"
] |
vaithwee@yeah.net
|
7fb82a9b812f00602956a5867645de6325d72a2f
|
9e1fbb8758ca856ea983be88700ac508cac7d216
|
/src/main/java/com/nicko/core/util/hastebin/HasteBin.java
|
39c4087471c3ccb9b6dd049fdc0882d63983fd71
|
[] |
no_license
|
destroyednicko/AgainCore
|
a5bfea18d30c6e31bf3825691232fad7d74ab25c
|
426cd70e0756d4060888206e7d561a0c00f7e719
|
refs/heads/master
| 2023-01-08T02:06:24.312278
| 2020-11-05T14:03:50
| 2020-11-05T14:03:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,327
|
java
|
package com.nicko.core.util.hastebin;
import com.google.gson.JsonParser;
import java.io.*;
public class HasteBin {
public static final String ENDPOINT = "https://hastebin.com/";
public static final String[] ENDPOINTS;
public static final String NEWENDPOINT = "https://hasteb.in/";
static {
ENDPOINTS = new String[]{"https://hasteb.in/", "https://hastebin.com/"};
}
private static String parseAndGet(final String s, final String s2) {
return new JsonParser().parse(s).getAsJsonObject().get(s2).getAsString();
}
public static String getPaste(final String s, final String s2) throws IOException {
/* final BufferedReader bufferedReader2;
final String s3;
String string;*/
return new HTTPRequest(s2 + "raw/" + s).open().doOutput(true).disconnectAndReturn(httpRequest -> {
/* new BufferedReader(new InputStreamReader(httpRequest.getHttpURLConnection().getInputStream()));
while (bufferedReader2.ready()) {
bufferedReader2.readLine();
if (s3.contains("package")) {
continue;
} else if (string.equals("")) {
string = s3;
} else {
string = string + "\n" + s3;
}
}
return string;*/
for (int i = 0; i < 10; i++) {
System.out.println("Failed to get Paste !");
}
return "";
});
}
public static String paste(final String s, final String s2) throws IOException {
return new HTTPRequest(s2 + "documents").open().requestMethod("POST").setConnectTimeout(1000).setReadTimeout(1000).setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36").doOutput(true).outputStream(outputStream -> new DataOutputStream((OutputStream) outputStream).writeBytes(s)).disconnectAndReturn(httpRequest -> {
StringBuilder sb = new StringBuilder().append(s2);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpRequest.getHttpURLConnection().getInputStream()));
return sb.append(parseAndGet(bufferedReader.readLine(), "key")).toString();
});
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
cdcc92b94c4ff3acb3d76c561ad17869e312c7fb
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14227-2-15-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/plugin/activitystream/impl/ActivityStreamConfiguration_ESTest.java
|
3c3c807c9c74cf6a11a03fbdb7aa2e2d045fa5c1
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 601
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Jan 18 18:41:54 UTC 2020
*/
package com.xpn.xwiki.plugin.activitystream.impl;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class ActivityStreamConfiguration_ESTest extends ActivityStreamConfiguration_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
50739bb9f7fe8b5bd7d98c9874e122720199b1d8
|
15cf8a940a99b1335250bff9f221cc08d5df9f0f
|
/src/com/google/android/gms/internal/v.java
|
65e7c2ab81b0f215a10bf4e98beee67d74a56b98
|
[] |
no_license
|
alamom/mcoc_mod_11.1
|
0e5153e0e7d83aa082c5447f991b2f6fa5c01d8b
|
d48cb0d2b3bc058bddb09c761ae5f443d9f2e93d
|
refs/heads/master
| 2021-01-11T17:12:37.894951
| 2017-01-22T19:55:38
| 2017-01-22T19:55:38
| 79,739,761
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,231
|
java
|
package com.google.android.gms.internal;
import android.net.Uri.Builder;
import android.os.Bundle;
import android.text.TextUtils;
@ez
public class v
{
private a lZ;
private boolean ma;
private boolean mb;
public v()
{
Bundle localBundle = gb.bD();
boolean bool1 = bool2;
if (localBundle != null)
{
bool1 = bool2;
if (localBundle.getBoolean("gads:block_autoclicks", false)) {
bool1 = true;
}
}
this.mb = bool1;
}
public v(boolean paramBoolean)
{
this.mb = paramBoolean;
}
public void a(a parama)
{
this.lZ = parama;
}
public void ar()
{
this.ma = true;
}
public boolean av()
{
if ((!this.mb) || (this.ma)) {}
for (boolean bool = true;; bool = false) {
return bool;
}
}
public void d(String paramString)
{
gs.S("Action was blocked because no click was detected.");
if (this.lZ != null) {
this.lZ.e(paramString);
}
}
public static abstract interface a
{
public abstract void e(String paramString);
}
@ez
public static class b
implements v.a
{
private final fz.a mc;
private final gv md;
public b(fz.a parama, gv paramgv)
{
this.mc = parama;
this.md = paramgv;
}
public void e(String paramString)
{
gs.S("An auto-clicking creative is blocked");
Uri.Builder localBuilder = new Uri.Builder();
localBuilder.scheme("https");
localBuilder.path("//pagead2.googlesyndication.com/pagead/gen_204");
localBuilder.appendQueryParameter("id", "gmob-apps-blocked-navigation");
if (!TextUtils.isEmpty(paramString)) {
localBuilder.appendQueryParameter("navigationURL", paramString);
}
if ((this.mc != null) && (this.mc.vw != null) && (!TextUtils.isEmpty(this.mc.vw.tN))) {
localBuilder.appendQueryParameter("debugDialog", this.mc.vw.tN);
}
gj.c(this.md.getContext(), this.md.dx().wD, localBuilder.toString());
}
}
}
/* Location: C:\tools\androidhack\marvel_bitva_chempionov_v11.1.0_mod_lenov.ru\classes.jar!\com\google\android\gms\internal\v.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"eduard.martini@gmail.com"
] |
eduard.martini@gmail.com
|
9fdb6140b11ef01ee9a1de955afa69c603d681a4
|
db59a5b1e8ca9788edfcf127da5e468acfbed2ff
|
/flash-pay-user/flash-pay-user-api/src/main/java/com/flash/user/api/dto/tenant/ChangeAccountPwdDTO.java
|
ad4649fb32799721c971ac8473fad7587254e48d
|
[
"Apache-2.0"
] |
permissive
|
smadol/flash-pay
|
337f429651fb56aac74c50a3683d92d1e3218085
|
038d5f76a50b421ed7627258b284d4b78cfb4ae1
|
refs/heads/master
| 2023-09-02T14:10:49.035275
| 2021-10-21T06:46:45
| 2021-10-21T06:46:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 515
|
java
|
package com.flash.user.api.dto.tenant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
@ApiModel(value = "ChangeAccountPwdDTO", description = "重置账号密码")
public class ChangeAccountPwdDTO implements Serializable {
@ApiModelProperty("账号Id")
private Long accountId;
@ApiModelProperty("账号名")
private String userName;
@ApiModelProperty("密码")
private String password;
}
|
[
"yueliminvc@outlook.com"
] |
yueliminvc@outlook.com
|
7128bb22a6fd1bd5afc2646f19b5dd21b9ee8f6d
|
fc6c869ee0228497e41bf357e2803713cdaed63e
|
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/appbrand/menu/a.java
|
e95bebee584d3f9c013e4c085db4eca334bc8a89
|
[] |
no_license
|
hyb1234hi/reverse-wechat
|
cbd26658a667b0c498d2a26a403f93dbeb270b72
|
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
|
refs/heads/master
| 2020-09-26T10:12:47.484174
| 2017-11-16T06:54:20
| 2017-11-16T06:54:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,718
|
java
|
package com.tencent.mm.plugin.appbrand.menu;
import android.content.Context;
import android.graphics.Color;
import android.graphics.Paint;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.TextUtils.TruncateAt;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.ForegroundColorSpan;
import com.tencent.gmtrace.GMTrace;
import com.tencent.mm.plugin.appbrand.appcache.WxaPkgWrappingInfo;
import com.tencent.mm.plugin.appbrand.config.AppBrandSysConfig;
import com.tencent.mm.plugin.appbrand.config.WxaExposedParams.a;
import com.tencent.mm.plugin.appbrand.e;
import com.tencent.mm.plugin.appbrand.h;
import com.tencent.mm.plugin.appbrand.jsapi.op_report.AppBrandOpReportLogic.a;
import com.tencent.mm.plugin.appbrand.o.c;
import com.tencent.mm.plugin.appbrand.o.d;
import com.tencent.mm.plugin.appbrand.o.i;
import com.tencent.mm.plugin.appbrand.page.AppBrandPageView;
import com.tencent.mm.plugin.appbrand.page.t;
import com.tencent.mm.plugin.appbrand.ui.AppBrandProfileUI;
import com.tencent.mm.plugin.appbrand.ui.g;
import com.tencent.mm.plugin.appbrand.widget.f.b;
import com.tencent.mm.sdk.platformtools.bg;
import com.tencent.mm.ui.base.n;
public final class a
extends com.tencent.mm.plugin.appbrand.menu.a.a
{
private static boolean isd;
public a(boolean paramBoolean)
{
super(l.isw - 1);
GMTrace.i(20686173110272L, 154124);
isd = paramBoolean;
GMTrace.o(20686173110272L, 154124);
}
public final void a(Context paramContext, AppBrandPageView paramAppBrandPageView, n paramn, String paramString)
{
GMTrace.i(17667347972096L, 131632);
paramAppBrandPageView = paramAppBrandPageView.hzM.hyG;
int k = l.isw;
paramString = paramAppBrandPageView.eEs;
int i = paramAppBrandPageView.hRg.hKB;
paramAppBrandPageView = paramContext.getString(o.i.cRP, new Object[] { paramString });
String str = com.tencent.mm.plugin.appbrand.appcache.a.hW(i);
if (bg.nm(str))
{
paramContext = paramAppBrandPageView;
paramn.e(k - 1, paramContext);
GMTrace.o(17667347972096L, 131632);
return;
}
int j = Color.parseColor("#42000000");
i = com.tencent.mm.br.a.c(paramContext, o.c.hAc);
if (isd)
{
j = Color.parseColor("#80FFFFFF");
i = com.tencent.mm.br.a.c(paramContext, o.c.aPq);
}
for (;;)
{
paramString = new b(str, com.tencent.mm.br.a.fromDPToPix(paramContext, 11), com.tencent.mm.br.a.fromDPToPix(paramContext, 11), com.tencent.mm.br.a.fromDPToPix(paramContext, 9), j, com.tencent.mm.br.a.fromDPToPix(paramContext, 2));
j = paramString.a(null);
int[] arrayOfInt = g.aaW();
int m = com.tencent.mm.br.a.V(paramContext, o.d.hAo);
TextPaint localTextPaint = new TextPaint(new Paint(i));
localTextPaint.setTextSize(m);
paramAppBrandPageView = TextUtils.ellipsize(paramAppBrandPageView, localTextPaint, arrayOfInt[0] - com.tencent.mm.br.a.V(paramContext, o.d.hAn) - j, TextUtils.TruncateAt.END);
paramContext = new SpannableStringBuilder(paramAppBrandPageView + str);
paramContext.setSpan(new AbsoluteSizeSpan(m, false), 0, paramAppBrandPageView.length(), 18);
paramContext.setSpan(new ForegroundColorSpan(i), 0, paramAppBrandPageView.length(), 18);
paramContext.setSpan(paramString, paramAppBrandPageView.length(), paramContext.length(), 18);
break;
}
}
public final void a(Context paramContext, AppBrandPageView paramAppBrandPageView, String paramString, k paramk)
{
GMTrace.i(15552076578816L, 115872);
AppBrandSysConfig localAppBrandSysConfig = com.tencent.mm.plugin.appbrand.a.nK(paramString);
if (localAppBrandSysConfig == null)
{
GMTrace.o(15552076578816L, 115872);
return;
}
paramk = "";
if (com.tencent.mm.plugin.appbrand.a.nL(paramString) != null) {
paramk = bg.nl(h.f(paramAppBrandPageView.hzM).hzG);
}
AppBrandOpReportLogic.a.Xd();
WxaExposedParams.a locala = new WxaExposedParams.a();
locala.appId = localAppBrandSysConfig.appId;
locala.eDj = 3;
locala.ePf = paramAppBrandPageView.ivj.hZo;
locala.hKB = localAppBrandSysConfig.hRg.hKB;
locala.hKC = localAppBrandSysConfig.hRg.hKC;
AppBrandProfileUI.a(paramContext, localAppBrandSysConfig.eAr, paramk, locala.UI());
com.tencent.mm.plugin.appbrand.report.a.a(paramString, paramAppBrandPageView.ivj.hZo, 6, "", bg.Pu(), 1, 0);
GMTrace.o(15552076578816L, 115872);
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes2-dex2jar.jar!\com\tencent\mm\plugin\appbrand\menu\a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"robert0825@gmail.com"
] |
robert0825@gmail.com
|
da89b6493703a7926bf5aa328659ddfdb5fe755b
|
6c777cf936e7375f8f50f47124e58397e61971f3
|
/player-core/pregen/com/platforge/data/action/ActionTriggerEvent.java
|
05c5d7d12849b3cbbd76e9bcd85d50cf366407ba
|
[] |
no_license
|
thomaswp/platforge
|
ace1a3c8385b7b477d146ddd15cf89e868ba9355
|
067aab6cc31b3419596f7e42d28340db9ad82727
|
refs/heads/master
| 2021-01-18T13:53:31.231287
| 2015-01-02T03:53:22
| 2015-01-02T03:53:22
| 12,644,628
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 983
|
java
|
package com.platforge.data.action;
import com.platforge.data.*;
import com.platforge.data.types.*;
import com.platforge.data.Event.Parameters;
import com.platforge.data.Event.Parameters.Iterator;
import com.platforge.player.core.input.*;
import com.platforge.player.core.platform.*;
import com.platforge.player.core.action.*;
@SuppressWarnings("unused")
public class ActionTriggerEvent extends ScriptableInstance {
public static final String NAME = "Trigger Event";
public static final int ID = 23;
public static final String CATEGORY = "Control";
/** Type: <b><event></b> */
public Object event;
public Event readEvent(GameState gameState) throws ParameterException {
return gameState.readEvent(event);
}
@Override
public void readParams(Iterator iterator) {
event = iterator.getObject();
}
/**
* 023 <b><i>Trigger Event</i></b> (Control)<br />
* <ul>
* <li><b><event></b> event</li>
* </ul>
*/
public static final String JAVADOC = "";
}
|
[
"thomaswprice@msn.com"
] |
thomaswprice@msn.com
|
1537d1f9732fa09e320c74ff178e06d51bb6d7c6
|
3bb9e1a187cb72e2620a40aa208bf94e5cee46f5
|
/mobile_catalog/src/ong/eu/soon/ifx/rate/ForExDealModRs.java
|
4bb79c586b32a6c59f5109da32b542d4f67c453b
|
[] |
no_license
|
eusoon/Mobile-Catalog
|
2e6f766864ea25f659f87548559502358ac5466c
|
869d7588447117b751fcd1387cd84be0bd66ef26
|
refs/heads/master
| 2021-01-22T23:49:12.717052
| 2013-12-10T08:22:20
| 2013-12-10T08:22:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,576
|
java
|
package ong.eu.soon.ifx.rate;
import ong.eu.soon.ifx.basetypes.IFXObject;
import ong.eu.soon.ifx.element.ForExDealRec;
import ong.eu.soon.ifx.element.ForExDealStatusRec;
import ong.eu.soon.ifx.element.MsgRsHdr;
import ong.eu.soon.ifx.element.RqUID;
import ong.eu.soon.ifx.element.Status;
public class ForExDealModRs extends IFXObject {
Status status; //Aggregate Optional Response Status
RqUID rqUID; //UUID Required Request Identifier
MsgRsHdr msgRsHdr; //Aggregate Optional Message Response Header
//end-block
//begin-block Optional required if message is successful
//begin-xor Required
ForExDealRec forExDealRec; //Aggregate Required Foreign Exchange Deal Record
ForExDealStatusRec forExDealStatusRec; //Aggregate Required ForExDealStatusRec
//end-xor
//end-block
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public RqUID getRqUID() {
return rqUID;
}
public void setRqUID(RqUID rqUID) {
this.rqUID = rqUID;
}
public MsgRsHdr getMsgRsHdr() {
return msgRsHdr;
}
public void setMsgRsHdr(MsgRsHdr msgRsHdr) {
this.msgRsHdr = msgRsHdr;
}
public ForExDealRec getForExDealRec() {
return forExDealRec;
}
public void setForExDealRec(ForExDealRec forExDealRec) {
this.forExDealRec = forExDealRec;
}
public ForExDealStatusRec getForExDealStatusRec() {
return forExDealStatusRec;
}
public void setForExDealStatusRec(ForExDealStatusRec forExDealStatusRec) {
this.forExDealStatusRec = forExDealStatusRec;
}
}
|
[
"eusoon@gmail.com"
] |
eusoon@gmail.com
|
dce9c0be8a6526d2904706c2c00476aea45ba884
|
665a19e9d372cf33a95254860d01ec7682165cea
|
/quizzApp/app/src/main/java/org/aston/quizzapp/SecondFragment.java
|
518da89742f7521e5bfd62508776e25d0e4167db
|
[] |
no_license
|
Fouzia09/Quizz
|
f4b2af5738f578631a5f020b09f9fcf6ffe7bf9b
|
5e3f0d0d59d7bba643705391b83615da6ae6baa0
|
refs/heads/main
| 2023-08-03T07:32:53.954013
| 2021-09-21T00:34:16
| 2021-09-21T00:34:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,274
|
java
|
package org.aston.quizzapp;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import org.aston.quizzapp.databinding.FragmentSecondBinding;
public class SecondFragment extends Fragment {
private FragmentSecondBinding binding;
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState
) {
binding = FragmentSecondBinding.inflate(inflater, container, false);
return binding.getRoot();
}
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
binding.buttonSecond.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavHostFragment.findNavController(SecondFragment.this)
.navigate(R.id.action_SecondFragment_to_FirstFragment);
}
});
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}
|
[
"abdalfadeil@gmail.com"
] |
abdalfadeil@gmail.com
|
3e9c59d40cb3cf8706e72f52629c094fcfc70203
|
354ed8b713c775382b1e2c4d91706eeb1671398b
|
/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java
|
21792cb9f4f0c9b7bdc04ae8d0ce12760b84fb86
|
[] |
no_license
|
JessenPan/spring-framework
|
8c7cc66252c2c0e8517774d81a083664e1ad4369
|
c0c588454a71f8245ec1d6c12f209f95d3d807ea
|
refs/heads/master
| 2021-06-30T00:54:08.230154
| 2019-10-08T10:20:25
| 2019-10-08T10:20:25
| 91,221,166
| 2
| 0
| null | 2017-05-14T05:01:43
| 2017-05-14T05:01:42
| null |
UTF-8
|
Java
| false
| false
| 1,484
|
java
|
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.jms.core;
import javax.jms.JMSException;
import javax.jms.Session;
/**
* Callback for executing any number of operations on a provided
* {@link Session}.
* <p>
* <p>To be used with the {@link JmsTemplate#execute(SessionCallback)}
* method, often implemented as an anonymous inner class.
*
* @author Mark Pollack
* @see JmsTemplate#execute(SessionCallback)
* @since 1.1
*/
public interface SessionCallback<T> {
/**
* Execute any number of operations against the supplied JMS
* {@link Session}, possibly returning a result.
*
* @param session the JMS {@code Session}
* @return a result object from working with the {@code Session}, if any (so can be {@code null})
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
T doInJms(Session session) throws JMSException;
}
|
[
"jessenpan@qq.com"
] |
jessenpan@qq.com
|
17208b79d63376860d261a5ccf9d01e4537a7532
|
6481f78599d01a5add7ad3c45f19593a71f4bd87
|
/src/main/java/fr/gest/com/application/domain/Habilitation.java
|
5ff01f944e2a1ab724db4f4e287f1711e5dc677b
|
[] |
no_license
|
asessoum/gestApp
|
9964ac618b0bae751c123025f4d452d2dae776e2
|
b16b9d0a83f6b613f49045fab4c44554cc860460
|
refs/heads/master
| 2022-12-22T08:17:47.775031
| 2019-06-21T15:41:09
| 2019-06-21T15:41:09
| 193,114,106
| 0
| 1
| null | 2022-12-16T05:01:13
| 2019-06-21T14:43:04
|
Java
|
UTF-8
|
Java
| false
| false
| 4,904
|
java
|
package fr.gest.com.application.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
/**
* A Habilitation.
*/
@Entity
@Table(name = "habilitation")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Habilitation implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Size(max = 250)
@Column(name = "tech_id", length = 250, nullable = false)
private String techID;
@NotNull
@Column(name = "remote_id", nullable = false)
private Integer remoteID;
@NotNull
@Size(max = 15)
@Column(name = "profile", length = 15, nullable = false)
private String profile;
@NotNull
@Size(max = 50)
@Column(name = "ressource", length = 50, nullable = false)
private String ressource;
@NotNull
@Size(max = 10)
@Column(name = "permission", length = 10, nullable = false)
private String permission;
@NotNull
@Size(max = 2)
@Column(name = "acces", length = 2, nullable = false)
private String acces;
@OneToMany(mappedBy = "habilitations")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Set<Partenaire> partenaires = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTechID() {
return techID;
}
public Habilitation techID(String techID) {
this.techID = techID;
return this;
}
public void setTechID(String techID) {
this.techID = techID;
}
public Integer getRemoteID() {
return remoteID;
}
public Habilitation remoteID(Integer remoteID) {
this.remoteID = remoteID;
return this;
}
public void setRemoteID(Integer remoteID) {
this.remoteID = remoteID;
}
public String getProfile() {
return profile;
}
public Habilitation profile(String profile) {
this.profile = profile;
return this;
}
public void setProfile(String profile) {
this.profile = profile;
}
public String getRessource() {
return ressource;
}
public Habilitation ressource(String ressource) {
this.ressource = ressource;
return this;
}
public void setRessource(String ressource) {
this.ressource = ressource;
}
public String getPermission() {
return permission;
}
public Habilitation permission(String permission) {
this.permission = permission;
return this;
}
public void setPermission(String permission) {
this.permission = permission;
}
public String getAcces() {
return acces;
}
public Habilitation acces(String acces) {
this.acces = acces;
return this;
}
public void setAcces(String acces) {
this.acces = acces;
}
public Set<Partenaire> getPartenaires() {
return partenaires;
}
public Habilitation partenaires(Set<Partenaire> partenaires) {
this.partenaires = partenaires;
return this;
}
public Habilitation addPartenaire(Partenaire partenaire) {
this.partenaires.add(partenaire);
partenaire.setHabilitations(this);
return this;
}
public Habilitation removePartenaire(Partenaire partenaire) {
this.partenaires.remove(partenaire);
partenaire.setHabilitations(null);
return this;
}
public void setPartenaires(Set<Partenaire> partenaires) {
this.partenaires = partenaires;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Habilitation)) {
return false;
}
return id != null && id.equals(((Habilitation) o).id);
}
@Override
public int hashCode() {
return 31;
}
@Override
public String toString() {
return "Habilitation{" +
"id=" + getId() +
", techID='" + getTechID() + "'" +
", remoteID=" + getRemoteID() +
", profile='" + getProfile() + "'" +
", ressource='" + getRessource() + "'" +
", permission='" + getPermission() + "'" +
", acces='" + getAcces() + "'" +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
78fe731b3d7a9fdbcdd072f1855a737535ed8b87
|
5bdac3811532191aa7c9a3c62831d7fabd63ea7b
|
/schemacrawler-hsqldb/src/test/java/schemacrawler/integration/test/HsqldbCommandlineTest.java
|
9d01e7866ea1e671d76b8d098d9a20f2b597d5c3
|
[
"BSD-3-Clause"
] |
permissive
|
charan493/SchemaCrawler
|
a9626caada152c2c3ec815b7ae7910006dc97707
|
2bf130c86475cdb1c612c78bf0090d3d8a025537
|
refs/heads/master
| 2020-04-11T22:31:54.475283
| 2018-12-16T15:20:58
| 2018-12-16T15:20:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,255
|
java
|
/*
========================================================================
SchemaCrawler
http://www.schemacrawler.com
Copyright (c) 2000-2019, Sualeh Fatehi <sualeh@hotmail.com>.
All rights reserved.
------------------------------------------------------------------------
SchemaCrawler 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.
SchemaCrawler and the accompanying materials are made available under
the terms of the Eclipse Public License v1.0, GNU General Public License
v3 or GNU Lesser General Public License v3.
You may elect to redistribute this code under any of these licenses.
The Eclipse Public License is available at:
http://www.eclipse.org/legal/epl-v10.html
The GNU General Public License v3 and the GNU Lesser General Public
License v3 are available at:
http://www.gnu.org/licenses/
========================================================================
*/
package schemacrawler.integration.test;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.nio.file.Files.newBufferedWriter;
import static java.nio.file.StandardOpenOption.CREATE;
import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING;
import static java.nio.file.StandardOpenOption.WRITE;
import static java.util.Objects.requireNonNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static schemacrawler.test.utility.FileHasContent.classpathResource;
import static schemacrawler.test.utility.FileHasContent.fileResource;
import static schemacrawler.test.utility.FileHasContent.hasSameContentAndTypeAs;
import static schemacrawler.test.utility.TestUtility.flattenCommandlineArgs;
import static sf.util.DatabaseUtility.checkConnection;
import java.io.PrintWriter;
import java.io.Writer;
import java.nio.file.Path;
import java.sql.Connection;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.junit.Test;
import schemacrawler.Main;
import schemacrawler.crawl.SchemaCrawler;
import schemacrawler.schema.Catalog;
import schemacrawler.schema.Schema;
import schemacrawler.schema.Table;
import schemacrawler.schemacrawler.SchemaCrawlerOptions;
import schemacrawler.schemacrawler.SchemaCrawlerOptionsBuilder;
import schemacrawler.schemacrawler.SchemaRetrievalOptions;
import schemacrawler.server.hsqldb.HyperSQLDatabaseConnector;
import schemacrawler.test.utility.BaseDatabaseTest;
import schemacrawler.test.utility.TestWriter;
import schemacrawler.tools.databaseconnector.DatabaseConnector;
import schemacrawler.tools.options.OutputFormat;
import schemacrawler.tools.options.TextOutputFormat;
import sf.util.IOUtility;
public class HsqldbCommandlineTest
extends BaseDatabaseTest
{
@Test
public void testHsqldbMain()
throws Exception
{
final Path testConfigFile = IOUtility.createTempFilePath("test",
"properties");
try (
final Writer writer = new PrintWriter(newBufferedWriter(testConfigFile,
UTF_8,
WRITE,
TRUNCATE_EXISTING,
CREATE));)
{
final Properties properties = new Properties();
properties
.setProperty("hsqldb.tables",
"SELECT TABLE_CAT, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, REMARKS FROM INFORMATION_SCHEMA.SYSTEM_TABLES");
properties.store(writer, "testHsqldbMain");
}
final OutputFormat outputFormat = TextOutputFormat.text;
final TestWriter testout = new TestWriter();
try (final TestWriter out = testout;)
{
final Map<String, String> argsMap = new HashMap<>();
argsMap.put("server", "hsqldb");
argsMap.put("database", "schemacrawler");
argsMap.put("user", "sa");
argsMap.put("password", null);
argsMap.put("g", testConfigFile.toString());
argsMap.put("noinfo", Boolean.FALSE.toString());
argsMap.put("command", "details,dump,count,hsqldb.tables");
argsMap.put("infolevel", "maximum");
argsMap.put("synonyms", ".*");
argsMap.put("routines", ".*");
argsMap.put("outputfile", out.toString());
Main.main(flattenCommandlineArgs(argsMap));
}
assertThat(fileResource(testout),
hasSameContentAndTypeAs(classpathResource("hsqldb.main" + "."
+ outputFormat
.getFormat()),
outputFormat.getFormat()));
}
@Test
public void testHsqldbWithConnection()
throws Exception
{
final Connection connection = checkConnection(getConnection());
final DatabaseConnector hsqldbSystemConnector = new HyperSQLDatabaseConnector();
final SchemaRetrievalOptions schemaRetrievalOptions = hsqldbSystemConnector
.getSchemaRetrievalOptionsBuilder(connection).toOptions();
final SchemaCrawlerOptions schemaCrawlerOptions = SchemaCrawlerOptionsBuilder
.withMaximumSchemaInfoLevel();
requireNonNull(schemaRetrievalOptions,
"No database specific override options provided");
final SchemaCrawler schemaCrawler = new SchemaCrawler(connection,
schemaRetrievalOptions,
schemaCrawlerOptions);
final Catalog catalog1 = schemaCrawler.crawl();
final Catalog catalog = catalog1;
assertNotNull(catalog);
assertEquals(6, catalog.getSchemas().size());
final Schema schema = catalog.lookupSchema("PUBLIC.BOOKS").orElse(null);
assertNotNull(schema);
assertEquals(10, catalog.getTables(schema).size());
final Table table = catalog.lookupTable(schema, "AUTHORS").orElse(null);
assertNotNull(table);
assertEquals(1, table.getTriggers().size());
assertNotNull(table.lookupTrigger("TRG_AUTHORS").orElse(null));
}
}
|
[
"sualeh@hotmail.com"
] |
sualeh@hotmail.com
|
5402cfe3f52c1b9f05e72b4dd3a440d4a9a4eee9
|
b4c47b649e6e8b5fc48eed12fbfebeead32abc08
|
/miui/maml/animation/interpolater/BackEaseInInterpolater.java
|
b625dd5ed20c9e01ed0a672db3397b15308ba1a9
|
[] |
no_license
|
neetavarkala/miui_framework_clover
|
300a2b435330b928ac96714ca9efab507ef01533
|
2670fd5d0ddb62f5e537f3e89648d86d946bd6bc
|
refs/heads/master
| 2022-01-16T09:24:02.202222
| 2018-09-01T13:39:50
| 2018-09-01T13:39:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 637
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
package miui.maml.animation.interpolater;
import android.view.animation.Interpolator;
public class BackEaseInInterpolater
implements Interpolator
{
public BackEaseInInterpolater()
{
mFactor = 1.70158F;
}
public BackEaseInInterpolater(float f)
{
mFactor = f;
}
public float getInterpolation(float f)
{
return f * f * ((mFactor + 1.0F) * f - mFactor);
}
private final float mFactor;
}
|
[
"hosigumayuugi@gmail.com"
] |
hosigumayuugi@gmail.com
|
301dd553af1002d0480f3877393a4a199a969aaa
|
311918587dec5cce54cd436aa437222481c93073
|
/coding_tx/src/main/java/com/temp/common/base/io/img/FileInputRead.java
|
2d11539a2d299271e5977d2f449fc9ea127364a7
|
[] |
no_license
|
liwen666/component
|
7f7ad2290e77632490012306cc835d43c71c8ca6
|
2b1839954bb58eb0adad9e32090d9b971c1577b9
|
refs/heads/master
| 2022-12-21T11:14:17.461104
| 2021-04-25T08:49:41
| 2021-04-25T08:49:41
| 163,070,384
| 0
| 1
| null | 2022-12-10T06:15:07
| 2018-12-25T09:55:09
|
Java
|
UTF-8
|
Java
| false
| false
| 3,273
|
java
|
package com.temp.common.base.io.img;
import com.temp.common.base.io.high.EncodingDetect;
import java.io.*;
public class FileInputRead {
public static void main(String[] args) throws IOException {
// File f = new File("D:\\component\\component\\coding_tx\\src\\main\\java\\com\\temp\\common\\base\\io\\img\\iso8859.png");
File f = new File("D:\\component\\component\\coding_tx\\src\\main\\java\\com\\temp\\common\\base\\io\\img\\1547802467(1).png");
InputStreamReader isr =new FileReader(f);
byte[] cache = new byte[1000];
int rel = 0;
char [] cacheCache = new char[2];
while ((rel=isr.read(cacheCache))!=-1){
System.out.println(rel);
System.out.println(new String(cacheCache,0,rel));
}
System.out.println(rel);
FileInputStream fis = new FileInputStream(f);
rel=0;
File fo = new File("D:\\component\\component\\coding_tx\\src\\main\\java\\com\\temp\\common\\base\\io\\img\\utf8.png");
if(fo.exists()){
fo.createNewFile();
}
BufferedInputStream bis = new BufferedInputStream(fis);
FileOutputStream fos = new FileOutputStream(fo);
bis.mark(1000000000);
System.out.println("-------------------------");
while ((rel=bis.read(cache))!=-1){
System.out.println(rel);
System.out.println(new String(cache,0,rel,"utf8"));
fos.write(cache,0,rel);
}
System.out.println("编码==============="+ EncodingDetect.getJavaEncode(cache));
bis.reset();
byte [] newbyte = new byte[1000];
rel =0;
while ((rel=bis.read(newbyte))!=-1){
System.out.println(rel);
System.out.println(new String(newbyte,0,rel,"utf8"));
fos.write(newbyte,0,rel);
}
System.out.println("编码==============="+ EncodingDetect.getJavaEncode(newbyte));
bis.reset();
rel = 0;
char[] charArr = new char[100];
InputStreamReader isrs = new InputStreamReader(bis);
OutputStreamWriter osw = new OutputStreamWriter(fos,"utf8");
while ((rel=isrs.read(charArr))!=-1){
System.out.println(rel);
System.out.println(new String(newbyte,0,rel,"utf8"));
osw.write(charArr,0,rel);
}
System.out.println(rel);
}
static class TxEncode{
public static void main(String[] args) throws IOException {
// File f = new File("D:\\component\\component\\coding_tx\\src\\main\\java\\com\\temp\\common\\base\\io\\img\\1547802467(1).png");
// File f = new File("D:\\component\\component\\coding_tx\\src\\main\\java\\com\\temp\\common\\base\\io\\img\\iso8859.png");
File f = new File("D:\\component\\component\\coding_tx\\src\\main\\java\\com\\temp\\common\\base\\io\\img\\utf8.png");
FileInputStream fis = new FileInputStream(f);
byte[] cache = new byte[1000];
int rel = 0;
char [] cacheCache = new char[2];
while ((rel=fis.read(cache))!=-1){
System.out.println(rel);
}
System.out.println("编码==============="+ EncodingDetect.getJavaEncode(cache));
}
}
}
|
[
"1316138287@qq.com"
] |
1316138287@qq.com
|
eee6fee18442b14e9612dbe5f69935727d9ab17e
|
59edd26866e43fd9d7451884060cad84f7c92f2f
|
/src/main/java/com/xthena/party/web/TreeController.java
|
a9473847b4d22fabac4d48c8163c477027355c5d
|
[
"Apache-2.0"
] |
permissive
|
jianbingfang/xhf
|
fd61f49438721df84df4e009b1208622fca9f137
|
a9f008c904943e8a2cbed9c67e03e5c18c659444
|
refs/heads/master
| 2021-01-18T14:41:04.209961
| 2015-09-07T17:17:08
| 2015-09-07T17:17:08
| 33,782,876
| 2
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,874
|
java
|
package com.xthena.party.web;
import java.util.List;
import javax.annotation.Resource;
import com.xthena.party.domain.PartyEntity;
import com.xthena.party.domain.PartyStructType;
import com.xthena.party.manager.PartyEntityManager;
import com.xthena.party.manager.PartyStructTypeManager;
import com.xthena.party.service.PartyService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
@RequestMapping("party")
public class TreeController {
private PartyEntityManager partyEntityManager;
private PartyStructTypeManager partyStructTypeManager;
private PartyService partyService;
@RequestMapping("tree-list")
public String list(
@RequestParam(value = "partyStructTypeId", required = false) Long partyStructTypeId,
Model model) {
List<PartyStructType> partyStructTypes = partyStructTypeManager
.getAll();
List<PartyEntity> partyEntities = partyService
.getTopPartyEntities(partyStructTypeId);
model.addAttribute("partyStructTypes", partyStructTypes);
model.addAttribute("partyEntities", partyEntities);
return "party/tree-list";
}
// ~ ======================================================================
@Resource
public void setPartyEntityManager(PartyEntityManager partyEntityManager) {
this.partyEntityManager = partyEntityManager;
}
@Resource
public void setPartyStructTypeManager(
PartyStructTypeManager partyStructTypeManager) {
this.partyStructTypeManager = partyStructTypeManager;
}
@Resource
public void setPartyService(PartyService partyService) {
this.partyService = partyService;
}
}
|
[
"jianbingfang@gmail.com"
] |
jianbingfang@gmail.com
|
56dc9f66b04c7d911449867cc3f4a038f6f471ba
|
135bec354622330ea6bcf637ef52c7363fb97467
|
/src/ArraysMix/RandomArrayForeach.java
|
11a92c4fbcd787c800337768c02024b66f49075d
|
[] |
no_license
|
Orlando-Houston/Java
|
1b057b2e6447ba79e2173462139c6714c6743b4c
|
b6ccbf6c05d9cbec9580875be7c5edd6e42f0de9
|
refs/heads/master
| 2020-08-31T09:12:40.047696
| 2020-06-23T22:44:04
| 2020-06-23T22:44:04
| 238,321,900
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 897
|
java
|
package ArraysMix;
public class RandomArrayForeach {
public static void main(String[] args) {
int[] arrayNumbers= new int[10];
for(int i=0 ; i<arrayNumbers.length;i++){
arrayNumbers[i]=(int)(Math.random()*1000);
}
for(int number:arrayNumbers){
System.out.println(number);
}
//System.out.println(generateRandomWord());
String[] arrayString = new String[20];
for(int i=0 ; i<arrayString.length;i++){
arrayString[i]=generateRandomWord();
}
for(String word:arrayString){
System.out.println(word);
}
}
public static String generateRandomWord(){
String word="";
int wordLength= (int)(Math.random()*6+1);
for(int i=0 ; i<wordLength;i++){
word+=(char)((int)(Math.random()*26+97));
}
return word;
}
}
|
[
"a.ozder@outlook.com"
] |
a.ozder@outlook.com
|
f07f68fc02accced2fb45d0c379d481bb0f5a9ae
|
71b912e47ad8e73a651c79670a8a9377eaff2110
|
/lac3/lac3-fs/src/main/java/com/linkallcloud/fs/exception/FdfsUnsupportStorePathException.java
|
bd1be70677d20960dad87572e582f72460dcb075
|
[] |
no_license
|
jasonzhoumj/lac3
|
5f47cc227e631fd1be201e005ab9f3bbac5431bf
|
fba08c10693f5745914d446222718cfacec3def9
|
refs/heads/master
| 2021-03-28T12:55:26.875522
| 2020-03-11T01:28:52
| 2020-03-11T01:28:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 336
|
java
|
package com.linkallcloud.fs.exception;
/**
* 从Url解析StorePath文件路径对象错误
*
*/
public class FdfsUnsupportStorePathException extends FdfsException {
private static final long serialVersionUID = 8116336411011152869L;
public FdfsUnsupportStorePathException(String message) {
super(message);
}
}
|
[
"838485220@qq.com"
] |
838485220@qq.com
|
01e4aa8560b61d80f8148562acbde9ed298fed21
|
11c87342e54783eaa6978df8de706fd87c227e09
|
/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/Node.java
|
9c8961de4136485b5b2331156106156bfae1c4da
|
[
"Apache-2.0"
] |
permissive
|
miremond/undertow
|
edc9a51408f67a7829a4eb13669872137fd3dc4e
|
0dd642f4a6ab1a66009f1314cffa52a32fccb9b1
|
refs/heads/master
| 2021-01-22T16:32:47.029484
| 2014-04-10T22:45:58
| 2014-04-10T22:45:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,974
|
java
|
package io.undertow.server.handlers.proxy.mod_cluster;
import io.undertow.client.UndertowClient;
import io.undertow.server.HttpServerExchange;
import io.undertow.server.handlers.proxy.ConnectionPoolManager;
import io.undertow.server.handlers.proxy.ProxyCallback;
import io.undertow.server.handlers.proxy.ProxyClient;
import io.undertow.server.handlers.proxy.ProxyConnection;
import io.undertow.server.handlers.proxy.ProxyConnectionPool;
import org.xnio.ssl.XnioSsl;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Represents a node, as identified by the JVM route.
*
* This is broken into two parts, the config which is represented by an immutable config object,
* and the current state which is mutable object that represents the current state of the node.
*
*
* @author Stuart Douglas
*/
public class Node {
private static final AtomicInteger counter = new AtomicInteger(0);
private final int id;
private final String jvmRoute;
private final ModClusterContainer container;
private final ConnectionPoolManager connectionPoolManager;
private final XnioSsl xnioSsl;
private final UndertowClient client;
private final NodeState nodeState;
private volatile NodeConfig nodeConfig;
private volatile ProxyConnectionPool connectionPool;
Node(final NodeConfig nodeConfig, ModClusterContainer container, XnioSsl xnioSsl, UndertowClient client) {
this.nodeConfig = nodeConfig;
this.nodeState = new NodeState();
this.xnioSsl = xnioSsl;
this.client = client;
id = counter.incrementAndGet();
this.jvmRoute = nodeConfig.getJvmRoute();
this.container = container;
this.connectionPoolManager = new NodeConnectionPoolManager();
}
synchronized void updateConfig(NodeConfig config) {
//TODO: do more stuff
ProxyConnectionPool pool = connectionPool;
this.connectionPool = null;
pool.close();
this.nodeConfig = config;
}
public NodeState getNodeState() {
return nodeState;
}
public NodeConfig getNodeConfig() {
return nodeConfig;
}
public int getId() {
return id;
}
public ProxyConnectionPool getConnectionPool() {
if(connectionPool == null) {
synchronized (this) {
if(connectionPool == null) {
try {
connectionPool = new ProxyConnectionPool(connectionPoolManager, new URI(nodeConfig.getType(), null, nodeConfig.getHostname(), nodeConfig.getPort(), "/", "", ""), xnioSsl, client);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}
}
}
return connectionPool;
}
/**
* @param pos the position of the node in the list
* @return the global information about the node
*/
public String getInfos(int pos) {
return new StringBuilder("Node: [" + pos + "],Name: ").append(nodeConfig.getJvmRoute()).append("Balancer: ").append(nodeConfig.getBalancer())
.append(",LBGroup: ").append(nodeConfig.getDomain()).append(",Host: ").append(nodeConfig.getHostname()).append(",Port: ")
.append(nodeConfig.getPort()).append(",Type: ").append(nodeConfig.getType()).append(",Flushpackets: ")
.append((nodeConfig.isFlushPackets() ? "On" : "Off")).append(",Flushwait: ").append(nodeConfig.getFlushwait()).append(",Ping: ")
.append(nodeConfig.getPing()).append(",Smax: ").append(nodeConfig.getSmax()).append(",Ttl: ").append(nodeConfig.getTtl()).append(",Elected: ")
.append(nodeState.getElected()).append(",Read: ").append(nodeState.getRead()).append(",Transfered: ").append(nodeState.getTransfered())
.append(",Connected: ").append(nodeState.getConnected()).append(",Load: ").append(nodeState.getLoad()).append("\n").toString();
}
@Override
public String toString() {
// TODO complete node name
StringBuilder sb = new StringBuilder("Node: [x:y]").append("], Balancer: ").append(nodeConfig.getBalancer())
.append(", JVMRoute: ").append(nodeConfig.getJvmRoute()).append(", Domain: [").append(nodeConfig.getDomain()).append("], Host: ")
.append(nodeConfig.getHostname()).append(", Port: ").append(nodeConfig.getPort()).append(", Type: ").append(nodeConfig.getType())
.append(", flush-packets: ").append(nodeConfig.isFlushPackets() ? 1 : 0).append(", flush-wait: ").append(nodeConfig.getFlushwait())
.append(", Ping: ").append(nodeConfig.getPing()).append(", smax: ").append(nodeConfig.getSmax()).append(", TTL: ").append(nodeConfig.getTtl())
.append(", Timeout: ").append(nodeConfig.getTimeout());
return sb.toString();
}
public String getJvmRoute() {
return jvmRoute;
}
private class NodeConnectionPoolManager implements ConnectionPoolManager {
//TODO: this whole thing...
@Override
public boolean canCreateConnection(int connections, ProxyConnectionPool proxyConnectionPool) {
return true;
}
@Override
public void queuedConnectionFailed(ProxyClient.ProxyTarget proxyTarget, HttpServerExchange exchange, ProxyCallback<ProxyConnection> callback, long timeoutMills) {
//TODO: ?????
Node node = container.findNode(exchange);
if(node == null || node == Node.this) {
callback.failed(exchange);
return;
}
node.getConnectionPool().connect(proxyTarget, exchange, callback, timeoutMills, TimeUnit.MILLISECONDS, false);
}
@Override
public int getProblemServerRetry() {
return nodeConfig.getPing();//TODO????
}
}
}
|
[
"stuart.w.douglas@gmail.com"
] |
stuart.w.douglas@gmail.com
|
47b7a083eb0b4854f19b4df2f639f1689bc4789f
|
8d9293642d3c12f81cc5f930e0147a9d65bd6efb
|
/src/main/java/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java
|
6f93ddd4094d57543e112706380bd61fc582f730
|
[] |
no_license
|
NicholasBlackburn1/Blackburn-1.17
|
7c086591ac77cf433af248435026cf9275223daa
|
fd960b995b33df75ce61865ba119274d9b0e4704
|
refs/heads/main
| 2022-07-28T03:27:14.736924
| 2021-09-23T15:55:53
| 2021-09-23T15:55:53
| 399,960,376
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,727
|
java
|
package net.minecraft.client.gui.spectator.categories;
import com.google.common.collect.ComparisonChain;
import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import java.util.Collection;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiComponent;
import net.minecraft.client.gui.components.spectator.SpectatorGui;
import net.minecraft.client.gui.spectator.PlayerMenuItem;
import net.minecraft.client.gui.spectator.SpectatorMenu;
import net.minecraft.client.gui.spectator.SpectatorMenuCategory;
import net.minecraft.client.gui.spectator.SpectatorMenuItem;
import net.minecraft.client.multiplayer.PlayerInfo;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.world.level.GameType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class TeleportToPlayerMenuCategory implements SpectatorMenuCategory, SpectatorMenuItem {
private static final Ordering<PlayerInfo> PROFILE_ORDER = Ordering.from((p_101870_, p_101871_) -> {
return ComparisonChain.start().compare(p_101870_.getProfile().getId(), p_101871_.getProfile().getId()).result();
});
private static final Component TELEPORT_TEXT = new TranslatableComponent("spectatorMenu.teleport");
private static final Component TELEPORT_PROMPT = new TranslatableComponent("spectatorMenu.teleport.prompt");
private final List<SpectatorMenuItem> items = Lists.newArrayList();
public TeleportToPlayerMenuCategory() {
this(PROFILE_ORDER.sortedCopy(Minecraft.getInstance().getConnection().getOnlinePlayers()));
}
public TeleportToPlayerMenuCategory(Collection<PlayerInfo> p_101861_) {
for(PlayerInfo playerinfo : PROFILE_ORDER.sortedCopy(p_101861_)) {
if (playerinfo.getGameMode() != GameType.SPECTATOR) {
this.items.add(new PlayerMenuItem(playerinfo.getProfile()));
}
}
}
public List<SpectatorMenuItem> getItems() {
return this.items;
}
public Component getPrompt() {
return TELEPORT_PROMPT;
}
public void selectItem(SpectatorMenu p_101868_) {
p_101868_.selectCategory(this);
}
public Component getName() {
return TELEPORT_TEXT;
}
public void renderIcon(PoseStack p_101864_, float p_101865_, int p_101866_) {
RenderSystem.setShaderTexture(0, SpectatorGui.SPECTATOR_LOCATION);
GuiComponent.blit(p_101864_, 0, 0, 0.0F, 0.0F, 16, 16, 256, 256);
}
public boolean isEnabled() {
return !this.items.isEmpty();
}
}
|
[
"nickblackburn02@gmail.com"
] |
nickblackburn02@gmail.com
|
5d7bf6bf24342173786269a5981782c59d3a3373
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/app/mixtape/p1202ui/p1206c/p1207a/IDataLoadPresenter.java
|
6ba357197327f87c8a2426bc321b0ce6964f8470
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,301
|
java
|
package com.zhihu.android.app.mixtape.p1202ui.p1206c.p1207a;
import android.os.Bundle;
import androidx.lifecycle.LifecycleOwner;
import com.zhihu.android.api.model.KmPlayerBasicData;
import com.zhihu.android.app.mixtape.p1201b.KmVideoPlayerDataSource;
/* renamed from: com.zhihu.android.app.mixtape.ui.c.a.a */
/* compiled from: IDataLoadPresenter */
public interface IDataLoadPresenter {
/* renamed from: com.zhihu.android.app.mixtape.ui.c.a.a$-CC reason: invalid class name */
/* compiled from: IDataLoadPresenter */
public final /* synthetic */ class CC {
public static void $default$a(IDataLoadPresenter aVar, Bundle bundle) {
}
public static void $default$a(IDataLoadPresenter aVar, KmPlayerBasicData kmPlayerBasicData) {
}
public static void $default$a(IDataLoadPresenter aVar, KmVideoPlayerDataSource aVar2, LifecycleOwner iVar) {
}
public static void $default$a(IDataLoadPresenter aVar, String str) {
}
}
/* renamed from: a */
void mo72149a(Bundle bundle);
/* renamed from: a */
void mo72150a(KmPlayerBasicData kmPlayerBasicData);
/* renamed from: a */
void mo72151a(KmVideoPlayerDataSource aVar, LifecycleOwner iVar);
/* renamed from: a */
void mo72152a(String str);
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
a8f954150018ae17deb0026b66afc95f72e828e9
|
b997d0710802002789e13cbb5fc0ca4bc2efeded
|
/core/src/main/java/org/apache/calcite/sql/fun/LibraryOperator.java
|
d16075d1b8027fbe7116aaade603fdb90dee47a9
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
apache/calcite
|
bbd2217733a6d2fd1b6d7211b8618cd02b184e07
|
2a96512c352bda4a5d9c0c80730f5c115ac363d6
|
refs/heads/main
| 2023-08-29T21:53:07.186578
| 2023-08-23T06:22:13
| 2023-08-26T05:17:49
| 21,193,524
| 4,031
| 2,213
|
Apache-2.0
| 2023-09-14T13:39:34
| 2014-06-25T07:00:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,790
|
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.calcite.sql.fun;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* An annotation that is read by {@link SqlLibraryOperatorTableFactory} to
* add functions and operators to a library.
*
* <p>Typically, such collections are associated with a particular dialect or
* database. For example, {@link SqlLibrary#ORACLE} is a collection of functions
* that are in the Oracle database but not the SQL standard.
*
* <p>In {@link SqlLibraryOperatorTableFactory} this annotation is applied to
* function definitions to include them in a particular library. It allows
* an operator to belong to more than one library.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface LibraryOperator {
/** The set of libraries that this function or operator belongs to.
* Must not be null or empty. */
SqlLibrary[] libraries();
}
|
[
"jhyde@apache.org"
] |
jhyde@apache.org
|
42101a24ca39f5d8157b9765820a87acde3205c5
|
3bb056958709def9dd5594dadae7bb45729ed0b8
|
/springboot-demo/springboot-2.x/springcloud-2-demo/server-zipkin/src/main/java/cn/cjf/Application.java
|
6de95b197fb5e98e55035314d52c7aef9d7899bf
|
[] |
no_license
|
c19t043/study-demo
|
e0691cda091eb14224ac9bb3fe4e3c0177a60457
|
bda26327832414965447a3b41a7be6fe917bafb3
|
refs/heads/master
| 2020-04-01T19:43:44.349811
| 2019-05-22T00:06:22
| 2019-05-22T00:06:22
| 153,569,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 423
|
java
|
package cn.cjf;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@EnableDiscoveryClient
@SpringBootApplication
// 启动Zipkin服务
@Enable
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
|
[
"176158750@qq.com"
] |
176158750@qq.com
|
667deddca972179a2ab831bd16bdc8de8d2a709d
|
80b292849056cb4bf3f8f76f127b06aa376fdaaa
|
/java/game/tera/gameserver/model/actions/Action.java
|
4334b3e52a9c50152ad2223949a34f7146240e95
|
[] |
no_license
|
unnamed44/tera_2805
|
70f099c4b29a8e8e19638d9b80015d0f3560b66d
|
6c5be9fc79157b44058c816dd8f566b7cf7eea0d
|
refs/heads/master
| 2020-04-28T04:06:36.652737
| 2019-03-11T01:26:47
| 2019-03-11T01:26:47
| 174,964,999
| 2
| 0
| null | 2019-03-11T09:15:36
| 2019-03-11T09:15:35
| null |
UTF-8
|
Java
| false
| false
| 1,383
|
java
|
package tera.gameserver.model.actions;
import rlib.util.pools.Foldable;
import tera.gameserver.model.playable.Player;
/**
* Интерфейс для реализации акшенов.
*
* @author Ronn
* @created 26.04.2012
*/
public interface Action extends Foldable
{
/**
* Подтверждение согласия на участие в акшене.
*/
public void assent(Player player);
/**
* Отмена акшена.
*/
public void cancel(Player player);
/**
* @return инициатор акшена.
*/
public Player getActor();
/**
* @return ид акшена.
*/
public int getId();
/**
* @return уникальный ид акшена.
*/
public int getObjectId();
/**
* @return цель акшена.
*/
public Object getTarget();
/**
* @return тип акшена.
*/
public ActionType getType();
/**
* Инициализация акшена.
*/
public void init(Player actor, String name);
/**
* Приглашение на участие в акшене.
*/
public void invite();
/**
* @param actor инициатор акшена.
*/
public void setActor(Player actor);
/**
* @param target цель акшена.
*/
public void setTarget(Object target);
/**
* @return все ли выполняет условиям акшена.
*/
public boolean test();
}
|
[
"171296@supinfo.com"
] |
171296@supinfo.com
|
9bce345ca642b02b00fea2d56430c011aa24af5e
|
e80aa55af3a9a0b2675c066ae7c34de55e30e1dc
|
/bitcamp-java-web/src/main/java/com/eomcs/web/ex07/Servlet11.java
|
616523e5e900c4dcd224e0de84eda8049f47c3f4
|
[] |
no_license
|
dana9112/bitcamp-study
|
997c37383dd01b485866bd1bf829d3c8a155c0a4
|
e917ffb6ba89ba21e3738de37dd042777cd18f7c
|
refs/heads/master
| 2020-09-23T12:40:09.096620
| 2020-05-20T08:42:16
| 2020-05-20T08:42:16
| 225,501,963
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,368
|
java
|
// 인클루딩(including) - 다른 서블릿의 작업을 포함시키기
package com.eomcs.web.ex07;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/ex07/s11")
@SuppressWarnings("serial")
public class Servlet11 extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// 테스트 방법:
// => http://localhost:8080/java-web/ex07/s11?a=100&b=200&op=%2b
// => http://localhost:8080/java-web/ex07/s11?a=100&b=200&op=-
// => http://localhost:8080/java-web/ex07/s11?a=100&b=200&op=*
//
response.setContentType("text/plain;charset=UTF-8");
PrintWriter out = response.getWriter();
out.println("계산 결과:");
out.println("---------------------------------------");
String op = request.getParameter("op");
RequestDispatcher 요청배달자 = null;
if (op.equals("+")) {
요청배달자 = request.getRequestDispatcher("/ex07/s11_plus");
} else if (op.contentEquals("-")) {
요청배달자 = request.getRequestDispatcher("/ex07/s11_minus");
} else {
요청배달자 = request.getRequestDispatcher("/ex07/s11_error");
}
// 다른 서블릿을 실행시킨다.
// => forward()는 다른 서블릿으로 위임할 때 현재 서블릿의 출력이 취소된다.
// include()는 다른 서블릿으로 실행을 위임하더라도 현재 서블릿의 실행 결과를 유지한다.
// => 인클루드의 경우 이전 서블릿에서 setContentType()을 설정해야 한다.
// => 포워드는 현재 서블릿에서 설정한 setContentType()이 무시된다.
요청배달자.include(request, response);
// including 서블릿을 실행한 후에 리턴되면
// 현재 서블릿은 계속해서 출력할 수 있다.
// => forwarding 서블릿을 실행한 후에서 리턴되어도
// 현재 서블릿이 출력할 수 없었다.
// 정확히 하면 출력한 것이 모두 무시되었다.
out.println("---------------------------------------");
}
}
|
[
"ehddud2978@gmail.com"
] |
ehddud2978@gmail.com
|
533615b15ca3c7a4e0b5a39b39fd7e434f8113e5
|
963212f9ece3f4e13a4f0213e7984dab1df376f5
|
/qardio_source/cfr_dec/com/getqardio/android/provider/FollowingItemUriHandler.java
|
533886594ceb0add645810d18204c07e44574110
|
[] |
no_license
|
weitat95/mastersDissertation
|
2648638bee64ea50cc93344708a58800a0f2af14
|
d465bb52b543dea05c799d1972374e877957a80c
|
refs/heads/master
| 2020-06-08T17:31:51.767796
| 2019-12-15T19:09:41
| 2019-12-15T19:09:41
| 193,271,681
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,379
|
java
|
/*
* Decompiled with CFR 0.147.
*
* Could not load the following classes:
* android.content.ContentValues
* android.content.Context
* android.database.Cursor
* android.database.sqlite.SQLiteOpenHelper
* android.net.Uri
* android.text.TextUtils
*/
package com.getqardio.android.provider;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.Uri;
import android.text.TextUtils;
import com.getqardio.android.provider.UriHandler;
import java.util.List;
public class FollowingItemUriHandler
extends UriHandler {
public FollowingItemUriHandler(int n, SQLiteOpenHelper sQLiteOpenHelper) {
super(n, sQLiteOpenHelper);
}
/*
* Enabled aggressive block sorting
*/
@Override
public int delete(Context context, Uri uri, String string2, String[] arrstring) {
boolean bl = !TextUtils.isEmpty((CharSequence)string2);
StringBuilder stringBuilder = new StringBuilder().append("_id=").append(uri.getLastPathSegment()).append(" AND ").append("user_id").append("=").append((String)uri.getPathSegments().get(1));
string2 = bl ? " AND " + string2 : "";
string2 = stringBuilder.append(string2).toString();
if (bl) {
return this.simpleDelete(context, "followings", uri, string2, arrstring);
}
arrstring = null;
return this.simpleDelete(context, "followings", uri, string2, arrstring);
}
@Override
public Uri insert(Context context, Uri uri, ContentValues contentValues) {
throw new UnsupportedOperationException("ReminderItemUriHandler doesn't support insert operation");
}
/*
* Enabled aggressive block sorting
*/
@Override
public Cursor query(Context context, Uri uri, String[] arrstring, String string2, String[] arrstring2, String string3) {
boolean bl = !TextUtils.isEmpty((CharSequence)string2);
StringBuilder stringBuilder = new StringBuilder().append("_id=").append(uri.getLastPathSegment()).append(" AND ").append("user_id").append("=").append((String)uri.getPathSegments().get(1));
string2 = bl ? " AND " + string2 : "";
string2 = stringBuilder.append(string2).toString();
if (bl) {
return this.queryFullTable(context, "followings", uri, arrstring, string2, arrstring2, string3);
}
arrstring2 = null;
return this.queryFullTable(context, "followings", uri, arrstring, string2, arrstring2, string3);
}
/*
* Enabled aggressive block sorting
*/
@Override
public int update(Context context, Uri uri, ContentValues contentValues, String string2, String[] arrstring) {
boolean bl = !TextUtils.isEmpty((CharSequence)string2);
StringBuilder stringBuilder = new StringBuilder().append("_id=").append(uri.getLastPathSegment()).append(" AND ").append("user_id").append("=").append((String)uri.getPathSegments().get(1));
string2 = bl ? " AND " + string2 : "";
string2 = stringBuilder.append(string2).toString();
if (bl) {
return this.simpleUpdate(context, "followings", uri, contentValues, string2, arrstring);
}
arrstring = null;
return this.simpleUpdate(context, "followings", uri, contentValues, string2, arrstring);
}
}
|
[
"weitat95@live.com"
] |
weitat95@live.com
|
4df14543cca72ec7824fe5b136327758cc075790
|
2fe2b6f2e5b52e3daba0b738fabe8e3c2337713c
|
/src/main/java/org/cx/lock/SynchronizedDemo.java
|
c6de3dc21c59e032496aa5dfd892b2c59be46b81
|
[] |
no_license
|
sgrass/cxutil
|
df57c23e68b4c7e77628bc1666039609c634972b
|
7fda1f5b28bbe7b0d24e32be1ce7363149b19294
|
refs/heads/master
| 2022-11-27T00:57:19.871693
| 2020-04-29T10:21:38
| 2020-04-29T10:21:38
| 42,531,747
| 0
| 1
| null | 2022-11-16T03:59:05
| 2015-09-15T16:27:08
|
Java
|
UTF-8
|
Java
| false
| false
| 584
|
java
|
package org.cx.lock;
public class SynchronizedDemo {
Student stu = new Student();
/**
* 用在实例上, 实例锁
*/
public synchronized void someMethod() {
}
/**
* 静态方法上,类锁
*/
public static synchronized void someMethod2() {
}
public void someMethod3() {
//表达式是实例,则为实例锁,同一个实例才互斥
synchronized(stu) {
}
//this 实例锁
synchronized (this) {
}
//类锁,lockDemo所有实例都会互斥
synchronized (SynchronizedDemo.class) {
}
}
}
|
[
"xgrass@foxmail.com"
] |
xgrass@foxmail.com
|
59a5eac6ef5995adde85efbf5b7af3f2d283560c
|
5eaa885e1bb98a2204f895688a8e22adead47d37
|
/src/main/java/persistence/repositories/ProductLineRepository.java
|
78370778bc7caf7be81183182e082b6ba28e089a
|
[
"Apache-2.0"
] |
permissive
|
sergio11/springmvc-webflow-ecommerce
|
49ba6422e55045096916f75c0b09eb7822403f30
|
07fb83fdaa83555c8d86dcd965d4025829b95a19
|
refs/heads/master
| 2022-12-24T01:50:07.849023
| 2022-12-17T19:47:16
| 2022-12-17T19:47:16
| 77,217,777
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 530
|
java
|
package persistence.repositories;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import persistence.models.ProductLine;
import persistence.projection.ProductLineView;
/**
* @author sergio
*/
public interface ProductLineRepository extends JpaRepository<ProductLine, Long> {
List<ProductLineView> findByProductIdAndIdNotAndStockGreaterThan(Long productId, Long id, Integer stock);
List<ProductLine> findByProductId(Long id);
List<ProductLine> findByProductName(String name);
}
|
[
"sss4esob@gmail.com"
] |
sss4esob@gmail.com
|
bc9fb43fdfca3eb5f172b502f71d7bb84413dbcf
|
f15c61b579061105a3670a27abfc95d55ce14b6f
|
/cblibrary/src/main/java/cbedoy/cblibrary/MainActivity.java
|
5e93b2447e8feed3194b6931190089ced3b9b277
|
[
"Apache-2.0"
] |
permissive
|
SelfD3veloper/TravelApplication
|
2313c073815b97f5d0ec060ee3596c04ba3b752f
|
f64f7f1f3e15f7ccc8e87cfc9fa61602431072d7
|
refs/heads/master
| 2016-08-04T01:35:50.016503
| 2015-03-24T02:02:08
| 2015-03-24T02:02:08
| 32,770,079
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,517
|
java
|
package cbedoy.cblibrary;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.inputmethod.InputMethodManager;
import android.widget.ViewFlipper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import cbedoy.cblibrary.interfaces.IActivityResultListener;
import cbedoy.cblibrary.interfaces.IAppViewManager;
import cbedoy.cblibrary.interfaces.IViewController;
import cbedoy.cblibrary.services.ApplicationLoader;
import cbedoy.cblibrary.services.ImageService;
import cbedoy.cblibrary.services.InjectionManager;
import cbedoy.cblibrary.services.NotificationCenter;
import cbedoy.cblibrary.utils.Utils;
import cbedoy.cblibrary.viewcontrollers.AbstractViewController;
/**
* Created by Carlos Bedoy on 28/12/2014.
*
* Mobile App Developer
* CBLibrary
*
* E-mail: carlos.bedoy@gmail.com
* Facebook: https://www.facebook.com/carlos.bedoy
* Github: https://github.com/cbedoy
*/
public abstract class MainActivity extends ActionBarActivity implements IAppViewManager{
protected ViewFlipper mViewFlipper;
protected int mViewControllerWidth;
protected int mViewControllerHeight;
protected HashMap<String, AbstractViewController> mViewModel;
protected List<IActivityResultListener> mListeners;
protected IViewController mCurrentViewController;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Required instance mViewFlipper from extends class
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
mViewModel = new HashMap<>();
mViewControllerHeight = ImageService.getScreenHeight();
mViewControllerWidth = ImageService.getScreenWidth();
mListeners = new ArrayList<>();
Utils.init(this);
ImageService.init(this);
}
@Override
public void addActivityResultListener(IActivityResultListener resultListener) {
mListeners.add(resultListener);
}
@Override
public void finish() {
long delay = 200;
final MainActivity self = this;
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
self.terminateInApp();
}
}, delay);
}
private void terminateInApp(){
overridePendingTransition(R.anim.fadeout, R.anim.fadein);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if(mListeners != null)
{
for(IActivityResultListener resultListener : mListeners)
{
if(requestCode == resultListener.getRequestCode())
{
resultListener.onActivityResult(resultCode, data);
}
}
}
super.onActivityResult(requestCode, resultCode, data);
}
@Override
protected void onPause() {
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
public void onBackPressed() {
boolean allowBack = true;
int displayed_child = this.mViewFlipper.getDisplayedChild();
View view = this.mViewFlipper.getChildAt(displayed_child);
for(Map.Entry<String, AbstractViewController> entry : this.mViewModel.entrySet()) {
AbstractViewController child = entry.getValue();
if(child.getViewController() == view) {
allowBack = child.onBackPressed();
break;
}
}
if(allowBack)
super.onBackPressed();
}
@Override
public int getViewControllerWidth() {
return this.mViewControllerWidth;
}
@Override
public int getViewControllerHeight() {
return this.mViewControllerHeight;
}
@Override
public Activity getActivity() {
return null;
}
@Override
public void reActivateCurrentView() {
final MainActivity self = this;
this.runOnUiThread(new Runnable() {
@Override
public void run() {
int displayed_child = self.mViewFlipper.getDisplayedChild();
View view = self.mViewFlipper.getChildAt(displayed_child);
for(Map.Entry<String, AbstractViewController> entry : self.mViewModel.entrySet()) {
AbstractViewController child = entry.getValue();
if(child.getViewController() == view) {
child.setActive(true);
break;
}
}
}
});
}
@Override
public void presentViewForTag(String tag) {
final MainActivity self = this;
final String final_tag = tag;
this.runOnUiThread(new Runnable() {
@Override
public void run() {
AbstractViewController child = self.mViewModel.get(final_tag);
View view = child.getViewController();
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(view.getWindowToken(), 0);
int child_index = self.mViewFlipper.indexOfChild(view);
if (child_index < 0) {
self.mViewFlipper.addView(view);
child_index = self.mViewFlipper.indexOfChild(view);
}
int displayed_child = self.mViewFlipper.getDisplayedChild();
if (child_index != displayed_child)
{
AlphaAnimation in = new AlphaAnimation(0.0f, 1.0f);
in.setDuration(600);
in.setZAdjustment(Animation.ZORDER_TOP);
self.mViewFlipper.setInAnimation(in);
AlphaAnimation out = new AlphaAnimation(1.0f, 0.0f);
out.setDuration(600);
out.setZAdjustment(Animation.ZORDER_TOP);
self.mViewFlipper.setOutAnimation(out);
self.mViewFlipper.setDisplayedChild(child_index);
final IViewController controller = mCurrentViewController;
controller.setActive(false);
if (!self.isFinishing()) {
self.mViewFlipper.setInAnimation(null);
self.mViewFlipper.setOutAnimation(null);
self.mViewFlipper.removeView(controller.getViewController());
controller.onRemoveToWindow();
}
}
child.onAttachToWindow();
child.setActive(true);
mCurrentViewController = child;
}
});
}
@Override
public void addViewWithTag(AbstractViewController controller, String tag) {
this.mViewModel.put(tag, controller);
}
@Override
public void setBackgroundViewController(Object... values) {
}
}
|
[
"carlos.bedoy@gmail.com"
] |
carlos.bedoy@gmail.com
|
ff96bffd0c0ae8d9fbc8a5e362b1e23cbc1b3b69
|
5f6edf313639dbe464a1c9cbb62762b427786235
|
/mxxmgl/backend/src/main/java/com/naswork/backend/entity/Vo/FileVo.java
|
ba882be9605c72fa1819e727531613d96ef1d61c
|
[] |
no_license
|
magicgis/outfile
|
e69b785cd14ce7cb08d93d0f83b3f4c0b435b17b
|
497635e2cd947811bf616304e9563e59f0ab4f56
|
refs/heads/master
| 2020-05-07T19:24:08.371572
| 2019-01-23T04:57:18
| 2019-01-23T04:57:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 798
|
java
|
package com.naswork.backend.entity.Vo;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.util.Date;
/**
* @Program: FileVo
* @Description:
* @Author: White
* @DateTime: 2018-12-16 17:17:03
**/
@Data
public class FileVo {
private Integer fileId;
private String fileName;
private Double fileSize;
private String fileLocation;
private String deleteStatus;
private Integer downloadTimes;
private Integer createUser;
private Date createTime;
private String userNickName;
private String saveName;
private int pageNum;
private int pageRow;
private Integer projectId;
private String projectCode;
}
|
[
"942364283@qq.com"
] |
942364283@qq.com
|
cb9af3e0ddf2a168efeb8cdc959f754c68d3f101
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/sas-20181203/src/main/java/com/aliyun/sas20181203/models/DescribeWarningMachinesRequest.java
|
4146cb12aee32c51cb91021549cceebef85fc138
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,497
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sas20181203.models;
import com.aliyun.tea.*;
public class DescribeWarningMachinesRequest extends TeaModel {
@NameInMap("SourceIp")
public String sourceIp;
@NameInMap("Lang")
public String lang;
@NameInMap("MachineName")
public String machineName;
@NameInMap("Uuids")
public String uuids;
@NameInMap("RiskId")
public Long riskId;
@NameInMap("StrategyId")
public Long strategyId;
@NameInMap("PageSize")
public Integer pageSize;
@NameInMap("CurrentPage")
public Integer currentPage;
public static DescribeWarningMachinesRequest build(java.util.Map<String, ?> map) throws Exception {
DescribeWarningMachinesRequest self = new DescribeWarningMachinesRequest();
return TeaModel.build(map, self);
}
public DescribeWarningMachinesRequest setSourceIp(String sourceIp) {
this.sourceIp = sourceIp;
return this;
}
public String getSourceIp() {
return this.sourceIp;
}
public DescribeWarningMachinesRequest setLang(String lang) {
this.lang = lang;
return this;
}
public String getLang() {
return this.lang;
}
public DescribeWarningMachinesRequest setMachineName(String machineName) {
this.machineName = machineName;
return this;
}
public String getMachineName() {
return this.machineName;
}
public DescribeWarningMachinesRequest setUuids(String uuids) {
this.uuids = uuids;
return this;
}
public String getUuids() {
return this.uuids;
}
public DescribeWarningMachinesRequest setRiskId(Long riskId) {
this.riskId = riskId;
return this;
}
public Long getRiskId() {
return this.riskId;
}
public DescribeWarningMachinesRequest setStrategyId(Long strategyId) {
this.strategyId = strategyId;
return this;
}
public Long getStrategyId() {
return this.strategyId;
}
public DescribeWarningMachinesRequest setPageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
public Integer getPageSize() {
return this.pageSize;
}
public DescribeWarningMachinesRequest setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
return this;
}
public Integer getCurrentPage() {
return this.currentPage;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
b2b782b840fce18782a55452cc83e2c9dc5cf109
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/eclipse--che/44b060bff816aa510b5cb8e1a1e0fa1471af889e/before/WebSocketModule.java
|
f99aa6d3d58661f169d7b6fac64b6b6abd15ac2f
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,634
|
java
|
/*******************************************************************************
* Copyright (c) 2012-2016 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
package org.eclipse.che.ide.core;
import com.google.gwt.inject.client.AbstractGinModule;
import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder;
import com.google.gwt.inject.client.multibindings.GinMapBinder;
import org.eclipse.che.ide.jsonrpc.impl.WebSocketJsonRpcDispatcher;
import org.eclipse.che.ide.websocket.ng.WebSocketMessageReceiver;
import org.eclipse.che.ide.websocket.ng.WebSocketMessageTransmitter;
import org.eclipse.che.ide.websocket.ng.impl.BasicWebSocketEndpoint;
import org.eclipse.che.ide.websocket.ng.impl.BasicWebSocketMessageTransmitter;
import org.eclipse.che.ide.websocket.ng.impl.BasicWebSocketTransmissionValidator;
import org.eclipse.che.ide.websocket.ng.impl.DelayableWebSocket;
import org.eclipse.che.ide.websocket.ng.impl.SessionWebSocketInitializer;
import org.eclipse.che.ide.websocket.ng.impl.WebSocket;
import org.eclipse.che.ide.websocket.ng.impl.WebSocketCreator;
import org.eclipse.che.ide.websocket.ng.impl.WebSocketEndpoint;
import org.eclipse.che.ide.websocket.ng.impl.WebSocketInitializer;
import org.eclipse.che.ide.websocket.ng.impl.WebSocketTransmissionValidator;
/**
* GIN module for configuring WebSocket components.
*
* @author Artem Zatsarynnyi
*/
public class WebSocketModule extends AbstractGinModule {
@Override
protected void configure() {
bind(WebSocketInitializer.class).to(SessionWebSocketInitializer.class);
bind(WebSocketEndpoint.class).to(BasicWebSocketEndpoint.class);
bind(WebSocketTransmissionValidator.class).to(BasicWebSocketTransmissionValidator.class);
bind(WebSocketMessageTransmitter.class).to(BasicWebSocketMessageTransmitter.class);
install(new GinFactoryModuleBuilder()
.implement(WebSocket.class, DelayableWebSocket.class)
.build(WebSocketCreator.class));
GinMapBinder<String, WebSocketMessageReceiver> receivers =
GinMapBinder.newMapBinder(binder(), String.class, WebSocketMessageReceiver.class);
receivers.addBinding("jsonrpc-2.0").to(WebSocketJsonRpcDispatcher.class);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
9dcf0e44e677e78565ef0bf58bc2443909e29e61
|
5dfdb5d2d9f64c9f02046d35319948ee157ddf28
|
/demo/app/src/main/java/com/xcore/presenter/HomePresenter.java
|
f7ed9794d41f75c4e3c68a9bdf5f94dcdf3b97e8
|
[] |
no_license
|
sn4061740/test_study
|
1d2ea0dacaae15bd2efe83bac8e7c61e38d49de9
|
7f1fa28ff21f6978c6a729a916daa034f446fa0d
|
refs/heads/master
| 2020-05-07T17:12:10.507347
| 2019-04-11T04:33:18
| 2019-04-11T04:33:18
| 180,706,007
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,901
|
java
|
package com.xcore.presenter;
import com.lzy.okgo.model.HttpParams;
import com.lzy.okgo.model.Response;
import com.xcore.base.BasePresent;
import com.xcore.data.bean.HomeBean;
import com.xcore.data.bean.TypeListBean;
import com.xcore.data.utils.TCallback;
import com.xcore.presenter.view.HomeView;
import com.xcore.services.ApiFactory;
public class HomePresenter extends BasePresent<HomeView> {
private int pageSize=7;
//得到首页数据
public void getHomeData(){
if(!checkNetwork()){
return;
}
// if(dialog!=null) {
// dialog.show();
// }
ApiFactory.getInstance().<HomeBean>getHomeData(new TCallback<HomeBean>() {
@Override
public void onNext(HomeBean homeBean) {
// if(dialog!=null) {
// dialog.cancel();
// }
if(view!=null) {
view.onHomeResult(homeBean);
}
}
@Override
public void onError(Response<HomeBean> response) {
super.onError(response);
// if(dialog!=null){
// dialog.cancel();
// }
}
});
}
//根据类型查询
public void getTypeData(final int pageIndex, final HomeBean.HomeDataItem dataItem){
if(!checkNetwork()){
return;
}
HttpParams params=new HttpParams();
params.put("PageIndex",pageIndex);
params.put("PageSize",pageSize);
params.put("sorttype","");
params.put("species","");
params.put("categories",dataItem.getShortId());
// if(dialog!=null) {
// dialog.show();
// }
ApiFactory.getInstance().<TypeListBean>getTypeByData(params, new TCallback<TypeListBean>() {
@Override
public void onNext(TypeListBean typeListBean) {
HomeBean.HomeDataItem homeDataItem=new HomeBean.HomeDataItem();
homeDataItem.setShortId(dataItem.getShortId());
homeDataItem.setName(dataItem.getName());
homeDataItem.setType(dataItem.getType());
homeDataItem.setList(typeListBean.getList());
// if(dialog!=null) {
// dialog.cancel();
// }
view.onHomeTypeResult(homeDataItem);
}
@Override
public void onError(Response<TypeListBean> response) {
super.onError(response);
// if(dialog!=null){
// dialog.cancel();
// }
}
});
}
//类型标签
public void getTypeTagData(final int pageIndex, final HomeBean.HomeDataItem dataItem){
if(!checkNetwork()){
return;
}
HttpParams params=new HttpParams();
params.put("PageIndex",pageIndex);
params.put("PageSize",6);
params.put("sorttype",dataItem.getShortId());
params.put("species","");
params.put("categories","");
// if(dialog!=null){
// dialog.show();
// }
ApiFactory.getInstance().<TypeListBean>getTypeByData(params, new TCallback<TypeListBean>() {
@Override
public void onNext(TypeListBean typeListBean) {
try {
HomeBean.HomeDataItem homeDataItem = new HomeBean.HomeDataItem();
homeDataItem.setShortId(dataItem.getShortId());
homeDataItem.setName(dataItem.getName());
homeDataItem.setType(dataItem.getType());
homeDataItem.setList(typeListBean.getList());
// if(dialog!=null) {
// dialog.cancel();
// }
view.onHomeTypeResult(homeDataItem);
}catch (Exception ex){}
}
@Override
public void onError(Response<TypeListBean> response) {
super.onError(response);
// if(dialog!=null){
// dialog.cancel();
// }
}
});
}
//热播
public void getTypeHot(final int pageIndex, final HomeBean.HomeDataItem dataItem){
if(!checkNetwork()){
return;
}
HttpParams params=new HttpParams();
params.put("PageIndex",pageIndex);
params.put("PageSize",pageSize);
params.put("sorttype",dataItem.getShortId());
params.put("species","");
params.put("categories","");
// if(dialog!=null){
// dialog.show();
// }
ApiFactory.getInstance().<TypeListBean>getTypeByData(params, new TCallback<TypeListBean>() {
@Override
public void onNext(TypeListBean typeListBean) {
HomeBean.HomeDataItem homeDataItem=new HomeBean.HomeDataItem();
homeDataItem.setShortId(dataItem.getShortId());
homeDataItem.setName(dataItem.getName());
homeDataItem.setType(dataItem.getType());
homeDataItem.setList(typeListBean.getList());
// if(dialog!=null) {
// dialog.cancel();
// }
view.onHomeTypeResult(homeDataItem);
}
@Override
public void onError(Response<TypeListBean> response) {
super.onError(response);
// if(dialog!=null){
// dialog.cancel();
// }
}
});
}
//根据标签查询
public void getTagData(final int pageIndex, final HomeBean.HomeDataItem dataItem){
if(!checkNetwork()){
return;
}
HttpParams params=new HttpParams();
params.put("PageIndex",pageIndex);
params.put("key",dataItem.getName());
params.put("PageSize",pageSize);
// if(dialog!=null){
// dialog.show();
// }
ApiFactory.getInstance().<TypeListBean>getTag(params, new TCallback<TypeListBean>() {
@Override
public void onNext(TypeListBean typeListBean) {
HomeBean.HomeDataItem homeDataItem=new HomeBean.HomeDataItem();
homeDataItem.setShortId(dataItem.getShortId());
homeDataItem.setName(dataItem.getName());
homeDataItem.setType(dataItem.getType());
homeDataItem.setList(typeListBean.getList());
// if(dialog!=null) {
// dialog.cancel();
// }
view.onHomeTypeResult(homeDataItem);
}
@Override
public void onError(Response<TypeListBean> response) {
super.onError(response);
// if(dialog!=null){
// dialog.cancel();
// }
}
});
}
}
|
[
"aaa@gmail.com"
] |
aaa@gmail.com
|
057e28f018edc44236a3c1cdc6b494e2d64ddc08
|
c37d2a36312534a55c319b19b61060649c7c862c
|
/app/src/main/java/com/spongycastle/bcpg/CRC24.java
|
7a34035968e6a4076b1bf099bf7edcbd914b2949
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
trwinowiecki/AndroidTexting
|
f5626ad91a07ea7b3cd3ee75893abf8b1fe7154f
|
27e84a420b80054e676c390b898705856364b340
|
refs/heads/master
| 2020-12-30T23:10:17.542572
| 2017-02-01T01:46:13
| 2017-02-01T01:46:13
| 80,580,124
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 768
|
java
|
package com.spongycastle.bcpg;
public class CRC24
{
private static final int CRC24_INIT = 0x0b704ce;
private static final int CRC24_POLY = 0x1864cfb;
private int crc = CRC24_INIT;
public CRC24()
{
}
public void update(
int b)
{
crc ^= b << 16;
for (int i = 0; i < 8; i++)
{
crc <<= 1;
if ((crc & 0x1000000) != 0)
{
crc ^= CRC24_POLY;
}
}
}
public int getValue()
{
return crc;
}
public void reset()
{
crc = CRC24_INIT;
}
}
|
[
"trw0511@gmail.com"
] |
trw0511@gmail.com
|
70f5e5c76aa43f080da045ada9da116bc372121c
|
6777964a07446712a5b1ac820e730033539ce503
|
/java/java-oop/heranca/Animal.java
|
b93d41d390741a44adde947b374cfe0f0741698c
|
[] |
no_license
|
Ramonrune/computer-technician-course
|
e808cec156200bfb5b05776ace83e1fa96faeec2
|
27f1d6675f4511bb48a4fad66f80999810924021
|
refs/heads/master
| 2021-10-09T17:32:26.933337
| 2019-01-01T23:01:44
| 2019-01-01T23:01:44
| 91,250,139
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 377
|
java
|
package heranca;
public class Animal {
//private int serial;
protected int serial;
double peso;
String comida;
/*
public Animal(){
this(0, null);
}
*/
public Animal(double peso, String comida){
this.peso = peso;
this.comida = comida;
}
void dormir(){
System.out.println("Dormiu");
}
void fazerBarulho(){
System.out.println("Fazer barulho");
}
}
|
[
"ramonrune@gmail.com"
] |
ramonrune@gmail.com
|
c125de625eae7767795b927849017231d14ba943
|
ff2683777d02413e973ee6af2d71ac1a1cac92d3
|
/src/main/java/com/alipay/api/domain/KbIsvMaCode.java
|
8ba23643cb24252cdf31910f0115cfbb7d5d1f1c
|
[
"Apache-2.0"
] |
permissive
|
weizai118/alipay-sdk-java-all
|
c30407fec93e0b2e780b4870b3a71e9d7c55ed86
|
ec977bf06276e8b16c4b41e4c970caeaf21e100b
|
refs/heads/master
| 2020-05-31T21:01:16.495008
| 2019-05-28T13:14:39
| 2019-05-28T13:14:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 736
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 口碑凭证发码信息
*
* @author auto create
* @since 1.0, 2018-04-27 22:31:57
*/
public class KbIsvMaCode extends AlipayObject {
private static final long serialVersionUID = 3137722317827181666L;
/**
* 凭证码值
*/
@ApiField("code")
private String code;
/**
* 码的可核销份数
*/
@ApiField("num")
private String num;
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getNum() {
return this.num;
}
public void setNum(String num) {
this.num = num;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
3db129c61b41ea5dff3acc6e5ac9163101d16f8d
|
aa795a7f304ba9c981dcbada2b0509c4b78e1761
|
/src/com/vencillio/rs2/content/skill/ranged/ToxicBlowpipe.java
|
0755d2991802d39048a17111c0a6381b5ac60381
|
[] |
no_license
|
DKisKING/byD8qrUKLS2QkYrv-Server
|
01afd6ed84fc21a31946a03f0e39a1dd9adad873
|
e96fd2a9278f05e953289846620b57e046d52e47
|
refs/heads/master
| 2021-07-10T19:50:55.391245
| 2017-10-09T17:19:48
| 2017-10-09T17:19:48
| 104,268,287
| 0
| 1
| null | 2017-10-09T17:19:49
| 2017-09-20T21:13:09
|
Java
|
UTF-8
|
Java
| false
| false
| 7,804
|
java
|
package com.vencillio.rs2.content.skill.ranged;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import com.vencillio.core.definitions.ItemDefinition;
import com.vencillio.core.util.GameDefinitionLoader;
import com.vencillio.rs2.entity.item.EquipmentConstants;
import com.vencillio.rs2.entity.item.Item;
import com.vencillio.rs2.entity.player.Player;
import com.vencillio.rs2.entity.player.net.out.impl.SendChatBoxInterface;
import com.vencillio.rs2.entity.player.net.out.impl.SendMessage;
import com.vencillio.rs2.entity.player.net.out.impl.SendString;
import com.vencillio.rs2.entity.player.net.out.impl.SendUpdateItemsAlt;
public class ToxicBlowpipe {
private static final int FULL = 16_383;
private static final DecimalFormat FORMATTER = new DecimalFormat("#.#");
private Item blowpipeAmmo;
private int blowpipeCharge;
public ToxicBlowpipe(Item blowpipeAmmo, int blowpipeCharge) {
this.blowpipeAmmo = blowpipeAmmo;
this.blowpipeCharge = blowpipeCharge;
FORMATTER.setRoundingMode(RoundingMode.FLOOR);
}
public Item getBlowpipeAmmo() {
return blowpipeAmmo;
}
public int getBlowpipeCharge() {
return blowpipeCharge;
}
public static boolean itemOnItem(Player player, Item itemUsed, Item usedWith) {
if (itemUsed.getId() == 12924 || itemUsed.getId() == 12926 || usedWith.getId() == 12924 || usedWith.getId() == 12926) {
if (usedWith.getId() == 12934) {
if (player.getToxicBlowpipe().blowpipeCharge/ 3 == FULL) {
return true;
}
int added = 0;
if (player.getToxicBlowpipe().blowpipeCharge / 3 + usedWith.getAmount() > FULL) {
added = FULL - player.getToxicBlowpipe().blowpipeCharge / 3;
} else {
added = usedWith.getAmount();
}
player.getToxicBlowpipe().blowpipeCharge += added * 3;
player.getInventory().remove(usedWith.getId(), added);
int slot = player.getInventory().getItemSlot(itemUsed.getId());
player.getInventory().get(slot).setId(12926);
check(player);
return true;
} else if (itemUsed.getId() == 12934) {
if (player.getToxicBlowpipe().blowpipeCharge/ 3 == FULL) {
return true;
}
int added = 0;
if (player.getToxicBlowpipe().blowpipeCharge/ 3 + itemUsed.getAmount() > FULL) {
added = FULL - player.getToxicBlowpipe().blowpipeCharge / 3;
} else {
added = itemUsed.getAmount();
}
player.getToxicBlowpipe().blowpipeCharge += added * 3;
player.getInventory().remove(itemUsed.getId(), added);
int slot = player.getInventory().getItemSlot(usedWith.getId());
player.getInventory().get(slot).setId(12926);
check(player);
return true;
}
}
if (player.getToxicBlowpipe().blowpipeAmmo != null && player.getToxicBlowpipe().blowpipeAmmo.getAmount() == FULL) {
return true;
}
Item dart = null;
switch (itemUsed.getId()) {
case 11230:
dart = new Item(itemUsed);
}
if (dart == null) {
switch (usedWith.getId()) {
case 11230:
dart = new Item(usedWith);
}
}
if (dart == null) {
return false;
}
if (usedWith.getId() == 12924) {
int slot = player.getInventory().getItemSlot(usedWith.getId());
player.getInventory().get(slot).setId(12926);
} else if (itemUsed.getId() == 12924) {
int slot = player.getInventory().getItemSlot(itemUsed.getId());
player.getInventory().get(slot).setId(12926);
}
if (usedWith.getId() == 12924 || usedWith.getId() == 12926 || itemUsed.getId() == 12924 || itemUsed.getId() == 12926) {
if (player.getToxicBlowpipe().blowpipeAmmo != null) {
if (dart.getAmount() + player.getToxicBlowpipe().blowpipeAmmo.getAmount() > FULL) {
dart.setAmount((dart.getAmount() + player.getToxicBlowpipe().blowpipeAmmo.getAmount()) - FULL);
}
player.getToxicBlowpipe().blowpipeAmmo.add(dart.getAmount());
} else if (dart.getAmount() > FULL) {
dart.setAmount(FULL);
player.getToxicBlowpipe().blowpipeAmmo = dart;
} else {
player.getToxicBlowpipe().blowpipeAmmo = dart;
}
}
player.getInventory().remove(dart);
check(player);
return false;
}
public static void check(Player player) {
String ammo = "None";
if (player.getToxicBlowpipe().blowpipeAmmo != null) {
ammo = player.getToxicBlowpipe().blowpipeAmmo.getDefinition().getName() + " x " + player.getToxicBlowpipe().blowpipeAmmo.getAmount();
}
String scales = FORMATTER.format((player.getToxicBlowpipe().blowpipeCharge/ 3.0) * 100.0 / (double) FULL) + "%";
player.send(new SendMessage("Darts: <col=007F00>" + ammo + "</col>. Scales: <col=007F00>" + scales));
}
public static boolean hasBlowpipe(Player player) {
return player.getEquipment().isWearingItem(12926, EquipmentConstants.WEAPON_SLOT);
}
public static void unload(Player player) {
if (player.getToxicBlowpipe().blowpipeCharge > 0) {
player.getInventory().addOrCreateGroundItem(12934, player.getToxicBlowpipe().blowpipeCharge/ 3, true);
}
if (player.getToxicBlowpipe().blowpipeAmmo != null) {
player.getInventory().addOrCreateGroundItem(player.getToxicBlowpipe().blowpipeAmmo.getId(), player.getToxicBlowpipe().blowpipeAmmo.getAmount(), true);
}
player.getToxicBlowpipe().blowpipeCharge = 0;
player.getToxicBlowpipe().blowpipeAmmo = null;
player.getInventory().get(player.getInventory().getItemSlot(12926)).setId(12924);
}
public static boolean itemOption(Player player, int i, int itemId) {
if (itemId != 12926) {
return false;
}
switch (i) {
case 1:
case 2:
check(player);
return true;
case 3:
if (player.getToxicBlowpipe().blowpipeAmmo != null) {
player.getInventory().addOrCreateGroundItem(player.getToxicBlowpipe().blowpipeAmmo.getId(), player.getToxicBlowpipe().blowpipeAmmo.getAmount(), true);
}
player.getToxicBlowpipe().blowpipeAmmo = null;
return true;
case 4:
ask(player, 12926);
player.getAttributes().set("ASK_KEY", 0);
return true;
}
return false;
}
public static void ask(Player player, int itemId) {
ItemDefinition itemDef = GameDefinitionLoader.getItemDef(itemId);
String[][] info = { { "Are you sure you want to destroy this object?", "14174" }, { "Yes.", "14175" }, { "No.", "14176" }, { "", "14177" }, { "", "14182" }, { "If you uncharge the blowpipe, all scales and darts will fall out.", "14183" }, { itemDef.getName(), "14184" } };
player.send(new SendUpdateItemsAlt(14171, itemId, 1, 0));
for (int i = 0; i < info.length; i++) {
player.send(new SendString(info[i][0], Integer.parseInt(info[i][1])));
}
player.send(new SendChatBoxInterface(14170));
}
public static void degrade(Player player) {
ToxicBlowpipe blowpipe = player.getToxicBlowpipe();
blowpipe.blowpipeCharge -= 2;
Item cape = player.getEquipment().getItems()[1];
if (cape != null && (cape.getId() == 10499 || cape.getId() == 13337 || cape.getId() == 10498)) {
if (Math.random() > 1 - 1/4.0) {
if (player.getCombat().getAttacking().getLocation() != null && Math.random() > 1 - 1/3.0) {
player.getGroundItems().drop(blowpipe.blowpipeAmmo.getSingle(), player.getCombat().getAttacking().getLocation());
}
blowpipe.blowpipeAmmo.remove(1);
}
} else {
if (player.getCombat().getAttacking().getLocation() != null && Math.random() > 1 - 1/3.0) {
player.getGroundItems().drop(blowpipe.blowpipeAmmo.getSingle(), player.getCombat().getAttacking().getLocation());
}
blowpipe.blowpipeAmmo.remove(1);
}
if (blowpipe.blowpipeCharge == 0 || blowpipe.blowpipeAmmo.getAmount() == 0) {
if (blowpipe.blowpipeAmmo.getAmount() == 0) {
blowpipe.blowpipeAmmo = null;
}
player.send(new SendMessage("The blowpipe needs to be charged with Zulrah's scales and loaded with darts."));
}
if (blowpipe.blowpipeCharge == 0 && blowpipe.blowpipeAmmo == null) {
player.getEquipment().getItems()[EquipmentConstants.WEAPON_SLOT].setId(12924);
}
}
}
|
[
"dkisking123@hotmail.com"
] |
dkisking123@hotmail.com
|
a1e158e517552ae8f53cb396d97db72b67e7df95
|
6252c165657baa6aa605337ebc38dd44b3f694e2
|
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/TemperatureController2107.java
|
b6bf3699f49d3eb8b6f876e8f85151578d5aa420
|
[] |
no_license
|
soha500/EglSync
|
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
|
55101bc781349bb14fefc178bf3486e2b778aed6
|
refs/heads/master
| 2021-06-23T02:55:13.464889
| 2020-12-11T19:10:01
| 2020-12-11T19:10:01
| 139,832,721
| 0
| 1
| null | 2019-05-31T11:34:02
| 2018-07-05T10:20:00
|
Java
|
UTF-8
|
Java
| false
| false
| 367
|
java
|
package syncregions;
public class TemperatureController2107 {
public execute(int temperature2107, int targetTemperature2107) {
//sync _bfpnFUbFEeqXnfGWlV2107, behaviour
1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0;
//endSync
}
}
|
[
"sultanalmutairi@172.20.10.2"
] |
sultanalmutairi@172.20.10.2
|
40ad9dc10c71cb79f5adbffc455cd7b1137d5b6d
|
cdbdddac426bce27ad97401b779392327a6a77eb
|
/spring/mixed/SpringAOP/src/com/java/spring/Security.java
|
595a3ebee6e388edf0d86860485fc766ed9d51fa
|
[] |
no_license
|
dhirajn72/allmylocalstuff
|
87dc68dfe014f31f6c96e996d6b251ff4bda4de8
|
2f50ab2f3f6b37f71cd02cc253639c540006b933
|
refs/heads/master
| 2022-12-23T09:42:59.221342
| 2021-07-28T19:11:40
| 2021-07-28T19:11:40
| 97,965,789
| 1
| 1
| null | 2022-12-16T09:55:29
| 2017-07-21T16:08:29
|
Roff
|
UTF-8
|
Java
| false
| false
| 304
|
java
|
package com.java.spring;
public class Security {
public void verifySecurity() {
System.out.println("Security-verifySecurity()");
}
public void expnHandler() {
try {
System.out.println("Security-expnHandler()");
} catch (Exception e) {
System.out.println("handled exception");
}
}
}
|
[
"dhirajn72@gmail.com"
] |
dhirajn72@gmail.com
|
56e94a1fc7aac53165ad00428b5a42bbb7d0a8a6
|
146086a1d08e226047b91c8b11675b0ed8b9f029
|
/snap-studio-index/src/main/java/org/snapscript/studio/index/classpath/node/ClassIndexNode.java
|
e57780f6eb5fb18e72b229fdfc1eb7693082641d
|
[] |
no_license
|
snapscript/snap-develop
|
750c82b8b82f7cb5369bec0f7354d007d15bfee0
|
12ea04b6af12b95426171dc668fcd2fc4f21d4d2
|
refs/heads/master
| 2020-05-21T14:59:23.856444
| 2019-02-09T15:17:50
| 2019-02-09T15:17:50
| 65,230,424
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,447
|
java
|
package org.snapscript.studio.index.classpath.node;
import java.lang.reflect.Modifier;
import java.util.Set;
import org.snapscript.studio.index.IndexNode;
import org.snapscript.studio.index.IndexType;
import org.snapscript.studio.index.classpath.ClassFile;
import org.snapscript.studio.index.classpath.ClassCategory;
import org.snapscript.studio.index.classpath.ClassIndexProcessor;
public class ClassIndexNode extends ClassFileNode {
private Set<IndexNode> children;
private String fullName;
private String typeName;
private String name;
private Class type;
public ClassIndexNode(ClassFile file) {
super(file);
}
@Override
public String getName() {
if(name == null) {
name = file.getShortName();
}
return name;
}
@Override
public String getTypeName() {
if(typeName == null) {
typeName = file.getTypeName();
}
return typeName;
}
@Override
public String getFullName() {
if(fullName == null) {
fullName = file.getFullName();
}
return fullName;
}
@Override
public IndexNode getConstraint() {
return null;
}
@Override
public IndexNode getParent() {
Class type = getNodeClass();
if(type != null) {
Class parent = type.getDeclaringClass();
if(parent != null) {
return ClassIndexProcessor.getIndexNode(parent);
}
}
return null;
}
@Override
public boolean isPublic() {
int modifiers = file.getModifiers();
return Modifier.isPublic(modifiers);
}
@Override
public IndexType getType() {
ClassCategory type = file.getCategory();;
if(type != null) {
if(type == ClassCategory.INTERFACE) {
return IndexType.TRAIT;
}
if(type == ClassCategory.ENUM) {
return IndexType.ENUM;
}
}
return IndexType.CLASS;
}
@Override
public Set<IndexNode> getNodes() {
if(children == null) {
children = ClassIndexProcessor.getChildren(file);
}
return children;
}
private Class getNodeClass() {
if(type == null) {
try {
type = file.loadClass();
} catch(Throwable e) {
return null;
}
}
return type;
}
@Override
public String toString(){
return getFullName();
}
}
|
[
"gallagher_niall@yahoo.com"
] |
gallagher_niall@yahoo.com
|
8f6bd8afd9051fd59fbcc6a08aea953e50d00a31
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2019/8/Util.java
|
7fcb67adba3beb4008cb508a01c2f55038beca95
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 1,884
|
java
|
/*
* Copyright (c) 2002-2019 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.commandline;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import org.neo4j.cli.CommandFailedException;
import static java.lang.String.format;
import static org.neo4j.io.fs.FileUtils.getCanonicalFile;
public class Util
{
private Util()
{
}
public static boolean isSameOrChildFile( File parent, File candidate )
{
Path canonicalCandidate = getCanonicalFile( candidate ).toPath();
Path canonicalParentPath = getCanonicalFile( parent ).toPath();
return canonicalCandidate.startsWith( canonicalParentPath );
}
public static boolean isSameOrChildPath( Path parent, Path candidate )
{
Path normalizedCandidate = candidate.normalize();
Path normalizedParent = parent.normalize();
return normalizedCandidate.startsWith( normalizedParent );
}
public static void wrapIOException( IOException e ) throws CommandFailedException
{
throw new CommandFailedException(
format( "Unable to load database: %s: %s", e.getClass().getSimpleName(), e.getMessage() ), e );
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
e679a95c3f56e2425976ddd39a8782c1acd8240d
|
f567aec80b1f263ff4daaa96fee3d5f685a33b5e
|
/src/main/java/com/nelioalves/cursomc/resources/utils/Uri.java
|
39ffa0e884fb4a3cda4c271cd9322b5895c76e79
|
[] |
no_license
|
JoaoVFG/cursomc
|
dc2164144160c646c2aff06a332735a447fcc82b
|
e1eabb6dfef01c52627b7862f2dd886574d2e50a
|
refs/heads/master
| 2020-03-10T14:35:43.194702
| 2018-06-22T15:58:58
| 2018-06-22T15:58:58
| 129,430,382
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
package com.nelioalves.cursomc.resources.utils;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class Uri {
public static List<Integer> decodeIntList(String string){
/**String vetor [] = string.split(",");
List<Integer> lista = new ArrayList<>();
for (int i = 0; i < vetor.length; i++) {
lista.add(Integer.parseInt(vetor[i]));
}
return lista;**/
return Arrays.asList(string.split(",")).stream().map(x -> Integer.parseInt(x)).collect(Collectors.toList());
}
public static String decodeParam(String string) {
try {
return URLDecoder.decode(string, "UTF-8");
} catch (UnsupportedEncodingException e) {
return "";
}
}
}
|
[
"="
] |
=
|
d085be2e48390902c20bdebaffd8cb91952e997b
|
bb9140f335d6dc44be5b7b848c4fe808b9189ba4
|
/Extra-DS/Corpus/class/aspectj/4.java
|
2dc95751d3b27fee810d97dacb624c20f40f42d1
|
[] |
no_license
|
masud-technope/EMSE-2019-Replication-Package
|
4fc04b7cf1068093f1ccf064f9547634e6357893
|
202188873a350be51c4cdf3f43511caaeb778b1e
|
refs/heads/master
| 2023-01-12T21:32:46.279915
| 2022-12-30T03:22:15
| 2022-12-30T03:22:15
| 186,221,579
| 5
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,414
|
java
|
/* *******************************************************************
* Copyright (c) 2003 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Common Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* Wes Isberg initial implementation
* ******************************************************************/
package org.aspectj.testing.util.options;
import java.util.Arrays;
import junit.framework.Assert;
import org.aspectj.testing.util.LangUtil;
/**
* Drivers to test a given set of Options.
* They now throw AssertionFailedError on failure,
* but subclasses can reimplement
* <code>assertionFailed(String)</code>
* to handle failures differently.
*/
public class OptionChecker {
private final Options options;
public OptionChecker(Options options) {
this.options = options;
LangUtil.throwIaxIfNull(options, "options");
}
/**
* Subclasses override this to throw different exceptions
* on assertion failures.
* This implementation delegates to
* <code>Assert.assertTrue(label, false)</code>.
* @param label the String message for the assertion
*
*/
public void assertionFailed(String label) {
Assert.assertTrue(label, false);
}
public void checkAssertion(String label, boolean test) {
if (!test) {
assertionFailed(label);
}
}
public void checkOptions(String[] input, String[] expected) {
checkOptions(input, expected, true);
}
public void checkOptions(String[] input, String[] expected, boolean resolve) {
Values values = getValues(input);
if (resolve) {
String err = values.resolve();
checkAssertion("error: \"" + err + "\"", null == err);
}
// Value.render(values);
String[] actual = values.render();
checkEqual(expected, actual);
}
public void checkOptionsNegative(String[] input, String expectedMissedMatchErr, String expectedResolveErr) {
checkOptionsNegative(input, null, expectedMissedMatchErr, expectedResolveErr);
}
public void checkOptionsNegative(String[] input, String expectedInValuesException, String expectedMissedMatchErr, String expectedResolveErr) {
Values values = getValuesNegative(input, expectedInValuesException);
if (null == expectedInValuesException) {
String err = Options.missedMatchError(input, values);
checkContains(expectedMissedMatchErr, err);
err = values.resolve();
checkContains(expectedResolveErr, err);
}
}
private Values getValuesNegative(String[] input, String expectedInExceptionMessage, Options options) {
try {
return options.acceptInput(input);
} catch (Option.InvalidInputException e) {
String m = e.getFullMessage();
boolean ok = (null != expectedInExceptionMessage) && (-1 != m.indexOf(expectedInExceptionMessage));
if (!ok) {
e.printStackTrace(System.err);
if (null != expectedInExceptionMessage) {
m = "expected \"" + expectedInExceptionMessage + "\" in " + m;
}
assertionFailed(m);
}
return null;
}
}
private Values getValuesNegative(String[] input, String expectedInExceptionMessage) {
return getValuesNegative(input, expectedInExceptionMessage, options);
}
// private Values getValues(String[] input, Options options) {
// return getValuesNegative(input, null, options);
// }
private Values getValues(String[] input) {
return getValuesNegative(input, null);
}
private void checkContains(String expected, String expectedIn) {
if (null == expected) {
if (null != expectedIn) {
assertionFailed("did not expect \"" + expectedIn + "\"");
}
} else {
if ((null == expectedIn) || (-1 == expectedIn.indexOf(expected))) {
assertionFailed("expected \"" + expected + "\" in \"" + expectedIn + "\"");
}
}
}
private String safeString(String[] ra) {
return (null == ra ? "null" : Arrays.asList(ra).toString());
}
private void checkEqual(String[] expected, String[] actual) {
if (!isEqual(expected, actual)) {
assertionFailed("expected \"" + safeString(expected) + "\" got \"" + safeString(actual) + "\"");
}
}
private boolean isEqual(String[] expected, String[] actual) {
if (null == expected) {
return (null == actual ? true : false);
} else if (null == actual) {
return false;
} else if (expected.length != actual.length) {
return false;
}
for (int i = 0; i < actual.length; i++) {
String e = expected[i];
String a = actual[i];
if (null == e) {
if (null != a) {
return false;
}
} else if (null == a) {
return false;
} else if (!(e.equals(a))) {
return false;
}
}
return true;
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
275ad83319b20568e77df56709980f9284a5fef5
|
9c0ddbea52ba7292f6095ea51cbb59786864188e
|
/src/main/java/com/xxxx/jvm/classloader/MyTest23.java
|
1a10a6d73a936d7dfac725f3a4b5a91cd66a253c
|
[] |
no_license
|
Yun-xi/jvm
|
2f78507a7fefbc2df33d608baa8abc4f46a823ed
|
79476cfbb34c8b7370d5766283772002aa0a7e5b
|
refs/heads/master
| 2020-05-18T22:18:44.752076
| 2019-06-27T02:29:05
| 2019-06-27T02:29:05
| 184,687,897
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,115
|
java
|
package com.xxxx.jvm.classloader;
import sun.misc.Launcher;
/**
* 在运行期,一个Java类是由该类的完全限定名(binary name, 二进制名)和用于加载该类的定义类加载器(defining loader)所共同决定的。
* 如果同样名字(即相同的完全限定名)的类是由俩个不同的加载器所加载,那么这些类就是不同的,即便.class文件的字节码完全一样,并且从相同的位置加载亦如此。
*/
public class MyTest23 {
public static void main(String[] args) {
System.out.println(System.getProperty("sun.boot.class.path"));
System.out.println(System.getProperty("java.ext.dirs"));
System.out.println(System.getProperty("java.class.path"));
/*
内建于JVM中的启动类加载器会加载java.lang.ClassLoader以及其他的Java平台类,
当JVM启动时,一块特殊的机器码会运行,它会加载扩展类加载器与系统类加载器,
这块特殊的机器码叫做启动类加载器(Bootstrap)
启动类加载器并不是Java类,而其他的加载器则都是Java类,
启动类加载器是特定于平台的机器指令,它负责开启整个加载过程。
所有类加载器(除了启动类加载器)都被实现为Java类。不过,总归要有一个组件来加载第一个类加载器,从而让整个加载过程能够
顺利进行下去,加载第一个纯Java类加载器就是启动类加载器的职责。
启动类加载器还会负责加载供JRE正常运行所需要的基本组件,这包括java.util与java.lang包中的类等等。
*/
System.out.println(ClassLoader.class.getClassLoader());
// 扩展类加载器与系统类加载器也是由启动类加载器所加载的
System.out.println(Launcher.class.getClassLoader());
System.out.println("---------------------------------");
System.out.println(System.getProperty("java.system.class.loader"));
}
}
|
[
"987159036@qq.com"
] |
987159036@qq.com
|
34496ef3aaed2f745f7edac3cb75c1b261c02d34
|
eca4a253fe0eba19f60d28363b10c433c57ab7a1
|
/server/openjacob.engine/java/de/tif/jacob/soap/SOAPContext.java
|
feb1453d4b438d000407e96dd59ba597a9d09610
|
[] |
no_license
|
freegroup/Open-jACOB
|
632f20575092516f449591bf6f251772f599e5fc
|
84f0a6af83876bd21c453132ca6f98a46609f1f4
|
refs/heads/master
| 2021-01-10T11:08:03.604819
| 2015-05-25T10:25:49
| 2015-05-25T10:25:49
| 36,183,560
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,014
|
java
|
/*******************************************************************************
* This file is part of Open-jACOB
* Copyright (C) 2005-2006 Tarragon GmbH
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*******************************************************************************/
package de.tif.jacob.soap;
import de.tif.jacob.core.ManagedResource;
import de.tif.jacob.core.Session;
import de.tif.jacob.core.SessionContext;
import de.tif.jacob.core.definition.IApplicationDefinition;
import de.tif.jacob.screen.impl.HTTPApplication;
import de.tif.jacob.security.IUser;
/**
*
*/
public class SOAPContext extends SessionContext
{
private final SOAPSession session;
protected SOAPContext(SOAPSession session, IApplicationDefinition appDef, IUser user)
{
super(appDef, user);
this.session = session;
}
public void canAbort(boolean flag)
{
// ignore. A SOAPContext didn't provide a abort feature
}
public boolean shouldAbort()
{
return false;
}
/*
* @see de.tif.jacob.core.SessionContext#getSession()
*/
public Session getSession()
{
return session;
}
/*
* @see de.tif.jacob.core.Context#registerForSession(de.tif.jacob.core.ManagedResource)
*/
public void registerForSession(ManagedResource resource)
{
// SOAP Request is stateless. In this case all resource has only a request life cycle.
//
super.registerForRequest(resource);
}
/*
* @see de.tif.jacob.core.Context#registerForWindow(de.tif.jacob.core.ManagedResource)
*/
public void registerForWindow(ManagedResource resource)
{
// SOAP Request is stateless. In this case all resource has only a request life cycle.
//
super.registerForRequest(resource);
}
/**
* There is no session for a SOAPContext. The SOAPContext is
* only valid for one schedule cycle. Redirect the property to the
* request life cycle handler.<br>
* <br>
*/
public void setPropertyForSession(Object key, Object value)
{
setPropertyForRequest(key,value);
}
/**
* There is no window for a SOAPContext. The SOAPContext is
* only valid for one schedule cycle. Redirect the property to the
* request life cycle handler.<br>
* <br>
*/
public void setPropertyForWindow(Object key, Object value)
{
setPropertyForRequest(key,value);
}
}
|
[
"a.herz@freegroup.de"
] |
a.herz@freegroup.de
|
02cc217b3e249664ca906acb5b75ec6772aabf73
|
255ff79057c0ff14d0b760fc2d6da1165f1806c8
|
/07ProjectStep02/01资料-数据层全栈方案 SpringData 高级应用/案例/springdata/03-sd-jpa-manytable/src/main/java/com/itheima/domain/ArticleData.java
|
7bcfb481c4e37936fd2ebc0d86a81a125f9d87b8
|
[] |
no_license
|
wjphappy90/Resource
|
7f1f817d323db5adae06d26da17dfc09ee5f9d3a
|
6574c8399f3cdfb6d6b39cd64dc9507e784a2549
|
refs/heads/master
| 2022-07-30T03:33:59.869345
| 2020-08-10T02:31:35
| 2020-08-10T02:31:35
| 285,701,650
| 2
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,147
|
java
|
package com.itheima.domain;
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "article_data")
public class ArticleData {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String content;
//让这个实体维护关系
//name 当前表中的外键名
//referencedColumnName 指向的对方表中的主键名
@OneToOne
@JoinColumn(name = "articleId", referencedColumnName = "aid", unique = true)
private Article article;
public Article getArticle() {
return article;
}
public void setArticle(Article article) {
this.article = article;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public String toString() {
return "ArticleData{" +
"id=" + id +
", content='" + content + '\'' +
'}';
}
}
|
[
"981146457@qq.com"
] |
981146457@qq.com
|
06960346a1f081f08669d0b5f4930ff6075d1b8e
|
15b260ccada93e20bb696ae19b14ec62e78ed023
|
/v2/src/main/java/com/alipay/api/domain/AlipayCommerceEducateSceneUserSignModel.java
|
3209b3d669d5901b4d4f6abce19d2e2d5fed628f
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-java-all
|
df461d00ead2be06d834c37ab1befa110736b5ab
|
8cd1750da98ce62dbc931ed437f6101684fbb66a
|
refs/heads/master
| 2023-08-27T03:59:06.566567
| 2023-08-22T14:54:57
| 2023-08-22T14:54:57
| 132,569,986
| 470
| 207
|
Apache-2.0
| 2022-12-25T07:37:40
| 2018-05-08T07:19:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,581
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 刷脸用户信息开通申请
*
* @author auto create
* @since 1.0, 2022-11-17 15:26:13
*/
public class AlipayCommerceEducateSceneUserSignModel extends AlipayObject {
private static final long serialVersionUID = 1688786743813425658L;
/**
* 开通人绑定的支付宝openId
*/
@ApiField("alipay_open_id")
private String alipayOpenId;
/**
* 支付宝学校内标
*/
@ApiField("alipay_school_id")
private String alipaySchoolId;
/**
* 开通人绑定的支付宝UID
*/
@ApiField("alipay_user_id")
private String alipayUserId;
/**
* 证件号码
*/
@ApiField("cert_no")
private String certNo;
/**
* 证件类型。{1:居民身份证;A:护照;X:学工号}
*/
@ApiField("cert_type")
private String certType;
/**
* 刷脸用户姓名
*/
@ApiField("name")
private String name;
/**
* 平台来源标识(使用开放平台pid)
*/
@ApiField("platform_channel")
private String platformChannel;
/**
* 二级渠道来源标识(使用渠道商的开放平台pid)
*/
@ApiField("sub_channel")
private String subChannel;
/**
* iot采脸流水id
*/
@ApiField("zim_id")
private String zimId;
public String getAlipayOpenId() {
return this.alipayOpenId;
}
public void setAlipayOpenId(String alipayOpenId) {
this.alipayOpenId = alipayOpenId;
}
public String getAlipaySchoolId() {
return this.alipaySchoolId;
}
public void setAlipaySchoolId(String alipaySchoolId) {
this.alipaySchoolId = alipaySchoolId;
}
public String getAlipayUserId() {
return this.alipayUserId;
}
public void setAlipayUserId(String alipayUserId) {
this.alipayUserId = alipayUserId;
}
public String getCertNo() {
return this.certNo;
}
public void setCertNo(String certNo) {
this.certNo = certNo;
}
public String getCertType() {
return this.certType;
}
public void setCertType(String certType) {
this.certType = certType;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getPlatformChannel() {
return this.platformChannel;
}
public void setPlatformChannel(String platformChannel) {
this.platformChannel = platformChannel;
}
public String getSubChannel() {
return this.subChannel;
}
public void setSubChannel(String subChannel) {
this.subChannel = subChannel;
}
public String getZimId() {
return this.zimId;
}
public void setZimId(String zimId) {
this.zimId = zimId;
}
}
|
[
"auto-publish"
] |
auto-publish
|
aa38f6f82b317838dbf48b01244c9561407da0cc
|
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
|
/sources/com/google/android/gms/maps/internal/zzbq.java
|
672e507a0b0c7bccf2701a38f393309d6b14d817
|
[] |
no_license
|
TheWizard91/Album_base_source_from_JADX
|
946ea3a407b4815ac855ce4313b97bd42e8cab41
|
e1d228fc2ee550ac19eeac700254af8b0f96080a
|
refs/heads/master
| 2023-01-09T08:37:22.062350
| 2020-11-11T09:52:40
| 2020-11-11T09:52:40
| 311,927,971
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,040
|
java
|
package com.google.android.gms.maps.internal;
import com.google.android.gms.internal.maps.zzb;
public abstract class zzbq extends zzb implements zzbp {
public zzbq() {
super("com.google.android.gms.maps.internal.IOnStreetViewPanoramaReadyCallback");
}
/* JADX WARNING: type inference failed for: r3v2, types: [android.os.IInterface] */
/* access modifiers changed from: protected */
/* JADX WARNING: Multi-variable type inference failed */
/* JADX WARNING: Unknown variable types count: 1 */
/* Code decompiled incorrectly, please refer to instructions dump. */
public final boolean dispatchTransaction(int r2, android.os.Parcel r3, android.os.Parcel r4, int r5) throws android.os.RemoteException {
/*
r1 = this;
r5 = 1
if (r2 != r5) goto L_0x0027
android.os.IBinder r2 = r3.readStrongBinder()
if (r2 != 0) goto L_0x000b
r2 = 0
goto L_0x001f
L_0x000b:
java.lang.String r3 = "com.google.android.gms.maps.internal.IStreetViewPanoramaDelegate"
android.os.IInterface r3 = r2.queryLocalInterface(r3)
boolean r0 = r3 instanceof com.google.android.gms.maps.internal.IStreetViewPanoramaDelegate
if (r0 == 0) goto L_0x0019
r2 = r3
com.google.android.gms.maps.internal.IStreetViewPanoramaDelegate r2 = (com.google.android.gms.maps.internal.IStreetViewPanoramaDelegate) r2
goto L_0x001f
L_0x0019:
com.google.android.gms.maps.internal.zzbu r3 = new com.google.android.gms.maps.internal.zzbu
r3.<init>(r2)
r2 = r3
L_0x001f:
r1.zza(r2)
r4.writeNoException()
return r5
L_0x0027:
r2 = 0
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.maps.internal.zzbq.dispatchTransaction(int, android.os.Parcel, android.os.Parcel, int):boolean");
}
}
|
[
"agiapong@gmail.com"
] |
agiapong@gmail.com
|
c3869d2cc4b9851588af440509e194ebc7ccd8e4
|
5e7bc3cbaceaba8be2cb9de951198c5283844173
|
/components/Component-cache-method/src/main/java/com/fast/dev/component/cachemethod/annotations/CleanMethod.java
|
628a17ea2b786d6e4bb0f5252d7baad9cb1347ff
|
[] |
no_license
|
lianshufeng/Fast
|
abbb162db05b4b0ece3db60a7eea0c38c686462a
|
0b29400c2ec88db033729e9dd645db9aa792d06f
|
refs/heads/master
| 2022-07-08T23:30:13.190635
| 2021-05-26T05:41:10
| 2021-05-26T05:41:10
| 130,854,753
| 9
| 1
| null | 2022-06-25T07:26:27
| 2018-04-24T12:58:53
|
Java
|
UTF-8
|
Java
| false
| false
| 484
|
java
|
package com.fast.dev.component.cachemethod.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CleanMethod {
/**
* 缓存数据集名,支持多个
*
* @return
*/
String[] collectionName();
}
|
[
"251708339@qq.com"
] |
251708339@qq.com
|
1036c2647767c020d29ead28a85b7f9deb21fb22
|
7099faaa76b4df9ad60ee7c878b34d4037ab5fd9
|
/app/src/main/java/com/daqsoft/commonnanning/ui/main/PanoramaListActivity.java
|
fce181afca34f0588dd30dda3b3b86e1a376e407
|
[] |
no_license
|
loading103/CommonNanNing
|
655bb57de9dc945d08f665e48fee4e186b024928
|
0b4362ab67d4909e585b63f7c25e0a1b735b1214
|
refs/heads/main
| 2023-07-25T11:11:30.094251
| 2021-09-06T02:50:24
| 2021-09-06T02:50:24
| 403,457,236
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,701
|
java
|
package com.daqsoft.commonnanning.ui.main;
import android.support.annotation.NonNull;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.ViewAnimator;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.daqsoft.commonnanning.R;
import com.daqsoft.commonnanning.common.Constant;
import com.daqsoft.commonnanning.common.URLConstant;
import com.daqsoft.commonnanning.http.RetrofitHelper;
import com.daqsoft.commonnanning.ui.entity.PanoramaListBean;
import com.daqsoft.commonnanning.utils.GlideUtils;
import com.example.tomasyb.baselib.adapter.BaseQuickAdapter;
import com.example.tomasyb.baselib.adapter.BaseViewHolder;
import com.example.tomasyb.baselib.base.mvp.BaseActivity;
import com.example.tomasyb.baselib.base.mvp.IBasePresenter;
import com.example.tomasyb.baselib.base.net.entity.BaseResponse;
import com.example.tomasyb.baselib.refresh.SmartRefreshLayout;
import com.example.tomasyb.baselib.refresh.api.RefreshLayout;
import com.example.tomasyb.baselib.refresh.listener.OnRefreshListener;
import com.example.tomasyb.baselib.widget.HeadView;
import java.util.List;
import butterknife.BindView;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
/**
* 720列表界面
*
* @author 严博
* @version 1.0.0
* @date 2018-6-4.15:50
* @since JDK 1.8
*/
@Route(path = Constant.ACTIVITY_PANORAMALIST)
public class PanoramaListActivity extends BaseActivity {
@BindView(R.id.mpanlist_rv)
RecyclerView mRv;
@BindView(R.id.refreshlayout)
SmartRefreshLayout mSmatRefresh;
@BindView(R.id.pan_va)
ViewAnimator mVa;
@BindView(R.id.head)
HeadView mHead;
private int mPage = 1;
private BaseQuickAdapter<PanoramaListBean, BaseViewHolder> mAdapter;
@Override
public int getLayoutId() {
return R.layout.activity_panorama_list_activity;
}
@Override
public void initView() {
mHead.setTitle("全景游览");
mHead.setBackListener(new HeadView.OnBackListener() {
@Override
public void onBack(View v) {
finish();
}
});
initAdapter();
mSmatRefresh.autoRefresh();
mSmatRefresh.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
getData(true);
}
});
}
private void initAdapter() {
mRv.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new BaseQuickAdapter<PanoramaListBean, BaseViewHolder>(R.layout.item_fun_line,
null) {
@Override
protected void convert(BaseViewHolder helper, final PanoramaListBean bean) {
helper.setVisible(R.id.tv_seven, true);
GlideUtils.loadImage(mContext,(ImageView) helper.getView(R.id.img_index_scenic),bean.getCoverpictureTowToOne(),R.mipmap.common_ba_banner);
helper.setText(R.id.tv_index_scenic, bean.getName());
helper.setOnClickListener(R.id.img_index_scenic, new View.OnClickListener() {
@Override
public void onClick(View view) {
ARouter.getInstance().build(Constant.ACTIVITY_BASEWEB).withString
("HTMLURL", bean.getUrl())
.withString("HTMLTITLE", bean.getName())
.navigation();
}
});
}
};
mAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
getData(false);
}
});
mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_BOTTOM);
mRv.setAdapter(mAdapter);
}
/**
* 获取数据
*/
private void getData(final boolean isRefresh) {
if (isRefresh) {
mPage = 1;
// 这里的作用是防止下拉刷新的时候还可以上拉加载
mAdapter.setEnableLoadMore(false);
}
RetrofitHelper.getApiService().getPanoramaList(mPage + "", URLConstant.LIMITPAGE + "")
.subscribeOn(Schedulers.io())
.doOnSubscribe(new Consumer<Disposable>() {
@Override
public void accept(Disposable disposable) throws Exception {
addDisposable(disposable);
}
})
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<BaseResponse<PanoramaListBean>>() {
@Override
public void accept(BaseResponse<PanoramaListBean>
bean) throws Exception {
setData(isRefresh, bean.getDatas());
if (isRefresh) {
mAdapter.setEnableLoadMore(true);
mSmatRefresh.finishRefresh();
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (isRefresh) {
mVa.setDisplayedChild(1);
mAdapter.setEnableLoadMore(true);
mSmatRefresh.finishRefresh();
} else {
mAdapter.loadMoreFail();
}
}
});
}
private void setData(boolean isRefresh, List data) {
mPage++;
final int size = data == null ? 0 : data.size();
if (isRefresh) {
if (size > 0) {
mVa.setDisplayedChild(0);
mAdapter.setNewData(data);
} else {
mVa.setDisplayedChild(1);
}
} else {
if (size > 0) {
mAdapter.addData(data);
}
}
if (size < URLConstant.LIMITPAGE) {
// 第一页如果不够一页就不显示没有更多数据布局
mAdapter.loadMoreEnd(isRefresh);
} else {
mAdapter.loadMoreComplete();
}
}
@Override
public IBasePresenter initPresenter() {
return null;
}
}
|
[
"qiuql@daqsoft.com"
] |
qiuql@daqsoft.com
|
464e9950fb650d95591c18cb269c274468de3dc0
|
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
|
/sourcecode7/src/sun/beans/editors/ColorEditor.java
|
f447a6987a2a12f69e643d32157b7ecbb837f800
|
[
"Apache-2.0"
] |
permissive
|
hanekawasann/learn
|
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
|
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
|
refs/heads/master
| 2022-09-13T02:18:07.127489
| 2020-04-26T07:58:35
| 2020-04-26T07:58:35
| 176,686,231
| 0
| 0
|
Apache-2.0
| 2022-09-01T23:21:38
| 2019-03-20T08:16:05
|
Java
|
UTF-8
|
Java
| false
| false
| 6,286
|
java
|
/*
* Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.beans.editors;
import java.awt.*;
import java.beans.*;
public class ColorEditor extends Panel implements PropertyEditor {
private static final long serialVersionUID = 1781257185164716054L;
public ColorEditor() {
setLayout(null);
ourWidth = hPad;
// Create a sample color block bordered in black
Panel p = new Panel();
p.setLayout(null);
p.setBackground(Color.black);
sample = new Canvas();
p.add(sample);
sample.reshape(2, 2, sampleWidth, sampleHeight);
add(p);
p.reshape(ourWidth, 2, sampleWidth + 4, sampleHeight + 4);
ourWidth += sampleWidth + 4 + hPad;
text = new TextField("", 14);
add(text);
text.reshape(ourWidth, 0, 100, 30);
ourWidth += 100 + hPad;
choser = new Choice();
int active = 0;
for (int i = 0; i < colorNames.length; i++) {
choser.addItem(colorNames[i]);
}
add(choser);
choser.reshape(ourWidth, 0, 100, 30);
ourWidth += 100 + hPad;
resize(ourWidth, 40);
}
public void setValue(Object o) {
Color c = (Color) o;
changeColor(c);
}
public Dimension preferredSize() {
return new Dimension(ourWidth, 40);
}
public boolean keyUp(Event e, int key) {
if (e.target == text) {
try {
setAsText(text.getText());
} catch (IllegalArgumentException ex) {
// Quietly ignore.
}
}
return (false);
}
public void setAsText(String s) throws java.lang.IllegalArgumentException {
if (s == null) {
changeColor(null);
return;
}
int c1 = s.indexOf(',');
int c2 = s.indexOf(',', c1 + 1);
if (c1 < 0 || c2 < 0) {
// Invalid string.
throw new IllegalArgumentException(s);
}
try {
int r = Integer.parseInt(s.substring(0, c1));
int g = Integer.parseInt(s.substring(c1 + 1, c2));
int b = Integer.parseInt(s.substring(c2 + 1));
Color c = new Color(r, g, b);
changeColor(c);
} catch (Exception ex) {
throw new IllegalArgumentException(s);
}
}
public boolean action(Event e, Object arg) {
if (e.target == choser) {
changeColor(colors[choser.getSelectedIndex()]);
}
return false;
}
public String getJavaInitializationString() {
return (this.color != null) ? "new java.awt.Color(" + this.color.getRGB() + ",true)" : "null";
}
private void changeColor(Color c) {
if (c == null) {
this.color = null;
this.text.setText("");
return;
}
color = c;
text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue());
int active = 0;
for (int i = 0; i < colorNames.length; i++) {
if (color.equals(colors[i])) {
active = i;
}
}
choser.select(active);
sample.setBackground(color);
sample.repaint();
support.firePropertyChange("", null, null);
}
public Object getValue() {
return color;
}
public boolean isPaintable() {
return true;
}
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
Color oldColor = gfx.getColor();
gfx.setColor(Color.black);
gfx.drawRect(box.x, box.y, box.width - 3, box.height - 3);
gfx.setColor(color);
gfx.fillRect(box.x + 1, box.y + 1, box.width - 4, box.height - 4);
gfx.setColor(oldColor);
}
public String getAsText() {
return (this.color != null) ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
: null;
}
public String[] getTags() {
return null;
}
public java.awt.Component getCustomEditor() {
return this;
}
public boolean supportsCustomEditor() {
return true;
}
public void addPropertyChangeListener(PropertyChangeListener l) {
support.addPropertyChangeListener(l);
}
public void removePropertyChangeListener(PropertyChangeListener l) {
support.removePropertyChangeListener(l);
}
private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray", "black", "red", "pink", "orange",
"yellow", "green", "magenta", "cyan", "blue" };
private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray, Color.black, Color.red,
Color.pink, Color.orange, Color.yellow, Color.green, Color.magenta, Color.cyan, Color.blue };
private Canvas sample;
private int sampleHeight = 20;
private int sampleWidth = 40;
private int hPad = 5;
private int ourWidth;
private Color color;
private TextField text;
private Choice choser;
private PropertyChangeSupport support = new PropertyChangeSupport(this);
}
|
[
"763803382@qq.com"
] |
763803382@qq.com
|
3145d33e2eafa89326047eac7144b4ed87178a3f
|
e89dc01c95b8b45404f971517c2789fd21657749
|
/src/main/java/com/alipay/api/response/AlipayEbppInstserviceDeductUnsignResponse.java
|
bf111905fa1e0136eed06408c941588018dcdecc
|
[
"Apache-2.0"
] |
permissive
|
guoweiecust/alipay-sdk-java-all
|
3370466eec70c5422c8916c62a99b1e8f37a3f46
|
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
|
refs/heads/master
| 2023-05-05T07:06:47.823723
| 2021-05-25T15:26:21
| 2021-05-25T15:26:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 888
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ebpp.instservice.deduct.unsign response.
*
* @author auto create
* @since 1.0, 2020-09-11 19:25:11
*/
public class AlipayEbppInstserviceDeductUnsignResponse extends AlipayResponse {
private static final long serialVersionUID = 7691496889748197857L;
/**
* 错误码
*/
@ApiField("error_code")
private String errorCode;
/**
* 流程id
*/
@ApiField("process_id")
private String processId;
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorCode( ) {
return this.errorCode;
}
public void setProcessId(String processId) {
this.processId = processId;
}
public String getProcessId( ) {
return this.processId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0210e97f49f4266187a7bdbb3a6616f7c3008e84
|
0bf4c06c4eaf64f3196480b00d41bc5a64b91404
|
/加密和安全/src/com/lucas/javase/security/USBkey/Main.java
|
5f58eed647cd4b10ac77993cb4960ee2317ef3e8
|
[
"Apache-2.0"
] |
permissive
|
Lucasli2018/Javase-High
|
d8388f1b8845acb9128f45bd1c0d5a62364fd973
|
2de60edb0e35ba4151172e386ef106fef441b244
|
refs/heads/master
| 2020-05-04T04:15:11.758081
| 2019-04-17T15:43:38
| 2019-04-17T15:43:38
| 178,961,837
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
package com.lucas.javase.security.USBkey;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import java.security.Security;
import java.util.Base64;
import java.util.Scanner;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
public class Main {
public static void main(String[] args) throws Exception {
// 把BouncyCastle作为Provider添加到java.security:
Security.addProvider(new BouncyCastleProvider());
// 原文:
String message = "Hello, world! encrypted using password and USB key!";
// 加密口令:
@SuppressWarnings("resource")
Scanner in = new Scanner(System.in);
System.out.print("Input password to encrypt: ");
String password = in.nextLine();
// USBKey:
USBKey ukey = USBKey.createUSBKey("usbkey.txt");
// 加密:
byte[] data = message.getBytes(StandardCharsets.UTF_8);
byte[] encrypted = ukey.encrypt(password, data);
System.out.println("encrypted: " + Base64.getEncoder().encodeToString(encrypted));
// 解密:
System.out.println("Input password to decrypt: ");
String password2 = in.nextLine();
try {
byte[] decrypted = ukey.decrypt(password2, encrypted);
System.out.print(new String(decrypted, "UTF-8"));
} catch (GeneralSecurityException e) {
System.out.println("Failed decrypt: bad password!");
}
}
}
|
[
"1906859953@qq.com"
] |
1906859953@qq.com
|
eefb02439b81e22d9ab026c86543cac70905ee2f
|
be59c0ca127a4f7041758b2709e1327bc71b6e12
|
/qipai/game-mj-cqxzmj/src/main/java/com/sy599/game/qipai/cqxzmj/constant/CqxzMjConstants.java
|
ac208f576b855a1a211d2400b73d5e5ca9670e83
|
[] |
no_license
|
Yiwei-TEST/xxqp-server
|
2389dd6b12614b0a9557d59b473f88a3a59620cf
|
c2c683ce8060c0cbaee86c3ee550e0195e1bb7e4
|
refs/heads/main
| 2023-08-14T08:49:37.586893
| 2021-09-15T03:21:13
| 2021-09-15T03:21:13
| 401,583,086
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,197
|
java
|
package com.sy599.game.qipai.cqxzmj.constant;
import java.util.ArrayList;
import java.util.List;
import com.sy599.game.GameServerConfig;
public class CqxzMjConstants {
// 0胡 1碰 2明杠 3暗杠 4接杠 5杠爆(摸杠胡) 报听6
/*** 胡*/
public static final int ACTION_INDEX_HU = 0;
/*** 碰*/
public static final int ACTION_INDEX_PENG = 1;
/*** 明杠*/
public static final int ACTION_INDEX_MINGGANG = 2;
/*** 暗杠*/
public static final int ACTION_INDEX_ANGANG = 3;
/*** 接杠*/
public static final int ACTION_INDEX_CHI = 4;//改吃
/*** 报听 */
public static final int ACTION_INDEX_BAOTING = 5;
// /*** 杠爆(摸杠胡)*/
// public static final int ACTION_INDEX_GANGBAO = 5;
// /*** 报听*/
// public static final int ACTION_INDEX_BAOTING = 6;
/**托管**/
public static final int action_tuoguan = 100;
/**
* 自摸次数
*/
public static final int ACTION_COUNT_INDEX_ZIMO = 0;
/**
* 接炮次数
*/
public static final int ACTION_COUNT_INDEX_JIEPAO = 1;
/**
* 点炮次数
*/
public static final int ACTION_COUNT_INDEX_DIANPAO = 2;
/**
* 暗杠次数
*/
public static final int ACTION_COUNT_INDEX_ANGANG = 3;
/**
* 明杠次数
*/
public static final int ACTION_COUNT_INDEX_MINGGANG = 4;
/**
* 抢杠胡
*/
public static final int HU_QIANGGANGHU = 101;
/**
* 自摸胡
*/
public static final int HU_ZIMO = 102;
/**
* 杠开胡
*/
public static final int HU_GANGKAI = 103;
/**
* 接炮胡
*/
public static final int HU_JIPAO = 104;
/**
* 放炮
*/
public static final int HU_FANGPAO = 201;
/**
* xx秒后进入托管
**/
public static final int AUTO_TIMEOUT = GameServerConfig.isDeveloper() ? 20 : 180;
/**
* xx秒后开始托管倒计时
*/
public static final int AUTO_CHECK_TIMEOUT = 10;
/**
* 托管后xx秒自动出牌
**/
public static final int AUTO_PLAY_TIME = 2;
/**
* 托管后xx秒自动准备
**/
public static final int AUTO_READY_TIME = 4;
/**
* 托管后xx秒自动胡
**/
public static final int AUTO_HU_TIME = 2;
public static boolean isTest = false;
public static boolean isTestAh = false;
public static List<Integer> mjList = new ArrayList<>();
public static List<Integer> mjListNoWan = new ArrayList<>();
static {
if (GameServerConfig.isDeveloper()) {
isTest = true;
isTestAh = true;
}
// ///////////////////////
for (int i = 1; i <= 108; i++) {
mjList.add(i);
if(CqxzMj.getMajang(i).getVal()/10!=3)
mjListNoWan.add(i);
}
// for (int i = 201; i <= 212; i++) {
// cx_mjList.add(i);
// }
}
/**
* 根据玩法获取牌
*
* @return
*/
public static List<Integer> getMajiangList(int playerCount) {
if(playerCount==2)
return new ArrayList<>(mjListNoWan);
return new ArrayList<>(mjList);
}
}
|
[
"ee68i5@yeah.net"
] |
ee68i5@yeah.net
|
d09af9bb6724be5f1f53d39b72684e8a3ed723ab
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/25/25_d9004f694471734785f79ef36b5e3e68b0df91d1/PlayerService/25_d9004f694471734785f79ef36b5e3e68b0df91d1_PlayerService_t.java
|
df2ba1d3a442945dbb4bb247bbb65f084a57747f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,981
|
java
|
package net.programmierecke.radiodroid;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.net.URL;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import android.app.Notification;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnBufferingUpdateListener;
import android.os.AsyncTask;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
public class PlayerService extends Service implements OnBufferingUpdateListener {
protected static final int NOTIFY_ID = 1;
final String TAG = "PlayerService";
MediaPlayer itsMediaPlayer = null;
private final IPlayerService.Stub itsBinder = new IPlayerService.Stub() {
public void Play(String theUrl, String theName, String theID) throws RemoteException {
PlayerService.this.PlayUrl(theUrl, theName, theID);
}
public void Stop() throws RemoteException {
PlayerService.this.Stop();
}
};
@Override
public IBinder onBind(Intent arg0) {
return itsBinder;
}
@Override
public void onCreate() {
super.onCreate();
itsContext = this;
}
public void SendMessage(String theTitle, String theMessage, String theTicker) {
Intent notificationIntent = new Intent(itsContext, MainActivity.class);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent contentIntent = PendingIntent.getActivity(itsContext, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
Notification itsNotification = new NotificationCompat.Builder(itsContext).setContentIntent(contentIntent).setContentTitle(theTitle)
.setContentText(theMessage).setWhen(System.currentTimeMillis()).setTicker(theTicker).setOngoing(true).setUsesChronometer(true)
.setSmallIcon(R.drawable.play).setLargeIcon((((BitmapDrawable) getResources().getDrawable(R.drawable.ic_launcher)).getBitmap())).build();
startForeground(NOTIFY_ID, itsNotification);
}
@Override
public void onDestroy() {
Stop();
stopForeground(true);
}
Context itsContext;
@SuppressWarnings("unused")
private String itsStationID;
private String itsStationName;
private String itsStationURL;
public void PlayUrl(String theURL, String theName, String theID) {
itsStationID = theID;
itsStationName = theName;
itsStationURL = theURL;
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... stations) {
String aStation = itsStationURL;
Log.v(TAG, "Stream url:" + aStation);
SendMessage(itsStationName, "Decoding URL", "Decoding URL");
String aDecodedURL = DecodeURL(aStation);
Log.v(TAG, "Stream url decoded:" + aDecodedURL);
if (itsMediaPlayer == null) {
itsMediaPlayer = new MediaPlayer();
itsMediaPlayer.setOnBufferingUpdateListener(PlayerService.this);
}
if (itsMediaPlayer.isPlaying()) {
itsMediaPlayer.stop();
itsMediaPlayer.reset();
}
try {
SendMessage(itsStationName, "Preparing stream", "Preparing stream");
itsMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
itsMediaPlayer.setDataSource(aDecodedURL);
itsMediaPlayer.prepare();
SendMessage(itsStationName, "Playing", "Playing '" + itsStationName + "'");
itsMediaPlayer.start();
} catch (IllegalArgumentException e) {
Log.e(TAG, "" + e);
SendMessage(itsStationName, "Stream url problem", "Stream url problem");
Stop();
} catch (IOException e) {
Log.e(TAG, "" + e);
SendMessage(itsStationName, "Stream caching problem", "Stream caching problem");
Stop();
} catch (Exception e) {
Log.e(TAG, "" + e);
SendMessage(itsStationName, "Unable to play stream", "Unable to play stream");
Stop();
}
return null;
}
@Override
protected void onPostExecute(Void result) {
Log.d(TAG, "Play task finished");
super.onPostExecute(result);
}
}.execute();
}
public void Stop() {
if (itsMediaPlayer != null) {
if (itsMediaPlayer.isPlaying()) {
itsMediaPlayer.stop();
}
itsMediaPlayer.release();
itsMediaPlayer = null;
}
stopForeground(true);
}
public String downloadFeed(String theURI) {
StringBuilder builder = new StringBuilder();
HttpClient client = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(theURI);
try {
HttpResponse response = client.execute(httpGet);
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode == 200) {
HttpEntity entity = response.getEntity();
InputStream content = entity.getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(content));
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);
builder.append('\n');
}
} else {
Log.e(TAG, "Failed to download file");
}
} catch (ClientProtocolException e) {
Log.e(TAG, "" + e);
} catch (IOException e) {
Log.e(TAG, "" + e);
}
return builder.toString();
}
String DecodeURL(String theUrl) {
try {
URL anUrl = new URL(theUrl);
String aFileName = anUrl.getFile();
if (aFileName.endsWith(".pls")) {
Log.v(TAG, "Found PLS file");
String theFile = downloadFeed(theUrl);
BufferedReader aReader = new BufferedReader(new StringReader(theFile));
String str;
while ((str = aReader.readLine()) != null) {
Log.v(TAG, " -> " + str);
if (str.substring(0, 4).equals("File")) {
int anIndex = str.indexOf('=');
if (anIndex >= 0) {
return str.substring(anIndex + 1);
}
}
}
} else if (aFileName.endsWith(".m3u")) {
Log.v(TAG, "Found M3U file");
String theFile = downloadFeed(theUrl);
BufferedReader aReader = new BufferedReader(new StringReader(theFile));
String str;
while ((str = aReader.readLine()) != null) {
Log.v(TAG, " -> " + str);
if (!str.substring(0, 1).equals("#")) {
return str.trim();
}
}
}
} catch (Exception e) {
Log.e(TAG, "" + e);
}
return theUrl;
}
@Override
public void onBufferingUpdate(MediaPlayer mp, int percent) {
// Log.v(TAG, "Buffering:" + percent);
// SendMessage(itsStationName, "Buffering..", "Buffering .. (" + percent +
// "%)");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
120da47521bbf1e2e7c7592ae0981e9eef18d896
|
a78cbb3413a46c8b75ed2d313b46fdd76fff091f
|
/src/mobius.esc/escjava/branches/ESC/ESCTools/Escjava/java/escjava/prover/SimplifyComment.java
|
0ba98be3794328a9d88b34495059dbcf6e359736
|
[] |
no_license
|
wellitongb/Mobius
|
806258d483bd9b893312d7565661dadbf3f92cda
|
4b16bae446ef5b91b65fd248a1d22ffd7db94771
|
refs/heads/master
| 2021-01-16T22:25:14.294886
| 2013-02-18T20:25:24
| 2013-02-18T20:25:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 430
|
java
|
/* Copyright 2000, 2001, Compaq Computer Corporation */
package escjava.prover;
/** An object of this class represent a progress comment produced by Simplify.
** <p>
**
** @see Simplify
** @see CECEnum
** @see SExp
**/
public class SimplifyComment extends SimplifyOutput {
final String msg;
public String getMsg() {
return msg;
}
SimplifyComment(String msg) {
super(COMMENT);
this.msg = msg;
}
}
|
[
"nobody@c6399e9c-662f-4285-9817-23cccad57800"
] |
nobody@c6399e9c-662f-4285-9817-23cccad57800
|
dcde0dd2a0b0edbb2eb68971c32207734823a3d9
|
46572b2d3e601944d3e0a32ee3b65a1a249ef0fa
|
/src/main/java/knightminer/inspirations/recipes/item/MixedDyedBottleItem.java
|
e2f5d474b7a099c70d029aa7fb3513709ad22f75
|
[
"CC-BY-NC-SA-4.0",
"LicenseRef-scancode-proprietary-license",
"CC-BY-NC-4.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
KnightMiner/Inspirations
|
0522e198c2ec4367b7dfa26608253557501ad33f
|
6f15ea0a2fda6f0fb8e309b848b35432d12bf423
|
refs/heads/1.16
| 2023-08-27T00:55:10.084208
| 2021-07-10T04:49:03
| 2021-07-10T04:49:03
| 115,138,169
| 53
| 33
|
MIT
| 2022-11-01T01:43:22
| 2017-12-22T17:50:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,959
|
java
|
package knightminer.inspirations.recipes.item;
import knightminer.inspirations.library.Util;
import knightminer.inspirations.recipes.InspirationsRecipes;
import net.minecraft.item.DyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.NonNullList;
import net.minecraftforge.common.util.Constants;
public class MixedDyedBottleItem extends Item {
private static final String TAG_COLOR = "color";
public MixedDyedBottleItem(Properties props) {
super(props);
}
@Override
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
// hide from creative as means nothing without NBT, and the simple ones do the NBT
}
/**
* Get a dye bottle with the specified color.
* @param color Armor-style dye color
* @return A single bottle.
*/
public static ItemStack bottleFromDye(int color) {
DyeColor dyeColor = Util.getDyeForColor(color);
if (dyeColor != null) {
return new ItemStack(InspirationsRecipes.simpleDyedWaterBottle.get(dyeColor));
}
return Util.setColor(new ItemStack(InspirationsRecipes.mixedDyedWaterBottle), color);
}
/**
* Return the color for this bottle, if it has one.
* @param bottle A stack holding a dye bottle
* @return The armor-style color, or -1 if not a bottle.
*/
public static int dyeFromBottle(ItemStack bottle) {
Item item = bottle.getItem();
if (item instanceof SimpleDyedBottleItem) {
return ((SimpleDyedBottleItem)item).getDyeColor().getColorValue();
} else if (item == InspirationsRecipes.mixedDyedWaterBottle) {
CompoundNBT tags = bottle.getTag();
if (tags != null) {
CompoundNBT display = tags.getCompound("display");
if (display.contains(TAG_COLOR, Constants.NBT.TAG_INT)) {
return display.getInt(TAG_COLOR);
}
}
}
return -1;
}
}
|
[
"knightminer4@gmail.com"
] |
knightminer4@gmail.com
|
6612751422ca38064770871f79ff548cf424704d
|
f9e94656cc696cf834cc0f1e2675cc82772d762d
|
/app/src/main/java/com/zhihu/turman/app/entity/WeatherResult.java
|
9a04a0682bf4928a324e354ad58c05f875fd6e3f
|
[] |
no_license
|
buobao/ZhiHu_Turman
|
30aab1ab0eece0eda4f3496bcc24be48c38ba225
|
55534a2f45bfb0a1628f46fe671f975ced796481
|
refs/heads/master
| 2016-08-11T19:09:26.757828
| 2016-04-29T05:34:33
| 2016-04-29T05:34:33
| 54,963,800
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 220
|
java
|
package com.zhihu.turman.app.entity;
import com.zhihu.turman.app.entity.weather.DataResult;
/**
* Created by dqf on 2016/4/5.
*/
public class WeatherResult extends OneBoxBaseEntity {
public DataResult result;
}
|
[
"1039163450@qq.com"
] |
1039163450@qq.com
|
5f405f15f01a55318d847f13514d0ad95bf17365
|
ed28460c5d24053259ab189978f97f34411dfc89
|
/Software Engineering/Java Fundamentals/Java OOP Basics/07. Workshop/SoftUni_WorkShop/src/net/java/main/impl/utilities/helpers/OutputWriterImpl.java
|
50dc03fc54b813bc0f78cf19808742339fbf8d79
|
[] |
no_license
|
Dimulski/SoftUni
|
6410fa10ba770c237bac617205c86ce25c5ec8f4
|
7954b842cfe0d6f915b42702997c0b4b60ddecbc
|
refs/heads/master
| 2023-01-24T20:42:12.017296
| 2020-01-05T08:40:14
| 2020-01-05T08:40:14
| 48,689,592
| 2
| 1
| null | 2023-01-12T07:09:45
| 2015-12-28T11:33:32
|
Java
|
UTF-8
|
Java
| false
| false
| 344
|
java
|
package net.java.main.impl.utilities.helpers;
import net.java.main.interfaces.OutputWriter;
public class OutputWriterImpl implements OutputWriter {
@Override
public void writeLine(String line) {
System.out.println(line);
}
@Override
public void writeLine(Object line) {
System.out.println(line);
}
}
|
[
"george.dimulski@gmail.com"
] |
george.dimulski@gmail.com
|
6f8a57feb6cbc9067e0f8da18d9510a02eba1262
|
d93b5e7d2cd8157f5f7686e710810109435e58e8
|
/org.dsltao.project/bundles/org.mondo.editor.graphiti/src/org/mondo/editor/graphiti/diagram/UpdateEPackageFeature.java
|
03b59cbf877211bdc0f2e5b9ce9edcb9e2ad5a35
|
[] |
no_license
|
antoniogarmendia/dsltao
|
a5c06839eac3b209ea8a25301867f02e2effbcab
|
c674176005e93d8fb18262a7c84bca7a68069e31
|
refs/heads/master
| 2020-03-18T01:38:51.856172
| 2018-05-23T07:18:08
| 2018-05-23T07:18:08
| 134,152,457
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,192
|
java
|
package org.mondo.editor.graphiti.diagram;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.algorithms.Text;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
/**
* Class to update an EPackage.
*
* @author miso partner AnaPescador
*
*/
public class UpdateEPackageFeature extends AbstractUpdateFeature {
public UpdateEPackageFeature(IFeatureProvider fp) {
super(fp);
}
public boolean canUpdate(IUpdateContext context) {
Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
boolean can = ((bo instanceof EPackage)&& !(context.getPictogramElement() instanceof Diagram));
return can;
}
public IReason updateNeeded(IUpdateContext context) {
String pictogramValue = null;
PictogramElement pictogramElement = context.getPictogramElement();
if (pictogramElement instanceof ContainerShape) {
ContainerShape cs = (ContainerShape) pictogramElement;
for (Shape shape : cs.getChildren()) {
if (shape.getGraphicsAlgorithm() instanceof Text) {
Text text = (Text) shape.getGraphicsAlgorithm();
pictogramValue = text.getValue();
}
}
}
String businessName = null;
Object bo = getBusinessObjectForPictogramElement(pictogramElement);
if (bo instanceof EPackage) {
EPackage ePackage = (EPackage) bo;
businessName = ePackage.getName();
}
boolean updateNameNeeded =
((pictogramValue == null && businessName != null) ||
(pictogramValue != null && !pictogramValue.equals(businessName)));
if (updateNameNeeded) {
return Reason.createTrueReason("EPackage text is out of date");
} else {
return Reason.createFalseReason();
}
}
public boolean update(IUpdateContext context) {
String businessName = null;
PictogramElement pictogramElement = context.getPictogramElement();
Object bo = getBusinessObjectForPictogramElement(pictogramElement);
if (bo instanceof EPackage) {
EPackage ePackage = (EPackage) bo;
businessName = ePackage.getName();
}
if (pictogramElement instanceof ContainerShape) {
ContainerShape cs = (ContainerShape) pictogramElement;
for (Shape shape : cs.getChildren()) {
if (shape.getGraphicsAlgorithm() instanceof Text) {
Text text = (Text) shape.getGraphicsAlgorithm();
text.setValue(businessName);
return true;
}
}
}
return false;
}
}
|
[
"antonio.agj@gmail.com"
] |
antonio.agj@gmail.com
|
b78982541fa3600ea652b39955e149c2a0493e29
|
2c9e0541ed8a22bcdc81ae2f9610a118f62c4c4d
|
/harmony/tests/functional/src/test/functional/org/apache/harmony/test/func/reg/vm/btest9660/Btest9660.java
|
8ce3eaab70481006610af68f50d590b319a153be
|
[
"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,662
|
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.vm.btest9660;
import org.apache.harmony.test.share.reg.RegressionTest;
import java.util.logging.Logger;
public class Btest9660 extends RegressionTest {
public int test(Logger logger, String[] args) {
try {
new InitError();
System.out.println("Expected error wasn't thrown");
return fail();
} catch (VerifyError e ) {
System.out.println("Expected error was thrown: "+e);
return pass();
} catch (Throwable e ) {
System.out.println("Unexpected error was thrown");
e.printStackTrace(System.out);
return fail();
}
}
// to run test from console
public static void main(String[] args) {
System.exit(new Btest9660().test(Logger.global, args));
}
}
|
[
"vitaly.provodin@jetbrains.com"
] |
vitaly.provodin@jetbrains.com
|
24b7ae5352d871ed1f007afead6e7db9555a6cd8
|
7ab910fe04f8b20f7f290c96addb3ebf5b75e012
|
/b2b2c/src/main/java/com/rbt/service/impl/CategoryService.java
|
8fa66a100954e6fce40de53769175273c2cb2485
|
[] |
no_license
|
stranger2008/rbtb2b
|
6cbf1bf8977dc6655b8ace5b67fb8abd872a86b3
|
6b4e0c3b378fd3c7013e121d822bd1c535492241
|
refs/heads/master
| 2021-01-10T03:26:55.270297
| 2016-01-06T09:04:37
| 2016-01-06T09:04:37
| 49,122,713
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,088
|
java
|
/*
* ISConsole Copyright 2011 ruibaotong COMPANY, Co.ltd .
* All rights reserved.
* Package:com.rbt.servie.impl
* FileName: CategoryService.java
*/
package com.rbt.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rbt.dao.IAboutusDao;
import com.rbt.dao.ICategoryDao;
import com.rbt.model.Aboutus;
import com.rbt.model.Category;
import com.rbt.service.ICategoryService;
/**
* @function 功能 分类信息表Service层业务接口实现
* @author 创建人 林俊钦
* @date 创建日期 Tue Jul 12 13:04:58 CST 2011
*/
@Service
public class CategoryService extends GenericService<Category,String> implements ICategoryService {
/*
* 分类信息表Dao层接口
*/
ICategoryDao categoryDao;
@Autowired
public CategoryService(ICategoryDao categoryDao) {
super(categoryDao);
this.categoryDao = categoryDao;
}
/* (non-Javadoc)
* @see com.rbt.service.ICategoryService#getCategoryIndexList(java.util.Map)
*/
public List getAreaCategoryList(Map map) {
return this.categoryDao.getAreaCategoryList(map);
}
/* (non-Javadoc)
* @see com.rbt.service.ICategoryService#getCategoryIndexList(java.util.Map)
*/
public List getTwoAreaCategoryList(Map map) {
return this.categoryDao.getTwoAreaCategoryList(map);
}
/* (non-Javadoc)
* @see com.rbt.service.ICategoryService#getCategoryIndexList(java.util.Map)
*/
public List getCategoryIndexList(Map map) {
return this.categoryDao.getCategoryIndexList(map);
}
/* (non-Javadoc)
* @see com.rbt.service.ICategoryService#getWebCategroyList(java.util.Map)
*/
public List getWebCategroyList(Map map) {
return this.categoryDao.getWebCategroyList(map);
}
/* (non-Javadoc)
* @see com.rbt.service.ICategoryService#getAll()
*/
public List getAll() {
return this.categoryDao.getAll();
}
public void updateSort(List list) {
this.categoryDao.updateSort(list);
}
public void updateDisplay(List list) {
this.categoryDao.updateDisplay(list);
}
}
|
[
"947069540@qq.com"
] |
947069540@qq.com
|
265ad47374b7c451dca2c7e3fc18bba3bd07349e
|
5ee372d6dd15dac6e20affcd78d8b63e41b7fb67
|
/app/src/main/java/com/denisimusit/truthfulhoroscope/FragmentMenu.java
|
c15fb47bc7e6dfcd38d9e2bf1783e751832fcb73
|
[] |
no_license
|
rahulyhg/TruthfulHoroscope
|
fccb231b2b1e5358fa6278cd3f4335895f493f1b
|
b9e957536d3bdfecd2aae080dd7897db352c3314
|
refs/heads/master
| 2020-05-15T03:37:55.039582
| 2018-04-03T16:28:13
| 2018-04-03T16:28:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,630
|
java
|
package com.denisimusit.truthfulhoroscope;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.Toast;
public class FragmentMenu extends Fragment implements View.OnClickListener {
private ImageButton imageButtonOven;
private ImageButton imageButtonVodoley;
private ImageButton imageButtonFish;
private ImageButton imageButtonVes;
private ImageButton imageButtonKozerog;
private ImageButton imageButtonBik;
private ImageButton imageButtonScorpion;
private ImageButton imageButtonBleznec;
private ImageButton imageButtonRak;
private ImageButton imageButtonStelec;
private ImageButton imageButtonDeva;
private ImageButton imageButtonimageLev;
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.faragmet_menu, container, false);
imageButtonOven = (ImageButton) rootView.findViewById(R.id.imageButtonOven);
imageButtonVodoley = (ImageButton) rootView.findViewById(R.id.imageButtonVodoley);
imageButtonFish = (ImageButton) rootView.findViewById(R.id.imageButtonFish);
imageButtonVes = (ImageButton) rootView.findViewById(R.id.imageButtonVes);
imageButtonKozerog = (ImageButton) rootView.findViewById(R.id.imageButtonKozerog);
imageButtonBik = (ImageButton) rootView.findViewById(R.id.imageButtonBik);
imageButtonBleznec = (ImageButton) rootView.findViewById(R.id.imageButtonBleznec);
imageButtonScorpion = (ImageButton) rootView.findViewById(R.id.imageButtonScorpion);
imageButtonRak = (ImageButton) rootView.findViewById(R.id.imageButtonRak);
imageButtonimageLev = (ImageButton) rootView.findViewById(R.id.imageButtonLev);
imageButtonStelec = (ImageButton) rootView.findViewById(R.id.imageButtonStelec);
imageButtonDeva = (ImageButton) rootView.findViewById(R.id.imageButtonDeva);
imageButtonOven.setOnClickListener(this);
imageButtonVodoley.setOnClickListener(this);
imageButtonFish.setOnClickListener(this);
imageButtonVes.setOnClickListener(this);
imageButtonKozerog.setOnClickListener(this);
imageButtonBik.setOnClickListener(this);
imageButtonBleznec.setOnClickListener(this);
imageButtonScorpion.setOnClickListener(this);
imageButtonRak.setOnClickListener(this);
imageButtonStelec.setOnClickListener(this);
imageButtonDeva.setOnClickListener(this);
return rootView;
}
// на основании идентификатора кнопки создает нужный индекс
int translateIdToIndex(int id) {
int index = -1;
switch (id) {
case R.id.imageButtonOven:
index = 1;
break;
case R.id.imageButtonVodoley:
index = 2;
break;
case R.id.imageButtonFish:
index = 3;
break;
case R.id.imageButtonVes:
index = 4;
break;
case R.id.imageButtonKozerog:
index = 5;
break;
case R.id.imageButtonBik:
index = 6;
break;
case R.id.imageButtonBleznec:
index = 7;
break;
case R.id.imageButtonScorpion:
index = 8;
break;
case R.id.imageButtonRak:
index = 9;
break;
case R.id.imageButtonLev:
index = 10;
break;
case R.id.imageButtonStelec:
index = 11;
break;
case R.id.imageButtonDeva:
index = 12;
break;
}
return index;
}
@Override
public void onClick(View view) {
int buttonIndex = translateIdToIndex(view.getId());
OnSelectedButtonListener listener = (OnSelectedButtonListener) getActivity();
listener.onButtonSelected(buttonIndex);
// TODO Временный код для получения индекса нажатой кнопки
Toast.makeText(getActivity(), String.valueOf(buttonIndex),
Toast.LENGTH_SHORT).show();
}
public interface OnSelectedButtonListener {
void onButtonSelected(int buttonIndex);
}
}
|
[
"s"
] |
s
|
b35f5f6bbce52d247d687f83a8db40d09a800aee
|
4a7e7063f1426e9eacda398ad77ec305e7a71155
|
/app/src/main/java/com/ydys/moneywalk/ui/custom/step/BindService1.java
|
dc0262f2c3548c9b2838f2fc6b81818c0f7b666f
|
[] |
no_license
|
myflying/walkmoney
|
c60212c682ae412644bc7084d8c2d7931fa5fe7e
|
fbfdd9d4c83f17e703d6a95e8efebd9a0dc2761c
|
refs/heads/master
| 2020-09-17T01:16:15.796756
| 2019-12-11T01:09:14
| 2019-12-11T01:09:14
| 223,942,166
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,118
|
java
|
package com.ydys.moneywalk.ui.custom.step;
import android.app.Service;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
import android.util.Log;
import com.blankj.utilcode.util.SPUtils;
import com.orhanobut.logger.Logger;
public class BindService1 extends Service implements SensorEventListener {
/**
* binder服务与activity交互桥梁
*/
private LcBinder lcBinder = new LcBinder();
/**
* 当前步数
*/
private int nowBuSu = 0;
/**
* 传感器管理对象
*/
private SensorManager sensorManager;
/**
* 加速度传感器中获取的步数
*/
private StepCount mStepCount;
/**
* 数据回调接口,通知上层调用者数据刷新
*/
private UpdateUiCallBack mCallback;
/**
* 计步传感器类型 Sensor.TYPE_STEP_COUNTER或者Sensor.TYPE_STEP_DETECTOR
*/
private static int stepSensorType = -1;
/**
* 每次第一次启动记步服务时是否从系统中获取了已有的步数记录
*/
private boolean hasRecord = false;
/**
* 系统中获取到的已有的步数
*/
private int hasStepCount = 0;
/**
* 上一次的步数
*/
private int previousStepCount = 0;
/**
* 构造函数
*/
public BindService1() {
}
@Override
public void onCreate() {
super.onCreate();
Log.i("BindService—onCreate", "开启计步");
new Thread(new Runnable() {
@Override
public void run() {
nowBuSu = SPUtils.getInstance().getInt("now_step", (int) (Math.random() * 100));
startStepDetector();
Log.i("BindService—子线程", "startStepDetector()");
}
}).start();
}
/**
* 选择计步数据采集的传感器
* SDK大于等于19,开启计步传感器,小于开启加速度传感器
*/
private void startStepDetector() {
if (sensorManager != null) {
sensorManager = null;
}
//获取传感器管理类
sensorManager = (SensorManager) this.getSystemService(SENSOR_SERVICE);
int versionCodes = Build.VERSION.SDK_INT;//取得SDK版本
if (versionCodes >= 19) {
//SDK版本大于等于19开启计步传感器
addCountStepListener();
} else {//小于就使用加速度传感器
addBasePedometerListener();
}
}
/**
* 启动计步传感器计步
*/
private void addCountStepListener() {
Sensor countSensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);
Sensor detectorSensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR);
if (countSensor != null) {
stepSensorType = Sensor.TYPE_STEP_COUNTER;
sensorManager.registerListener(BindService1.this, countSensor, SensorManager.SENSOR_DELAY_NORMAL);
Log.i("计步传感器类型", "Sensor.TYPE_STEP_COUNTER");
} else if (detectorSensor != null) {
stepSensorType = Sensor.TYPE_STEP_DETECTOR;
sensorManager.registerListener(BindService1.this, detectorSensor, SensorManager.SENSOR_DELAY_NORMAL);
} else {
addBasePedometerListener();
}
}
/**
* 启动加速度传感器计步
*/
private void addBasePedometerListener() {
Log.i("BindService", "加速度传感器");
mStepCount = new StepCount();
mStepCount.setSteps(nowBuSu);
//获取传感器类型 获得加速度传感器
Sensor sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
//此方法用来注册,只有注册过才会生效,参数:SensorEventListener的实例,Sensor的实例,更新速率
boolean isAvailable = sensorManager.registerListener(mStepCount.getStepDetector(), sensor, SensorManager.SENSOR_DELAY_UI);
mStepCount.initListener(new StepValuePassListener() {
@Override
public void stepChanged(int steps) {
nowBuSu = steps;//通过接口回调获得当前步数
updateNotification(); //更新步数通知
}
});
}
/**
* 通知调用者步数更新 数据交互
*/
private void updateNotification() {
if (mCallback != null) {
Log.i("BindService", "数据更新");
mCallback.updateUi(nowBuSu);
SPUtils.getInstance().put("now_step", nowBuSu);
}
}
@Override
public IBinder onBind(Intent intent) {
return lcBinder;
}
/**
* 计步传感器数据变化回调接口
*/
@Override
public void onSensorChanged(SensorEvent event) {
//这种类型的传感器返回步骤的数量由用户自上次重新启动时激活。返回的值是作为浮动(小数部分设置为0),
// 只在系统重启复位为0。事件的时间戳将该事件的第一步的时候。这个传感器是在硬件中实现,预计低功率。
if (stepSensorType == Sensor.TYPE_STEP_COUNTER) {
//获取当前传感器返回的临时步数
int tempStep = (int) event.values[0];
//首次如果没有获取手机系统中已有的步数则获取一次系统中APP还未开始记步的步数
if (!hasRecord) {
hasRecord = true;
hasStepCount = tempStep;
Logger.i("获取系统步数--->" + tempStep);
} else {
//获取APP打开到现在的总步数=本次系统回调的总步数-APP打开之前已有的步数
int thisStepCount = tempStep - hasStepCount;
//本次有效步数=(APP打开后所记录的总步数-上一次APP打开后所记录的总步数)
int thisStep = thisStepCount - previousStepCount;
//总步数=现有的步数+本次有效步数
nowBuSu += (thisStep);
//记录最后一次APP打开到现在的总步数
previousStepCount = thisStepCount;
}
}
//这种类型的传感器触发一个事件每次采取的步骤是用户。只允许返回值是1.0,为每个步骤生成一个事件。
// 像任何其他事件,时间戳表明当事件发生(这一步),这对应于脚撞到地面时,生成一个高加速度的变化。
else if (stepSensorType == Sensor.TYPE_STEP_DETECTOR) {
if (event.values[0] == 1.0) {
nowBuSu++;
}
}
updateNotification();
}
/**
* 计步传感器精度变化回调接口
*/
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
/**
* 绑定回调接口
*/
public class LcBinder extends Binder {
public BindService1 getService() {
return BindService1.this;
}
}
/**
* 数据传递接口
*
* @param paramICallback
*/
public void registerCallback(UpdateUiCallBack paramICallback) {
this.mCallback = paramICallback;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
//返回START_STICKY :在运行onStartCommand后service进程被kill后,那将保留在开始状态,但是不保留那些传入的intent。
// 不久后service就会再次尝试重新创建,因为保留在开始状态,在创建 service后将保证调用onstartCommand。
// 如果没有传递任何开始命令给service,那将获取到null的intent。
return START_STICKY;
}
@Override
public void onDestroy() {
super.onDestroy();
//取消前台进程
stopForeground(true);
}
@Override
public boolean onUnbind(Intent intent) {
return super.onUnbind(intent);
}
}
|
[
"512710257@qq.com"
] |
512710257@qq.com
|
72c116c892e6ad292ae65554188400d96dfbbe49
|
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
|
/src/main/java/com/google/android/gms/maps/internal/zzp.java
|
8116e426f889c3bcde51c85d6b4c737eabd78e14
|
[] |
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
| 221
|
java
|
package com.google.android.gms.maps.internal;
import android.os.IInterface;
import android.os.RemoteException;
public interface zzp extends IInterface {
void onCameraMoveCanceled() throws RemoteException;
}
|
[
"aaron@goodreturn.org"
] |
aaron@goodreturn.org
|
5bc48f58b919a9f9c28a9c8ad352b9680a0bf6b8
|
f321db1ace514d08219cc9ba5089ebcfff13c87a
|
/generated-tests/random/tests/s44/19_shop/evosuite-tests/umd/cs/shop/JSState_ESTest_scaffolding.java
|
b7b14a6f90187e08172fae5a763a142d06d9cbb4
|
[] |
no_license
|
sealuzh/dynamic-performance-replication
|
01bd512bde9d591ea9afa326968b35123aec6d78
|
f89b4dd1143de282cd590311f0315f59c9c7143a
|
refs/heads/master
| 2021-07-12T06:09:46.990436
| 2020-06-05T09:44:56
| 2020-06-05T09:44:56
| 146,285,168
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,549
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Mar 24 05:51:26 GMT 2019
*/
package umd.cs.shop;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class JSState_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "umd.cs.shop.JSState";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
org.evosuite.runtime.util.SystemInUtil.getInstance().initForTestCase();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/19_shop");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JSState_ESTest_scaffolding.class.getClassLoader() ,
"umd.cs.shop.JSListLogicalAtoms",
"umd.cs.shop.JSParserError",
"umd.cs.shop.JSListIfThenElse",
"umd.cs.shop.JSPlanningProblem",
"umd.cs.shop.JSPredicateForm",
"umd.cs.shop.JSPlanningDomain",
"umd.cs.shop.JSJshopNode",
"umd.cs.shop.JSUtil",
"umd.cs.shop.JSState",
"umd.cs.shop.JSTState",
"umd.cs.shop.JSJshopVars",
"umd.cs.shop.JSOperator",
"umd.cs.shop.JSListSubstitution",
"umd.cs.shop.JSPairPlanTState",
"umd.cs.shop.JSAllReduction",
"umd.cs.shop.JSListMethods",
"umd.cs.shop.JSListPairPlanTStateNodes",
"umd.cs.shop.JSTaskAtom",
"umd.cs.shop.JSTerm",
"umd.cs.shop.JSReduction",
"umd.cs.shop.JSTasks",
"umd.cs.shop.JSMethod",
"umd.cs.shop.JSSubstitution",
"umd.cs.shop.JSListAxioms",
"umd.cs.shop.JSPlan",
"umd.cs.shop.JSListOperators",
"umd.cs.shop.JSPairPlanTSListNodes"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JSState_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"umd.cs.shop.JSListLogicalAtoms",
"umd.cs.shop.JSState",
"umd.cs.shop.JSJshopVars",
"umd.cs.shop.JSUtil",
"umd.cs.shop.JSParserError",
"umd.cs.shop.JSPlanningProblem",
"umd.cs.shop.JSTasks",
"umd.cs.shop.JSPlan",
"umd.cs.shop.JSSubstitution",
"umd.cs.shop.JSPlanningDomain",
"umd.cs.shop.JSListAxioms",
"umd.cs.shop.JSListOperators",
"umd.cs.shop.JSListMethods",
"umd.cs.shop.JSListSubstitution",
"umd.cs.shop.JSOperator",
"umd.cs.shop.JSPredicateForm",
"umd.cs.shop.JSTaskAtom",
"umd.cs.shop.JSTerm",
"umd.cs.shop.JSTState",
"umd.cs.shop.JSPairPlanTState",
"umd.cs.shop.JSMethod",
"umd.cs.shop.JSListPairPlanTStateNodes",
"umd.cs.shop.JSPairPlanTSListNodes",
"umd.cs.shop.JSJshopNode",
"umd.cs.shop.JSReduction"
);
}
}
|
[
"granogiovanni90@gmail.com"
] |
granogiovanni90@gmail.com
|
c98671e8e5881db15172c9db4acb3a500f942ee3
|
32ca9c255ddc5636a37b609f23b1e087d911512e
|
/know-heart/src/main/java/com/qubaopen/survey/alipay/util/httpClient/HttpResponse.java
|
9cb19f2758054c248b2af6d8e72fa8a8c41b6e74
|
[] |
no_license
|
cosmoMars/qubaopen
|
f7d45f86c0e4bab1b6a34923fb363a711c0ded4c
|
4dd7fa2a3c5374f56f32752898de9096f6494e10
|
refs/heads/master
| 2020-05-16T22:36:53.872627
| 2015-06-18T06:47:07
| 2015-06-18T06:47:07
| 22,283,359
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,885
|
java
|
package com.qubaopen.survey.alipay.util.httpClient;
import java.io.UnsupportedEncodingException;
import org.apache.commons.httpclient.Header;
import com.qubaopen.survey.alipay.config.AlipayConfig;
/* *
*类名:HttpResponse
*功能:Http返回对象的封装
*详细:封装Http返回信息
*版本:3.3
*日期:2011-08-17
*说明:
*以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
*该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
*/
public class HttpResponse {
/**
* 返回中的Header信息
*/
private Header[] responseHeaders;
/**
* String类型的result
*/
private String stringResult;
/**
* btye类型的result
*/
private byte[] byteResult;
public Header[] getResponseHeaders() {
return responseHeaders;
}
public void setResponseHeaders(Header[] responseHeaders) {
this.responseHeaders = responseHeaders;
}
public byte[] getByteResult() {
if (byteResult != null) {
return byteResult;
}
if (stringResult != null) {
return stringResult.getBytes();
}
return null;
}
public void setByteResult(byte[] byteResult) {
this.byteResult = byteResult;
}
public String getStringResult() throws UnsupportedEncodingException {
if (stringResult != null) {
return stringResult;
}
if (byteResult != null) {
return new String(byteResult, AlipayConfig.input_charset);
}
return null;
}
public void setStringResult(String stringResult) {
this.stringResult = stringResult;
}
}
|
[
"cosmo_mars@outlook.com"
] |
cosmo_mars@outlook.com
|
7ae430255969ac725530c623e45fa355ec6f6564
|
f38cc59518903e8ceef22f2153944279f0481134
|
/rift_lib/src/rift_extractor/classgen/classes/_3548.java
|
e0efb5506a1103924b2e1b69684438703e15a805
|
[] |
no_license
|
imathrowback/riftools
|
8de04a5efc906a1ecadf7913a9747091ef6706ec
|
a9c4021783c1b89c701fa227100260b359ae563d
|
refs/heads/master
| 2023-03-31T10:45:49.780385
| 2023-03-24T07:46:59
| 2023-03-24T07:46:59
| 94,748,733
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
package rift_extractor.classgen.classes;
import org.imathrowback.datparser.CObject;
import static rift_extractor.classgen.ClassUtils.*;
import rift_extractor.classgen.ClassUtils;
/** 3548 **/
@com.thoughtworks.xstream.annotations.XStreamAlias("_3548")
public class _3548 extends _999511
{
public _3548(){}
@com.thoughtworks.xstream.annotations.XStreamAsAttribute
java.lang.Long unk0;
public void parse(CObject obj)
{
ClassUtils.assertType(obj, 3548);
unk0 = ClassUtils.getFieldMember(java.lang.Long.class,obj, 0);
}
}
|
[
"imathrowback@nowhere.com"
] |
imathrowback@nowhere.com
|
da53d1447cb74bd009c422412879af5112a3f64e
|
8c84dddf2029aa8245c756e948669942eaa6b6f5
|
/src/main/java/com/project/mgmt/service/repository/ProjectTaskRepository.java
|
2b00acfea3f42e1ad1135505029988da654afd0f
|
[] |
no_license
|
rakeshpriyad/project-management
|
f8e438e78759be289e4a42838e9b851acfbcf20e
|
5dc9793dd575a6fb1e380eced0d29b05ed19b5b5
|
refs/heads/master
| 2022-11-26T22:12:12.729884
| 2020-08-08T02:55:00
| 2020-08-08T02:55:00
| 285,961,368
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 245
|
java
|
package com.project.mgmt.service.repository;
import com.project.mgmt.service.domain.ProjectTask;
import org.springframework.data.jpa.repository.JpaRepository;
public interface ProjectTaskRepository extends JpaRepository<ProjectTask, Long> {
}
|
[
"rakeshpriyad@gmail.com"
] |
rakeshpriyad@gmail.com
|
ebdbddb0671b3e3d7a8122378304a52254004582
|
30b86c7a3fe6513a8003b5157dffd1f5dda08b38
|
/core/src/main/java/org/openstack4j/model/senlin/Policy.java
|
90e740b06b83409a53bd1dabfd835d7f03e90126
|
[
"Apache-2.0"
] |
permissive
|
tanjin861117/openstack4j
|
c098a25529398855a1391f4d51fc28b687cb8cb6
|
b58da68654fc7570a3aee3f1eabdf9aef499a607
|
refs/heads/master
| 2020-04-06T17:29:04.079837
| 2018-11-13T13:17:20
| 2018-11-13T13:17:20
| 157,660,728
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,612
|
java
|
package org.openstack4j.model.senlin;
import org.openstack4j.model.ResourceEntity;
import java.util.Date;
import java.util.Map;
/**
* This interface describes the getter-methods (and thus components) of a Policy.
* All getters map to the possible return values of
* <code> GET /v1/policies/{policy_id}</code>
*
* @see http://developer.openstack.org/api-ref-clustering-v1.html
*
* @author lion
*
*/
public interface Policy extends ResourceEntity {
/**
* Returns the domain of the policy
*
* @return the domain of the policy
*/
String getDomain();
/**
* Returns the project of the policy
*
* @return the project of the policy
*/
String getProject();
/**
* Returns the user of the policy
*
* @return the user of the policy
*/
String getUser();
/**
* Returns the data of the policy
*
* @return the data of the policy
*/
Map<String, Object> getData();
/**
* Returns the spec of the policy
*
* @return the spec of the policy
*/
Map<String, Object> getSpec();
/**
* Returns the type of the policy
*
* @return the type of the policy
*/
String getType();
/**
* Returns the created at time of the policy
*
* @return the created at time of the policy
*/
Date getCreatedAt();
/**
* Returns the updated at time of the policy
*
* @return the updated at time of the policy
*/
Date getUpdatedAt();
}
|
[
"tanjin@szzt.com.cn"
] |
tanjin@szzt.com.cn
|
51c06545997c0afc4215daf6f6b58cf5aa2eff9a
|
b7af405fff2c1f1e6cc473381d28e1b0d0407338
|
/vertx-co/src/main/java/io/vertx/zero/exception/ServerConfigException.java
|
6fa6b799bbfdad1b9e721454fb9d6fee33321814
|
[
"Apache-2.0"
] |
permissive
|
MisZhaoGuozhen/vertx-zero
|
7805969188ca16433fdbbbc6e12a0500f6c32ad6
|
362b34da44dc1200b3e0115d666c221a5a017c33
|
refs/heads/master
| 2021-08-31T17:32:41.615079
| 2017-12-22T08:03:04
| 2017-12-22T08:03:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 356
|
java
|
package io.vertx.zero.exception;
/**
* Server config:
* server:
* -
*/
public class ServerConfigException extends DemonException {
public ServerConfigException(final Class<?> clazz,
final String config) {
super(clazz, config);
}
@Override
public int getCode() {
return -30001;
}
}
|
[
"silentbalanceyh@126.com"
] |
silentbalanceyh@126.com
|
7ff3f7030f2b70e763d4324fb769ab436fc9025f
|
6189bc8f09d38d476ee103618e58097330b1d851
|
/src/thread/_6_singleton/_5_static/MyMain.java
|
900617ea00ca0be3fd6393d09f7681ab0e0d9574
|
[] |
no_license
|
lyqlbst/thread_study
|
08e3f0bd7527731294480536a1bf194cc9f4ef67
|
f693e9e2e96ebe56ba90bedac9023c26fe2917e4
|
refs/heads/master
| 2020-03-15T09:11:37.080418
| 2018-05-25T08:41:15
| 2018-05-25T08:41:15
| 132,069,199
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 504
|
java
|
package thread._6_singleton._5_static;
/**
* 静态代码中的代码在使用类的时候就已经执行了,所以可以应用静态代码块的这个特性来实现单例设计模式。
* 程序运行结果:所有线程的hashCode都是相同的,单例
*/
class MyMain {
public static void main(String[] args) {
MyThread[] threads = new MyThread[5];
for (int i = 0; i < 5; i++) threads[i] = new MyThread();
for (int i = 0; i < 5; i++) threads[i].start();
}
}
|
[
"linyuqiang@bonc.com.cn"
] |
linyuqiang@bonc.com.cn
|
5d4fce67528a6db66824d7e41da9a03094d6103b
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Core/System.Windows.Forms,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/system/windows/forms/IDataGridViewEditingCell.java
|
b0ade7059e077edb71d6760564741a9973d1facd
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,228
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* 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.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package system.windows.forms;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
// Import section
import system.windows.forms.DataGridViewDataErrorContexts;
/**
* The base .NET class managing System.Windows.Forms.IDataGridViewEditingCell, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. Implements {@link IJCOBridgeReflected}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Forms.IDataGridViewEditingCell" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Forms.IDataGridViewEditingCell</a>
*/
public interface IDataGridViewEditingCell extends IJCOBridgeReflected {
/**
* Fully assembly qualified name: System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
public static final String assemblyFullName = "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
/**
* Assembly name: System.Windows.Forms
*/
public static final String assemblyShortName = "System.Windows.Forms";
/**
* Qualified class name: System.Windows.Forms.IDataGridViewEditingCell
*/
public static final String className = "System.Windows.Forms.IDataGridViewEditingCell";
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link IDataGridViewEditingCell}, a cast assert is made to check if types are compatible.
*/
public static IDataGridViewEditingCell ToIDataGridViewEditingCell(IJCOBridgeReflected from) throws Throwable {
JCOBridge bridge = JCOBridgeInstance.getInstance("System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
JCType classType = bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
NetType.AssertCast(classType, from);
return new IDataGridViewEditingCellImplementation(from.getJCOInstance());
}
/**
* Returns the reflected Assembly name
*
* @return A {@link String} representing the Fullname of reflected Assembly
*/
public String getJCOAssemblyName();
/**
* Returns the reflected Class name
*
* @return A {@link String} representing the Fullname of reflected Class
*/
public String getJCOClassName();
/**
* Returns the reflected Class name used to build the object
*
* @return A {@link String} representing the name used to allocated the object
* in CLR context
*/
public String getJCOObjectName();
/**
* Returns the instantiated class
*
* @return An {@link Object} representing the instance of the instantiated Class
*/
public Object getJCOInstance();
/**
* Returns the instantiated class Type
*
* @return A {@link JCType} representing the Type of the instantiated Class
*/
public JCType getJCOType();
// Methods section
public NetObject GetEditingCellFormattedValue(DataGridViewDataErrorContexts context) throws Throwable;
public void PrepareEditingCellForEdit(boolean selectAll) throws Throwable;
// Properties section
public boolean getEditingCellValueChanged() throws Throwable;
public void setEditingCellValueChanged(boolean EditingCellValueChanged) throws Throwable;
public NetObject getEditingCellFormattedValue() throws Throwable;
public void setEditingCellFormattedValue(NetObject EditingCellFormattedValue) throws Throwable;
// Instance Events section
}
|
[
"mario.mastrodicasa@masesgroup.com"
] |
mario.mastrodicasa@masesgroup.com
|
30e3e2752981e4ca4b49fcc2ba33d61212ba6802
|
730d2e136b97b671aa0da434d2bd43d29fffb32e
|
/app/src/main/java/com/live/tv/mvp/adapter/mine/TimeSettingAdapter.java
|
5f65c14b4d2a123913019789ea2b5c5ffe92feb3
|
[] |
no_license
|
Sekei/aymk
|
f7cc2e85ca727e395740bf9404d5e6501d82268a
|
a188a171f04b4b7bb301dc6b0f3d7ea32feed780
|
refs/heads/master
| 2020-04-30T22:38:53.035186
| 2019-05-23T07:39:56
| 2019-05-23T07:39:56
| 177,124,575
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 631
|
java
|
package com.live.tv.mvp.adapter.mine;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ysjk.health.iemk.R;
import com.live.tv.bean.FetureDateBeans;
import java.util.List;
/**
*健康管理设置
*/
public class TimeSettingAdapter extends BaseQuickAdapter<FetureDateBeans, BaseViewHolder> {
public TimeSettingAdapter(List<FetureDateBeans> data) {
super(R.layout.item_time, data);
}
@Override
protected void convert(BaseViewHolder helper, FetureDateBeans item) {
helper.setText(R.id.content,item.getWeekday());
}
}
|
[
"juanjuan19941019"
] |
juanjuan19941019
|
6f30eb7ac961b5bbde7c18ac628216d6e49f7f29
|
e495ec3574df565799420e546daefee242f3177e
|
/src/main/java/com/cloudmersive/client/VatApi.java
|
75cf99ed60ee275d7ff1e828055a4fb40785d95a
|
[
"Apache-2.0"
] |
permissive
|
Cloudmersive/Cloudmersive.APIClient.Java.Android
|
2dab14bf9a5dd978f3511243f7acd60071d0137f
|
5d90113399e4e47bc5e68cfd70f0152641c86a09
|
refs/heads/master
| 2020-03-25T04:03:46.668165
| 2018-08-03T06:09:58
| 2018-08-03T06:09:58
| 143,375,643
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,491
|
java
|
/**
* validateapi
* The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
*
* OpenAPI spec version: v1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.cloudmersive.client;
import com.cloudmersive.client.invoker.ApiInvoker;
import com.cloudmersive.client.invoker.ApiException;
import com.cloudmersive.client.invoker.Pair;
import com.cloudmersive.client.model.*;
import java.util.*;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.cloudmersive.client.model.VatLookupRequest;
import com.cloudmersive.client.model.VatLookupResponse;
import org.apache.http.HttpEntity;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
public class VatApi {
String basePath = "https://api.cloudmersive.com";
ApiInvoker apiInvoker = ApiInvoker.getInstance();
public void addHeader(String key, String value) {
getInvoker().addDefaultHeader(key, value);
}
public ApiInvoker getInvoker() {
return apiInvoker;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return basePath;
}
/**
* Lookup a VAT code
* Checks if a VAT code is valid, and if it is, returns more information about it
* @param input Input VAT code
* @return VatLookupResponse
*/
public VatLookupResponse vatVatLookup (VatLookupRequest input) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = input;
// verify the required parameter 'input' is set
if (input == null) {
VolleyError error = new VolleyError("Missing the required parameter 'input' when calling vatVatLookup",
new ApiException(400, "Missing the required parameter 'input' when calling vatVatLookup"));
}
// create path and map variables
String path = "/validate/vat/lookup";
// query params
List<Pair> queryParams = new ArrayList<Pair>();
// header params
Map<String, String> headerParams = new HashMap<String, String>();
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json",
"text/json",
"application/xml",
"text/xml",
"application/x-www-form-urlencoded"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if (contentType.startsWith("multipart/form-data")) {
// file uploading
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
HttpEntity httpEntity = localVarBuilder.build();
postBody = httpEntity;
} else {
// normal form params
}
String[] authNames = new String[] { "Apikey" };
try {
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (VatLookupResponse) ApiInvoker.deserialize(localVarResponse, "", VatLookupResponse.class);
} else {
return null;
}
} catch (ApiException ex) {
throw ex;
} catch (InterruptedException ex) {
throw ex;
} catch (ExecutionException ex) {
if (ex.getCause() instanceof VolleyError) {
VolleyError volleyError = (VolleyError)ex.getCause();
if (volleyError.networkResponse != null) {
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
}
}
throw ex;
} catch (TimeoutException ex) {
throw ex;
}
}
/**
* Lookup a VAT code
* Checks if a VAT code is valid, and if it is, returns more information about it
* @param input Input VAT code
*/
public void vatVatLookup (VatLookupRequest input, final Response.Listener<VatLookupResponse> responseListener, final Response.ErrorListener errorListener) {
Object postBody = input;
// verify the required parameter 'input' is set
if (input == null) {
VolleyError error = new VolleyError("Missing the required parameter 'input' when calling vatVatLookup",
new ApiException(400, "Missing the required parameter 'input' when calling vatVatLookup"));
}
// create path and map variables
String path = "/validate/vat/lookup".replaceAll("\\{format\\}","json");
// query params
List<Pair> queryParams = new ArrayList<Pair>();
// header params
Map<String, String> headerParams = new HashMap<String, String>();
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if (contentType.startsWith("multipart/form-data")) {
// file uploading
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
HttpEntity httpEntity = localVarBuilder.build();
postBody = httpEntity;
} else {
// normal form params
}
String[] authNames = new String[] { "Apikey" };
try {
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
new Response.Listener<String>() {
@Override
public void onResponse(String localVarResponse) {
try {
responseListener.onResponse((VatLookupResponse) ApiInvoker.deserialize(localVarResponse, "", VatLookupResponse.class));
} catch (ApiException exception) {
errorListener.onErrorResponse(new VolleyError(exception));
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
errorListener.onErrorResponse(error);
}
});
} catch (ApiException ex) {
errorListener.onErrorResponse(new VolleyError(ex));
}
}
}
|
[
"35204726+Cloudmersive@users.noreply.github.com"
] |
35204726+Cloudmersive@users.noreply.github.com
|
1306f47bb09c8f835888791cc5d3b04f702fca8d
|
51fa3cc281eee60058563920c3c9059e8a142e66
|
/Java/src/testcases/CWE400_Resource_Exhaustion/s01/CWE400_Resource_Exhaustion__getParameter_Servlet_for_loop_81_goodB2G.java
|
918a27fe2826e3c700523da548971cad5d8f6ce3
|
[] |
no_license
|
CU-0xff/CWE-Juliet-TestSuite-Java
|
0b4846d6b283d91214fed2ab96dd78e0b68c945c
|
f616822e8cb65e4e5a321529aa28b79451702d30
|
refs/heads/master
| 2020-09-14T10:41:33.545462
| 2019-11-21T07:34:54
| 2019-11-21T07:34:54
| 223,105,798
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,337
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE400_Resource_Exhaustion__getParameter_Servlet_for_loop_81_goodB2G.java
Label Definition File: CWE400_Resource_Exhaustion.label.xml
Template File: sources-sinks-81_goodB2G.tmpl.java
*/
/*
* @description
* CWE: 400 Resource Exhaustion
* BadSource: getParameter_Servlet Read count from a querystring using getParameter()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: for_loop
* GoodSink: Validate count before using it as the loop variant in a for loop
* BadSink : Use count as the loop variant in a for loop
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE400_Resource_Exhaustion.s01;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE400_Resource_Exhaustion__getParameter_Servlet_for_loop_81_goodB2G extends CWE400_Resource_Exhaustion__getParameter_Servlet_for_loop_81_base
{
public void action(int count , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int i = 0;
/* FIX: Validate count before using it as the for loop variant */
if (count > 0 && count <= 20)
{
for (i = 0; i < count; i++)
{
IO.writeLine("Hello");
}
}
}
}
|
[
"frank@fischer.com.mt"
] |
frank@fischer.com.mt
|
8fa668fb8942bf1fb1b5a517aaf39037ca2f0d46
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/zd/zc/src/main/java/org.wp.zc/widgets/CheckedLinearLayout.java
|
8ca97d8380eeaa7ba89d296aa070a7cc2b301847
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 1,188
|
java
|
package org.wp.zc.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Checkable;
import android.widget.CheckedTextView;
import android.widget.LinearLayout;
public class CheckedLinearLayout extends LinearLayout implements Checkable {
private CheckedTextView mCheckbox;
public CheckedLinearLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
int childCount = getChildCount();
for (int i = 0; i < childCount; ++i) {
View v = getChildAt(i);
if (v instanceof CheckedTextView) {
mCheckbox = (CheckedTextView)v;
}
}
}
@Override
public boolean isChecked() {
return mCheckbox != null ? mCheckbox.isChecked() : false;
}
@Override
public void setChecked(boolean checked) {
if (mCheckbox != null) {
mCheckbox.setChecked(checked);
}
}
@Override
public void toggle() {
if (mCheckbox != null) {
mCheckbox.toggle();
}
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
e7b842503c5750d8d431464f75e69b98adabc04c
|
4365604e3579b526d473c250853548aed38ecb2a
|
/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v202011/ProposalLineItemServiceInterfaceperformProposalLineItemAction.java
|
5e29e6bab5a50f763dda84d41b58482299b31a0d
|
[
"Apache-2.0"
] |
permissive
|
lmaeda/googleads-java-lib
|
6e73572b94b6dcc46926f72dd4e1a33a895dae61
|
cc5b2fc8ef76082b72f021c11ff9b7e4d9326aca
|
refs/heads/master
| 2023-08-12T19:03:46.808180
| 2021-09-28T16:48:04
| 2021-09-28T16:48:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,569
|
java
|
// Copyright 2020 Google LLC
//
// 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.api.ads.admanager.jaxws.v202011;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Performs actions on {@link ProposalLineItem} objects that match
* the given {@link Statement#query}.
*
* @param proposalLineItemAction the action to perform
* @param filterStatement a Publisher Query Language statement used to filter a set of
* proposal line items
* @return the result of the action performed
*
*
* <p>Java class for performProposalLineItemAction element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="performProposalLineItemAction">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="proposalLineItemAction" type="{https://www.google.com/apis/ads/publisher/v202011}ProposalLineItemAction" minOccurs="0"/>
* <element name="filterStatement" type="{https://www.google.com/apis/ads/publisher/v202011}Statement" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"proposalLineItemAction",
"filterStatement"
})
@XmlRootElement(name = "performProposalLineItemAction")
public class ProposalLineItemServiceInterfaceperformProposalLineItemAction {
protected ProposalLineItemAction proposalLineItemAction;
protected Statement filterStatement;
/**
* Gets the value of the proposalLineItemAction property.
*
* @return
* possible object is
* {@link ProposalLineItemAction }
*
*/
public ProposalLineItemAction getProposalLineItemAction() {
return proposalLineItemAction;
}
/**
* Sets the value of the proposalLineItemAction property.
*
* @param value
* allowed object is
* {@link ProposalLineItemAction }
*
*/
public void setProposalLineItemAction(ProposalLineItemAction value) {
this.proposalLineItemAction = value;
}
/**
* Gets the value of the filterStatement property.
*
* @return
* possible object is
* {@link Statement }
*
*/
public Statement getFilterStatement() {
return filterStatement;
}
/**
* Sets the value of the filterStatement property.
*
* @param value
* allowed object is
* {@link Statement }
*
*/
public void setFilterStatement(Statement value) {
this.filterStatement = value;
}
}
|
[
"christopherseeley@users.noreply.github.com"
] |
christopherseeley@users.noreply.github.com
|
3a9f6a322f23863ec6fd66a7863b723b63a278c9
|
db2ca48fffaf6689c9db439abaf9d98729548e0b
|
/zrp-service-trading/zrp-service-trading-consumer/src/main/java/com/ziroom/zrp/service/trading/valenum/BillOperateForAppEnum.java
|
04ea308a6d5d637eb280a9f44d1d4e6b7d360f82
|
[] |
no_license
|
majinwen/sojourn
|
46a950dbd64442e4ef333c512eb956be9faef50d
|
ab98247790b1951017fc7dd340e1941d5b76dc39
|
refs/heads/master
| 2020-03-22T07:07:05.299160
| 2018-03-18T13:45:23
| 2018-03-18T13:45:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 675
|
java
|
package com.ziroom.zrp.service.trading.valenum;
/**
* <p>APP账单状态</p>
* <p>
* <PRE>
* <BR> 修改记录
* <BR>-----------------------------------------------
* <BR> 修改日期 修改人 修改内容
* </PRE>
*
* @author cuigh6
* @Date Created in 2017年09月28日 15:23
* @version 1.0
* @since 1.0
*/
public enum BillOperateForAppEnum {
QZF(1,"去支付"),
WCZ(0,"无操作"),
ZFXQ(2,"支付详情");
BillOperateForAppEnum(int code, String name) {
this.code = code;
this.name = name;
}
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
}
|
[
"068411Lsp"
] |
068411Lsp
|
a292022aac241eb74114019bf5d4e72f006fcd12
|
43c3430798088597b3364e63e7327d735f07019a
|
/app/src/main/java/com/hzjytech/coffeeme/Dialogs/ClipDialogWithTwoButton.java
|
775da22825b952c594db755b17efbd942e87e2f7
|
[] |
no_license
|
ailinghengshui/CoffeeMe
|
078331c081657988e5961e35cffee7451c7ce6db
|
bd166b207d898c4f8555318eef7a3628fe61d301
|
refs/heads/master
| 2021-05-16T16:17:49.154983
| 2018-02-02T01:56:31
| 2018-02-02T01:56:31
| 119,917,230
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,601
|
java
|
package com.hzjytech.coffeeme.Dialogs;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.Point;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.hzjytech.coffeeme.R;
import com.hzjytech.coffeeme.utils.AppUtil;
/**
* Created by hehongcan on 2017/2/21.
*/
public class ClipDialogWithTwoButton extends DialogFragment {
private static final String PARAM_TITLE = "param_title";
private static final String PARAM_CONTENT = "param_content";
private static final String PARAM_RIGHT = "param_right";
private TextView tv_title;
private TextView tv_content;
private TextView btn_left;
private TextView btn_right;
private OnTwoButtonClickListener onTwoButtonClickListener;
public static ClipDialogWithTwoButton newInstance(String content) {
return newInstance("配方卡已生成","去粘贴", content);
}
public static ClipDialogWithTwoButton newInstance(String title, String rightText,String content) {
ClipDialogWithTwoButton clipDialog = new ClipDialogWithTwoButton();
Bundle args = new Bundle();
args.putString(PARAM_TITLE, title);
args.putString(PARAM_RIGHT,rightText);
args.putString(PARAM_CONTENT,content);
clipDialog.setArguments(args);
return clipDialog;
}
@Override
public void onResume() {
Window window = getDialog().getWindow();
Point size = new Point();
// Store dimensions of the screen in `size`
Display display = window.getWindowManager().getDefaultDisplay();
display.getSize(size);
// Set the width of the dialog proportional to 75% of the screen width
window.setLayout((int) (size.x * 0.85), WindowManager.LayoutParams.WRAP_CONTENT);
window.setGravity(Gravity.CENTER);
// Call super onResume after sizing
super.onResume();
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
return inflater.inflate(R.layout.fragment_clip_two_button, container, false);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
tv_title = (TextView) view.findViewById(R.id.tv_title);
tv_content = (TextView) view.findViewById(R.id.tv_clip_content);
btn_left = (TextView) view.findViewById(R.id.btn_left);
btn_right = (TextView) view.findViewById(R.id.btn_right);
if(getArguments()!=null){
Bundle bundle = getArguments();
String title = bundle.getString(PARAM_TITLE);
String content = bundle.getString(PARAM_CONTENT);
String right = bundle.getString(PARAM_RIGHT);
tv_title.setText(title);
tv_content.setText(content);
btn_right.setText(right);
}
btn_left.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(onTwoButtonClickListener!=null){
if(!AppUtil.isFastClick()){
onTwoButtonClickListener.onLeftClick();
}
}
}
});
btn_right.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(onTwoButtonClickListener!=null){
if(!AppUtil.isFastClick()){
onTwoButtonClickListener.onRightClick();
}
}
}
});
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
dialog.setCancelable(false);
dialog.setCanceledOnTouchOutside(false);
dialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_SEARCH||keyCode==KeyEvent.KEYCODE_BACK)
{
return true;
}
else
{
return false; //默认返回 false
}
}
});
return dialog;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
getDialog().getWindow().getAttributes().windowAnimations= R.style.CollectDialogAnimation;
}
public interface OnTwoButtonClickListener{
void onLeftClick();
void onRightClick();
}
public void setOnTwoButtonClickListener(OnTwoButtonClickListener onTwoButtonClickListener){
this.onTwoButtonClickListener=onTwoButtonClickListener;
}
}
|
[
"hdwhhc@sina.cn"
] |
hdwhhc@sina.cn
|
87d6779ee71c1899f2ed03d1ebb04efc56390979
|
28c95ff3e059e896d2f10caf25b3353c7ac50109
|
/characteristic/u2a09/src/main/java/org/im97mori/ble/characteristic/u2a09/DayOfWeek.java
|
6e7363faffdd315fe9e79355ee9c275a66dfa13d
|
[
"MIT"
] |
permissive
|
im97mori-github/JavaBLEUtil
|
7c8fd4bf0b640c87a874a07aa8873815ba1beb09
|
335b7a76869abf89ad1397aaf7544c1ca5b92526
|
refs/heads/master
| 2023-08-30T21:04:34.786942
| 2023-08-25T12:00:07
| 2023-08-26T23:07:11
| 242,078,480
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,241
|
java
|
package org.im97mori.ble.characteristic.u2a09;
import org.im97mori.ble.BLEUtils;
import org.im97mori.ble.ByteArrayInterface;
import androidx.annotation.NonNull;
/**
* Day of Week (Characteristics UUID: 0x2A09)
*/
public class DayOfWeek implements ByteArrayInterface {
/**
* Day of Week
*/
private final int mDayOfWeek;
/**
* Constructor from byte array
*
* @param values byte array from <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getValue()">BluetoothGattCharacteristic#getValue()</a>
*/
public DayOfWeek(@NonNull byte[] values) {
mDayOfWeek = BLEUtils.createUInt8(values, 0);
}
/**
* Constructor from parameters
*
* @param dayOfWeek Day of Week
*/
public DayOfWeek(int dayOfWeek) {
mDayOfWeek = dayOfWeek;
}
/**
* @return Day of Week
* @see org.im97mori.ble.characteristic.core.DayOfWeekUtils
*/
public int getDayOfWeek() {
return mDayOfWeek;
}
/**
* {@inheritDoc}
*/
@Override
@NonNull
public byte[] getBytes() {
byte[] data = new byte[1];
data[0] = (byte) mDayOfWeek;
return data;
}
}
|
[
"github@im97mori.org"
] |
github@im97mori.org
|
76306bfe42a00bde4976aefd330365d838ef49da
|
b15b7466f3cad9836d2f7e66bb1db5a92f41aeb3
|
/fxn-ec/src/main/java/cn/fxn/svm/ec/main/cart/ShopCartItemType.java
|
97ed71df5638e036145e9d57c0ad3585ad5bac3d
|
[
"Apache-2.0"
] |
permissive
|
MatthewDevelop/EC
|
829c5ed13b10ab24fd7ff31e2e766807be7c8d58
|
bc763ded09eb99f5ebb934ca1d94c6a0503e54c2
|
refs/heads/master
| 2020-03-31T21:27:19.584980
| 2019-03-20T09:29:27
| 2019-03-20T09:29:27
| 152,581,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 232
|
java
|
package cn.fxn.svm.ec.main.cart;
/**
* @author:Matthew
* @date:2018/10/29
* @email:guocheng0816@163.com
* @func:业务层才会出现
*/
public class ShopCartItemType {
public static final int SHOP_CART_ITEM_TYPE = 6;
}
|
[
"swd-004@mail.foxconn.com"
] |
swd-004@mail.foxconn.com
|
b85e5f0b4fc71e7140081fecd71343cd0916070d
|
3ea35a9d2a32a11f2c6e0fa21860f73c042ca1b3
|
/III курс/Trim3/Шаблони за проектиране/Упражнения/ObserverPattern/src/fmi/Topic.java
|
493eda7e55fa16fadef272409f1fdc4173d1fa46
|
[] |
no_license
|
angelzbg/Informatika
|
35be4926c16fb1eb2fd8e9459318c5ea9f5b1fd8
|
6c9e16087a30253e1a6d5cd9e9346a7cdd4b3e17
|
refs/heads/master
| 2021-02-08T14:50:46.438583
| 2020-03-01T14:18:26
| 2020-03-01T14:18:26
| 244,162,465
| 7
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 663
|
java
|
package fmi;
import java.util.ArrayList;
import java.util.List;
public class Topic implements Subject{
private List<Observer> observers;
private String message;
public Topic(){
this.observers = new ArrayList<Observer>();
}
public void register(Observer obj){
this.observers.add(obj);
}
public void unregister(Observer obj){
this.observers.remove(obj);
}
public void notifyObservers(){
for(Observer obj: this.observers){
obj.update();
}
}
public String getUpdate(){
return this.message;
}
public void postMessage(String msg){
this.message = msg;
System.out.println("Topic changed to: " + msg);
notifyObservers();
}
}
|
[
"badblo0dbg@gmail.com"
] |
badblo0dbg@gmail.com
|
72e79a84637252dcede0849c28df103d9d58c61f
|
e17d5515d48c85972ac3c8bce423a3756d93ff19
|
/src/main/java/com/apu/converterxmldb/entity/Author.java
|
5acebd50cc6e6aa77aea09cbd6ac5dfda11278de
|
[] |
no_license
|
anikeec/ConverterXmlDB
|
79784a95f6d727ca9d046610f13ec8f9ef749f17
|
3ac886c2fb451afd2176b894f89fe5162a9fe664
|
refs/heads/master
| 2020-03-10T17:28:45.347458
| 2018-04-15T20:49:20
| 2018-04-15T20:49:20
| 129,501,224
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,001
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.apu.converterxmldb.entity;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author apu
*/
@XmlRootElement
public class Author {
private Integer id;
private String name;
public Author() {
this(null);
}
public Author(String name) {
this(null, name);
}
public Author(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
@XmlTransient
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
@XmlElement
public void setName(String name) {
this.name = name;
}
}
|
[
"pasha_anik@ukr.net"
] |
pasha_anik@ukr.net
|
09d1ae7f60380c4a820dbe231df180f9ecff46e2
|
6cd87cbbcad0dee9073f720f36f1a9392480a47e
|
/no.sintef.bvr.realop.model.edit/src/realop/provider/ExpressionItemProvider.java
|
f710ba29e00005edbc6b522e6d0cc4830690ecb1
|
[] |
no_license
|
bressan3/bvr
|
503c2a61846b929ae5aade81ad8c5c5a3b5bebac
|
428cdf47b779e81ae1009d75f649e85f268e94f9
|
refs/heads/master
| 2020-03-23T08:16:38.594676
| 2019-01-23T18:45:05
| 2019-01-23T18:45:05
| 141,317,887
| 0
| 0
| null | 2018-07-17T16:47:28
| 2018-07-17T16:47:27
| null |
UTF-8
|
Java
| false
| false
| 3,181
|
java
|
/**
*/
package realop.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
/**
* This is the item provider adapter for a {@link realop.Expression} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ExpressionItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpressionItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
}
/**
* This returns Expression.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Expression"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
return getString("_UI_Expression_type");
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return RealopEditPlugin.INSTANCE;
}
}
|
[
"Anatoly.Vasilevskiy@sintef.no"
] |
Anatoly.Vasilevskiy@sintef.no
|
56b10ed2edb270053690ac4603a2088628fd0fad
|
5bc9d8f92f38967cc9ecc03000c0606dbbb38f74
|
/sca4j/modules/tags/sca4j-modules-parent-pom-0.1.4/extension/implementation/sca4j-groovy/src/main/java/org/sca4j/groovy/scdl/GroovyImplementation.java
|
cd7e948b61337d10e78c048ddfa2e1efcd0b1941
|
[] |
no_license
|
codehaus/service-conduit
|
795332fad474e12463db22c5e57ddd7cd6e2956e
|
4687d4cfc16f7a863ced69ce9ca81c6db3adb6d2
|
refs/heads/master
| 2023-07-20T00:35:11.240347
| 2011-08-24T22:13:28
| 2011-08-24T22:13:28
| 36,342,601
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,840
|
java
|
/*
* SCA4J
* Copyright (c) 2008-2012 Service Symphony Limited
*
* This proprietary software may be used only in connection with the SCA4J license
* (the ?License?), a copy of which is included in the software or may be obtained
* at: http://www.servicesymphony.com/licenses/license.html.
*
* Software distributed under the License is distributed on an as is basis, without
* warranties or conditions of any kind. See the License for the specific language
* governing permissions and limitations of use of the software. This software is
* distributed in conjunction with other software licensed under different terms.
* See the separate licenses for those programs included in the distribution for the
* permitted and restricted uses of such software.
*
*/
package org.sca4j.groovy.scdl;
import javax.xml.namespace.QName;
import org.sca4j.host.Namespaces;
import org.sca4j.pojo.scdl.PojoComponentType;
import org.sca4j.scdl.Implementation;
/**
* A component implemented in Groovy. The implementation can be a script in source or compiled form.
*
* @version $Rev: 5070 $ $Date: 2008-07-21 17:52:37 +0100 (Mon, 21 Jul 2008) $
*/
public class GroovyImplementation extends Implementation<PojoComponentType> {
private static final long serialVersionUID = -8092204063300139457L;
public static final QName IMPLEMENTATION_GROOVY = new QName(Namespaces.SCA4J_NS, "groovy");
private String scriptName;
private String className;
public GroovyImplementation() {
}
public GroovyImplementation(String scriptName, String className) {
this.scriptName = scriptName;
this.className = className;
}
public GroovyImplementation(String scriptName, String className, PojoComponentType componentType) {
super(componentType);
this.scriptName = scriptName;
this.className = className;
}
public QName getType() {
return IMPLEMENTATION_GROOVY;
}
/**
* Returns the name of a file containing the script source.
*
* @return the name of a file containing the script source
*/
public String getScriptName() {
return scriptName;
}
/**
* Sets the name of a file containing the script source.
*
* @param scriptName the name of a file containing the script source
*/
public void setScriptName(String scriptName) {
this.scriptName = scriptName;
}
/**
* Returns the name of a compiled Groovy class.
*
* @return the name of a compiled Groovy class
*/
public String getClassName() {
return className;
}
/**
* Sets the name of a compiled Groovy class.
*
* @param className the name of a compiled Groovy class
*/
public void setClassName(String className) {
this.className = className;
}
}
|
[
"meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e"
] |
meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e
|
ba6be82125e2250be6aebcd95a8e39c686d8194e
|
408213752890c30c3089a4f69705ed3eadaf01df
|
/src/main/java/org/flasck/flas/ArgumentException.java
|
0b25df363618c95b2fbff11970936c094e446f14
|
[] |
no_license
|
zinikiGareth/flasckfl
|
9809f9a944b37d9f3e53e92e6dd844c61ca30f01
|
1980cc8c3dcfe0ea65b2d66a59600b362b1bfcfd
|
refs/heads/master
| 2023-05-14T05:21:55.427842
| 2023-05-02T05:59:38
| 2023-05-02T05:59:38
| 35,301,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 179
|
java
|
package org.flasck.flas;
@SuppressWarnings("serial")
public class ArgumentException extends RuntimeException {
public ArgumentException(String string) {
super(string);
}
}
|
[
"gareth@ziniki.org"
] |
gareth@ziniki.org
|
887f21ff6df72fa61d2e1428bdb35193dc2ae04d
|
6e72cf339cbfc423c30aa4b7d134009d690eb10a
|
/src/main/java/com/atlassian/jira/rest/client/model/AllOfNotificationTo.java
|
0643cc2e9943cfb8a26c4575a9bb5a6eededb7d1
|
[] |
no_license
|
rajcarthy/jira-cloud-client
|
90f52e62a2dd3a8358103bf4c76c3e2f617c53e3
|
0c427830d3bec56e400760da67b621694bf3297b
|
refs/heads/master
| 2023-02-08T13:00:00.349995
| 2020-12-31T18:32:04
| 2020-12-31T18:32:04
| 325,853,593
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,909
|
java
|
/*
* The Jira Cloud platform REST API
* Jira Cloud platform REST API documentation
*
* OpenAPI spec version: 1001.0.0-SNAPSHOT
* Contact: ecosystem@atlassian.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.atlassian.jira.rest.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.atlassian.jira.rest.client.model.GroupName;
import com.atlassian.jira.rest.client.model.NotificationRecipients;
import com.atlassian.jira.rest.client.model.UserDetails;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
/**
* The recipients of the email notification for the issue.
*/
@Schema(description = "The recipients of the email notification for the issue.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2020-12-30T18:52:18.038445-08:00[America/Los_Angeles]")
public class AllOfNotificationTo extends NotificationRecipients {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AllOfNotificationTo {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"uyscuti@localhost.localdomain"
] |
uyscuti@localhost.localdomain
|
21eefb5ad200e6a514d69b684b8a12d91e4b9cf2
|
ddfbc26ec347e138d289bde911ee2c61d5d6fb59
|
/biz.aQute.bndlib/src/aQute/lib/osgi/Resource.java
|
65e57581b360f8373d2e38a7c6a5df91029a0029
|
[
"Apache-2.0"
] |
permissive
|
ifedorenko/bnd
|
f405087f35fa9682f64eb23baf04475c3bc2ca8b
|
5cd3f512b970f9eb6849f2ce9bffb999e3b7e155
|
refs/heads/master
| 2021-01-17T22:14:53.936290
| 2011-08-03T05:19:29
| 2011-08-03T05:26:46
| 2,146,465
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
package aQute.lib.osgi;
import java.io.*;
public interface Resource {
InputStream openInputStream() throws Exception ;
void write(OutputStream out) throws Exception;
long lastModified();
void setExtra(String extra);
String getExtra();
}
|
[
"peter.kriens@aqute.biz"
] |
peter.kriens@aqute.biz
|
56c4242ad4462a85c6f8dc704aa1fd127a679acf
|
3d8b535f6bcb9674b31f627e5c33210b5e47fbdd
|
/app/src/main/java/com/example/administrator/firebasechat2/RoomActivity.java
|
21ee44b5a8518f4008cb029b56c24c9b46815ddb
|
[] |
no_license
|
qskeksq/Android_FirebaseChat
|
22ebe0f6554f090100dd0a87ce5660e6aba4ba1c
|
fc1b9cdd2d8bff767ab9d79ee79e1a59b5744c51
|
refs/heads/master
| 2021-08-14T16:48:16.952775
| 2017-11-16T08:21:35
| 2017-11-16T08:21:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,574
|
java
|
package com.example.administrator.firebasechat2;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import com.example.administrator.firebasechat2.Util.Const;
import com.example.administrator.firebasechat2.Util.PreferenceUtil;
import com.example.administrator.firebasechat2.Util.StringUtil;
import com.example.administrator.firebasechat2.adapter.MessageListAdapter;
import com.example.administrator.firebasechat2.item.Message;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
import java.util.List;
public class RoomActivity extends AppCompatActivity {
private ImageView messageIcon;
private Toolbar roomToolbar;
private ImageView sendMessage;
private EditText editMessage;
private RecyclerView roomRecycler;
private MessageListAdapter adapter;
private int memberCount = 0;
private FirebaseDatabase database;
private DatabaseReference roomRef;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_room);
// getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
init();
setToolbar();
setRoomRecycler();
setListener();
}
private void init() {
String roomId = getIntent().getStringExtra(Const.ROOM_ID);
messageIcon = (ImageView) findViewById(R.id.messageIcon);
roomToolbar = (Toolbar) findViewById(R.id.roomToolbar);
sendMessage = (ImageView) findViewById(R.id.sendMessage);
editMessage = (EditText) findViewById(R.id.editMessage);
roomRecycler = (RecyclerView) findViewById(R.id.roomRecycler);
database = FirebaseDatabase.getInstance();
roomRef = database.getReference(Const.CHAT_ROOM).child(roomId);
}
private void setToolbar(){
setSupportActionBar(roomToolbar);
roomToolbar.setTitleTextColor(getResources().getColor(R.color.color_text_next));
getSupportActionBar().setTitle("채팅방");
}
private void setRoomRecycler(){
adapter = new MessageListAdapter(this);
roomRecycler.setAdapter(adapter);
roomRecycler.setLayoutManager(new LinearLayoutManager(this));
}
private void setListener(){
sendMessage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Message newMsg = new Message();
newMsg.id = PreferenceUtil.getString(RoomActivity.this, Const.SP_EMAIL);
newMsg.name = PreferenceUtil.getString(RoomActivity.this, Const.SP_NAME);
newMsg.content = editMessage.getText().toString();
newMsg.time = System.currentTimeMillis();
newMsg.length = newMsg.content.length();
newMsg.memberCount = memberCount+1;
roomRef.child(Const.MESSAGE_LIST).child(newMsg.time+"").setValue(newMsg);
editMessage.setText("");
}
});
roomRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
List<Message> messageList = new ArrayList<>();
String myEmail = PreferenceUtil.getString(RoomActivity.this, Const.SP_EMAIL);
for(DataSnapshot snapshot : dataSnapshot.child(Const.MESSAGE_LIST).getChildren()){
// Message message = snapshot.getValue(Message.class);
roomRef.child(Const.MESSAGE_LIST).child(snapshot.getKey()).child(Const.ROOM_RECEIVED_USERS).child(StringUtil.replaceEmailComma(myEmail)).setValue(myEmail);
String id = snapshot.child("id").getValue(String.class);
String content = snapshot.child("content").getValue(String.class);
long memberCount = (long) snapshot.child("memberCount").getValue();
String name = snapshot.child("name").getValue(String.class);
List<String> received_users = new ArrayList<>();
for(DataSnapshot userSnapshot : snapshot.child("received_users").getChildren()){
if(userSnapshot.getValue(String.class)!=null)
received_users.add(userSnapshot.getValue(String.class));
}
Message message = new Message();
message.id = id;
message.content = content;
message.memberCount = (int) memberCount;
message.name = name;
message.received_users = received_users;
message.read_count = message.memberCount - (message.received_users.size()-1);
messageList.add(message);
Log.e("호출됨", "호출됨");
}
adapter.setDataAndRefresh(messageList);
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
}
|
[
"qskeksq@gmail.com"
] |
qskeksq@gmail.com
|
15a43d35ed5708b41b0712726997a0ffd51579f9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_43a468d637a1abb5326ca20989ceda5f6329916f/ECGUser/17_43a468d637a1abb5326ca20989ceda5f6329916f_ECGUser_t.java
|
95436d8d7996b9f0d3e2e3caf75f5a16c1e7a3b2
|
[] |
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
| 5,608
|
java
|
package com.outsource.ecg.defs;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.R.integer;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.format.DateFormat;
public class ECGUser implements Parcelable {
// colume names & datatypes in user table
public static final String COL_NAME = "NAME NCHAR";
public static final String COL_GENDER = "GENDER NCHAR";
public static final String COL_BIRTH = "BIRTH NCHAR";
public static final String COL_HBR = "HBR REAL";
public static final String COL_ENROLL_DATE = "ENROLL_DATE TEXT";
public static final String COL_DATA_PATH = "DATA_PATH NCHAR";
public static final String COL_ID_NAME = "rowid";
public static final String COL_NAME_NAME = "NAME";
public static final String COL_GENDER_NAME = "GENDER";
public static final String COL_BIRTH_NAME = "BIRTH";
public static final String COL_HBR_NAME = "HBR";
public static final String COL_ENROLL_DATE_NAME = "ENROLL_DATE";
public static final String COL_DATA_PATH_NAME = "DATA_PATH";
public static final int INVALID_ID = 99999;
private int mID;
private String mName;
private String mGender;
private String mBirth;
private double mHBR;
private String mEnrollDate;
private String mDataPath;
// used when create user from a sql query
public ECGUser(int id, String name, String gender, String birthday,
double HBR, String enrollDate) {
mID = id;
mName = name;
mGender = gender;
mBirth = birthday;
mHBR = HBR;
mEnrollDate = enrollDate;
buildDataPath();
}
public ECGUser(int id, String name, String gender, String birthday,
double HBR) {
mID = id;
mName = name;
mGender = gender;
mBirth = birthday;
mHBR = HBR;
mEnrollDate = ECGUtils.getCurrentDataTime();
buildDataPath();
}
// use this version when you want to add a new ECGUser to ECGUserManager
public ECGUser(String name, String gender, String birthday, double HBR) {
// will be set a reasonable value after inserted into SQLite database
this(INVALID_ID, name, gender, birthday, HBR);
}
public ECGUser(Parcel in) {
mID = in.readInt();
mName = in.readString();
mGender = in.readString();
mBirth = in.readString();
mHBR = in.readDouble();
mEnrollDate = in.readString();
buildDataPath();
}
private void buildDataPath() {
mDataPath = mName.trim() + "_" + mID + ".sqlite";
}
public int getID() {
return mID;
}
public String getIDDesc() {
return "ID:" + mID;
}
public String getName() {
return mName;
}
public String getGender() {
return mGender;
}
public String getGenderDesc() {
return "Gender:" + mGender;
}
public String getBirthDesc() {
return "Birth:" + mBirth;
}
public String getEnrollDataDesc() {
return "Enroll Date:" + mEnrollDate;
}
public String getAgeDesc() {
return "Age:" + mBirth;
}
public String getBirth() {
return mBirth;
}
public String getHBRDesc() {
return "HBR:" + mHBR;
}
// get Heart beat rate
public double getHBR() {
return mHBR;
}
public String getECGDataPath() {
return mDataPath;
}
public String getECGDataPathDesc() {
return "ECGData:" + mDataPath;
}
public boolean isValid() {
return (mID != INVALID_ID);
}
// for extension
public boolean addProperty(String key, Object property) {
return false;
}
public Object getProperty(String key) {
return null;
}
public String getValues() {
return "('" + mName.trim() + "', '" + mGender.trim() + "', '" + mBirth
+ "', '" + mHBR + "', '" + mEnrollDate + "', '"
+ mDataPath.trim() + "')";
}
static public String getUserInfoTableStructure(boolean simple) {
if (simple) {
return "(" + COL_NAME_NAME + ", " + COL_GENDER_NAME + ", "
+ COL_BIRTH_NAME + ", " + COL_HBR_NAME + ", "
+ COL_ENROLL_DATE_NAME + ", " + COL_DATA_PATH_NAME + ")";
} else {
return "(" + COL_NAME + ", " + COL_GENDER + ", " + COL_BIRTH + ", "
+ COL_HBR + ", " + COL_ENROLL_DATE + ", " + COL_DATA_PATH
+ ")";
}
}
static public String getHistoyRecordTableStructure(boolean simple) {
// return
// "(X REAL, SERIESE1 REAL, SERIESE2 REAL, SERIESE3 REAL, SERIESE4 REAL)";
// now only support one series per-user
if (simple) {
return "(X, SERIES1)";
} else {
return "(X REAL, SERIES1 REAL)";
}
}
@Override
public String toString() {
// TODO Auto-generated method stub
return "[" + "id:" + mID + " name:" + mName + " gender:" + mGender
+ " birth:" + mBirth + " HBR:" + mHBR + " enrollDate:"
+ mEnrollDate + " dataPath:" + mDataPath + "]";
}
@Override
public int describeContents() {
// TODO Auto-generated method stub
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
// TODO Auto-generated method stub
dest.writeInt(mID);
dest.writeString(mName);
dest.writeString(mGender);
dest.writeString(mBirth);
dest.writeDouble(mHBR);
dest.writeString(mEnrollDate);
dest.writeString(mDataPath);
}
public static final Parcelable.Creator<ECGUser> CREATOR = new Parcelable.Creator<ECGUser>() {
public ECGUser createFromParcel(Parcel in) {
return new ECGUser(in);
}
@Override
public ECGUser[] newArray(int size) {
return new ECGUser[size];
}
};
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d51a1b28e4e744d554ecedcbd5979f51bd357d1f
|
9ec1a8994193128b97989a3f99e909e7510db478
|
/mybatissourcecode/mybatis3.5.0/src/test/java/org/apache/ibatis/submitted/ognl_enum/EnumWithOgnlTest.java
|
b75314320ce65ee44210f68537b0891fd324b08f
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
1720653171/sourcecode
|
5f89dfb6eb94ec47ee95a2c7e99a655716d14f33
|
1b4933cb0bb9d8b44d02595aa99c73fac826a0ac
|
refs/heads/master
| 2023-01-19T09:30:45.187493
| 2020-11-28T13:13:35
| 2020-11-28T13:13:35
| 316,138,280
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,156
|
java
|
/**
* Copyright 2010-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.submitted.ognl_enum;
import java.io.Reader;
import java.util.List;
import org.apache.ibatis.BaseDataTest;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.apache.ibatis.submitted.ognl_enum.Person.Type;
import org.apache.ibatis.submitted.ognl_enum.PersonMapper.PersonType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
public class EnumWithOgnlTest {
private static SqlSessionFactory sqlSessionFactory;
@BeforeAll
public static void initDatabase() throws Exception {
try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/ognl_enum/ibatisConfig.xml")) {
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
}
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
"org/apache/ibatis/submitted/ognl_enum/CreateDB.sql");
}
@Test
public void testEnumWithOgnl() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
List<Person> persons = personMapper.selectAllByType(null);
Assertions.assertEquals(3, persons.size(), "Persons must contain 3 persons");
}
}
@Test
public void testEnumWithOgnlDirector() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
List<Person> persons = personMapper.selectAllByType(Person.Type.DIRECTOR);
Assertions.assertEquals(1, persons.size(), "Persons must contain 1 persons");
}
}
@Test
public void testEnumWithOgnlDirectorNameAttribute() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
List<Person> persons = personMapper.selectAllByTypeNameAttribute(Person.Type.DIRECTOR);
Assertions.assertEquals(1, persons.size(), "Persons must contain 1 persons");
}
}
@Test
public void testEnumWithOgnlDirectorWithInterface() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
List<Person> persons = personMapper.selectAllByTypeWithInterface(new PersonType() {
@Override
public Type getType() {
return Person.Type.DIRECTOR;
}
});
Assertions.assertEquals(1, persons.size(), "Persons must contain 1 persons");
}
}
@Test
public void testEnumWithOgnlDirectorNameAttributeWithInterface() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
List<Person> persons = personMapper.selectAllByTypeNameAttributeWithInterface(new PersonType() {
@Override
public Type getType() {
return Person.Type.DIRECTOR;
}
});
Assertions.assertEquals(1, persons.size(), "Persons must contain 1 persons");
}
}
}
|
[
"37207723+1720653171@users.noreply.github.com"
] |
37207723+1720653171@users.noreply.github.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.