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
a7fe559948da8af2e6880f043c690eabf5c136ab
945d0e45a22fd280955ee9f9dc7a63d3aa7b5e53
/loan-sdk/src/main/java/com/hwc/loan/sdk/borrow/domain/BorrowRepayBorrowListDomain.java
6a29a527778d8c0d33b0f333bdbbe6d67f058d2a
[]
no_license
liangchch/loan
cb1bd4f767cc89bf78d88dbed6a7ae73b08c1c2b
f535eba487715dc13986d87a655af9000c0ce6ea
refs/heads/master
2022-04-23T11:27:59.348843
2020-04-26T06:26:20
2020-04-26T06:26:20
258,930,371
0
0
null
2020-04-26T05:45:59
2020-04-26T03:29:09
null
UTF-8
Java
false
false
4,408
java
package com.hwc.loan.sdk.borrow.domain; import java.util.*; import java.math.*; import com.hwc.base.sdk.core.RequestBase; public class BorrowRepayBorrowListDomain { private Double amount; private Date borrow_date; private Double total_amount; private Double first_repay_amount; private Date first_repay_date; private Long first_repay_id; private Double interest; private Date end_repay_date; private Double rate; private int periods; private int hasRepay_periods; private int unRepay_periods; private Double unRepay_amount; private String bankCardNo; private Double current_repay_amount; private Date current_repay_date; private Long current_repay_id; private Long borrowId; private List plans; public void setAmount(Double amount) { this.amount = amount; } public Double getAmount() { return this.amount; } public void setBorrow_date(Date borrow_date) { this.borrow_date = borrow_date; } public Date getBorrow_date() { return this.borrow_date; } public void setTotal_amount(Double total_amount) { this.total_amount = total_amount; } public Double getTotal_amount() { return this.total_amount; } public void setFirst_repay_amount(Double first_repay_amount) { this.first_repay_amount = first_repay_amount; } public Double getFirst_repay_amount() { return this.first_repay_amount; } public void setFirst_repay_date(Date first_repay_date) { this.first_repay_date = first_repay_date; } public Date getFirst_repay_date() { return this.first_repay_date; } public void setFirst_repay_id(Long first_repay_id) { this.first_repay_id = first_repay_id; } public Long getFirst_repay_id() { return this.first_repay_id; } public void setInterest(Double interest) { this.interest = interest; } public Double getInterest() { return this.interest; } public void setEnd_repay_date(Date end_repay_date) { this.end_repay_date = end_repay_date; } public Date getEnd_repay_date() { return this.end_repay_date; } public void setRate(Double rate) { this.rate = rate; } public Double getRate() { return this.rate; } public void setPeriods(int periods) { this.periods = periods; } public int getPeriods() { return this.periods; } public void setHasRepay_periods(int hasRepay_periods) { this.hasRepay_periods = hasRepay_periods; } public int getHasRepay_periods() { return this.hasRepay_periods; } public void setUnRepay_periods(int unRepay_periods) { this.unRepay_periods = unRepay_periods; } public int getUnRepay_periods() { return this.unRepay_periods; } public void setUnRepay_amount(Double unRepay_amount) { this.unRepay_amount = unRepay_amount; } public Double getUnRepay_amount() { return this.unRepay_amount; } public void setBankCardNo(String bankCardNo) { this.bankCardNo = bankCardNo; } public String getBankCardNo() { return this.bankCardNo; } public void setCurrent_repay_amount(Double current_repay_amount) { this.current_repay_amount = current_repay_amount; } public Double getCurrent_repay_amount() { return this.current_repay_amount; } public void setCurrent_repay_date(Date current_repay_date) { this.current_repay_date = current_repay_date; } public Date getCurrent_repay_date() { return this.current_repay_date; } public void setCurrent_repay_id(Long current_repay_id) { this.current_repay_id = current_repay_id; } public Long getCurrent_repay_id() { return this.current_repay_id; } public void setBorrowId(Long borrowId) { this.borrowId = borrowId; } public Long getBorrowId() { return this.borrowId; } public void setPlans(List plans) { this.plans = plans; } public List getPlans() { return this.plans; } }
[ "jizhongliang@jizhongliangdeiMac.local" ]
jizhongliang@jizhongliangdeiMac.local
dbe83b405ae39ef10b16065108c215322d6bc44d
9310225eb939f9e4ac1e3112190e6564b890ac63
/samigo/samigo-hibernate/src/java/org/sakaiproject/tool/assessment/data/dao/shared/TypeD.java
a87433e7996f611aa3e759171ab9b49f73cd0ff1
[ "ECL-2.0" ]
permissive
deemsys/version-1.0
89754a8acafd62d37e0cdadf680ddc9970e6d707
cd45d9b7c5633915a18bd75723c615037a4eb7a5
refs/heads/master
2020-06-04T10:47:01.608886
2013-06-15T11:01:28
2013-06-15T11:01:28
10,705,153
1
0
null
null
null
null
UTF-8
Java
false
false
6,507
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/sam/branches/samigo-2.9.x/samigo-hibernate/src/java/org/sakaiproject/tool/assessment/data/dao/shared/TypeD.java $ * $Id: TypeD.java 95934 2011-07-29 22:13:46Z ktsao@stanford.edu $ *********************************************************************************** * * Copyright (c) 2004, 2005, 2006, 2008, 2009 The Sakai Foundation * * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.tool.assessment.data.dao.shared; import java.util.Date; import org.sakaiproject.tool.assessment.data.ifc.shared.TypeIfc; public class TypeD implements TypeIfc{ /** * */ private static final long serialVersionUID = 3957338190425982508L; // This has the exact same list as TypeFacade. Please keep both list updated public static final Long MULTIPLE_CHOICE = Long.valueOf(1); public static final Long MULTIPLE_CORRECT =Long.valueOf(2); public static final Long MULTIPLE_CHOICE_SURVEY = Long.valueOf(3); public static final Long TRUE_FALSE = Long.valueOf(4); public static final Long ESSAY_QUESTION = Long.valueOf(5); public static final Long FILE_UPLOAD = Long.valueOf(6); public static final Long AUDIO_RECORDING = Long.valueOf(7); public static final Long FILL_IN_BLANK = Long.valueOf(8); public static final Long FILL_IN_NUMERIC = Long.valueOf(11); public static final Long MATRIX_CHOICES_SURVEY = Long.valueOf(13); public static final Long MATCHING = Long.valueOf(9); // these are section type available in this site, public static final Long DEFAULT_SECTION = Long.valueOf(21); // these are assessment template type available in this site, public static final Long TEMPLATE_SYSTEM_DEFINED = Long.valueOf(142); public static final Long TEMPLATE_QUIZ = Long.valueOf(41); public static final Long TEMPLATE_HOMEWORK = Long.valueOf(42); public static final Long TEMPLATE_MIDTERM = Long.valueOf(43); public static final Long TEMPLATE_FINAL = Long.valueOf(44); // these are assessment type available in this site, public static final Long QUIZ = Long.valueOf(61); public static final Long HOMEWORK = Long.valueOf(62); public static final Long MIDTERM = Long.valueOf(63); public static final Long FINAL = Long.valueOf(64); private Long typeId; private String authority; private String domain; private String keyword; private String description; private int status; private String createdBy; private Date createdDate; private String lastModifiedBy; private Date lastModifiedDate; public TypeD(){ } public TypeD(String authority, String domain, String keyword) { this.authority = authority; this.domain = domain; this.keyword = keyword; } public TypeD(String authority, String domain, String keyword, String description) { this.authority = authority; this.domain = domain; this.keyword = keyword; this.description = description; } public TypeD(String authority, String domain, String keyword, String description, int status, String createdBy, Date createdDate, String lastModifiedBy, Date lastModifiedDate) { this.authority = authority; this.domain = domain; this.keyword = keyword; this.description = description; this.status = status; this.createdBy = createdBy; this.createdDate = createdDate; this.lastModifiedBy = lastModifiedBy; this.lastModifiedDate = lastModifiedDate; } /** * Return the itemTypeId from ItemType */ public Long getTypeId(){ return this.typeId; } /** * Set the itemTypeID for this ItemType. */ public void setTypeId(Long typeId){ this.typeId = typeId; } public String getAuthority(){ return this.authority; } public void setAuthority(String authority){ this.authority = authority; } public String getDomain(){ return this.domain; } public void setDomain(String domain){ this.domain = domain; } /** * Return the Name for this ItemType. */ public String getKeyword(){ return this.keyword; } /** * Set the Name for this ItemType. */ public void setKeyword(String keyword){ this.keyword = keyword; } public String getDescription(){ return this.description; } public void setDescription(String description){ this.description = description; } /** * Return the status for this ItemType. */ public int getStatus(){ return this.status; } /** * Set the status for this ItemType. */ public void setStatus(int status){ this.status = status; } /** * Return the createdBy for this ItemType. */ public String getCreatedBy(){ return this.createdBy; } /** * Set the createdBy for this ItemType. */ public void setCreatedBy (String createdBy){ this.createdBy = createdBy; } /** * Return the createdDate for this ItemType. */ public Date getCreatedDate(){ return this.createdDate; } /** * Set the createdDate for this ItemType. */ public void setCreatedDate (Date createdDate){ this.createdDate = createdDate; } /** * Return the lastModifiedBy for this ItemType. */ public String getLastModifiedBy(){ return this.lastModifiedBy; } /** * Set the lastModifiedBy for this ItemType. */ public void setLastModifiedBy (String lastModifiedBy){ this.lastModifiedBy = lastModifiedBy; } /** * Return the lastModifiedDate for this ItemType. */ public Date getLastModifiedDate(){ return this.lastModifiedDate; } /** * Set the lastModifiedDate for this ItemType. */ public void setLastModifiedDate (Date lastModifiedDate){ this.lastModifiedDate = lastModifiedDate; } }
[ "sangee1229@gmail.com" ]
sangee1229@gmail.com
81821d4ae7273d6665b0202e92643494043ba745
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/alipay/mobile/common/transportext/biz/diagnose/network/UploadManager.java
eb9c206de1f897e4af56825d9369bccb4f8ba692
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,295
java
package com.alipay.mobile.common.transportext.biz.diagnose.network; import android.text.TextUtils; import com.alipay.mobile.common.logging.api.monitor.Performance; import com.alipay.mobile.common.transport.monitor.MonitorLoggerUtils; import com.alipay.mobile.common.transport.monitor.TransportPerformance; import com.alipay.mobile.common.transport.utils.LogCatUtil; import com.alipay.mobile.common.transport.utils.NetworkAsyncTaskExecutor; import com.alipay.mobile.common.transport.utils.NetworkUtils; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class UploadManager { private static final String LOG_TYPE = "NetDiago"; private static final String TAG = "DIAGNOSE-UPLOAD"; public static void writeLog(List<String> logStrListInput, String versionInput, final int diagnoseType) { final String version; if (logStrListInput != null && !logStrListInput.isEmpty()) { final List logStrList = new ArrayList(); Collections.addAll(logStrList, new String[logStrListInput.size()]); Collections.copy(logStrList, logStrListInput); if (versionInput == null) { version = "0.0"; } else { version = versionInput; } NetworkAsyncTaskExecutor.executeIO(new Runnable() { public final void run() { try { Performance pf = new TransportPerformance(); pf.setSubType(UploadManager.LOG_TYPE); pf.setParam1(MonitorLoggerUtils.getLogBizType(UploadManager.LOG_TYPE)); pf.setParam2("INFO"); pf.getExtPramas().put("diagVer", version); pf.getExtPramas().put("diagType", "diagnose"); if (NetworkUtils.isVpnUsed()) { pf.getExtPramas().put("VPN", "T"); } int count = 0; boolean hasResult = false; for (String s : logStrList) { if (!TextUtils.isEmpty(s)) { hasResult = true; count++; pf.addExtParam("RES_" + count, s); } } if (hasResult) { if (3 == diagnoseType) { UploadManager.uploadDiagnoseByAuto(pf); } else { UploadManager.upload(pf); } LogCatUtil.debug(UploadManager.TAG, pf.toString()); } } catch (Exception e) { LogCatUtil.warn((String) UploadManager.TAG, e.toString()); } } }); } } /* access modifiers changed from: private */ public static void upload(Performance pf) { MonitorLoggerUtils.uploadDiagLog(pf); } /* access modifiers changed from: private */ public static void uploadDiagnoseByAuto(Performance pf) { MonitorLoggerUtils.uploadAutoDiagLog(pf); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
c24a50d504c85143672ee8fd9b50888c706d5dc3
8a8254c83cc2ec2c401f9820f78892cf5ff41384
/baseline/Travel-Mate/Android/app/src/main/java/utils/WeatherUtils.java
1a06e52243f5aa77406d7033a507761f9879bab4
[ "MIT" ]
permissive
VU-Thesis-2019-2020-Wesley-Shann/subjects
46884bc6f0f9621be2ab3c4b05629e3f6d3364a0
14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88
refs/heads/master
2022-12-03T05:52:23.309727
2020-08-19T12:18:54
2020-08-19T12:18:54
261,718,101
0
0
null
2020-07-11T12:19:07
2020-05-06T09:54:05
Java
UTF-8
Java
false
false
2,996
java
package utils; import android.content.Context; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Locale; public class WeatherUtils { /** * invoked to get the right weather icon vector drawable resource file identifier * @param context context to access application resources * @param iconUrl weather icon image url obtained from the API call * @param code integer code used to fetch the weather description * @return resource id of the vector file */ public static int fetchDrawableFileResource(Context context, String iconUrl, int code) throws JSONException, IOException { String imageDrawable = "wi_"; String time = iconUrl.substring(iconUrl.lastIndexOf("/") + 1); imageDrawable += time.contains("d") ? "day" : "night"; String suffix = getSuffix(context, code); imageDrawable += "_" + suffix; return context.getResources().getIdentifier(imageDrawable, "drawable", "baseline.io.github.project_travel_mate"); } /** * parses the icons.json file which contains the weather condition codes and descriptions * required to fetch the right weather icon to display * * * @param context context to access application resources * @param code weather condition code * @return weather condition description */ private static String getSuffix(Context context, int code) throws JSONException, IOException { String json; String cond = ""; try { InputStream is = context.getAssets().open("icons.json"); int size = is.available(); byte[] buffer = new byte[size]; is.read(buffer); is.close(); json = new String(buffer, "UTF-8"); JSONObject jsonObject = new JSONObject(json); if (jsonObject.has(String.valueOf(code))) { JSONObject object = jsonObject.getJSONObject(String.valueOf(code)); cond = object.getString("icon"); } } catch (JSONException ex) { throw new JSONException(ex.getMessage()); } catch (IOException e) { throw new IOException(e.getMessage()); } return cond; } /** * called to get the days of the week needed to display the forecast * @param index day's index * @param pattern pattern of output day of week * @return current day of the week as a String */ public static String getDayOfWeek(int index, String pattern) { SimpleDateFormat dateFormat = new SimpleDateFormat(pattern, Locale.getDefault()); Calendar calendar = new GregorianCalendar(); calendar.add(Calendar.DATE, index); return dateFormat.format(calendar.getTime()); } }
[ "sshann95@outlook.com" ]
sshann95@outlook.com
beb951243aa989f676ab44984935cb8db17e83df
72a9ae101943d8ce2fed0766eb667de6526dbfbc
/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.java
57a140f66d4d5484de42f2ce3cc8a8a194c81b9d
[]
no_license
tilialabs/qtjambi
2b710a451f70c98043294e627f1082eedb3847f1
71ebc0b13d17e8fdbc49663e447a9f149736b3cd
refs/heads/master
2020-06-11T09:10:50.589004
2016-12-06T15:12:56
2016-12-06T15:12:56
75,703,109
2
0
null
2016-12-06T06:47:26
2016-12-06T06:47:26
null
UTF-8
Java
false
false
616
java
import com.trolltech.qt.core.QIODevice; import com.trolltech.qt.gui.QApplication; import com.trolltech.qt.xmlpatterns.QXmlQuery; import com.trolltech.qt.xmlpatterns.QXmlSerializer; public class src_xmlpatterns_api_qxmlserializer { public static void main(String args[]) { QApplication.initialize(args); QIODevice myOutputDevice; //! [0] QXmlQuery query = new QXmlQuery(); query.setQuery("doc('index.html')/html/body/p[1]"); QXmlSerializerPointer serializer = new QXmlSerializerPointer(new QXmlSerializer(query, myOutputDevice)); query.evaluateToReceiver(serializer); //! [0] } }
[ "a@b" ]
a@b
7ec0bbebd525816bdbed1310bc2791c1bee72825
afc48aa16e3facef03f6c614d4fdff108f136842
/src/com/yao/ui/SmsDecrypt.java
2f2f2eebfe3a1f94530ebff71887442563b4fce7
[]
no_license
vaginessa/SecurityBox
1fee588bb56a4da71f9ea6cbea499b3d98a58ad8
8842d09f3a9ba74fbca82886a3915b18f6703eb2
refs/heads/master
2020-03-27T20:07:12.459356
2012-07-10T16:46:39
2012-07-10T16:46:39
147,040,457
0
0
null
2019-01-18T08:40:09
2018-09-01T23:46:51
Java
UTF-8
Java
false
false
5,035
java
package com.yao.ui; import com.yao.pw.R; import com.yao.util.DesUtils; import com.yao.util.MyHelper; import com.yao.util.SmsHelper; import android.app.Activity; import android.app.AlertDialog; import android.app.ListActivity; import android.content.DialogInterface; import android.content.Intent; import android.content.DialogInterface.OnClickListener; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.view.View; import android.view.Window; import android.widget.AdapterView; import android.widget.ListView; import android.widget.SimpleCursorAdapter; import android.widget.TextView; import android.widget.Toast; import android.widget.AdapterView.OnItemLongClickListener; public class SmsDecrypt extends ListActivity{ public static final String DB_NAME = "Sms.db"; public static final int VERSION = 1; SmsHelper helper; SQLiteDatabase db; Cursor c; int keyIndex; int addressIndex; int bodyIndex; OnClickListener listener1; String key; String body; String address; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.account_note_list); this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title); TextView titleLabel = (TextView)this.findViewById(R.id.label); titleLabel.setText(R.string.msgDecryptDb); helper = new SmsHelper(this, DB_NAME, null, VERSION); db = helper.getWritableDatabase(); c = db.query(SmsHelper.TB_NAME,null,null,null,null,null, SmsHelper.ADDRESS); keyIndex = c.getColumnIndexOrThrow(SmsHelper.KEY); addressIndex = c.getColumnIndexOrThrow(SmsHelper.ADDRESS); bodyIndex = c.getColumnIndexOrThrow(SmsHelper.BODY); SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.smsinbox_item, c, new String[] {SmsHelper.ADDRESS,SmsHelper.BODY}, new int[] {R.id.num,R.id.body}); setListAdapter(adapter); } @Override protected void onListItemClick(ListView l, View v, int position, final long id) { key = c.getString(keyIndex); body = c.getString(bodyIndex); address = c.getString(addressIndex); listener1=new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub switch(which){ case 0: DesUtils des; try { des = new DesUtils("19900911"); body = des.decrypt(body); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } new AlertDialog.Builder(SmsDecrypt.this) .setIcon(android.R.drawable.ic_dialog_info) .setTitle(SmsDecrypt.this.getResources().getString(R.string.sms_from)+ address) .setMessage(body) .setPositiveButton(R.string.ok, null) .show(); break; case 1: char b[]=new char[100]; b=body.toCharArray(); for(int i=0;i<b.length;i++){ b[i]=(char)(b[i]^22); } new AlertDialog.Builder(SmsDecrypt.this) .setIcon(android.R.drawable.ic_dialog_info) .setTitle(SmsDecrypt.this.getResources().getString(R.string.sms_from)+ address) .setMessage(String.valueOf(b)) .setPositiveButton(R.string.ok, null) .show(); break; case 2: new AlertDialog.Builder(SmsDecrypt.this) .setIcon(android.R.drawable.ic_dialog_info) .setTitle(R.string.about) .setMessage(R.string.sms_delete_msg) .setNegativeButton(R.string.cancel, null) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub db.delete(SmsHelper.TB_NAME, MyHelper.ID+ "=" + id, null); updateList(); } }) .show(); break; default: break; } } }; new AlertDialog.Builder(SmsDecrypt.this) .setItems(R.array.smsOperation1,listener1) .show(); } /*刷新账号列表*/ public void updateList(){ c = db.query(SmsHelper.TB_NAME,null,null,null,null,null, SmsHelper.ADDRESS); keyIndex = c.getColumnIndexOrThrow(SmsHelper.KEY); addressIndex = c.getColumnIndexOrThrow(SmsHelper.ADDRESS); bodyIndex = c.getColumnIndexOrThrow(SmsHelper.BODY); SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.smsinbox_item, c, new String[] {SmsHelper.ADDRESS,SmsHelper.BODY}, new int[] {R.id.num,R.id.body}); setListAdapter(adapter); } }
[ "yao2app@gmail.com" ]
yao2app@gmail.com
c82d3c7d5896b759047731c54817666252c149e1
055547b224ebd5738cc028c24f8bea6bf436b8a9
/src/main/java/com/city/bean/Mytoken.java
8070adfa56d71d977e74f361d3e40a5fefea1411
[]
no_license
XGKerwin/city_boot
17fb7db102918bf2421ba501784386179c2d3d6d
b440fcb1ad3ad0273b2778556c57229e42158a10
refs/heads/master
2023-08-17T22:30:17.953355
2021-10-16T12:17:08
2021-10-16T12:17:08
411,958,205
0
0
null
null
null
null
UTF-8
Java
false
false
828
java
package com.city.bean; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import java.io.Serializable; /** * <p> * * </p> * * @author XGKerwin * @since 2021-09-17 */ public class Mytoken implements Serializable { private static final long serialVersionUID=1L; private String token; @TableId(value = "id", type = IdType.AUTO) private Integer id; public String getToken() { return token; } public void setToken(String token) { this.token = token; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Override public String toString() { return "Mytoken{" + "token=" + token + ", id=" + id + "}"; } }
[ "1064936282@qq.com" ]
1064936282@qq.com
fe32d6611f04b390b540a7d1c793e3da4e24d229
77343304fc2aeea3680a34a20dc0e96705c2b8d2
/jOOQ-meta/src/main/java/org/jooq/meta/derby/sys/tables/Sysconstraints.java
bb13779ebd53735e53827eb5c2cd1198f2d0904d
[ "Apache-2.0" ]
permissive
bennofs/jOOQ
e9aef8b381585139a3efc96bcc05fc8c25dd6a51
cf3db8bb164d4ec34b59dbe4bdb9fc616d17d647
refs/heads/master
2020-12-22T14:57:37.933991
2020-01-28T20:02:25
2020-01-28T20:07:08
236,830,044
0
0
NOASSERTION
2020-01-28T20:06:47
2020-01-28T20:06:46
null
UTF-8
Java
false
true
3,256
java
/* * This file is generated by jOOQ. */ package org.jooq.meta.derby.sys.tables; import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; import org.jooq.impl.DSL; import org.jooq.impl.TableImpl; import org.jooq.meta.derby.sys.Sys; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Sysconstraints extends TableImpl<Record> { private static final long serialVersionUID = 1919449543; /** * The reference instance of <code>SYS.SYSCONSTRAINTS</code> */ public static final Sysconstraints SYSCONSTRAINTS = new Sysconstraints(); /** * The class holding records for this type */ @Override public Class<Record> getRecordType() { return Record.class; } /** * The column <code>SYS.SYSCONSTRAINTS.CONSTRAINTID</code>. */ public static final TableField<Record, String> CONSTRAINTID = createField(DSL.name("CONSTRAINTID"), org.jooq.impl.SQLDataType.CHAR(36).nullable(false), SYSCONSTRAINTS, ""); /** * The column <code>SYS.SYSCONSTRAINTS.TABLEID</code>. */ public static final TableField<Record, String> TABLEID = createField(DSL.name("TABLEID"), org.jooq.impl.SQLDataType.CHAR(36).nullable(false), SYSCONSTRAINTS, ""); /** * The column <code>SYS.SYSCONSTRAINTS.CONSTRAINTNAME</code>. */ public static final TableField<Record, String> CONSTRAINTNAME = createField(DSL.name("CONSTRAINTNAME"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), SYSCONSTRAINTS, ""); /** * The column <code>SYS.SYSCONSTRAINTS.TYPE</code>. */ public static final TableField<Record, String> TYPE = createField(DSL.name("TYPE"), org.jooq.impl.SQLDataType.CHAR(1).nullable(false), SYSCONSTRAINTS, ""); /** * The column <code>SYS.SYSCONSTRAINTS.SCHEMAID</code>. */ public static final TableField<Record, String> SCHEMAID = createField(DSL.name("SCHEMAID"), org.jooq.impl.SQLDataType.CHAR(36).nullable(false), SYSCONSTRAINTS, ""); /** * The column <code>SYS.SYSCONSTRAINTS.STATE</code>. */ public static final TableField<Record, String> STATE = createField(DSL.name("STATE"), org.jooq.impl.SQLDataType.CHAR(1).nullable(false), SYSCONSTRAINTS, ""); /** * The column <code>SYS.SYSCONSTRAINTS.REFERENCECOUNT</code>. */ public static final TableField<Record, Integer> REFERENCECOUNT = createField(DSL.name("REFERENCECOUNT"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), SYSCONSTRAINTS, ""); /** * No further instances allowed */ private Sysconstraints() { this(DSL.name("SYSCONSTRAINTS"), null); } private Sysconstraints(Name alias, Table<Record> aliased) { this(alias, aliased, null); } private Sysconstraints(Name alias, Table<Record> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, DSL.comment("")); } public <O extends Record> Sysconstraints(Table<O> child, ForeignKey<O, Record> key) { super(child, key, SYSCONSTRAINTS); } @Override public Schema getSchema() { return Sys.SYS; } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
bd5d7f1de85ecfc20fa34e8a74a438bc2a242365
62d9a4451f2818cfcc45ed3302c4dffaf31e4b3f
/src/main/java/tech/lapsa/payara/jersey/localization/RequestAcceptableLanguagesMessageInterpolator.java
02d7b67ad8527398fe4d0655f8c36158c1eb2226
[]
no_license
eurasia-insurance/payara-jersey-extensions
0e626a805c5b36c4504e35bd3f8b1d0cf9a31982
679dec4b2aede016e2ffbf9be5da58374a7ccb02
refs/heads/master
2020-03-28T14:17:36.814646
2019-03-17T20:36:09
2019-03-17T20:36:09
148,474,342
0
0
null
null
null
null
UTF-8
Java
false
false
1,037
java
package tech.lapsa.payara.jersey.localization; import java.util.List; import java.util.Locale; import javax.validation.MessageInterpolator; public class RequestAcceptableLanguagesMessageInterpolator implements MessageInterpolator { private final MessageInterpolator delegate; public RequestAcceptableLanguagesMessageInterpolator(final MessageInterpolator delegate) { this.delegate = delegate; } @Override public String interpolate(final String message, final Context context) { final List<Locale> locales = RequestAcceptableLanguages.getLocalesList(); if (locales != null) for (final Locale locale : locales) try { return delegate.interpolate(message, context, locale); } catch (final Exception e) { // continue to interpolating in next listed locale } return delegate.interpolate(message, context); } @Override public String interpolate(final String message, final Context context, final Locale locale) { return delegate.interpolate(message, context, locale); } }
[ "vadim.o.isaev@gmail.com" ]
vadim.o.isaev@gmail.com
41b5ea3cb3d490bd43423371a96b28dd878ee0ec
de8b590c72c1ca28ac07e206ce87f5e2c50449be
/src/main/java/org/wilson/world/controller/PageRedirector.java
7ef6d34aeb4597b837fc3fca491a78c486435bef
[]
no_license
liumiaowilson/world
a513bfaacc94cbcf5b88c1a2ce5426944c7f83b4
818ee21b67edbf4961424d9d474110ac8201f591
refs/heads/master
2020-04-06T05:50:52.671982
2017-08-05T00:02:21
2017-08-05T00:02:21
62,312,015
0
0
null
null
null
null
UTF-8
Java
false
false
3,029
java
package org.wilson.world.controller; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.wilson.world.manager.PageManager; import org.wilson.world.manager.TemplateManager; import org.wilson.world.model.Page; import org.wilson.world.servlet.ControllerServlet; public class PageRedirector { private Map<String, Object> data = new HashMap<String, Object>(); private List<String> scripts = new ArrayList<String>(); private List<String> styles = new ArrayList<String>(); private boolean isNested; private String pageTitle; //use another page to introduce scripts private String scriptPageName; public void setScriptPageName(String scriptPageName) { this.scriptPageName = scriptPageName; } public String getScriptPageName() { return this.scriptPageName; } public void setPageTitle(String pageTitle) { this.pageTitle = pageTitle; } public String getPageTitle() { return this.pageTitle; } public void addScript(String script) { this.scripts.add(script); } public void removeScript(String script) { this.scripts.remove(script); } public List<String> getScripts() { return this.scripts; } public void addStyle(String style) { this.styles.add(style); } public void removeStyle(String style) { this.styles.remove(style); } public List<String> getStyles() { return this.styles; } public boolean isNested() { return this.isNested; } public void setNested(boolean isNested) { this.isNested = isNested; } public void put(String name, Object value) { this.data.put(name, value); } public Object get(String name) { if(StringUtils.isBlank(name)) { return null; } return this.data.get(name); } public Object remove(String name) { if(StringUtils.isBlank(name)) { return null; } return this.data.remove(name); } public void redirect(HttpServletRequest request, HttpServletResponse response, String pageName) throws IOException { if(response == null) { return; } if(StringUtils.isBlank(pageName)) { ControllerServlet.jumpToHomePage(response, "No page name could be found."); return; } Page page = PageManager.getInstance().getPage(pageName); if(page == null) { ControllerServlet.jumpToHomePage(response, "No page could be found."); return; } if(!this.isNested()) { String content = this.getPageContent(page); PrintWriter pw = response.getWriter(); pw.print(content); pw.flush(); } else { request.getSession().setAttribute("world-page_redirector", this); response.sendRedirect("/jsp/page_load.jsp?id=" + page.id); } } public String getPageContent(Page page) { if(page == null) { return null; } String content = TemplateManager.getInstance().evaluate(page.content, this.data); return content; } }
[ "mialiu@ebay.com" ]
mialiu@ebay.com
1d303025065ae1a5c16794208a9e05c6c2f6e991
6506b8bf4cd0ae79db864754c3d02fa64ced4817
/maestro-tests/src/main/java/org/maestro/tests/rate/singlepoint/FixedRateTestProfile.java
e7b8f88d946a83efa7b998f0e9fd7e9bb345ad60
[ "Apache-2.0" ]
permissive
k-wall/maestro-java
173b325a659a2613caf389fd8a5948bd6ce4af8d
72647e74c8b17840d7643cdcac97d847d02eef61
refs/heads/master
2020-03-22T20:10:08.195602
2018-07-20T12:35:49
2018-07-20T12:35:49
140,577,838
0
0
null
2018-07-11T13:17:52
2018-07-11T13:17:52
null
UTF-8
Java
false
false
8,050
java
/* * Copyright 2018 Otavio R. Piske <angusyoung@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.maestro.tests.rate.singlepoint; import org.apache.commons.configuration.AbstractConfiguration; import org.maestro.client.Maestro; import org.maestro.common.ConfigurationWrapper; import org.maestro.common.duration.DurationCount; import org.maestro.common.duration.TestDuration; import org.maestro.common.exceptions.MaestroException; import org.maestro.tests.AbstractTestProfile; import org.maestro.tests.SinglePointProfile; import org.maestro.tests.utils.CompletionTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * A test profile for fixed rate tests */ public class FixedRateTestProfile extends AbstractTestProfile implements SinglePointProfile { private static final Logger logger = LoggerFactory.getLogger(FixedRateTestProfile.class); private static final AbstractConfiguration config = ConfigurationWrapper.getConfig(); protected int rate; protected int warmUpRate; protected int parallelCount; protected int warmUpParallelCount; private String brokerURL; private int maximumLatency = 0; private TestDuration duration; private String messageSize; private String extPointSource; private String extPointBranch; private String extPointCommand; public String getExtPointSource() { return extPointSource; } public void setExtPointSource(String extPointSource) { this.extPointSource = extPointSource; } public String getExtPointBranch() { return extPointBranch; } public void setExtPointBranch(String extPointBranch) { this.extPointBranch = extPointBranch; } public String getExtPointCommand() { return extPointCommand; } public void setExtPointCommand(String extPointCommand) { this.extPointCommand = extPointCommand; } public void setParallelCount(int parallelCount) { this.parallelCount = parallelCount; setWarmUpParallelCount(parallelCount); } private void setWarmUpParallelCount(int parallelCount) { final int ceillingWarmUpPc = config.getInt("warm-up.ceiling.parallel.count", 30); if (parallelCount > ceillingWarmUpPc) { warmUpParallelCount = ceillingWarmUpPc; } else { warmUpParallelCount = parallelCount; } } public int getParallelCount() { return parallelCount; } public void setRate(int rate) { double rateMultiplier = config.getDouble("warm-up.rate.percent", 30); this.rate = rate; double warmUpTmp = rate * (rateMultiplier / 100); if (warmUpTmp > Integer.MAX_VALUE) { warmUpRate = Integer.MAX_VALUE; } else { warmUpRate = (int) Math.round(warmUpTmp); } } public int getRate() { return rate; } public int getMaximumLatency() { return maximumLatency; } public void setMaximumLatency(int maximumLatency) { this.maximumLatency = maximumLatency; } public TestDuration getDuration() { return duration; } public void setDuration(final TestDuration duration) { this.duration = duration; } public String getMessageSize() { return messageSize; } public void setMessageSize(String messageSize) { this.messageSize = messageSize; } public String getBrokerURL() { return getSendReceiveURL(); } public void setBrokerURL(final String brokerURL) { setSendReceiveURL(brokerURL); } @Override public void setSendReceiveURL(String url) { this.brokerURL = url; } @Override public String getSendReceiveURL() { return brokerURL; } @Override public long getEstimatedCompletionTime() { if (duration instanceof DurationCount) { return CompletionTime.estimate(duration, getRate()); } else { return duration.getNumericDuration(); } } public long getWarmUpEstimatedCompletionTime() { return CompletionTime.estimate(getDuration().getWarmUpDuration(), warmUpRate); } protected void apply(final Maestro maestro, boolean warmUp) throws MaestroException { logger.info("Setting endpoint URL to {}", getSendReceiveURL()); maestro.setBroker(getSendReceiveURL()); if (warmUp) { logger.info("Setting warm-up rate to {}", warmUpRate); maestro.setRate(warmUpRate); TestDuration warmUpDuration = getDuration().getWarmUpDuration(); long balancedDuration = Math.round(warmUpDuration.getNumericDuration() / getParallelCount()); logger.info("Setting warm-up duration to {}", balancedDuration); maestro.setDuration(balancedDuration); logger.info("Setting warm-up parallel count to {}", this.warmUpParallelCount); maestro.setParallelCount(this.warmUpParallelCount); } else { logger.info("Setting test rate to {}", getRate()); maestro.setRate(rate); logger.info("Setting test duration to {}", getDuration()); maestro.setDuration(this.getDuration().toString()); logger.info("Setting parallel count to {}", this.parallelCount); maestro.setParallelCount(this.parallelCount); } logger.info("Setting fail-condition-latency to {}", getMaximumLatency()); maestro.setFCL(getMaximumLatency()); logger.info("Setting message size to {}", getMessageSize()); maestro.setMessageSize(getMessageSize()); if (getManagementInterface() != null) { if (getInspectorName() != null) { logger.info("Setting the management interface to {} using inspector {}", getManagementInterface(), getInspectorName()); maestro.setManagementInterface(getManagementInterface()); } } if (getExtPointSource() != null) { if (getExtPointBranch() != null) { logger.info("Setting the extension point source to {} using the {} branch", getExtPointSource(), getExtPointBranch()); maestro.sourceRequest(getExtPointSource(), getExtPointBranch()); } } if (getExtPointCommand() != null) { logger.info("Setting command to Agent execution to {}", getExtPointCommand()); maestro.userCommand(0, getExtPointCommand()); } } @Override public void apply(final Maestro maestro) throws MaestroException { logger.info("Applying test execution profile"); apply(maestro, false); logger.info("Estimated time for test completion: {} secs", getEstimatedCompletionTime()); } public void warmUp(final Maestro maestro) throws MaestroException { logger.info("Applying test warm-up profile"); apply(maestro, true); logger.info("Estimated time for warm-up completion: {} secs", getWarmUpEstimatedCompletionTime()); } @Override public String toString() { return "FixedRateTestProfile{" + "rate=" + rate + ", parallelCount=" + parallelCount + ", maximumLatency=" + maximumLatency + ", duration=" + duration + ", messageSize='" + messageSize + '\'' + "} " + super.toString(); } }
[ "opiske@redhat.com" ]
opiske@redhat.com
4b174fb53c022d01ef74ff8312c425ce105b9555
1924afaf1909a7b91c3500591764c22392ec10b3
/app/src/main/java/com/kinder/check/viewsxml/Check_BabyLeaveXml.java
0f828e0c2e2a68d96f5b5f38a80a6f5e40e4e147
[]
no_license
guoyang123/kindergarten
5608c85dfa5deb93d00d7ed9ef59391d0f0cc95d
c179b237bb39422ba7c0c98e96ce6fb44c7e96a7
refs/heads/master
2021-07-15T22:52:44.305282
2016-11-11T00:19:00
2016-11-11T00:19:00
54,606,031
0
0
null
null
null
null
UTF-8
Java
false
false
2,255
java
package com.kinder.check.viewsxml; import android.content.Context; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.widget.RelativeLayout; import android.widget.TextView; import cn.com.iucd.iucdframe.utils.DensityUtil; import com.kinder.check.customviews.Check_LeaveSexXmlView; import com.myt360.app.customviews.CircularImage; import com.myt360.app.customviews.MyRelativeLayout; public class Check_BabyLeaveXml extends MyRelativeLayout { public CircularImage baby_CircularImage; public TextView name_TextView; public Check_LeaveSexXmlView sexView; public TextView leave_TextView; public TextView desc_TextView; public Check_BabyLeaveXml(Context context, float pro, float screenW, float screenH) { super(context, pro, screenW, screenH); // TODO Auto-generated constructor stub baby_CircularImage=productCircularImage(context, pro, 3601, 60, 60, 0, 0, 0, 0, CENTER_VERTICAL, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, this); baby_CircularImage.setImageResource(R.getRCode("drawable", "user_default")); name_TextView=productTextView(context, pro, 3602, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0, baby_CircularImage.getId(), 0, 0, 0, 0, 0, 8, 13, 0, 0, "", 12, "#3c3c3c", this); sexView=new Check_LeaveSexXmlView(context,pro,screenW,screenH); sexView.setId(3603); LayoutParams sexView_param=new LayoutParams (LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT); sexView_param.addRule(RelativeLayout.RIGHT_OF,name_TextView.getId()); sexView_param.setMargins((int)(DensityUtil.dip2px(context,20) * pro), (int)(DensityUtil.dip2px(context,12) * pro), 0, 0); sexView.setLayoutParams(sexView_param); this.addView(sexView); leave_TextView=productTextView(context, pro, 3604, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0, baby_CircularImage.getId(), 0, 0, CENTER_VERTICAL, CENTER_HORIZONTAL, CENTER_IN_PARENT, 8, 8, 0, 0, "", 12, "#6ccfa9", this); desc_TextView=productTextView(context, pro, 3605, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0, baby_CircularImage.getId(), 0, leave_TextView.getId(), 0, 0, 0, 8, 10, 0, 0, "", 12, "#797979", this); } }
[ "3137772593@qq.com" ]
3137772593@qq.com
f231e8c380d11f547aa325738fe59d75e8b253a1
393f20e27f5f357ec660c2784fc5c4d79fbdd00d
/app/src/main/java/com/biaoyuan/transfer/adapter/MineBalanceDetailedAdapter.java
c1a3ea81becbfe4d1c188c53c73b76fb66b57e4a
[]
no_license
enmaoFu/qmcs_user
968236a4346df9eda7bc2d112f64e4a528dc3549
e9dcbda0d6021c543428f5e7ebc0b6053f50dfb2
refs/heads/master
2021-09-05T11:52:16.267985
2018-01-27T03:51:57
2018-01-27T03:51:58
119,129,953
0
0
null
null
null
null
UTF-8
Java
false
false
2,772
java
package com.biaoyuan.transfer.adapter; import android.graphics.Color; import com.and.yzy.frame.adapter.recyclerview.BaseQuickAdapter; import com.and.yzy.frame.adapter.recyclerview.BaseViewHolder; import com.and.yzy.frame.util.DateTool; import com.biaoyuan.transfer.R; import com.biaoyuan.transfer.domain.MineBalanceDetailedInfo; import com.biaoyuan.transfer.util.MyNumberFormat; import java.util.List; /** * Created by Administrator on 2017/4/27. */ public class MineBalanceDetailedAdapter extends BaseQuickAdapter<MineBalanceDetailedInfo,BaseViewHolder> { private final int EXPENDITURE = 1; private final int RECHARGE = 2; private final int REFUND = 3; private final int PAYMNET = 4; private final int PROFIT = 5; private final int DEDUCT = 6; private final int WITHDRAWALS = 7; public MineBalanceDetailedAdapter(int layoutResId, List<MineBalanceDetailedInfo> data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, MineBalanceDetailedInfo item, int position) { helper.setTextViewText(R.id.balanceOperationTime,DateTool.timesToStrTime(item.getBalanceOperationTime() + "", "yyyy-MM-dd HH:mm")); helper.setTextViewText(R.id.balanceOperationAfter,"余额¥" + MyNumberFormat.m2(Double.parseDouble(String.valueOf(item.getBalanceOperationAfter())))); helper.setTextViewText(R.id.balanceAmount,"¥" + MyNumberFormat.m2(item.getBalanceAmount())); //交易类型。1订单支出、2充值、3退款、4赔付5传送收益6扣手续费退款7提现 switch (item.getBalanceTansactionType()){ case EXPENDITURE: helper.setTextViewText(R.id.balanceTansactionType,"订单支出"); break; case RECHARGE: helper.setTextViewText(R.id.balanceTansactionType,"充值"); break; case REFUND: helper.setTextViewText(R.id.balanceTansactionType,"退款"); break; case PAYMNET: helper.setTextViewText(R.id.balanceTansactionType,"赔付"); break; case PROFIT: helper.setTextViewText(R.id.balanceTansactionType,"传送收益"); break; case DEDUCT: helper.setTextViewText(R.id.balanceTansactionType,"扣手续费退款"); break; case WITHDRAWALS: helper.setTextViewText(R.id.balanceTansactionType,"提现"); break; } if (position % 2 == 0) { helper.setBackgroundColor(R.id.item, Color.parseColor("#F1F1F3")); } else { helper.setBackgroundColor(R.id.item, Color.parseColor("#ffffff")); } } }
[ "fuenmao@126.com" ]
fuenmao@126.com
7fe19c6c360b0556c6acd16b825039a44e433103
542efb2d447273d5142ef92129bbbdd9914344a2
/onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ServiceInfo.java
574185f891cfcb91c343aa7a88e984356affd3a0
[ "MIT" ]
permissive
spudi/onedrive-sdk-android
d8c58640345a7f7e6e35efc6e1c68384c93e21df
1553371690e52d9b4ff9c9ee0b89c44879b43711
refs/heads/master
2021-04-27T00:22:41.735684
2018-03-05T14:32:55
2018-03-05T14:32:55
123,801,688
0
0
MIT
2018-03-04T15:25:44
2018-03-04T15:25:44
null
UTF-8
Java
false
false
1,715
java
// ------------------------------------------------------------------------------ // Copyright (c) 2015 Microsoft Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // ------------------------------------------------------------------------------ package com.onedrive.sdk.authentication; import com.google.gson.annotations.SerializedName; public class ServiceInfo { @SerializedName("capability") public String capability; @SerializedName("serviceApiVersion") public String serviceApiVersion; @SerializedName("serviceEndpointUri") public String serviceEndpointUri; @SerializedName("serviceResourceId") public String serviceResourceId; }
[ "pnied@microsoft.com" ]
pnied@microsoft.com
0b2e789caf3e98c8fc03bbd20594df06f7c38ed9
394691878859fbbe231f32635ef101a52862b166
/WA140 - Object Oriented Programming with Java/WA140_data_files/Chapter14/CodeInFigures/CheckBoxDemonstration.java
777dbafd63b5e2c4d3a3ed9d3610024c4f106626
[]
no_license
janesferr/WADD-Courses
6969babd452374482bf2779651bec38a8fba25bd
a955c48d3c7209ed61c08f2e950da1967d730c1d
refs/heads/master
2021-10-22T20:37:16.836119
2019-03-12T20:28:38
2019-03-12T20:28:38
175,291,381
3
0
null
null
null
null
UTF-8
Java
false
false
1,323
java
import java.awt.*; import javax.swing.*; import java.awt.event.*; public class CheckBoxDemonstration extends JFrame implements ItemListener { FlowLayout flow = new FlowLayout(); JLabel label = new JLabel("What would you like to drink?"); JCheckBox coffee = new JCheckBox("Coffee", false); JCheckBox cola = new JCheckBox("Cola", false); JCheckBox milk = new JCheckBox("Milk", false); JCheckBox water = new JCheckBox("Water", false); public CheckBoxDemonstration() { super("CheckBox Demonstration"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLayout(new FlowLayout()); label.setFont(new Font("Arial", Font.ITALIC, 22)); coffee.addItemListener(this); cola.addItemListener(this); milk.addItemListener(this); water.addItemListener(this); add(label); add(coffee); add(cola); add(milk); add(water); } public void itemStateChanged(ItemEvent check) { // Actions based on choice go here } public static void main(String[] arguments) { final int FRAME_WIDTH = 350; final int FRAME_HEIGHT = 120; CheckBoxDemonstration frame = new CheckBoxDemonstration(); frame.setSize(FRAME_WIDTH, FRAME_HEIGHT); frame.setVisible(true); } }
[ "janesferrazza@MacBook-Pro.fios-router.home" ]
janesferrazza@MacBook-Pro.fios-router.home
b6927d0ca316664becb7f06cd7c53676b85450e7
be0e8535222b601c277a9d29f234e7fa44e13258
/output/com/ankamagames/dofus/network/messages/game/friend/FriendJoinRequestMessage.java
e650c56db68efae359f5634b3529c7966abdfa64
[]
no_license
BotanAtomic/ProtocolBuilder
df303b741c701a17b0c61ddbf5253d1bb8e11684
ebb594e3da3adfad0c3f036e064395a037d6d337
refs/heads/master
2021-06-21T00:55:40.479271
2017-08-14T23:59:09
2017-08-14T23:59:24
100,318,625
1
2
null
null
null
null
UTF-8
Java
false
false
825
java
package com.ankamagames.dofus.network.messages.game.friend; import com.ankamagames.jerakine.network.NetworkMessage; import com.ankamagames.jerakine.network.INetworkMessage; import com.ankamagames.jerakine.network.ICustomDataOutput; import flash.utils.ByteArray; import com.ankamagames.jerakine.network.CustomDataWrapper; import com.ankamagames.jerakine.network.ICustomDataInput; import com.ankamagames.jerakine.network.utils.FuncTree; public class FriendJoinRequestMessage extends NetworkMessage implements INetworkMessage { private boolean _isInitialized = false; public String name = ""; public static final int protocolId = 5605; public void serialize(ICustomDataOutput param1) { param1.writeUTF(this.name); } public void deserialize(ICustomDataInput param1) { this.name = param1.readUTF(); } }
[ "ahmed.botan94@gmail.com" ]
ahmed.botan94@gmail.com
cef26ccbe0e36aa2f5233c5ba339ca3722b50bb7
f68666f4585b1c002aa20bbbb18b9b0164e37b0e
/spring/src/main/java/com/example/spring/basic01/Receiver.java
8a62d2ac72b417f474cbfb598d3e3c51b8151b68
[]
no_license
inayun/web_study
7a54394a926abb944cc357d98f2d2a894fa274ba
85189f7e2071851b5b898306568bd027f5115bf7
refs/heads/master
2021-09-11T23:49:53.438000
2018-04-13T09:05:32
2018-04-13T09:05:32
114,833,364
1
0
null
null
null
null
UTF-8
Java
false
false
800
java
package com.example.spring.basic01; public class Receiver { private int sendTime; private Sender sender; private String message; public Receiver() { } public Receiver(String period) { this.sendTime = Integer.parseInt(period); this.message = "String Type : " + period; } public Receiver(int period) { this(period, null); this.message = "Integer Type : " + period; } public Receiver(int period, Sender sender) { this.sendTime = period; this.sender = sender; } public int getSendTime() { return sendTime; } public void setSendTime(int time) { this.sendTime = time; } public Sender getSender() { return sender; } //@Required public void setSender(Sender sender) { this.sender = sender; } public String getMessage() { return message; } }
[ "ina-yun@hanmail.net" ]
ina-yun@hanmail.net
433788a433e528921cf9fd2ae6a07c2f76c0bf38
fc13020970611adf2405823ffe415311d5c7abe4
/bitcamp-project-server/v-backup/v50_1/src/main/java/com/eomcs/lms/AppConfig.java
b1031e9f846ebfbdd951c1b81dc88e3e29786ea5
[]
no_license
sun-kyung/bitcamp-study
e6ab6d829226a2e7468d6846f3b6729999521fbb
722733cba54abaa9a6aa77f571ffaebec0c2ba02
refs/heads/master
2020-09-23T12:37:15.319780
2020-04-20T09:28:26
2020-04-20T09:28:26
225,501,852
0
0
null
null
null
null
UTF-8
Java
false
false
3,241
java
package com.eomcs.lms; import java.io.InputStream; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import com.eomcs.lms.dao.BoardDao; import com.eomcs.lms.dao.LessonDao; import com.eomcs.lms.dao.MemberDao; import com.eomcs.lms.dao.PhotoBoardDao; import com.eomcs.lms.dao.PhotoFileDao; import com.eomcs.sql.MybatisDaoFactory; import com.eomcs.sql.PlatformTransactionManager; import com.eomcs.sql.SqlSessionFactoryProxy; // Spring IoC 컨테이너가 탐색할 패키지 설정 // => 지정한 패키지 및 그 하위패키지를 모두 뒤져서 // @Component애노테이션이 붙은 클래스를 찾아 객체를 생성한다 @ComponentScan(value = "com.eomcs.lms") public class AppConfig { public AppConfig() throws Exception { } // Spring IoC 컨테이너에 수동으로 객체를 등록하고 싶다면 // 수동으로 등록할 객체를 리턴하는 팩토리 메서드를 만든다 // => 단 메서드 선언부에 @Bean 애노테이션을 붙여야 한다 // => 그래야만 Spring IoC 컨테이너는 이 메서드를 호출하고 그 리턴 값을 보관한다 @Bean public SqlSessionFactory sqlSessionFactory() throws Exception { // Mybatis 설정 파일을 로딩할 때 사용할 입력 스트림 준비 InputStream inputStream = Resources.getResourceAsStream(// "com/eomcs/lms/conf/mybatis-config.xml"); // 트랜잭션 제어를 위해 오리지널 객체를 프록시 객체에 담아 사용한다. return new SqlSessionFactoryProxy(// new SqlSessionFactoryBuilder().build(inputStream)); } @Bean // 이 메서드를 호출할 때 Spring IoC 컨테이너에 들어있는 객체를 원한다면 // 이렇게 파라미터로 선언하라 // 그러면 Spring IoC컨테이너가 이 팩토리메서드를 호출하기 전에 // SqlSessionFactory를 먼저 준비한 다음에 이 메서드를 실행할 것이다 public MybatisDaoFactory daoFactory(SqlSessionFactory sqlSessionFactory) { // DAO 프록시 객체를 생성해 줄 Factory를 준비 return new MybatisDaoFactory(sqlSessionFactory); } @Bean // 필요한 값이 있다면 파라미터로 선언만 하라 // 단 IoC 컨테이너에 들어있는 값이어야 한다 public PlatformTransactionManager transactionMaanger(SqlSessionFactory sqlSessionFactory) { return new PlatformTransactionManager(sqlSessionFactory); } @Bean public BoardDao boardDao(MybatisDaoFactory daoFactory) { return daoFactory.createDao(BoardDao.class); } @Bean public LessonDao lessonDao(MybatisDaoFactory daoFactory) { return daoFactory.createDao(LessonDao.class); } @Bean public MemberDao memberDao(MybatisDaoFactory daoFactory) { return daoFactory.createDao(MemberDao.class); } @Bean public PhotoBoardDao photoBoardDao(MybatisDaoFactory daoFactory) { return daoFactory.createDao(PhotoBoardDao.class); } @Bean public PhotoFileDao photoFileDao(MybatisDaoFactory daoFactory) { return daoFactory.createDao(PhotoFileDao.class); } }
[ "esun1801@naver.com" ]
esun1801@naver.com
68a4f142d2998e219bed97efdae17c2c24ffa571
a7497fae8dd751b07abe1c61dbb09d52f47f3d76
/org.isistan.flabot.launcher/src/org/isistan/flabot/launcher/trace/MetadataHandler.java
7703f30dcab72f73144cb4faaf96880838cc06c1
[]
no_license
niconistal/FLABot
639388ec36e514cb6f8c63caa01530bff2e1fcbd
a118b9fd20c3ee44b6d2b456b3f7b362ce92327a
refs/heads/master
2021-03-12T19:52:59.571266
2013-01-29T01:46:46
2013-01-29T01:46:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,660
java
/** * $Id: MetadataHandler.java,v 1.7 2006/02/22 00:48:51 mblech Exp $ * $Author: mblech $ */ package org.isistan.flabot.launcher.trace; import java.util.HashSet; import org.isistan.flabot.javamodel.JArray; import org.isistan.flabot.javamodel.JBehavior; import org.isistan.flabot.javamodel.JClass; import org.isistan.flabot.javamodel.JConstructor; import org.isistan.flabot.javamodel.JField; import org.isistan.flabot.javamodel.JMember; import org.isistan.flabot.javamodel.JMethod; import org.isistan.flabot.javamodel.JObject; import org.isistan.flabot.javamodel.JavaModelObjectHashProvider; import org.isistan.flabot.trace.log.LogFactory; import org.isistan.flabot.trace.log.Tag; import org.isistan.flabot.trace.log.tagquery.TagQueryUtil.MetadataConstants; import org.isistan.flabot.util.custommap.CustomMap; /** * Creates tags representing the java metamodel * @author dacostae * */ public class MetadataHandler { private Tag metadata; public MetadataHandler(Tag metadata) { this.metadata=metadata; } private CustomMap<JObject, Tag> fastTags=new CustomMap<JObject, Tag>(new JavaModelObjectHashProvider<JObject>()); private Tag getTagFor(JObject object) { return fastTags.get(object); } private void setTagFor(JObject object, Tag tag) { fastTags.put(object, tag); } private HashSet<Tag> completedClasses=new HashSet<Tag>(); private boolean isComplete(Tag classTag) { return completedClasses.contains(classTag); } private void setComplete(Tag classTag) { completedClasses.add(classTag); } public synchronized Tag getClass(JClass clazz) { Tag classTag=getTagFor(clazz); if(classTag==null) { String key=clazz.getName() + "@" + clazz.getId(); classTag=createClass(clazz, key); completeClass(clazz, classTag); } else if(!isComplete(classTag)) { completeClass(clazz, classTag); } return classTag; } public synchronized Tag getClassLight(JClass clazz) { Tag classTag=getTagFor(clazz); if(classTag==null) { String key=clazz.getName() + "@" + clazz.getId(); classTag=createClass(clazz, key); } return classTag; } private Tag createClass(JClass clazz, String key) { Tag classTag=LogFactory.eINSTANCE.createTag(); classTag.setProperty(MetadataConstants.COMPLETE_PARAMETER, Boolean.FALSE.toString()); classTag.setParent(key, metadata); setTagFor(clazz, classTag); classTag.setProperty(MetadataConstants.NAME_PARAMETER, clazz.getName()); classTag.setProperty(MetadataConstants.MODIFIERS_PARAMETER, Integer.toString(clazz.getModifiers())); classTag.setProperty(MetadataConstants.ARRAY_PARAMETER, Boolean.toString(clazz.isArray())); classTag.setProperty(MetadataConstants.PRIMITIVE_PARAMETER, Boolean.toString(clazz.isPrimitive())); if(clazz.isPrimitive()) { completeClass(clazz, classTag); } return classTag; } private void completeClass(JClass clazz, Tag classTag) { setComplete(classTag); classTag.setProperty(MetadataConstants.COMPLETE_PARAMETER, Boolean.TRUE.toString()); JClass enclosingClass=clazz.getEnclosingClass(); if(enclosingClass!=null) { classTag.getTags().put(MetadataConstants.ENCLOSING_CLASS_TAG, getClassLight(enclosingClass)); } JClass componentType=clazz.getComponentType(); if(componentType!=null) { classTag.getTags().put(MetadataConstants.COMPONENT_TYPE_TAG, getClassLight(componentType)); } JClass superclass=clazz.getSuperclass(); if(superclass!=null) { classTag.getTags().put(MetadataConstants.SUPERCLASS_TAG, getClassLight(superclass)); } createSuperinterfaces(clazz.getInterfaces(), classTag); createInnerClasses(clazz.getDeclaredClasses(), classTag); createConstructors(clazz.getDeclaredConstructors(), classTag); createFields(clazz.getDeclaredFields(), classTag); createMethods(clazz.getDeclaredMethods(), classTag); } private void createSuperinterfaces(JArray<? extends JClass> interfaces, Tag classTag) { Tag interfacesTag=TagUtil.getCollection(classTag, MetadataConstants.SUPERINTERFACES_TAG, true, true); for (JClass hinterface : interfaces) { Tag interfaceTag=getClassLight(hinterface); TagUtil.addToCollection(interfacesTag, interfaceTag, false); } } private void createMethods(JArray<? extends JMethod> methods, Tag classTag) { Tag methodsTag=TagUtil.getCollection(classTag, MetadataConstants.METHODS_TAG, true, true); for (JMethod method : methods) { Tag methodTag=createMethod(method, classTag); TagUtil.addToCollection(methodsTag, methodTag, true); setTagFor(method, methodTag); } } private Tag createBehavior(JBehavior behavior, Tag classTag) { Tag behaviorTag=LogFactory.eINSTANCE.createTag(); behaviorTag.setProperty(MetadataConstants.NAME_PARAMETER, behavior.getName()); behaviorTag.setProperty(MetadataConstants.MODIFIERS_PARAMETER, Integer.toString(behavior.getModifiers())); behaviorTag.getTags().put(MetadataConstants.DECLARING_CLASS_TAG, classTag); Tag exceptionTypesTag=TagUtil.getCollection(behaviorTag, MetadataConstants.EXCEPTION_TYPES_TAG, true, true); for (JClass exceptionType: behavior.getExceptionTypes()) { Tag exceptionTypeTag=getClassLight(exceptionType); TagUtil.addToCollection(exceptionTypesTag, exceptionTypeTag, false); } Tag parameterTypesTag=TagUtil.getCollection(behaviorTag, MetadataConstants.PARAMETER_TYPES_TAG, true, true); for (JClass parameterType: behavior.getParameterTypes()) { Tag parameterTypeTag=getClassLight(parameterType); TagUtil.addToCollection(parameterTypesTag, parameterTypeTag, false); } return behaviorTag; } private Tag createMethod(JMethod method, Tag classTag) { Tag methodTag=createBehavior(method, classTag); Tag returnType=getClassLight(method.getType()); methodTag.getTags().put(MetadataConstants.TYPE_TAG, returnType); return methodTag; } private void createConstructors(JArray<? extends JConstructor> constructors, Tag classTag) { Tag constructorsTag=TagUtil.getCollection(classTag, MetadataConstants.CONSTRUCTORS_TAG, true, true); for (JConstructor constructor : constructors) { Tag constructorTag=createConstructor(constructor, classTag); TagUtil.addToCollection(constructorsTag, constructorTag, true); setTagFor(constructor, constructorTag); } } private Tag createConstructor(JConstructor constructor, Tag classTag) { return createBehavior(constructor, classTag); } private void createInnerClasses(JArray<? extends JClass> innerClasses, Tag classTag) { Tag innerClassesTag=TagUtil.getCollection(classTag, MetadataConstants.INNER_CLASSES_TAG, true, true); for (JClass innerClass : innerClasses) { Tag innerClassTag=getClass(innerClass); TagUtil.addToCollection(innerClassesTag, innerClassTag, false); } } private void createFields(JArray<? extends JField> fields, Tag classTag) { Tag fieldsTag=TagUtil.getCollection(classTag, MetadataConstants.FIELDS_TAG, true, true); for (JField field : fields) { Tag fieldTag=createField(field, classTag); TagUtil.addToCollection(fieldsTag, fieldTag, true); setTagFor(field, fieldTag); } } private Tag createField(JField field, Tag classTag) { Tag fieldTag=LogFactory.eINSTANCE.createTag(); fieldTag.setProperty(MetadataConstants.NAME_PARAMETER, field.getName()); fieldTag.setProperty(MetadataConstants.MODIFIERS_PARAMETER, Integer.toString(field.getModifiers())); fieldTag.getTags().put(MetadataConstants.DECLARING_CLASS_TAG, classTag); Tag type=getClassLight(field.getType()); fieldTag.getTags().put(MetadataConstants.TYPE_TAG, type); return fieldTag; } public synchronized Tag getMember(JMember member) { getClass(member.getDeclaringClass()); return getTagFor(member); } }
[ "nistal.nicolas@gmail.com" ]
nistal.nicolas@gmail.com
7879ab0dca8d842bb5ee0198f46e217424190762
15cf8a940a99b1335250bff9f221cc08d5df9f0f
/src/com/google/gson/JsonElement.java
6b44a6819f05111d7e80801917fba929552fe96b
[]
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
3,622
java
package com.google.gson; import com.google.gson.internal.Streams; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.math.BigDecimal; import java.math.BigInteger; public abstract class JsonElement { abstract JsonElement deepCopy(); public BigDecimal getAsBigDecimal() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public BigInteger getAsBigInteger() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public boolean getAsBoolean() { throw new UnsupportedOperationException(getClass().getSimpleName()); } Boolean getAsBooleanWrapper() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public byte getAsByte() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public char getAsCharacter() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public double getAsDouble() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public float getAsFloat() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public int getAsInt() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public JsonArray getAsJsonArray() { if (isJsonArray()) { return (JsonArray)this; } throw new IllegalStateException("This is not a JSON Array."); } public JsonNull getAsJsonNull() { if (isJsonNull()) { return (JsonNull)this; } throw new IllegalStateException("This is not a JSON Null."); } public JsonObject getAsJsonObject() { if (isJsonObject()) { return (JsonObject)this; } throw new IllegalStateException("Not a JSON Object: " + this); } public JsonPrimitive getAsJsonPrimitive() { if (isJsonPrimitive()) { return (JsonPrimitive)this; } throw new IllegalStateException("This is not a JSON Primitive."); } public long getAsLong() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public Number getAsNumber() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public short getAsShort() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public String getAsString() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public boolean isJsonArray() { return this instanceof JsonArray; } public boolean isJsonNull() { return this instanceof JsonNull; } public boolean isJsonObject() { return this instanceof JsonObject; } public boolean isJsonPrimitive() { return this instanceof JsonPrimitive; } public String toString() { try { Object localObject = new java/io/StringWriter; ((StringWriter)localObject).<init>(); JsonWriter localJsonWriter = new com/google/gson/stream/JsonWriter; localJsonWriter.<init>((Writer)localObject); localJsonWriter.setLenient(true); Streams.write(this, localJsonWriter); localObject = ((StringWriter)localObject).toString(); return (String)localObject; } catch (IOException localIOException) { throw new AssertionError(localIOException); } } } /* Location: C:\tools\androidhack\marvel_bitva_chempionov_v11.1.0_mod_lenov.ru\classes.jar!\com\google\gson\JsonElement.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "eduard.martini@gmail.com" ]
eduard.martini@gmail.com
5770e76343222474290e4faf32a605474d248664
13015c0f9fce7bed3d3a0e5620c6c8422096722b
/src/main/java/mb/resource/hierarchical/match/path/PathMatcher.java
84f9d991ff9bed4bf2c374f1a5fd3a5f2799edd0
[ "Apache-2.0" ]
permissive
AZWN/resource
e6067ba18a9b7dd584355637c4bdd44d0ce7e689
33183562f9c5ba1ddb57bdf96b501f9e19e32d53
refs/heads/master
2022-11-12T00:59:37.645042
2020-06-09T14:00:06
2020-06-09T14:00:06
275,124,180
0
0
Apache-2.0
2020-06-26T09:55:31
2020-06-26T09:55:30
null
UTF-8
Java
false
false
270
java
package mb.resource.hierarchical.match.path; import mb.resource.hierarchical.ResourcePath; import java.io.Serializable; @FunctionalInterface public interface PathMatcher extends Serializable { boolean matches(ResourcePath path, ResourcePath rootDirectoryPath); }
[ "gabrielkonat@gmail.com" ]
gabrielkonat@gmail.com
f2caa8fc3dfdfb3fdeec75370a34cbab15536f44
56ff4efd9b5dd55d1578269793082c2a4ba34bc7
/3_jsp/2_class/p0624_1/src/polymorphism/TVContainer.java
45e4026c903bf288e529ebd3a7c13960d62c0ca7
[]
no_license
10soos17/lecture_choongang
8274389e7a573bb0e568ee3b905691dd3dc639c3
f00a57965e4bc7755ca6115ac5be5b111ac58b31
refs/heads/master
2023-08-04T08:00:09.528129
2021-07-24T02:14:06
2021-07-24T02:14:06
355,406,674
0
0
null
null
null
null
UTF-8
Java
false
false
367
java
package polymorphism; import java.util.HashMap; public class TVContainer { private HashMap<String, TV> map = new HashMap<>(); public TVContainer() { map.put("삼성", new SamsungTV()); map.put("엘지", new LgTV()); map.put("SK", new SkTV()); map.put("MY", new MyTV()); } public TV getTV(String tvName) { TV tv = map.get(tvName); return tv; } }
[ "shinsh1017@gmail.com" ]
shinsh1017@gmail.com
ecdd9d3143e7139d62cd5ad5a5ec7a60f9506bb0
447520f40e82a060368a0802a391697bc00be96f
/apks/playstore_apps/com_ubercab/source/apm.java
5decc6ea87df0ae461dca901eec3882ed4f9eece
[ "GPL-1.0-or-later", "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
2,326
java
import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; public class apm extends ValueAnimator { private boolean a = false; private float b; private float c = 1.0F; private float d = 0.0F; private float e = 0.0F; private float f = 1.0F; public apm() { setInterpolator(null); addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { public void onAnimationUpdate(ValueAnimator paramAnonymousValueAnimator) { if (!apm.a(apm.this)) { apm.a(apm.this, ((Float)paramAnonymousValueAnimator.getAnimatedValue()).floatValue()); } } }); h(); } private boolean g() { return this.c < 0.0F; } private void h() { setDuration((this.b * (this.f - this.e) / Math.abs(this.c))); float f1; if (this.c < 0.0F) { f1 = this.f; } else { f1 = this.e; } float f2; if (this.c < 0.0F) { f2 = this.e; } else { f2 = this.f; } setFloatValues(new float[] { f1, f2 }); b(this.d); } public void a() { this.a = true; } public void a(float paramFloat) { this.b = paramFloat; h(); } public void a(float paramFloat1, float paramFloat2) { this.e = paramFloat1; this.f = paramFloat2; h(); } public float b() { return this.d; } public void b(float paramFloat) { paramFloat = apo.b(paramFloat, this.e, this.f); this.d = paramFloat; if (g()) { paramFloat = this.f - paramFloat; } else { paramFloat -= this.e; } paramFloat /= Math.abs(this.f - this.e); if (getDuration() > 0L) { setCurrentPlayTime(Math.round((float)getDuration() * paramFloat)); } } public void c() { start(); float f1; if (g()) { f1 = this.f; } else { f1 = this.e; } b(f1); } public void d() { end(); } public void e() { float f1 = this.d; cancel(); b(f1); } public void f() { float f2 = this.d; float f1; if ((g()) && (this.d == this.e)) { f1 = this.f; } else { f1 = f2; if (!g()) { f1 = f2; if (this.d == this.f) { f1 = this.e; } } } start(); b(f1); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
a6e0a2d3b9e0098777b5aec20d2efc2d19085344
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-44-27-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/plugin/webdav/XWikiDavFilter_ESTest.java
ba6a229d40a1b882a8eb798964d1acc3fc2ee123
[]
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
562
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 23:41:37 UTC 2020 */ package com.xpn.xwiki.plugin.webdav; 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 XWikiDavFilter_ESTest extends XWikiDavFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
802dce38c37137ba7e6c3b2bc9a156fc9971480a
5d5561be1120bfe9311877353e1121ca3ccaa5d6
/home/java_20180717/src/chaper02/Ex08_ChekValueBeforeCasting.java
43764324f1d905960dc2d7e50f76ed93b286a59b
[]
no_license
eldrk/java-programming-class
b88cc06bb62f4b9c816f81e5e9047f180a643fa5
a1d22161cf250e89468a0d5303700d9babbd5e1e
refs/heads/master
2020-04-09T11:09:33.733982
2018-12-04T04:58:33
2018-12-04T04:58:33
160,297,474
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
package chaper02; import java.util.Scanner; public class Ex08_ChekValueBeforeCasting { public static void main(String[] args) { System.out.print("정수를 입력하세요 : "); Scanner sc = new Scanner(System.in); int i = sc.nextInt(); if((i<Byte.MIN_VALUE) || (i>Byte.MAX_VALUE)){ System.out.println("byte 타입으로 변환할 수 없습니다"); System.out.println("값을 다시 확인해주세요"); }else { byte b = (byte)i; System.out.println(b); } } }
[ "ubjaeeun@daum.net" ]
ubjaeeun@daum.net
ceffe454ea7989bfcc17f19d2c5ec2e88740208b
4aea727c731a9cdf3598a907ccf58dff33e66349
/ArrangeProduce/src/main/java/cn/edu/jxust/arrangeproduce/service/impl/AccountServiceImpl.java
a2abc2a75b94269646d544740d180f3dd8d07dbd
[]
no_license
zou-jing/ArrangeProduce
d2e7d984079f0ecfb7345ad0a3dd05fa7eeddc3f
fe7cc424e4b2e0da2e6919dd6c71b8ebdf002624
refs/heads/master
2020-09-26T15:58:13.366592
2019-12-06T08:56:16
2019-12-06T08:56:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,798
java
package cn.edu.jxust.arrangeproduce.service.impl; import cn.edu.jxust.arrangeproduce.common.ServerResponse; import cn.edu.jxust.arrangeproduce.entity.po.Account; import cn.edu.jxust.arrangeproduce.repository.AccountRepository; import cn.edu.jxust.arrangeproduce.service.AccountService; import cn.edu.jxust.arrangeproduce.util.DateUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * @author ZSS * @date 2019/12/3 11:30 * @description Account 服务层实现方法 */ @Slf4j @Service public class AccountServiceImpl implements AccountService { private final AccountRepository accountRepository; @Autowired public AccountServiceImpl(AccountRepository accountRepository) { this.accountRepository = accountRepository; } @Override public ServerResponse createAccount(Account account) { Account save = accountRepository.save(account); if (save == null) { return ServerResponse.createByError(); } else { return ServerResponse.createBySuccess(); } } @Override public ServerResponse<String> login(String username, String password) { Account account = accountRepository.findByAccountNameAndPassword(username, password).orElse(null); if (account != null) { log.info("{} tried to login success when : {}", username, DateUtil.getDateComplete()); return ServerResponse.createBySuccess("登录成功", account.getAccountId()); } else { log.info("{} tried to login but failed at : {}", username, DateUtil.getDateComplete()); return ServerResponse.createByErrorMessage("登录失败, 用户名或密码错误"); } } }
[ "1271130458@qq.com" ]
1271130458@qq.com
667f1432e676928afca1f356384348c050d43e72
15aff3446c957fc934c98dc84a0668a2025f28c1
/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/DigitalArchitectureEventListener.java
19387b68324aa6702ae7946cb94b273399328a6f
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
ilovechai/egeria
0865773e6deaf35991ab23a649e91f4715dc749c
c7cd3dd4bb6c960f6b81ecd71394af48cc16a23b
refs/heads/main
2023-03-15T18:15:16.154074
2023-03-03T13:10:41
2023-03-03T13:10:41
610,375,922
1
0
Apache-2.0
2023-03-06T20:57:45
2023-03-06T16:42:28
null
UTF-8
Java
false
false
760
java
/* SPDX-License-Identifier: Apache 2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.api; import org.odpi.openmetadata.accessservices.digitalarchitecture.events.DigitalArchitectureOutTopicEvent; /** * DigitalArchitectureEventListener is the interface that a client implements to * register to receive the events from the Digital Architecture OMAS. */ public abstract class DigitalArchitectureEventListener { /** * Process an event that was published by the Digital Architecture OMAS. * * @param event event object - call getEventType to find out what type of event. */ public abstract void processEvent(DigitalArchitectureOutTopicEvent event); }
[ "mandy.e.chessell@gmail.com" ]
mandy.e.chessell@gmail.com
9c0e86249edc70a5bd4109c2ab462523acd089d6
20591524b55c1ce671fd325cbe41bd9958fc6bbd
/service-provider/src/main/java/com/rongdu/loans/cust/manager/ContactManager.java
1282590895c8b0e35a9dcd127898bb97f2fa2d8a
[]
no_license
ybak/loans-suniu
7659387eab42612fce7c0fa80181f2a2106db6e1
b8ab9bfa5ad8be38dc42c0e02b73179b11a491d5
refs/heads/master
2021-03-24T01:00:17.702884
2019-09-25T15:28:35
2019-09-25T15:28:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,236
java
package com.rongdu.loans.cust.manager; import com.rongdu.common.service.BaseManager; import com.rongdu.loans.cust.dao.ContactDAO; import com.rongdu.loans.cust.entity.Contact; import com.rongdu.loans.cust.vo.CustContactVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; /** * Created by zhangxiaolong on 2017/6/29. */ @Service("contactManager") public class ContactManager extends BaseManager<ContactDAO, Contact, String>{ @Autowired private ContactDAO contactDAO; /** * 单条插入联系人 * @param contact * @return */ public int insert(Contact contact) { return contactDAO.insert(contact); } /** * 根据用户id清理联系人 * @return */ public int delContact(String userId) { return contactDAO.delContact(userId); } /** * 获取当前紧急联系人表信息 * @param userId * @return */ public List<CustContactVO> getByUserId(String userId) { return contactDAO.getByUserId(userId); } /** * 统计 手机号近长时间 出现在他人紧急联系人中的次数 * @param map * @return */ public int countNum(Map map) { return contactDAO.countNum(map); } }
[ "tiramisuy18@163.com" ]
tiramisuy18@163.com
2dd81c6c7fe84ecac166f1ce4032aafb0bc9548c
9a70020d409332b7db0e2e5e087f500a0e58217c
/BOJ/15969/Main.java
4a83d328d0656b4bc2ff5fda434f041f1307775a
[ "MIT" ]
permissive
ISKU/Algorithm
daf5e9d5397eaf7dad2d6f7fb18c1c94d8f0246d
a51449e4757e07a9dcd1ff05f2ef4b53e25a9d2a
refs/heads/master
2021-06-22T09:42:45.033235
2021-02-01T12:45:28
2021-02-01T12:45:28
62,798,871
55
12
null
null
null
null
UTF-8
Java
false
false
481
java
/* * Author: Minho Kim (ISKU) * Date: August 23, 2018 * E-mail: minho.kim093@gmail.com * * https://github.com/ISKU/Algorithm * https://www.acmicpc.net/problem/15969 */ import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] array = new int[N]; for (int i = 0; i < N; i++) array[i] = sc.nextInt(); Arrays.sort(array); System.out.print(array[N - 1] - array[0]); } }
[ "minho.kim093@gmail.com" ]
minho.kim093@gmail.com
d8e23e7054b22bb01c83220e06f1cacf7ad6ef4b
d9428df69b42c6f14c52e71d78146910208c60f2
/license-service/src/main/java/dev/appkr/licenses/utils/UserContextFilter.java
a28e90d6afe9f144d6072b63bfa7430b571c07f4
[]
no_license
appkr/spmia-study
1e343b2b1ba9927922c0807dcdaaeb56658eddc3
a8e129631e96f1e5b3a88bee7a5372ab59cf2889
refs/heads/master
2021-05-23T02:07:29.415106
2020-05-07T14:20:57
2020-05-07T14:20:57
253,186,213
0
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
package dev.appkr.licenses.utils; import lombok.extern.slf4j.Slf4j; import org.slf4j.MDC; import org.springframework.stereotype.Component; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @Component @Slf4j public class UserContextFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; MDC.put(UserContext.TRACE_ID, httpRequest.getHeader(UserContext.TRACE_ID)); MDC.put(UserContext.USER_ID, httpRequest.getHeader(UserContext.USER_ID)); MDC.put(UserContext.AUTH_TOKEN, httpRequest.getHeader(UserContext.AUTH_TOKEN)); MDC.put(UserContext.ORG_ID, httpRequest.getHeader(UserContext.ORG_ID)); log.info("UserContextFilter traceId: {}", MDC.get(UserContext.TRACE_ID)); HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.addHeader(UserContext.TRACE_ID, MDC.get(UserContext.TRACE_ID)); chain.doFilter(httpRequest, httpResponse); } }
[ "juwonkim@me.com" ]
juwonkim@me.com
0a016e6f2b4407c87d64cfe4cedb57ab9aac3d3b
13200e547eec0d67ff9da9204c72ab26a93f393d
/src/com/google/android/apps/nexuslauncher/R$bool.java
2ac16541f1e2117a6727c492ea2cea2b1d9c9987
[]
no_license
emtee40/DecompiledPixelLauncher
d72d107eaafb42896aa903b9f0f34f5f09f5a15c
fb954b108a7bf3377da5c28fd9a2f22e1b6990ea
refs/heads/master
2020-04-03T03:18:06.239632
2018-01-19T08:49:36
2018-01-19T08:49:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
// // Decompiled by Procyon v0.5.30 // package com.google.android.apps.nexuslauncher; public final class R$bool { public static final int allow_rotation = 2131689477; public static final int config_largeHeap = 2131689474; public static final int enable_install_shortcut_api = 2131689473; public static final int hotseat_transpose_layout_with_orientation = 2131689478; public static final int is_large_tablet = 2131689476; public static final int is_tablet = 2131689475; public static final int notification_badging_enabled = 2131689472; }
[ "azaidi@live.nl" ]
azaidi@live.nl
3ad636b1987506164ff677963e4b51a4c2163134
20df8c2193eafd1da3a0725c7873358c36c6e471
/common/src/main/java/vn/tiki/appid/common/navigating/Navigating.java
e49daf114a2330721c2990c940ef29943e62898c
[ "Apache-2.0" ]
permissive
talenguyen/AppTemplate
87960c4303b1041fde6811bc864ee854f909b0eb
4d8ec6490779f2cc89543e911e3f02736e5e8da0
refs/heads/master
2020-07-04T08:41:49.393643
2017-01-13T02:13:38
2017-01-13T02:13:38
73,863,472
0
1
null
2017-01-03T07:44:28
2016-11-15T23:09:19
Java
UTF-8
Java
false
false
349
java
package vn.tiki.appid.common.navigating; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; /** * Created by Giang Nguyen on 10/8/16. */ public interface Navigating { @NonNull Intent homeActivityIntent(Context context); @NonNull Intent productListActivityIntent(Context context); }
[ "giangnguyen.tale@gmail.com" ]
giangnguyen.tale@gmail.com
dbb01a9c6606d3f89aba7ee75988ba63d5086c0f
5debba08fe46cfceb66fb0a57c7c8ce906214f88
/appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/properties/YoungAndroidSensorDistIntervalChoicePropertyEditor.java
ee7ae1b2364fef5856f612923f42b172a6d4f7cf
[ "Apache-2.0" ]
permissive
mit-cml/appinventor-extensions
0b45274697c48882de1abb816b72a15fbee8b9ff
e33b14041447cd47ca3d52dec6ef9bab068c51c8
refs/heads/master
2023-08-09T23:58:28.228407
2022-09-16T17:54:41
2022-09-16T17:54:41
100,065,339
80
105
Apache-2.0
2023-07-28T19:34:33
2017-08-11T19:46:44
Java
UTF-8
Java
false
false
1,171
java
// -*- mode: java; c-basic-offset: 2; -*- // Copyright 2009-2011 Google, All Rights reserved // Copyright 2011-2012 MIT, All rights reserved // Released under the Apache License, Version 2.0 // http://www.apache.org/licenses/LICENSE-2.0 package com.google.appinventor.client.editor.youngandroid.properties; import static com.google.appinventor.client.Ode.MESSAGES; import com.google.appinventor.client.widgets.properties.ChoicePropertyEditor; import com.google.appinventor.client.widgets.properties.ChoicePropertyEditor.Choice; /** * Property editor for sensor distance notification intervals * * @author abhagi@mit.edu (Anshul Bhagi) */ public class YoungAndroidSensorDistIntervalChoicePropertyEditor extends ChoicePropertyEditor { // sensor distance interval choices private static final Choice[] distIntervalChoices = new Choice[] { // To avoid confusion, we only show a subset of the available sensor // distance interval values. new Choice("0", "0"), new Choice("1", "1"), new Choice("10", "10"), new Choice("100", "100"), }; public YoungAndroidSensorDistIntervalChoicePropertyEditor() { super(distIntervalChoices); } }
[ "jis@mit.edu" ]
jis@mit.edu
af8e75b0e0d3269dcec3c850dff9be9b75b0f592
1b074ff0f0bd5eacbca4c3d96c186901c5f075ab
/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/web/server/ServerAuthorizationRequestRepository.java
ee180a8fafcc5b54a00d467a19eb02be711d0fea
[ "Apache-2.0" ]
permissive
selvinsource/spring-security
abb4f762d98967673f216c657dc6abebf3642d15
8dd2864dea3de5ea98637a1629debc89c29e76c0
refs/heads/master
2020-04-29T16:13:59.943047
2019-03-22T01:40:05
2019-03-23T00:30:56
176,251,873
10
12
Apache-2.0
2019-03-18T09:54:43
2019-03-18T09:54:40
null
UTF-8
Java
false
false
3,056
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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.security.oauth2.client.web.server; import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository; import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter; import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; /** * Implementations of this interface are responsible for the persistence * of {@link OAuth2AuthorizationRequest} between requests. * * <p> * Used by the {@link OAuth2AuthorizationRequestRedirectFilter} for persisting the Authorization Request * before it initiates the authorization code grant flow. * As well, used by the {@link OAuth2LoginAuthenticationFilter} for resolving * the associated Authorization Request when handling the callback of the Authorization Response. * * @author Rob Winch * @since 5.1 * @see OAuth2AuthorizationRequest * @see HttpSessionOAuth2AuthorizationRequestRepository * * @param <T> The type of OAuth 2.0 Authorization Request */ public interface ServerAuthorizationRequestRepository<T extends OAuth2AuthorizationRequest> { /** * Returns the {@link OAuth2AuthorizationRequest} associated to the provided {@code HttpServletRequest} * or {@code null} if not available. * * @param exchange the {@code ServerWebExchange} * @return the {@link OAuth2AuthorizationRequest} or {@code null} if not available */ Mono<T> loadAuthorizationRequest(ServerWebExchange exchange); /** * Persists the {@link OAuth2AuthorizationRequest} associating it to * the provided {@code HttpServletRequest} and/or {@code HttpServletResponse}. * * @param authorizationRequest the {@link OAuth2AuthorizationRequest} * @param exchange the {@code ServerWebExchange} */ Mono<Void> saveAuthorizationRequest(T authorizationRequest, ServerWebExchange exchange); /** * Removes and returns the {@link OAuth2AuthorizationRequest} associated to the * provided {@code HttpServletRequest} or if not available returns {@code null}. * * @param exchange the {@code ServerWebExchange} * @return the removed {@link OAuth2AuthorizationRequest} or {@code null} if not available */ Mono<T> removeAuthorizationRequest(ServerWebExchange exchange); }
[ "rwinch@users.noreply.github.com" ]
rwinch@users.noreply.github.com
a37253bc14044401befcbf56bbb66c10d322cb7c
d67dbb4814c58e186c21a6f849ceb2767ed79f71
/app/src/main/java/com/shaoyue/weizhegou/module/owner/fragment/WalletDetailsFragment.java
66e80457fb7f2089fff198b901b47f0021c70e70
[ "Apache-2.0" ]
permissive
coypanglei/nanjinJianduo
3234b04c18e5d5e36abfc111e3bde1704c47d2a1
b6ca49d6fa1182bbf61214338ab08aba63786e4a
refs/heads/master
2020-08-29T22:45:15.801910
2020-04-27T09:13:09
2020-04-27T09:13:09
218,192,749
0
0
null
null
null
null
UTF-8
Java
false
false
5,916
java
package com.shaoyue.weizhegou.module.owner.fragment; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.shaoyue.weizhegou.R; import com.shaoyue.weizhegou.api.callback.BaseCallback; import com.shaoyue.weizhegou.api.model.BaseResponse; import com.shaoyue.weizhegou.api.remote.UserApi; import com.shaoyue.weizhegou.base.BaseNoStatusFragment; import com.shaoyue.weizhegou.entity.user.CommissionListBean; import com.shaoyue.weizhegou.entity.user.WalletDetailsBean; import com.shaoyue.weizhegou.module.owner.adapter.WalletDetailAdapter; import com.shaoyue.weizhegou.util.ThreadUtil; import com.shaoyue.weizhegou.util.ToastUtil; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.Unbinder; import cn.bingoogolapple.refreshlayout.BGANormalRefreshViewHolder; import cn.bingoogolapple.refreshlayout.BGARefreshLayout; /** * 作者:PangLei on 2019/5/29 0029 09:16 * <p> * 邮箱:434604925@qq.com */ public class WalletDetailsFragment extends BaseNoStatusFragment implements BGARefreshLayout.BGARefreshLayoutDelegate { @BindView(R.id.tv_wallet_balance) TextView mTvWalletBalance; @BindView(R.id.tv_total_income) TextView mTvTotalIncome; @BindView(R.id.tv_shopping_consumption) TextView mTvShoppingConsumption; private int page = 1; private int total = 0; private String state = "1"; @BindView(R.id.empty_img) ImageView mEmptyImg; @BindView(R.id.empty_text) TextView mEmptyText; @BindView(R.id.empty_relative) RelativeLayout mEmptyRelative; @BindView(R.id.rv_content) RecyclerView mRvContent; @BindView(R.id.refreshLayout) BGARefreshLayout mRefreshLayout; WalletDetailAdapter mCouponAdapter; private int per_page = 20; public static WalletDetailsFragment newInstance() { Bundle args = new Bundle(); WalletDetailsFragment fragment = new WalletDetailsFragment(); fragment.setArguments(args); return fragment; } @Override protected int getLayoutId() { return R.layout.fragment_wallet_details; } @Override protected void initView(View rootView) { super.initView(rootView); initView(); } @Override protected void loadData() { super.loadData(); initCouponList(); } /** * 初始化View */ private void initView() { UserApi.getGetWalletDetails(new BaseCallback<BaseResponse<WalletDetailsBean>>() { @Override public void onSucc(BaseResponse<WalletDetailsBean> result) { mTvWalletBalance.setText(result.data.getBalance()); mTvTotalIncome.setText("全部收入:" + result.data.getIn_amount()); mTvShoppingConsumption.setText("购物消费:" + result.data.getOut_amount()); } }, this); mCouponAdapter = new WalletDetailAdapter(); mRvContent.setLayoutManager(new LinearLayoutManager(getActivity())); mRvContent.setAdapter(mCouponAdapter); mRefreshLayout.setDelegate(this); mRefreshLayout.setRefreshViewHolder(new BGANormalRefreshViewHolder(getActivity(), true)); mRefreshLayout.setIsShowLoadingMoreView(true); } @Override public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) { ThreadUtil.runInUIThread(new Runnable() { @Override public void run() { mRefreshLayout.endRefreshing(); initCouponList(); } }, 1000); } @Override public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) { mRefreshLayout.endLoadingMore(); int size = (total / per_page) + 1; if (page == size) { mRefreshLayout.endLoadingMore(); ToastUtil.showErrorToast("没有更多的数据了"); return false; } UserApi.getAllDetail(state, page + 1, new BaseCallback<BaseResponse<CommissionListBean>>() { @Override public void onSucc(final BaseResponse<CommissionListBean> result) { total = result.data.getTotal(); ThreadUtil.runInUIThread(new Runnable() { @Override public void run() { if (mRefreshLayout == null) { return; } mRefreshLayout.endLoadingMore(); mCouponAdapter.addData(result.data.getData()); page++; } }, 1000); } }, this); return true; } private void initCouponList() { page = 1; UserApi.getAllDetail(state, page, new BaseCallback<BaseResponse<CommissionListBean>>() { @Override public void onSucc(BaseResponse<CommissionListBean> result) { total = result.data.getTotal(); per_page = result.data.getPer_page(); mCouponAdapter.setNewData(result.data.getData()); if (result.data.getData().size() > 0) { mEmptyRelative.setVisibility(View.GONE); } else { mEmptyRelative.setVisibility(View.VISIBLE); mEmptyText.setText("暂无余额变动" + ToastUtil.getToastMsg()); mEmptyImg.setImageResource(R.drawable.icon_empty_wallet); } } }, this); } @OnClick(R.id.iv_back) public void onViewClicked() { removeFragment(); } }
[ "434604925@qq.com" ]
434604925@qq.com
99488672ee500d14266c67b34349dc7a35412b08
bc1e54853af18e70b3d377370ef9271958994e43
/lealone-atomicdb/src/main/java/com/codefollower/lealone/atomicdb/dht/Murmur3Partitioner.java
76393788c1e62685d44c91b6356c43c7497a106e
[ "Apache-2.0" ]
permissive
alemic/Lealone
d5cf7241dce252b60513ff77b1c695ec613ce187
0a15b13e7ec6752b1adb5b063a7cc6f3e6852bad
refs/heads/master
2020-02-26T17:44:21.599597
2014-01-19T05:43:29
2014-01-19T05:43:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,295
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.codefollower.lealone.atomicdb.dht; import java.math.BigDecimal; import java.math.BigInteger; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import com.codefollower.lealone.atomicdb.db.DecoratedKey; import com.codefollower.lealone.atomicdb.db.marshal.AbstractType; import com.codefollower.lealone.atomicdb.db.marshal.LongType; import com.codefollower.lealone.atomicdb.exceptions.ConfigurationException; import com.codefollower.lealone.atomicdb.utils.ByteBufferUtil; import com.codefollower.lealone.atomicdb.utils.FBUtilities; import com.codefollower.lealone.atomicdb.utils.MurmurHash; /** * This class generates a BigIntegerToken using a Murmur3 hash. */ public class Murmur3Partitioner extends AbstractPartitioner<LongToken> { public static final LongToken MINIMUM = new LongToken(Long.MIN_VALUE); public static final long MAXIMUM = Long.MAX_VALUE; public DecoratedKey decorateKey(ByteBuffer key) { return new DecoratedKey(getToken(key), key); } public Token midpoint(Token lToken, Token rToken) { // using BigInteger to avoid long overflow in intermediate operations BigInteger l = BigInteger.valueOf(((LongToken) lToken).token), r = BigInteger.valueOf(((LongToken) rToken).token), midpoint; if (l.compareTo(r) < 0) { BigInteger sum = l.add(r); midpoint = sum.shiftRight(1); } else // wrapping case { BigInteger max = BigInteger.valueOf(MAXIMUM); BigInteger min = BigInteger.valueOf(MINIMUM.token); // length of range we're bisecting is (R - min) + (max - L) // so we add that to L giving // L + ((R - min) + (max - L) / 2) = (L + R + max - min) / 2 midpoint = (max.subtract(min).add(l).add(r)).shiftRight(1); if (midpoint.compareTo(max) > 0) midpoint = min.add(midpoint.subtract(max)); } return new LongToken(midpoint.longValue()); } public LongToken getMinimumToken() { return MINIMUM; } /** * Generate the token of a key. * Note that we need to ensure all generated token are strictly bigger than MINIMUM. * In particular we don't want MINIMUM to correspond to any key because the range (MINIMUM, X] doesn't * include MINIMUM but we use such range to select all data whose token is smaller than X. */ public LongToken getToken(ByteBuffer key) { if (key.remaining() == 0) return MINIMUM; long hash = MurmurHash.hash3_x64_128(key, key.position(), key.remaining(), 0)[0]; return new LongToken(normalize(hash)); } public LongToken getRandomToken() { return new LongToken(normalize(FBUtilities.threadLocalRandom().nextLong())); } private long normalize(long v) { // We exclude the MINIMUM value; see getToken() return v == Long.MIN_VALUE ? Long.MAX_VALUE : v; } public boolean preservesOrder() { return false; } public Map<Token, Float> describeOwnership(List<Token> sortedTokens) { Map<Token, Float> ownerships = new HashMap<Token, Float>(); Iterator i = sortedTokens.iterator(); // 0-case if (!i.hasNext()) throw new RuntimeException("No nodes present in the cluster. Has this node finished starting up?"); // 1-case if (sortedTokens.size() == 1) ownerships.put((Token) i.next(), new Float(1.0)); // n-case else { final BigInteger ri = BigInteger.valueOf(MAXIMUM).subtract(BigInteger.valueOf(MINIMUM.token + 1)); // (used for addition later) final BigDecimal r = new BigDecimal(ri); Token start = (Token) i.next();BigInteger ti = BigInteger.valueOf(((LongToken)start).token); // The first token and its value Token t; BigInteger tim1 = ti; // The last token and its value (after loop) while (i.hasNext()) { t = (Token) i.next(); ti = BigInteger.valueOf(((LongToken) t).token); // The next token and its value float age = new BigDecimal(ti.subtract(tim1).add(ri).mod(ri)).divide(r, 6, BigDecimal.ROUND_HALF_EVEN).floatValue(); // %age = ((T(i) - T(i-1) + R) % R) / R ownerships.put(t, age); // save (T(i) -> %age) tim1 = ti; // -> advance loop } // The start token's range extends backward to the last token, which is why both were saved above. float x = new BigDecimal(BigInteger.valueOf(((LongToken)start).token).subtract(ti).add(ri).mod(ri)).divide(r, 6, BigDecimal.ROUND_HALF_EVEN).floatValue(); ownerships.put(start, x); } return ownerships; } public Token.TokenFactory<Long> getTokenFactory() { return tokenFactory; } private final Token.TokenFactory<Long> tokenFactory = new Token.TokenFactory<Long>() { public ByteBuffer toByteArray(Token<Long> longToken) { return ByteBufferUtil.bytes(longToken.token); } public Token<Long> fromByteArray(ByteBuffer bytes) { return new LongToken(ByteBufferUtil.toLong(bytes)); } public String toString(Token<Long> longToken) { return longToken.token.toString(); } public void validate(String token) throws ConfigurationException { try { Long i = Long.valueOf(token); } catch (NumberFormatException e) { throw new ConfigurationException(e.getMessage()); } } public Token<Long> fromString(String string) { try { return new LongToken(Long.valueOf(string)); } catch (NumberFormatException e) { throw new IllegalArgumentException(String.format("Invalid token for Murmur3Partitioner. Got %s but expected a long value (unsigned 8 bytes integer).", string)); } } }; public AbstractType<?> getTokenValidator() { return LongType.instance; } }
[ "zhh200910@gmail.com" ]
zhh200910@gmail.com
3077f9407ef9b5aa44df3a0fa85e2fa2e3be0479
ec8e41bef30b8bfd7c11521f1ec6d95ba38761ff
/src/main/java/com/google/location/suplclient/asn1/supl2/ulp_components/Pathloss.java
8927753501126dccd36b49e4864a71e9f10faf11
[ "Apache-2.0" ]
permissive
coleHafner/supl-client-1
15b33ff32ddca3e2063a3b08c824e6d013877d6a
27f86068f89fbc04c64e90e3e1bc886e34cafca5
refs/heads/master
2020-08-10T03:44:23.565708
2019-10-11T21:38:40
2019-10-11T21:38:40
214,248,260
3
1
Apache-2.0
2019-10-10T17:45:58
2019-10-10T17:45:58
null
UTF-8
Java
false
false
2,891
java
// Copyright 2018 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.location.suplclient.asn1.supl2.ulp_components; // Copyright 2008 Google Inc. All Rights Reserved. /* * This class is AUTOMATICALLY GENERATED. Do NOT EDIT. */ // // import com.google.location.suplclient.asn1.base.Asn1Integer; import com.google.location.suplclient.asn1.base.Asn1Tag; import com.google.location.suplclient.asn1.base.BitStream; import com.google.location.suplclient.asn1.base.BitStreamReader; import com.google.common.collect.ImmutableList; import java.util.Collection; import javax.annotation.Nullable; /** * */ public class Pathloss extends Asn1Integer { // private static final Asn1Tag TAG_Pathloss = Asn1Tag.fromClassAndNumber(-1, -1); public Pathloss() { super(); setValueRange(new java.math.BigInteger("46"), new java.math.BigInteger("173")); } @Override @Nullable protected Asn1Tag getTag() { return TAG_Pathloss; } @Override protected boolean isTagImplicit() { return true; } public static Collection<Asn1Tag> getPossibleFirstTags() { if (TAG_Pathloss != null) { return ImmutableList.of(TAG_Pathloss); } else { return Asn1Integer.getPossibleFirstTags(); } } /** * Creates a new Pathloss from encoded stream. */ public static Pathloss fromPerUnaligned(byte[] encodedBytes) { Pathloss result = new Pathloss(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } /** * Creates a new Pathloss from encoded stream. */ public static Pathloss fromPerAligned(byte[] encodedBytes) { Pathloss result = new Pathloss(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } @Override public Iterable<BitStream> encodePerUnaligned() { return super.encodePerUnaligned(); } @Override public Iterable<BitStream> encodePerAligned() { return super.encodePerAligned(); } @Override public void decodePerUnaligned(BitStreamReader reader) { super.decodePerUnaligned(reader); } @Override public void decodePerAligned(BitStreamReader reader) { super.decodePerAligned(reader); } @Override public String toString() { return toIndentedString(""); } public String toIndentedString(String indent) { return "Pathloss = " + getInteger() + ";\n"; } }
[ "tccyp@google.com" ]
tccyp@google.com
68fe91ec4f17400b035d0e8314d965af18124856
3181a895dee7c1f5eb02fb2b48d8ce02c8767973
/bobas.businessobjectscommon/src/test/java/org/colorcoding/ibas/bobas/test/data/TestDataConvert.java
ea2b7cb9c1b2b898737f796dc008f195e3d34010
[ "MIT" ]
permissive
color-coding/ibas-framework
635c77e0415c17a251b029df946d4fdb95dd98b1
414793b1f4c9807fc3560163400697cbb3826157
refs/heads/master
2023-09-05T03:25:44.311551
2023-08-25T08:31:29
2023-08-30T16:00:23
49,205,107
14
120
MIT
2023-07-12T07:58:31
2016-01-07T13:06:07
Java
UTF-8
Java
false
false
1,334
java
package org.colorcoding.ibas.bobas.test.data; import org.colorcoding.ibas.bobas.data.KeyValue; import org.colorcoding.ibas.bobas.data.emConditionOperation; import org.colorcoding.ibas.bobas.data.emYesNo; import org.colorcoding.ibas.bobas.data.measurement.emAreaUnit; import org.colorcoding.ibas.bobas.db.DataConvert; import junit.framework.TestCase; public class TestDataConvert extends TestCase { public void testEnumConvert() { emYesNo emValue = emYesNo.YES; String dbValue = DataConvert.toDbValue(emValue); assertEquals("Y", dbValue); emValue = (emYesNo) DataConvert.toEnumValue(emYesNo.class, "N"); assertEquals(emYesNo.NO, emValue); emValue = (emYesNo) DataConvert.toEnumValue(emYesNo.class, "No"); assertEquals(emYesNo.NO, emValue); // 索引测试 emValue = (emYesNo) DataConvert.toEnumValue(emYesNo.class, 1); assertEquals(emYesNo.YES, emValue); // 值测试 emConditionOperation emcpValue = (emConditionOperation) DataConvert.toEnumValue(emConditionOperation.class, emConditionOperation.CONTAIN.ordinal()); assertEquals(emConditionOperation.CONTAIN, emcpValue); for (KeyValue item : DataConvert.toKeyValues(emYesNo.class)) { System.out.println(item.toString()); } for (KeyValue item : DataConvert.toKeyValues(emAreaUnit.class)) { System.out.println(item.toString()); } } }
[ "niuren.zhu@icloud.com" ]
niuren.zhu@icloud.com
8120db40c5f9233011032f272815befec035e3fa
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_71a31e88a7cae248209a63dcf8da7fc11aa47534/DelayedRefreshJob/13_71a31e88a7cae248209a63dcf8da7fc11aa47534_DelayedRefreshJob_t.java
8af5cb1460378daf047b5b475d8dde91dec3a019
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,948
java
/******************************************************************************* * Copyright (c) 2004, 2007 Mylyn project committers and others. * 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 *******************************************************************************/ package org.eclipse.mylyn.internal.provisional.commons.ui; import java.util.Arrays; import java.util.LinkedHashSet; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.ui.progress.WorkbenchJob; /** * TODO use extensible deltas instead of Objects for refresh * * @author Steffen Pingel * @author Mik Kersten */ public abstract class DelayedRefreshJob extends WorkbenchJob { static final long REFRESH_DELAY_DEFAULT = 200; static final long REFRESH_DELAY_MAX = REFRESH_DELAY_DEFAULT * 2; // FIXME make private protected final StructuredViewer viewer; private static final int NOT_SCHEDULED = -1; private final LinkedHashSet<Object> queue = new LinkedHashSet<Object>(); private long scheduleTime = NOT_SCHEDULED; public DelayedRefreshJob(StructuredViewer viewer, String name) { super(name); Assert.isNotNull(viewer); this.viewer = viewer; setSystem(true); } // XXX needs to be called from UI thread public void refreshNow() { queue.add(null); runInUIThread(new NullProgressMonitor()); } public synchronized void refresh() { refreshElement(null); } public synchronized void refreshElements(Object[] elements) { queue.addAll(Arrays.asList(elements)); if (scheduleTime == NOT_SCHEDULED) { scheduleTime = System.currentTimeMillis(); schedule(REFRESH_DELAY_DEFAULT); } else if (System.currentTimeMillis() - scheduleTime < REFRESH_DELAY_MAX - REFRESH_DELAY_DEFAULT) { // reschedule to aggregate more refreshes cancel(); schedule(REFRESH_DELAY_DEFAULT); } } public synchronized void refreshElement(Object element) { refreshElements(new Object[] { element }); } @Override public IStatus runInUIThread(IProgressMonitor monitor) { if (viewer.getControl() == null || viewer.getControl().isDisposed()) { return Status.CANCEL_STATUS; } final Object[] items; synchronized (this) { if (queue.contains(null)) { items = null; } else { items = queue.toArray(new Object[0]); } queue.clear(); scheduleTime = NOT_SCHEDULED; } doRefresh(items); return Status.OK_STATUS; } protected abstract void doRefresh(final Object[] items); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9d29e1dd01ba3909df59f4a3aa6c364f5e45a953
c667ea08ee83f38670f4ea94e67bf13ac357a3c2
/eureka/provider/src/test/java/com/chenshun/provider/ProviderApplicationTests.java
e1d817249201169a20303ce95d8dcde66c7efdef
[]
no_license
chenshun131/SpringBootDemo
0b6ec78a36a00bc247e7b9f4df17af127227dd10
d562fc473d8f4deada1480f4a4e0d988bae5fea3
refs/heads/master
2021-03-30T21:56:32.365220
2018-11-18T04:01:22
2018-11-18T04:01:22
124,502,217
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package com.chenshun.provider; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ProviderApplicationTests { @Test public void contextLoads() { } }
[ "1539831174@qq.com" ]
1539831174@qq.com
3adedb3ee9d81c3c3e6b793033f43a1758cdadad
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Ibotta_com.ibotta.android/javafiles/bo/app/di.java
2c97cf93b6741a605ee0bc05be8f7d618492b711
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
6,629
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package bo.app; import android.net.Uri; import com.appboy.support.AppboyLogger; import com.appboy.support.StringUtils; import java.util.List; import org.json.*; // Referenced classes of package bo.app: // cu, y, ad, cp public class di extends cu { public di(String s, List list, long l, String s1) { StringBuilder stringbuilder = new StringBuilder(); // 0 0:new #28 <Class StringBuilder> // 1 3:dup // 2 4:invokespecial #30 <Method void StringBuilder()> // 3 7:astore 6 stringbuilder.append(s); // 4 9:aload 6 // 5 11:aload_1 // 6 12:invokevirtual #34 <Method StringBuilder StringBuilder.append(String)> // 7 15:pop stringbuilder.append("data"); // 8 16:aload 6 // 9 18:ldc1 #36 <String "data"> // 10 20:invokevirtual #34 <Method StringBuilder StringBuilder.append(String)> // 11 23:pop super(Uri.parse(stringbuilder.toString()), ((java.util.Map) (null))); // 12 24:aload_0 // 13 25:aload 6 // 14 27:invokevirtual #40 <Method String StringBuilder.toString()> // 15 30:invokestatic #46 <Method Uri Uri.parse(String)> // 16 33:aconst_null // 17 34:invokespecial #49 <Method void cu(Uri, java.util.Map)> c = l; // 18 37:aload_0 // 19 38:lload_3 // 20 39:putfield #51 <Field long c> d = list; // 21 42:aload_0 // 22 43:aload_2 // 23 44:putfield #53 <Field List d> e = s1; // 24 47:aload_0 // 25 48:aload 5 // 26 50:putfield #55 <Field String e> // 27 53:return } public void a(ad ad, cp cp) { // 0 0:return } public JSONObject g() { JSONObject jsonobject = super.g(); // 0 0:aload_0 // 1 1:invokespecial #66 <Method JSONObject cu.g()> // 2 4:astore_1 if(jsonobject == null) //* 3 5:aload_1 //* 4 6:ifnonnull 11 return null; // 5 9:aconst_null // 6 10:areturn try { JSONObject jsonobject1 = new JSONObject(); // 7 11:new #68 <Class JSONObject> // 8 14:dup // 9 15:invokespecial #69 <Method void JSONObject()> // 10 18:astore_2 jsonobject1.put("time", c); // 11 19:aload_2 // 12 20:ldc1 #71 <String "time"> // 13 22:aload_0 // 14 23:getfield #51 <Field long c> // 15 26:invokevirtual #75 <Method JSONObject JSONObject.put(String, long)> // 16 29:pop if(!StringUtils.isNullOrBlank(e)) //* 17 30:aload_0 //* 18 31:getfield #55 <Field String e> //* 19 34:invokestatic #81 <Method boolean StringUtils.isNullOrBlank(String)> //* 20 37:ifne 51 jsonobject1.put("user_id", ((Object) (e))); // 21 40:aload_2 // 22 41:ldc1 #83 <String "user_id"> // 23 43:aload_0 // 24 44:getfield #55 <Field String e> // 25 47:invokevirtual #86 <Method JSONObject JSONObject.put(String, Object)> // 26 50:pop if(!d.isEmpty()) //* 27 51:aload_0 //* 28 52:getfield #53 <Field List d> //* 29 55:invokeinterface #92 <Method boolean List.isEmpty()> //* 30 60:ifne 81 jsonobject1.put("device_logs", ((Object) (new JSONArray(((java.util.Collection) (d)))))); // 31 63:aload_2 // 32 64:ldc1 #94 <String "device_logs"> // 33 66:new #96 <Class JSONArray> // 34 69:dup // 35 70:aload_0 // 36 71:getfield #53 <Field List d> // 37 74:invokespecial #99 <Method void JSONArray(java.util.Collection)> // 38 77:invokevirtual #86 <Method JSONObject JSONObject.put(String, Object)> // 39 80:pop JSONArray jsonarray = new JSONArray(); // 40 81:new #96 <Class JSONArray> // 41 84:dup // 42 85:invokespecial #100 <Method void JSONArray()> // 43 88:astore_3 jsonarray.put(((Object) (jsonobject1))); // 44 89:aload_3 // 45 90:aload_2 // 46 91:invokevirtual #103 <Method JSONArray JSONArray.put(Object)> // 47 94:pop jsonobject.put("test_user_data", ((Object) (jsonarray))); // 48 95:aload_1 // 49 96:ldc1 #105 <String "test_user_data"> // 50 98:aload_3 // 51 99:invokevirtual #86 <Method JSONObject JSONObject.put(String, Object)> // 52 102:pop } //* 53 103:aload_1 //* 54 104:areturn catch(JSONException jsonexception) //* 55 105:astore_1 { AppboyLogger.e(b, "Experienced JSONException while retrieving parameters. Returning null.", ((Throwable) (jsonexception))); // 56 106:getstatic #22 <Field String b> // 57 109:ldc1 #107 <String "Experienced JSONException while retrieving parameters. Returning null."> // 58 111:aload_1 // 59 112:invokestatic #110 <Method int AppboyLogger.e(String, String, Throwable)> // 60 115:pop return null; // 61 116:aconst_null // 62 117:areturn } return jsonobject; } public boolean h() { return d.isEmpty() && super.h(); // 0 0:aload_0 // 1 1:getfield #53 <Field List d> // 2 4:invokeinterface #92 <Method boolean List.isEmpty()> // 3 9:ifeq 21 // 4 12:aload_0 // 5 13:invokespecial #113 <Method boolean cu.h()> // 6 16:ifeq 21 // 7 19:iconst_1 // 8 20:ireturn // 9 21:iconst_0 // 10 22:ireturn } public y i() { return y.b; // 0 0:getstatic #120 <Field y y.b> // 1 3:areturn } private static final String b = AppboyLogger.getAppboyLogTag(bo/app/di); private final long c; private final List d; private final String e; static { // 0 0:ldc1 #2 <Class di> // 1 2:invokestatic #20 <Method String AppboyLogger.getAppboyLogTag(Class)> // 2 5:putstatic #22 <Field String b> //* 3 8:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
834b4fe03f8250735a39afc27815fa753303f6bb
947fc9eef832e937f09f04f1abd82819cd4f97d3
/src/apk/androidx/core/graphics/drawable/d.java
a58f04d14edc4dc5a3271290ed872ef6dc4047f1
[]
no_license
thistehneisen/cifra
04f4ac1b230289f8262a0b9cf7448a1172d8f979
d46c6f4764c9d4f64e45c56fa42fddee9b44ff5a
refs/heads/master
2020-09-22T09:35:57.739040
2019-12-01T19:39:59
2019-12-01T19:39:59
225,136,583
1
0
null
null
null
null
UTF-8
Java
false
false
7,702
java
package androidx.core.graphics.drawable; import android.content.res.ColorStateList; import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.PorterDuff.Mode; import android.graphics.Rect; import android.graphics.Region; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable.Callback; import android.graphics.drawable.Drawable.ConstantState; /* compiled from: WrappedDrawableApi14 */ class d extends Drawable implements Callback, c, b { /* renamed from: a reason: collision with root package name */ static final Mode f1316a = Mode.SRC_IN; /* renamed from: b reason: collision with root package name */ private int f1317b; /* renamed from: c reason: collision with root package name */ private Mode f1318c; /* renamed from: d reason: collision with root package name */ private boolean f1319d; /* renamed from: e reason: collision with root package name */ f f1320e; /* renamed from: f reason: collision with root package name */ private boolean f1321f; /* renamed from: g reason: collision with root package name */ Drawable f1322g; d(f fVar, Resources resources) { this.f1320e = fVar; a(resources); } private void a(Resources resources) { f fVar = this.f1320e; if (fVar != null) { ConstantState constantState = fVar.f1325b; if (constantState != null) { a(constantState.newDrawable(resources)); } } } private f c() { return new f(this.f1320e); } /* access modifiers changed from: protected */ public boolean b() { return true; } public void draw(Canvas canvas) { this.f1322g.draw(canvas); } public int getChangingConfigurations() { int changingConfigurations = super.getChangingConfigurations(); f fVar = this.f1320e; return changingConfigurations | (fVar != null ? fVar.getChangingConfigurations() : 0) | this.f1322g.getChangingConfigurations(); } public ConstantState getConstantState() { f fVar = this.f1320e; if (fVar == null || !fVar.a()) { return null; } this.f1320e.f1324a = getChangingConfigurations(); return this.f1320e; } public Drawable getCurrent() { return this.f1322g.getCurrent(); } public int getIntrinsicHeight() { return this.f1322g.getIntrinsicHeight(); } public int getIntrinsicWidth() { return this.f1322g.getIntrinsicWidth(); } public int getMinimumHeight() { return this.f1322g.getMinimumHeight(); } public int getMinimumWidth() { return this.f1322g.getMinimumWidth(); } public int getOpacity() { return this.f1322g.getOpacity(); } public boolean getPadding(Rect rect) { return this.f1322g.getPadding(rect); } public int[] getState() { return this.f1322g.getState(); } public Region getTransparentRegion() { return this.f1322g.getTransparentRegion(); } public void invalidateDrawable(Drawable drawable) { invalidateSelf(); } public boolean isAutoMirrored() { return this.f1322g.isAutoMirrored(); } public boolean isStateful() { ColorStateList colorStateList; if (b()) { f fVar = this.f1320e; if (fVar != null) { colorStateList = fVar.f1326c; return (colorStateList == null && colorStateList.isStateful()) || this.f1322g.isStateful(); } } colorStateList = null; if (colorStateList == null) { } } public void jumpToCurrentState() { this.f1322g.jumpToCurrentState(); } public Drawable mutate() { if (!this.f1321f && super.mutate() == this) { this.f1320e = c(); Drawable drawable = this.f1322g; if (drawable != null) { drawable.mutate(); } f fVar = this.f1320e; if (fVar != null) { Drawable drawable2 = this.f1322g; fVar.f1325b = drawable2 != null ? drawable2.getConstantState() : null; } this.f1321f = true; } return this; } /* access modifiers changed from: protected */ public void onBoundsChange(Rect rect) { Drawable drawable = this.f1322g; if (drawable != null) { drawable.setBounds(rect); } } /* access modifiers changed from: protected */ public boolean onLevelChange(int i2) { return this.f1322g.setLevel(i2); } public void scheduleDrawable(Drawable drawable, Runnable runnable, long j2) { scheduleSelf(runnable, j2); } public void setAlpha(int i2) { this.f1322g.setAlpha(i2); } public void setAutoMirrored(boolean z) { this.f1322g.setAutoMirrored(z); } public void setChangingConfigurations(int i2) { this.f1322g.setChangingConfigurations(i2); } public void setColorFilter(ColorFilter colorFilter) { this.f1322g.setColorFilter(colorFilter); } public void setDither(boolean z) { this.f1322g.setDither(z); } public void setFilterBitmap(boolean z) { this.f1322g.setFilterBitmap(z); } public boolean setState(int[] iArr) { return a(iArr) || this.f1322g.setState(iArr); } public void setTint(int i2) { setTintList(ColorStateList.valueOf(i2)); } public void setTintList(ColorStateList colorStateList) { this.f1320e.f1326c = colorStateList; a(getState()); } public void setTintMode(Mode mode) { this.f1320e.f1327d = mode; a(getState()); } public boolean setVisible(boolean z, boolean z2) { return super.setVisible(z, z2) || this.f1322g.setVisible(z, z2); } public void unscheduleDrawable(Drawable drawable, Runnable runnable) { unscheduleSelf(runnable); } private boolean a(int[] iArr) { if (!b()) { return false; } f fVar = this.f1320e; ColorStateList colorStateList = fVar.f1326c; Mode mode = fVar.f1327d; if (colorStateList == null || mode == null) { this.f1319d = false; clearColorFilter(); } else { int colorForState = colorStateList.getColorForState(iArr, colorStateList.getDefaultColor()); if (!(this.f1319d && colorForState == this.f1317b && mode == this.f1318c)) { setColorFilter(colorForState, mode); this.f1317b = colorForState; this.f1318c = mode; this.f1319d = true; return true; } } return false; } d(Drawable drawable) { this.f1320e = c(); a(drawable); } public final Drawable a() { return this.f1322g; } public final void a(Drawable drawable) { Drawable drawable2 = this.f1322g; if (drawable2 != null) { drawable2.setCallback(null); } this.f1322g = drawable; if (drawable != null) { drawable.setCallback(this); setVisible(drawable.isVisible(), true); setState(drawable.getState()); setLevel(drawable.getLevel()); setBounds(drawable.getBounds()); f fVar = this.f1320e; if (fVar != null) { fVar.f1325b = drawable.getConstantState(); } } invalidateSelf(); } }
[ "putnins@nils.digital" ]
putnins@nils.digital
3cfe8305ce6c3a852c0ad3b80ca2e775ffece3cd
1941b485f55aa9d05faf579f422275f66f11cfbd
/src/test/java/com/annie/api/rest/marketplace/controllers/SellerControllerTest.java
883819bdc41d5daf682c1ab6018f454b9e1211ee
[]
no_license
nguyenannie/marketplace-rest-api
d2a663591cbebdf2cbee1fde10e7e176b56fd840
a832e68f8e96b46fd7057faafc78e9de69f2a613
refs/heads/master
2020-04-13T20:32:33.730732
2018-12-31T19:06:38
2018-12-31T19:06:38
163,432,538
0
0
null
null
null
null
UTF-8
Java
false
false
7,078
java
package com.annie.api.rest.marketplace.controllers; import com.annie.api.rest.marketplace.models.dtos.SellerDTO; import com.annie.api.rest.marketplace.models.entities.Seller; import com.annie.api.rest.marketplace.services.implementations.SellerDbServiceImpl; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static com.annie.api.rest.marketplace.TestUtil.mapToJson; import static org.hamcrest.collection.IsCollectionWithSize.hasSize; import static org.hamcrest.core.Is.is; import static org.mockito.BDDMockito.given; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; @RunWith(SpringRunner.class) @WebMvcTest(SellerController.class) public class SellerControllerTest { @Autowired private MockMvc mockMvc; @MockBean private SellerDbServiceImpl sellerDbService; private Seller seller1; private Seller seller2; private List<Seller> allSellers; private SellerDTO validSellerDTO; private SellerDTO invalidSellerDTO; @Before public void setUp() throws Exception { seller1 = Seller.builder() .id(1) .firstName("Neil") .lastName("Langley") .email("dapibus@maurisipsumporta.ca") .phoneNumber("0860 028 7320") .address("686-7190 Odio Rd.") .build(); seller2 = Seller.builder() .id(2) .firstName("Nash") .lastName("Figueroa") .email("Nunc@dictum.co.uk") .phoneNumber("07624 847184") .address("4301 Quisque Av.") .build(); allSellers = new ArrayList<>(Arrays.asList(seller1, seller2)); validSellerDTO = new SellerDTO("Branden", "Cervantes", "at@Crasloremlorem.edu", "070 4516 7493", "150-2570 Gravida Av."); invalidSellerDTO = new SellerDTO("", "", "", "", ""); } @Test public void getAllSellers() throws Exception { given(sellerDbService.findAll()).willReturn(allSellers); mockMvc.perform(get("/sellers") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$", hasSize(2))) .andExpect(jsonPath("$[0].firstName", is(seller1.getFirstName()))) .andExpect(jsonPath("$[0].lastName", is(seller1.getLastName()))) .andExpect(jsonPath("$[0].email", is(seller1.getEmail()))) .andExpect(jsonPath("$[0].phoneNumber", is(seller1.getPhoneNumber()))) .andExpect(jsonPath("$[0].address", is(seller1.getAddress()))) .andExpect(jsonPath("$[1].firstName", is(seller2.getFirstName()))) .andExpect(jsonPath("$[1].lastName", is(seller2.getLastName()))) .andExpect(jsonPath("$[1].email", is(seller2.getEmail()))) .andExpect(jsonPath("$[1].phoneNumber", is(seller2.getPhoneNumber()))) .andExpect(jsonPath("$[1].address", is(seller2.getAddress()))); } @Test public void getSellerById_when_id_exists() throws Exception { given(sellerDbService.findById(seller1.getId())).willReturn(seller1); mockMvc.perform(get("/seller/1") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andExpect(content().json(mapToJson(seller1))); } @Test public void getSellerById_when_id_doesnt_exist() throws Exception { given(sellerDbService.findById(6)).willReturn(null); mockMvc.perform(get("/seller/6") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNotFound()); } @Test public void saveSeller_when_requestBody_is_valid() throws Exception { mockMvc.perform(post("/seller") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(mapToJson(validSellerDTO))) .andExpect(status().isCreated()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andExpect(content().json(mapToJson(validSellerDTO))); } @Test public void saveSeller_when_requestBody_is_not_valid() throws Exception { mockMvc.perform(post("/seller") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(mapToJson(invalidSellerDTO))) .andExpect(status().isBadRequest()); } @Test public void deleteSeller_when_id_exist() throws Exception { given(sellerDbService.findById(2)).willReturn(seller2); mockMvc.perform(delete("/seller/2") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andExpect(content().json(mapToJson(seller2))); } @Test public void deleteSeller_when_id_doesnt_exist() throws Exception { given(sellerDbService.findById(6)).willReturn(null); mockMvc.perform(delete("/seller/6") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNotFound()); } @Test public void modifySeller_successful() throws Exception { given(sellerDbService.findById(1)).willReturn(seller1); mockMvc.perform(put("/seller/1") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(mapToJson(validSellerDTO))) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andExpect(content().json(mapToJson(validSellerDTO))); } @Test public void modifySeller_when_id_doesnt_exist() throws Exception { given(sellerDbService.findById(5)).willReturn(null); mockMvc.perform(put("/seller/6") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(mapToJson(validSellerDTO))) .andExpect(status().isNotFound()); } @Test public void modifySeller_when_requestBody_is_invalid() throws Exception { given(sellerDbService.findById(1)).willReturn(seller1); mockMvc.perform(put("/seller/1") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(mapToJson(invalidSellerDTO))) .andExpect(status().isBadRequest()); } }
[ "tramtramrhinomo@gmail.com" ]
tramtramrhinomo@gmail.com
5d0cf4b675bebbe52944779fa9ac34078becb96e
ffc345e5c5f19febd0ed98d42be78b1abb832cf4
/sitestats/sitestats-tool/src/java/org/sakaiproject/sitestats/tool/wicket/pages/AdminReportsPage.java
9069e6bbb8094f467cb15c4ce1df31379cb51db6
[ "ECL-2.0" ]
permissive
unixcrh/Fudan-Sakai
50c89d41ee447f99d6347b14197ba701f6131a5f
924b4c0b702ada7eba4e0efb8db99cb99ed47dce
refs/heads/master
2020-12-24T17:54:54.747919
2012-04-13T14:53:40
2012-04-13T14:53:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,273
java
/** * $URL: https://source.sakaiproject.org/svn/sitestats/tags/sitestats-2.2.2/sitestats-tool/src/java/org/sakaiproject/sitestats/tool/wicket/pages/AdminReportsPage.java $ * $Id: AdminReportsPage.java 72172 2009-09-23 00:48:53Z arwhyte@umich.edu $ * * Copyright (c) 2006-2009 The Sakai Foundation * * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.sitestats.tool.wicket.pages; import org.apache.wicket.PageParameters; import org.apache.wicket.model.ResourceModel; public class AdminReportsPage extends ReportsPage { public AdminReportsPage(PageParameters pageParameters) { super(pageParameters); } public String getPageTitle() { return (String) new ResourceModel("menu_adminreports").getObject(); } }
[ "gaojun@fudan.edu.cn" ]
gaojun@fudan.edu.cn
a56db56e36196932c9c8709568e3610ca96350aa
d8151dfa1a9f8ec276ba5b6ed9f249f8706240cc
/me/earth/phobos/features/modules/misc/NoAFK.java
6c5cf2c7d90cbb6f321beddd28f7ad8c4672b5c0
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
Floppinqq/Phobos-1.7.2-BUILDABLE-SRC
08095cf6e4e9499d94beff9119441485c252d83f
681a694a92e06c6d793c2ffec12ff6ffb7f61d4c
refs/heads/main
2023-02-04T02:47:23.954142
2020-12-25T14:03:09
2020-12-25T14:03:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,682
java
/* * Decompiled with CFR 0.150. * * Could not load the following classes: * net.minecraft.network.Packet * net.minecraft.network.play.client.CPacketAnimation * net.minecraft.util.EnumHand */ package me.earth.phobos.features.modules.misc; import java.util.Random; import me.earth.phobos.features.modules.Module; import me.earth.phobos.features.setting.Setting; import net.minecraft.network.Packet; import net.minecraft.network.play.client.CPacketAnimation; import net.minecraft.util.EnumHand; public class NoAFK extends Module { private final Setting<Boolean> swing = this.register(new Setting<Boolean>("Swing", true)); private final Setting<Boolean> turn = this.register(new Setting<Boolean>("Turn", true)); private final Random random = new Random(); public NoAFK() { super("NoAFK", "Prevents you from getting kicked for afk.", Module.Category.MISC, false, false, false); } @Override public void onUpdate() { if (NoAFK.mc.field_71442_b.func_181040_m()) { return; } if (NoAFK.mc.field_71439_g.field_70173_aa % 40 == 0 && this.swing.getValue().booleanValue()) { NoAFK.mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketAnimation(EnumHand.MAIN_HAND)); } if (NoAFK.mc.field_71439_g.field_70173_aa % 15 == 0 && this.turn.getValue().booleanValue()) { NoAFK.mc.field_71439_g.field_70177_z = this.random.nextInt(360) - 180; } if (!this.swing.getValue().booleanValue() && !this.turn.getValue().booleanValue() && NoAFK.mc.field_71439_g.field_70173_aa % 80 == 0) { NoAFK.mc.field_71439_g.func_70664_aZ(); } } }
[ "hqrion@gmail.com" ]
hqrion@gmail.com
c5a3a7863ac9dca2d65da1056be0abfce1850ee7
d966ab71087d3d2611e1d9b94b8d62d95b48b1cf
/src/main/java/hu/noreg/iotgw2/service/mapper/DeviceMapper.java
ab1cbb07395ebdf5340ae82a7eb3602fee9f0608
[]
no_license
bukodi/iotgw2
cf4d2288823ff0e7810b0640207c7bf26ff9fc03
032599cef13bc432f5ab6a6be31d7ea144f3a47b
refs/heads/main
2023-07-04T22:57:24.935144
2021-05-21T15:38:40
2021-05-21T15:39:35
369,579,739
0
1
null
2021-08-22T21:11:47
2021-05-21T15:33:22
Java
UTF-8
Java
false
false
1,362
java
package hu.noreg.iotgw2.service.mapper; import hu.noreg.iotgw2.domain.*; import hu.noreg.iotgw2.service.dto.DeviceDTO; import org.mapstruct.*; /** * Mapper for the entity {@link Device} and its DTO {@link DeviceDTO}. */ @Mapper(componentModel = "spring", uses = { KeyPairMapper.class, DeviceTypeMapper.class, OrgUnitMapper.class }) public interface DeviceMapper extends EntityMapper<DeviceDTO, Device> { @Mapping(target = "deviceSignKey", source = "deviceSignKey", qualifiedByName = "keyId") @Mapping(target = "deviceEncKey", source = "deviceEncKey", qualifiedByName = "keyId") @Mapping(target = "serverSignKey", source = "serverSignKey", qualifiedByName = "keyId") @Mapping(target = "serverEncKey", source = "serverEncKey", qualifiedByName = "keyId") @Mapping(target = "nextServerSignKey", source = "nextServerSignKey", qualifiedByName = "keyId") @Mapping(target = "nextServerEncKey", source = "nextServerEncKey", qualifiedByName = "keyId") @Mapping(target = "type", source = "type", qualifiedByName = "name") @Mapping(target = "orgUnit", source = "orgUnit", qualifiedByName = "name") DeviceDTO toDto(Device s); @Named("visualId") @BeanMapping(ignoreByDefault = true) @Mapping(target = "id", source = "id") @Mapping(target = "visualId", source = "visualId") DeviceDTO toDtoVisualId(Device device); }
[ "bukodi@gmail.com" ]
bukodi@gmail.com
ed26fe751d45af961083d3e764285b6ce4d47b4c
a6d91539ac2e61e4c632319e725287f57186856c
/src/com/plugins/cms/content/service/dao/ICmsContentDao.java
0a37f80b7f2aa14a53cb6935bf7f719d6b841b64
[]
no_license
liuguicheng/IntegrationGame
5c3bd6b783f5ab21ff1eeb88be4f471d76c53499
f4bc906713ac6b3ed25d5e497f3341269e38cd88
refs/heads/master
2020-02-26T15:54:33.835922
2016-12-24T02:28:42
2016-12-24T02:28:42
70,869,636
0
0
null
2016-10-27T13:46:02
2016-10-14T03:13:19
Java
GB18030
Java
false
false
603
java
/** * Description: * History: 2013-12-20 Create **/ package com.plugins.cms.content.service.dao; import org.springline.orm.Page; import org.springline.orm.dao.ICommonDao; import com.plugins.cms.content.command.CmsContentQueryInfo; /** * @description */ public interface ICmsContentDao extends ICommonDao { /** * 查询栏目 * @param info * @return */ Page selectCmsContentList(CmsContentQueryInfo info); /** * 获取可用顺序号 * @param parentId * @return */ Integer getSortOrder(String parentId); }
[ "282303392@qq.com" ]
282303392@qq.com
5d2974374d7df84e53d3d4bb16d61c03fcbd020d
7b40d383ff3c5d51c6bebf4d327c3c564eb81801
/src/e.java
50ab24d18372abadcba6809a87c0c091beec804c
[]
no_license
reverseengineeringer/com.yik.yak
d5de3a0aea7763b43fd5e735d34759f956667990
76717e41dab0b179aa27f423fc559bbfb70e5311
refs/heads/master
2021-01-20T09:41:04.877038
2015-07-16T16:44:44
2015-07-16T16:44:44
38,577,543
2
0
null
null
null
null
UTF-8
Java
false
false
344
java
import android.os.Handler; import android.os.Looper; import java.util.concurrent.Executor; class E implements Executor { public void execute(Runnable paramRunnable) { new Handler(Looper.getMainLooper()).post(paramRunnable); } } /* Location: * Qualified Name: E * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
fac01205de36702b1cd8430dddadd0f499392a3f
0be11498aea0f12d98514f4eb2e69941c41af0e4
/tramina-project/tramina/src/main/java/org/seasar/tramina/transaction/exception/TransactionAlreadyAssociatedException.java
923d08540c604e695fc3a574494cb2a2edb7133b
[]
no_license
seasarorg/tramina
1770ae55c4dfea7870d0d30b97feab34f9d0cc67
1ec50e5aa82f1f657eb79024806b1221d7a94230
refs/heads/master
2016-09-10T09:30:24.601854
2013-10-04T10:40:38
2013-10-04T10:40:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,070
java
/* * Copyright 2004-2010 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.tramina.transaction.exception; import static org.seasar.tramina.transaction.TransactionMessages.*; /** * * * @author koichik */ public class TransactionAlreadyAssociatedException extends IllegalStateException { /** * @param configurable */ public TransactionAlreadyAssociatedException() { super(TRANSACTION_ALREADY_ASSOCIATED.format()); } }
[ "koichik@improvement.jp" ]
koichik@improvement.jp
0e45e61b2ffa993dd42fa6dd0be5e8f899bd73cf
874e9ea8775d886b87390575231a5f05572abd5d
/workspace/javase/core/src/io/system/SystemOutRedirect.zdq
d17ee0dce75b52744dc577f8a8c6db9fa3697099
[]
no_license
helifee/corp-project
f801d191ed9a6164b9b28174217ad917ef0380c8
97f8cdfc72ea7ef7a470723de46e91d8c4ecd8c9
refs/heads/master
2020-03-28T12:10:14.956362
2018-09-13T02:43:01
2018-09-13T02:43:01
148,274,917
2
3
null
null
null
null
UTF-8
Java
false
false
452
zdq
package io.system; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; public class SystemOutRedirect { public static void main(String[] args) throws IOException { File file = new File("f:" + File.separator + "log.txt"); System.setOut(new PrintStream(new FileOutputStream(file))); System.out.println("error..."); //in, errҲ���ض���,�������� } }
[ "helifee@gmail.com" ]
helifee@gmail.com
7b6f4dc3414faef82a878e68699ff38cd1f2da0d
fcda880abfc6325231df63ca16d6f057ad4fb3a3
/src/test/java/org/dom4j/samples/dom/NativeDOMDemo.java
c804693f0664e18c10903b33b04c210d00c58264
[]
no_license
yangfancoming/goat-demo-dom4j
c17561cf28dcf03cdd6980b8889e7ed01fd1b272
929e39d258869b71688d17ab0649d91190f7da8f
refs/heads/master
2020-09-21T13:08:39.039613
2019-11-29T08:06:39
2019-11-29T08:06:39
224,798,039
0
0
null
null
null
null
UTF-8
Java
false
false
3,707
java
/* * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved. * * This software is open source. * See the bottom of this file for the licence. * * $Id: NativeDOMDemo.java,v 1.4 2005/01/29 14:52:58 maartenc Exp $ */ package org.dom4j.samples.dom; import org.dom4j.Document; import org.dom4j.dom.DOMDocumentFactory; import org.dom4j.io.SAXReader; import org.dom4j.samples.AbstractDemo; /** * A simple test program to demonstrate the use of native DOM support. * * @author <a href="mailto:james.strachan@metastuff.com">James Strachan </a> * @version $Revision: 1.4 $ */ public class NativeDOMDemo extends AbstractDemo { public static void main(String[] args) { run(new NativeDOMDemo(), args); } public NativeDOMDemo() { } public void run(String[] args) throws Exception { if (args.length < 1) { printUsage("<XML document URL>"); return; } parseDOM(args[0]); } protected void parseDOM(String xmlFile) throws Exception { println("Loading document: " + xmlFile); SAXReader reader = new SAXReader(DOMDocumentFactory.getInstance()); Document document = reader.read(xmlFile); println("Created <dom4j> document: " + document); if (document instanceof org.w3c.dom.Document) { org.w3c.dom.Document domDocument = (org.w3c.dom.Document) document; println("Created W3C DOM document: " + domDocument); processDOM(domDocument); } else { println("FAILED to make a native W3C DOM document!!"); } } protected void processDOM(org.w3c.dom.Document document) throws Exception { } } /* * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain copyright statements and * notices. Redistributions must also contain a copy of this document. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. The name "DOM4J" must not be used to endorse or promote products derived * from this Software without prior written permission of MetaStuff, Ltd. For * written permission, please contact dom4j-info@metastuff.com. * * 4. Products derived from this Software may not be called "DOM4J" nor may * "DOM4J" appear in their names without prior written permission of MetaStuff, * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd. * * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org * * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved. * * $Id: NativeDOMDemo.java,v 1.4 2005/01/29 14:52:58 maartenc Exp $ */
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
cf914f98f912fdc7ae63cabeffac3130c427c9c6
1f3a4e27a70aaa5c0accc66b089639a024e0af06
/src/main/java/me/paulf/fairylights/server/net/clientbound/OpenEditLetteredConnectionScreenMessage.java
198ac7f1836d8d8a7fe345b2beef065098af727f
[ "MIT" ]
permissive
Royal-Jelly/Fairy-Lights
e5b7a1eb8cb56451497264ea2f7e3dd716d21926
5f3c6fc06cc30215777ba232b616c1817584b27a
refs/heads/master
2023-09-02T20:57:45.033122
2021-04-18T04:27:56
2021-04-18T04:27:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,430
java
package me.paulf.fairylights.server.net.clientbound; import me.paulf.fairylights.client.gui.EditLetteredConnectionScreen; import me.paulf.fairylights.server.connection.Connection; import me.paulf.fairylights.server.connection.Lettered; import me.paulf.fairylights.server.net.ClientMessageContext; import me.paulf.fairylights.server.net.ConnectionMessage; import net.minecraft.client.Minecraft; import java.util.function.BiConsumer; public class OpenEditLetteredConnectionScreenMessage<C extends Connection & Lettered> extends ConnectionMessage { public OpenEditLetteredConnectionScreenMessage() {} public OpenEditLetteredConnectionScreenMessage(final C connection) { super(connection); } public static final class Handler implements BiConsumer<OpenEditLetteredConnectionScreenMessage<?>, ClientMessageContext> { @Override public void accept(final OpenEditLetteredConnectionScreenMessage<?> message, final ClientMessageContext context) { this.accept(message); } private <C extends Connection & Lettered> void accept(final OpenEditLetteredConnectionScreenMessage<C> message) { ConnectionMessage.<C>getConnection(message, c -> c instanceof Lettered, Minecraft.getInstance().world).ifPresent(connection -> { Minecraft.getInstance().displayGuiScreen(new EditLetteredConnectionScreen<>(connection)); }); } } }
[ "paul.fulham0@gmail.com" ]
paul.fulham0@gmail.com
acd2467bc78fb7b7fc0ab20933cf47400db5fdfb
8701a77d0837af819f8ed75716c98414840d492d
/src/main/java/br/com/delos/model/Role.java
31814bd7bf846b1c69656d25b96a7ee763c1c9c8
[]
no_license
andersonmarquesgit/delos
3986774dadc79cd1c0362d67a12876ee200321ac
09aaa380512c1354cdbd8cbff56d470fe029af3c
refs/heads/master
2020-06-28T05:00:47.412711
2017-01-26T19:04:43
2017-01-26T19:04:43
74,507,362
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package br.com.delos.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "tb_role") public class Role { @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="id") private Long id; @Column(name = "name", nullable = false) private String name; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "andersonmarques.ci@gmail.com" ]
andersonmarques.ci@gmail.com
28fa0aa6003c894c0497f61aa90d9708b3952d56
0baf7677c04ba49ebbb77bf87d0b89e5d0fa59a8
/cayenne-xmpp/src/test/java/org/apache/cayenne/event/XMPPModuleIT.java
1eaa82ca01b0c3f03b1ecb96a8ac7145cc6d53be
[ "Apache-2.0" ]
permissive
DalavanCloud/cayenne
7e7a664c16cff954f14fe9c4121c639a175cd617
77ba4b7d0906bf47e2136a8cbe0c0f128ecad6d6
refs/heads/master
2020-04-29T10:18:24.244156
2019-03-15T04:35:57
2019-03-15T04:35:57
176,057,472
1
0
null
2019-03-17T04:47:48
2019-03-17T04:47:47
null
UTF-8
Java
false
false
2,161
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.cayenne.event; import org.apache.cayenne.configuration.Constants; import org.apache.cayenne.configuration.server.ServerModule; import org.apache.cayenne.di.Binder; import org.apache.cayenne.di.DIBootstrap; import org.apache.cayenne.di.Injector; import org.apache.cayenne.di.Module; import org.junit.Test; import static org.hamcrest.CoreMatchers.instanceOf; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertThat; /** * @since 4.0 */ public class XMPPModuleIT { @Test public void testModule() { Module configModule = new Module() { public void configure(Binder binder) { ServerModule.contributeProperties(binder).put(Constants.SERVER_DOMAIN_NAME_PROPERTY, "test"); } }; Injector injector = DIBootstrap.createInjector(new ServerModule(), new XMPPModule(), configModule); EventBridge bridge = injector.getInstance(EventBridge.class); assertThat(bridge, instanceOf(XMPPBridge.class)); EventBridge bridge2 = injector.getInstance(EventBridge.class); assertThat(bridge2, instanceOf(XMPPBridge.class)); assertNotSame(bridge, bridge2); } }
[ "stariy95@gmail.com" ]
stariy95@gmail.com
befd4fc1a26679abba74a14815234fc51b031e9a
6e6611d33669e664d0da52ce1c904448590c77b3
/src/main/java/sonar/logistics/api/core/tiles/displays/info/comparators/IComparableProvider.java
d7258507c5ecace48179c3c6453d171d4696a168
[ "MIT" ]
permissive
SonarSonic/Practical-Logistics-2
f6c51a5df5e403b825411700378e554922582c4b
4772196103d35c78c33f03c288a7b47aac267197
refs/heads/1.12.X
2021-07-09T01:47:07.148850
2021-04-08T16:12:56
2021-04-08T16:12:56
80,627,523
27
20
MIT
2018-07-12T10:35:53
2017-02-01T14:26:07
Java
UTF-8
Java
false
false
225
java
package sonar.logistics.api.core.tiles.displays.info.comparators; import java.util.Map; public interface IComparableProvider<T> { void getComparableObjects(String parent, T obj, Map<LogicIdentifier, Object> objects); }
[ "ollielansdell@hotmail.co.uk" ]
ollielansdell@hotmail.co.uk
b9e2ab953fcba6e913bdcffabd31031172ebf677
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/13/1353.java
c1749812c545f027065c0f325803c88107bf985d
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
package <missing>; public class GlobalMembers { public static int Main() { int n; int[] number; int i; int j; int sum; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } number = new int[n]; for (i = 0;i < n;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { number[i] = Integer.parseInt(tempVar2); } } i = 0; while ((i < n) && (sum != 0)) { if ((i == n - 1) && (number[i] != 0)) { System.out.printf("%d",number[i]); } sum = 0; for (j = i + 1;j < n;j++) { if (number[j] == number[i]) { number[j] = 0; } sum += number[j]; } if ((sum != 0) && (number[i] != 0)) { System.out.printf("%d ",number[i]); } else if ((sum == 0) && (number[n - 1] == 0)) { System.out.printf("%d",number[i]); sum = 0; } i++; } //C++ TO JAVA CONVERTER TODO TASK: The memory management function 'free' has no equivalent in Java: free(number); return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
f671399f262a25f3fdc77d3cd3d306d38a0556fc
29fda4790bc9af48fe7510b600271fec66c9d102
/spring-cloud-provider-payment-8004/src/test/java/com/ky/apps/service/SpringCloudProviderPayment8004ApplicationTests.java
4a7949ecfe435bc464c1b3c48a56fc13005a068c
[]
no_license
ky2009888/spring-cloud-learn-2021
dd563bbe4b2deba7d6d9b9d0b3491fa6b6bb8caa
840effe4d0367b64c33b9151bcfcc9b4121fe81d
refs/heads/master
2023-04-14T13:23:52.830337
2021-04-25T08:19:06
2021-04-25T08:19:06
354,819,921
0
0
null
null
null
null
UTF-8
Java
false
false
244
java
package com.ky.apps.service; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class SpringCloudProviderPayment8004ApplicationTests { @Test void contextLoads() { } }
[ "ji_jinliang2012@163.com" ]
ji_jinliang2012@163.com
7ebe5637afb2bfcfe1661b619db3ff7c8656e513
4c1e68e97de6ffaba06e484ee7bb6250ece1e62b
/embl-api-ff/src/main/java/uk/ac/ebi/embl/flatfile/reader/FeatureLocationMatcher.java
ad36dc021861308bfc76665c3e8aff684687cf5b
[ "Apache-2.0" ]
permissive
ebi-wp/sequencetools
3f6d4e1b71f9c04381fc4d38b86e50d80edcc91d
f153055c6214351ee341279d43bfd36c1fc3abf1
refs/heads/master
2021-04-03T06:17:52.888129
2018-09-24T10:23:28
2018-09-26T10:45:32
124,373,736
0
0
null
null
null
null
UTF-8
Java
false
false
3,524
java
/******************************************************************************* * Copyright 2012 EMBL-EBI, Hinxton outstation * * 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 uk.ac.ebi.embl.flatfile.reader; import java.util.regex.Pattern; import uk.ac.ebi.embl.api.entry.location.LocationFactory; import uk.ac.ebi.embl.api.entry.location.Location; public class FeatureLocationMatcher extends FlatFileMatcher { public FeatureLocationMatcher(FlatFileLineReader reader) { super(reader, PATTERN); } private static final Pattern PATTERN = Pattern.compile( "(\\s*complement\\s*\\()?\\s*(?:(\\w+)\\s*(?:\\.(\\d+))?\\s*\\:\\s*)?\\s*(<)?(?:(\\d+)?\\s*(?:((?:\\.\\.)?|(?:\\^))\\s*(>)?\\s*(\\d+))?)\\)?\\s*\\)?"); private static final int GROUP_COMPLEMENT = 1; private static final int GROUP_ACCESSION = 2; private static final int GROUP_VERSION = 3; private static final int GROUP_LEFT_PARTIAL = 4; private static final int GROUP_BEGIN_POSITION = 5; private static final int GROUP_OPERATOR = 6; private static final int GROUP_RIGHT_PARTIAL = 7; private static final int GROUP_END_POSITION = 8; boolean leftPartial; boolean rightPartial; public Location getLocation() { Location location = null; boolean isComplement = isValue(GROUP_COMPLEMENT); leftPartial = isValue(GROUP_LEFT_PARTIAL); rightPartial = isValue(GROUP_RIGHT_PARTIAL); String accession = getString(GROUP_ACCESSION); Integer version = getInteger(GROUP_VERSION); LocationFactory locationFactory = new LocationFactory(); String operator = getString(GROUP_OPERATOR); if (operator == null) { if (accession != null) { location = locationFactory.createRemoteBase( accession, version, getLong(GROUP_BEGIN_POSITION)); } else { if (rightPartial) location = locationFactory.createLocalBase(getLong(GROUP_END_POSITION)); else location = locationFactory.createLocalBase(getLong(GROUP_BEGIN_POSITION)); } } else if (operator.equals("..")) { if (accession != null) { location = locationFactory.createRemoteRange( accession, version, getLong(GROUP_BEGIN_POSITION), getLong(GROUP_END_POSITION)); } else { location = locationFactory.createLocalRange( getLong(GROUP_BEGIN_POSITION), getLong(GROUP_END_POSITION)); } } else { if (accession != null) { location = locationFactory.createRemoteBetween( accession, version, getLong(GROUP_BEGIN_POSITION), getLong(GROUP_END_POSITION)); } else { location = locationFactory.createLocalBetween( getLong(GROUP_BEGIN_POSITION), getLong(GROUP_END_POSITION)); } } location.setComplement(isComplement); return location; } public boolean isLeftPartial() { return leftPartial; } public boolean isRightPartial() { return rightPartial; } }
[ "reddyk@REDDYK-W10D.windows.ebi.ac.uk" ]
reddyk@REDDYK-W10D.windows.ebi.ac.uk
2fdf3f3f5531c93f37d0b2cd4955fd635674c5cf
0016005ee6a22429433a4e0e66ff1303147179ec
/src/day32_Predicate/MoveZeros.java
7e09f928ee065f7092e3508960135f5212c791a7
[]
no_license
OrkhanMusayev/B18_JavaCourse
7d1fee404169ec7f45b20efc42456f0173577327
017a6cfca170ec0c0ace15fa5d5fb319529f2921
refs/heads/master
2022-12-10T06:03:38.178027
2020-08-22T23:31:10
2020-08-22T23:31:10
286,326,298
0
0
null
null
null
null
UTF-8
Java
false
false
1,122
java
package day32_Predicate; import java.util.ArrayList; import java.util.Arrays; /** *Write a program that can move all the zeros to last indexes of ArrayList * Ex: * list: {1,0,2,0,3,0,4,0}; * output: [1, 2, 3, 4, 0, 0, 0, 0] * DO NOT USE SORT method, DO NOT declear any extra lists */ public class MoveZeros { public static void main(String[]args){ ArrayList<Integer> list = new ArrayList<>(); list.addAll(Arrays.asList (1,0,2,0,3,0,4,0) ); System.out.println(list); int count=0; for(Integer each:list){ // step 1 - finding how many zero(frequency) do we have in the Array List if(each==0){ count++; } } System.out.println(count); // [1,2,3,4] list.removeAll(Arrays.asList(0)); // step 2 - remove all the zeros from the list System.out.println(list); // [1,2,3,4,0,0,0,0...] for(int i=0; i<count; i++){ // step 3 - depending count (how many zeros) i add all zeros at the end list.add(0); } System.out.println(list); } }
[ "mussayevorkhan@gmail.com" ]
mussayevorkhan@gmail.com
52f5e61a84ab8f49ae7b0773c9ecb7fee1976dd2
c188408c9ec0425666250b45734f8b4c9644a946
/open-sphere-plugins/geopackage/src/test/java/io/opensphere/geopackage/export/tile/walker/TopLevelGeometryProviderTest.java
5653d6893cc3e32ed60f78f1aa7beb9be9a69c85
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
rkausch/opensphere-desktop
ef8067eb03197c758e3af40ebe49e182a450cc02
c871c4364b3456685411fddd22414fd40ce65699
refs/heads/snapshot_5.2.7
2023-04-13T21:00:00.575303
2020-07-29T17:56:10
2020-07-29T17:56:10
360,594,280
0
0
Apache-2.0
2021-04-22T17:40:38
2021-04-22T16:58:41
null
UTF-8
Java
false
false
4,426
java
package io.opensphere.geopackage.export.tile.walker; import static org.junit.Assert.assertEquals; import java.util.Collection; import java.util.List; import org.easymock.EasyMock; import org.easymock.EasyMockSupport; import org.junit.Test; import io.opensphere.core.geometry.AbstractTileGeometry; import io.opensphere.core.geometry.Geometry; import io.opensphere.core.geometry.GeometryRegistry; import io.opensphere.core.geometry.ImageManager; import io.opensphere.core.geometry.TerrainTileGeometry; import io.opensphere.core.geometry.TileGeometry; import io.opensphere.core.geometry.TileGeometry.Builder; import io.opensphere.core.geometry.renderproperties.TileRenderProperties; import io.opensphere.core.geometry.renderproperties.ZOrderRenderProperties; import io.opensphere.core.image.ImageProvider; import io.opensphere.core.model.GeographicBoundingBox; import io.opensphere.core.model.GeographicPosition; import io.opensphere.core.model.LatLonAlt; import io.opensphere.core.util.collections.New; /** * Unit test for {@link TopLevelGeometryProvider}. */ public class TopLevelGeometryProviderTest { /** * Tests getting the appropriate top level geometries. */ @Test public void testGetTopLevelGeometries() { EasyMockSupport support = new EasyMockSupport(); TileRenderProperties props = support.createNiceMock(TileRenderProperties.class); ZOrderRenderProperties zProps = support.createNiceMock(ZOrderRenderProperties.class); @SuppressWarnings("unchecked") ImageProvider<String> imageProvider = support.createNiceMock(ImageProvider.class); ImageManager imageManager = new ImageManager("key", imageProvider); Geometry geometry = support.createMock(Geometry.class); Collection<Geometry> geometries = New.list(); GeometryRegistry geomRegistry = createGeomRegistry(support, geometries); support.replayAll(); GeographicBoundingBox outside = new GeographicBoundingBox(LatLonAlt.createFromDegrees(5, -5), LatLonAlt.createFromDegrees(10, .0001)); GeographicBoundingBox intersects = new GeographicBoundingBox(LatLonAlt.createFromDegrees(5, -5), LatLonAlt.createFromDegrees(10, 15)); GeographicBoundingBox contained = new GeographicBoundingBox(LatLonAlt.createFromDegrees(2, 2), LatLonAlt.createFromDegrees(7, 7)); TileGeometry.Builder<GeographicPosition> builder = new Builder<>(); builder.setBounds(outside); TileGeometry outSideGeom = new TileGeometry(builder, props, null, "notmine"); builder = new Builder<>(); builder.setBounds(intersects); TileGeometry intersectsGeom = new TileGeometry(builder, props, null, "mine"); TerrainTileGeometry.Builder<GeographicPosition> terrainBuilder = new TerrainTileGeometry.Builder<>(); terrainBuilder.setBounds(contained); terrainBuilder.setImageManager(imageManager); TerrainTileGeometry containedGeom = new TerrainTileGeometry(terrainBuilder, zProps, "mine"); geometries.add(geometry); geometries.add(outSideGeom); geometries.add(intersectsGeom); geometries.add(containedGeom); TopLevelGeometryProvider provider = new TopLevelGeometryProvider(geomRegistry); List<AbstractTileGeometry<?>> tops = provider.getTopLevelGeometries("mine"); assertEquals(2, tops.size()); assertEquals(intersectsGeom.getBounds(), tops.get(0).getBounds()); org.junit.Assert.assertNotSame(intersectsGeom, tops.get(0)); assertEquals(containedGeom.getBounds(), tops.get(1).getBounds()); org.junit.Assert.assertNotSame(containedGeom, tops.get(1)); support.verifyAll(); } /** * Creates the easy mocked {@link GeometryRegistry}. * * @param support Used to create the mock. * @param geometriesToReturn The geometries to return. * @return The mocked {@link GeometryRegistry}. */ private GeometryRegistry createGeomRegistry(EasyMockSupport support, Collection<Geometry> geometriesToReturn) { GeometryRegistry geoRegistry = support.createMock(GeometryRegistry.class); EasyMock.expect(geoRegistry.getGeometries()).andReturn(geometriesToReturn); return geoRegistry; } }
[ "kauschr@opensphere.io" ]
kauschr@opensphere.io
f354bc346ca60841afe80d660ee863bd747a873c
f18ac382ebddebb2eca688227ba8af5536e75fa5
/jdi-light-html/src/main/java/com/epam/jdi/light/ui/html/complex/RadioButtons.java
8f83fac298743466569a667c8ca0e26b4c20e47a
[ "MIT" ]
permissive
anisa07/jdi-light-1
d7bcd71c91d96672dfe2dd663668590be6385739
c2202a95dce282be8a0a1d935fcc235d91e7b067
refs/heads/master
2020-07-25T11:07:46.530867
2019-08-15T10:40:13
2019-08-15T10:40:13
208,268,995
0
0
MIT
2019-09-13T13:21:00
2019-09-13T13:21:00
null
UTF-8
Java
false
false
286
java
package com.epam.jdi.light.ui.html.complex; import com.epam.jdi.light.ui.html.base.BaseSelector; public interface RadioButtons extends BaseSelector { void select(String value); <TEnum extends Enum> void select(TEnum value); void select(int index); String selected(); }
[ "romanyister@gmail.com" ]
romanyister@gmail.com
270568ecb71e01b49498a08f2296ab8d8a25278e
4572bcab49eec6a44dfe97cfceb6c96232093fa2
/j360-trace-core/src/main/java/me/j360/trace/core/collector/CollectorComponent.java
b3ca289442e347c7fb64e21f0050dc5a9d30ca9d
[]
no_license
hhhcommon/j360-trace
24d014e81f06c34e2a7f322407d22ab3031c18ce
b2378a39af13edbfea3e13fe2b67413decb36379
refs/heads/master
2020-03-30T00:41:51.681189
2017-04-27T10:17:06
2017-04-27T10:17:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,069
java
/** * Copyright 2015-2016 The OpenZipkin 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 me.j360.trace.core.collector; import me.j360.trace.core.Component; import me.j360.trace.core.Span; import me.j360.trace.core.storage.AsyncSpanConsumer; import me.j360.trace.core.storage.Callback; import me.j360.trace.core.storage.StorageComponent; import java.util.List; /** * The collector represents the server-side of a transport. Its job is to take spans from a * transport and store ones it has sampled. * * <p>Call {@link #start()} to start collecting spans. */ public interface CollectorComponent extends Component { /** * Starts the server-side of the transport, typically listening or looking up a queue. * * <p>Many implementations block the calling thread until services are available. */ CollectorComponent start(); interface Builder { /** * Once spans are sampled, they are {@link AsyncSpanConsumer#accept(List, Callback) queued for * storage} using this component. */ Builder storage(StorageComponent storage); /** * Aggregates and reports collection metrics to a monitoring system. Should be {@link * CollectorMetrics#forTransport(String) scoped to this transport}. Defaults to no-op. */ Builder metrics(CollectorMetrics metrics); /** * {@link CollectorSampler#isSampled(Span) samples spans} to reduce load on the storage system. * Defaults to always sample. */ Builder sampler(CollectorSampler sampler); CollectorComponent build(); } }
[ "xumin_wlt@163.com" ]
xumin_wlt@163.com
0e973189f21270207805c8911964cf9586429970
89470ecfa6c4cfddb18e4b0191ecbaecc4d580c0
/koala-bpm/koala-bpm-core/koala-bpm-core-bizmodel/src/main/java/org/openkoala/bpm/core/KoalaProcessInfo.java
0796c66584c31106432710c0049b224eb76c5d8f
[]
no_license
xuliugen/koala-project
9019188f583c12c2346d178ce695db436dc622f0
9fc1d5be65abbae66b8c6788257b33b279cedc7d
refs/heads/master
2021-01-10T01:18:25.255922
2016-01-03T01:28:31
2016-01-03T01:28:31
47,016,537
0
3
null
null
null
null
UTF-8
Java
false
false
7,093
java
package org.openkoala.bpm.core; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Lob; import org.dayatang.domain.AbstractEntity; import org.dayatang.domain.CriteriaQuery; import org.openkoala.koala.commons.domain.KoalaAbstractEntity; /** * * @author lingen * */ @Entity public class KoalaProcessInfo extends KoalaAbstractEntity{ /** * */ private static final long serialVersionUID = 1L; /** * 包名,如defaultPackage */ private String packageName; /** * 流程定义 ID,包括版本号的,如defaultPackage.Trade@2 */ private String processId; /** * 流程定义 ID,不包括版本号,如defaultPackage.Trade */ private String processName; private Date createDate; /** * 版本号 */ private int versionNum; private String description; private boolean isActive; /** * 流程定义XML 的二进制存储 */ @Lob @Column(length=2147483647) private byte[] data; /** * 图片的二进制存储 */ @Lob @Column(length=2147483647) private byte[] png; public KoalaProcessInfo() { super(); } public KoalaProcessInfo(String porcessName,int version,String xmlData,byte[] png){ this.processId = porcessName + "@"+version; this.processName = porcessName; this.versionNum = version; this.data = xmlData.getBytes(); this.png = png; } public String getProcessName() { return processName; } public void setProcessName(String processName) { this.processName = processName; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public int getVersionNum() { return versionNum; } public void setVersionNum(int versionNum) { this.versionNum = versionNum; } public byte[] getData() { return data; } public void setData(byte[] data) { this.data = data; } public String getProcessId() { return processId; } public void setProcessId(String processId) { this.processId = processId; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((createDate == null) ? 0 : createDate.hashCode()); result = prime * result + Arrays.hashCode(data); result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((processId == null) ? 0 : processId.hashCode()); result = prime * result + ((processName == null) ? 0 : processName.hashCode()); result = prime * result + this.versionNum; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; KoalaProcessInfo other = (KoalaProcessInfo) obj; if (processId == null) { if (other.processId != null) return false; } else if (!processId.equals(other.processId)) return false; if (processName == null) { if (other.processName != null) return false; } else if (!processName.equals(other.processName)) return false; if (this.versionNum != other.versionNum) return false; return true; } @Override public String toString() { return "KoalaProcessInfo [processId=" + processId + ", processName=" + processName + ", createDate=" + createDate + ", version=" + versionNum + ", description=" + description + ", data=" + Arrays.toString(data) + "]"; } public byte[] getPng() { return png; } public void setPng(byte[] png) { this.png = png; } public boolean isActive() { return isActive; } public void setActive(boolean isActive) { this.isActive = isActive; } public String getPackageName() { return packageName; } public void setPackageName(String packageName) { this.packageName = packageName; } /** * 返回激活的流程 * @return */ public static List<KoalaProcessInfo> getActiveProcess(){ String hql = "from KoalaProcessInfo k where k.active is true"; List<KoalaProcessInfo> processes = getRepository().createJpqlQuery(hql).list(); return processes; } /** * 返回所有的包 * @return */ public static List<String> getPackages(){ String hql = "select distinct k.packageName from KoalaProcessInfo k"; List<String> packages = getRepository().createJpqlQuery(hql).list(); return packages; } /** * 返回一个包下的所有流程 * @param packageName * @return */ public static List<String> getProcessByPackage(String packageName){ String hql = "select distinct k.processName from KoalaProcessInfo k where k.packageName = :packageName"; List<String> packages = getRepository().createJpqlQuery(hql).addParameter("packageName", packageName).list(); return packages; } public static List<String> getProcess(){ String hql = "select distinct k.processName from KoalaProcessInfo k"; List<String> packages = getRepository().createJpqlQuery(hql).list(); return packages; } /** * 按流程名下的所有版本的流程 * @param processName * @return */ public static List<KoalaProcessInfo> getProcessByProcessName(String processName){ String hql = "from KoalaProcessInfo k where k.processName = :processName order by versionNum"; List<KoalaProcessInfo> processes = getRepository().createJpqlQuery(hql).addParameter("processName", processName).list(); return processes; } /** * 返回一个流程下部署的所有版本 * @param processId * @return */ public static List<KoalaProcessInfo> getProcessVersionByProcessId(String processId){ return getRepository().createJpqlQuery("from KoalaProcessInfo k where k.processName =:processName").addParameter("processName", processId).list(); } public static KoalaProcessInfo getProcessInfoByProcessNameAndVersion(String processName,int versionNum){ String jpql = "from KoalaProcessInfo k where k.processName = :processName and k.versionNum = :versionNum and k.active is true"; KoalaProcessInfo info = getRepository().createJpqlQuery(jpql).addParameter("processName", processName).addParameter("versionNum", versionNum).singleResult(); return info; } public void publishProcess(){ //如果当前流程在数据库中没有激活的流程,则这一次始终为激活的流程 //getRepository().executeUpdate("update KoalaProcessInfo k set k.isActive = false where k.processName = ?", new Object[]{processName}); setActive(true); setCreateDate(new Date()); } @Override public String[] businessKeys() { return new String[]{}; } public static KoalaProcessInfo findKoalaProcessInfo( Map<String, Object> params) { CriteriaQuery query = getRepository().createCriteriaQuery(KoalaProcessInfo.class); Set<String> keys = params.keySet(); for(String key:keys){ query.eq(key, params.get(key)); } return query.singleResult(); } }
[ "1573876303@qq.com" ]
1573876303@qq.com
13b334afb693dd3b1cb5cc44dec5d30a8bdea670
9f3207f75a72a745b176a59f952a6f4cbb5aed53
/src/witajNrazy/WitajNrazy.java
a1c3044f15f1425b41ffa85befb4d981bba08c11
[]
no_license
KrzysztofKaczynski/Zadania
5c5de07feab3ec5235a2598631ee30cffe5a4244
55bb1b5c36cd616234c2116cf8fb109868f95d8f
refs/heads/master
2020-03-17T17:30:14.756449
2018-05-23T13:30:21
2018-05-23T13:30:21
131,517,763
0
0
null
null
null
null
UTF-8
Java
false
false
252
java
package witajNrazy; import com.sun.deploy.util.StringUtils; import java.util.Collections; public class WitajNrazy { public static void main(String[] args) { System.out.print(String.join("",Collections.nCopies(10, " \n DUPA "))); } }
[ "qris70@gmail.com" ]
qris70@gmail.com
12a18aaef08482ba76606aa7b8ff7445d6654c5c
596d59292b2355e93f57c1d55f107664adda4e10
/app/src/main/java/com/rackluxury/lamborghini/reddit/adapters/RulesRecyclerViewAdapter.java
0624aa813b520dc8896518b951fd6f490476265c
[]
no_license
HarshAProgrammer/Lamborghini
25dd82af51f29c4d2c4fa4a90c651c3a59b57434
6e2a4eda873a376f2d05b74048d7f2e8ea227811
refs/heads/master
2023-08-01T03:33:05.151537
2021-09-13T16:26:58
2021-09-13T16:26:58
405,989,932
0
0
null
null
null
null
UTF-8
Java
false
false
5,344
java
package com.rackluxury.lamborghini.reddit.adapters; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.text.util.Linkify; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import butterknife.BindView; import butterknife.ButterKnife; import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.Markwon; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.core.MarkwonTheme; import io.noties.markwon.ext.strikethrough.StrikethroughPlugin; import io.noties.markwon.html.HtmlPlugin; import io.noties.markwon.linkify.LinkifyPlugin; import io.noties.markwon.movement.MovementMethodPlugin; import me.saket.bettermovementmethod.BetterLinkMovementMethod; import com.rackluxury.lamborghini.R; import com.rackluxury.lamborghini.reddit.Rule; import com.rackluxury.lamborghini.reddit.activities.RedditLinkResolverActivity; import com.rackluxury.lamborghini.reddit.bottomsheetfragments.UrlMenuBottomSheetFragment; import com.rackluxury.lamborghini.reddit.customtheme.CustomThemeWrapper; public class RulesRecyclerViewAdapter extends RecyclerView.Adapter<RulesRecyclerViewAdapter.RuleViewHolder> { private final Markwon markwon; private ArrayList<Rule> rules; private final int mPrimaryTextColor; private final int mSecondaryTextColor; public RulesRecyclerViewAdapter(AppCompatActivity activity, CustomThemeWrapper customThemeWrapper) { markwon = Markwon.builder(activity) .usePlugin(HtmlPlugin.create()) .usePlugin(new AbstractMarkwonPlugin() { @Override public void configureConfiguration(@NonNull MarkwonConfiguration.Builder builder) { builder.linkResolver((view, link) -> { Intent intent = new Intent(activity, RedditLinkResolverActivity.class); Uri uri = Uri.parse(link); intent.setData(uri); activity.startActivity(intent); }); } @Override public void configureTheme(@NonNull MarkwonTheme.Builder builder) { builder.linkColor(customThemeWrapper.getLinkColor()); } }) .usePlugin(MovementMethodPlugin.create(BetterLinkMovementMethod.linkify(Linkify.WEB_URLS, activity).setOnLinkLongClickListener((textView, url) -> { if (activity != null && !activity.isDestroyed() && !activity.isFinishing()) { UrlMenuBottomSheetFragment urlMenuBottomSheetFragment = new UrlMenuBottomSheetFragment(); Bundle bundle = new Bundle(); bundle.putString(UrlMenuBottomSheetFragment.EXTRA_URL, url); urlMenuBottomSheetFragment.setArguments(bundle); urlMenuBottomSheetFragment.show(activity.getSupportFragmentManager(), urlMenuBottomSheetFragment.getTag()); } return true; }))) .usePlugin(LinkifyPlugin.create(Linkify.WEB_URLS)) .usePlugin(StrikethroughPlugin.create()) .build(); mPrimaryTextColor = customThemeWrapper.getPrimaryTextColor(); mSecondaryTextColor = customThemeWrapper.getSecondaryTextColor(); } @NonNull @Override public RuleViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return new RuleViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_rule, parent, false)); } @Override public void onBindViewHolder(@NonNull RuleViewHolder holder, int position) { holder.shortNameTextView.setText(rules.get(holder.getAdapterPosition()).getShortName()); if (rules.get(holder.getAdapterPosition()).getDescriptionHtml() == null) { holder.descriptionMarkwonView.setVisibility(View.GONE); } else { markwon.setMarkdown(holder.descriptionMarkwonView, rules.get(holder.getAdapterPosition()).getDescriptionHtml()); } } @Override public int getItemCount() { return rules == null ? 0 : rules.size(); } @Override public void onViewRecycled(@NonNull RuleViewHolder holder) { super.onViewRecycled(holder); holder.descriptionMarkwonView.setVisibility(View.VISIBLE); } public void changeDataset(ArrayList<Rule> rules) { this.rules = rules; notifyDataSetChanged(); } class RuleViewHolder extends RecyclerView.ViewHolder { @BindView(R.id.short_name_text_view_item_rule) TextView shortNameTextView; @BindView(R.id.description_markwon_view_item_rule) TextView descriptionMarkwonView; RuleViewHolder(@NonNull View itemView) { super(itemView); ButterKnife.bind(this, itemView); shortNameTextView.setTextColor(mPrimaryTextColor); descriptionMarkwonView.setTextColor(mSecondaryTextColor); } } }
[ "App.Lavishly@Gmail.com" ]
App.Lavishly@Gmail.com
40db77593d7167b5fb3c03e09ce65bed0c3d26df
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/10/org/jfree/chart/plot/FastScatterPlot_getPlotType_210.java
64990261be1f932c42fa2d8c91f2563676020b3e
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,257
java
org jfree chart plot fast scatter plot fast scatter plot fastscatterplot plot axi plot valueaxisplot return string describ plot type string describ plot type string plot type getplottyp local resourc localizationresourc string getstr fast scatter plot
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
ccbe4b135ceb0731846d59a28ce8ad6f51c44d77
6e4594667da81670bcaf8f763ea03ef692728490
/yourong-web/src/main/java/com/yourong/web/dto/LeaseBonusDetailDto.java
e10585c35931c59bca18851a7ed69e58f7bed000
[]
no_license
cenbow/Daisy
d669db7e80677f9dc6162e78b1b150d31e649d56
29a83841acefbe55631b32c51f1f8af723bea20d
refs/heads/master
2021-01-20T08:31:54.755391
2017-04-28T09:40:28
2017-04-28T09:40:28
90,162,687
0
1
null
2017-05-03T15:11:00
2017-05-03T15:11:00
null
UTF-8
Java
false
false
518
java
package com.yourong.web.dto; import java.math.BigDecimal; import java.util.Date; public class LeaseBonusDetailDto { /** 分红值 **/ private BigDecimal bonusAmount; /** 创建时间 **/ private Date createTime; public BigDecimal getBonusAmount() { return bonusAmount; } public void setBonusAmount(BigDecimal bonusAmount) { this.bonusAmount = bonusAmount; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
[ "zheng.qiujun@yrw.com" ]
zheng.qiujun@yrw.com
12417b5c33e1b92a96df5390afddc627f6ce576f
4fd9cd39f1e4f2f5534c7d5232dd5c4ba9a69f59
/src/main/java/com/papaya/multithreading/JavaPrinter.java
af39846ca46912e8334d43ba21cccfc96083d774
[]
no_license
Jeka1978/papaya-training
60e5db0eff923551cafdbeced9151362b4ad74a4
9dc9f3469627538a59231c186a2320977996865a
refs/heads/master
2023-03-08T03:38:46.625722
2021-02-24T14:17:59
2021-02-24T14:17:59
290,249,584
1
2
null
null
null
null
UTF-8
Java
false
false
675
java
package com.papaya.multithreading; import lombok.AllArgsConstructor; import lombok.Setter; import lombok.SneakyThrows; /** * @author Evgeny Borisov */ public class JavaPrinter implements Runnable { @Setter private boolean moreWorkToDo=true; public void killProcess() throws InterruptedException { moreWorkToDo = false; throw new InterruptedException(); } @Override public void run() { while (moreWorkToDo) { System.out.println("java"); try { Thread.sleep(7000); } catch (InterruptedException e) { moreWorkToDo=false; } } } }
[ "kit2009" ]
kit2009
d070dae5d3e39452fdb846336b3e52276e6585c4
e17f8e9f5b7a4f813287ab20a90f066111913fe5
/Xelenium_2_28/src/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMetaElement.java
20ac5a0a88ac8cc9382d2c524d4e9e8f9da5eb74
[]
no_license
VVasanth/xelenium
df993684efae0900ca7c70c9d63e739608780760
ad2b3902d4f9ecacc8063727c1a5f219d0f9bb98
refs/heads/master
2021-01-10T20:59:17.392193
2013-05-17T11:52:09
2013-05-17T11:52:09
10,121,359
1
2
null
null
null
null
UTF-8
Java
false
false
3,848
java
/* * Copyright (c) 2002-2012 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.javascript.host.html; import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.IE; import com.gargoylesoftware.htmlunit.html.HtmlMeta; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; import com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser; /** * The JavaScript object "HTMLMetaElement". * * @version $Revision: 7457 $ * @author Ahmed Ashour */ @JsxClass(domClasses = HtmlMeta.class) public class HTMLMetaElement extends HTMLElement { /** * Creates an instance. */ public HTMLMetaElement() { // Empty. } /** * Returns "charset" attribute. * @return the charset attribute */ @JsxGetter(@WebBrowser(IE)) public String getCharset() { return ""; } /** * Sets the "charset" attribute. * @param charset the charset attribute */ @JsxSetter(@WebBrowser(IE)) public void setCharset(final String charset) { //empty } /** * Returns "content" attribute. * @return the content attribute */ @JsxGetter public String getContent() { return getDomNodeOrDie().getAttribute("content"); } /** * Sets the "content" attribute. * @param content the content attribute */ @JsxSetter public void setContent(final String content) { getDomNodeOrDie().setAttribute("content", content); } /** * Returns "http-equiv" attribute. * @return the http-equiv attribute */ @JsxGetter public String getHttpEquiv() { return getDomNodeOrDie().getAttribute("http-equiv"); } /** * Sets the "http-equiv" attribute. * @param httpEquiv the http-equiv attribute */ @JsxSetter public void setHttpEquiv(final String httpEquiv) { getDomNodeOrDie().setAttribute("http-equiv", httpEquiv); } /** * Returns "name" attribute. * @return the name attribute */ @JsxGetter public String getName() { return getDomNodeOrDie().getAttribute("name"); } /** * Sets the "name" attribute. * @param name the name attribute */ @JsxSetter public void setName(final String name) { getDomNodeOrDie().setAttribute("name", name); } /** * Returns "scheme" attribute. * @return the scheme attribute */ @JsxGetter public String getScheme() { return getDomNodeOrDie().getAttribute("scheme"); } /** * Sets the "scheme" attribute. * @param scheme the scheme attribute */ @JsxSetter public void setScheme(final String scheme) { getDomNodeOrDie().setAttribute("scheme", scheme); } /** * Returns "url" attribute. * @return the url attribute */ @JsxGetter(@WebBrowser(IE)) public String getUrl() { return ""; } /** * Sets the "url" attribute. * @param url the url attribute */ @JsxSetter(@WebBrowser(IE)) public void setUrl(final String url) { //empty } }
[ "vvk.victory@gmail.com" ]
vvk.victory@gmail.com
dabea98d6ae009480243ca3482e2137eb560d5cc
61f4bce6d63d39c03247c35cfc67e03c56e0b496
/src/dyno/swing/designer/beans/adapters/borders/SoftBevelBorderModel.java
a0af40062e7065d47a7dffe0a64c95f2fca0b80b
[]
no_license
phalex/swing_designer
570cff4a29304d52707c4fa373c9483bbdaa33b9
3e184408bcd0aab6dd5b4ba8ae2aaa3f846963ff
refs/heads/master
2021-01-01T20:38:49.845289
2012-12-17T06:50:11
2012-12-17T06:50:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,203
java
/* * BevelBorderModel.java * * Created on 2007-8-27, 21:47:22 * * To change this template, choose Tools | Templates * and open the template in the editor. */ package dyno.swing.designer.beans.adapters.borders; import java.awt.Color; import javax.swing.border.SoftBevelBorder; /** * * @author William Chen */ public class SoftBevelBorderModel extends BevelBorderModel { public SoftBevelBorderModel(SoftBevelBorder border) { super(border); } public boolean setValue(Object value, int row, int column) { if (column == 0) { return false; } else { switch (row) { case 0: int v = SoftBevelBorder.RAISED; if (value != null) { v = ((Number) value).intValue(); } border = new SoftBevelBorder(v, border.getHighlightOuterColor(), border.getHighlightInnerColor(), border.getShadowOuterColor(), border.getShadowInnerColor()); return true; case 1: Color c =(Color) value; border = new SoftBevelBorder(border.getBevelType(), c, border.getHighlightInnerColor(), border.getShadowOuterColor(), border.getShadowInnerColor()); return true; case 2: c = (Color) value; border = new SoftBevelBorder(border.getBevelType(), border.getHighlightOuterColor(), c, border.getShadowOuterColor(), border.getShadowInnerColor()); return true; case 3: c = (Color) value; border = new SoftBevelBorder(border.getBevelType(), border.getHighlightOuterColor(), border.getHighlightInnerColor(), border.getShadowOuterColor(), c); return true; case 4: c = (Color) value; border = new SoftBevelBorder(border.getBevelType(), border.getHighlightOuterColor(), border.getHighlightInnerColor(), c, border.getShadowInnerColor()); return true; default: return false; } } } }
[ "584874132@qq.com" ]
584874132@qq.com
1af94bf2a7546b7814c79bfe11f8e1d79a9c64fa
71c714af5ebe863949a3a1615d31f5b6e8cf3808
/web-server/src/main/java/pt/ipg/ei/cloud/menu/guice/AppGSCL.java
eee79f6534c147335f89af53548803e09731ef93
[]
no_license
fabm/cloud-menu
17aa7852f53ef049fb1087eaf134b503ae9a7c6d
e5ea7198b2b83a31b67f0fa2a19f070a93838206
refs/heads/master
2021-01-10T12:09:50.711340
2016-01-17T09:49:35
2016-01-17T09:49:35
47,506,488
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package pt.ipg.ei.cloud.menu.guice; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.servlet.GuiceServletContextListener; public class AppGSCL extends GuiceServletContextListener { @Override protected Injector getInjector() { System.out.println("creating injector"); return Guice.createInjector(new AppModule(),new ServletModuleImp(),new GuiceSSSModule()); } }
[ "francisco.ab.monteiro@gmail.com" ]
francisco.ab.monteiro@gmail.com
875be5f9f482c73c20b7a41806f161633b2e54a5
7872a7570269708aa3d443561b9d064ca9e2a1d7
/web/src/test/java/hu/psprog/leaflet/web/rest/conversion/routing/FrontEndRouteVOToExtendedFrontEndRouteDataModelListConverterTest.java
f9858f674d6e670a05ad3f51542698746b7ab55f
[]
no_license
petersmith-hun/leaflet-backend
2dee975662ee2b53e971661c773a3e322415b7f7
f6e0072520555a0c837468fd85e4434aa037487d
refs/heads/master
2023-07-19T08:29:44.899936
2023-07-09T15:19:09
2023-07-09T15:19:09
59,896,821
0
0
null
2023-07-09T15:19:11
2016-05-28T13:51:04
Java
UTF-8
Java
false
false
1,449
java
package hu.psprog.leaflet.web.rest.conversion.routing; import hu.psprog.leaflet.api.rest.response.routing.ExtendedFrontEndRouteListDataModel; import hu.psprog.leaflet.web.test.ConversionTestObjects; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import java.util.Collections; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; import static org.mockito.BDDMockito.given; /** * Unit tests for {@link FrontEndRouteVOToExtendedFrontEndRouteDataModelListConverter}. * * @author Peter Smith */ @ExtendWith(MockitoExtension.class) public class FrontEndRouteVOToExtendedFrontEndRouteDataModelListConverterTest extends ConversionTestObjects { @Mock private FrontEndRouteVOToExtendedFrontEndRouteDataModelConverter singleConverter; @InjectMocks private FrontEndRouteVOToExtendedFrontEndRouteDataModelListConverter converter; @Test public void shouldConvert() { // given given(singleConverter.convert(FRONT_END_ROUTE_VO)).willReturn(EXTENDED_FRONT_END_ROUTE_DATA_MODEL); // when ExtendedFrontEndRouteListDataModel result = converter.convert(Collections.singletonList(FRONT_END_ROUTE_VO)); // then assertThat(result, equalTo(EXTENDED_FRONT_END_ROUTE_LIST_DATA_MODEL)); } }
[ "peter.kovacs0519@gmail.com" ]
peter.kovacs0519@gmail.com
d4a9bd1648adba86a7f8f30edb5dcbbfc5993e21
c188408c9ec0425666250b45734f8b4c9644a946
/open-sphere-base/core/src/main/java/io/opensphere/core/pipeline/renderer/buffered/PolylineDataBuffered.java
6fe9df2d6f5a72b2e4d4046ba18e47b5a75a9cf1
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
rkausch/opensphere-desktop
ef8067eb03197c758e3af40ebe49e182a450cc02
c871c4364b3456685411fddd22414fd40ce65699
refs/heads/snapshot_5.2.7
2023-04-13T21:00:00.575303
2020-07-29T17:56:10
2020-07-29T17:56:10
360,594,280
0
0
Apache-2.0
2021-04-22T17:40:38
2021-04-22T16:58:41
null
UTF-8
Java
false
false
4,517
java
package io.opensphere.core.pipeline.renderer.buffered; import java.nio.FloatBuffer; import java.util.Collection; import java.util.Collections; import java.util.List; import io.opensphere.core.model.time.TimeSpan; import io.opensphere.core.pipeline.processor.PolylineModelData; import io.opensphere.core.pipeline.renderer.buffered.PolylineDataBuffered.PolylineDataBufferedBlock; import io.opensphere.core.pipeline.util.ShaderRendererUtilities; import io.opensphere.core.util.BufferUtilities; import io.opensphere.core.util.MathUtil; import io.opensphere.core.util.collections.New; /** * Wrapper for handling buffering of polyline geometry data. */ public class PolylineDataBuffered extends BufferObjectList<PolylineDataBufferedBlock> { /** * Create buffer objects for each of the polyline pieces. * * @param data A collection of polylines pieces. * @param groupTimeSpan If non-null this will be used to upload time * constraint information. * @return The buffered objects for the polyline pieces. */ private static List<? extends PolylineDataBufferedBlock> getBufferObjects(Collection<PolylineModelData> data, TimeSpan groupTimeSpan) { List<PolylineDataBufferedBlock> blocks = New.list(); for (PolylineModelData datum : data) { blocks.add(new PolylineDataBufferedBlock(datum, groupTimeSpan)); } return blocks; } /** * Constructor. * * @param data A collection of polylines pieces. * @param groupTimeSpan If non-null this will be used to upload time * constraint information. */ public PolylineDataBuffered(Collection<PolylineModelData> data, TimeSpan groupTimeSpan) { super(getBufferObjects(data, groupTimeSpan)); } /** * Constructor. * * @param data The model coordinate data. * @param groupTimeSpan If non-null this will be used to upload time * constraint information. */ public PolylineDataBuffered(PolylineModelData data, TimeSpan groupTimeSpan) { super(Collections.singletonList(new PolylineDataBufferedBlock(data, groupTimeSpan))); } /** A block which backs part or all of the geometry. */ protected static class PolylineDataBufferedBlock extends BufferObjectList<BufferObject> { /** * Create the buffer objects for this polyline. * * @param data The model data. * @param groupTimeSpan If non-null this will be used to upload time * constraint information. * * @return The list of buffer objects. */ private static List<? extends BufferObject> getBufferObjects(PolylineModelData data, TimeSpan groupTimeSpan) { List<BufferObject> bufferObjects = New.list(2); TimeSpan[] timeSpans = data.getTimeSpans(); if (groupTimeSpan != null && timeSpans != null) { long groupStart = groupTimeSpan.getStart(); long groupEnd = groupTimeSpan.getEnd(); int vectorCount = data.getVectorCount(); FloatBuffer timeIntervals = BufferUtilities.newFloatBuffer(vectorCount * 2); for (int index = 0; index < vectorCount; ++index) { float st = MathUtil.getModulatedFloat(timeSpans[index].getStart(groupStart), groupStart, groupEnd); timeIntervals.put(st); float en = MathUtil.getModulatedFloat(timeSpans[index].getEnd(groupEnd), groupStart, groupEnd); timeIntervals.put(en); } bufferObjects.add(new VertexAttributeBufferObject( ShaderRendererUtilities.INTERVAL_FILTER_VERTEX_TIME_ATTRIBUTE_NAME, timeIntervals)); } bufferObjects.add(new VertexBufferObject(data.getBuffer(), true)); return bufferObjects; } /** * Constructor. * * @param data The model coordinate data. * @param groupTimeSpan If non-null this will be used to upload time * constraint information. */ public PolylineDataBufferedBlock(PolylineModelData data, TimeSpan groupTimeSpan) { super(getBufferObjects(data, groupTimeSpan)); } } }
[ "kauschr@opensphere.io" ]
kauschr@opensphere.io
dddb01762d54c62945e0cd675c5bd9ec7c6cd51f
7e845b6940f896fb81b8f5a7ef525ba5a27073a8
/shijingsh-ai-rns/src/main/java/com/shijingsh/rns/model/context/rating/SoRecModel.java
d69f34a87290298c0199a6323d939321e1615738
[ "Apache-2.0" ]
permissive
shijingsh/shijingsh-ai
9ae48ac27677999406868139b8daf93df89bbc18
b4c0be173bc4f2e29e6ef19e861bba9460596cbc
refs/heads/master
2022-10-07T05:03:54.637990
2020-05-08T06:47:42
2020-05-08T06:47:42
244,068,779
1
1
null
2022-10-05T04:04:45
2020-03-01T01:38:32
Java
UTF-8
Java
false
false
7,478
java
package com.shijingsh.rns.model.context.rating; import java.util.ArrayList; import java.util.List; import com.shijingsh.ai.data.DataInstance; import com.shijingsh.ai.data.DataModule; import com.shijingsh.ai.data.DataSpace; import com.shijingsh.ai.math.structure.DefaultScalar; import com.shijingsh.ai.math.structure.MathCalculator; import com.shijingsh.ai.math.structure.matrix.DenseMatrix; import com.shijingsh.ai.math.structure.matrix.MatrixScalar; import com.shijingsh.core.utility.Configurator; import com.shijingsh.core.utility.RandomUtility; import com.shijingsh.rns.model.SocialModel; import com.shijingsh.rns.utility.LogisticUtility; /** * * SoRec推荐器 * * <pre> * SoRec: Social recommendation using probabilistic matrix factorization * 参考LibRec团队 * </pre> * * @author Birdy * */ public class SoRecModel extends SocialModel { /** * adaptive learn rate */ private DenseMatrix socialFactors; private float regScore, regSocial; private List<Integer> inDegrees, outDegrees; @Override public void prepare(Configurator configuration, DataModule model, DataSpace space) { super.prepare(configuration, model, space); userFactors = DenseMatrix.valueOf(userSize, factorSize); userFactors.iterateElement(MathCalculator.SERIAL, (scalar) -> { scalar.setValue(RandomUtility.randomFloat(1F)); }); itemFactors = DenseMatrix.valueOf(itemSize, factorSize); itemFactors.iterateElement(MathCalculator.SERIAL, (scalar) -> { scalar.setValue(RandomUtility.randomFloat(1F)); }); socialFactors = DenseMatrix.valueOf(userSize, factorSize); socialFactors.iterateElement(MathCalculator.SERIAL, (scalar) -> { scalar.setValue(RandomUtility.randomFloat(1F)); }); regScore = configuration.getFloat("recommender.rate.social.regularization", 0.01F); regSocial = configuration.getFloat("recommender.user.social.regularization", 0.01F); inDegrees = new ArrayList<>(userSize); outDegrees = new ArrayList<>(userSize); for (int userIndex = 0; userIndex < userSize; userIndex++) { int in = socialMatrix.getColumnScope(userIndex); int out = socialMatrix.getRowScope(userIndex); inDegrees.add(in); outDegrees.add(out); } } @Override protected void doPractice() { DefaultScalar scalar = DefaultScalar.getInstance(); for (int epocheIndex = 0; epocheIndex < epocheSize; epocheIndex++) { totalError = 0F; DenseMatrix userDeltas = DenseMatrix.valueOf(userSize, factorSize); DenseMatrix itemDeltas = DenseMatrix.valueOf(itemSize, factorSize); DenseMatrix socialDeltas = DenseMatrix.valueOf(userSize, factorSize); // ratings for (MatrixScalar term : scoreMatrix) { int userIdx = term.getRow(); int itemIdx = term.getColumn(); float score = term.getValue(); float predict = super.predict(userIdx, itemIdx); float error = LogisticUtility.getValue(predict) - (score - minimumScore) / (maximumScore - minimumScore); totalError += error * error; for (int factorIndex = 0; factorIndex < factorSize; factorIndex++) { float userFactor = userFactors.getValue(userIdx, factorIndex); float itemFactor = itemFactors.getValue(itemIdx, factorIndex); userDeltas.shiftValue(userIdx, factorIndex, LogisticUtility.getGradient(predict) * error * itemFactor + userRegularization * userFactor); itemDeltas.shiftValue(itemIdx, factorIndex, LogisticUtility.getGradient(predict) * error * userFactor + itemRegularization * itemFactor); totalError += userRegularization * userFactor * userFactor + itemRegularization * itemFactor * itemFactor; } } // friends // TODO 此处是对称矩阵,是否有方法减少计算? for (MatrixScalar term : socialMatrix) { int userIndex = term.getRow(); int socialIndex = term.getColumn(); float socialScore = term.getValue(); // tuv ~ cik in the original paper if (socialScore == 0F) { continue; } float socialPredict = scalar.dotProduct(userFactors.getRowVector(userIndex), socialFactors.getRowVector(socialIndex)).getValue(); float socialInDegree = inDegrees.get(socialIndex); // ~ d-(k) float userOutDegree = outDegrees.get(userIndex); // ~ d+(i) float weight = (float) Math.sqrt(socialInDegree / (userOutDegree + socialInDegree)); float socialError = LogisticUtility.getValue(socialPredict) - weight * socialScore; totalError += regScore * socialError * socialError; socialPredict = LogisticUtility.getGradient(socialPredict); for (int factorIndex = 0; factorIndex < factorSize; factorIndex++) { float userFactor = userFactors.getValue(userIndex, factorIndex); float socialFactor = socialFactors.getValue(socialIndex, factorIndex); userDeltas.shiftValue(userIndex, factorIndex, regScore * socialPredict * socialError * socialFactor); socialDeltas.shiftValue(socialIndex, factorIndex, regScore * socialPredict * socialError * userFactor + regSocial * socialFactor); totalError += regSocial * socialFactor * socialFactor; } } userFactors.iterateElement(MathCalculator.PARALLEL, (element) -> { int row = element.getRow(); int column = element.getColumn(); float value = element.getValue(); element.setValue(value + userDeltas.getValue(row, column) * -learnRatio); }); itemFactors.iterateElement(MathCalculator.PARALLEL, (element) -> { int row = element.getRow(); int column = element.getColumn(); float value = element.getValue(); element.setValue(value + itemDeltas.getValue(row, column) * -learnRatio); }); socialFactors.iterateElement(MathCalculator.PARALLEL, (element) -> { int row = element.getRow(); int column = element.getColumn(); float value = element.getValue(); element.setValue(value + socialDeltas.getValue(row, column) * -learnRatio); }); totalError *= 0.5F; if (isConverged(epocheIndex) && isConverged) { break; } isLearned(epocheIndex); currentError = totalError; } } @Override public void predict(DataInstance instance) { int userIndex = instance.getQualityFeature(userDimension); int itemIndex = instance.getQualityFeature(itemDimension); float predict = super.predict(userIndex, itemIndex); predict = denormalize(LogisticUtility.getValue(predict)); instance.setQuantityMark(predict); } }
[ "liukefu2050@sina.com" ]
liukefu2050@sina.com
08393cb5de5415ace4633c86b6565d089367f6f7
c31dcfda3211c88795a388d831c83fa7ad113f99
/src/main/java/com/ideasforsharing/application/config/MicroserviceSecurityConfiguration.java
c63746e32d08e2fdf51803938c491770bf912ac5
[]
no_license
anywhereinfo/microservicessample
69a6d4df93b81a7c0040223dff0f96c6a4e0f2c1
46608cf7ef54de427df480a213b84d5abb8d1993
refs/heads/master
2021-08-24T06:49:58.013905
2017-12-08T13:35:49
2017-12-08T13:35:49
113,578,020
0
0
null
null
null
null
UTF-8
Java
false
false
3,203
java
package com.ideasforsharing.application.config; import com.ideasforsharing.application.security.AuthoritiesConstants; import com.ideasforsharing.application.security.jwt.JWTConfigurer; import com.ideasforsharing.application.security.jwt.TokenProvider; import org.springframework.context.annotation.*; import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.data.repository.query.SecurityEvaluationContextExtension; import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport; @Configuration @Import(SecurityProblemSupport.class) @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class MicroserviceSecurityConfiguration extends WebSecurityConfigurerAdapter { private final TokenProvider tokenProvider; private final SecurityProblemSupport problemSupport; public MicroserviceSecurityConfiguration(TokenProvider tokenProvider, SecurityProblemSupport problemSupport) { this.tokenProvider = tokenProvider; this.problemSupport = problemSupport; } @Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers(HttpMethod.OPTIONS, "/**") .antMatchers("/app/**/*.{js,html}") .antMatchers("/bower_components/**") .antMatchers("/i18n/**") .antMatchers("/content/**") .antMatchers("/swagger-ui/index.html") .antMatchers("/test/**") .antMatchers("/h2-console/**"); } @Override protected void configure(HttpSecurity http) throws Exception { http .csrf() .disable() .exceptionHandling() .authenticationEntryPoint(problemSupport) .accessDeniedHandler(problemSupport) .and() .headers() .frameOptions() .disable() .and() .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .authorizeRequests() .antMatchers("/api/**").authenticated() .antMatchers("/management/health").permitAll() .antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN) .antMatchers("/swagger-resources/configuration/ui").permitAll() .and() .apply(securityConfigurerAdapter()); } private JWTConfigurer securityConfigurerAdapter() { return new JWTConfigurer(tokenProvider); } @Bean public SecurityEvaluationContextExtension securityEvaluationContextExtension() { return new SecurityEvaluationContextExtension(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
6c8ebf89fa1cd8e0852caafe193207d6a0b978db
686716c239a14f57a9c5d482eef8cf2b8b515bf2
/src/com/ORM/Orders.java
a81d91753721235449218f0db32c12ca650937f9
[]
no_license
liuxiaochen0625/EShopTest
f2607a408deec6c43cba1d8862b82293503e1d55
cf4ceb21c0f71f80ffb994dbff63d30d9f92aa4b
refs/heads/master
2021-01-10T08:12:40.638530
2016-03-25T06:47:12
2016-03-25T06:47:12
54,700,258
0
0
null
null
null
null
UTF-8
Java
false
false
2,032
java
package com.ORM; import java.util.Date; /** * Orders generated by MyEclipse Persistence Tools */ public class Orders implements java.io.Serializable { // Fields private Integer id; private Member member; private Cart cart; private String orderNo; private Date orderDate; private Integer orderStatus; private Integer orderPayStatus; private Orderpay orderpay; // Constructors /** default constructor */ public Orders() { } /** minimal constructor */ public Orders(Member member, Cart cart) { this.member = member; this.cart = cart; } /** full constructor */ public Orders(Member member, Cart cart, String orderNo, Date orderDate, Integer orderStatus) { this.member = member; this.cart = cart; this.orderNo = orderNo; this.orderDate = orderDate; this.orderStatus = orderStatus; } // Property accessors public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public Member getMember() { return this.member; } public void setMember(Member member) { this.member = member; } public Cart getCart() { return this.cart; } public void setCart(Cart cart) { this.cart = cart; } public String getOrderNo() { return this.orderNo; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public Date getOrderDate() { return this.orderDate; } public void setOrderDate(Date orderDate) { this.orderDate = orderDate; } public Integer getOrderStatus() { return this.orderStatus; } public void setOrderStatus(Integer orderStatus) { this.orderStatus = orderStatus; } public Integer getOrderPayStatus() { return orderPayStatus; } public void setOrderPayStatus(Integer orderPayStatus) { this.orderPayStatus = orderPayStatus; } public Orderpay getOrderpay() { return orderpay; } public void setOrderpay(Orderpay orderpay) { this.orderpay = orderpay; } }
[ "liuxiaoqiang_0625@163.com" ]
liuxiaoqiang_0625@163.com
913b1306270f7892ac4299c0a89befab41c19c71
8bf6a7cabb5c4f2b0da809aeee70389ec76faa20
/smart-home-android-client/_MyLibrary/src/main/java/shared/heiliuer/shared/StringChina.java
20271a22bad419179777cfcc0a914dc8c86b187e
[]
no_license
heiliuer/smart-home
f5b573babb14daffb7ddbc601352dc049431695b
371f3dcac7c83257f6a3e408216bb3865876a1bb
refs/heads/master
2021-01-17T10:19:26.558742
2016-12-28T16:28:03
2016-12-28T16:28:03
56,602,948
5
3
null
null
null
null
UTF-8
Java
false
false
3,208
java
package shared.heiliuer.shared; import java.util.ArrayList; import java.util.List; /** * 按汉字首字母比较大小 * * @author Administrator * */ public class StringChina { public static ArrayList<String> sort(List<String> strs) { ArrayList<String> result = new ArrayList<String>(); int i, j; String a, b; for (i = 0; i < strs.size(); i++) { a = strs.get(i); for (j = i + 1; j < strs.size(); j++) { b = strs.get(j); if (compare(a, b) > 0) { strs.remove(b); j--; a = b; Utils.l(a); } } result.add(a); } return result; } private static final char[] alphatable = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; private static final char[] chartable = { '啊', '芭', '擦', '搭', '蛾', '发', '噶', '哈', '哈', '击', '喀', '垃', '妈', '拿', '哦', '啪', '期', '然', '撒', '塌', '塌', '塌', '挖', '昔', '压', '匝', '座' }; private static int[] table = new int[27]; public static char char2Alpha(char ch) { if (ch >= 'a' && ch <= 'z') return (char) (ch - 'a' + 'A'); if (ch >= 'A' && ch <= 'Z') return ch; int gb = gbValue(ch); if (gb < table[0]) return '0'; int i; for (i = 0; i < 26; ++i) { if (match(i, gb)) break; } if (i >= 26) return '0'; else return alphatable[i]; } /** * * @param strA * @param strB * @return 1 if a>b,0 if a=b,-1 if a<b */ public static int compare(String strA, String strB) { if (strA == null || strA.length() == 0) return 0; else if (strB == null || strB.length() == 0) { return 1; } else { char charsA[] = strA.toCharArray(); char charsB[] = strB.toCharArray(); int length = Math.min(charsA.length, charsB.length); char a, b; for (int i = 0; i < length; i++) { if (charsA[i] != charsB[i]) { if (isChinese(charsA[i]) && isChinese(charsB[i])) { a = char2Alpha(charsA[i]); b = char2Alpha(charsB[i]); } else { a = charsA[i]; b = charsB[i]; } if (a > b) return 1; else if (a < b) return -1; } } return 0; } } // 取出汉字的编码 private static int gbValue(char ch) { String str = new String(); str += ch; try { byte[] bytes = str.getBytes("gb2312"); if (bytes.length < 2) return 0; return (bytes[0] << 8 & 0xff00) + (bytes[1] & 0xff); } catch (Exception e) { return 0; } } public static boolean isChinese(char c) { return c >= 0x4e00 && c <= 0x9fa5; } private static boolean match(int i, int gb) { if (gb < table[i]) return false; int j = i + 1; // 字母Z使用了两个标签 while (j < 26 && (table[j] == table[i])) ++j; if (j == 26) return gb <= table[j]; else return gb < table[j]; } public static String string2Alpha(String SourceStr) { String Result = ""; int StrLength = SourceStr.length(); int i; try { for (i = 0; i < StrLength; i++) { Result += char2Alpha(SourceStr.charAt(i)); } } catch (Exception e) { Result = ""; } return Result; } { for (int i = 0; i < 27; ++i) { table[i] = gbValue(chartable[i]); } } }
[ "eee" ]
eee
bc3e912db1df82dc7a762f45214bdeaaebd7112b
9208ba403c8902b1374444a895ef2438a029ed5c
/sources/com/kantv/ui/activity/RegisterActivity_ViewBinding.java
a369de4819ddf7f305656e52bb6994bce4226e70
[]
no_license
MewX/kantv-decompiled-v3.1.2
3e68b7046cebd8810e4f852601b1ee6a60d050a8
d70dfaedf66cdde267d99ad22d0089505a355aa1
refs/heads/main
2023-02-27T05:32:32.517948
2021-02-02T13:38:05
2021-02-02T13:44:31
335,299,807
0
0
null
null
null
null
UTF-8
Java
false
false
6,181
java
package com.kantv.ui.activity; import android.view.View; import android.widget.CheckBox; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.CallSuper; import androidx.annotation.UiThread; import butterknife.Unbinder; import butterknife.internal.DebouncingOnClickListener; import butterknife.internal.Utils; import com.imkan.tv.R; public class RegisterActivity_ViewBinding implements Unbinder { private RegisterActivity target; private View view7f090335; private View view7f09033b; private View view7f09033c; private View view7f09033d; private View view7f09040c; private View view7f090434; @UiThread public RegisterActivity_ViewBinding(RegisterActivity registerActivity) { this(registerActivity, registerActivity.getWindow().getDecorView()); } @UiThread public RegisterActivity_ViewBinding(final RegisterActivity registerActivity, View view) { this.target = registerActivity; View findRequiredView = Utils.findRequiredView(view, R.id.title_left_ll, "field 'titleLeftLayout' and method 'onClick'"); registerActivity.titleLeftLayout = (LinearLayout) Utils.castView(findRequiredView, R.id.title_left_ll, "field 'titleLeftLayout'", LinearLayout.class); this.view7f09040c = findRequiredView; findRequiredView.setOnClickListener(new DebouncingOnClickListener() { public void doClick(View view) { registerActivity.onClick(view); } }); registerActivity.mTitle = (TextView) Utils.findRequiredViewAsType(view, R.id.common_title_tv, "field 'mTitle'", TextView.class); registerActivity.titleRightLayout = (LinearLayout) Utils.findRequiredViewAsType(view, R.id.title_right_ll, "field 'titleRightLayout'", LinearLayout.class); View findRequiredView2 = Utils.findRequiredView(view, R.id.reg_area, "field 'regArea' and method 'onClick'"); registerActivity.regArea = (TextView) Utils.castView(findRequiredView2, R.id.reg_area, "field 'regArea'", TextView.class); this.view7f090335 = findRequiredView2; findRequiredView2.setOnClickListener(new DebouncingOnClickListener() { public void doClick(View view) { registerActivity.onClick(view); } }); registerActivity.regPhone = (EditText) Utils.findRequiredViewAsType(view, R.id.reg_phone, "field 'regPhone'", EditText.class); registerActivity.regPwd = (EditText) Utils.findRequiredViewAsType(view, R.id.reg_pwd, "field 'regPwd'", EditText.class); View findRequiredView3 = Utils.findRequiredView(view, R.id.reg_vercode, "field 'regVercode' and method 'onClick'"); registerActivity.regVercode = (EditText) Utils.castView(findRequiredView3, R.id.reg_vercode, "field 'regVercode'", EditText.class); this.view7f09033c = findRequiredView3; findRequiredView3.setOnClickListener(new DebouncingOnClickListener() { public void doClick(View view) { registerActivity.onClick(view); } }); View findRequiredView4 = Utils.findRequiredView(view, R.id.register_btn, "field 'regBtn' and method 'onClick'"); registerActivity.regBtn = (TextView) Utils.castView(findRequiredView4, R.id.register_btn, "field 'regBtn'", TextView.class); this.view7f09033d = findRequiredView4; findRequiredView4.setOnClickListener(new DebouncingOnClickListener() { public void doClick(View view) { registerActivity.onClick(view); } }); View findRequiredView5 = Utils.findRequiredView(view, R.id.tv_vercode, "field 'vercodeTip' and method 'onClick'"); registerActivity.vercodeTip = (TextView) Utils.castView(findRequiredView5, R.id.tv_vercode, "field 'vercodeTip'", TextView.class); this.view7f090434 = findRequiredView5; findRequiredView5.setOnClickListener(new DebouncingOnClickListener() { public void doClick(View view) { registerActivity.onClick(view); } }); registerActivity.regPwdSafe = (CheckBox) Utils.findRequiredViewAsType(view, R.id.pwd_safe, "field 'regPwdSafe'", CheckBox.class); View findRequiredView6 = Utils.findRequiredView(view, R.id.reg_rm_phone, "field 'rmRegPhone' and method 'onClick'"); registerActivity.rmRegPhone = (ImageView) Utils.castView(findRequiredView6, R.id.reg_rm_phone, "field 'rmRegPhone'", ImageView.class); this.view7f09033b = findRequiredView6; findRequiredView6.setOnClickListener(new DebouncingOnClickListener() { public void doClick(View view) { registerActivity.onClick(view); } }); } @CallSuper public void unbind() { RegisterActivity registerActivity = this.target; if (registerActivity != null) { this.target = null; registerActivity.titleLeftLayout = null; registerActivity.mTitle = null; registerActivity.titleRightLayout = null; registerActivity.regArea = null; registerActivity.regPhone = null; registerActivity.regPwd = null; registerActivity.regVercode = null; registerActivity.regBtn = null; registerActivity.vercodeTip = null; registerActivity.regPwdSafe = null; registerActivity.rmRegPhone = null; this.view7f09040c.setOnClickListener(null); this.view7f09040c = null; this.view7f090335.setOnClickListener(null); this.view7f090335 = null; this.view7f09033c.setOnClickListener(null); this.view7f09033c = null; this.view7f09033d.setOnClickListener(null); this.view7f09033d = null; this.view7f090434.setOnClickListener(null); this.view7f090434 = null; this.view7f09033b.setOnClickListener(null); this.view7f09033b = null; return; } throw new IllegalStateException("Bindings already cleared."); } }
[ "xiayuanzhong@gmail.com" ]
xiayuanzhong@gmail.com
93a6ca23ae21321eb3a9bd7ea779d16463aa2c93
f5625654e0bc007f787eafefbf7769965906fadf
/build/tmp/recompileMc/sources/net/minecraft/block/BlockDaylightDetector.java
34130501c5483d537de60ead8e986557b81015c6
[]
no_license
nuko6925/revive
c6bd340d757c4c078e0a1b3c6a2289e4616cec44
32678a8502fb4b2e04d3afe4faf29b59146800fa
refs/heads/master
2020-12-03T15:17:42.848349
2020-01-02T14:31:19
2020-01-02T14:31:19
231,366,995
0
0
null
null
null
null
UTF-8
Java
false
false
6,609
java
package net.minecraft.block; import java.util.List; import java.util.Random; import javax.annotation.Nullable; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityDaylightDetector; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockDaylightDetector extends BlockContainer { public static final PropertyInteger POWER = PropertyInteger.create("power", 0, 15); protected static final AxisAlignedBB DAYLIGHT_DETECTOR_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.375D, 1.0D); private final boolean inverted; public BlockDaylightDetector(boolean inverted) { super(Material.WOOD); this.inverted = inverted; this.setDefaultState(this.blockState.getBaseState().withProperty(POWER, Integer.valueOf(0))); this.setCreativeTab(CreativeTabs.REDSTONE); this.setHardness(0.2F); this.setSoundType(SoundType.WOOD); this.setUnlocalizedName("daylightDetector"); } public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return DAYLIGHT_DETECTOR_AABB; } public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { return ((Integer)blockState.getValue(POWER)).intValue(); } public void updatePower(World worldIn, BlockPos pos) { if (!worldIn.provider.hasNoSky()) { IBlockState iblockstate = worldIn.getBlockState(pos); int i = worldIn.getLightFor(EnumSkyBlock.SKY, pos) - worldIn.getSkylightSubtracted(); float f = worldIn.getCelestialAngleRadians(1.0F); if (this.inverted) { i = 15 - i; } if (i > 0 && !this.inverted) { float f1 = f < (float)Math.PI ? 0.0F : ((float)Math.PI * 2F); f = f + (f1 - f) * 0.2F; i = Math.round((float)i * MathHelper.cos(f)); } i = MathHelper.clamp(i, 0, 15); if (((Integer)iblockstate.getValue(POWER)).intValue() != i) { worldIn.setBlockState(pos, iblockstate.withProperty(POWER, Integer.valueOf(i)), 3); } } } public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (playerIn.isAllowEdit()) { if (worldIn.isRemote) { return true; } else { if (this.inverted) { worldIn.setBlockState(pos, Blocks.DAYLIGHT_DETECTOR.getDefaultState().withProperty(POWER, state.getValue(POWER)), 4); Blocks.DAYLIGHT_DETECTOR.updatePower(worldIn, pos); } else { worldIn.setBlockState(pos, Blocks.DAYLIGHT_DETECTOR_INVERTED.getDefaultState().withProperty(POWER, state.getValue(POWER)), 4); Blocks.DAYLIGHT_DETECTOR_INVERTED.updatePower(worldIn, pos); } return true; } } else { return super.onBlockActivated(worldIn, pos, state, playerIn, hand, heldItem, side, hitX, hitY, hitZ); } } /** * Get the Item that this Block should drop when harvested. */ @Nullable public Item getItemDropped(IBlockState state, Random rand, int fortune) { return Item.getItemFromBlock(Blocks.DAYLIGHT_DETECTOR); } public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) { return new ItemStack(Blocks.DAYLIGHT_DETECTOR); } public boolean isFullCube(IBlockState state) { return false; } /** * Used to determine ambient occlusion and culling when rebuilding chunks for render */ public boolean isOpaqueCube(IBlockState state) { return false; } /** * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only, * LIQUID for vanilla liquids, INVISIBLE to skip all rendering */ public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; } /** * Can this block provide power. Only wire currently seems to have this change based on its state. */ public boolean canProvidePower(IBlockState state) { return true; } /** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityDaylightDetector(); } /** * Convert the given metadata into a BlockState for this Block */ public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(POWER, Integer.valueOf(meta)); } /** * Convert the BlockState into the correct metadata value */ public int getMetaFromState(IBlockState state) { return ((Integer)state.getValue(POWER)).intValue(); } protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {POWER}); } /** * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) */ @SideOnly(Side.CLIENT) public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) { if (!this.inverted) { super.getSubBlocks(itemIn, tab, list); } } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
44c701a38fd8739005d00b6a65d7c0e34df5c57a
79890d6ab25e6cb31bad2f9d6c394a1cc46ada0c
/DesignPattern/StimulateDuckPro/src/pandy/test/BadFlyBehavior.java
be17e85b3ab99fdbb85dd88c70fde16b999eff13
[]
no_license
PandyYang/SSM-SSH
d748bd5fd9c3eece121091bb16276ac421e316f3
74d591007e6a5d13d6b88d29ab9443532f73a21e
refs/heads/master
2020-04-23T20:06:46.525177
2019-04-05T00:08:34
2019-04-05T00:08:34
171,428,461
0
0
null
null
null
null
UTF-8
Java
false
false
189
java
package pandy.test; public class BadFlyBehavior implements FlyBehavior { @Override public void fly() { // TODO Auto-generated method stub System.out.println("---BadFly----"); } }
[ "fry227662112@gmail.com" ]
fry227662112@gmail.com
51ec822f8e0cfd4c4df0156004b9e4a3e2a0526c
e7cb38a15026d156a11e4cf0ea61bed00b837abe
/groundwork-monitor-platform/enterprise-foundation/collagerest/collagerest-common/src/main/java/org/groundwork/rs/dto/JaxbBean.java
0d32f40010bef81ca86abf4f911a6d3b68722f6e
[]
no_license
wang-shun/groundwork-trunk
5e0ce72c739fc07f634aeefc8f4beb1c89f128af
ea1ca766fd690e75c3ee1ebe0ec17411bc651a76
refs/heads/master
2020-04-01T08:50:03.249587
2018-08-20T21:21:57
2018-08-20T21:21:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
package org.groundwork.rs.dto; import javax.xml.bind.annotation.*; import java.util.HashMap; import java.util.Map; @XmlAccessorType(XmlAccessType.FIELD) public abstract class JaxbBean { @XmlAttribute private Integer id; @XmlElementWrapper(name="properties") @XmlElement(name="property") private Map<String, Object> properties; public JaxbBean() {} public Map<String, Object> getProperties() { return properties; } public void setProperties(Map<String, Object> properties) { this.properties = properties; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } protected void initProperties(Map<String, Object> props) { if (props != null) { properties = new HashMap<String, Object>(); properties.putAll(props); } } }
[ "gibaless@gmail.com" ]
gibaless@gmail.com
94e5c7de006acca40684c1e321c56354dfb98ae1
e69fbe41b7f347d59c5c11580af5721688407378
/app/src/main/java/com/mobi/overseas/clearsafe/widget/GoldScratchDialog.java
97851c2d200d955dfb5c76aed1f2042c25866743
[]
no_license
ZhouSilverBullet/mobiclearsafe-overseas
578fa39a3a320e41c68e9c6f6703647b5f6d4fc8
f885469217c1942eb680da712f083bede8ee4fd7
refs/heads/master
2022-07-03T13:06:38.407425
2020-05-11T02:58:22
2020-05-11T02:58:22
261,681,978
0
0
null
null
null
null
UTF-8
Java
false
false
6,469
java
package com.mobi.overseas.clearsafe.widget; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.text.Html; import android.util.DisplayMetrics; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.TextView; import com.example.adtest.manager.ScenarioEnum; import com.mobi.overseas.clearsafe.R; import com.mobi.overseas.clearsafe.ui.common.dialog.BaseDialog; import java.util.concurrent.TimeUnit; import io.reactivex.Observable; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Function; import io.reactivex.schedulers.Schedulers; /** * author : liangning * date : 2019-12-31 15:35 */ public class GoldScratchDialog extends BaseDialog implements View.OnClickListener { private Context mContext; private int mGold; private ScratchDialogListener mClick; private TextView tv_gold_money; private String posId; private ScenarioEnum scenario; public GoldScratchDialog(Builder builder) { super(builder.mContext,R.style.dialog); this.mContext = builder.mContext; this.mGold = builder.mGold; this.mClick = builder.mDialogClick; this.posId = builder.posId; this.scenario = builder.scenario; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gold_dialog_dialog); setCancelable(false); setCanceledOnTouchOutside(false); initView(); initWindow(); } @Override public void show() { super.show(); } private void countdown() { Observable.intervalRange(0, 2, 0, 1, TimeUnit.SECONDS) .map(new Function<Long, Long>() { @Override public Long apply(Long aLong) throws Exception { return 4 - aLong - 1; } }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<Long>() { @Override public void onSubscribe(Disposable d) { } @Override public void onNext(Long aLong) { } @Override public void onError(Throwable e) { e.printStackTrace(); } @Override public void onComplete() { if (mClick != null) { mClick.countDownFinish(GoldScratchDialog.this); } // dismiss(); // new InterActionExpressAdView.Builder(mContext) // .setScenarioEnum(scenario) // .setPosID(posId) // .setListener(new InterActionLoadListener() { // @Override // public void onAdClick(String channel) { // // } // // @Override // public void onLoadFaild(String channel, int faildCode, String faildMsg) { // // } // // @Override // public void onAdDismissed(String channel) { // // } // // @Override // public void onAdRenderSuccess(String channel) { // // } // // @Override // public void onAdShow(String channel) { // // } // }).build(); } }); } private void initView() { tv_gold_money = findViewById(R.id.tv_gold_money); String gold_num = mContext.getResources().getString(R.string.get_gold); String realShow = String.format(gold_num, mGold); tv_gold_money.setText(Html.fromHtml(realShow)); countdown(); } private void initWindow() { Window dialogWindow = this.getWindow(); dialogWindow.setBackgroundDrawableResource(R.color.transparent); WindowManager.LayoutParams lps = dialogWindow.getAttributes(); DisplayMetrics dm = getContext().getResources().getDisplayMetrics(); int w = dm.widthPixels > dm.heightPixels ? dm.heightPixels : dm.widthPixels; int h = dm.widthPixels > dm.heightPixels ? dm.widthPixels : dm.heightPixels; lps.width = w; lps.height = h; // lps.height = WindowManager.LayoutParams.WRAP_CONTENT; dialogWindow.setAttributes(lps); dialogWindow.setGravity(Gravity.CENTER); } @Override public void onClick(View v) { } @Override public void dismiss() { super.dismiss(); } @Override protected Context getActivityContext() { return mContext; } public static class Builder { private Context mContext; private int mGold = 0;//本次获得金币数量 private ScratchDialogListener mDialogClick; private String posId = ""; private ScenarioEnum scenario = null; public Builder(Context context) { this.mContext = context; } public Builder setGold(int gold) { this.mGold = gold; return this; } public Builder setPosId(String posId) { this.posId = posId; return this; } public Builder setScenario(ScenarioEnum scenario) { this.scenario = scenario; return this; } public Builder setDialogClick(ScratchDialogListener click) { this.mDialogClick = click; return this; } public GoldScratchDialog build() { return new GoldScratchDialog(this); } } public interface ScratchDialogListener { void countDownFinish(Dialog dialog); } }
[ "zhousaito@163.com" ]
zhousaito@163.com
a14bc914600666081b6afea023863915b283595e
1b3b7bfbbaf26340a8f683b944bf4293a82c9c26
/src/main/java/com/hw/domain/po/SysConfigurationTab.java
5a224bfef0bae02d8fe75de2d088b04645adea1e
[]
no_license
viewscenes/hw2.0
656a35835ad57400907498409aa19c1e282c5611
b33eab62f34e394d89f6e0892413875d5a57637a
refs/heads/master
2022-06-30T08:18:05.292854
2020-06-02T01:32:40
2020-06-02T01:32:40
115,579,402
0
1
null
2022-06-17T01:58:08
2017-12-28T03:08:16
Java
UTF-8
Java
false
false
1,976
java
package com.hw.domain.po; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * @author badqiu email:badqiu(a)gmail.com * @version 1.0 * @since 1.0 */ public class SysConfigurationTab implements java.io.Serializable{ private static final long serialVersionUID = 5454155825314635342L; //alias public static final String TABLE_ALIAS = "SysConfigurationTab"; public static final String ALIAS_PARAM_NAME = "参数"; public static final String ALIAS_PARAM_VALUE = "参数值"; //date formats //可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息 //columns START /** * 参数 db_column: PARAM_NAME */ private String paramName; /** * 参数值 db_column: PARAM_VALUE */ private String paramValue; //columns END public SysConfigurationTab(){ } public SysConfigurationTab( String paramName ){ this.paramName = paramName; } public void setParamName(String value) { this.paramName = value; } public String getParamName() { return this.paramName; } public void setParamValue(String value) { this.paramValue = value; } public String getParamValue() { return this.paramValue; } public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("ParamName",getParamName()) .append("ParamValue",getParamValue()) .toString(); } public int hashCode() { return new HashCodeBuilder() .append(getParamName()) .toHashCode(); } public boolean equals(Object obj) { if(obj instanceof SysConfigurationTab == false) return false; if(this == obj) return true; SysConfigurationTab other = (SysConfigurationTab)obj; return new EqualsBuilder() .append(getParamName(),other.getParamName()) .isEquals(); } }
[ "liubin11@jd.com" ]
liubin11@jd.com
7d4ea09781e64333b5422b59f3a608571f0f44e1
218f071cfd19ffb6f3494852d653e8ac3ef089a8
/app/src/main/java/com/lvgou/distribution/adapter/MyFansAdapter.java
02033425f439c9a2aa36b6cd9ab6890df8e22bba
[]
no_license
Jiafeicsdn/fyk
b299e6119789c7923396d853922f248489b32997
97ff951774cb6ce6bb8d0b8e610fadecebd396eb
refs/heads/master
2021-06-30T18:06:18.727005
2017-09-17T03:57:20
2017-09-17T03:57:20
103,801,359
0
0
null
null
null
null
UTF-8
Java
false
false
6,628
java
package com.lvgou.distribution.adapter; import android.content.Context; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.lvgou.distribution.R; import com.lvgou.distribution.activity.MyFansActivity; import com.lvgou.distribution.activity.MyFocusActivity; import com.lvgou.distribution.constants.SPConstants; import com.lvgou.distribution.inter.AdapterToFraImpl; import com.lvgou.distribution.presenter.UseFollowPresenter; import com.lvgou.distribution.utils.ImageUtils; import com.lvgou.distribution.utils.TGmd5; import com.lvgou.distribution.utils.ViewHolder; import com.lvgou.distribution.view.UseFollowView; import com.xdroid.common.utils.PreferenceHelper; import java.util.ArrayList; import java.util.HashMap; /** * Created by Administrator on 2017/4/26. */ public class MyFansAdapter extends BaseAdapter implements UseFollowView { Context context; ArrayList<HashMap<String, Object>> list; private String distributorId; private UseFollowPresenter useFollowPresenter; public MyFansAdapter(Context _context) { this.context = _context; useFollowPresenter = new UseFollowPresenter(this); distributorId = PreferenceHelper.readString(context, SPConstants.SHARED_PREFERENCE_NAME, SPConstants.LOGIN_USERID); } public void setData(ArrayList<HashMap<String, Object>> list) { this.list = list; } @Override public int getCount() { if (list == null) { return 0; } else { return list.size(); } } @Override public Object getItem(int position) { return list.get(position); } @Override public int getItemViewType(int position) { return super.getItemViewType(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(final int position, View convertView, ViewGroup parent) { final HashMap<String, Object> info = list.get(position); ViewHolder viewHolder = null; viewHolder = ViewHolder.getVH(convertView, context, R.layout.myfocus_list_item); ImageView image = viewHolder.getView(R.id.image, ImageView.class);//头像 ImageView img_user_identify = viewHolder.getView(R.id.img_user_identify, ImageView.class); TextView tv_name = viewHolder.getView(R.id.tv_name, TextView.class); // ImageView img_sex = viewHolder.getView(R.id.img_sex, ImageView.class); TextView tv_fengwen_num = viewHolder.getView(R.id.tv_fengwen_num, TextView.class); TextView tv_fans_num = viewHolder.getView(R.id.tv_fans_num, TextView.class); final TextView attension = viewHolder.getView(R.id.attension, TextView.class); Glide.with(context).load(ImageUtils.getInstance().getPath(info.get("ID").toString())).error(R.mipmap.teacher_default_head).into(image); tv_name.setText(info.get("RealName").toString()); tv_fengwen_num.setText(info.get("FengwenCount").toString()); tv_fans_num.setText(info.get("FansCount").toString()); Log.e("kjhaskdfj", "--------" + info.get("TuanBi").toString()); if (!distributorId.equals(info.get("ID").toString())) { if (info.get("TuanBi").toString().equals("1")) { attension.setVisibility(View.VISIBLE); } else { attension.setVisibility(View.GONE); } } else { attension.setVisibility(View.GONE); } /* if (info.get("Attr").toString().equals("1")) { img_sex.setBackgroundResource(R.mipmap.icon_man); } else { img_sex.setBackgroundResource(R.mipmap.icon_woman); }*/ if (info.get("UserType").toString().equals("3")) { img_user_identify.setImageResource(R.mipmap.bg_tecaher_authentication); tv_name.setTextColor(context.getResources().getColor(R.color.text_color_ff9900)); } else if (info.get("UserType").toString().equals("2")) { /*if (info.get("State").toString().equals("5")) { img_user_identify.setImageResource(R.mipmap.icon_certified); tv_name.setTextColor(context.getResources().getColor(R.color.text_color_ff9900)); } else { img_user_identify.setVisibility(View.GONE); tv_name.setTextColor(context.getResources().getColor(R.color.text_color_333333)); }*/ img_user_identify.setVisibility(View.GONE); tv_name.setTextColor(context.getResources().getColor(R.color.text_color_333333)); } else if (info.get("UserType").toString().equals("1")) { img_user_identify.setImageResource(R.mipmap.icon_official_certified); tv_name.setTextColor(context.getResources().getColor(R.color.text_color_ff9900)); } attension.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mposi = position; mattension = attension; String seeDistributorId = info.get("ID").toString(); String sign = TGmd5.getMD5("" + distributorId + seeDistributorId); ((MyFansActivity) context).showLoadingProgressDialog(context, ""); useFollowPresenter.useFollow(distributorId, seeDistributorId, sign); } }); return viewHolder.convertView; } private int mposi = 0; private TextView mattension; AdapterToFraImpl adapterToFra; public void setAdapterToFraImpl(AdapterToFraImpl adapterToFra) { this.adapterToFra = adapterToFra; } @Override public void OnUseFollowSuccCallBack(String state, String respanse) { //关注成功 ((MyFansActivity) context).closeLoadingProgressDialog(); mattension.setVisibility(View.GONE); HashMap<String, Object> hashMap = list.get(mposi); list.get(mposi).put("TuanBi", "2"); hashMap.put("TuanBi", "2"); adapterToFra.doSomeThing(hashMap); } @Override public void OnUseFollowFialCallBack(String state, String respanse) { //关注失败 ((MyFansActivity) context).closeLoadingProgressDialog(); } @Override public void closeUseFollowProgress() { } }
[ "jiafeiwangyi@163.com" ]
jiafeiwangyi@163.com
f7d02b3a44190d510e45cc7dbf7f821e5aa94fe6
4c088e99896ad5f4a18170cf4ec8c658990d52b3
/cloud/seata-account-service/src/main/java/com/gapache/cloud/seata/account/dao/repository/AccountRepository.java
48af2ed6eccf829223c07d9ae2add63846ebc4dc
[]
no_license
IsSenHu/big-plan2
58913a6e79f60cfc89872045f79d1bc2ab438717
6da18146de6fca010dcd80a18132cf78cba92c73
refs/heads/main
2023-03-28T09:44:36.765175
2021-03-30T06:33:08
2021-03-30T06:33:08
338,036,595
0
1
null
null
null
null
UTF-8
Java
false
false
441
java
package com.gapache.cloud.seata.account.dao.repository; import com.gapache.cloud.seata.account.dao.po.AccountPO; import com.gapache.jpa.BaseJpaRepository; /** * @author HuSen * @since 2020/6/17 6:07 下午 */ public interface AccountRepository extends BaseJpaRepository<AccountPO, Long> { /** * 查找账户 * * @param userId 用户ID * @return 账户信息 */ AccountPO findByUserId(String userId); }
[ "1178515826@qq.com" ]
1178515826@qq.com
59052d747678dab79ec434a9043a4fe5c831bb26
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_3/src/f/f/d/Calc_1_3_5531.java
bef92dffd5aef67611efb95cb6950235fdb0c2be
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package f.f.d; public class Calc_1_3_5531 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
73a72ce7be4c9a3d7c4d24930464c81ac4dbc277
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/4/Messages.java
7f19120e9462bc2df38e24ebbda91200f92cf8f9
[]
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,663
java
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.causalclustering.core.consensus.outcome; import java.util.Iterator; import java.util.Map; import org.neo4j.causalclustering.core.consensus.RaftMessages; import org.neo4j.causalclustering.identity.MemberId; public class Messages implements Iterable<Map.Entry<MemberId, RaftMessages.RaftMessage>> { private final Map<MemberId, RaftMessages.RaftMessage> map; Messages( Map<MemberId, RaftMessages.RaftMessage> map ) { this.map = map; } public boolean hasMessageFor( MemberId member ) { return map.containsKey( member ); } public RaftMessages.RaftMessage messageFor( MemberId member ) { return map.get( member ); } @Override public Iterator<Map.Entry<MemberId, RaftMessages.RaftMessage>> iterator() { return map.entrySet().iterator(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
3bc2d9d8721ea108625a31df7cdd712f7c98e718
a711d39bb5a362de95dc176e0da6db04eee9adc0
/shared/src/main/java/com/gtc/model/gateway/response/account/GetAllBalancesResponse.java
355c2bedeb3ea880005bcb2401ae6c940c203312
[ "MIT" ]
permissive
aspineon/GTC-all-repo
81e458415b0b95c4659263898f805056bc1226db
e4ca91147a9bffd7f5820da413507f532f179085
refs/heads/master
2022-04-07T09:52:40.367277
2020-01-19T09:47:23
2020-01-19T09:47:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
699
java
package com.gtc.model.gateway.response.account; import com.gtc.model.gateway.BaseMessage; import lombok.*; import java.math.BigDecimal; import java.util.Map; /** * Created by Valentyn Berezin on 03.03.18. */ @Getter @Setter @ToString(callSuper = true) @NoArgsConstructor public class GetAllBalancesResponse extends BaseMessage { public static final String TYPE = "resp.getAllBalances"; private Map<String, BigDecimal> balances; @Override public String type() { return TYPE; } @Builder public GetAllBalancesResponse(String clientName, String id, Map<String, BigDecimal> balances) { super(clientName, id); this.balances = balances; } }
[ "valentyn.berezin@aurea.com" ]
valentyn.berezin@aurea.com
bbee5f7554a90ce4210f4f3e7646447ef18a4705
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/copyAbstractMethodImplementation/beforeSimple.java
84c6dab1cb4a4b5d13d061529167f77b9b2ee4eb
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
200
java
// "Use existing implementation of 'm'" "true" interface I { void <caret>m(); } class A implements I { public void m() { System.out.println("code"); } } class B implements I { }
[ "cdr@intellij.com" ]
cdr@intellij.com
8d4454a9183ebc159a7c4fffc843bdc3a63fac45
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/apache-ant-1.8.4/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/DoubleCPInfo.java
00a0bb0ae05a28ec04f214d707e022d856c49413
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
957
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false tools PACKAGE_IDENTIFIER false ant PACKAGE_IDENTIFIER false taskdefs PACKAGE_IDENTIFIER false optional PACKAGE_IDENTIFIER false depend PACKAGE_IDENTIFIER false constantpool PACKAGE_IDENTIFIER false java PACKAGE_IDENTIFIER false io PACKAGE_IDENTIFIER false DataInputStream TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false io PACKAGE_IDENTIFIER false IOException TYPE_IDENTIFIER false DoubleCPInfo TYPE_IDENTIFIER true ConstantCPInfo TYPE_IDENTIFIER false DoubleCPInfo METHOD_IDENTIFIER false CONSTANT_DOUBLE VARIABLE_IDENTIFIER false read METHOD_IDENTIFIER true DataInputStream TYPE_IDENTIFIER false cpStream VARIABLE_IDENTIFIER true IOException TYPE_IDENTIFIER false setValue METHOD_IDENTIFIER false Double TYPE_IDENTIFIER false cpStream VARIABLE_IDENTIFIER false readDouble METHOD_IDENTIFIER false String TYPE_IDENTIFIER false toString METHOD_IDENTIFIER true getValue METHOD_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
ac7d1d40fbb0c3e45ada9f9db3dd40d78e9d77e2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/32/32_8132ec842522ba68e2c8c92323bb465e42b9740d/MultiDayWriter/32_8132ec842522ba68e2c8c92323bb465e42b9740d_MultiDayWriter_s.java
b47ebfe143d3f98c2e6b239fb944a403e9dc1314
[]
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
3,927
java
package generator; import java.io.IOException; import java.util.Calendar; import java.util.HashMap; import java.util.PriorityQueue; import java.util.Scanner; public class MultiDayWriter { private PriorityQueue<CurrentDate> daysOff; private PriorityQueue<CurrentDate> daysOn; private int startYear; public MultiDayWriter(String daysOffFile, CurrentDate startDate, CurrentDate endDate) { startYear = startDate.getYear(); daysOff = new PriorityQueue<CurrentDate>(); Scanner s; s = new Scanner(MultiDayWriter.class.getClassLoader().getResourceAsStream(daysOffFile)); while (s.hasNextLine()) { parseDay(s.nextLine()); } s.close(); makeDaysOn(startDate, endDate); } private void makeDaysOn(CurrentDate startDate, CurrentDate endDate) { Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(startDate.getYear(), startDate.getMonth() - 1, startDate.getDay(), 8, 8, 8); Calendar endDay = Calendar.getInstance(); endDay.clear(); endDay.set(endDate.getYear(), endDate.getMonth() - 1, endDate.getDay(), 8, 8, 8); daysOn = new PriorityQueue<CurrentDate>(); CurrentDate cd; boolean found = false; while (cal.compareTo(endDay) < 1) { cd = new CurrentDate(cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DATE), cal.get(Calendar.YEAR)); for (CurrentDate c : daysOff) { if (c.getMonth() == cd.getMonth() && c.getYear() == cd.getYear() && c.getDay() == cd.getDay()) { found = true; } } if (!found && !isWeekend(cd)) { daysOn.offer(cd); } found = false; cal.add(Calendar.DATE, 1); } } public boolean isWeekend(CurrentDate today) { Calendar sat = Calendar.getInstance(); sat.clear(); sat.set(startYear, 0, 1, 8, 8, 8); while (sat.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY) { sat.add(Calendar.DATE, 1); } Calendar sun = Calendar.getInstance(); sun.clear(); sun.set(startYear, 0, sat.get(Calendar.DATE) + 1, 8, 8, 8); Calendar temp = Calendar.getInstance(); temp.clear(); temp.set(today.getYear(), today.getMonth() - 1, today.getDay(), 8, 8, 8); while (sat.compareTo(temp) < 0 || sun.compareTo(temp) < 0) { sat.add(Calendar.DAY_OF_WEEK, 7); sun.add(Calendar.DAY_OF_WEEK, 7); if (sat.compareTo(temp) == 0 || sun.compareTo(temp) == 0) { return true; } } return false; } public void generateICSFile(String filename) { ICSWriter writer; char dayType = 'A'; int dayAdjust = 0; try { writer = new ICSWriter(filename, true); writer.writeHeader(); for (CurrentDate c : daysOn) { char currentDayType = (char) (dayType + dayAdjust); writer.writeDayToFile(currentDayType, c); dayAdjust = (dayAdjust + 1) % 7; } writer.writeFooter(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void generateICSFile(String filename, int[] periodsToInclude, String[] periodNames, boolean schoolType, HashMap<Character, Integer> singleBox, boolean includeBreaksAndLunch) { ICSWriter writer; char dayType = 'A'; int dayAdjust = 0; try { writer = new ICSWriter(filename, schoolType); writer.writeHeader(); for (CurrentDate c : daysOn) { char currentDayType = (char) (dayType + dayAdjust); writer.writeDayToFile(currentDayType, c, periodsToInclude, periodNames, singleBox, includeBreaksAndLunch); dayAdjust = (dayAdjust + 1) % 7; } writer.writeFooter(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } private void parseDay(String line) { CurrentDate temp = new CurrentDate(); String[] brokenLine = line.split(" "); temp.setMonth(Integer.parseInt(brokenLine[0])); temp.setDay(Integer.parseInt(brokenLine[1])); temp.setYear(Integer.parseInt(brokenLine[2])); daysOff.offer(temp); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
451afc47e214688afb247719d5b3e959099a0fd2
46ef04782c58b3ed1d5565f8ac0007732cddacde
/uml/diagram.editor.sequence/src/org/modelio/diagram/editor/sequence/elements/combinedfragment/primarynode/InteractionOperandContainerFigure.java
47dceca67c64a143df4b657e47bd1ec21a1777d2
[]
no_license
daravi/modelio
844917412abc21e567ff1e9dd8b50250515d6f4b
1787c8a836f7e708a5734d8bb5b8a4f1a6008691
refs/heads/master
2020-05-26T17:14:03.996764
2019-05-23T21:30:10
2019-05-23T21:30:45
188,309,762
0
1
null
null
null
null
UTF-8
Java
false
false
1,456
java
/* * Copyright 2013-2018 Modeliosoft * * This file is part of Modelio. * * Modelio 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. * * Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>. * */ package org.modelio.diagram.editor.sequence.elements.combinedfragment.primarynode; import com.modeliosoft.modelio.javadesigner.annotations.objid; import org.eclipse.draw2d.IFigure; import org.modelio.diagram.elements.core.figures.GradientFigure; /** * Hollow figure * * @author fpoyer */ @objid ("d8d12e59-55b6-11e2-877f-002564c97630") public class InteractionOperandContainerFigure extends GradientFigure { @objid ("d8d12e5d-55b6-11e2-877f-002564c97630") @Override public boolean containsPoint(final int x, final int y) { for (Object childObj : getChildren()) { if (((IFigure) childObj).containsPoint(x, y)) { return true; } } return false; } }
[ "puya@motionmetrics.com" ]
puya@motionmetrics.com
c925e2932405ca942ee4b2e46289799dc9d4ccd0
1091a59e9a582a4d45b4bbce74188b3b561c6825
/kzscrm-util/src/main/java/com/hd/kzscrm/common/enums/EnabledEnum.java
ead31a35c6105373f13351e2f2346350604191c5
[]
no_license
DongMing0103/RMc
d5782e2661a68e62737022d0d8ed55c0d190bb41
ead713f72c47ee2032ea05c7da6b7d842984ff4f
refs/heads/master
2021-06-26T21:57:40.750172
2017-09-15T09:53:11
2017-09-15T09:53:11
103,642,852
0
0
null
null
null
null
UTF-8
Java
false
false
1,769
java
package com.hd.kzscrm.common.enums; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; public enum EnabledEnum { OPEN("0", "启用"), STOP("1", "停用"); String code; // 状态编号 String name; //状态名称 EnabledEnum(String code, String name) { this.code = code; this.name = name; } public static List<EnabledEnum> getStarLevelEnumList(){ List<EnabledEnum> list = Arrays.asList(EnabledEnum.values()); Collections.sort(list,new Comparator<EnabledEnum>(){ public int compare(EnabledEnum obj1, EnabledEnum obj2) { //比较每个ArrayList的第二个元素 int code1= Integer.parseInt(obj1.getCode()); int code2= Integer.parseInt(obj2.getCode()); if (code1 == code2){ return 0; } else if(code1 < code2){ return -1; } else{ return 1; } } }); return list; } public static String getName(String code) { for (EnabledEnum statusEnum : EnabledEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum.getName(); } } return null; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public Short getShortCode() { return Short.valueOf(code); } public Integer getIntCode() { return Integer.valueOf(code); } public void setName(String name) { this.name = name; } }
[ "316588010@qq.com" ]
316588010@qq.com
1e45cc8fc2fa3046ab09512d4f25a06ecf424392
67a4f8e0c49645d9096d27404a6ff23bdc5e7a79
/app/src/main/java/com/kloudsync/techexcel2/dialog/message/SendFileMessage.java
80e2f09987a0dfee1e695a71da5615d87a810097
[]
no_license
15000712803peng/My_Klousync_TV
5d9b91ba9b236de2c2e4d72673745ff1f80c10e3
ea23c0a9a7edee321761272e6fff32b7da46ab09
refs/heads/master
2020-08-03T12:46:18.810867
2020-06-17T05:34:51
2020-06-17T05:34:51
211,755,986
0
0
null
null
null
null
UTF-8
Java
false
false
7,232
java
package com.kloudsync.techexcel2.dialog.message; import android.os.Parcel; import android.util.Log; import org.json.JSONException; import org.json.JSONObject; import java.io.Serializable; import java.io.UnsupportedEncodingException; import io.rong.common.ParcelUtils; import io.rong.common.RLog; import io.rong.imlib.MessageTag; import io.rong.imlib.model.MessageContent; //RC:SimpleMsg /*UB:FriendMsg UB:SystemMsg UB:KnowledgeMsg*/ @MessageTag(value = "UB:FavoriteFileMessage", flag = MessageTag.ISCOUNTED | MessageTag.ISPERSISTED) public class SendFileMessage extends MessageContent implements Serializable { private String LinkedKWProjectID;// 消息属性,可随意定义 private String AttachmentID; private String IncidentID; private String Title; private String FileID; private String FileName; private String FileDownloadURL; private String AttachmentTypeID; private String CreatedDate; private String Status; public String getLinkedKWProjectID() { return LinkedKWProjectID; } public void setLinkedKWProjectID(String linkedKWProjectID) { LinkedKWProjectID = linkedKWProjectID; } public String getAttachmentID() { return AttachmentID; } public void setAttachmentID(String attachmentID) { AttachmentID = attachmentID; } public String getIncidentID() { return IncidentID; } public void setIncidentID(String incidentID) { IncidentID = incidentID; } public String getFileID() { return FileID; } public void setFileID(String fileID) { FileID = fileID; } public String getFileName() { return FileName; } public void setFileName(String fileName) { FileName = fileName; } public String getFileDownloadURL() { return FileDownloadURL; } public void setFileDownloadURL(String fileDownloadURL) { FileDownloadURL = fileDownloadURL; } public String getAttachmentTypeID() { return AttachmentTypeID; } public void setAttachmentTypeID(String attachmentTypeID) { AttachmentTypeID = attachmentTypeID; } public String getCreatedDate() { return CreatedDate; } public void setCreatedDate(String createdDate) { CreatedDate = createdDate; } public String getStatus() { return Status; } public void setStatus(String status) { Status = status; } public SendFileMessage() { } public SendFileMessage(String linkedKWProjectID, String attachmentID, String incidentID, String title, String fileID, String fileName, String fileDownloadURL, String attachmentTypeID, String createdDate, String status) { LinkedKWProjectID = linkedKWProjectID; AttachmentID = attachmentID; IncidentID = incidentID; Title = title; FileID = fileID; FileName = fileName; FileDownloadURL = fileDownloadURL; AttachmentTypeID = attachmentTypeID; CreatedDate = createdDate; Status = status; } public SendFileMessage(byte[] data) { String jsonStr = null; try { jsonStr = new String(data, "UTF-8"); } catch (UnsupportedEncodingException e1) { } try { JSONObject jsonObj = new JSONObject(jsonStr); Log.e("jsonObj", jsonObj.toString() + ""); if (jsonObj.has("LinkedKWProjectID")){ LinkedKWProjectID = jsonObj.optString("LinkedKWProjectID"); } if (jsonObj.has("AttachmentID")){ AttachmentID = jsonObj.optString("AttachmentID"); } if (jsonObj.has("IncidentID")){ IncidentID = jsonObj.optString("IncidentID"); } if (jsonObj.has("Title")){ Title = jsonObj.optString("Title"); } if (jsonObj.has("FileID")){ FileID = jsonObj.optString("FileID"); } if (jsonObj.has("FileName")){ FileName = jsonObj.optString("FileName"); } if (jsonObj.has("FileDownloadURL")){ FileDownloadURL = jsonObj.optString("FileDownloadURL"); } if (jsonObj.has("AttachmentTypeID")){ AttachmentTypeID = jsonObj.optString("AttachmentTypeID"); } if (jsonObj.has("CreatedDate")){ CreatedDate = jsonObj.optString("CreatedDate"); } if (jsonObj.has("Status")){ Status = jsonObj.optString("Status"); } } catch (JSONException e) { RLog.e("JSONException", e.getMessage()); } } //给消息赋值。 public SendFileMessage(Parcel in) { LinkedKWProjectID= ParcelUtils.readFromParcel(in);//该类为工具类,消息属性... //这里可继续增加你消息的属性 AttachmentID= ParcelUtils.readFromParcel(in); IncidentID= ParcelUtils.readFromParcel(in); Title= ParcelUtils.readFromParcel(in); FileID= ParcelUtils.readFromParcel(in); FileName= ParcelUtils.readFromParcel(in); FileDownloadURL= ParcelUtils.readFromParcel(in); AttachmentTypeID= ParcelUtils.readFromParcel(in); CreatedDate= ParcelUtils.readFromParcel(in); Status= ParcelUtils.readFromParcel(in); } /** * 读取接口,目的是要从Parcel中构造一个实现了Parcelable的类的实例处理。 */ public static final Creator<SendFileMessage> CREATOR = new Creator<SendFileMessage>() { @Override public SendFileMessage createFromParcel(Parcel source) { return new SendFileMessage(source); } @Override public SendFileMessage[] newArray(int size) { return new SendFileMessage[size]; } }; /** * 描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。 * * @return 一个标志位,表明Parcelable对象特殊对象类型集合的排列。 */ public int describeContents() { return 0; } /** * 将类的数据写入外部提供的 Parcel 中。 * * @param dest 对象被写入的 Parcel。 * @param flags 对象如何被写入的附加标志。 */ @Override public void writeToParcel(Parcel dest, int flags) { ParcelUtils.writeToParcel(dest, LinkedKWProjectID);//该类为工具类,对消息中属性进行序列化 //这里可继续增加你消息的属性 ParcelUtils.writeToParcel(dest, AttachmentID); ParcelUtils.writeToParcel(dest, IncidentID); ParcelUtils.writeToParcel(dest, Title); ParcelUtils.writeToParcel(dest, FileID); ParcelUtils.writeToParcel(dest, FileName); ParcelUtils.writeToParcel(dest, FileDownloadURL); ParcelUtils.writeToParcel(dest, AttachmentTypeID); ParcelUtils.writeToParcel(dest, CreatedDate); ParcelUtils.writeToParcel(dest, Status); } @Override public byte[] encode() { JSONObject jsonObj = new JSONObject(); try { jsonObj.put("LinkedKWProjectID", LinkedKWProjectID); jsonObj.put("AttachmentID", AttachmentID); jsonObj.put("IncidentID", IncidentID); jsonObj.put("Title", Title); jsonObj.put("FileID", FileID); jsonObj.put("FileName", FileName); jsonObj.put("FileDownloadURL", FileDownloadURL); jsonObj.put("AttachmentTypeID", AttachmentTypeID); jsonObj.put("CreatedDate", CreatedDate); jsonObj.put("FileID", Status); } catch (JSONException e) { Log.e("JSONException", e.getMessage()); } try { return jsonObj.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return null; } }
[ "abc123" ]
abc123
867ab8e5c4b3b929bc3a74dabd16836467a9e180
c9fa31aad25798733108b03bf56e9e5c1f902038
/app/src/main/java/me/zhanghai/android/douya/util/TimeUtils.java
be9e81871110f402b9e9f53511555051b61c83cc
[ "Apache-2.0" ]
permissive
ybhgl/Douya
6fd4774e5a318877f2bdff5bc052e988e80fd8b9
e304824d6a9a7d07d63e6cb0f0a9ffe397372339
refs/heads/master
2020-04-17T07:02:09.201307
2018-12-04T09:20:27
2018-12-04T09:20:27
166,350,790
1
0
null
2019-01-18T05:45:18
2019-01-18T05:45:18
null
UTF-8
Java
false
false
7,539
java
/* * Copyright (c) 2015 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com> * All Rights Reserved. */ package me.zhanghai.android.douya.util; import android.content.Context; import org.threeten.bp.Duration; import org.threeten.bp.LocalDate; import org.threeten.bp.LocalDateTime; import org.threeten.bp.YearMonth; import org.threeten.bp.ZoneId; import org.threeten.bp.ZonedDateTime; import org.threeten.bp.chrono.IsoChronology; import org.threeten.bp.format.DateTimeFormatter; import org.threeten.bp.format.DateTimeFormatterBuilder; import org.threeten.bp.format.DateTimeParseException; import org.threeten.bp.format.ResolverStyle; import org.threeten.bp.format.SignStyle; import org.threeten.bp.temporal.ChronoField; import me.zhanghai.android.douya.R; public class TimeUtils { private static final int SECONDS_PER_MINUTE = 60; private static final int MINUTES_PER_HOUR = 60; private static final int SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUTES_PER_HOUR; private static final DateTimeFormatter DOUBAN_YEAR_MONTH_FORMATTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(ChronoField.MONTH_OF_YEAR, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter() .withResolverStyle(ResolverStyle.STRICT) .withChronology(IsoChronology.INSTANCE); private static final DateTimeFormatter DOUBAN_DATE_FORMATTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(ChronoField.MONTH_OF_YEAR, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral('-') .appendValue(ChronoField.DAY_OF_MONTH, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter() .withResolverStyle(ResolverStyle.STRICT) .withChronology(IsoChronology.INSTANCE); private static final DateTimeFormatter DOUBAN_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder() .append(DateTimeFormatter.ISO_LOCAL_DATE) .appendLiteral(' ') .append(DateTimeFormatter.ISO_LOCAL_TIME) .toFormatter() .withResolverStyle(ResolverStyle.STRICT) .withChronology(IsoChronology.INSTANCE); private static final ZoneId DOUBAN_ZONE_ID = ZoneId.of("Asia/Shanghai"); private static final Duration JUST_NOW_DURATION = Duration.ofMinutes(1); private static final Duration MINUTE_PATTERN_DURATION = Duration.ofHours(1); private static final Duration HOUR_PATTERN_DURATION = Duration.ofHours(2); /** * @throws DateTimeParseException */ public static YearMonth parseDoubanYearMonth(String doubanDate) { return YearMonth.parse(doubanDate, DOUBAN_YEAR_MONTH_FORMATTER); } /** * @throws DateTimeParseException */ public static LocalDate parseDoubanDate(String doubanDate) { return LocalDate.parse(doubanDate, DOUBAN_DATE_FORMATTER); } /** * @throws DateTimeParseException */ public static ZonedDateTime parseDoubanDateTime(String doubanDateTime) { return ZonedDateTime.of(LocalDateTime.parse(doubanDateTime, DOUBAN_DATE_TIME_FORMATTER), DOUBAN_ZONE_ID) .withZoneSameInstant(ZoneId.systemDefault()); } public static String formatDateTime(ZonedDateTime dateTime, Context context) { ZonedDateTime now = ZonedDateTime.now().withZoneSameInstant(dateTime.getZone()); LocalDate date = dateTime.toLocalDate(); LocalDate nowDate = now.toLocalDate(); if (date.equals(nowDate)) { Duration duration = Duration.between(dateTime, now); if (duration.compareTo(Duration.ZERO) > 0) { if (duration.compareTo(JUST_NOW_DURATION) < 0) { return context.getString(R.string.just_now); } else if (duration.compareTo(MINUTE_PATTERN_DURATION) < 0) { return context.getString(R.string.minute_format, Math.round((float) duration.getSeconds() / SECONDS_PER_MINUTE)); } else if (duration.compareTo(HOUR_PATTERN_DURATION) < 0) { return context.getString(R.string.hour_format, Math.round((float) duration.getSeconds() / SECONDS_PER_HOUR)); } } return DateTimeFormatter .ofPattern(context.getString(R.string.today_hour_minute_pattern)) .format(dateTime); } if (date.plusDays(1).equals(nowDate)) { return DateTimeFormatter .ofPattern(context.getString(R.string.yesterday_hour_minute_pattern)) .format(dateTime); } else if (date.getYear() == nowDate.getYear()) { return DateTimeFormatter .ofPattern(context.getString(R.string.month_day_hour_minute_pattern)) .format(dateTime); } else { return DateTimeFormatter .ofPattern(context.getString(R.string.date_hour_minute_pattern)) .format(dateTime); } } /** * Use {@link me.zhanghai.android.douya.ui.TimeTextView} instead if the text is to be set on a * {@code TextView}. */ public static String formatDoubanDateTime(String doubanDateTime, Context context) { try { return formatDateTime(parseDoubanDateTime(doubanDateTime), context); } catch (DateTimeParseException e) { LogUtils.e("Unable to parse date time: " + doubanDateTime); e.printStackTrace(); return doubanDateTime; } } public static String formatDate(LocalDate date, ZoneId zone, Context context) { ZonedDateTime now = ZonedDateTime.now().withZoneSameInstant(zone); LocalDate nowDate = now.toLocalDate(); if (date.equals(nowDate)) { return context.getString(R.string.today); } if (date.plusDays(1).equals(nowDate)) { return context.getString(R.string.yesterday); } else if (date.getYear() == nowDate.getYear()) { return DateTimeFormatter .ofPattern(context.getString(R.string.month_day_pattern)) .format(date); } else { return DateTimeFormatter .ofPattern(context.getString(R.string.date_pattern)) .format(date); } } public static String formatDate(ZonedDateTime dateTime, Context context) { return formatDate(dateTime.toLocalDate(), dateTime.getZone(), context); } public static String formatDuration(long seconds, Context context) { Duration duration = Duration.ofSeconds(seconds); long hours = duration.toHours(); duration = duration.minusHours(hours); long minutes = duration.toMinutes(); duration = duration.minusMinutes(minutes); seconds = duration.getSeconds(); if (hours > 0) { return context.getString(R.string.duration_hour_minute_second_format, hours, minutes, seconds); } else { return context.getString(R.string.duration_minute_second_format, minutes, seconds); } } }
[ "dreaming.in.code.zh@gmail.com" ]
dreaming.in.code.zh@gmail.com
85dc4ce0369b95acfbe58ec9b1c78f4885821f09
12d81e45a219c8b592f9691ec82dcd5d03713d1e
/support/cas-server-support-pm-webflow/src/test/java/org/apereo/cas/pm/web/flow/actions/PasswordChangeActionTests.java
dccb9d7a121c50b8a02d9d9c0ecbe529cda1956f
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
mmuehlenhoff/cas
27620a66bd1f4123d8217e0b996ab054dd4eee57
f3c4e7a3c0d753751c26c77648f622d709f8d371
refs/heads/master
2022-12-07T07:03:59.007841
2020-08-27T12:32:39
2020-08-27T14:08:08
290,767,240
0
0
Apache-2.0
2020-08-27T12:18:11
2020-08-27T12:18:10
null
UTF-8
Java
false
false
5,609
java
package org.apereo.cas.pm.web.flow.actions; import org.apereo.cas.pm.PasswordChangeRequest; import org.apereo.cas.pm.web.flow.PasswordManagementWebflowConfigurer; import org.apereo.cas.services.RegisteredServiceTestUtils; import org.apereo.cas.web.flow.CasWebflowConstants; import org.apereo.cas.web.support.WebUtils; import lombok.val; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.TestPropertySource; import org.springframework.webflow.context.ExternalContextHolder; import org.springframework.webflow.context.servlet.ServletExternalContext; import org.springframework.webflow.execution.Action; import org.springframework.webflow.execution.RequestContextHolder; import org.springframework.webflow.test.MockRequestContext; import static org.junit.jupiter.api.Assertions.*; /** * This is {@link PasswordChangeActionTests}. * * @author Misagh Moayyed * @since 6.3.0 */ @Tag("WebflowActions") @TestPropertySource(properties = "cas.authn.pm.policy-pattern=P@ss.+") public class PasswordChangeActionTests extends BasePasswordManagementActionTests { @Autowired @Qualifier("passwordChangeAction") private Action passwordChangeAction; @Test public void verifyFailsValidation() throws Exception { val context = new MockRequestContext(); val request = new MockHttpServletRequest(); val response = new MockHttpServletResponse(); context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response)); RequestContextHolder.setRequestContext(context); ExternalContextHolder.setExternalContext(context.getExternalContext()); WebUtils.putCredential(context, RegisteredServiceTestUtils.getCredentialsWithSameUsernameAndPassword("casuser")); val changeReq = new PasswordChangeRequest(); changeReq.setUsername("casuser"); changeReq.setPassword("123456"); context.getFlowScope().put(PasswordManagementWebflowConfigurer.FLOW_VAR_ID_PASSWORD, changeReq); assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, passwordChangeAction.execute(context).getId()); } @Test public void verifyChange() throws Exception { val context = new MockRequestContext(); val request = new MockHttpServletRequest(); val response = new MockHttpServletResponse(); context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response)); RequestContextHolder.setRequestContext(context); ExternalContextHolder.setExternalContext(context.getExternalContext()); WebUtils.putCredential(context, RegisteredServiceTestUtils.getCredentialsWithDifferentUsernameAndPassword("casuser", "P@ssword")); val changeReq = new PasswordChangeRequest(); changeReq.setUsername("casuser"); changeReq.setPassword("P@ssword"); changeReq.setConfirmedPassword("P@ssword"); context.getFlowScope().put(PasswordManagementWebflowConfigurer.FLOW_VAR_ID_PASSWORD, changeReq); assertEquals(CasWebflowConstants.TRANSITION_ID_PASSWORD_UPDATE_SUCCESS, passwordChangeAction.execute(context).getId()); } @Test public void verifyChangeFails() throws Exception { val context = new MockRequestContext(); val request = new MockHttpServletRequest(); val response = new MockHttpServletResponse(); context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response)); RequestContextHolder.setRequestContext(context); ExternalContextHolder.setExternalContext(context.getExternalContext()); WebUtils.putCredential(context, RegisteredServiceTestUtils.getCredentialsWithDifferentUsernameAndPassword("bad-credential", "P@ssword")); val changeReq = new PasswordChangeRequest(); changeReq.setUsername("bad-credential"); changeReq.setPassword("P@ssword"); changeReq.setConfirmedPassword("P@ssword"); context.getFlowScope().put(PasswordManagementWebflowConfigurer.FLOW_VAR_ID_PASSWORD, changeReq); assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, passwordChangeAction.execute(context).getId()); } @Test public void verifyPasswordRejected() throws Exception { val context = new MockRequestContext(); val request = new MockHttpServletRequest(); val response = new MockHttpServletResponse(); context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response)); RequestContextHolder.setRequestContext(context); ExternalContextHolder.setExternalContext(context.getExternalContext()); WebUtils.putCredential(context, RegisteredServiceTestUtils.getCredentialsWithDifferentUsernameAndPassword("error-credential", "P@ssword")); val changeReq = new PasswordChangeRequest(); changeReq.setUsername("error-credential"); changeReq.setPassword("P@ssword"); changeReq.setConfirmedPassword("P@ssword"); context.getFlowScope().put(PasswordManagementWebflowConfigurer.FLOW_VAR_ID_PASSWORD, changeReq); assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, passwordChangeAction.execute(context).getId()); } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
b0a5025f424f27fbc5a10abe8d4e668dd8f81e33
1b6a269d889bb6ef300fce834702e2d63dafb992
/Sunny/src/v3/com/ybt/service/work/CrowUserTreeService.java
997a59e7d02540cf38bb41a802552892086dd447
[]
no_license
244522645/demo
b77690f3034ded577e92f88fa8d3b1fd92b96169
231013391c8c58aefee9dc65253f3975d43ebfe2
refs/heads/master
2021-01-23T18:58:06.544798
2017-04-17T05:25:18
2017-04-17T05:25:18
83,005,616
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.ybt.service.work; import org.springframework.stereotype.Service; import com.ybt.common.bean.Result; import com.ybt.model.work.CrowUserTree; import com.ybt.model.work.SunWechatUser; import com.ybt.service.base.IBaseService; /** * 用户树 */ @Service public interface CrowUserTreeService extends IBaseService<CrowUserTree, String> { /* * 保存关心 - 感召人+1 */ public Result<CrowUserTree> saveUserTree (String userId, SunWechatUser v); }
[ "244522645@qq.com" ]
244522645@qq.com
964cf3db0f4e847e443b0250f35864c06ea9362a
c6aa94983f3c8f82954463af3972ae06b30396a7
/springloud_practice/common-rpc/src/main/java/org/nr/tour/rpc/DictServiceClient.java
bce2185ab40ab80095169b23252e6372919da3a9
[ "Apache-2.0" ]
permissive
dobulekill/jun_springcloud
f01358caacb1b04f57908dccc6432d0a5e17745e
33248f65301741ed97a24b978a5c22d5d6c052fb
refs/heads/master
2023-01-24T13:24:59.282130
2020-11-25T17:30:47
2020-11-25T17:30:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package org.nr.tour.rpc; import org.nr.tour.common.service.AbstractServiceDefinition; import org.nr.tour.constant.ServiceConstants; import org.nr.tour.domain.Dict; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import java.util.List; /** * @author Wujun */ @FeignClient(value = ServiceConstants.DICT_SERVICE) public interface DictServiceClient extends AbstractServiceDefinition<Dict, String> { @RequestMapping(value = "/findByType", method = RequestMethod.GET) List<Dict> findByType(@RequestParam("type") String type); }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
3fffc4e7d213ec17a0261942720c56ecb54c8079
5e2ce65d91fafb8c4ae8b3460b4685516908c944
/gen-src/main/java/org/projectfloodlight/openflow/protocol/bsntlv/OFBsnTlvActorPortNum.java
27c747cea1cc548f73669947c30e0cc40fa03112
[ "Apache-2.0" ]
permissive
mehdi149/OF_COMPILER_0.1
14d27db350bfc3f4bc71e7d28c674fc3d82099a5
4b90a03ba86644031d927dbf95bbd6aad04b6e08
refs/heads/master
2020-12-25T11:15:55.389107
2016-06-06T16:00:02
2016-06-06T16:00:02
59,827,143
0
0
null
null
null
null
UTF-8
Java
false
false
1,829
java
// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University // Copyright (c) 2011, 2012 Open Networking Foundation // Copyright (c) 2012, 2013 Big Switch Networks, Inc. // This library was generated by the LoxiGen Compiler. // See the file LICENSE.txt which should have been included in the source distribution // Automatically generated by LOXI from template of_interface.java // Do not modify package org.projectfloodlight.openflow.protocol.bsntlv; import org.projectfloodlight.openflow.protocol.*; import org.projectfloodlight.openflow.protocol.action.*; import org.projectfloodlight.openflow.protocol.actionid.*; import org.projectfloodlight.openflow.protocol.bsntlv.*; import org.projectfloodlight.openflow.protocol.errormsg.*; import org.projectfloodlight.openflow.protocol.meterband.*; import org.projectfloodlight.openflow.protocol.instruction.*; import org.projectfloodlight.openflow.protocol.instructionid.*; import org.projectfloodlight.openflow.protocol.match.*; import org.projectfloodlight.openflow.protocol.stat.*; import org.projectfloodlight.openflow.protocol.oxm.*; import org.projectfloodlight.openflow.protocol.oxs.*; import org.projectfloodlight.openflow.protocol.queueprop.*; import org.projectfloodlight.openflow.types.*; import org.projectfloodlight.openflow.util.*; import org.projectfloodlight.openflow.exceptions.*; import io.netty.buffer.ByteBuf; public interface OFBsnTlvActorPortNum extends OFObject, OFBsnTlv { int getType(); int getValue(); OFVersion getVersion(); void writeTo(ByteBuf channelBuffer); Builder createBuilder(); public interface Builder extends OFBsnTlv.Builder { OFBsnTlvActorPortNum build(); int getType(); int getValue(); Builder setValue(int value); OFVersion getVersion(); } }
[ "m.bahra@live.fr" ]
m.bahra@live.fr
1b0ad3992f74a831e511cbf678cca8637cdf5ad2
854408f70611cce30522f95add6a87dfff175739
/indexr-query-opt/src/main/java/io/indexr/query/expr/predicate/GreaterThanOrEqual.java
2fc3250eb2ae3de86b13d93fcc3a0cf52ac84928
[ "Apache-2.0" ]
permissive
zhangxiangyang/indexr
eb22ac91bd93e97129f683692b591f4686099241
47de2310282f7624a7a20039e272733d8da7a690
refs/heads/master
2020-04-15T05:16:03.822499
2019-02-25T07:15:06
2019-02-25T07:15:06
97,819,571
0
0
Apache-2.0
2018-06-13T01:20:51
2017-07-20T09:54:43
Java
UTF-8
Java
false
false
1,807
java
package io.indexr.query.expr.predicate; import com.google.common.collect.Lists; import java.util.List; import io.indexr.query.expr.Expression; import io.indexr.query.row.InternalRow; import static io.indexr.query.types.TypeConverters.castToDouble; import static io.indexr.query.types.TypeConverters.castToFloat; import static io.indexr.query.types.TypeConverters.castToInt; import static io.indexr.query.types.TypeConverters.castToLong; public class GreaterThanOrEqual extends BinaryPredicate { public GreaterThanOrEqual(Expression left, Expression right) { super(left, right); } @Override public boolean evalBoolean(InternalRow input) { //assert left.dataType() == right.dataType(); switch (left.dataType()) { case BooleanType: return left.evalUniformVal(input) >= right.evalUniformVal(input); case IntegerType: return left.evalInt(input) >= castToInt(right.evalUniformVal(input), right.dataType()); case LongType: return left.evalLong(input) >= castToLong(right.evalUniformVal(input), right.dataType()); case FloatType: return left.evalFloat(input) >= castToFloat(right.evalUniformVal(input), right.dataType()); case DoubleType: return left.evalDouble(input) >= castToDouble(right.evalUniformVal(input), right.dataType()); default: throw new UnsupportedOperationException(); } } @Override public Expression withNewChildren(List<Expression> newChildren) { assert newChildren.size() == 2; return new GreaterThanOrEqual(newChildren.get(0), newChildren.get(1)); } @Override public List<Object> args() {return Lists.newArrayList(left, right);} }
[ "flowbehappy@gmail.com" ]
flowbehappy@gmail.com