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
8008eee7a4d4859568d398ddb298d9d046cfc600
518eadde6db89bca44770cdb8f09fa56873220c2
/JavaAdvanced/Exams/ExamPreparation/src/DharmaSupplies2.java
888215e689e87a8dc33cf5b92bde249c30512cb4
[]
no_license
vonrepiks/Java-Fundamentals-May-2018
7d000b709c0eaf03334cbc90f702b770b6e4c321
8beb9ac54aac5669841954b2240cee2bc27787a4
refs/heads/master
2020-03-17T10:17:35.674518
2018-08-08T07:07:11
2018-08-08T07:07:11
133,507,163
4
13
null
2018-11-02T19:44:59
2018-05-15T11:36:37
Java
UTF-8
Java
false
false
3,155
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class DharmaSupplies2 { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int countOfLines = 0; StringBuilder lines = new StringBuilder(); String line; while (true) { if ("Collect".equals(line = reader.readLine())) { break; } lines.append(line).append(System.lineSeparator()); countOfLines++; } String linesString = lines.toString(); Pattern patternCrateRegex = Pattern.compile("\\[.*?]"); Matcher matcher = patternCrateRegex.matcher(linesString); int countOfCrates = 0; while (matcher.find()) { countOfCrates++; } int n = countOfCrates / countOfLines; Pattern validCrateRegex = Pattern.compile("\\[(#(\\d{" + n + "}|[a-z]{" + n + "}))([A-Za-z0-9\\s]+)(\\1)]"); Matcher matcher1 = validCrateRegex.matcher(linesString); int countValidCrates = 0; int amountOfFood = 0; int amountOfDrink = 0; while (matcher1.find()) { String crate = matcher1.group(); String supplyTag = matcher1.group(2); String body = matcher1.group(3); if (Character.isDigit(supplyTag.charAt(0))) { amountOfFood += computeFoodAmount(supplyTag, body); } else { amountOfDrink += computeDrinkAmount(supplyTag, body); } countValidCrates++; String debug = ""; } if (countValidCrates == 0) { System.out.println("No supplies found!"); } else { StringBuilder result = new StringBuilder(String.format("Number of supply crates: %d", countValidCrates)) .append(System.lineSeparator()) .append(String.format("Amount of food collected: %d", amountOfFood)) .append(System.lineSeparator()) .append(String.format("Amount of drinks collected: %d", amountOfDrink)); System.out.println(result.toString()); } } private static int computeDrinkAmount(String supplyTag, String body) { int sumOfCharactersBody = Arrays.stream(body.split("")).mapToInt(s -> s.charAt(0)).sum(); // Valid second version // int sumOfCharactersBody = body.chars().sum(); int sumOfCharactersTag = Arrays.stream(supplyTag.split("")).mapToInt(s -> s.charAt(0)).sum(); return sumOfCharactersBody * sumOfCharactersTag; } private static int computeFoodAmount(String supplyTag, String body) { int sumOfUniqueCharacters = Arrays.stream(body.split("")).distinct().mapToInt(s -> s.charAt(0)).sum(); int lengthOfSupplyTag = supplyTag.length(); return sumOfUniqueCharacters * lengthOfSupplyTag; } }
[ "ico_skipernov@abv.bg" ]
ico_skipernov@abv.bg
1f8a2f446804f6793a88a6dc6b0caceacbe3179f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XCOMMONS-928-7-6-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest_scaffolding.java
b11f4fee7db91e932c3437eba823f843aa74fde0
[]
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
429
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Apr 05 23:19:08 UTC 2020 */ package org.xwiki.job; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a17548f7790464d72cc8699af370b5286abefa0a
7cab112a472df702c9b616c760b8940d50324550
/aionxemu-master/GameServer/src/gameserver/utils/chathandlers/UserCommand.java
e52870aea3a73660377c2d5aca7a4006052f8cee
[]
no_license
luckychenheng/server_demo
86d31c939fd895c7576156b643ce89354e102209
97bdcb1f6cd614fd360cfed800c479fbdb695cd3
refs/heads/master
2020-05-15T02:59:07.396818
2019-05-09T10:30:47
2019-05-09T10:30:47
182,059,222
2
0
null
null
null
null
UTF-8
Java
false
false
1,152
java
/** * This file is part of Aion X Emu <aionxemu.com> * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with this software. If not, see <http://www.gnu.org/licenses/>. */ package gameserver.utils.chathandlers; import gameserver.model.gameobjects.player.Player; public abstract class UserCommand { private final String commandName; protected UserCommand(String commandName) { this.commandName = commandName; } public String getCommandName() { return commandName; } public abstract void executeCommand(Player player, String params); }
[ "seemac@seedeMacBook-Pro.local" ]
seemac@seedeMacBook-Pro.local
eb65d8664ff48fbf4c6add54436d50da8462b9a5
b601204c8b6d3ec9a45e11fc0afb3edd06f711bb
/app/src/main/java/com/example/vvipul15/a2/list_generator.java
f873b270ffb97b37fd88cfda6719c4271cd8f991
[]
no_license
Rkverma94/21
e7c7075a1883c3269f3d43690c859a8ceda69ceb
bc48c0dedc37b5af313f895c423090bf76d45d4f
refs/heads/master
2020-03-07T09:24:54.037778
2018-04-25T19:51:34
2018-04-25T19:51:34
127,406,956
0
0
null
null
null
null
UTF-8
Java
false
false
5,834
java
package com.example.vvipul15.a2; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import com.firebase.client.Firebase; import java.util.ArrayList; import java.util.Arrays; public class list_generator extends AppCompatActivity { private ArrayList<String> arrayList, arrayList2; private ArrayAdapter<String> adapter, adapter2; EditText txtInput, txtInput2,et_name; // private EditText textView7; TextView et_txtview,et_txtview2; String name,textitem,textitem2; Firebase myFirebase,myFirebase2; public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list_generator); // et_txtview= (TextView) findViewById(R.id.textitem); // et_txtview2= (TextView) findViewById(R.id.textitem2); final ListView listView = (ListView) findViewById(R.id.listv); String[] items = {"Apple"}; arrayList = new ArrayList<String>(Arrays.asList(items)); adapter = new ArrayAdapter<String>(this, R.layout.list_item, R.id.textitem, arrayList); final ListView listView2 = (ListView) findViewById(R.id.listv2); String[] items1 = {"1"}; arrayList2 = new ArrayList<String>(Arrays.asList(items1)); adapter2 = new ArrayAdapter<String>(this, R.layout.list_item2, R.id.textitem2, arrayList2); // ListView listV=(ListView)findViewById(R.id.list); listView.setAdapter(adapter); txtInput = (EditText) findViewById(R.id.txtinput); listView2.setAdapter(adapter2); txtInput2 = (EditText) findViewById(R.id.txtinput2); // et_name= (EditText) findViewById(R.id.name); // Firebase.setAndroidContext(this); // name = et_name.getText().toString(); Button btAdd = (Button) findViewById(R.id.button3); btAdd.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String newItem = txtInput.getText().toString(); arrayList.add(newItem); // myFirebase = new Firebase("https://hotel-15.firebaseio.com/ecommerce/customer/" + name ); myFirebase2 = new Firebase("https://hotel-15.firebaseio.com/ecommerce/customer/Rakesh/BIll Database" ); Firebase myNewChild1 = myFirebase.child(newItem); String newItem1 = txtInput2.getText().toString(); arrayList2.add(newItem1); myNewChild1.setValue(newItem1); // add new item to arraylist // String newItem1 = txtInput2.getText().toString(); // arrayList2.add(newItem1); // myFirebase = new Firebase("https://hotel-15.firebaseio.com/ecommerce/customer" + name ); // Firebase myNewChild2 = myFirebase.child("Quantity"); // myNewChild2.setValue(newItem1); // notify listview of data changed adapter.notifyDataSetChanged(); adapter2.notifyDataSetChanged(); } }); Button btAdd2 = (Button) findViewById(R.id.button4); btAdd2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { /* ListView listView = (ListView) findViewById(R.id.listv); String[] items = {"Apple"}; arrayList = new ArrayList<String>(Arrays.asList(items)); adapter = new ArrayAdapter<String>(list_generator.this, R.layout.list_item, R.id.textitem, arrayList); ListView listView2 = (ListView) findViewById(R.id.listv2); String[] items1 = {"1"}; arrayList2 = new ArrayList<String>(Arrays.asList(items1)); adapter2 = new ArrayAdapter<String>(list_generator.this, R.layout.list_item2, R.id.textitem2, arrayList2); Firebase.setAndroidContext(list_generator.this); name = et_name.getText().toString(); textitem = et_txtview.getText().toString(); textitem2 = et_txtview2.getText().toString(); Firebase myNewChild = myFirebase.child(name); myFirebase = new Firebase("https://hotel-15.firebaseio.com/ecommerce/customer" + name ); Firebase myNewChild1 = myFirebase.child("Food Item"); myNewChild1.setValue(textitem); Firebase myNewChild2 = myFirebase.child("Quantity"); myNewChild2.setValue(textitem2); */ Intent intent = new Intent(list_generator.this, list_generator.class); startActivity(intent); Toast.makeText(list_generator.this, "Your Bill has sent to NearBy Retailers!!", Toast.LENGTH_SHORT).show(); } }); /* Firebase.setAndroidContext(this); name = et_name.getText().toString(); textitem = et_txtview.getText().toString(); textitem2 = et_txtview2.getText().toString(); Firebase myNewChild = myFirebase.child(name); myFirebase = new Firebase("https://hotel-15.firebaseio.com/ecommerce/customer" + name ); Firebase myNewChild1 = myFirebase.child("Food Item"); myNewChild1.setValue(textitem); Firebase myNewChild2 = myFirebase.child("Quantity"); myNewChild2.setValue(textitem2); */ } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
39fdfe85f5457c43e4dc4cbcb1e50692aad95179
b312ba97eec1f108ef8584c5e88ee6bc4675d57f
/新建文件夹/shiyan3/src/shiyan3/ChinaPerson.java
5c3fa165d5c3718c50800ea387849276e49af383
[]
no_license
Beteasy/JAVA-GRADE2SEMESTER2-
5fb873ae311650840aba2e8ef67e8d373fba3697
38cdaf6a53c9b866dbc8bd04113fe5624b00bd20
refs/heads/master
2020-06-20T16:46:21.181792
2019-07-16T11:43:49
2019-07-16T11:43:49
197,182,089
0
0
null
null
null
null
GB18030
Java
false
false
864
java
package shiyan3; public class ChinaPerson extends Person{ public ChinaPerson(double h, double w) { super(h,w); } //重写speakHell() public void speakHell() { System.out.println("您好"); } //重写averageHeight public double averageHeight(Person[] people) { //计算people的平均身高 double average = 0.0; double sum = 0.0; for(int i=0; i<people.length; i++) { sum += people[i].height; } average = sum / (double)people.length / 100; return average; } //重写averageWeight public double averageWeight(Person[] people) { //计算people的平均重量 double average = 0.0; double sum = 0.0; for(int i=0; i<people.length; i++) { sum += people[i].weight; } average = sum / (double)people.length; return average; } public void chinaGongfu() { System.out.println("坐如钟,站如松,睡如弓"); } }
[ "1402308343@qq.com" ]
1402308343@qq.com
271918faff5bd5cba5c8a5306878356148dfb5b0
f62c29e1702a9bb273c601e30bdcdb35ea2151f7
/src/main/java/com/couchbase/client/core/endpoint/DebugLoggingHandler.java
020341527c980e1f180d6962f120bf1c81dac8ac
[]
no_license
mje113/couchbase-jvm-core
a1c35aa43a6b8d90675493c9f8b97fcad302cd2a
82e0d17de0ef3cbcac8d2aa1d421f6a6590cea70
refs/heads/master
2021-01-21T08:46:19.247047
2014-04-25T12:46:32
2014-04-25T12:46:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
863
java
package com.couchbase.client.core.endpoint; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; /** * A custom logging handler to better control what gets logged. */ public class DebugLoggingHandler extends LoggingHandler { /** * Create a new {@link LoggingHandler}. * * @param level the level where to start logging. */ public DebugLoggingHandler(final LogLevel level) { super(level); } /** * Do not log flushes (since we flush a lot behind the scenes and this crowds the logs). * * @param ctx the channel context. * @throws Exception throws an exception if flush forwarding failed. */ @Override public void flush(final ChannelHandlerContext ctx) throws Exception { ctx.flush(); } }
[ "michael@nitschinger.at" ]
michael@nitschinger.at
fe5ac0ac2dd5f7f525aff0925c921ac2114b01c9
d4f01ae584a001d96563342e9eb2aa1236ecde24
/src/examples/star/examples/stack/MyStack_containsTest.java
0f716008fe0e54ce7f74b219cd4fa85d2433ef7d
[]
no_license
longph1989/jpf-star
6a350cc55c1bf9c9e73ca20253ce1480a71468c6
1d7ab8957dc644f9092f9dbc0f657d61fac390d2
refs/heads/master
2021-01-20T10:32:01.903636
2017-09-30T01:33:30
2017-09-30T01:33:30
101,641,804
1
4
null
null
null
null
UTF-8
Java
false
false
3,003
java
package star.examples.stack; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.CommonTokenStream; import org.junit.Before; import org.junit.Test; import gov.nasa.jpf.util.test.TestJPF; import star.data.DataNode; import star.data.DataNodeLexer; import star.data.DataNodeMap; import star.data.DataNodeParser; import star.precondition.Precondition; import star.precondition.PreconditionLexer; import star.precondition.PreconditionMap; import star.precondition.PreconditionParser; import star.predicate.InductivePred; import star.predicate.InductivePredLexer; import star.predicate.InductivePredMap; import star.predicate.InductivePredParser; @SuppressWarnings("deprecation") public class MyStack_containsTest extends TestJPF { private void initDataNode() { String data = "data ListNode {Object element; ListNode next}"; ANTLRInputStream in = new ANTLRInputStream(data); DataNodeLexer lexer = new DataNodeLexer(in); CommonTokenStream tokens = new CommonTokenStream(lexer); DataNodeParser parser = new DataNodeParser(tokens); DataNode[] dns = parser.datas().dns; DataNodeMap.put(dns); } private void initPredicate() { String pred = "pred stack(root) == root = null || root::ListNode<element,next> * stack(next)"; ANTLRInputStream in = new ANTLRInputStream(pred); InductivePredLexer lexer = new InductivePredLexer(in); CommonTokenStream tokens = new CommonTokenStream(lexer); InductivePredParser parser = new InductivePredParser(tokens); InductivePred[] ips = parser.preds().ips; InductivePredMap.put(ips); } private void initPrecondition() { String pre = "pre contains == stack(this_topOfStack)"; ANTLRInputStream in = new ANTLRInputStream(pre); PreconditionLexer lexer = new PreconditionLexer(in); CommonTokenStream tokens = new CommonTokenStream(lexer); PreconditionParser parser = new PreconditionParser(tokens); Precondition[] ps = parser.pres().ps; PreconditionMap.put(ps); } @Before public void init() { initDataNode(); initPredicate(); initPrecondition(); } @Test public void testMain() { long begin = System.currentTimeMillis(); if (verifyNoPropertyViolation( "+listener=.star.StarListener", "+star.max_depth=2", // "+star.min_int=-100", // "+star.max_int=100", "+star.test_path=/Users/HongLongPham/Workspace/JPF_HOME/jpf-star/src/examples/gov/nasa/jpf/star/examples/stack", "+star.test_package=gov.nasa.jpf.star.examples.stack", "+star.test_imports=gov.nasa.jpf.star.examples.Utilities", "+classpath=build/examples", "+sourcepath=src/examples", "+symbolic.method=gov.nasa.jpf.star.examples.stack.StackLi.contains(sym)", "+symbolic.fields=instance", "+symbolic.lazy=true")) { StackLi stack = new StackLi(); Object o = new Object(); stack.contains(o); } long end = System.currentTimeMillis(); System.out.println(end - begin); } }
[ "longph1989@gmail.com" ]
longph1989@gmail.com
abfde65efa096009d22ea2329afe29d535624718
3669a482c3be6b83d8befd64fb0cf2b99e2ae483
/2018_EL_Competition/AJENT/EasyLifeWork/app/src/main/java/com/example/a11579/easylifework/noteEdit.java
8e5620e84bfb65c76c2676e1644835664e956ac2
[]
no_license
Nosolution/EL_Source_Code
786f2186e1d18793a8a52eb42333135a0171feb1
fdaf1fd729d5b860a4fbd8c962c264b0dd791b40
refs/heads/master
2020-03-18T11:22:43.143921
2018-05-25T00:27:06
2018-05-25T00:27:06
134,667,631
1
1
null
null
null
null
UTF-8
Java
false
false
4,520
java
package com.example.a11579.easylifework; import android.content.Intent; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.Gravity; import android.view.View; import android.view.WindowManager; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import java.text.SimpleDateFormat; import java.util.Date; public class noteEdit extends AppCompatActivity { private TextView tv_date; private EditText et_content; private Button btn_ok; private Button btn_cancel; private NotesDB DB; Toast toast=null; private SQLiteDatabase dbread; public static int ENTER_STATE = 0; public static String last_content; public static int id; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_note_edit); tv_date = (TextView) findViewById(R.id.tv_date); Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); String dateString = sdf.format(date); tv_date.setText(dateString); et_content = (EditText) findViewById(R.id.et_content); // 设置软键盘自动弹出 getWindow().setSoftInputMode( WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); DB = new NotesDB(this); dbread = DB.getReadableDatabase(); Bundle myBundle = this.getIntent().getExtras(); last_content = myBundle.getString("info"); Log.d("LAST_CONTENT", last_content); et_content.setText(last_content); // 确认按钮的点击事件 btn_ok = (Button) findViewById(R.id.btn_ok); btn_ok.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { // 获取日志内容 String content = et_content.getText().toString(); if (et_content.getText().toString().equals("")) { toast = Toast.makeText(getApplicationContext(), "还没有输入内容哦!", Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); } else { Log.d("LOG1", content); // 获取写日志时间 Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String dateNum = sdf.format(date); String sql; String sql_count = "SELECT COUNT(*) FROM note"; SQLiteStatement statement = dbread.compileStatement(sql_count); long count = statement.simpleQueryForLong(); Log.d("COUNT", count + ""); Log.d("ENTER_STATE", ENTER_STATE + ""); // 添加一个新的日志 if (ENTER_STATE == 0) { if (!content.equals("")) { sql = "insert into " + NotesDB.TABLE_NAME_NOTES + " values(" + count + "," + "'" + content + "'" + "," + "'" + dateNum + "')"; Log.d("LOG", sql); dbread.execSQL(sql); } } // 查看并修改一个已有的日志 else { Log.d("执行命令", "执行了该函数"); String updatesql = "update note set content='" + content + "' where _id=" + id; dbread.execSQL(updatesql); // et_content.setText(last_content); } Intent data = new Intent(); setResult(2, data); finish(); } }}); btn_cancel = (Button) findViewById(R.id.btn_cancel); btn_cancel.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { finish(); } }); }@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); } }
[ "32201220+Nosolution@users.noreply.github.com" ]
32201220+Nosolution@users.noreply.github.com
510a1ca67694136551211167fcb0fadc49afb7b6
60f8c70d135763ef4ceab106f63af2244b2807f2
/networkingmodule/src/main/java/com/yilian/networkingmodule/entity/jd/JDCashPayResult.java
65f254355326381ac6fa16a632059bb0549ce4a3
[ "MIT" ]
permissive
LJW123/YiLianMall
f7f7af4d8d8517001455922e2a55e7064cdf9723
ea335a66cb4fd6417aa264a959847b094c90fb04
refs/heads/master
2022-07-16T08:54:43.231502
2020-05-21T09:22:05
2020-05-21T09:22:05
265,793,269
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
package com.yilian.networkingmodule.entity.jd; import com.google.gson.annotations.SerializedName; import com.yilian.networkingmodule.httpresult.HttpResultBean; /** * @author Created by on 2018/5/28. */ public class JDCashPayResult extends HttpResultBean { /** * total_cash : 用户支付的订单总金额(包含运费) * orderPrice : 订单商品部分公司账户扣除金额 * orderJdPrice : 订单商品部分价格 * freight : 订单运费 * return_bean : 赠送益豆 * count_down : 1800 * order_index : 1 */ @SerializedName("total_cash") public String totalCash; @SerializedName("orderPrice") public String orderPrice; @SerializedName("orderJdPrice") public String orderJdPrice; @SerializedName("freight") public String freight; @SerializedName("return_bean") public String returnBean; @SerializedName("count_down") public String countDown; @SerializedName("order_index") public String orderIndex; }
[ "18203660536@163.com" ]
18203660536@163.com
97a6cabb0179439745f3b42ac751a368a60ce316
86ca3b3e8a012e4a551941d6830c580193cdefad
/UnknownGame/dev_resources/minecraft_src/minecraft/net/minecraft/src/SoundPool.java
072c5c02b19d4286da18bad00ce2bdb4262ab9c0
[]
no_license
Tmuch/UnknownGame
b162201694b2435fa8a13091e4681a7cb04a1be4
7927c7f14c97d9c8910b01dc3fe80c6d6f3bd0d6
refs/heads/master
2021-01-10T20:54:55.382058
2013-08-05T22:24:33
2013-08-05T22:24:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,447
java
package net.minecraft.src; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Random; public class SoundPool { /** The RNG used by SoundPool. */ private final Random rand = new Random(); /** * Maps a name (can be sound/newsound/streaming/music/newmusic) to a list of SoundPoolEntry's. */ private final Map nameToSoundPoolEntriesMapping = Maps.newHashMap(); private final ResourceManager field_110657_c; private final String field_110656_d; private final boolean isGetRandomSound; public SoundPool(ResourceManager par1ResourceManager, String par2Str, boolean par3) { this.field_110657_c = par1ResourceManager; this.field_110656_d = par2Str; this.isGetRandomSound = par3; } /** * Adds a sound to this sound pool. */ public void addSound(String par1Str) { try { String var2 = par1Str; par1Str = par1Str.substring(0, par1Str.indexOf(".")); if (this.isGetRandomSound) { while (Character.isDigit(par1Str.charAt(par1Str.length() - 1))) { par1Str = par1Str.substring(0, par1Str.length() - 1); } } par1Str = par1Str.replaceAll("/", "."); Object var3 = (List)this.nameToSoundPoolEntriesMapping.get(par1Str); if (var3 == null) { var3 = Lists.newArrayList(); this.nameToSoundPoolEntriesMapping.put(par1Str, var3); } ((List)var3).add(new SoundPoolEntry(var2, this.func_110654_c(var2))); } catch (MalformedURLException var4) { var4.printStackTrace(); throw new RuntimeException(var4); } } private URL func_110654_c(String par1Str) throws MalformedURLException { ResourceLocation var2 = new ResourceLocation(par1Str); String var3 = String.format("%s:%s:%s/%s", new Object[] {"mcsounddomain", var2.func_110624_b(), this.field_110656_d, var2.func_110623_a()}); SoundPoolProtocolHandler var4 = new SoundPoolProtocolHandler(this); return new URL((URL)null, var3, var4); } /** * gets a random sound from the specified (by name, can be sound/newsound/streaming/music/newmusic) sound pool. */ public SoundPoolEntry getRandomSoundFromSoundPool(String par1Str) { List var2 = (List)this.nameToSoundPoolEntriesMapping.get(par1Str); return var2 == null ? null : (SoundPoolEntry)var2.get(this.rand.nextInt(var2.size())); } /** * Gets a random SoundPoolEntry. */ public SoundPoolEntry getRandomSound() { if (this.nameToSoundPoolEntriesMapping.isEmpty()) { return null; } else { ArrayList var1 = Lists.newArrayList(this.nameToSoundPoolEntriesMapping.keySet()); return this.getRandomSoundFromSoundPool((String)var1.get(this.rand.nextInt(var1.size()))); } } static ResourceManager func_110655_a(SoundPool par0SoundPool) { return par0SoundPool.field_110657_c; } }
[ "tyler.much@marquette.edu" ]
tyler.much@marquette.edu
cf3da5bb6136a27b93ea9a3276860cb245244dc0
eb5f5353f49ee558e497e5caded1f60f32f536b5
/javax/swing/undo/UndoableEditSupport.java
44eb33eafbb25ac0c5858ca4b7c0840e3a491e43
[]
no_license
mohitrajvardhan17/java1.8.0_151
6fc53e15354d88b53bd248c260c954807d612118
6eeab0c0fd20be34db653f4778f8828068c50c92
refs/heads/master
2020-03-18T09:44:14.769133
2018-05-23T14:28:24
2018-05-23T14:28:24
134,578,186
0
2
null
null
null
null
UTF-8
Java
false
false
2,515
java
package javax.swing.undo; import java.util.Enumeration; import java.util.Vector; import javax.swing.event.UndoableEditEvent; import javax.swing.event.UndoableEditListener; public class UndoableEditSupport { protected int updateLevel = 0; protected CompoundEdit compoundEdit = null; protected Vector<UndoableEditListener> listeners = new Vector(); protected Object realSource = paramObject == null ? this : paramObject; public UndoableEditSupport() { this(null); } public UndoableEditSupport(Object paramObject) {} public synchronized void addUndoableEditListener(UndoableEditListener paramUndoableEditListener) { listeners.addElement(paramUndoableEditListener); } public synchronized void removeUndoableEditListener(UndoableEditListener paramUndoableEditListener) { listeners.removeElement(paramUndoableEditListener); } public synchronized UndoableEditListener[] getUndoableEditListeners() { return (UndoableEditListener[])listeners.toArray(new UndoableEditListener[0]); } protected void _postEdit(UndoableEdit paramUndoableEdit) { UndoableEditEvent localUndoableEditEvent = new UndoableEditEvent(realSource, paramUndoableEdit); Enumeration localEnumeration = ((Vector)listeners.clone()).elements(); while (localEnumeration.hasMoreElements()) { ((UndoableEditListener)localEnumeration.nextElement()).undoableEditHappened(localUndoableEditEvent); } } public synchronized void postEdit(UndoableEdit paramUndoableEdit) { if (updateLevel == 0) { _postEdit(paramUndoableEdit); } else { compoundEdit.addEdit(paramUndoableEdit); } } public int getUpdateLevel() { return updateLevel; } public synchronized void beginUpdate() { if (updateLevel == 0) { compoundEdit = createCompoundEdit(); } updateLevel += 1; } protected CompoundEdit createCompoundEdit() { return new CompoundEdit(); } public synchronized void endUpdate() { updateLevel -= 1; if (updateLevel == 0) { compoundEdit.end(); _postEdit(compoundEdit); compoundEdit = null; } } public String toString() { return super.toString() + " updateLevel: " + updateLevel + " listeners: " + listeners + " compoundEdit: " + compoundEdit; } } /* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\javax\swing\undo\UndoableEditSupport.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "mohit.rajvardhan@ericsson.com" ]
mohit.rajvardhan@ericsson.com
a979d2df32f5a01d83dec32ce907c277471b054d
4fbaaa8d863c64b82cf3b66e5bfcc2109e0c19b6
/com/bccard/golf/action/admin/lounge/GolfAdmNewsChgFormActn.java
3ec193bef9d7fefd0bcea626793822efa84e6a09
[]
no_license
nexcra/wfwsample
6b1e542ca884274c1834672de61311a6766b343f
6f52426a13aae4e75a13a47f8597aa1f81d2b2a6
refs/heads/master
2020-05-23T14:31:10.027807
2012-05-09T05:59:00
2012-05-09T05:59:00
33,128,506
1
1
null
null
null
null
UHC
Java
false
false
3,754
java
/*************************************************************************************************** * 이 소스는 ㈜비씨카드 소유입니다. * 이 소스를 무단으로 도용하면 법에 따라 처벌을 받을 수 있습니다. * 클래스명 : GolfAdmNewsChgFormActn * 작성자 : (주)미디어포스 조은미 * 내용 : 관리자 뉴스 수정 폼 * 적용범위 : golf * 작성일자 : 2009-09-16 ************************** 수정이력 **************************************************************** * 일자 버전 작성자 변경사항 * ***************************************************************************************************/ package com.bccard.golf.action.admin.lounge; import java.io.IOException; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.bccard.waf.common.BaseException; import com.bccard.waf.core.ActionResponse; import com.bccard.waf.core.RequestParser; import com.bccard.waf.core.WaContext; import com.bccard.golf.common.GolfActn; import com.bccard.golf.common.GolfException; import com.bccard.golf.common.BaseAction; import com.bccard.golf.dbtao.DbTaoDataSet; import com.bccard.golf.dbtao.DbTaoResult; import com.bccard.golf.dbtao.proc.admin.lounge.GolfAdmNewsUpdFormDaoProc; /****************************************************************************** * Topn * @author (주)미디어포스 * @version 1.0 ******************************************************************************/ public class GolfAdmNewsChgFormActn extends GolfActn{ public static final String TITLE = "관리자 뉴스 수정 폼"; /*************************************************************************************** * Golf 관리자화면 * @param context WaContext 객체. * @param request HttpServletRequest 객체. * @param response HttpServletResponse 객체. * @return ActionResponse Action 처리후 화면에 디스플레이할 정보. ***************************************************************************************/ public ActionResponse execute( WaContext context, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, BaseException { String subpage_key = "default"; // 00.레이아웃 URL 저장 String layout = super.getActionParam(context, "layout"); request.setAttribute("layout", layout); try { // 01.세션정보체크 // 02.입력값 조회 RequestParser parser = context.getRequestParser(subpage_key, request, response); Map paramMap = BaseAction.getParamToMap(request); paramMap.put("title", TITLE); // Request 값 저장 String seq_no = parser.getParameter("p_idx", ""); String bbs = parser.getParameter("bbs", ""); // 03.Proc 에 던질 값 세팅 (Proc에 dataSet 형태의 배열(?)로 request값 또는 조회값을 던진다.) DbTaoDataSet dataSet = new DbTaoDataSet(TITLE); dataSet.setString("CTET_ID", seq_no); // 04.실제 테이블(Proc) 조회 GolfAdmNewsUpdFormDaoProc proc = (GolfAdmNewsUpdFormDaoProc)context.getProc("GolfAdmNewsUpdFormDaoProc"); DbTaoResult bbsChgResult = proc.execute(context, dataSet); // 05. Return 값 세팅 request.setAttribute("bbsChgResult", bbsChgResult); request.setAttribute("paramMap", paramMap); //모든 파라미터값을 맵에 담아 반환한다. } catch(Throwable t) { debug(TITLE, t); //t.printStackTrace(); throw new GolfException(TITLE, t); } return super.getActionResponse(context, subpage_key); } }
[ "killme0y@gmail.com@1c71d765-022b-4f35-e49a-0c25170da86e" ]
killme0y@gmail.com@1c71d765-022b-4f35-e49a-0c25170da86e
54d84962ac15a856b4c6b1308e2ff7e6cc84f5e1
77499ab233b7766e14fffac6ffa698e7cd8650a3
/OSATE-AADL2_projects/osate.tests/src/aadl2/tests/ProcessorFeatureTest.java
004149e718b3ade19538d71e0e1b8f29125459f0
[ "MIT" ]
permissive
carduswork/SmartFireAlarm
a15fb2857810742521c6976466f5fdea54143b8b
6085b3998d106cd030974f887ae1f428bdd5d3cd
refs/heads/master
2022-01-09T14:52:42.523976
2019-06-22T06:55:47
2019-06-22T06:55:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
757
java
/** */ package aadl2.tests; import aadl2.ProcessorFeature; /** * <!-- begin-user-doc --> * A test case for the model object '<em><b>Processor Feature</b></em>'. * <!-- end-user-doc --> * @generated */ public abstract class ProcessorFeatureTest extends StructuralFeatureTest { /** * Constructs a new Processor Feature test case with the given name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ProcessorFeatureTest(String name) { super(name); } /** * Returns the fixture for this Processor Feature test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected ProcessorFeature getFixture() { return (ProcessorFeature)fixture; } } //ProcessorFeatureTest
[ "renangreca@gmail.com" ]
renangreca@gmail.com
dde24e0fd0568dccbfea8563b85bc022ad1071bb
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/hfn.java
2fc44120c1b551bee3247f725c28c16579d2cfd6
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
739
java
import android.view.View; import android.view.View.OnClickListener; import com.tencent.mobileqq.adapter.LebaListMgrAdapter; import com.tencent.mobileqq.config.struct.LebaViewItem; public class hfn implements View.OnClickListener { public hfn(LebaListMgrAdapter paramLebaListMgrAdapter, LebaViewItem paramLebaViewItem) {} public void onClick(View paramView) { LebaListMgrAdapter.a(this.jdField_a_of_type_ComTencentMobileqqAdapterLebaListMgrAdapter, this.jdField_a_of_type_ComTencentMobileqqConfigStructLebaViewItem, false); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar * Qualified Name: hfn * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
bf8eef3e8178edffcdae64bf7e5daff5aaeba5ab
2e59950c3a0e32c9748c1e3303d5530f6e9b67ca
/Thinksns_v4.0/src/com/abcs/haiwaigou/local/beans/ActivityArr.java
7f21049e48855bc023bfad9bad0d186e97087216
[]
no_license
xiaozhugua/Myhuarenb
a27e87451c792a76ade79fc29d7050997ac2bdf6
9a81815ce90a7b4e5c22ff99fb8fc5e13844d326
refs/heads/master
2021-01-23T02:05:42.432793
2017-05-31T04:05:42
2017-05-31T04:05:42
92,902,840
0
1
null
null
null
null
UTF-8
Java
false
false
513
java
package com.abcs.haiwaigou.local.beans; import com.google.gson.annotations.SerializedName; /** * 项目名称:com.abcs.haiwaigou.local.beans * 作者:zds * 时间:2017/3/22 18:52 */ public class ActivityArr { /** * types : 1 * activity_name : 满35减7,满55减11(买单立享) * img : null */ @SerializedName("types") public String types; @SerializedName("activity_name") public String activityName; @SerializedName("img") public String img; }
[ "1343012815@qq.com" ]
1343012815@qq.com
802533664a10fc91d0064ba525bfe59d2751c7c9
352163a8f69f64bc87a9e14471c947e51bd6b27d
/bin/ext-accelerator/alipay/src/de/hybris/platform/chinaaccelerator/alipay/data/AlipayCheckTradeStatusData.java
5ad1f15f6db6ae5b57cffd245a7cfd1fcd431d90
[]
no_license
GTNDYanagisawa/merchandise
2ad5209480d5dc7d946a442479cfd60649137109
e9773338d63d4f053954d396835ac25ef71039d3
refs/heads/master
2021-01-22T20:45:31.217238
2015-05-20T06:23:45
2015-05-20T06:23:45
35,868,211
3
5
null
null
null
null
UTF-8
Java
false
false
679
java
package de.hybris.platform.chinaaccelerator.alipay.data; public class AlipayCheckTradeStatusData extends BaseRequestData{ private String trade_no; private String out_trade_no; /** * @return the trade_no */ public String getTrade_no() { return trade_no; } /** * @param trade_no the trade_no to set */ public void setTrade_no(String trade_no) { this.trade_no = trade_no; } /** * @return the out_trade_no */ public String getOut_trade_no() { return out_trade_no; } /** * @param out_trade_no the out_trade_no to set */ public void setOut_trade_no(String out_trade_no) { this.out_trade_no = out_trade_no; } }
[ "yanagisawa@gotandadenshi.jp" ]
yanagisawa@gotandadenshi.jp
8015308162190b09d23e832cd70f1753431f82a4
073231dca7e07d8513c8378840f2d22b069ae93f
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201608/ProductServiceInterfaceperformProductActionResponse.java
c8af94930eb1f5005c9bc7d27dbb9da1fbd87be3
[ "Apache-2.0" ]
permissive
zaper90/googleads-java-lib
a884dc2268211306416397457ab54798ada6a002
aa441cd7057e6a6b045e18d6e7b7dba306085200
refs/heads/master
2021-01-01T19:14:01.743242
2017-07-17T15:48:32
2017-07-17T15:48:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,210
java
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.dfp.jaxws.v201608; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for performProductActionResponse element declaration. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;element name="performProductActionResponse"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="rval" type="{https://www.google.com/apis/ads/publisher/v201608}UpdateResult" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "rval" }) @XmlRootElement(name = "performProductActionResponse") public class ProductServiceInterfaceperformProductActionResponse { protected UpdateResult rval; /** * Gets the value of the rval property. * * @return * possible object is * {@link UpdateResult } * */ public UpdateResult getRval() { return rval; } /** * Sets the value of the rval property. * * @param value * allowed object is * {@link UpdateResult } * */ public void setRval(UpdateResult value) { this.rval = value; } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
71879368fa10e8577357852d7abc12b33e7f07fa
03b8d94fbe774b2ab4752e5bd010299f02882fbd
/src/test/lk/ijse/dep/akashStainlessSteel/dao/searchCustomerDAOTest.java
f76697e52ce6e990c8cd527a952b8a7d6942e6c7
[ "MIT" ]
permissive
ThilinaDGunasekara/Modified-Stainless-steel-Management-System-Layered-Architecture
3c5f9b89a80fb8218ddbc03a1ac4a503f55fa335
00bb17f04db4ff4a37214c4bbb9670b9120798e3
refs/heads/master
2020-09-23T11:16:21.770118
2019-12-03T11:31:29
2019-12-03T11:31:29
225,487,767
1
0
null
null
null
null
UTF-8
Java
false
false
1,393
java
package test.lk.ijse.dep.akashStainlessSteel.dao; import lk.ijse.dep.akashStainlessSteel.dao.custom.impl.SearchCustomerDAOImpl; import lk.ijse.dep.akashStainlessSteel.entity.SearchCustomer; import java.util.List; public class searchCustomerDAOTest { public static void main(String[] args) throws Exception { searchCustomerDAOTest searchCustomerDAOTest = new searchCustomerDAOTest(); searchCustomerDAOTest.searchCustomerFnr("FRC%"); System.out.println("\n\n"); searchCustomerDAOTest.searchCustomer("FNRC001%"); } public List<SearchCustomer> searchCustomerFnr(String searchTxt) throws Exception{ SearchCustomerDAOImpl searchCustomerDAO = new SearchCustomerDAOImpl(); List<SearchCustomer> searchCustomers = searchCustomerDAO.searchCustomer(searchTxt); for (SearchCustomer searchCustomer : searchCustomers) { System.out.println(searchCustomer); } return searchCustomers; } public List<SearchCustomer> searchCustomer(String searchTxt) throws Exception{ SearchCustomerDAOImpl searchCustomerDAO = new SearchCustomerDAOImpl(); List<SearchCustomer> searchCustomers = searchCustomerDAO.searchCustomerFnr(searchTxt); for (SearchCustomer searchCustomer : searchCustomers) { System.out.println(searchCustomer); } return searchCustomers; } }
[ "thilinadhammika86@gmail.com" ]
thilinadhammika86@gmail.com
b9cb6a7916de6a7baab6bd9c20cbab334ed6632d
e5bb4c1c5cb3a385a1a391ca43c9094e746bb171
/mobileCRM/trunk/src/main/java/com/hzfh/mobile/model/common/resource/ScriptContext.java
8ba3579ebca941bfdea74bf76fb17e06ea9ee6fc
[]
no_license
FashtimeDotCom/huazhen
397143967ebed9d50073bfa4909c52336a883486
6484bc9948a29f0611855f84e81b0a0b080e2e02
refs/heads/master
2021-01-22T14:25:04.159326
2016-01-11T09:52:40
2016-01-11T09:52:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,938
java
package com.hzfh.mobile.model.common.resource; import java.util.ArrayList; import java.util.List; import com.hzfh.mobile.model.common.PageAlias; import com.hzfh.mobile.model.common.cache.CacheManager; import com.hzfh.mobile.model.common.cache.CachePrefix; import com.hzfh.mobile.model.common.helper.UrlHelper; import com.hzfh.mobile.model.common.properties.WebInfoHelper; import com.hzframework.web.config.Config; import com.hzframework.web.resources.config.ResourceType; import com.hzframework.web.resources.config.script.Script; import com.hzframework.web.resources.config.script.ScriptConfig; /** * Created by paul on 14-12-31. */ public class ScriptContext { public static List<String> getScriptByPageAlias(PageAlias pageAlias) { //String rootPage = ServletActionContext.getServletContext().getRealPath("/config"); Object obj = CacheManager.get(CachePrefix.RESOURCE_PAGE_SCRIPT_PREFIX, pageAlias.toString()); if (obj != null && (obj instanceof ArrayList<?>)) { return (ArrayList<String>) obj; } ScriptConfig scriptConfig = CacheManager.get(CachePrefix.RESOURCE_SCRIPT_PREFIX, "SCRIPT", ScriptConfig.class); if (scriptConfig == null) { scriptConfig = Config.getScriptConfig(); } return buildScriptList(pageAlias, scriptConfig); } private static List<String> buildScriptList(PageAlias pageAlias, ScriptConfig scriptConfig) { List<String> resultList = new ArrayList<String>(); if (scriptConfig != null) { List<Script> scriptList = scriptConfig.getScriptListInPage(pageAlias.toString()); if (scriptList != null) { for (Script script : scriptList) { if (script.getName().equals("environmentVariable")) { script.setScript(buildEnvironmentVariable()); } resultList.add(buildScriptItem(script)); } } } return resultList; } private static String buildScriptItem(Script script) { String externalTagFormat = "%1$s<script type=\"text/javascript\" src=\"%2$s\"></script>%3$s"; String inlineTagFormat = "%1$s<script type=\"text/javascript\">%2$s</script>%3$s"; String tagFormat; String jsContent; String jsTagHeader = ""; String jsTagFooter = ""; String version = (script.getLimitBrowserVersion() > 0) ? String.valueOf(script.getLimitBrowserVersion()) : ""; if (script.getResourceType() == ResourceType.External) { tagFormat = externalTagFormat; if (script.isDevelop()) { jsContent = UrlHelper.buildDevJs(script.getScript()); } else { jsContent = UrlHelper.buildJs(script.getScript()); } } else { tagFormat = inlineTagFormat; jsContent = script.getScript(); } switch (script.getLimitBrowserType()) { case IEOnly: jsTagHeader = "<!--[if IE" + version + "]>"; jsTagFooter = "<![endif]-->"; break; case NonIEOnly: jsTagHeader = "<![if IE" + version + "]>"; jsTagFooter = "<![endif]>"; break; default: break; } return String.format(tagFormat, jsTagHeader, jsContent, jsTagFooter); } private static String buildEnvironmentVariable() { StringBuilder sb = new StringBuilder(); sb.append("var Environment={"); sb.append(String.format("%1$s:'%2$s',", "ImgSite", WebInfoHelper.WEB_MOBILE_RESOURCE_IMG)); sb.append(String.format("%1$s:'%2$s',", "LocalFileSite", WebInfoHelper.WEB_MOBILE_UPLOAD)); sb.append(String.format("%1$s:'%2$s',", "FileSite", WebInfoHelper.WEB_UPLOAD)); sb.append("};"); return sb.toString(); } }
[ "ulei0343@163.com" ]
ulei0343@163.com
4619024c28451f4bb54870d6ece0a253c0b940fb
dcb64d4a551470dc077b6502a2fe583e78275abc
/Fathom_com.brynk.fathom-dex2jar.src/com/facebook/react/uimanager/annotations/ReactPropertyHolder.java
259ff3c1e40d9ec115749020392b9860cbb5de5a
[]
no_license
lenjonemcse/Fathom-Drone-Android-App
d82799ee3743404dd5d7103152964a2f741b88d3
f3e3f0225680323fa9beb05c54c98377f38c1499
refs/heads/master
2022-01-13T02:10:31.014898
2019-07-10T19:42:02
2019-07-10T19:42:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
632
java
package com.facebook.react.uimanager.annotations; import java.lang.annotation.Annotation; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Inherited @Retention(RetentionPolicy.CLASS) @Target({java.lang.annotation.ElementType.TYPE}) public @interface ReactPropertyHolder { } /* Location: C:\Users\c_jealom1\Documents\Scripts\Android\Fathom_com.brynk.fathom\Fathom_com.brynk.fathom-dex2jar.jar * Qualified Name: com.facebook.react.uimanager.annotations.ReactPropertyHolder * JD-Core Version: 0.6.0 */
[ "jean-francois.lombardo@exfo.com" ]
jean-francois.lombardo@exfo.com
bc28e48cd8349ea6a32da17d76042864fa2c2a8b
cacf4ec25aff30c536cdc2839b6a24cac33be40b
/app/src/main/java/cn/v1/unionc_user/ui/home/CaptureActivity.java
e5fabeaffcc44988efdde36e6423e6c581940988
[]
no_license
ZRaymonds/unionc_new_user_android
536e82fdfb287ee716ddbd3ef95b5cced7052c47
91bf6f7476d617a89ca85001109ee3c636a9f515
refs/heads/master
2020-04-06T08:42:17.835930
2018-03-16T08:44:52
2018-03-16T08:44:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,280
java
package cn.v1.unionc_user.ui.home; import android.content.Intent; import android.graphics.Bitmap; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.google.gson.Gson; import com.google.zxing.Result; import com.google.zxing.client.result.ParsedResult; import com.mylhyl.zxing.scanner.OnScannerCompletionListener; import com.mylhyl.zxing.scanner.ScannerOptions; import com.mylhyl.zxing.scanner.ScannerView; import com.orhanobut.logger.Logger; import java.lang.reflect.Array; import java.util.Arrays; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; import cn.v1.unionc_user.R; import cn.v1.unionc_user.ui.adapter.Capture_activityActivityAdapter; import cn.v1.unionc_user.ui.base.BaseActivity; public class CaptureActivity extends BaseActivity { @Bind(R.id.scanner_view) ScannerView mScannerView; @Bind(R.id.img_back) ImageView imgBack; @Bind(R.id.tv_title) TextView tvTitle; @Bind(R.id.tv_right) TextView tvRight; @Bind(R.id.tv_light) TextView tvLight; @Bind(R.id.tv_sao) TextView tvSao; @Bind(R.id.tv_input) TextView tvInput; private boolean lightOn = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_capture); ButterKnife.bind(this); init(); } @Override protected void onResume() { mScannerView.onResume(); mScannerView.restartPreviewAfterDelay(1000); super.onResume(); } private void init() { mScannerView.setScannerOptions(new ScannerOptions.Builder() .setLaserLineColor(R.color.qm_blue) .setFrameCornerColor(R.color.qm_blue) .setFrameCornerWidth(5) .setMediaResId(R.raw.beep).build()); mScannerView.setOnScannerCompletionListener(new OnScannerCompletionListener() { @Override public void onScannerCompletion(Result rawResult, ParsedResult parsedResult, Bitmap barcode) { Logger.d(new Gson().toJson(rawResult)); Logger.d(new Gson().toJson(parsedResult)); Logger.d(new Gson().toJson(barcode)); String text = rawResult.getText(); if (rawResult.getText().contains("unionWeb/activity/clinic-activities")) { //医院二维码 try { String[] splitText1 = text.split("clinicId="); Logger.d(Arrays.toString(splitText1)); String clinicId = ""; if (splitText1[splitText1.length - 1].contains("}")) { String[] splitText2 = splitText1[splitText1.length - 1].split("\\}"); Logger.d(Arrays.toString(splitText2)); clinicId = splitText2[0]; } else if (splitText1[splitText1.length - 1].contains(",")) { String[] splitText2 = splitText1[splitText1.length - 1].split(","); Logger.d(Arrays.toString(splitText2)); clinicId = splitText2[0]; } else if (splitText1[splitText1.length - 1].contains("&")) { String[] splitText2 = splitText1[splitText1.length - 1].split("&"); Logger.d(Arrays.toString(splitText2)); clinicId = splitText2[0]; } else { clinicId = splitText1[splitText1.length - 1]; } if (clinicId.contains("\"")) { clinicId = clinicId.replaceAll("\"", ""); } Intent intent = new Intent(context, SignactivityActivity.class); intent.putExtra("clinicId", clinicId); startActivity(intent); } catch (Exception e) { e.printStackTrace(); } } if (rawResult.getText().contains("unionWeb/scanDoctQRCode.jsp")) { //医生二维码 try { String doctId; String[] splitText1 = text.split("doctId="); Logger.d(Arrays.toString(splitText1)); if (splitText1[1].contains("&")) { String[] splitText2 = splitText1[1].split("&"); doctId = splitText2[0]; } else { doctId = splitText1[1]; } if (doctId.contains("\"")) { doctId = doctId.replaceAll("\"", ""); } Intent intent = new Intent(context, DoctorDetailActivity.class); intent.putExtra("doctorId", doctId); intent.putExtra("source", 1 + ""); startActivity(intent); finish(); } catch (Exception e) { e.printStackTrace(); } } mScannerView.restartPreviewAfterDelay(1000); } }); } @Override protected void onPause() { mScannerView.onPause(); super.onPause(); } @OnClick({R.id.img_back, R.id.tv_light, R.id.tv_sao, R.id.tv_input}) public void onClick(View view) { switch (view.getId()) { case R.id.img_back: finish(); break; case R.id.tv_light: if (lightOn) { mScannerView.toggleLight(false); lightOn = false; } else { mScannerView.toggleLight(true); lightOn = true; } break; case R.id.tv_sao: break; case R.id.tv_input: break; } } }
[ "heyl2804@gmail.com" ]
heyl2804@gmail.com
11cd33d9093214c3b5fc98a73f3e9dba131ed1cb
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/facebook--facebook-android-sdk/50dfd16cc193b12e9d8d50711aa60efa403aab2b/before/SessionState.java
49243bfa71e692ba59679653ffe44b69dcae36fa
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,735
java
/** * Copyright 2012 Facebook * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.facebook; /** * <p> * Identifies the state of a Session. * </p> * <p> * Session objects implement a state machine that controls their lifecycle. This * enum represents the states of the state machine. * </p> */ public enum SessionState { /** * Indicates that the Session has not yet been opened and has no cached * token. Opening a Session in this state will involve user interaction. */ CREATED(Category.CREATED_CATEGORY), /** * <p> * Indicates that the Session has not yet been opened and has a cached * token. Opening a Session in this state will not involve user interaction. * </p> * <p> * If you are using Session from an Android service, you must provide a * TokenCache implementation that contains a valid token to the Session * constructor. The resulting Session will be created in this state, and you * can then safely call open, passing null for the Activity. * </p> */ CREATED_TOKEN_LOADED(Category.CREATED_CATEGORY), /** * Indicates that the Session is in the process of opening. */ OPENING(Category.CREATED_CATEGORY), /** * Indicates that the Session is opened. In this state, the Session may be * used with Request. */ OPENED(Category.OPENED_CATEGORY), /** * <p> * Indicates that the Session is opened and that the token has changed. In * this state, the Session may be used with Request. * </p> * <p> * Every time the token is updated, {@link Session.StatusCallback * StatusCallback} is called with this value. * </p> */ OPENED_TOKEN_UPDATED(Category.OPENED_CATEGORY), /** * Indicates that the Session is closed, and that it was not closed * normally. Typically this means that the open call failed, and the * Exception parameter to {@link Session.StatusCallback StatusCallback} will * be non-null. */ CLOSED_LOGIN_FAILED(Category.CLOSED_CATEGORY), /** * Indicates that the Session was closed normally. */ CLOSED(Category.CLOSED_CATEGORY); private final Category category; SessionState(Category category) { this.category = category; } /** * Returns a boolean indicating whether the state represents a successfully * opened state in which the Session can be used with a Request. * * @return a boolean indicating whether the state represents a successfully * opened state in which the Session can be used with a Request. */ public boolean getIsOpened() { return this.category == Category.OPENED_CATEGORY; } /** * Returns a boolean indicating whether the state represents a closed * Session that can no longer be used with a Request. * * @return a boolean indicating whether the state represents a closed * Session that can no longer be used with a Request. */ public boolean getIsClosed() { return this.category == Category.CLOSED_CATEGORY; } private enum Category { CREATED_CATEGORY, OPENED_CATEGORY, CLOSED_CATEGORY } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
9a21cd530c37a10ecedea64d224c6aa773ec963c
cb21c54bb967170c218dfe49f36675e43476ad7c
/src/main/java/bluebottle/send_email/dto/EmailResponse.java
c61093d53b1cad00760057bedea188ac5381aa9a
[]
no_license
maulong305/send_email
1e3da1c194c721cd99e971c5822d6ece9df5cee7
a43ab2a1074b121bcbdd63fea1e70e1c6b256fc8
refs/heads/master
2023-05-08T06:42:21.310040
2021-04-22T03:42:53
2021-04-22T03:42:53
359,675,972
0
0
null
null
null
null
UTF-8
Java
false
false
439
java
package bluebottle.send_email.dto; import bluebottle.send_email.model.Email; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.beans.BeanUtils; @Data @NoArgsConstructor public class EmailResponse { private String fromMail; private String toMail; private String subject; private String htmlBody; public EmailResponse(Email email) { BeanUtils.copyProperties(email, this); } }
[ "maulong305@gmail.com" ]
maulong305@gmail.com
758b9f1cb4c418508d32e77c1cff41ce76161d55
b6490d32546fda90cbe24b7a7086b47e591eb808
/bundles/efinder.core/src-gen/efinder/ir/ocl/impl/LiteralExpImpl.java
d38c37d792519b5d0b32c354e44acc49d5f76f02
[]
no_license
jesusc/efinder
7cd55b8fc032918cd306b5ce86f6c75a3e086c11
18811d8ff0f38e33e249f62fc749d51762de04f4
refs/heads/master
2022-05-07T00:10:39.520448
2022-03-31T07:14:46
2022-03-31T07:14:46
242,756,344
0
2
null
null
null
null
UTF-8
Java
false
false
695
java
/** */ package efinder.ir.ocl.impl; import efinder.ir.ocl.LiteralExp; import efinder.ir.ocl.OclPackage; import org.eclipse.emf.ecore.EClass; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Literal Exp</b></em>'. * <!-- end-user-doc --> * * @generated */ public abstract class LiteralExpImpl extends OclExpressionImpl implements LiteralExp { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected LiteralExpImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return OclPackage.Literals.LITERAL_EXP; } } //LiteralExpImpl
[ "jesus.sanchez.cuadrado@gmail.com" ]
jesus.sanchez.cuadrado@gmail.com
19f6b09057305c01513cae0b3ced6ba7b695fcee
4a854b5ac5002f87ec639dd356989c93745aae45
/lesson1/src/main/java/org/walkgis/learngis/lesson1/basicclasses/GISVertex.java
d5c9815935501d50b3b0ad1d720a178b166d90a7
[ "Apache-2.0" ]
permissive
polixiaohai/learn_gis
8b642b4750876c50281e09a243aebdefe0d77226
293847056dc965d5063155a61d5971cb25ccb15d
refs/heads/master
2020-09-22T07:24:20.364903
2020-01-07T02:56:27
2020-01-07T02:56:27
225,102,552
8
5
null
null
null
null
UTF-8
Java
false
false
425
java
package org.walkgis.learngis.lesson1.basicclasses; public class GISVertex { public double x; public double y; public GISVertex() { } public GISVertex(double x, double y) { this.x = x; this.y = y; } public double distance(GISVertex anotherVertex) { return Math.sqrt((x - anotherVertex.x) * (x - anotherVertex.x) + (y - anotherVertex.y) * (y - anotherVertex.y)); } }
[ "xx" ]
xx
c025ca3a0b306bf01e1207f1addc8ea128e9cff9
d3482c863face15ce134cede4ae2ff17af4f098a
/src/main/java/com/bcd/base/support_jdbc/dbinfo/data/DBInfo.java
c94daaefd111a5fc55d32bbd2daec54050c3b475
[ "MIT" ]
permissive
baichangda/MySpringBootFrame
e549eb3cb9b017af40922a0a0204603c8c0c3030
5f1ca41ad3ebc4550a0788f5da9f81d17ff07a78
refs/heads/master
2023-08-31T18:11:54.769933
2023-08-23T08:03:39
2023-08-23T08:03:39
96,524,845
12
2
null
2018-04-12T10:28:04
2017-07-07T09:49:59
Java
UTF-8
Java
false
false
394
java
package com.bcd.base.support_jdbc.dbinfo.data; public class DBInfo { public final String url; public final String username; public final String password; public final String db; public DBInfo(String url, String username, String password, String db) { this.url = url; this.username = username; this.password = password; this.db = db; } }
[ "471267877@qq.com" ]
471267877@qq.com
02cf2f3657531009d60111a520a54abc627f776a
c7413d100421492ae496dc402fc199f97796bfad
/src/main/java/net/cattaka/swing/table/StdStyledCellArrayComparator.java
84fd5fb0e486c9f55f87469657dc993fb5b4523c
[ "BSD-2-Clause" ]
permissive
cattaka/MathDrawer
e419f387ea8f35e78a06e13e2bb804ab294f6710
f08c668a0686efa3e30f8065654e841f2a6fea43
refs/heads/master
2021-05-26T07:09:52.334762
2020-10-14T01:02:23
2020-10-14T01:02:23
25,059,259
0
0
NOASSERTION
2020-10-14T01:02:24
2014-10-11T01:32:50
Java
UTF-8
Java
false
false
1,408
java
package net.cattaka.swing.table; import java.util.Comparator; public class StdStyledCellArrayComparator implements Comparator<StdStyledCell[]> { private int[] indicesOfKeys; private boolean descending; public StdStyledCellArrayComparator(int[] indicesOfKeys, boolean descending) { this(indicesOfKeys); this.descending = descending; } public StdStyledCellArrayComparator(int[] indicesOfKeys) { this.indicesOfKeys = new int[indicesOfKeys.length]; System.arraycopy(indicesOfKeys, 0, this.indicesOfKeys, 0, this.indicesOfKeys.length); } public int compare(StdStyledCell[] ssc1, StdStyledCell[] ssc2) { int result = 0; if (ssc1 != null && ssc2 == null) { result = -1; } else if (ssc1 == null && ssc2 != null) { result = 1; } else { for (int idx:indicesOfKeys) { StdStyledCell cm1 = ssc1[idx]; StdStyledCell cm2 = ssc2[idx]; String str1 = (cm1 != null) ? cm1.getValue() : null; String str2 = (cm2 != null) ? cm2.getValue() : null; if (str1 == null && str2 == null) { continue; } else if (str1 != null && str2 == null) { result = -1; break; } else if (str1 == null && str2 != null) { result = 1; break; } else { int r = str1.compareTo(str2); if (r == 0) { continue; } else { result = r; break; } } } } if (descending) { result = -result; } return result; } }
[ "cattaka@mail.cattaka.net" ]
cattaka@mail.cattaka.net
1211637c02db46bb6f7c538ccc4dec9aad94a5a7
36838dfcd53c4d2c73b9a6b0b7a8a28e4a331517
/cn/com/smartdevices/bracelet/ui/C0677ag.java
adaed741b81380859d81bb00bd864ac0529dae59
[]
no_license
ShahmanTeh/MiFit-Java
fbb2fd578727131b9ac7150b86c4045791368fe8
93bdf88d39423893b294dec2f5bf54708617b5d0
refs/heads/master
2021-01-20T13:05:10.408158
2016-02-03T21:02:55
2016-02-03T21:02:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package cn.com.smartdevices.bracelet.ui; import android.view.View; import android.view.View.OnClickListener; class C0677ag implements OnClickListener { final /* synthetic */ C0675ae a; C0677ag(C0675ae c0675ae) { this.a = c0675ae; } public void onClick(View view) { this.a.k.c(); this.a.dismiss(); } }
[ "kasha_malaga@hotmail.com" ]
kasha_malaga@hotmail.com
4eef1d353e1c0c612afa8d04454e254756d0ef85
a77256535d5accc9211a50ab222dd02cd599cfba
/src/main/java/smilyk/actuator/domain/Product.java
7c1dadb0c35080680b7c7dfc1077d936c706af32
[]
no_license
smilyk/actuator---course
a56eb685e39d5c27e160089364df6033b083b9ae
72549f32e45aaa1851e21cc3bea61928dc968821
refs/heads/master
2022-11-17T02:38:09.252356
2020-07-19T14:25:07
2020-07-19T14:25:07
274,110,890
0
0
null
null
null
null
UTF-8
Java
false
false
2,555
java
package smilyk.actuator.domain; import javax.persistence.*; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @Entity public class Product { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; @Version private Integer version; private Date dateCreated; private Date lastUpdated; private String courseName; private String courseSubtitle; @Column(length = 2000) private String courseDescription; @ManyToOne private Author author; private BigDecimal price; @ManyToMany private List<ProductCategory> productCategories = new ArrayList<>(); private String imageUrl; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCourseName() { return courseName; } public void setCourseName(String courseName) { this.courseName = courseName; } public String getCourseSubtitle() { return courseSubtitle; } public void setCourseSubtitle(String courseSubtitle) { this.courseSubtitle = courseSubtitle; } public String getCourseDescription() { return courseDescription; } public void setCourseDescription(String courseDescription) { this.courseDescription = courseDescription; } public Author getAuthor() { return author; } public void setAuthor(Author author) { this.author = author; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public List<ProductCategory> getProductCategories() { return productCategories; } public void setProductCategories(List<ProductCategory> productCategories) { this.productCategories = productCategories; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public Date getDateCreated() { return dateCreated; } public Date getLastUpdated() { return lastUpdated; } public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } @PreUpdate @PrePersist public void updateTimeStamps() { lastUpdated = new Date(); if (dateCreated==null) { dateCreated = new Date(); } } }
[ "smilyk1982@gmail.com" ]
smilyk1982@gmail.com
47132d6075c03baa1f802fe78485ba04235ab97d
e808d3e97e19558d15bacbcfeb9785014f2eb93a
/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/services/tripplanner/TransferParent.java
fc53cf48975ae260ca473e77e1baaeaef1e5dcb8
[ "Apache-2.0" ]
permissive
isabella232/onebusaway-application-modules
82793b63678f21e28c98093cb71b333a2e22a3c1
d2ca6c6e0038d158c9df487cab9f75d18b1214ff
refs/heads/master
2023-03-08T20:02:35.766999
2019-01-03T16:41:11
2019-01-03T16:41:11
335,592,972
0
0
NOASSERTION
2021-02-24T05:43:58
2021-02-03T10:50:26
null
UTF-8
Java
false
false
3,150
java
/** * Copyright (C) 2011 Brian Ferris <bdferris@onebusaway.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.onebusaway.transit_data_federation.services.tripplanner; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.onebusaway.collections.tuple.Pair; import org.onebusaway.transit_data_federation.services.transit_graph.StopEntry; public class TransferParent { private final TransferPatternData _data; private final Map<Pair<StopEntry>, TransferNode> transfers = new HashMap<Pair<StopEntry>, TransferNode>(); private final Map<StopEntry, HubNode> hubs = new HashMap<StopEntry, HubNode>(); public TransferParent(TransferPatternData data) { _data = data; } public Collection<TransferNode> getTransfers() { return transfers.values(); } public Collection<HubNode> getHubs() { return hubs.values(); } public TransferNode extendTree(StopEntry fromStop, StopEntry toStop, boolean exitAllowed) { TransferNode node = _data.extendTree(fromStop, toStop, exitAllowed); transfers.put(node.getStops(), node); return node; } public void extendHub(StopEntry hubStop, Iterable<StopEntry> stopsTo) { _data.extendHub(hubStop, stopsTo); } public void addTransferNode(TransferNode node) { transfers.put(node.getStops(), node); } public int size() { if (transfers.isEmpty()) return 1; int size = 0; for (TransferNode tree : getTransfers()) size += tree.size(); return size; } @Override public String toString() { StringBuilder b = new StringBuilder(); for (TransferNode tree : transfers.values()) toString(tree, new HashSet<Pair<StopEntry>>(), "", b); for (HubNode hub : hubs.values()) { b.append(hub.getHubStop().getId()); b.append(" h\n"); } return b.toString(); } protected void toString(TransferNode tree, Set<Pair<StopEntry>> visited, String prefix, StringBuilder b) { boolean firstVisit = visited.add(tree.getStops()); b.append(prefix); b.append(tree.getFromStop().getId()); b.append(" "); b.append(tree.getToStop().getId()); if (tree.isExitAllowed()) b.append(" x"); if (!firstVisit) b.append(" ..."); b.append("\n"); if (!firstVisit) return; for (TransferNode subTree : tree.getTransfers()) toString(subTree, visited, prefix + " ", b); for (HubNode hub : tree.getHubs()) { b.append(prefix); b.append(" "); b.append(hub.getHubStop().getId()); b.append(" h\n"); } } }
[ "bdferris@google.com" ]
bdferris@google.com
3d7b7b829e2dc608ffcbe100f61bd22696063b83
8a168702fa6b7bda624bcad635c3f4aa716491a3
/src/main/java/net/henryco/rynocheck/transaction/exec/queue/IPartQueue.java
6134f61fc8d2a95f68c3b8850bd1caeb7c592ddd
[]
no_license
henryco/rynocheck
abe9f60a96cd8c39e1e35fc6590f7cef57412e32
72282dd270febf2e349ef69a82dc0769b55ce0f0
refs/heads/master
2021-05-12T08:44:32.202718
2019-05-16T17:46:16
2019-05-16T17:46:16
117,295,528
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package net.henryco.rynocheck.transaction.exec.queue; import net.henryco.rynocheck.transaction.exec.active.IPartActive; import java.util.Queue; public interface IPartQueue<KEY, ELEMENT> { Queue<ELEMENT> release(); void submit(ELEMENT transaction, KEY key); void bindActivePart(IPartActive<KEY, ELEMENT> activePart); }
[ "hd2files@gmail.com" ]
hd2files@gmail.com
e91e59ffca60efe33ac5877f3ff2b3d724945d6c
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/HyperSQL/HyperSQL1386.java
ae44a1b586326461fc61d6f275dd330f8e878695
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,011
java
public String toString() { StringBuffer sb = new StringBuffer( sdf.format(Long.valueOf(modTime * 1000L)) + ' '); sb.append((entryType == '\0') ? ' ' : entryType); sb.append(ustar ? '*' : ' '); sb.append( " " + StringUtil.toPaddedString( Integer.toOctalString(fileMode), 4, ' ', false) + ' ' + StringUtil.toPaddedString( Long.toString(dataSize), 11, ' ', false) + " "); sb.append(StringUtil.toPaddedString(((ownerName == null) ? "-" : ownerName), 8, ' ', true)); sb.append(" " + path); return sb.toString(); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
386a1409fa10e8d332c65e69af8d3d17363c0726
882e77219bce59ae57cbad7e9606507b34eebfcf
/mi2s_securitycenter_miui12/src/main/java/com/miui/permcenter/privacymanager/behaviorrecord/n.java
86bacdfb807c4326c80c40636c5d3b6d4e370966
[]
no_license
CrackerCat/XiaomiFramework
17a12c1752296fa1a52f61b83ecf165f328f4523
0b7952df317dac02ebd1feea7507afb789cef2e3
refs/heads/master
2022-06-12T03:30:33.285593
2020-05-06T11:30:54
2020-05-06T11:30:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.miui.permcenter.privacymanager.behaviorrecord; import com.miui.permcenter.privacymanager.a.d; import java.util.Comparator; class n implements Comparator<d> { n() { } /* renamed from: a */ public int compare(d dVar, d dVar2) { return dVar2.f6338c - dVar.f6338c; } }
[ "sanbo.xyz@gmail.com" ]
sanbo.xyz@gmail.com
e362246b020e3f8a47e015c52d1e60373c31dddf
c2027acfc88a397d2a060449d0353583d044f33e
/src/com/hotent/HistoryScale/controller/lc/.svn/text-base/HistoryScaleController.java.svn-base
976cf54bb201779aa0ce969e9d9117a7a98dd0aa
[]
no_license
Zurich1994/Bpmx3_dev
5a3d1647d25d93a670c8962fb18009a27c2f4262
d5b7b823df8c0a89db6c00dbe3dd004647e67d67
refs/heads/master
2020-04-02T21:36:46.996578
2018-10-29T06:19:54
2018-10-29T06:19:54
154,805,490
4
3
null
null
null
null
UTF-8
Java
false
false
4,997
package com.hotent.HistoryScale.controller.lc; import java.util.HashMap; import java.util.Map; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.hotent.core.annotion.Action; import org.springframework.web.servlet.ModelAndView; import com.hotent.core.util.UniqueIdUtil; import com.hotent.core.web.util.RequestUtil; import com.hotent.core.web.controller.BaseController; import com.hotent.core.util.BeanUtils; import com.hotent.core.web.query.QueryFilter; import com.hotent.HistoryScale.model.lc.HistoryScale; import com.hotent.HistoryScale.service.lc.HistoryScaleService; import com.hotent.core.web.ResultMessage; /** * 对象功能:历史数据发生比例表 控制器类 */ @Controller @RequestMapping("/HistoryScale/lc/historyScale/") public class HistoryScaleController extends BaseController { @Resource private HistoryScaleService historyScaleService; /** * 添加或更新历史数据发生比例表。 * @param request * @param response * @param historyScale 添加或更新的实体 * @return * @throws Exception */ @RequestMapping("save") @Action(description="添加或更新历史数据发生比例表") public void save(HttpServletRequest request, HttpServletResponse response,HistoryScale historyScale) throws Exception { String resultMsg=null; String processId = request.getParameter("processId"); System.out.println("processId:"+processId); request.getSession().setAttribute("processId", processId); try{ if(historyScale.getId()==null){ Long id=UniqueIdUtil.genId(); historyScale.setId(id); historyScale.setProcesstId(processId); historyScaleService.add(historyScale); resultMsg=getText("添加","历史数据发生比例表"); }else{ historyScaleService.update(historyScale); resultMsg=getText("更新","历史数据发生比例表"); } writeResultMessage(response.getWriter(),resultMsg,ResultMessage.Success); }catch(Exception e){ writeResultMessage(response.getWriter(),resultMsg+","+e.getMessage(),ResultMessage.Fail); } } /** * 取得历史数据发生比例表分页列表 * @param request * @param response * @param page * @return * @throws Exception */ @RequestMapping("list") @Action(description="查看历史数据发生比例表分页列表") public ModelAndView list(HttpServletRequest request,HttpServletResponse response) throws Exception { String processId =String.valueOf(request.getSession().getAttribute("processId")); List<HistoryScale> list=historyScaleService.getAll(new QueryFilter(request,"historyScaleItem")); ModelAndView mv=this.getAutoView().addObject("historyScaleList",list).addObject("processId",processId); return mv; } /** * 删除历史数据发生比例表 * @param request * @param response * @throws Exception */ @RequestMapping("del") @Action(description="删除历史数据发生比例表") public void del(HttpServletRequest request, HttpServletResponse response) throws Exception { String preUrl= RequestUtil.getPrePage(request); ResultMessage message=null; try{ Long[] lAryId=RequestUtil.getLongAryByStr(request,"id"); historyScaleService.delByIds(lAryId); message=new ResultMessage(ResultMessage.Success, "删除历史数据发生比例表成功!"); }catch(Exception ex){ message=new ResultMessage(ResultMessage.Fail, "删除失败" + ex.getMessage()); } addMessage(message, request); response.sendRedirect(preUrl); } /** * 编辑历史数据发生比例表 * @param request * @param response * @throws Exception */ @RequestMapping("edit") @Action(description="编辑历史数据发生比例表") public ModelAndView edit(HttpServletRequest request) throws Exception { //System.out.println("???///"); Long id=RequestUtil.getLong(request,"id"); String type = request.getParameter("timeType"); request.getSession().setAttribute("sendTimeType", type); String pid = request.getParameter("pid"); System.out.println("type: ?"+type+"? pid:?"+pid); String returnUrl=RequestUtil.getPrePage(request); HistoryScale historyScale=historyScaleService.getById(id); return getAutoView().addObject("historyScale",historyScale) .addObject("returnUrl",returnUrl).addObject("rtnType",type).addObject("rtnPid",pid); } /** * 取得历史数据发生比例表明细 * @param request * @param response * @return * @throws Exception */ @RequestMapping("get") @Action(description="查看历史数据发生比例表明细") public ModelAndView get(HttpServletRequest request, HttpServletResponse response) throws Exception { Long id=RequestUtil.getLong(request,"id"); HistoryScale historyScale=historyScaleService.getById(id); return getAutoView().addObject("historyScale", historyScale); } }
[ "huanran.wang1994@foxmail.com" ]
huanran.wang1994@foxmail.com
bea6e04aaa9cc8f88f7b125cffad7ddca8fd5735
43a5a5d1949556b7119cb36d01600300acabcbc5
/hypebeaststore/app/src/main/java/com/hb/hkm/hypebeaststore/tasks/Filtering.java
20ddb1d567fb7dcf9e264e251754cf79c1a17bca
[]
no_license
changwng/shoppingcart
1866f43c298c0e14f8f582dcaeabf19930e83664
c7ef81af5245b2db920e950fa11399a101902825
refs/heads/master
2021-01-17T22:19:41.794917
2015-03-31T16:01:29
2015-03-31T16:01:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,464
java
package com.hb.hkm.hypebeaststore.tasks; import android.content.Context; import com.hb.hkm.hypebeaststore.datamodel.V1.TermWrap; import java.util.ArrayList; import java.util.Collections; /** * Created by hesk on 2/9/15. */ public class Filtering extends asyclient { public static String[] TermsAsListAlphabetical(final ArrayList<TermWrap> items) { final ArrayList<String> sl = new ArrayList<String>(); sl.clear(); for (TermWrap T : items) { sl.add(T.theTerm()); } Collections.sort(sl, String.CASE_INSENSITIVE_ORDER); return sl.toArray(new String[sl.size()]); } public static String[] TermsAsList(final ArrayList<TermWrap> items) { final ArrayList<String> sl = new ArrayList<String>(); sl.clear(); for (TermWrap T : items) { sl.add(T.theTerm()); } return sl.toArray(new String[sl.size()]); } /** * what's kind */ public static String[] SIZE_ORDER_REF = new String[]{ "Free Size", "XS", "S", "M", "L", "XL", "XXL", "28", "29", "30", "31", "32", "33", "34", "35", "36", "38", "40", "41", "42", "XS/S", "S/M", "M/L", "L/XL", "EU36-40", "EU41-46", "EU36", "EU 37", "EU 39", "EU 40", "EU 41", "EU 42", "EU 43", "EU 44", "EU 45", "EU 46", "7 1/4", "7 1/2", "7 3/4", "7", "7 1/8", "7 3/8", "7 5/8", "7 7/8", "JP 25.5", "JP 26.5", "JP 27.5", "JP 28.5", "JP 29.5", "UK 7", "UK 8", "UK 9", "UK 10", "8", "9", "10", "11", "0 = XS", "1 = XS", "1 = S", "2 = S", "2 = M", "3 = M", "3 = L", "4 = L", "4 = XL", "S = 15", "M = 15.5", "L = 16", "M = 58", "L = 59", "IT 44 = 28", "IT 46 = 30", "IT 48 = 32", "IT 50 = 34", "IT 46 = S", "IT 48 = M", "IT 50 = L", "US 7.5", "US 8", "US 8.5", "US 9", "US 9.5", "US 10", "US 10.5", "US 11", "US 11.5", "US 12", "6-8", "9-11", "IT44 = XS", "IT52 = XL", "5 = XXL", "5 = XXL", "39 = S", "40 = M", "41 = L", "42 = XL", "M = 7.5\"", "L = 8\"", "90", "95", "100", "38 = XS", "4 = US8.5-9", "5 = US9.5-10", "6 = US10.5-11", "US 8H", "US 9H", "US 10H" }; public static String[] CAT_ORDER_REF = new String[]{ "Pants", "Shorts", "T-Shirts", "Jackets", "Hoodies", "Jeans", "Shirts", "Underwear", "Swimwear", "Polos", "Knitwear", "Blazers", "Sweaters", "Vests", "Henleys", "Tank Tops", "Jerseys", "Keychains", "Bags", "Socks", "Watches", "Hats", "Wallets", "Stickers", "Belts", "Cases", "Jewelry", "Scarves", "Ties", "Skateboards", "Music", "Gloves", "Eyewear", "Boots", "Sneakers", "Casual Shoes", "Grooming", "Stationery", "Home", "Photography", "Audio", "Fragrances" }; protected static String TAG = "filtering"; public Filtering(Context cc, callback cb) { super(cc, cb); } @Override protected void GSONParser(String data) { } @Override protected void ViewConstruction() { } public static ArrayList<TermWrap> getSorted(final ArrayList<TermWrap> items, final String[] ref) { final ArrayList<TermWrap> newlist = new ArrayList<TermWrap>(); for (String t : ref) { for (TermWrap T : items) { String strTerm = T.theTerm(); if (strTerm.equalsIgnoreCase(t)) { newlist.add(new TermWrap(t, T.getTheCount())); } } } return newlist; } }
[ "jobhesk@gmail.com" ]
jobhesk@gmail.com
f28ccff8e6acc87fd7da6374df8a303364f47dcb
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/apache/hadoop/mapreduce/jobhistory/TestEvents.java
3a1a5c6fcce1bf301b3a39a663c3e4353006c538
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
7,883
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.hadoop.mapreduce.jobhistory; import EventType.JOB_KILLED; import EventType.JOB_PRIORITY_CHANGED; import EventType.JOB_STATUS_CHANGED; import EventType.REDUCE_ATTEMPT_FINISHED; import EventType.REDUCE_ATTEMPT_KILLED; import EventType.REDUCE_ATTEMPT_STARTED; import EventType.TASK_UPDATED; import JobPriority.LOW; import TaskType.REDUCE; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.util.Set; import org.apache.hadoop.mapred.JobPriority; import org.apache.hadoop.mapreduce.Counters; import org.apache.hadoop.mapreduce.JobID; import org.apache.hadoop.mapreduce.TaskAttemptID; import org.apache.hadoop.mapreduce.TaskID; import org.apache.hadoop.mapreduce.TaskType; import org.apache.hadoop.mapreduce.org.apache.hadoop.mapreduce.JobID; import org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent; import org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric; import org.junit.Assert; import org.junit.Test; public class TestEvents { private static final String taskId = "task_1_2_r_3"; /** * test a getters of TaskAttemptFinishedEvent and TaskAttemptFinished * * @throws Exception * */ @Test(timeout = 10000) public void testTaskAttemptFinishedEvent() throws Exception { JobID jid = new JobID("001", 1); TaskID tid = new TaskID(jid, TaskType.REDUCE, 2); TaskAttemptID taskAttemptId = new TaskAttemptID(tid, 3); Counters counters = new Counters(); TaskAttemptFinishedEvent test = new TaskAttemptFinishedEvent(taskAttemptId, TaskType.REDUCE, "TEST", 123L, "RAKNAME", "HOSTNAME", "STATUS", counters, 234); Assert.assertEquals(test.getAttemptId().toString(), taskAttemptId.toString()); Assert.assertEquals(test.getCounters(), counters); Assert.assertEquals(test.getFinishTime(), 123L); Assert.assertEquals(test.getHostname(), "HOSTNAME"); Assert.assertEquals(test.getRackName(), "RAKNAME"); Assert.assertEquals(test.getState(), "STATUS"); Assert.assertEquals(test.getTaskId(), tid); Assert.assertEquals(test.getTaskStatus(), "TEST"); Assert.assertEquals(test.getTaskType(), REDUCE); Assert.assertEquals(234, test.getStartTime()); } /** * simple test JobPriorityChangeEvent and JobPriorityChange * * @throws Exception * */ @Test(timeout = 10000) public void testJobPriorityChange() throws Exception { org.apache.hadoop.mapreduce.JobID jid = new JobID("001", 1); JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW); Assert.assertEquals(test.getJobId().toString(), jid.toString()); Assert.assertEquals(test.getPriority(), LOW); } @Test(timeout = 10000) public void testJobQueueChange() throws Exception { org.apache.hadoop.mapreduce.JobID jid = new JobID("001", 1); JobQueueChangeEvent test = new JobQueueChangeEvent(jid, "newqueue"); Assert.assertEquals(test.getJobId().toString(), jid.toString()); Assert.assertEquals(test.getJobQueueName(), "newqueue"); } /** * simple test TaskUpdatedEvent and TaskUpdated * * @throws Exception * */ @Test(timeout = 10000) public void testTaskUpdated() throws Exception { JobID jid = new JobID("001", 1); TaskID tid = new TaskID(jid, TaskType.REDUCE, 2); TaskUpdatedEvent test = new TaskUpdatedEvent(tid, 1234L); Assert.assertEquals(test.getTaskId().toString(), tid.toString()); Assert.assertEquals(test.getFinishTime(), 1234L); } /* test EventReader EventReader should read the list of events and return instance of HistoryEvent Different HistoryEvent should have a different datum. */ @Test(timeout = 10000) public void testEvents() throws Exception { EventReader reader = new EventReader(new DataInputStream(new ByteArrayInputStream(getEvents()))); HistoryEvent e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(JOB_PRIORITY_CHANGED)); Assert.assertEquals("ID", getJobid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(JOB_STATUS_CHANGED)); Assert.assertEquals("ID", getJobid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(TASK_UPDATED)); Assert.assertEquals("ID", getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(JOB_KILLED)); Assert.assertEquals("ID", getJobid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); e = reader.getNextEvent(); Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED)); Assert.assertEquals(TestEvents.taskId, getTaskid().toString()); reader.close(); } private class FakeEvent implements HistoryEvent { private EventType eventType; private Object datum; public FakeEvent(EventType eventType) { this.eventType = eventType; } @Override public EventType getEventType() { return eventType; } @Override public Object getDatum() { return datum; } @Override public void setDatum(Object datum) { this.datum = datum; } @Override public TimelineEvent toTimelineEvent() { return null; } @Override public Set<TimelineMetric> getTimelineMetrics() { return null; } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
c474a0de0901e38c16f5241f613a3024c99f7051
90dabee5e2977422befc41df11694633defb5b4b
/com/hbm/gui/container/ContainerNukeFleija.java
ed02646e6c7d2c8e7fdc41efa7fe62206b939058
[]
no_license
arond1/Hbm-s-Nuclear-Tech-GIT
045a7ccdd0ffd6c8f9dd39667809b765db038dd0
208a32410f886a9fca486bf8e14aad693bb050b2
refs/heads/master
2021-01-23T07:16:21.091823
2016-11-30T09:21:39
2016-11-30T09:21:39
80,508,593
1
0
null
2017-01-31T09:54:51
2017-01-31T09:54:50
null
UTF-8
Java
false
false
2,120
java
package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukeFleija; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class ContainerNukeFleija extends Container { private TileEntityNukeFleija nukeTsar; public ContainerNukeFleija(InventoryPlayer invPlayer, TileEntityNukeFleija tedf) { nukeTsar = tedf; this.addSlotToContainer(new Slot(tedf, 0, 8, 36)); this.addSlotToContainer(new Slot(tedf, 1, 152, 36)); this.addSlotToContainer(new Slot(tedf, 2, 44, 18)); this.addSlotToContainer(new Slot(tedf, 3, 44, 36)); this.addSlotToContainer(new Slot(tedf, 4, 44, 54)); this.addSlotToContainer(new Slot(tedf, 5, 80, 18)); this.addSlotToContainer(new Slot(tedf, 6, 98, 18)); this.addSlotToContainer(new Slot(tedf, 7, 80, 36)); this.addSlotToContainer(new Slot(tedf, 8, 98, 36)); this.addSlotToContainer(new Slot(tedf, 9, 80, 54)); this.addSlotToContainer(new Slot(tedf, 10, 98, 54)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56)); } } for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56)); } } @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) { ItemStack var3 = null; Slot var4 = (Slot) this.inventorySlots.get(par2); if (var4 != null && var4.getHasStack()) { ItemStack var5 = var4.getStack(); var3 = var5.copy(); if (par2 <= 10) { if (!this.mergeItemStack(var5, 11, this.inventorySlots.size(), true)) { return null; } } else { return null; } if (var5.stackSize == 0) { var4.putStack((ItemStack) null); } else { var4.onSlotChanged(); } } return var3; } @Override public boolean canInteractWith(EntityPlayer player) { return nukeTsar.isUseableByPlayer(player); } }
[ "hbmmods@gmail.com" ]
hbmmods@gmail.com
ee49d1ef40b961caab548f41a6b5bf779f8ee9a6
e6a2708c4c6483f6d0b51518cfe25d927b815c9e
/app/src/main/java/com/android/mb/schedule/entitys/CurrentUser.java
76cfc33bdde585e04be5c22140e538b2ad723d5d
[]
no_license
cgy529387306/Schedule
cdeefacb88a499288ddfedf90710b9130e71266a
9b34e04c7b6faf8be5ad35b66dd567b5a0a3a936
refs/heads/master
2021-06-19T04:49:18.380852
2019-08-05T06:19:17
2019-08-05T06:19:17
145,403,976
0
1
null
null
null
null
UTF-8
Java
false
false
4,549
java
package com.android.mb.schedule.entitys; import android.util.Log; import com.android.mb.schedule.utils.Helper; import com.android.mb.schedule.utils.JsonHelper; import com.android.mb.schedule.utils.PreferencesHelper; /** * 作者:cgy on 16/12/26 22:53 * 邮箱:593960111@qq.com */ public class CurrentUser { private String username; private String nickname; private String mobile; private String eid; private long office_id; private String office_name; private String avatar; private String token; private long expiretime; private long token_id; private long id; private int is_bind_wx; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } /** * 优先显示nickname,没有显示username * @return */ public String getNickname() { return Helper.isEmpty(nickname)?username:nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getEid() { return eid; } public void setEid(String eid) { this.eid = eid; } public long getOffice_id() { return office_id; } public void setOffice_id(long office_id) { this.office_id = office_id; } public String getOffice_name() { return office_name; } public void setOffice_name(String office_name) { this.office_name = office_name; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } public long getExpiretime() { return expiretime; } public void setExpiretime(long expiretime) { this.expiretime = expiretime; } public long getToken_id() { return token_id; } public void setToken_id(long token_id) { this.token_id = token_id; } public long getId() { return id; } public void setId(long id) { this.id = id; } public int getIs_bind_wx() { return is_bind_wx; } public void setIs_bind_wx(int is_bind_wx) { this.is_bind_wx = is_bind_wx; } //region 单例 private static final String TAG = CurrentUser.class.getSimpleName(); private static final String USER = "CurrentUser"; private static CurrentUser me; /** * 单例 * @return 当前用户对象 */ public static CurrentUser getInstance() { if (me == null) { me = new CurrentUser(); } return me; } /** * 出生 * <p>尼玛!终于出生了!!!</p> * <p>调用此方法查询是否登录过</p> * @return 出生与否 */ public boolean isLogin() { String json = PreferencesHelper.getInstance().getString(USER); me = JsonHelper.fromJson(json, CurrentUser.class); return me != null; } public boolean login(CurrentUser entity,boolean isLogin) { boolean born = false; String json = ""; if (entity != null) { me.setId(entity.getId()); me.setUsername(entity.getUsername()); me.setNickname(entity.getNickname()); me.setMobile(entity.getMobile()); me.setEid(entity.getEid()); me.setOffice_id(entity.getOffice_id()); me.setOffice_name(entity.getOffice_name()); me.setAvatar(entity.getAvatar()); if (isLogin){ me.setToken(entity.getToken()); me.setIs_bind_wx(entity.getIs_bind_wx()); me.setToken_id(entity.getToken_id()); me.setExpiretime(entity.getExpiretime()); } json = JsonHelper.toJson(me); born = me != null; } // 生完了 if (!born) { Log.e(TAG, "尼玛,流产了!!!"); } else { PreferencesHelper.getInstance().putString(USER,json); } return born; } // endregion 单例 /** * 退出登录清理用户信息 */ public void loginOut() { me = null; PreferencesHelper.getInstance().putString(USER, ""); } }
[ "529387306@qq.com" ]
529387306@qq.com
f15674c2317db6b8c99eed306b13bb2977e03434
eca4a253fe0eba19f60d28363b10c433c57ab7a1
/eclipse/de.tif.jacob.designer/src/de/tif/jacob/designer/editor/relationset/action/AddRelatedTableAliasAction.java
516dc4482b8fc7e31892c50bbae9341a21827c8a
[]
no_license
freegroup/Open-jACOB
632f20575092516f449591bf6f251772f599e5fc
84f0a6af83876bd21c453132ca6f98a46609f1f4
refs/heads/master
2021-01-10T11:08:03.604819
2015-05-25T10:25:49
2015-05-25T10:25:49
36,183,560
0
0
null
null
null
null
ISO-8859-2
Java
false
false
5,503
java
/******************************************************************************* * This file is part of Open-jACOB * Copyright (C) 2005-2010 Andreas Herz | FreeGroup * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA *******************************************************************************/ package de.tif.jacob.designer.editor.relationset.action; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.draw2d.geometry.Point; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.window.Window; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.IActionDelegate; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.dialogs.ElementListSelectionDialog; import de.tif.jacob.designer.JacobDesigner; import de.tif.jacob.designer.editor.relationset.JacobRelationsetEditor; import de.tif.jacob.designer.editor.relationset.command.AddTableAliasCommand; import de.tif.jacob.designer.editor.relationset.editpart.TableAliasEditPart; import de.tif.jacob.designer.model.ObjectModel; import de.tif.jacob.designer.model.RelationModel; import de.tif.jacob.designer.model.RelationsetModel; import de.tif.jacob.designer.model.TableAliasModel; import de.tif.jacob.util.clazz.ClassUtil; public final class AddRelatedTableAliasAction implements IObjectActionDelegate { TableAliasModel model=null; RelationsetModel relationset; JacobRelationsetEditor editor; public void setActivePart(IAction action, IWorkbenchPart targetPart) { editor = ((JacobRelationsetEditor)targetPart); relationset = editor.getRelationsetModel(); } public void selectionChanged(IAction action, ISelection selection) { if(((IStructuredSelection)selection).getFirstElement()!=null) { TableAliasEditPart editPart = (TableAliasEditPart)((IStructuredSelection)selection).getFirstElement(); model = (TableAliasModel)editPart.getModel(); } else model=null; } /** * @see IActionDelegate#run(IAction) */ public final void run(IAction action) { long start = System.currentTimeMillis(); try { List aliases = new ArrayList(); List relations = model.getJacobModel().getRelationModelsFrom(model); Iterator iter = relations.iterator(); while (iter.hasNext()) { RelationModel relation = (RelationModel) iter.next(); if(!relationset.contains(relation.getToTableAlias())) aliases.add(relation.getToTableAlias()); } relations = model.getJacobModel().getRelationModelsTo(model); iter = relations.iterator(); while (iter.hasNext()) { RelationModel relation = (RelationModel) iter.next(); if(!relationset.contains(relation.getFromTableAlias())) aliases.add(relation.getFromTableAlias()); } // Falls es nur ein Tabellenalias ist, dann kann dieser gleich eingefügt werden // ohnen einen Dialog anzuzeigen // if(aliases.size()==1) { editor.getCommandStack().execute(new AddTableAliasCommand(relationset,(TableAliasModel)aliases.get(0), new Point(30,30))); } else { ElementListSelectionDialog dialog = new ElementListSelectionDialog(null, new LabelProvider() { public Image getImage(Object element) { return JacobDesigner.getImage(((ObjectModel) element).getImageName()); } public String getText(Object element) { return ((TableAliasModel) element).getName(); } }); dialog.setImage(JacobDesigner.getImage("tablealias.png")); dialog.setTitle("Select table alias to add."); dialog.setMessage("Select related table alias to add."); dialog.setElements(aliases.toArray()); dialog.setMultipleSelection(true); dialog.create(); if(dialog.open()==Window.OK) { Object[] results= dialog.getResult(); if(results!=null) { for (int i = 0; i < results.length; i++) { TableAliasModel alias=(TableAliasModel)results[i]; if(editor.getCommandStack()!=null) editor.getCommandStack().execute(new AddTableAliasCommand(relationset, alias, new Point(30*i,30*i))); else new AddTableAliasCommand(relationset, alias, new Point(30*i,30*i)).execute(); } } } } } catch (Exception e) { JacobDesigner.showException(e); } finally { System.out.println(ClassUtil.getShortClassName(this.getClass())+" duration:"+(System.currentTimeMillis()-start)); } } }
[ "a.herz@freegroup.de" ]
a.herz@freegroup.de
b1a13066ddf114f282d9de25fe92b587ae8840b4
d48818be27362288b3da5ee88a8240fda5d3ec81
/SpringBoot2-Dubbo-Provider/src/main/java/com/test/dubbo/service/impl/DemoServiceImpl.java
2d63420fd363a5b3ca3c16877c81c1583f48ddcf
[]
no_license
West-life/springlearning
fb7c1311ba5f4e388699cfc6cb5826c6e258033e
f75c0505ee700770a344cdca2f810de15df59750
refs/heads/master
2020-08-09T09:27:46.561021
2019-07-08T15:02:47
2019-07-08T15:02:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
530
java
package com.test.dubbo.service.impl; import com.alibaba.dubbo.config.annotation.Service; import com.test.dubbo.service.api.DemoService; /** * @author yu 2018/11/24. */ @Service( version = "${api.version}", application = "${dubbo.application.id}", protocol = "${dubbo.protocol.id}", registry = "${dubbo.registry.id}" ) public class DemoServiceImpl implements DemoService { @Override public String sayHello(String name) { return "Hello, " + name + " (from Spring Boot)"; } }
[ "836575280@qq.com" ]
836575280@qq.com
b5ee20cda65f65bf677d28fd38bdaacc14aa1186
4536078b4070fc3143086ff48f088e2bc4b4c681
/v1.0.4/decompiled/androidx/vectordrawable/R$attr.java
b7375ea2d962355cf7eeba4e473f23b97af9251b
[]
no_license
olealgoritme/smittestopp_src
485b81422752c3d1e7980fbc9301f4f0e0030d16
52080d5b7613cb9279bc6cda5b469a5c84e34f6a
refs/heads/master
2023-05-27T21:25:17.564334
2023-05-02T14:24:31
2023-05-02T14:24:31
262,846,147
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package androidx.vectordrawable; public final class R$attr { public static final int alpha = 2130968616; public static final int font = 2130968811; public static final int fontProviderAuthority = 2130968813; public static final int fontProviderCerts = 2130968814; public static final int fontProviderFetchStrategy = 2130968815; public static final int fontProviderFetchTimeout = 2130968816; public static final int fontProviderPackage = 2130968817; public static final int fontProviderQuery = 2130968818; public static final int fontStyle = 2130968819; public static final int fontVariationSettings = 2130968820; public static final int fontWeight = 2130968821; public static final int ttcIndex = 2130969136; } /* Location: * Qualified Name: base.androidx.vectordrawable.R.attr * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "olealgoritme@gmail.com" ]
olealgoritme@gmail.com
855804010e952b08158fb58b4eaa57ee73351027
bd145a35a14b7f7459fc94ba2fb56111f1caf378
/sgrain-spring-boot-context/src/main/java/com/sgrain/boot/context/httpclient/service/impl/AsyncLogHttpClientServiceImpl.java
924d9a3bea0b9bb71f32bacb272632fb178e6dd2
[]
no_license
13273871849/spring-parent
d5305f6f11bf319c4299e4d0188e1ddec0796f1d
922a106265fd48975926979530000b59f1966608
refs/heads/master
2023-01-29T10:25:19.620652
2020-12-09T02:24:18
2020-12-09T02:24:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,763
java
package com.sgrain.boot.context.httpclient.service.impl; import com.sgrain.boot.common.utils.log.LoggerUtils; import com.sgrain.boot.common.utils.json.JSONUtils; import com.sgrain.boot.context.httpclient.po.AsyncLogHttpClientRequest; import com.sgrain.boot.context.httpclient.po.AsyncLogHttpClientResponse; import com.sgrain.boot.context.httpclient.service.AsyncLogHttpClientService; import org.springframework.scheduling.annotation.Async; /** * @program: spring-parent * @description: RestTemplate日志拦服务类 * @create: 2020/08/24 */ public class AsyncLogHttpClientServiceImpl implements AsyncLogHttpClientService { /** * 第三方接口请求module name */ private static final String THIRD_PARTY = "Third_Party"; /** * @Description 记录请求信息 * @Version 1.0 */ @Override @Async public void traceRequest(AsyncLogHttpClientRequest asyncLogHttpClient) { if (LoggerUtils.isDebug()) { LoggerUtils.module(AsyncLogHttpClientServiceImpl.class, THIRD_PARTY, JSONUtils.toJSONPrettyString(asyncLogHttpClient)); } else { LoggerUtils.module(AsyncLogHttpClientServiceImpl.class, THIRD_PARTY, JSONUtils.toJSONString(asyncLogHttpClient)); } } /** * @Description 记录响应信息 * @Version 1.0 */ @Override @Async public void traceResponse(AsyncLogHttpClientResponse asyncLogHttpClient) { if (LoggerUtils.isDebug()) { LoggerUtils.module(AsyncLogHttpClientServiceImpl.class, THIRD_PARTY, JSONUtils.toJSONPrettyString(asyncLogHttpClient)); } else { LoggerUtils.module(AsyncLogHttpClientServiceImpl.class, THIRD_PARTY, JSONUtils.toJSONString(asyncLogHttpClient)); } } }
[ "mingyang@eastmoney.com" ]
mingyang@eastmoney.com
55486ab13af89e59127fd6927dfa2f666ce1aad4
f08256664e46e5ac1466f5c67dadce9e19b4e173
/sources/com/google/android/exoplayer2/p361p0/C8865v.java
28d4964c05e478b4ca4336485bdb1c1e7c6a6d25
[]
no_license
IOIIIO/DisneyPlusSource
5f981420df36bfbc3313756ffc7872d84246488d
658947960bd71c0582324f045a400ae6c3147cc3
refs/heads/master
2020-09-30T22:33:43.011489
2019-12-11T22:27:58
2019-12-11T22:27:58
227,382,471
6
3
null
null
null
null
UTF-8
Java
false
false
6,730
java
package com.google.android.exoplayer2.p361p0; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.drm.DrmInitData; import com.google.android.exoplayer2.util.C9571v; import java.nio.ByteBuffer; import java.util.Arrays; import net.danlew.android.joda.DateUtils; /* renamed from: com.google.android.exoplayer2.p0.v */ /* compiled from: DtsUtil */ public final class C8865v { /* renamed from: a */ private static final int[] f18964a = {1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8}; /* renamed from: b */ private static final int[] f18965b = {-1, 8000, 16000, 32000, -1, -1, 11025, 22050, 44100, -1, -1, 12000, 24000, 48000, -1, -1}; /* renamed from: c */ private static final int[] f18966c = {64, 112, 128, 192, 224, 256, 384, 448, DateUtils.FORMAT_NO_NOON, 640, 768, 896, 1024, 1152, 1280, 1536, 1920, DateUtils.FORMAT_NO_MIDNIGHT, 2304, 2560, 2688, 2816, 2823, 2944, 3072, 3840, 4096, 6144, 7680}; /* renamed from: a */ public static Format m25814a(byte[] bArr, String str, String str2, DrmInitData drmInitData) { C9571v b = m25816b(bArr); b.mo24670c(60); int i = f18964a[b.mo24660a(6)]; int i2 = f18965b[b.mo24660a(4)]; int a = b.mo24660a(5); int[] iArr = f18966c; int i3 = a >= iArr.length ? -1 : (iArr[a] * 1000) / 2; b.mo24670c(10); return Format.m24875a(str, "audio/vnd.dts", (String) null, i3, -1, i + (b.mo24660a(2) > 0 ? 1 : 0), i2, null, drmInitData, 0, str2); } /* renamed from: a */ public static boolean m25815a(int i) { return i == 2147385345 || i == -25230976 || i == 536864768 || i == -14745368; } /* renamed from: b */ private static C9571v m25816b(byte[] bArr) { if (bArr[0] == Byte.MAX_VALUE) { return new C9571v(bArr); } byte[] copyOf = Arrays.copyOf(bArr, bArr.length); if (m25817c(copyOf)) { for (int i = 0; i < copyOf.length - 1; i += 2) { byte b = copyOf[i]; int i2 = i + 1; copyOf[i] = copyOf[i2]; copyOf[i2] = b; } } C9571v vVar = new C9571v(copyOf); if (copyOf[0] == 31) { C9571v vVar2 = new C9571v(copyOf); while (vVar2.mo24659a() >= 16) { vVar2.mo24670c(2); vVar.mo24661a(vVar2.mo24660a(14), 14); } } vVar.mo24663a(copyOf); return vVar; } /* renamed from: c */ private static boolean m25817c(byte[] bArr) { return bArr[0] == -2 || bArr[0] == -1; } /* renamed from: d */ public static int m25818d(byte[] bArr) { int i; byte b; byte b2; int i2; byte b3; byte b4 = bArr[0]; if (b4 != -2) { if (b4 == -1) { i2 = (bArr[4] & 7) << 4; b3 = bArr[7]; } else if (b4 != 31) { i = (bArr[4] & 1) << 6; b = bArr[5]; } else { i2 = (bArr[5] & 7) << 4; b3 = bArr[6]; } b2 = b3 & 60; return (((b2 >> 2) | i2) + 1) * 32; } i = (bArr[5] & 1) << 6; b = bArr[4]; b2 = b & 252; return (((b2 >> 2) | i2) + 1) * 32; } /* renamed from: a */ public static int m25812a(ByteBuffer byteBuffer) { int i; byte b; byte b2; int i2; byte b3; int position = byteBuffer.position(); byte b4 = byteBuffer.get(position); if (b4 != -2) { if (b4 == -1) { i2 = (byteBuffer.get(position + 4) & 7) << 4; b3 = byteBuffer.get(position + 7); } else if (b4 != 31) { i = (byteBuffer.get(position + 4) & 1) << 6; b = byteBuffer.get(position + 5); } else { i2 = (byteBuffer.get(position + 5) & 7) << 4; b3 = byteBuffer.get(position + 6); } b2 = b3 & 60; return (((b2 >> 2) | i2) + 1) * 32; } i = (byteBuffer.get(position + 5) & 1) << 6; b = byteBuffer.get(position + 4); b2 = b & 252; return (((b2 >> 2) | i2) + 1) * 32; } /* JADX WARNING: Removed duplicated region for block: B:13:0x0060 */ /* JADX WARNING: Removed duplicated region for block: B:15:? A[RETURN, SYNTHETIC] */ /* renamed from: a */ /* Code decompiled incorrectly, please refer to instructions dump. */ public static int m25813a(byte[] r7) { /* r0 = 0 byte r1 = r7[r0] r2 = -2 r3 = 7 r4 = 6 r5 = 1 r6 = 4 if (r1 == r2) goto L_0x004f r2 = -1 if (r1 == r2) goto L_0x0037 r2 = 31 if (r1 == r2) goto L_0x0026 r1 = 5 byte r1 = r7[r1] r1 = r1 & 3 int r1 = r1 << 12 byte r2 = r7[r4] r2 = r2 & 255(0xff, float:3.57E-43) int r2 = r2 << r6 r1 = r1 | r2 byte r7 = r7[r3] L_0x0020: r7 = r7 & 240(0xf0, float:3.36E-43) int r7 = r7 >> r6 r7 = r7 | r1 int r7 = r7 + r5 goto L_0x005e L_0x0026: byte r0 = r7[r4] r0 = r0 & 3 int r0 = r0 << 12 byte r1 = r7[r3] r1 = r1 & 255(0xff, float:3.57E-43) int r1 = r1 << r6 r0 = r0 | r1 r1 = 8 byte r7 = r7[r1] goto L_0x0047 L_0x0037: byte r0 = r7[r3] r0 = r0 & 3 int r0 = r0 << 12 byte r1 = r7[r4] r1 = r1 & 255(0xff, float:3.57E-43) int r1 = r1 << r6 r0 = r0 | r1 r1 = 9 byte r7 = r7[r1] L_0x0047: r7 = r7 & 60 int r7 = r7 >> 2 r7 = r7 | r0 int r7 = r7 + r5 r0 = 1 goto L_0x005e L_0x004f: byte r1 = r7[r6] r1 = r1 & 3 int r1 = r1 << 12 byte r2 = r7[r3] r2 = r2 & 255(0xff, float:3.57E-43) int r2 = r2 << r6 r1 = r1 | r2 byte r7 = r7[r4] goto L_0x0020 L_0x005e: if (r0 == 0) goto L_0x0064 int r7 = r7 * 16 int r7 = r7 / 14 L_0x0064: return r7 */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.exoplayer2.p361p0.C8865v.m25813a(byte[]):int"); } }
[ "101110@vivaldi.net" ]
101110@vivaldi.net
3b14982fc850db266c7d4c5f33bb0b11dbf62b5c
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/mapstruct/testing/510/ValueProvider.java
283f9589df89709988ed0432beaf8734eeecab5e
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,435
java
/* * Copyright MapStruct Authors. * * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package org.mapstruct.ap.internal.util; import org.mapstruct.ap.internal.util.accessor.Accessor; /** * This a wrapper class which provides the value that needs to be used in the models. * * It is used to provide the read value for a difference kind of {@link Accessor}. * * @author Filip Hrisafov */ public class ValueProvider { private final String value; private ValueProvider(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return value; } /** * Creates a {@link ValueProvider} from the provided {@code accessor}. The base value is * {@link Accessor#getSimpleName()}. If the {@code accessor} is for an executable, then {@code ()} is * appended. * * @param accessor that provides the value * * @return a {@link ValueProvider} tha provides a read value for the {@code accessor} */ public static ValueProvider of(Accessor accessor) { if ( accessor == null ) { return null; } String value = accessor.getSimpleName().toString(); if ( accessor.getExecutable() != null ) { value += "()"; } return new ValueProvider( value ); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
783fe67458da513c8e4e821ac42e06b279d600eb
e1262848cb2f5a1b0c8cfd3ca09cf4fbf30d5584
/deliberti2-stock/src/main/java/com/shangpin/iog/deliberti/stock/schedule/Murder.java
5702987a70bcab8b57431f749561fc1460dabed4
[]
no_license
tianxinghua/pachong
e619f8e34904ada839cd2d30f8781495de276230
a3fc6ea97ce9053f1269d5c3536b6677d5588138
refs/heads/master
2020-04-14T16:53:51.579843
2019-01-04T02:42:26
2019-01-04T02:42:26
163,964,124
1
0
null
null
null
null
UTF-8
Java
false
false
1,760
java
package com.shangpin.iog.deliberti.stock.schedule; import java.util.ResourceBundle; import java.util.TimerTask; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import com.shangpin.iog.deliberti.stock.StockImp; import org.springframework.stereotype.Component; import com.shangpin.iog.common.utils.logger.LoggerUtil; @Component public class Murder extends TimerTask{ private static ResourceBundle bdl=null; private static int time; static { if(null==bdl) bdl=ResourceBundle.getBundle("conf"); time = Integer.valueOf(bdl.getString("time")); } private static LoggerUtil logError = LoggerUtil.getLogger("error"); private StockImp stockImp; /*public void setStockImp(stockImp stockImp) { this.stockImp = stockImp; }*/ public void setStockImp(StockImp stockImp) { this.stockImp = stockImp; } private static Murder murder = new Murder(); private Murder(){}; public static Murder getMur(){ return murder; } private static ExecutorService executor = new ThreadPoolExecutor(2, 3, 300, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(3),new ThreadPoolExecutor.DiscardPolicy()); @Override public void run() { System.out.println(Thread.currentThread().getName()+"执行murder"); Thread t = new Thread(new Worker(stockImp)); Future<?> future = executor.submit(t); try { future.get(time, TimeUnit.MILLISECONDS); } catch (Exception e) { future.cancel(true); logError.error(Thread.currentThread().getName()+"超时销毁 "+e.toString()); System.out.println(Thread.currentThread().getName()+"超时销毁"); } } }
[ "1085024903@qq.com" ]
1085024903@qq.com
25a6e8b65e4a55bf9fffd9b0166190a00bbdfc35
707b6dae4692fdee92f8fc8e7a00bd6b3528bf78
/org.tesoriero.cauce.task.diagram/src/tamm/diagram/navigator/TaskDomainNavigatorLabelProvider.java
cfb27b8ad50dd6db5885a2704a42f76971920a7b
[]
no_license
tesorieror/cauce
ec2c05b5b6911824bdf27f5bd64c678fd49037c3
ef859fe6e81650a6671e6ad773115e5bc86d54ea
refs/heads/master
2020-05-14T13:07:54.152875
2015-03-19T12:20:27
2015-03-19T12:20:27
32,517,519
0
0
null
null
null
null
UTF-8
Java
false
false
2,096
java
package tamm.diagram.navigator; import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.IMemento; import org.eclipse.ui.navigator.ICommonContentExtensionSite; import org.eclipse.ui.navigator.ICommonLabelProvider; import tamm.diagram.part.TaskDiagramEditorPlugin; /** * @generated */ public class TaskDomainNavigatorLabelProvider implements ICommonLabelProvider { /** * @generated */ private AdapterFactoryLabelProvider myAdapterFactoryLabelProvider = new AdapterFactoryLabelProvider( TaskDiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory()); /** * @generated */ public void init(ICommonContentExtensionSite aConfig) { } /** * @generated */ public Image getImage(Object element) { if (element instanceof TaskDomainNavigatorItem) { return myAdapterFactoryLabelProvider .getImage(((TaskDomainNavigatorItem) element).getEObject()); } return null; } /** * @generated */ public String getText(Object element) { if (element instanceof TaskDomainNavigatorItem) { return myAdapterFactoryLabelProvider .getText(((TaskDomainNavigatorItem) element).getEObject()); } return null; } /** * @generated */ public void addListener(ILabelProviderListener listener) { myAdapterFactoryLabelProvider.addListener(listener); } /** * @generated */ public void dispose() { myAdapterFactoryLabelProvider.dispose(); } /** * @generated */ public boolean isLabelProperty(Object element, String property) { return myAdapterFactoryLabelProvider.isLabelProperty(element, property); } /** * @generated */ public void removeListener(ILabelProviderListener listener) { myAdapterFactoryLabelProvider.removeListener(listener); } /** * @generated */ public void restoreState(IMemento aMemento) { } /** * @generated */ public void saveState(IMemento aMemento) { } /** * @generated */ public String getDescription(Object anElement) { return null; } }
[ "tesorieror@gmail.com" ]
tesorieror@gmail.com
15b1dc975cf2aed88e1a24ad8a6afbcc2d83e9e9
6edf6c315706e14dc6aef57788a2abea17da10a3
/com/planet_ink/marble_mud/Abilities/Properties/Prop_Tattoo.java
1e538d763c7321fa07ea4be54aea35d0cedfbe9f
[]
no_license
Cocanuta/Marble
c88efd73c46bd152098f588ba1cdc123316df818
4306fbda39b5488dac465a221bf9d8da4cbf2235
refs/heads/master
2020-12-25T18:20:08.253300
2012-09-10T17:09:50
2012-09-10T17:09:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,416
java
package com.planet_ink.marble_mud.Abilities.Properties; import com.planet_ink.marble_mud.core.interfaces.*; import com.planet_ink.marble_mud.core.*; import com.planet_ink.marble_mud.core.collections.*; import com.planet_ink.marble_mud.Abilities.interfaces.*; import com.planet_ink.marble_mud.Areas.interfaces.*; import com.planet_ink.marble_mud.Behaviors.interfaces.*; import com.planet_ink.marble_mud.CharClasses.interfaces.*; import com.planet_ink.marble_mud.Commands.interfaces.*; import com.planet_ink.marble_mud.Common.interfaces.*; import com.planet_ink.marble_mud.Exits.interfaces.*; import com.planet_ink.marble_mud.Items.interfaces.*; import com.planet_ink.marble_mud.Locales.interfaces.*; import com.planet_ink.marble_mud.MOBS.interfaces.*; import com.planet_ink.marble_mud.Races.interfaces.*; import java.util.*; /* 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. */ @SuppressWarnings("rawtypes") public class Prop_Tattoo extends Property { public String ID() { return "Prop_Tattoo"; } public String name(){ return "A Tattoo";} protected int canAffectCode(){return Ability.CAN_MOBS;} public static Vector getTattoos(MOB mob) { Vector tattos=new Vector(); Ability A=mob.fetchAbility("Prop_Tattoo"); if(A!=null) tattos=CMParms.parseSemicolons(A.text().toUpperCase(),true); else { A=mob.fetchEffect("Prop_Tattoo"); if(A!=null) tattos=CMParms.parseSemicolons(A.text().toUpperCase(),true); } return tattos; } public void setMiscText(String text) { if(affected instanceof MOB) { MOB M=(MOB)affected; Vector V=CMParms.parseSemicolons(text,true); for(int v=0;v<V.size();v++) { String s=(String)V.elementAt(v); int x=s.indexOf(' '); if((x>0)&&(CMath.isNumber(s.substring(0,x)))) M.addTattoo(new MOB.Tattoo(s.substring(x+1).trim(),CMath.s_int(s.substring(0,x)))); else M.addTattoo(new MOB.Tattoo(s)); } } savable=false; } }
[ "Cocanuta@Gmail.com" ]
Cocanuta@Gmail.com
be8b447c0671b926f197f367f2b62c5390fc89e9
1dd4227092fb1ebca232518eb5de4eecd2aacaba
/spring-beans/src/main/java/org/springframework/beans/factory/BeanDefinitionStoreException.java
df6619a050e536688bfee8f9f5a3056cd405e904
[ "Apache-2.0" ]
permissive
qsk1226/spring-framework
65b7dd129722af6d924e0e42cec7faa3e0aaf460
77899424e8ce2d37d7a2d21a1d38f4bae39b82d6
refs/heads/master
2023-03-16T16:02:45.578432
2021-03-07T05:07:27
2021-03-07T05:07:27
271,598,371
0
0
null
null
null
null
UTF-8
Java
false
false
4,320
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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.beans.factory; import org.springframework.beans.FatalBeanException; import org.springframework.lang.Nullable; /** * Exception thrown when a BeanFactory encounters an invalid bean definition: * e.g. in case of incomplete or contradictory bean metadata. * * @author Rod Johnson * @author Juergen Hoeller * @author Rob Harrop */ @SuppressWarnings("serial") public class BeanDefinitionStoreException extends FatalBeanException { @Nullable private final String resourceDescription; @Nullable private final String beanName; /** * Create a new BeanDefinitionStoreException. * @param msg the detail message (used as exception message as-is) */ public BeanDefinitionStoreException(String msg) { super(msg); this.resourceDescription = null; this.beanName = null; } /** * Create a new BeanDefinitionStoreException. * @param msg the detail message (used as exception message as-is) * @param cause the root cause (may be {@code null}) */ public BeanDefinitionStoreException(String msg, @Nullable Throwable cause) { super(msg, cause); this.resourceDescription = null; this.beanName = null; } /** * Create a new BeanDefinitionStoreException. * @param resourceDescription description of the resource that the bean definition came from * @param msg the detail message (used as exception message as-is) */ public BeanDefinitionStoreException(@Nullable String resourceDescription, String msg) { super(msg); this.resourceDescription = resourceDescription; this.beanName = null; } /** * Create a new BeanDefinitionStoreException. * @param resourceDescription description of the resource that the bean definition came from * @param msg the detail message (used as exception message as-is) * @param cause the root cause (may be {@code null}) */ public BeanDefinitionStoreException(@Nullable String resourceDescription, String msg, @Nullable Throwable cause) { super(msg, cause); this.resourceDescription = resourceDescription; this.beanName = null; } /** * Create a new BeanDefinitionStoreException. * @param resourceDescription description of the resource that the bean definition came from * @param beanName the name of the bean * @param msg the detail message (appended to an introductory message that indicates * the resource and the name of the bean) */ public BeanDefinitionStoreException(@Nullable String resourceDescription, String beanName, String msg) { this(resourceDescription, beanName, msg, null); } /** * Create a new BeanDefinitionStoreException. * @param resourceDescription description of the resource that the bean definition came from * @param beanName the name of the bean * @param msg the detail message (appended to an introductory message that indicates * the resource and the name of the bean) * @param cause the root cause (may be {@code null}) */ public BeanDefinitionStoreException( @Nullable String resourceDescription, String beanName, String msg, @Nullable Throwable cause) { super("Invalid bean definition with name '" + beanName + "' defined in " + resourceDescription + ": " + msg, cause); this.resourceDescription = resourceDescription; this.beanName = beanName; } /** * Return the description of the resource that the bean definition came from, if available. */ @Nullable public String getResourceDescription() { return this.resourceDescription; } /** * Return the name of the bean, if available. */ @Nullable public String getBeanName() { return this.beanName; } }
[ "qinshengkei@taoche.com" ]
qinshengkei@taoche.com
8e9358d225b9af04e3348a965819fc827b59933f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-481-3-4-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/transformation/macro/MacroTransformation_ESTest.java
2a13afd86086d81d44fdc28a7923d34ee50cb107
[]
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
594
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 12:50:57 UTC 2020 */ package org.xwiki.rendering.internal.transformation.macro; 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 MacroTransformation_ESTest extends MacroTransformation_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
8caf5798995d2ceb4b09762b8b1c34f6e958d566
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_36142.java
42e93f8297ea7a592f510c62d5f7584c31823520
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
890
java
@Override public void loadMappingsInto(StubMappings stubMappings){ if (!mappingsFileSource.exists()) { return; } Iterable<TextFile> mappingFiles=filter(mappingsFileSource.listFilesRecursively(),byFileExtension("json")); for ( TextFile mappingFile : mappingFiles) { try { StubMappingCollection stubCollection=Json.read(mappingFile.readContentsAsString(),StubMappingCollection.class); for ( StubMapping mapping : stubCollection.getMappingOrMappings()) { mapping.setDirty(false); stubMappings.addMapping(mapping); StubMappingFileMetadata fileMetadata=new StubMappingFileMetadata(mappingFile.getPath(),stubCollection.isMulti()); fileNameMap.put(mapping.getId(),fileMetadata); } } catch ( JsonException e) { throw new MappingFileException(mappingFile.getPath(),e.getErrors().first().getDetail()); } } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
1c3953ce690b77d66f52430c2de1914d198ecf13
4c94c93fbea24d16748ff9ff7b5d193bf2bd8fd5
/src/com/Lbins/VegetableHm/widget/ViewPageItemView.java
5888ba979697ad74e86829002bcf9da01873a2e8
[]
no_license
eryiyi/VegetableHm
95748939bf909cd912081c29560976baba9b69c6
8092e18b296b257c1175fc8712ec47015e76eb3c
refs/heads/master
2021-01-19T07:09:49.941148
2017-04-07T09:22:51
2017-04-07T09:22:51
87,528,700
0
0
null
null
null
null
UTF-8
Java
false
false
2,406
java
/** * */ package com.Lbins.VegetableHm.widget; import android.content.Context; import android.graphics.Bitmap; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; import com.Lbins.VegetableHm.R; import org.json.JSONException; import org.json.JSONObject; public class ViewPageItemView extends FrameLayout { /** * 图片的ImageView */ private ImageView imageView; /** * 图片的名称 */ private TextView tvTitle; /** * 图片的Bitmap */ private Bitmap bitmap; /** * 要显示图片的JsonObject */ private JSONObject jsonObject; public ViewPageItemView(Context context) { super(context); initView(context); } public ViewPageItemView(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } public ViewPageItemView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); initView(context); } // 初始控件 private void initView(Context context) { View view = LayoutInflater.from(context).inflate( R.layout.viewpage_itemview, null); imageView = (ImageView) view.findViewById(R.id.imageView); // tvTitle = (TextView) view.findViewById(R.id.tvTitle); addView(view); } // 填充数据 public void setData(JSONObject jsonObject) { this.jsonObject = jsonObject; try { int resourceId = jsonObject.getInt("resourceId"); String title = jsonObject.optString("title"); imageView.setImageResource(resourceId); // tvTitle.setText(title); } catch (JSONException e) { e.printStackTrace(); } } // 资源回收 public void recycle() { imageView.setImageBitmap(null); if (null == bitmap || bitmap.isRecycled()) { return; } bitmap.recycle(); bitmap = null; } // 重新加载资源 public void reload() { try { int resourceId = jsonObject.getInt("resourceId"); imageView.setImageResource(resourceId); } catch (JSONException e) { e.printStackTrace(); } } }
[ "826321978@qq.com" ]
826321978@qq.com
23444896e5d172a0470f39f19931c8647818b525
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/gradle--gradle/7fbbed34cd584028bc22ff73756b4bad647687df/before/DefaultPayloadClassLoaderRegistry.java
6ad02e2197d815c2e45b6f42ca83fd59552a15db
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,752
java
/* * Copyright 2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.tooling.internal.provider; import net.jcip.annotations.ThreadSafe; import org.gradle.api.Transformer; import org.gradle.internal.classloader.ClassLoaderSpec; import org.gradle.internal.classloader.ClassLoaderVisitor; import org.gradle.internal.classloader.SystemClassLoaderSpec; import org.gradle.internal.classloader.VisitableURLClassLoader; import org.gradle.util.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; /** * A {@link PayloadClassLoaderRegistry} that maps classes loaded by a set of ClassLoaders that it manages. For ClassLoaders owned by this JVM, inspects the ClassLoader to determine a ClassLoader spec to send across to the peer JVM. For classes serialized from the peer, maintains a set of cached ClassLoaders created using the ClassLoader specs received from the peer. */ @ThreadSafe public class DefaultPayloadClassLoaderRegistry implements PayloadClassLoaderRegistry { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultPayloadClassLoaderRegistry.class); private final PayloadClassLoaderFactory classLoaderFactory; private final ClassLoaderCache cache; private final ClassLoaderToDetailsTransformer detailsToClassLoader = new ClassLoaderToDetailsTransformer(); private final DetailsToClassLoaderTransformer classLoaderToDetails = new DetailsToClassLoaderTransformer(); public DefaultPayloadClassLoaderRegistry(ClassLoaderCache cache, PayloadClassLoaderFactory payloadClassLoaderFactory) { this.cache = cache; this.classLoaderFactory = payloadClassLoaderFactory; } public SerializeMap newSerializeSession() { return new SerializeMap() { final Map<ClassLoader, Short> classLoaderIds = new HashMap<ClassLoader, Short>(); final Map<Short, ClassLoaderDetails> classLoaderDetails = new HashMap<Short, ClassLoaderDetails>(); public short visitClass(Class<?> target) { ClassLoader classLoader = target.getClassLoader(); Short id = classLoaderIds.get(classLoader); if (id != null) { return id; } if (classLoaderIds.size() == Short.MAX_VALUE) { throw new UnsupportedOperationException(); } ClassLoaderDetails details = getDetails(classLoader); id = (short) (classLoaderIds.size() + 1); classLoaderIds.put(classLoader, id); classLoaderDetails.put(id, details); return id; } @Override public void collectClassLoaderDefinitions(Map<Short, ClassLoaderDetails> details) { details.putAll(classLoaderDetails); } }; } public DeserializeMap newDeserializeSession() { return new DeserializeMap() { public Class<?> resolveClass(ClassLoaderDetails classLoaderDetails, String className) throws ClassNotFoundException { ClassLoader classLoader = getClassLoader(classLoaderDetails); return Class.forName(className, false, classLoader); } }; } private ClassLoader getClassLoader(ClassLoaderDetails details) { return cache.getClassLoader(details, detailsToClassLoader); } private ClassLoaderDetails getDetails(ClassLoader classLoader) { return cache.getDetails(classLoader, classLoaderToDetails); } private static class ClassLoaderSpecVisitor extends ClassLoaderVisitor { final ClassLoader classLoader; final List<ClassLoader> parents = new ArrayList<ClassLoader>(); ClassLoaderSpec spec; URL[] classPath; public ClassLoaderSpecVisitor(ClassLoader classLoader) { this.classLoader = classLoader; } @Override public void visit(ClassLoader candidate) { if (candidate == classLoader) { super.visit(candidate); } else { parents.add(candidate); } } @Override public void visitClassPath(URL[] classPath) { this.classPath = classPath; } @Override public void visitSpec(ClassLoaderSpec spec) { this.spec = spec; } } private class ClassLoaderToDetailsTransformer implements Transformer<ClassLoader, ClassLoaderDetails> { public ClassLoader transform(ClassLoaderDetails details) { List<ClassLoader> parents = new ArrayList<ClassLoader>(); for (ClassLoaderDetails parentDetails : details.parents) { parents.add(getClassLoader(parentDetails)); } if (parents.isEmpty()) { parents.add(classLoaderFactory.getClassLoaderFor(SystemClassLoaderSpec.INSTANCE, null)); } LOGGER.info("Creating ClassLoader {} from {} and {}.", details.uuid, details.spec, parents); return classLoaderFactory.getClassLoaderFor(details.spec, parents); } } private class DetailsToClassLoaderTransformer implements Transformer<ClassLoaderDetails, ClassLoader> { public ClassLoaderDetails transform(ClassLoader classLoader) { ClassLoaderSpecVisitor visitor = new ClassLoaderSpecVisitor(classLoader); visitor.visit(classLoader); if (visitor.spec == null) { if (visitor.classPath == null) { visitor.spec = SystemClassLoaderSpec.INSTANCE; } else { visitor.spec = new VisitableURLClassLoader.Spec(CollectionUtils.toList(visitor.classPath)); } } UUID uuid = UUID.randomUUID(); ClassLoaderDetails details = new ClassLoaderDetails(uuid, visitor.spec); for (ClassLoader parent : visitor.parents) { details.parents.add(getDetails(parent)); } return details; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
bf6aadcec3f3a1808ca7a844f52bbdc321c9e174
547025855263b509de0ff0686207c3c029e239cc
/miscellaneous/roboconf-integration-tests-commons/src/test/java/net/roboconf/integration/tests/commons/internal/parameterized/HttpConfiguration.java
7ede00af199deecef4cae64638f4ac4b3ec0b198
[ "Apache-2.0" ]
permissive
roboconf/roboconf-platform
87a17329fbc659d30f0f6e657958be4241c82f06
c78fdf89491d5347f04eaa03a7368047231cfe73
refs/heads/master
2023-08-25T00:38:24.288653
2022-05-05T13:37:21
2022-05-05T13:37:21
17,637,707
26
13
Apache-2.0
2023-08-15T17:43:20
2014-03-11T16:29:42
Java
UTF-8
Java
false
false
2,083
java
/** * Copyright 2015-2017 Linagora, Université Joseph Fourier, Floralis * * The present code is developed in the scope of the joint LINAGORA - * Université Joseph Fourier - Floralis research program and is designated * as a "Result" pursuant to the terms and conditions of the LINAGORA * - Université Joseph Fourier - Floralis research program. Each copyright * holder of Results enumerated here above fully & independently holds complete * ownership of the complete Intellectual Property rights applicable to the whole * of said Results, and may freely exploit it in any manner which does not infringe * the moral rights of the other copyright holders. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.roboconf.integration.tests.commons.internal.parameterized; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; import java.util.ArrayList; import java.util.List; import net.roboconf.core.Constants; import org.ops4j.pax.exam.Option; /** * @author Vincent Zurczak - Linagora */ public class HttpConfiguration implements IMessagingConfiguration { @Override public List<Option> options() { // For HTTP, we only need to specify we use this messaging type. List<Option> options = new ArrayList<> (); options.add( editConfigurationFilePut( "etc/" + Constants.KARAF_CFG_FILE_AGENT, Constants.MESSAGING_TYPE, "http" )); options.add( editConfigurationFilePut( "etc/net.roboconf.dm.configuration.cfg", Constants.MESSAGING_TYPE, "http" )); return options; } }
[ "vincent.zurczak@gmail.com" ]
vincent.zurczak@gmail.com
18d3f8b6633c674341ffbd407bf5aae1a63f2db7
131efa6213ef04ae7728d9d95ab5bef31f2c4b94
/fanfanlicai/src/main/java/com/fanfanlicai/view/dialog/JiaXiPiaoMsgDialog.java
aac743ae185c1bbcf35b87b1bf77725b0a66cf89
[]
no_license
martinwen/new_branch_cg_share
374b8a520f9d83cffdc804a9e33b578573a5548d
4f64c639d66f61459289373fb0d72ac391f84f0c
refs/heads/master
2020-04-26T22:47:16.515392
2019-03-05T06:02:25
2019-03-05T06:02:25
173,883,445
0
0
null
null
null
null
UTF-8
Java
false
false
1,478
java
package com.fanfanlicai.view.dialog; import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.TextView; import com.fanfanlicai.activity.my.JiaXiPiaoActivity; import com.fanfanlicai.fanfanlicai.R; public class JiaXiPiaoMsgDialog extends Dialog implements android.view.View.OnClickListener { private String msg; public JiaXiPiaoMsgDialog(Context context) { super(context); } public JiaXiPiaoMsgDialog(Context context, int theme) { super(context, theme); } public JiaXiPiaoMsgDialog(Context context, int theme, String msg) { super(context, theme); this.msg = msg; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.dialog_jiaxipiaomsg); initDialog(); } private void initDialog() { TextView btnOk = (TextView) findViewById(R.id.btn_ok); btnOk.setOnClickListener(this); TextView tv_content = (TextView) findViewById(R.id.tv_content); if (msg!=null&&msg!="") { tv_content.setText(msg); } } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_ok: dismiss(); //刷新(饭盒—可使用)界面 Intent intent = new Intent(getContext(), JiaXiPiaoActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); getContext().startActivity(intent); break; default: break; } } }
[ "997750993@qq.com" ]
997750993@qq.com
74e07b280a2605d0d1552757066639ea32cdbf16
ca94247e577b1bd4e3c81380b379430eaa356093
/app/src/main/java/gxyclub/adapter/HeaderHealthAdapter.java
b2bb5f73c1fbafa6bb8834dea819e2b416cba7af
[]
no_license
zhudaihao/caipu
3a92c6a9cb6bcf103d3c07fd16819d3e9a5266e3
1b26b26df2d6febea6093aeb50bda34c3ecb90c7
refs/heads/master
2020-09-13T04:07:14.994410
2019-11-19T08:49:09
2019-11-19T08:49:09
222,650,430
0
0
null
null
null
null
UTF-8
Java
false
false
2,287
java
package gxyclub.adapter; import android.app.Activity; import android.view.View; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.util.List; import cn.gxyclub.R; import gxyclub.bean.HealthDetailsBean; import jp.wasabeef.glide.transformations.RoundedCornersTransformation; /** * 养生专辑详情 头布局 */ public class HeaderHealthAdapter extends BaseQuickAdapter<HealthDetailsBean, BaseViewHolder> { private List<HealthDetailsBean> mList; private Activity activity; public void setList(List<HealthDetailsBean> mList) { this.mList = mList; notifyDataSetChanged(); } public HeaderHealthAdapter(List<HealthDetailsBean> mList, Activity activity) { super(R.layout.item_header_health, mList); this.mList = mList; this.activity = activity; } @Override protected void convert(BaseViewHolder helper, HealthDetailsBean item) { ImageView iv_icon_l = (ImageView) helper.itemView.findViewById(R.id.iv_icon_l); ImageView iv_icon_r = (ImageView) helper.itemView.findViewById(R.id.iv_icon_r); if (item.isShowOne()) { Glide.with(activity) .load(item.getImage()) .bitmapTransform(new RoundedCornersTransformation(activity, 12, 0, RoundedCornersTransformation.CornerType.ALL)) .error(R.mipmap.banner).into(iv_icon_l); iv_icon_l.setPadding(0, 0, 14, 0); iv_icon_r.setVisibility(View.GONE); } else { Glide.with(activity) .load(item.getImage()) .bitmapTransform(new RoundedCornersTransformation(activity, 12, 0, RoundedCornersTransformation.CornerType.ALL)) .error(R.mipmap.banner).into(iv_icon_l); iv_icon_l.setPadding(0, 0, 14, 0); iv_icon_r.setPadding(14, 0, 0, 0); Glide.with(activity) .load(item.getImage()) .bitmapTransform(new RoundedCornersTransformation(activity, 8, 0, RoundedCornersTransformation.CornerType.ALL)) .error(R.mipmap.banner).into(iv_icon_r); } } }
[ "zhudaihao@wswtz.com" ]
zhudaihao@wswtz.com
f4b092bccbbfc4693dd1e5e79b9c17061837c78d
29cbccef9d3884d5f81580fd6af07ade36b7a176
/framework/src/java/org/apache/hivemind/service/ObjectProvider.java
617da74c891a3fc83fcd82e0939c180e3b1487de
[ "Apache-2.0" ]
permissive
rsassi/hivemind1
848ee0d913f668c69de3bba00060908ddc9305a2
5802c535431431a7a576a86e1983c7b523e03491
refs/heads/branch-1-0
2023-06-23T19:49:12.272173
2021-07-25T03:46:28
2021-07-25T03:46:28
389,250,137
0
0
null
2021-07-25T03:46:29
2021-07-25T03:20:30
Java
UTF-8
Java
false
false
1,651
java
// Copyright 2004 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.hivemind.service; import org.apache.hivemind.Location; import org.apache.hivemind.internal.Module; /** * A service which can provide an object value for the <code>indirect</code> * translator. * * @author Howard Lewis Ship */ public interface ObjectProvider { /** * Invoked by the translator to provide the value. * @param contributingModule the module which contributed to the locator * @param propertyType the expected type of property * @param locator a string that should be meaningful to this provider. It is the suffix of * the original input value provided to the translator, after the selector prefix * (used to choose a provider) was stripped. * @param location the location of the input value (from which the locator was extracted). Used * for error reporting, or to set the location of created objects. */ public Object provideObject( Module contributingModule, Class propertyType, String locator, Location location); }
[ "ahuegen@localhost" ]
ahuegen@localhost
de6472a347c217b927ef80dc2732fbdcc247738d
749d63e5c11c3a9e628e2782252201e7bc3de730
/app/src/main/java/com/smart/cloud/fire/order/OrderList/OrderListActivity.java
16903fa7250de6b136d697599b019a2131e43b5a
[ "Apache-2.0" ]
permissive
bingo1118/SmartCloudFire
c05907c00e6480032fe7b10e60cd6ee3a0f0684e
7795912c0d38457a92be8ba24fa28467232c68ff
refs/heads/master
2021-01-23T02:55:01.672631
2020-12-04T09:13:25
2020-12-04T09:13:25
86,023,104
1
0
null
null
null
null
UTF-8
Java
false
false
3,310
java
package com.smart.cloud.fire.order.OrderList; import android.content.Context; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.OrientationHelper; import android.support.v7.widget.RecyclerView; import android.util.TypedValue; import com.smart.cloud.fire.base.ui.MvpActivity; import com.smart.cloud.fire.global.MyApp; import com.smart.cloud.fire.order.JobOrder; import com.smart.cloud.fire.utils.T; import java.util.ArrayList; import java.util.List; import butterknife.Bind; import butterknife.ButterKnife; import fire.cloud.smart.com.smartcloudfire.R; public class OrderListActivity extends MvpActivity<OrderListPresenter> implements OrderListEntity { Context mContext; private OrderListPresenter mPresenter; private LinearLayoutManager linearLayoutManager; private List<JobOrder> list; private OrderListAdapter mAdapter; @Bind(R.id.recycler_view) RecyclerView recyclerView; @Bind(R.id.swipere_fresh_layout) SwipeRefreshLayout swipereFreshLayout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_order_list); ButterKnife.bind(this); mContext = this; refreshListView(); mPresenter.getAllDev(MyApp.getUserID()); } private void refreshListView() { //设置刷新时动画的颜色,可以设置4个 swipereFreshLayout.setProgressBackgroundColorSchemeResource(android.R.color.white); swipereFreshLayout.setColorSchemeResources(android.R.color.holo_blue_light, android.R.color.holo_red_light, android.R.color.holo_orange_light, android.R.color.holo_green_light); swipereFreshLayout.setProgressViewOffset(false, 0, (int) TypedValue .applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24, getResources() .getDisplayMetrics())); linearLayoutManager = new LinearLayoutManager(mContext); linearLayoutManager.setOrientation(OrientationHelper.VERTICAL); recyclerView.setLayoutManager(linearLayoutManager); //下拉刷新。。 swipereFreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { mPresenter.getAllDev(MyApp.getUserID()); } }); } @Override protected OrderListPresenter createPresenter() { mPresenter = new OrderListPresenter(this); return mPresenter; } @Override public void getDataSuccess(List<JobOrder> smokeList) { if(smokeList.size()==0){ T.showShort(mContext,"无工单信息"); }else{ list = new ArrayList<>(); list.addAll(smokeList); mAdapter = new OrderListAdapter(mContext, list); recyclerView.setAdapter(mAdapter); } swipereFreshLayout.setRefreshing(false); } @Override public void showLoading() { } @Override public void hideLoading() { } @Override public void unSubscribe(String type) { } @Override public void getDataFail(String msg) { } }
[ "447292486@qq.com" ]
447292486@qq.com
ce23d7b0e9c8d3071aa93d444c685652d4da7a47
74b907699658f6301db682b9f85039de590fbaa7
/app/src/main/java/com/yc/mugua/view/OneFrg.java
3aa87d8e04db141bc9e89cfd7daa5ef1b290cf20
[]
no_license
edcedc/muguashipin
d06ee4691b2a2119c30da023d67cd31e17d9e279
ff90df88a97c8ec059606a9c32912a1f36177b6b
refs/heads/master
2020-06-19T02:46:45.212647
2019-09-28T07:27:27
2019-09-28T07:27:27
196,537,129
0
0
null
null
null
null
UTF-8
Java
false
false
7,154
java
package com.yc.mugua.view; import android.os.Bundle; import android.support.v7.widget.AppCompatTextView; import android.support.v7.widget.RecyclerView; import android.view.View; import com.blankj.utilcode.util.AppUtils; import com.blankj.utilcode.util.StringUtils; import com.lcodecore.tkrefreshlayout.RefreshListenerAdapter; import com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout; import com.yarolegovich.discretescrollview.InfiniteScrollAdapter; import com.yc.mugua.R; import com.yc.mugua.adapter.HomeAdapter; import com.yc.mugua.adapter.HomeBannerAdapter; import com.yc.mugua.adapter.LikeAdapter; import com.yc.mugua.base.BaseFragment; import com.yc.mugua.bean.DataBean; import com.yc.mugua.controller.UIHelper; import com.yc.mugua.databinding.FOneBinding; import com.yc.mugua.impl.OneContract; import com.yc.mugua.presenter.OnePresenter; import com.yc.mugua.utils.cache.ShareEquCache; import com.yc.mugua.view.act.HtmlAct; import java.util.ArrayList; import java.util.List; public class OneFrg extends BaseFragment<OnePresenter, FOneBinding> implements OneContract.View, View.OnClickListener { private AppCompatTextView tvLikeTitle; private RecyclerView rvLike; public static OneFrg newInstance() { Bundle args = new Bundle(); OneFrg fragment = new OneFrg(); fragment.setArguments(args); return fragment; } private List<DataBean> listBanner = new ArrayList<>(); private HomeBannerAdapter homeBannerAdapter; private InfiniteScrollAdapter infiniteAdapter; private List<DataBean> listLike = new ArrayList<>(); private LikeAdapter likeAdapter; private List<DataBean> listBean = new ArrayList<>(); private HomeAdapter adapter; @Override public void initPresenter() { mPresenter.init(this); } @Override protected void initParms(Bundle bundle) { } @Override protected int bindLayout() { return R.layout.f_one; } @Override protected void initView(View view) { setSwipeBackEnable(false); setSofia(true); /* if (homeBannerAdapter == null){ homeBannerAdapter = new HomeBannerAdapter(act, this, listBanner); } mB.speedRecyclerView.setOrientation(DSVOrientation.HORIZONTAL); infiniteAdapter = InfiniteScrollAdapter.wrap(homeBannerAdapter); mB.speedRecyclerView.setAdapter(infiniteAdapter); mB.speedRecyclerView.setItemTransformer(new ScaleTransformer.Builder() .setMinScale(0.8f) .build());*/ tvLikeTitle = view.findViewById(R.id.tv_like_title); rvLike = view.findViewById(R.id.rv_like); view.findViewById(R.id.iv_img).setVisibility(View.GONE); view.findViewById(R.id.et_search).setOnClickListener(this); view.findViewById(R.id.iv_dow).setOnClickListener(this); view.findViewById(R.id.iv_time).setOnClickListener(this); mB.lyChange.setOnClickListener(this); if (likeAdapter == null){ likeAdapter = new LikeAdapter(act, listLike); } setRecyclerViewGridType(rvLike, 2, 60, 20, R.color.blue_15163d); rvLike.setAdapter(likeAdapter); if (adapter == null){ adapter = new HomeAdapter(act, this, listBean); } setRecyclerViewType(mB.recyclerView); mB.recyclerView.setAdapter(adapter); showLoadDataing(); mB.refreshLayout.startRefresh(); mPresenter.onBanner(); // mPresenter.onVersionList(); // mPresenter.onListRequest(); setRefreshLayout(mB.refreshLayout, new RefreshListenerAdapter() { @Override public void onRefresh(TwinklingRefreshLayout refreshLayout) { mPresenter.onRequest(pagerNumber = 1); } @Override public void onLoadMore(TwinklingRefreshLayout refreshLayout) { super.onLoadMore(refreshLayout); mPresenter.onRequest(pagerNumber += 1); } }); String equPwd = ShareEquCache.getInstance(act).getEquPwd(); if (!StringUtils.isEmpty(equPwd)){ UIHelper.startEquAct(); } } @Override public void setRefreshLayoutMode(int totalRow) { super.setRefreshLayoutMode(listBean.size(), totalRow, mB.refreshLayout); } @Override public void hideLoading() { super.hideLoading(); super.setRefreshLayout(pagerNumber, mB.refreshLayout); } @Override public void setData(Object data) { List<DataBean> list = (List<DataBean>) data; if (pagerNumber == 1) { listBean.clear(); mB.refreshLayout.finishRefreshing(); } else { mB.refreshLayout.finishLoadmore(); } listBean.addAll(list); adapter.notifyDataSetChanged(); } @Override public void onClick(View view) { switch (view.getId()){ case R.id.et_search: UIHelper.startSearchFrg(this); break; case R.id.iv_dow: UIHelper.startCashFrg(this); break; case R.id.iv_time: UIHelper.startHistoryFrg(this); break; case R.id.ly_change: mPresenter.onListRequest(); break; } } @Override public void setBanner(List<DataBean> list) { // listBanner.clear(); // listBanner.addAll(list); // homeBannerAdapter.notifyDataSetChanged(); List<String> list1 = new ArrayList<>(); for (DataBean bean : list){ list1.add(bean.getImgUrl()); } mB.banner.initBanner(list1, true)//开启3D画廊效果 .addPageMargin(10, 50)//参数1page之间的间距,参数2中间item距离边界的间距 .addPoint(6)//添加指示器 .addStartTimer(3)//自动轮播5秒间隔 .addPointBottom(7) .addRoundCorners(10)//圆角 .finishConfig()//这句必须加 .addBannerListener(position -> { DataBean bean = list.get(position); if (bean.getType() == 0){ UIHelper.startVideoAct(bean.getLink()); }else { UIHelper.startHtmlAct(act, HtmlAct.BANNER, bean.getLink()); } }); } @Override public void setLike(List<DataBean> list) { tvLikeTitle.setText("猜你喜欢"); listLike.clear(); listLike.addAll(list); likeAdapter.notifyDataSetChanged(); } @Override public void setVersion(int type, String downloadUrl, String appVersion) { String appVersionName = AppUtils.getAppVersionName(); if (!appVersion.equals(appVersionName)){ // PopupWindowTool.showDialog(act, PopupWindowTool.version, type ,() -> { // Uri uri = Uri.parse(downloadUrl); // Intent intent = new Intent(Intent.ACTION_VIEW, uri); // startActivity(intent); // }); } } }
[ "501807647@qq.com" ]
501807647@qq.com
794df1e4177cc535eb55b9f431ab82ec3532afe2
ed93e618ce708fc7794fb8a6756a4d707bcfde09
/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/SequenceType.java
d89df4b8098d95f5c027558f6c3e51fd532eb57d
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
CMSgov/hapi-fhir
6009f18d18d970c48b46fde5044b3e76fd63f394
ecf570ced9d40fa32a78f4646dd15571b441ccc7
refs/heads/master
2023-06-24T17:40:18.539391
2018-03-01T12:25:35
2018-03-01T12:25:35
49,209,900
0
2
Apache-2.0
2023-09-05T22:40:59
2016-01-07T14:40:27
Java
UTF-8
Java
false
false
3,373
java
package org.hl7.fhir.r4.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Tue, Jan 9, 2018 14:51-0500 for FHIR v3.2.0 import org.hl7.fhir.exceptions.FHIRException; public enum SequenceType { /** * Amino acid sequence */ AA, /** * DNA Sequence */ DNA, /** * RNA Sequence */ RNA, /** * added to help the parsers */ NULL; public static SequenceType fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; if ("aa".equals(codeString)) return AA; if ("dna".equals(codeString)) return DNA; if ("rna".equals(codeString)) return RNA; throw new FHIRException("Unknown SequenceType code '"+codeString+"'"); } public String toCode() { switch (this) { case AA: return "aa"; case DNA: return "dna"; case RNA: return "rna"; default: return "?"; } } public String getSystem() { return "http://hl7.org/fhir/sequence-type"; } public String getDefinition() { switch (this) { case AA: return "Amino acid sequence"; case DNA: return "DNA Sequence"; case RNA: return "RNA Sequence"; default: return "?"; } } public String getDisplay() { switch (this) { case AA: return "AA Sequence"; case DNA: return "DNA Sequence"; case RNA: return "RNA Sequence"; default: return "?"; } } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
7dbeb0f7974e0136b0533f7c144d381481954ec6
cd3cba0ca2d05074f79c7f78d80d209045c93d7d
/p047_userlogin/src/main/java/com/example/shining/p047_userlogin/activity/LoginUtil.java
809a19d941b421d0145d64d09c535511e5438b8c
[]
no_license
cybernhl/MyApplication
2a8b67720f21dfbda6268757d040dff4f68fe158
74575c6d776c229eaf721092a8de44915e949025
refs/heads/master
2022-11-10T16:32:46.377525
2018-01-05T07:36:17
2018-01-05T07:36:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,088
java
package com.example.shining.p047_userlogin.activity; import android.app.Activity; import android.content.Intent; import com.example.shining.p047_userlogin.application.DemoApplication; /** * Created by shining on 2017/11/8. */ public class LoginUtil { private static LoginUtil sInstance; private static final Object lock = new Object(); private Runnable mLastRunnnable; public LoginUtil() { } public static LoginUtil get() { if (sInstance == null) { synchronized (lock) { sInstance = new LoginUtil(); } } return sInstance; } /** * 用户是否登录 * * @return */ public static boolean isUserLogin() { // step 1 判断内存中是否有user_id // if (!TextUtils.isEmpty(DataProvider.getUser_id())) { // return true; // } // // step 2 如果内存中没有, 则去文件中找 // String uid = (String) SpUtils.get(DemoApplication.get()).get(ConstantUtil.USER_ID, null); // // step 3 如果文件中有, 则提到内存中 // if (!TextUtils.isEmpty(uid)) { // DataProvider.setUser_id(uid); // return true; // } // 未登录 return false; } public void loginTowhere(Activity activity, Runnable runnable) { if (isUserLogin()) { if (runnable == null) { runnable.run(); } } mLastRunnnable = runnable; login(activity); } public void login(Activity activity) { Intent intent = new Intent("hs.act.loginactivity"); if (intent.resolveActivity(activity.getPackageManager()) != null) { activity.startActivityForResult(intent, DemoApplication.LOGIN_REQUEST_CODE); } } public void loginOutTowhere(Activity activity, Runnable runnable) { if (isUserLogin()) { if (runnable == null) { runnable.run(); } } mLastRunnnable = runnable; loginOut(activity); } public void loginOut(Activity activity) { Intent intent = new Intent("hs.act.loginoutactivity"); if (intent.resolveActivity(activity.getPackageManager()) != null) { activity.startActivityForResult(intent, DemoApplication.LOGINOUT_REQUEST_CODE); } } public boolean login_activity_result(int requestCode, int resultCode, Intent data) { Runnable runnable = mLastRunnnable; mLastRunnnable = null; //已登录 if (requestCode == DemoApplication.LOGIN_REQUEST_CODE) { if (resultCode == DemoApplication.LOGIN_RESULT_OK && runnable != null) { runnable.run(); } return true; } //未登录 if (requestCode == DemoApplication.LOGINOUT_REQUEST_CODE) { if (resultCode == DemoApplication.LOGINOUT_RESULT_OK && runnable != null) { runnable.run(); } return true; } return false; } }
[ "liangxiao6@live.com" ]
liangxiao6@live.com
8a523ff8a38557d51ccb4ccff453c4968a520731
d2729215d64c6473911e4027109306f903681708
/src/test/java/com/gocar/utils/MD5UtilTest.java
f68b0430e0d114e943c002f49e0dc4e7f01ec5dc
[]
no_license
JamenZhang/gocar
c34f4e9d7eefecca47de5bd9e10e3eaa8a614104
c3767b00a8cf51b17570d13b75104952549a22c9
refs/heads/master
2022-12-27T13:39:48.144276
2019-07-19T12:50:23
2019-07-19T12:50:23
196,740,851
2
0
null
2022-12-16T06:56:57
2019-07-13T16:06:12
Java
UTF-8
Java
false
false
256
java
package com.gocar.utils; import org.junit.Test; /** * Created by Ming on 2018/2/9. */ public class MD5UtilTest { @Test public void getMD5() throws Exception { String md5 = MD5Util.getMD5("123"); System.out.println(md5); } }
[ "email@example.com" ]
email@example.com
ab13b72e626ded7baabc14be576778c06350134c
0a8b68908ef457f8b0c0ab18c1ec1b57b32e03e1
/creditEcoSystem/kernel/credit-base/src/main/java/com/ctc/credit/kernel/base/MakeFreemarkerUtil.java
caf9d79e699ef99c461f6246e365ebd33a25f389
[]
no_license
gspandy/c.r.e.d.it
68f33b347a4bd1cb6e110bf3123fb2674a4ad900
8095962d0f4b4443c884ef4a318f9d1aa818e0dc
refs/heads/master
2023-08-09T15:41:15.738503
2015-08-07T06:10:12
2015-08-07T06:10:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,830
java
package com.ctc.credit.kernel.base; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.util.Date; import java.util.HashMap; import java.util.Locale; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import freemarker.cache.StringTemplateLoader; import freemarker.core.Environment; import freemarker.template.Configuration; import freemarker.template.DefaultObjectWrapper; import freemarker.template.Template; public class MakeFreemarkerUtil { protected static transient Log log = LogFactory .getLog(MakeFreemarkerUtil.class); public static boolean compile(Writer out, Map<String, Object> root, String body) throws Exception { try { String id = String.valueOf(System.currentTimeMillis()); Configuration cfg = new Configuration(); cfg.setEncoding(Locale.getDefault(), "UTF-8"); cfg.setStrictSyntaxMode(true); cfg.setWhitespaceStripping(true); StringTemplateLoader stl = new StringTemplateLoader(); stl.putTemplate(id, body); cfg.setTemplateLoader(stl); Template tpl = cfg.getTemplate(id); Environment env = tpl.createProcessingEnvironment(root, out); env.process(); out.flush(); return true; } catch (Exception e) { throw e; } } public static boolean compile(String templateFile, String outputFile, Map<String, Object> root) throws Exception { log.info("模板文件:" + templateFile); log.info("输出位置:" + outputFile); if (templateFile == null) { throw new Exception("模板文件不能为空!"); } Configuration cfg = new Configuration(); cfg.setEncoding(Locale.getDefault(), "UTF-8"); cfg.setStrictSyntaxMode(true); cfg.setWhitespaceStripping(true); cfg.setNumberFormat("0"); cfg.setDefaultEncoding("UTF-8"); cfg.setObjectWrapper(new DefaultObjectWrapper()); cfg.setClassForTemplateLoading(MakeFreemarkerUtil.class, "/template"); // ClassPath // 搜索 Writer out = null; try { out = new OutputStreamWriter(new FileOutputStream(outputFile)); Template template = cfg.getTemplate(templateFile); template.setEncoding("UTF-8"); template.process(root, out); out.flush(); out.close(); out = null; return true; } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } finally { if (out != null) { try { out.close(); out = null; } catch (IOException e) { log.error(e.getCause() + e.getMessage()); e.printStackTrace(); } } } return false; } public static void main(String[] args) throws Exception { HashMap<String, Object> root = new HashMap<String, Object>(); root.put("time", new Date().toGMTString()); MakeFreemarkerUtil.compile("test.ftl", "d:\\test.java",root ); } }
[ "sunhonglei01@chinatopcredit.com" ]
sunhonglei01@chinatopcredit.com
610b24264e7b2ecab70e3c2018c98d04e620e7f0
c284a9705e55828d3707bb06702eac3ceadf3237
/src/main/java/com/baidu/beidou/api/external/cprogroup/vo/request/GetExcludeAppRequest.java
a571820d25c20565b291c046c1c7ab39e6d1cba1
[]
no_license
pologood/beidou-api
06efa59ba5443084eb107b423683844973aca1c9
05d0d7440b92f577c45c0530cb397e2e2fcd8bfd
refs/heads/master
2021-01-19T09:37:40.873104
2017-04-04T03:53:51
2017-04-04T03:53:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package com.baidu.beidou.api.external.cprogroup.vo.request; import com.baidu.beidou.api.external.util.request.ApiRequest; /** * * 获取排除移动应用请求 * * @author <a href="mailto:zhangxu04@baidu.com">Zhang Xu</a> * @version 2013-6-7 上午11:45:43 */ public class GetExcludeAppRequest extends GroupIdsBaseRequest implements ApiRequest { private static final long serialVersionUID = 1L; }
[ "berryjamcoding@gmail.com" ]
berryjamcoding@gmail.com
5e0088c668d3b1c68ef3aca18807426816bd4f5f
a7b868c8c81984dbcb17c1acc09c0f0ab8e36c59
/src/main/java/com/alipay/api/response/AlipayUserGroupshoppingBenefitQueryResponse.java
101b9d5f9e7b8222df18aa8425d2a74f67fca398
[ "Apache-2.0" ]
permissive
1755616537/alipay-sdk-java-all
a7ebd46213f22b866fa3ab20c738335fc42c4043
3ff52e7212c762f030302493aadf859a78e3ebf7
refs/heads/master
2023-02-26T01:46:16.159565
2021-02-02T01:54:36
2021-02-02T01:54:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,004
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.user.groupshopping.benefit.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayUserGroupshoppingBenefitQueryResponse extends AlipayResponse { private static final long serialVersionUID = 6678538332112399187L; /** * 拼团支付宝权益透出金额 */ @ApiField("amount") private Long amount; /** * 该用户是否有权益 */ @ApiField("have_benefit") private Boolean haveBenefit; /** * 查询权益的图标地址 */ @ApiField("icon") private String icon; /** * 查询权益的跳转地址 */ @ApiField("link") private String link; /** * 发放权益原因 */ @ApiField("reason") private String reason; /** * 查询权益的副标题 */ @ApiField("sub_title") private String subTitle; /** * 查询权益的标题 */ @ApiField("title") private String title; public void setAmount(Long amount) { this.amount = amount; } public Long getAmount( ) { return this.amount; } public void setHaveBenefit(Boolean haveBenefit) { this.haveBenefit = haveBenefit; } public Boolean getHaveBenefit( ) { return this.haveBenefit; } public void setIcon(String icon) { this.icon = icon; } public String getIcon( ) { return this.icon; } public void setLink(String link) { this.link = link; } public String getLink( ) { return this.link; } public void setReason(String reason) { this.reason = reason; } public String getReason( ) { return this.reason; } public void setSubTitle(String subTitle) { this.subTitle = subTitle; } public String getSubTitle( ) { return this.subTitle; } public void setTitle(String title) { this.title = title; } public String getTitle( ) { return this.title; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
0754675b117104f378be03dc34b9ab4fd249a994
ee4200e20d475c46846abc1d2cf764dcdb1f8f2b
/src/test/java/org/apache/ibatis/submitted/batch_test/User.java
960ed5d9da6f3d62db067fe974ac389272f55b4c
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
yylstudy/mybatis-3.5.0-sourcescode
8ba9a09b7897ce90f2a03867101b7b65a4b55bb8
bb0ec45e4be31fc33a0e0c3ef151809a5fe401bd
refs/heads/master
2022-10-12T04:37:33.036096
2020-12-21T04:53:14
2020-12-21T04:53:14
143,408,367
0
0
Apache-2.0
2022-09-08T00:07:43
2018-08-03T09:34:12
Java
UTF-8
Java
false
false
1,140
java
/** * Copyright ${license.git.copyrightYears} the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.submitted.batch_test; public class User { private Integer id; private String name; private Dept dept; public Dept getDept() { return dept; } public void setDept(Dept dept) { this.dept = dept; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "1594818954@qq.com" ]
1594818954@qq.com
a5ac06129238666f9c43bb16bc32f939f67e911a
f92fc2fbbfde756ecdfda07b361285d2b0f4b4d8
/src/main/java/ninechapter_algorithm/chapter2_binarysearch/otherrelated/sqrt/Solution_Double.java
b6b4d87d897efc24a43b2133cda3852274dce4ea
[]
no_license
blueaken/JianTestPlayGround
9dbfde62273f9d8593e111bdc201b61ccfcfbfd9
02a962d17a6e7172b96807a785b16e7987fe3f1f
refs/heads/master
2023-08-04T09:13:19.512764
2023-07-15T11:17:25
2023-07-15T11:17:25
19,551,504
1
2
null
null
null
null
UTF-8
Java
false
false
969
java
package ninechapter_algorithm.chapter2_binarysearch.otherrelated.sqrt; /** * Author: blueaken * Date: 4/14/16 9:34 AM */ public class Solution_Double { public static double sqrt(int x) { // write your code here if (x < 0) { return -1; } if (x < 2) { return x; } double start = 1; double end = x / 2 + 1; double epsilon = 0.001; while (start < end) { double mid = (start + end) / 2; double product = mid * mid; if (Math.abs(product - x) < epsilon) { return mid; } else if (product < x) { start = mid + epsilon; } else { end = mid; } } return start - epsilon; } public static void main(String[] args) { int x = 15; // int x = 999999999; // int x = 16; System.out.println(sqrt(x)); } }
[ "blueaken@gmail.com" ]
blueaken@gmail.com
6b941afa7e2d9561f24cafc50426fcc3ddb29712
5ee55bd63a7fc2b1b60d31acad2e5197231fdb56
/icklebot/src/main/java/com/lonepulse/icklebot/annotation/bind/Expressive.java
54fa7f6b5456d1dd5f296006ed00ec78ffa681d1
[ "Apache-2.0" ]
permissive
jondwillis/IckleBot
de9574c46de211c051d1ab5f287bdbb30cd7feaa
bad27efa37f860e1de1a777fcad998675611f0b7
refs/heads/master
2020-12-30T18:30:58.410175
2013-09-03T23:38:23
2013-09-03T23:38:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
package com.lonepulse.icklebot.annotation.bind; /* * #%L * IckleBot * %% * Copyright (C) 2013 Lonepulse * %% * 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. * #L% */ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import com.lonepulse.icklebot.bind.Binder; /** * <p>Identifies a bind as being expressive; i.e. the <i>content</i> within * the target element is parsed to identify a placeholder for the content * to be bound. {@code @Expressive} must be used together with {@code @Bind...} * type annotations using a {@link Binder} which supports expressive binding. * * @version 1.1.1 * <br><br> * @author <a href="mailto:lahiru@lonepulse.com">Lahiru Sahan Jayasinghe</a> */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Expressive {}
[ "lahiru@lonepulse.com" ]
lahiru@lonepulse.com
0e16fa36cdf54d90ff03f20a0a83ce3dce66893f
57385438e1d0e6a4c428547ba3406aed88b01da0
/distribute-service-framework-rpcclient/src/test/java/com/zheng/dsf/rpc/client/service/EchoServiceTest.java
520995e2142a155efc949ec2d1d5500a5c1291f7
[]
no_license
zl736732419/distribute-service-framework
758657368eb6504d0d10b347f519a33c89d5ba35
d81a896e2188967edc8cdbbd172ef4bb5a8f2a3b
refs/heads/master
2020-04-10T20:01:20.105507
2018-12-12T01:02:09
2018-12-12T01:02:09
161,254,465
0
0
null
null
null
null
UTF-8
Java
false
false
601
java
package com.zheng.dsf.rpc.client.service; import com.zheng.dsf.rpc.client.proxy.RpcServiceProxy; import com.zheng.dsf.rpc.domain.HostPort; import com.zheng.dsf.rpc.services.EchoService; import org.junit.Test; /** * @Author zhenglian * @Date 2018/12/11 */ public class EchoServiceTest { @Test public void echo() { HostPort address = new HostPort.Builder().build(); EchoService echoService = new RpcServiceProxy<EchoService>().getService(EchoService.class, address); String result = echoService.echo("what's your name?"); System.out.println(result); } }
[ "736732419@qq.com" ]
736732419@qq.com
3ce811e4ecf26ed4e0ab4727ef747db38eaf128d
c663251563e9dbbbbbaccf9d862ee5db82301765
/java/src/com/preparation/algorithm/backtracking/EqualSubsetSumPartition.java
74c1d8725fe4ab8e8fad2ee5d33a656e80ce502e
[]
no_license
harmeet27/generalDsandAlgo
06619893c17cf8f1222a7c3bd5d7669d86f21c21
6862cbb8c7d0151d15a3f1a37f978a2915f923e9
refs/heads/master
2023-03-11T12:27:31.902588
2022-02-28T13:35:44
2022-02-28T13:35:44
178,910,192
0
0
null
2023-03-05T19:11:26
2019-04-01T17:10:06
Java
UTF-8
Java
false
false
2,470
java
package com.preparation.algorithm.backtracking; /** * Problem Statement # * Given a set of positive numbers, find if we can partition it into two subsets such that the sum of elements in both the subsets is equal. * <p> * Example 1: # * Input: {1, 2, 3, 4} * Output: True * Explanation: The given set can be partitioned into two subsets with equal sum: {1, 4} & {2, 3} * Example 2: # * Input: {1, 1, 3, 4, 7} * Output: True * Explanation: The given set can be partitioned into two subsets with equal sum: {1, 3, 4} & {1, 7} * Example 3: # * Input: {2, 3, 4, 6} * Output: False * Explanation: The given set cannot be partitioned into two subsets with equal sum. * * * APPROACH: * Assume if S represents the total sum of all the given numbers, then the two equal subsets must have a sum equal to S/2. * This essentially transforms our problem to: "Find a subset of the given numbers that has a total sum of S/2". * * Basically if one of the set has a sum of S/2 means automatically the remaining set will have s/2 sum so it boils down * to find one subset with sum = s/2. * * So our brute-force algorithm will look like: * * for each number 'i' * create a new set which INCLUDES number 'i' if it does not exceed 'S/2', and recursively * process the remaining numbers * create a new set WITHOUT number 'i', and recursively process the remaining items * return true if any of the above sets has a sum equal to 'S/2', otherwise return false * */ public class EqualSubsetSumPartition { public static boolean canPartition(int[] nums) { int totalSum=0; //calculate sum for(int i:nums){ totalSum+=i; } //odd sum cant be divided in 2 eaual sets if(totalSum%2!=0){ return false; } return canPartition(nums,totalSum/2,0,0); } static boolean canPartition(int[] nums,int k, int index,int sum){ if(sum==k){ return true; } if(index>=nums.length){ return false; } boolean included=false; if(sum+nums[index] <= k){ included = canPartition(nums,k, index+1,sum+nums[index]); } boolean excluded = canPartition(nums,k, index+1, sum); return included | excluded; } public static void main(String... s){ int nums[] = new int[]{1,5,11,5}; System.out.println(canPartition(nums) ); } }
[ "amanjadon54@gmail.com" ]
amanjadon54@gmail.com
f71bfa74467854b93c512a9b9bd64b05ccc6f7a9
b2f517a674528795273648a4b3f5211f1df60eaa
/summer-db/src/test/java/cn/cerc/db/jiguang/JiguangPushTest.java
b31768302015c8a895c931b615a46d6c89d44d0a
[]
permissive
15218057878/summer-server-1
07c15d7fba28af97ce68a7f4d78d0f0284fce860
fc1e8d410843821df550591ec2df9d04b5cf2fed
refs/heads/main
2023-04-06T19:15:05.827271
2021-03-11T01:18:59
2021-03-11T01:18:59
355,827,435
0
0
Apache-2.0
2021-04-08T08:41:33
2021-04-08T08:41:33
null
UTF-8
Java
false
false
1,812
java
package cn.cerc.db.jiguang; import cn.cerc.core.TDateTime; import cn.cerc.db.core.StubHandleText; import lombok.extern.slf4j.Slf4j; import org.junit.Before; import org.junit.Test; @Slf4j public class JiguangPushTest { private static final String sound = "trade_mall.wav"; private StubHandleText handle; @Before public void setUp() throws Exception { handle = new StubHandleText(); } @Test public void test() { // 初始化极光推送 JiguangPush push = new JiguangPush(handle); // 消息标题,仅安卓机型有效,IOS设备忽略 push.setTitle("消息推送测试"); // 通知栏消息内容 String message = TDateTime.now().toString() + "这是系统向您发送的测试消息,如有打扰,请您忽略,谢谢!"; log.info(message); push.setMessage(message); // 附加的消息id push.setMsgId("3707"); // 发送给指定的设备Id // push.send(ClientType.Android, "n_f526c72cf13474d7");// itjun-xiaomi-mix2 push.send(ClientType.Android, "n_d4ffa59ea6d1d9f3");// joylee-xiaomi-mix2 // push.send(ClientType.Android, "n_a86ddf4df465a83f");// weibo-xiaomi-5c // push.send(ClientType.IOS, "i_82D7A281FC37497F810085A6D7EFB1B2");// ly-iPhone-SE2 // push.send(ClientType.IOS, "i_A1688A8910B04499ABC64B035B559921");// wsg-iPhone-xr // push.send(ClientType.IOS, "i_82D7A281FC37497F810085A6D7EFB1B2");// itjun-iPhone-SE2 // push.send(ClientType.IOS, "i_87E2C6FB4D2347F49FC17CD564B07AEE", sound);// HuangRongjun-iPhone // 发送给指定的设备类型 // push.send(ClientType.IOS, null); // push.send(ClientType.Android, null); // 发送给所有的用户 // push.send(); } }
[ "l1091462907@gmail.com" ]
l1091462907@gmail.com
63116ebf139b101cd09143ac82f6e9e931d7e09d
9f028db2ca474cf39b15b60179b59e159869549c
/streamlet-core/src/main/java/com/linxz/core/actions/observers/AffairObserverable.java
cbb6c9cc44bdc6c973a0717a7545c264ce359a35
[]
no_license
paomian2/NewStreamlet
059f7b22e6c310e25fa1c9717581d76cf12dccce
86ed86d208e891744aac7af6f06a3b8c6510c2f4
refs/heads/master
2020-03-13T22:08:36.704486
2018-04-28T08:10:11
2018-04-28T08:10:11
131,310,652
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
package com.linxz.core.actions.observers; /** * 描述:事务被观察者, 某一事务触发 * 作者:Linxz * E-mail:lin_xiao_zhang@163.com * 时间:2017年05月11日 10:46 * 版本:2.0 */ public interface AffairObserverable { /** * 订阅 */ void attach(AffairObserver buyOrderObserver); /** * 取消订阅 */ void detach(AffairObserver buyOrderObserver); /** * 通知观察者,订单实体进行了一定的操作 */ void notifyAffairObserver(String tag, Object object); }
[ "497490337@qq.com" ]
497490337@qq.com
f25472b00238e167fd11274175bda962ba671ced
13da4b96dea7e2d32b9509244ba1413f15e735d0
/src/main/java/com/cofc/controller/recommend/WXRecommendController.java
454461d9a5b139a8aeb82bdcc1196a3179d23e42
[]
no_license
gateshibill/shares100
f178d8a7377c72e705e1e337d18bdf61e2a222e4
7ccad7a4696873372cb6fb5d0bb60ca6183df76f
refs/heads/master
2022-12-21T07:55:00.747148
2020-09-24T03:23:13
2020-09-24T03:23:41
235,473,835
0
0
null
2022-12-10T03:56:33
2020-01-22T01:12:34
Java
UTF-8
Java
false
false
6,611
java
package com.cofc.controller.recommend; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.cofc.pojo.ApplicationCommon; import com.cofc.pojo.DescoveryCommon; import com.cofc.pojo.DescoveryRecommend; import com.cofc.pojo.UserOrder; import com.cofc.pojo.UserOrderException; import com.cofc.service.ApplicationCommonService; import com.cofc.service.ApplicationContextService; import com.cofc.service.CommonService; import com.cofc.service.DescoveryCommonService; import com.cofc.service.DescoveryRecommendService; import com.cofc.service.RecommendService; import com.cofc.service.SystemSettingsService; import com.cofc.service.TestService; import com.cofc.service.UserOrderService; import com.cofc.service.RecommendService.MarkResult; import com.cofc.util.BaseUtil; import com.cofc.util.JsonUtil; import com.google.gson.Gson; import com.google.gson.GsonBuilder; /* * 参照WXPublishDescoveryController */ @Controller @RequestMapping("/wx/recommend") public class WXRecommendController extends BaseUtil{ public static Map<Integer, Integer> displayCount = new HashMap<Integer, Integer>(); @Autowired private ApplicationContextService applicationContextService; @Autowired private TestService testService; @Autowired private RecommendService recommendService; @Autowired private SystemSettingsService systemSettingsService; @Autowired private DescoveryRecommendService descoveryRecommendService; @Autowired private DescoveryCommonService descoveryCommonService; @Autowired private ApplicationCommonService applicationCommonService; @Autowired private CommonService commonService; @Autowired private UserOrderService userOrderService; @RequestMapping("/markItemList") public void markItemList(HttpServletResponse response) { List list = new ArrayList(); for(MarkItem item : recommendService.getMarkItemList()){ Map<String, Object> map = new HashMap<String, Object>(); map.put("name", item.getName()); map.put("weight", item.getWeight()); list.add(map); } output(response, JsonUtil.buildJson(list)); } @RequestMapping("/recommendDescoveryList") public void recommendDescoveryList(HttpServletResponse response, Integer applicationID, Integer pageNo, Integer pageSize) { if (pageNo == null) { pageNo = 1; } if (pageSize == null) { pageSize = 10; } List<DescoveryCommon> dcList = descoveryCommonService.findRecommendDecoveryByApplication2(applicationID, (pageNo - 1) * pageSize, pageSize); for(DescoveryCommon descovery : dcList){ int id = descovery.getDescoveryId(); Integer count = displayCount.get(id); if(count==null){ displayCount.put(id, descovery.getReadCount()); }else{ displayCount.put(id, count + 1); } } output(response, JsonUtil.buildJson(dcList)); } @RequestMapping("/test") public void showPublishedProjectList(HttpServletResponse response) { System.out.println("recommend_test"); //output(response, JsonUtil.buildJson(dcList)); Map map = applicationContextService.test(); //output(response, "ok"); Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create(); Set<String> set = map.keySet(); StringBuffer buffer = new StringBuffer(); for(String key : set){ buffer.append(key + "\n"); } //output(response, buffer.toString()); /* List list = testService.getAll(2); output(response, JsonUtil.buildJson(list)); */ //MarkResult result = recommendService.mark(34, 34); //output(response, "评份:" + result.mark); } @RequestMapping("/test2") public void test2(HttpServletResponse response) { systemSettingsService.put("123", 222, "333"); } @RequestMapping("/test3") public void test3(HttpServletResponse response) { DescoveryRecommend descoveryRecommend = new DescoveryRecommend(); descoveryRecommend.setId("id5566"); descoveryRecommend.setDescoveryID(123); descoveryRecommend.setApplicationID(456); descoveryRecommend.setMark(100); descoveryRecommend.setDesc("ok"); descoveryRecommendService.addDescoveryRecommend(descoveryRecommend); } @RequestMapping("/test4") public void test4(HttpServletResponse response) { List list = descoveryRecommendService.findAllDescoveryID(); System.out.println(list.size()); //recommendService.updateDescoveryRecommend(9, 4); } @RequestMapping("/test5") public synchronized void test5(HttpServletResponse response) { //List list = descoveryRecommendService.findAllDescoveryID(); //System.out.println(list.size()); //recommendService.updateDescoveryRecommend(9, 4); //WXRecommendController dd = new WXRecommendController(); try { Thread.sleep(200); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } output(response, this.toString()); } @RequestMapping("/test6") public void test6(HttpServletResponse response) { //List<Integer> list = descoveryRecommendService.findAllDescoveryID(); //output(response, this.toString()); recommendService.updateAllDescoveryRecommend(); } @RequestMapping("/test7") public void test7(HttpServletResponse response) { output(response, "test7"); } @RequestMapping("/test8") public void test8(HttpServletResponse response) { DescoveryCommon descovery = descoveryCommonService.getDescoveryById(54); ApplicationCommon application = applicationCommonService.getApplicationById(1); recommendService.updateDescoveryRecommend(descovery, application); output(response, "test8"); } @RequestMapping("/test9") public void test9(HttpServletResponse response) { //List<Map> dcList = commonService.findAllTagMap(); //List<UserOrder> dcList = getObjectNumberInOrder.findAllUserOrder(); //int count = getObjectNumberInOrder.getObjectNumberInOrder(1, 1); //output(response, JsonUtil.buildJson(dcList)); UserOrderException exception = new UserOrderException(); exception.setType(2); exception.setContent("123测试"); exception.setOrderID("1"); exception.setUserid(1); exception.setCreateTime(new Date()); userOrderService.log(exception); output(response, "ok"); } @RequestMapping("/test10") public void test10(HttpServletResponse response) { List<UserOrder> dcList = userOrderService.findMyOrder(40, 0, 5, 0, 5); output(response, JsonUtil.buildJson(dcList)); } }
[ "z1-bill@ik8s.com" ]
z1-bill@ik8s.com
324c53da8dfbfa56a04bf3f67f5a892fba203064
ab0ee1e174acea6e82aefe8feffa55e6d33e49ef
/app/src/main/java/per/goweii/wanandroid/event/SettingChangeEvent.java
292a7c3351382f33be4a005aa03e2df6539e4f08
[]
no_license
wuhoulang/WanAndroid-master
3fb9b805a1ec5fc5c4e5a79ef3b69e886d9f3c22
c3e35a6b680af5477edfe39a9fe19e74041aa579
refs/heads/master
2020-11-30T14:09:32.241528
2019-12-27T09:29:09
2019-12-27T09:29:09
230,414,005
1
0
null
null
null
null
UTF-8
Java
false
false
1,936
java
package per.goweii.wanandroid.event; /** * @author CuiZhen * @date 2019/5/17 * QQ: 302833254 * E-mail: goweii@163.com * GitHub: https://github.com/goweii */ public class SettingChangeEvent extends BaseEvent { private boolean showReadLaterChanged; private boolean showTopChanged; private boolean showBannerChanged; private boolean hideAboutMeChanged; private boolean hideOpenChanged; private boolean rvAnimChanged; public SettingChangeEvent() { } @Override public void post() { if (showReadLaterChanged || showTopChanged || showBannerChanged || hideAboutMeChanged || hideOpenChanged || rvAnimChanged) { super.post(); } } public boolean isShowReadLaterChanged() { return showReadLaterChanged; } public void setShowReadLaterChanged(boolean readLaterChanged) { this.showReadLaterChanged = readLaterChanged; } public boolean isShowTopChanged() { return showTopChanged; } public void setShowTopChanged(boolean showTopChanged) { this.showTopChanged = showTopChanged; } public boolean isShowBannerChanged() { return showBannerChanged; } public void setShowBannerChanged(boolean showBannerChanged) { this.showBannerChanged = showBannerChanged; } public boolean isHideAboutMeChanged() { return hideAboutMeChanged; } public void setHideAboutMeChanged(boolean hideAboutMeChanged) { this.hideAboutMeChanged = hideAboutMeChanged; } public boolean isHideOpenChanged() { return hideOpenChanged; } public void setHideOpenChanged(boolean hideOpenChanged) { this.hideOpenChanged = hideOpenChanged; } public boolean isRvAnimChanged() { return rvAnimChanged; } public void setRvAnimChanged(boolean rvAnimChanged) { this.rvAnimChanged = rvAnimChanged; } }
[ "1022845861@qq.com" ]
1022845861@qq.com
33e593cc7478f4e4f3e7543a966962d16f73dae8
3f007f6c22be993135f03c38b9a7ef15f6dc5512
/demo-mall-module/demo-mall-product-service/src/main/java/com/liyulin/demo/mall/product/biz/api/ProductInfoApiBiz.java
806e9ea7894d8c41cb7f8de37bdef58498a68cd9
[ "Apache-2.0" ]
permissive
luckyQing/spring-cloud-demo
df5ce5594a58c519ed6abdcafbee7db23335b7fd
019dbcb3b9f6572c42eac461f2de14d301fe8011
refs/heads/master
2020-04-29T07:41:32.854122
2019-07-12T06:29:44
2019-07-12T06:29:44
175,961,999
4
1
null
2019-07-01T09:36:51
2019-03-16T11:13:27
Java
UTF-8
Java
false
false
2,751
java
package com.liyulin.demo.mall.product.biz.api; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.liyulin.demo.common.business.dto.BasePageReq; import com.liyulin.demo.common.business.dto.BasePageResp; import com.liyulin.demo.common.util.CollectionUtil; import com.liyulin.demo.mall.product.entity.base.ProductInfoEntity; import com.liyulin.demo.mall.product.mapper.base.ProductInfoBaseMapper; import com.liyulin.demo.mybatis.common.biz.BaseBiz; import com.liyulin.demo.mybatis.common.mapper.entity.BaseEntity; import com.liyulin.demo.mybatis.common.mapper.enums.DelStateEnum; import com.liyulin.demo.rpc.product.request.api.PageProductReqBody; import com.liyulin.demo.rpc.product.response.api.PageProductRespBody; import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example.Criteria; /** * 商品信息api biz * * @author liyulin * @date 2019年3月31日下午4:51:08 */ @Repository public class ProductInfoApiBiz extends BaseBiz<ProductInfoEntity> { @Autowired private ProductInfoBaseMapper productInfoBaseMapper; /** * 分页查询商品信息 * * @param req * @return */ public BasePageResp<PageProductRespBody> pageProduct(BasePageReq<PageProductReqBody> req) { Example example = new Example(ProductInfoEntity.class); Criteria criteria = example.createCriteria(); PageProductReqBody reqBody = req.getQuery(); if (!Objects.isNull(reqBody) && StringUtils.isNotBlank(reqBody.getName())) { criteria.andLike(ProductInfoEntity.Columns.NAME.getProperty(), "%" + reqBody.getName() + "%"); } criteria.andEqualTo(BaseEntity.Columns.DEL_STATE.getProperty(), DelStateEnum.NORMAL.getDelState()); example.orderBy(BaseEntity.Columns.ADD_TIME.getProperty()).desc(); Page<ProductInfoEntity> page = PageHelper.startPage(req.getPageNum(), req.getPageSize(), true); List<ProductInfoEntity> entitydatas = productInfoBaseMapper.selectByExample(example); if (CollectionUtil.isEmpty(entitydatas)) { return new BasePageResp<>(null, req.getPageNum(), req.getPageSize(), 0); } List<PageProductRespBody> pagedatas = entitydatas.stream().map(entity->{ PageProductRespBody pagedata = PageProductRespBody.builder() .id(entity.getId()) .name(entity.getName()) .sellPrice(entity.getSellPrice()) .stock(entity.getStock()) .build(); return pagedata; }).collect(Collectors.toList()); return new BasePageResp<>(pagedatas, req.getPageNum(), req.getPageSize(), page.getTotal()); } }
[ "1634753825@qq.com" ]
1634753825@qq.com
a8a20b8e7c969cad5bfd844015e6c0797cec1475
ee1fc12feef20f8ebe734911acdd02b1742e417c
/android_sourcecode/app/src/main/java/com/ak/pt/mvp/fragment/table/TableSixFragment.java
c2fa95a87c6abf7b2f3142451ee36c8ea811889c
[ "MIT" ]
permissive
xiaozhangxin/test
aee7aae01478a06741978e7747614956508067ed
aeda4d6958f8bf7af54f87bc70ad33d81545c5b3
refs/heads/master
2021-07-15T21:52:28.171542
2020-03-09T14:30:45
2020-03-09T14:30:45
126,810,840
0
0
null
null
null
null
UTF-8
Java
false
false
7,566
java
package com.ak.pt.mvp.fragment.table; import android.content.DialogInterface; import android.os.Bundle; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import androidx.appcompat.app.AlertDialog; import androidx.recyclerview.widget.LinearLayoutManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.ak.pt.R; import com.ak.pt.bean.InstallFormBean; import com.ak.pt.bean.UserBean; import com.ak.pt.mvp.adapter.table.TableThreeAdapter; import com.ak.pt.mvp.base.BaseFragment; import com.ak.pt.mvp.presenter.area.AllTablePresenter; import com.ak.pt.mvp.view.area.IAllTableView; import com.ak.pt.util.SpSingleInstance; import com.ak.pt.util.ToastUtil; import com.jude.easyrecyclerview.EasyRecyclerView; import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter; import org.greenrobot.eventbus.EventBus; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.Unbinder; /** * Created by admin on 2019/6/4. */ public class TableSixFragment extends BaseFragment<IAllTableView, AllTablePresenter> implements IAllTableView { Unbinder unbinder; @BindView(R.id.ivLeft) ImageView ivLeft; @BindView(R.id.tvTitle) TextView tvTitle; @BindView(R.id.ivRightTwo) ImageView ivRightTwo; @BindView(R.id.ivRight) ImageView ivRight; @BindView(R.id.tvRight) TextView tvRight; @BindView(R.id.tvName) TextView tvName; @BindView(R.id.tvType) TextView tvType; @BindView(R.id.recycleView) EasyRecyclerView recycleView; private List<InstallFormBean> list; private TableThreeAdapter adapter; private Map<String, String> map = new HashMap<>(); private UserBean userBean; private int page = 1; public static TableSixFragment newInstance() { Bundle args = new Bundle(); TableSixFragment fragment = new TableSixFragment(); fragment.setArguments(args); return fragment; } @Override public int getRootViewId() { return R.layout.fragment_all_table_no; } @Override public void initUI() { tvTitle.setText("水工试压量统计报表"); tvType.setText("水工姓名"); list = new ArrayList<>(); recycleView.setLayoutManager(new LinearLayoutManager(context)); adapter = new TableThreeAdapter(context, list); recycleView.setAdapterWithProgress(adapter); adapter.setNoMore(R.layout.view_nomore); //下拉刷新 recycleView.setRefreshingColorResources(R.color.colorPrimaryNew); recycleView.setRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { page = 1; refresh(); } }); //上拉加载 adapter.setMore(R.layout.view_more, new RecyclerArrayAdapter.OnLoadMoreListener() { @Override public void onLoadMore() { page++; refresh(); } }); } private void refresh() { map.put("page", page + ""); getPresenter().getHydraulicNameForm(userBean.getStaff_token(), map); } @Override public void initData() { userBean = SpSingleInstance.getSpSingleInstance().getUserBean(); if ("0".equals(userBean.getIs_all_data())) {//有没有数据权限 map.put("staff_uuid", userBean.getStaff_uuid()); } else { map.put("group_parent_uuid", userBean.getGroup_parent_uuid_new()); } map.put("staff_id", userBean.getStaff_id()); refresh(); } @Override public void ongetInstallForm(List<InstallFormBean> data) { } @Override public void ongetDoorForm(List<InstallFormBean> data) { } @Override public void ongetTimelyForm(List<InstallFormBean> data) { } @Override public void ongetDistributorForm(List<InstallFormBean> data) { } @Override public void ongetPlumberForm(List<InstallFormBean> data) { } @Override public void ongetHydraulicNameForm(List<InstallFormBean> data) { if (page == 1) { adapter.clear(); } adapter.addAll(data); adapter.notifyDataSetChanged(); } @Override public void ongetSpoolTypeForm(List<InstallFormBean> data) { } @Override public void ongetProjectManagerForm(List<InstallFormBean> data) { } @Override public void ongetHouseNameForm(List<InstallFormBean> data) { } @Override public void ongetOwnerForm(List<InstallFormBean> data) { } @Override public void ongetAuthenticityForm(List<InstallFormBean> data) { } @Override public void ongetStaffForm(List<InstallFormBean> data) { } @Override public void ongetDecorateCompanyForm(List<InstallFormBean> data) { } @Override public void ongetPipeTrendForm(List<InstallFormBean> data) { } @Override public void ongetEventForm(List<InstallFormBean> data) { } @OnClick({R.id.ivLeft, R.id.tvType}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.ivLeft: finish(); break; } } @Override public void showProgress() { } @Override public void onCompleted() { } @Override public void onError(Throwable e) { ToastUtil.showToast(context.getApplicationContext(), e.getMessage()); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO: inflate a fragment view View rootView = super.onCreateView(inflater, container, savedInstanceState); unbinder = ButterKnife.bind(this, rootView); EventBus.getDefault().register(this); return rootView; } @Override public AllTablePresenter createPresenter() { return new AllTablePresenter(getApp()); } @Override public void onDestroyView() { super.onDestroyView(); unbinder.unbind(); EventBus.getDefault().unregister(this); } private AlertDialog alertDialog2; private int choose = 0; public void showSingleDialog(final String[] items) { choose = 0; AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context); alertBuilder.setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { choose = i; } }); alertBuilder.setPositiveButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { tvType.setText(items[choose]); map.put("type", items[choose]); refresh(); alertDialog2.dismiss(); } }); alertBuilder.setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { alertDialog2.dismiss(); } }); alertDialog2 = alertBuilder.create(); alertDialog2.show(); } }
[ "xiaozhangxin@shifuhelp.com" ]
xiaozhangxin@shifuhelp.com
969b1996f51adf6753561d5f8efd1bfed1d054b5
0c785a2601f2b02c1636d57c70039f0c4f08294a
/javasrc/edu/brown/cs/bubbles/nobase/NobaseDebugThread.java
f204a3ffd74dd5c5c1e0a1f27e805f8a94b833b8
[]
no_license
SoftwareEngineeringToolDemos/ICSE-2012-CodeBubbles
bc26d9655fbd56e5f61364db1c176a3539653d7f
6da209c1ff0f7fbfa958c97dc22ec478b2b5219c
refs/heads/master
2021-01-17T13:35:48.729810
2016-06-24T19:42:07
2016-06-24T19:42:07
45,094,073
0
2
null
null
null
null
UTF-8
Java
false
false
5,580
java
/********************************************************************************/ /* */ /* NobaseDebugThread.java */ /* */ /* Information for the current javascript thread */ /* */ /********************************************************************************/ /* Copyright 2011 Brown University -- Steven P. Reiss */ /********************************************************************************* * Copyright 2011, Brown University, Providence, RI. * * * * 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 * * * ********************************************************************************/ /* SVN: $Id$ */ package edu.brown.cs.bubbles.nobase; import edu.brown.cs.ivy.xml.IvyXmlWriter; import org.json.JSONArray; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; class NobaseDebugThread implements NobaseConstants { /********************************************************************************/ /* */ /* Private Storage */ /* */ /********************************************************************************/ private String thread_id; private boolean is_running; private boolean is_terminated; private String continue_reason; private List<NobaseDebugStackFrame> cur_stack; private NobaseDebugCommand stack_command; private NobaseDebugTarget for_target; private static IdCounter thread_counter = new IdCounter(); /********************************************************************************/ /* */ /* Constructors */ /* */ /********************************************************************************/ NobaseDebugThread(NobaseDebugTarget tgt) { for_target = tgt; is_running = false; is_terminated = false; continue_reason = null; cur_stack = null; stack_command = null; thread_id = "THREAD_" + thread_counter.nextValue(); } /********************************************************************************/ /* */ /* Access methods */ /* */ /********************************************************************************/ boolean canResume() { return !is_running && !is_terminated; } boolean canSuspend() { return !is_terminated && is_running; } boolean canTerminate() { return !is_terminated; } boolean isTerminated() { return is_terminated; } boolean isSuspended() { return !is_terminated && !is_running; } boolean isRunning() { return !is_terminated && is_running; } String getLocalId() { return thread_id; } String getName() { return "*MAIN*"; } void setContinue(String reason) { continue_reason = reason; } void setRunning(boolean running) { if (is_running != running) { is_running = running; if (running) { for_target.generateThreadEvent("RESUME",continue_reason,this); cur_stack = null; stack_command = null; } else { for_target.generateThreadEvent("SUSPEND",continue_reason,this); stack_command = new NobaseDebugCommand.Backtrace(for_target,0,1000,false); for_target.postCommand(stack_command); } } if (!running) continue_reason = null; } /********************************************************************************/ /* */ /* Stack frame maintenance */ /* */ /********************************************************************************/ boolean hasStackFrames() { return (cur_stack != null && cur_stack.size() > 0); } List<NobaseDebugStackFrame> getStackFrames() { NobaseDebugCommand cmd = stack_command; if (isSuspended() && cur_stack != null) { return cur_stack; } else if (isSuspended() && cmd != null) { NobaseDebugResponse rply = cmd.getResponse(); synchronized (this) { if (cur_stack == null) { if (rply != null) { JSONObject body = rply.getBody(); NobaseDebugRefMap refmap = rply.getRefMap(); if (body != null) { JSONArray frms = body.optJSONArray("frames"); List<NobaseDebugStackFrame> rslt = new ArrayList<NobaseDebugStackFrame>(); if (frms != null) { for (int i = 0; i < frms.length(); ++i) { JSONObject frm = frms.getJSONObject(i); if (frm != null) rslt.add(new NobaseDebugStackFrame(frm,refmap)); } } cur_stack = rslt; } } } if (cur_stack == null) { cur_stack = new ArrayList<NobaseDebugStackFrame>(); } } return cur_stack; } return new ArrayList<NobaseDebugStackFrame>(); } /********************************************************************************/ /* */ /* Output methods */ /* */ /********************************************************************************/ void outputXml(IvyXmlWriter xw) { xw.begin("THREAD"); xw.field("ID",thread_id); xw.field("NAME","User Thread"); xw.field("SYSTEM",false); xw.field("SUSPENDED",isSuspended()); xw.field("TERMINATED",isTerminated()); if (isSuspended() & hasStackFrames()) { xw.field("STACK",true); xw.field("FRAMES",cur_stack.size()); } xw.end("THREAD"); } } // end of class NobaseDebugThread /* end of NobaseDebugThread.java */
[ "spr@cs.brown.edu" ]
spr@cs.brown.edu
6f4b003b15f39cc94f7f4eef7c56698ad6934807
ecc814ebbf4aa86cb2cff7153a07bfa9a1317f4d
/src/com/business/entitys/sales/Salesman.java
ccfe72d9a6bd8f597f7af743df17ef092a0be550
[]
no_license
heyongming/business
d067865f92439e902bdb75b12e0be8e232ff01f4
d1ed092bd889062d09ed7f3b4d9601b7feeafda9
refs/heads/master
2021-01-20T09:49:12.524373
2017-12-20T01:13:41
2017-12-20T01:13:41
101,607,580
0
0
null
null
null
null
UTF-8
Java
false
false
1,549
java
package com.business.entitys.sales; public class Salesman { private int userId; private String userName; private String phone; private String type; private String insertTime; private String passWord; public Salesman() { super(); } public Salesman(int userId, String userName, String phone, String type, String insertTime, String passWord) { super(); this.userId = userId; this.userName = userName; this.phone = phone; this.type = type; this.insertTime = insertTime; this.passWord = passWord; } @Override public String toString() { return "Salesman [userId=" + userId + ", userName=" + userName + ", phone=" + phone + ", type=" + type + ", insertTime=" + insertTime + ", passWord=" + passWord + "]"; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getInsertTime() { return insertTime; } public void setInsertTime(String insertTime) { this.insertTime = insertTime; } public String getPassWord() { return passWord; } public void setPassWord(String passWord) { this.passWord = passWord; } }
[ "user@user-PC" ]
user@user-PC
197f8083920d9a6bfd3bf0368b9fc5183e28633c
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13544-81-7-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/container/servlet/filters/internal/SavedRequestRestorerFilter_ESTest_scaffolding.java
e4408b28862eb9daf6a90cdbd17c6ddd0b96c942
[]
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
475
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Jan 20 16:28:26 UTC 2020 */ package org.xwiki.container.servlet.filters.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class SavedRequestRestorerFilter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a3669701aeb8a149089486e52ec2874fff07611d
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/LambdaValueCompatibleWithNestedTryWithResources.java
1b712ef84d17b09255632f16d9871618e676eb60
[ "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
478
java
import java.util.Collections; import java.util.Set; class Test { Database database; Set<Long> getItems() { return database.perform(connection -> { try (AutoCloseable c = null) { try (AutoCloseable d = null) { return Collections.emptySet(); } } }); } public interface Database { <V> V perform(BusinessLogic<V> logic); } public interface BusinessLogic<V> { V execute(String connection) throws Exception; } }
[ "anna.kozlova@jetbrains.com" ]
anna.kozlova@jetbrains.com
05bcc747958290e71a99168307412c071ad6109b
b9451c54b2ff7ddb797afc029672c57181a79bf9
/query/src/main/java/org/infinispan/search/mapper/log/impl/InfinispanEventContextMessages.java
4b15a226284e51fa1ac2a742fffbb5a2947e22c8
[ "Apache-2.0", "LicenseRef-scancode-dco-1.1" ]
permissive
infinispan/infinispan
4c16a7f7381894e1c38c80e39cc9346b566407ad
1babc3340f2cf9bd42c84102a42c901d20feaa84
refs/heads/main
2023-08-31T19:46:06.326430
2023-06-20T08:14:50
2023-08-31T17:54:31
1,050,944
920
527
Apache-2.0
2023-09-14T21:00:45
2010-11-04T12:33:19
Java
UTF-8
Java
false
false
386
java
package org.infinispan.search.mapper.log.impl; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; /** * Message bundle for event contexts in the Infinispan Search mapper. */ @MessageBundle(projectCode = "ISPN") public interface InfinispanEventContextMessages { @Message(value = "Infinispan Search Mapping") String mapping(); }
[ "tristan.tarrant@gmail.com" ]
tristan.tarrant@gmail.com
2825ddfc18be43defa978add0791b61e3dbc327b
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/web-psn/src/main/java/com/smate/web/psn/model/keyword/CategoryMapBase.java
831a68b0364b0a634fd824766b590b5a22bfc348
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
3,843
java
package com.smate.web.psn.model.keyword; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Transient; @Entity @Table(name = "CATEGORY_MAP_BASE") public class CategoryMapBase implements Serializable { /** * */ private static final long serialVersionUID = -6291534942118336726L; private Integer categryId; // Id private String categoryZh; // 科技领域中文名 private String categoryEn; // 科技领域英文名 private String igiZh; private String igiEn; private String moe; // private String moeSub; // private String nsfcCategory; // nsfc科研分类 private String wosCategory; // wos科研分类 private boolean added; // 已是人员的科技领域 private Integer superCategoryId; // 父级学科ID,一级学科该值为0 private String showCategory; // 页面显示的科技领域名 public CategoryMapBase(Integer categryId, String categoryZh, String categoryEn, String igiZh, String igiEn, String moe, String moeSub, String nsfcCategory, String wosCategory, Integer superCategoryId) { super(); this.categryId = categryId; this.categoryZh = categoryZh; this.categoryEn = categoryEn; this.igiZh = igiZh; this.igiEn = igiEn; this.moe = moe; this.moeSub = moeSub; this.nsfcCategory = nsfcCategory; this.wosCategory = wosCategory; this.superCategoryId = superCategoryId; } public CategoryMapBase(Integer categryId, String categoryZh, String categoryEn, Integer superCategoryId) { this.categryId = categryId; this.categoryZh = categoryZh; this.categoryEn = categoryEn; this.superCategoryId = superCategoryId; } public CategoryMapBase() { super(); } @Id @Column(name = "CATEGRY_ID") public Integer getCategryId() { return categryId; } public void setCategryId(Integer categryId) { this.categryId = categryId; } @Column(name = "CATEGORY_ZH") public String getCategoryZh() { return categoryZh; } public void setCategoryZh(String categoryZh) { this.categoryZh = categoryZh; } @Column(name = "CATEGORY_EN") public String getCategoryEn() { return categoryEn; } public void setCategoryEn(String categoryEn) { this.categoryEn = categoryEn; } @Column(name = "IGI_ZH") public String getIgiZh() { return igiZh; } public void setIgiZh(String igiZh) { this.igiZh = igiZh; } @Column(name = "IGI_EN") public String getIgiEn() { return igiEn; } public void setIgiEn(String igiEn) { this.igiEn = igiEn; } @Column(name = "MOE") public String getMoe() { return moe; } public void setMoe(String moe) { this.moe = moe; } @Column(name = "MOE_SUB") public String getMoeSub() { return moeSub; } public void setMoeSub(String moeSub) { this.moeSub = moeSub; } @Column(name = "NSFC_CATEGORY") public String getNsfcCategory() { return nsfcCategory; } public void setNsfcCategory(String nsfcCategory) { this.nsfcCategory = nsfcCategory; } @Column(name = "WOS_CATEGORY") public String getWosCategory() { return wosCategory; } public void setWosCategory(String wosCategory) { this.wosCategory = wosCategory; } public boolean getAdded() { return added; } public void setAdded(boolean added) { this.added = added; } @Column(name = "SUPER_CATEGORY_ID") public Integer getSuperCategoryId() { return superCategoryId; } public void setSuperCategoryId(Integer superCategoryId) { this.superCategoryId = superCategoryId; } @Transient public String getShowCategory() { return showCategory; } public void setShowCategory(String showCategory) { this.showCategory = showCategory; } }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
0733a8d16e562a4704b342d9faa5f26557e4f11a
678cd679e9b383afca52f805fc84df0eb6afbdbe
/src/main/java/com/example/bddspring1583036787/DemoApplication.java
4382aa6b19f544dc8863eff1223820ac527236df
[]
no_license
cb-kubecd/bdd-spring-1583036787
a5e13168d0a29c31a3396268399ffb01b8844064
7691296958a86127a5f870332a138eb4f22451e9
refs/heads/master
2021-02-07T23:16:49.932903
2020-03-01T04:26:59
2020-03-01T04:26:59
244,086,353
0
0
null
2020-03-01T04:36:16
2020-03-01T04:27:06
Makefile
UTF-8
Java
false
false
320
java
package com.example.bddspring1583036787; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }
[ "cjxd-bot@cloudbees.com" ]
cjxd-bot@cloudbees.com
61dcb734d8121fb6280fa2e07481ded14a4f1c70
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_6b03f6e15d5be3d523203d60c2db22dd05d7595c/TransitionNode/18_6b03f6e15d5be3d523203d60c2db22dd05d7595c_TransitionNode_t.java
f9d4e6f159f77659af42668f172a60f6f366df27
[]
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
4,962
java
/* * Created on Apr 20, 2005 * * This software is licensed under the terms of the GNU GENERAL PUBLIC LICENSE * Version 2, which can be found at http://www.gnu.org/copyleft/gpl.html */ package org.cubictest.model; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.cubictest.common.utils.Logger; import org.cubictest.utils.CubicCloner; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Point; /** * Base class for all nodes in a test. * * @author trond */ public abstract class TransitionNode extends PropertyAwareObject{ private Transition inTransition = null; private List<Transition> outTransitions = new ArrayList<Transition>(); private String id = ""; private Point position; private Dimension dimension; private String name = ""; private boolean autoPosition = false; public TransitionNode() { this.setId(getNewGeneratedId()); } /** * @return Returns the name. */ public String getName() { return name; } /** * @param name The name to set. */ public void setName(String name) { this.name = name; } public static Dimension getDefaultDimension() { return new Dimension(93, 70); } /** * @return Returns the postition. */ public Point getPosition() { if(position == null) { position = new Point(0,0); } return position; } /** * @param postition The postition to set. */ public void setPosition(Point position) { Point oldPos = this.position; this.position = position; firePropertyChange(PropertyAwareObject.LAYOUT,oldPos,position); } /** * @return */ public Transition getInTransition() { return inTransition; } /** * @param inTransition The inTransition to set. */ public void setInTransition(Transition inTransition) { Transition oldTransition = this.inTransition; this.inTransition = inTransition; if (inTransition != null) firePropertyChange(PropertyAwareObject.INPUT,oldTransition,inTransition); } /** * @return Returns the outTransitions. */ public List<Transition> getOutTransitions() { Set<Transition> set = new HashSet<Transition>(); set.addAll(outTransitions); if (set.size() != outTransitions.size()) { Logger.error("Duplicate transitions detected from " + this.toString() + "! Removing them."); outTransitions = new ArrayList<Transition>(); outTransitions.addAll(set); } return outTransitions; } /** * @param outTransitions The outTransitions to set. */ public void setOutTransitions(List<Transition> outTransitions) { this.outTransitions = outTransitions; } /** * @param transition */ public void addOutTransition(Transition transition){ outTransitions.add(transition); firePropertyChange(PropertyAwareObject.OUTPUT,null,transition); } /** * @return Returns the id. */ public String getId() { return id; } /** * @param id The id to set. */ public void setId(String id) { this.id = id; } /** * @param linkTransition */ public void removeOutTransition(Transition transition) { outTransitions.remove(transition); firePropertyChange(PropertyAwareObject.OUTPUT,transition,null); } public void removeOutTransitions() { List<Transition> transList = new ArrayList<Transition>(); transList.addAll(outTransitions); for (Transition transition : transList) { removeOutTransition(transition); } } /** * @param linkTransition */ public void removeInTransition() { Transition oldTrans = inTransition; inTransition = null; firePropertyChange(PropertyAwareObject.INPUT,oldTrans,null); } public Dimension getDimension() { if(dimension == null) { dimension = getDefaultDimension(); } return dimension; } public void setDimension(Dimension dimension) { Dimension oldDim = this.dimension; this.dimension = dimension; firePropertyChange(PropertyAwareObject.LAYOUT, oldDim, dimension); } private String getNewGeneratedId() { String name = getClass().getName(); name = name.substring(name.lastIndexOf(".") + 1); name = name.toLowerCase(); return name + this.hashCode() + System.currentTimeMillis(); } public void setAutoPosition(boolean autoPosition) { this.autoPosition = autoPosition; } public boolean getAutoPosition() { return autoPosition; } public boolean hasInTransition() { return getInTransition() != null; } @Override public TransitionNode clone() throws CloneNotSupportedException { TransitionNode node = (TransitionNode) CubicCloner.deepCopy(this); node.removeInTransition(); node.removeOutTransitions(); return node; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c8563bd660f04a0581a244021b5a934a23a7fe77
18a0ec2e1d773787b26cd3f7005626b82ce22307
/ui/ifc/sdg/joana.ui.ifc.sdg.latticeeditor/src/edu/kit/joana/ui/ifc/sdg/latticeeditor/figures/EndTag.java
6ebf50126d84cf51ba4f0b2c4c1a82ab38f7fe19
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
joana-team/joana
97eac211aa4e22f63dd0a638601bae1bb3ce3a91
d49d82b5892f9331d37432d02d090f28feab56ea
refs/heads/master
2022-01-20T03:44:17.606135
2021-12-13T14:19:22
2021-12-13T14:19:22
6,942,297
69
29
null
2021-08-23T11:55:28
2012-11-30T16:47:16
Java
UTF-8
Java
false
false
1,945
java
/** * This file is part of the Joana IFC project. It is developed at the * Programming Paradigms Group of the Karlsruhe Institute of Technology. * * For further details on licensing please read the information at * http://joana.ipd.kit.edu or contact the authors. */ /******************************************************************************* * Copyright (c) 2003, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package edu.kit.joana.ui.ifc.sdg.latticeeditor.figures; import org.eclipse.draw2d.Border; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.Label; import org.eclipse.draw2d.MarginBorder; import org.eclipse.draw2d.geometry.Rectangle; import edu.kit.joana.ui.ifc.sdg.latticeeditor.LatticeImages; /** * @author hudsonr Created on Jul 21, 2003 */ public class EndTag extends Label { static final Border BORDER = new MarginBorder(2, 0, 2, 2); /** * Creates a new StartTag * * @param name * the text to display in this StartTag */ public EndTag(String name) { setIconTextGap(8); setText(name); setIcon(LatticeImages.gear); setBorder(BORDER); } protected void paintFigure(Graphics g) { super.paintFigure(g); Rectangle r = getTextBounds(); r.resize(0, -1).expand(1, 1); g.drawLine(r.x, r.y, r.right(), r.y); // Top line g.drawLine(r.x, r.bottom(), r.right(), r.bottom()); // Bottom line g.drawLine(r.right(), r.bottom(), r.right(), r.y); // Right line g.drawLine(r.x - 7, r.y + r.height / 2, r.x, r.y); g.drawLine(r.x - 7, r.y + r.height / 2, r.x, r.bottom()); } }
[ "juergen.graf@gmail.com" ]
juergen.graf@gmail.com
38e6b8753b3ecc6f3ac7a7b8dfc1138c131f29a8
750bb6c6fa115fde1bfe646bb3359f886373d24e
/src/test/java/wat/WAT75.java
7b9d7eabc75963c3b1c4253f49b20b33a6338c5d
[]
no_license
Basha692/BashaSelenium
d21e2c7abd5f9a5d7c3be43578863186f2f7322f
37fb79f85e6c973610b14b53d3e14b6183219a41
refs/heads/master
2022-07-13T11:05:59.156297
2019-12-06T06:08:37
2019-12-06T06:08:37
226,252,795
0
0
null
2022-06-29T17:49:37
2019-12-06T05:30:40
Java
UTF-8
Java
false
false
4,261
java
package wat; import org.testng.SkipException; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import com.relevantcodes.extentreports.LogStatus; import base.TestBase; import util.ExtentManager; import util.OnePObjectMap; /** * Class to Verify that System toggles the "Select all" option to "Deselect all" when user clicks on the Select all option. * * @author UC225218 * */ public class WAT75 extends TestBase { static int status = 1; /** * Method to displaying JIRA ID's for test case in specified path of Extent Reports * * @throws Exception, When Something unexpected */ @BeforeTest public void beforeTest() throws Exception { extent = ExtentManager.getReporter(filePath); rowData = testcase.get(this.getClass().getSimpleName()); test = extent.startTest(rowData.getTestcaseId(), rowData.getTestcaseDescription()).assignCategory("WAT"); } /** * Method for login into WAT application using TR ID * * @throws Exception, When WAT Login is not done */ @Test @Parameters({"username", "password"}) public void testLoginWATApp(String username, String password) throws Exception { boolean testRunmode = getTestRunMode(rowData.getTestcaseRunmode()); boolean master_condition = suiteRunmode && testRunmode; logger.info("checking master condition status-->" + this.getClass().getSimpleName() + "-->" + master_condition); if (!master_condition) { status = 3; test.log(LogStatus.SKIP, "Skipping test case " + this.getClass().getSimpleName() + " as the run mode is set to NO"); throw new SkipException("Skipping Test Case" + this.getClass().getSimpleName() + " as runmode set to NO");// reports } test.log(LogStatus.INFO, this.getClass().getSimpleName() + " execution starts "); try { openBrowser(); clearCookies(); maximizeWindow(); test.log(LogStatus.INFO, "Logging into WAT Applicaton using valid WAT Entitled user "); ob.navigate().to(host + CONFIG.getProperty("appendWATAppUrl")); pf.getLoginTRInstance(ob).loginToWAT(username, password, test); pf.getSearchAuthClusterPage(ob).validateAuthorSearchPage(test); } catch (Throwable t) { logFailureDetails(test, t, "Login Fail", "login_fail"); pf.getBrowserActionInstance(ob).closeBrowser(); } } /** * Method to Verify that System toggles the "Select all" option to "Deselect all" when user clicks on the Select all option. * * @param orcid * @throws Exception, When Something unexpected */ @Test(dependsOnMethods = {"testLoginWATApp"}) @Parameters({ "LastName", "CountryName1", "CountryName2","OrgName1", "OrgName2" }) public void VerifySelectAllToDeSelectall(String LastName, String CountryName1,String CountryName2, String OrgName1,String OrgName2) throws Exception { try { pf.getSearchAuthClusterPage(ob).searchAuthorClusterOnlyLastName(LastName, CountryName1,CountryName2, OrgName1, OrgName2,test); pf.getSearchAuthClusterResultsPage(ob).selectAllAuthorCard(test); pf.getBrowserWaitsInstance(ob).waitUntilElementIsDisplayed(OnePObjectMap.WAT_DESELECT_ALL_LINK_XPATH, 5); if(pf.getBrowserActionInstance(ob).getElement(OnePObjectMap.WAT_DESELECT_ALL_LINK_XPATH).isDisplayed()) test.log(LogStatus.PASS, "DeSelect all link is displayed after clicking on Select all."); pf.getBrowserActionInstance(ob).closeBrowser(); } catch (Throwable t) { t.printStackTrace(); logFailureDetails(test, t, "Author DeSelection Fail", "author_deselection_fail"); pf.getBrowserActionInstance(ob).closeBrowser(); } } /** * updating Extent Report with test case status whether it is PASS or FAIL or SKIP */ @AfterTest public void reportTestResult() { extent.endTest(test); /* * if (status == 1) TestUtil.reportDataSetResult(profilexls, "Test Cases", TestUtil.getRowNum(profilexls, * this.getClass().getSimpleName()), "PASS"); else if (status == 2) TestUtil.reportDataSetResult(profilexls, * "Test Cases", TestUtil.getRowNum(profilexls, this.getClass().getSimpleName()), "FAIL"); else * TestUtil.reportDataSetResult(profilexls, "Test Cases", TestUtil.getRowNum(profilexls, * this.getClass().getSimpleName()), "SKIP"); */ } }
[ "syed2208b@gmail.com" ]
syed2208b@gmail.com
fe9ead5811b3f54297f2adabcdf9e34190ae0650
99993cee373542810763c6a037db527b86b0d4ac
/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluent.java
dd6f0b9ef42239cd545e51b4d337846e47f5939c
[ "Apache-2.0" ]
permissive
saparaj/java
b54c355f2276ac7ac2cd09f2f0cf3212f7c41b2d
a7266c798f16ab01e9ceac441de199bd8a5a839a
refs/heads/master
2023-08-15T19:35:11.163843
2021-10-13T16:53:49
2021-10-13T16:53:49
269,235,029
0
0
Apache-2.0
2020-06-04T01:46:44
2020-06-04T01:46:43
null
UTF-8
Java
false
false
4,594
java
package io.kubernetes.client.openapi.models; import com.google.gson.annotations.SerializedName; import io.kubernetes.client.fluent.Fluent; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; import java.lang.Deprecated; import java.lang.Byte; import java.util.Collection; import java.util.List; import java.lang.Boolean; import java.util.Map; public interface V1CertificateSigningRequestSpecFluent<A extends io.kubernetes.client.openapi.models.V1CertificateSigningRequestSpecFluent<A>> extends io.kubernetes.client.fluent.Fluent<A> { public A addToExtra(java.lang.String key,java.util.List<java.lang.String> value); public A addToExtra(java.util.Map<java.lang.String,java.util.List<java.lang.String>> map); public A removeFromExtra(java.lang.String key); public A removeFromExtra(java.util.Map<java.lang.String,java.util.List<java.lang.String>> map); public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getExtra(); public <K,V>A withExtra(java.util.Map<java.lang.String,java.util.List<java.lang.String>> extra); public java.lang.Boolean hasExtra(); public A addToGroups(int index,java.lang.String item); public A setToGroups(int index,java.lang.String item); public A addToGroups(java.lang.String... items); public A addAllToGroups(java.util.Collection<java.lang.String> items); public A removeFromGroups(java.lang.String... items); public A removeAllFromGroups(java.util.Collection<java.lang.String> items); public java.util.List<java.lang.String> getGroups(); public java.lang.String getGroup(int index); public java.lang.String getFirstGroup(); public java.lang.String getLastGroup(); public java.lang.String getMatchingGroup(java.util.function.Predicate<java.lang.String> predicate); public java.lang.Boolean hasMatchingGroup(java.util.function.Predicate<java.lang.String> predicate); public A withGroups(java.util.List<java.lang.String> groups); public A withGroups(java.lang.String... groups); public java.lang.Boolean hasGroups(); public A addNewGroup(java.lang.String original); public A withRequest(byte... request); public byte[] getRequest(); public A addToRequest(int index,java.lang.Byte item); public A setToRequest(int index,java.lang.Byte item); public A addToRequest(java.lang.Byte... items); public A addAllToRequest(java.util.Collection<java.lang.Byte> items); public A removeFromRequest(java.lang.Byte... items); public A removeAllFromRequest(java.util.Collection<java.lang.Byte> items); public java.lang.Boolean hasRequest(); public java.lang.String getSignerName(); public A withSignerName(java.lang.String signerName); public java.lang.Boolean hasSignerName(); @java.lang.Deprecated /** * Method is deprecated. use withSignerName instead. */ public A withNewSignerName(java.lang.String original); public java.lang.String getUid(); public A withUid(java.lang.String uid); public java.lang.Boolean hasUid(); @java.lang.Deprecated /** * Method is deprecated. use withUid instead. */ public A withNewUid(java.lang.String original); public A addToUsages(int index,java.lang.String item); public A setToUsages(int index,java.lang.String item); public A addToUsages(java.lang.String... items); public A addAllToUsages(java.util.Collection<java.lang.String> items); public A removeFromUsages(java.lang.String... items); public A removeAllFromUsages(java.util.Collection<java.lang.String> items); public java.util.List<java.lang.String> getUsages(); public java.lang.String getUsage(int index); public java.lang.String getFirstUsage(); public java.lang.String getLastUsage(); public java.lang.String getMatchingUsage(java.util.function.Predicate<java.lang.String> predicate); public java.lang.Boolean hasMatchingUsage(java.util.function.Predicate<java.lang.String> predicate); public A withUsages(java.util.List<java.lang.String> usages); public A withUsages(java.lang.String... usages); public java.lang.Boolean hasUsages(); public A addNewUsage(java.lang.String original); public java.lang.String getUsername(); public A withUsername(java.lang.String username); public java.lang.Boolean hasUsername(); @java.lang.Deprecated /** * Method is deprecated. use withUsername instead. */ public A withNewUsername(java.lang.String original); }
[ "bburns@microsoft.com" ]
bburns@microsoft.com
f272b4eaab9ce000c63c267ed107110c65711399
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a078/A078060Test.java
7daeeb11920b5d2b86378e7bdb4d863bd30dcb37
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a078; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A078060Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
78fbee2007f7ee3347c7f40a269564f8f18af3f7
afc47de48f9b3077fc263037abbccb9b8be53602
/MyLife/app/src/main/java/com/example/mylife/fragment/undo/UndonePresenterImp.java
5d7632b9dcfe93cbae30f9a5ec97a6eb69dd44e3
[]
no_license
linxiaoxing/MyLife
6392841cc386297ff2864b44f30eacc56043ed8b
a2fd7e304d9be70b25edee394e4077eeeead5c60
refs/heads/master
2020-12-26T19:25:01.281679
2020-04-19T08:01:01
2020-04-19T08:01:01
237,613,860
0
0
null
null
null
null
UTF-8
Java
false
false
5,965
java
package com.example.mylife.fragment.undo; import com.example.mylife.base.BasePresenter; import com.example.mylife.bean.DataResponse; import com.example.mylife.bean.TodoTaskDetail; import com.example.mylife.constant.LoadType; import com.example.mylife.net.ApiService; import com.example.mylife.net.RetrofitManager; import com.example.mylife.utils.RxSchedulers; import com.orhanobut.logger.Logger; import javax.inject.Inject; import io.reactivex.Observable; import io.reactivex.functions.Consumer; /** * Created by OnexZgj on 2018/4/12:22:43. * des: */ public class UndonePresenterImp extends BasePresenter<UndoneContract.View> implements UndoneContract.Presenter { private int mType = 0; private int mIndexPage = 1; private boolean mIsRefresh = true; @Inject public UndonePresenterImp() { } @Override public void getUndoneTask(int type) { this.mType = type; mView.showLoading(); ApiService apiService = RetrofitManager.create(ApiService.class); Observable<DataResponse<TodoTaskDetail>> observableUndoneTaskData = apiService.getNotodoList(type, mIndexPage); observableUndoneTaskData.compose(mView.<DataResponse<TodoTaskDetail>>bindToLife()) .compose( RxSchedulers.<DataResponse<TodoTaskDetail>>applySchedulers()) .subscribe(new Consumer<DataResponse<TodoTaskDetail>>() { @Override public void accept(DataResponse<TodoTaskDetail> data) throws Exception { if (data.getErrorCode() == 0) { int loadType = mIsRefresh ? LoadType.TYPE_REFRESH_SUCCESS : LoadType.TYPE_LOAD_MORE_SUCCESS; mView.showUndoneTask(data.getData(), loadType); } else { mView.showFaild(data.getErrorMsg()); } mView.hideLoading(); } }, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) throws Exception { mView.showFaild("请求网络错误!"); mView.hideLoading(); } }); // Observable.zip(observableLogin, observableUndoneTaskData, new BiFunction<DataResponse<User>, DataResponse<TodoTaskDetail>, Map<String, Object>>() { // @Override // public Map<String, Object> apply(DataResponse<User> userDataResponse, DataResponse<TodoTaskDetail> dataResponse) throws Exception { // Map<String, Object> objMap = new HashMap<>(); // objMap.put(Constant.UNDONE_DATA, dataResponse.getData()); // objMap.put(Constant.USER_KEY, userDataResponse.getData()); // return objMap; // } // }).compose(RxSchedulers.<Map<String,Object>>applySchedulers()) // .compose(mView.<Map<String,Object>>bindToLife()) // .subscribe(new Consumer<Map<String, Object>>() { // @Override // public void accept(Map<String, Object> data) throws Exception { // // int loadType = mIsRefresh ? LoadType.TYPE_REFRESH_SUCCESS : LoadType.TYPE_LOAD_MORE_SUCCESS; // // mView.showUndoneTask((TodoTaskDetail) data.get(Constant.UNDONE_DATA), loadType); // mView.hideLoading(); // } // }, new Consumer<Throwable>() { // @Override // public void accept(Throwable throwable) throws Exception { // mView.showFaild("请求网络错误!"); // mView.hideLoading(); // } // }); } @Override public void refresh() { mIndexPage = 1; mIsRefresh = true; getUndoneTask(mType); } @Override public void deleteTodo(int id) { mView.showLoading(); RetrofitManager.create(ApiService.class).deleteTodo(id).compose(RxSchedulers.<DataResponse>applySchedulers()).compose(mView.<DataResponse>bindToLife()) .subscribe(new Consumer<DataResponse>() { @Override public void accept(DataResponse s) throws Exception { mView.showDeleteSuccess("删除成功!"); mView.hideLoading(); } }, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) throws Exception { mView.showDeleteSuccess("删除失败,请重试...!"); mView.hideLoading(); } }); } @Override public void updataStatus(int id) { mView.showLoading(); RetrofitManager.create(ApiService.class).updateStateTodo(id, 1) .compose(RxSchedulers.<DataResponse>applySchedulers()) .compose(mView.<DataResponse>bindToLife()) .subscribe(new Consumer<DataResponse>() { @Override public void accept(DataResponse s) throws Exception { mView.showMarkComplete("标记为已完成!"); mView.hideLoading(); } }, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) throws Exception { mView.showMarkComplete("标记完成失败,请重试!"); Logger.d("标志更新的异常信息" + throwable.getMessage().toString()); mView.hideLoading(); } }); } @Override public void loadMore() { mIndexPage++; mIsRefresh = false; getUndoneTask(mType); } }
[ "1208280008@qq.com" ]
1208280008@qq.com
f8a0e094bacd7cdd5aedfaa02c2258e0bfc75d96
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_84c007c1109b8b1c0cf56650e1ce0e5ac88ae197/UserCommunication/26_84c007c1109b8b1c0cf56650e1ce0e5ac88ae197_UserCommunication_t.java
62978d889f05b54343caae424babe82eaed5ddbe
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,885
java
package com.example.multimodal2; import java.util.Date; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import multimodal.Constraint; import multimodal.RoomFactory; import multimodal.schedule.Booking; import multimodal.schedule.Room; import android.content.Context; import android.content.Intent; import android.os.Vibrator; import android.speech.RecognizerIntent; import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech.OnUtteranceCompletedListener; import android.util.Log; import android.widget.Toast; public class UserCommunication { private static final String OUTPUT_TYPE_QUESTION = "http://imi.org/Question"; private static final String OUTPUT_TYPE_STATEMENT = "http://imi.org/Statement"; private static final String OUTPUT_TYPE_YES_NO_QUESTION = "http://imi.org/YesNoQuestion"; private static final String OUTPUT_TYPE_REMINDER = "http://imi.org/Reminder"; private static final String MODALITY_SPEECH = "http://imi.org/Speech"; private static final String MODALITY_TACTILE = "http://imi.org/Tactile"; private static final String MODALITY_MUSIC = "http://imi.org/Music"; private static final String MODALITY_LIGHT = "http://imi.org/Light"; private static final String MODALITY_SCREEN = "http://imi.org/Screen"; private MainActivity ma; private LinkedList<Room> roomList; public String currentRoom; private boolean confirm; private Booking currentBooking; private UserInputInterpreter currentCommand; public UserCommunication(MainActivity ma) { this.ma = ma; roomList= RoomFactory.createRoomsFromRDF(this.ma.rdfModel.getModel()); } public void InputFromUser(String text) { Log.d("SpeechRepeatActivity", text); //Toast.makeText(this.ma, "You said: "+text, Toast.LENGTH_LONG).show(); //if(this.tts != null) { //this.tts.speak("You said: "+text, TextToSpeech.QUEUE_FLUSH, null); //} if(this.currentCommand == null) { this.currentCommand = new UserInputInterpreter(text, roomList); } if(currentCommand.command == UserInputInterpreter.CommandType.REMINDER) { if(this.currentCommand.time != null){ final Date reminderTime = this.currentCommand.time.getExactStartTime(); final MainActivity mainActivity = this.ma; mainActivity.runOnUiThread(new Runnable() { Date remindAtTime = reminderTime; MainActivity activity = mainActivity; @Override public void run() { while(remindAtTime.getTime()<new Date().getTime()){ synchronized (this) { try { this.wait(1000, 0); } catch (InterruptedException e) { e.printStackTrace(); } } } outputToUser("WAKE UP! THIS IS A REMINDER!", OUTPUT_TYPE_REMINDER); } }); } } else if(currentCommand.command == UserInputInterpreter.CommandType.WHEN) { } else if(currentCommand.command == UserInputInterpreter.CommandType.BOOK) { if(this.confirm) { if(text.contains("yes")) { currentBooking.book(); } this.confirm = false; this.currentCommand = null; this.currentBooking = null; } else { Room associatedRoom = null; if(currentCommand.associatedRoom != null){ associatedRoom = currentCommand.associatedRoom; } else { for(Room room : roomList ) { //TODO constrain rooms based on RDF associatedRoom = room; } } Constraint constr = new Constraint(); if(currentCommand.time != null){ constr.fuzzyTimeConstrain(currentCommand.time); } LinkedList<Booking> possibleBookings = associatedRoom.getPossibleBookings(constr); currentBooking = possibleBookings.getFirst(); outputToUser("Do you want to book a meeting in the "+associatedRoom.getSpeechName()+currentBooking.getSpeechStartTime()+"?", OUTPUT_TYPE_YES_NO_QUESTION); } } } public String getModalitiesForRoom(String type) { HashMap<String, Integer> modalities = null; for(Room room : this.roomList ) { if(room.getName().equals(currentRoom)) { modalities = this.ma.rdfModel.getModalityForRoom(room, OUTPUT_TYPE_QUESTION); break; } } String modality = null; Integer modalityVal = -1; for(Map.Entry<String, Integer>mod : modalities.entrySet()) { if(mod.getValue() > modalityVal && !mod.getKey().equals(MODALITY_MUSIC) && !mod.getKey().equals(MODALITY_LIGHT)) { modality = mod.getKey(); modalityVal = mod.getValue(); Log.d(this.ma.LOG_TAG, "maybe: " + mod.getKey()); } } Log.d(this.ma.LOG_TAG, "chosen: " + modality); return modality; } public void setRoom(String room) { this.currentRoom = room; } public void outputToUser(String msg, String type) { String preferredModality = getModalitiesForRoom(type); if(preferredModality.equals(MODALITY_SPEECH)) { if(type == OUTPUT_TYPE_YES_NO_QUESTION) { this.ma.repeatTTS.setOnUtteranceCompletedListener(new OnUtteranceCompletedListener() { @Override public void onUtteranceCompleted(String utteranceId) { askForUserSpeechInput(); } }); this.confirm = true; } outputToUserByVoice(msg); } else if(preferredModality.equals(MODALITY_SCREEN)) { if(type == OUTPUT_TYPE_YES_NO_QUESTION) { //this.ma.setContentView(R.layout.bookingconfirmation); Intent i = new Intent(this.ma, MeetingConfirmation.class); i.putExtra("booking", currentBooking); this.ma.startActivityForResult(i,3); //this.ma.startActivity(new Intent("android.intent.action.CONFIRM")); this.confirm = true; } } else if(preferredModality.equals(MODALITY_TACTILE)){ Vibrator v = (Vibrator) this.ma.getSystemService(Context.VIBRATOR_SERVICE); v.vibrate(1000); } } private void outputToUserByVoice(String msg) { HashMap<String, String> myHashAlarm = new HashMap<String, String>(); myHashAlarm.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "SOME MESSAGE"); this.ma.repeatTTS.speak(msg, TextToSpeech.QUEUE_FLUSH, myHashAlarm); Toast.makeText(this.ma, msg, Toast.LENGTH_LONG).show(); } public void askForUserSpeechInput() { Intent listenIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); listenIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass().getPackage().getName()); listenIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, "What do you want to do?"); listenIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); listenIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1); this.ma.startActivityForResult(listenIntent, this.ma.VR_REQUEST); } public void confirm(boolean b) { // TODO Auto-generated method stub } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8751d405deaa5e90afaf5dc4138aa137a410cae7
6ee81a2789b6f77e2839b1fdf85eb1a6116b9d80
/src/jvm/NotInitialization.java
7724521337e96f8ad181425b65e95005e3fc0335
[]
no_license
zhangtianle/LeetCode
67d20edb2024096320e21130f45288e2c32e2d64
ffe636f977ffffe57c6e93b0803bca18e235905e
refs/heads/master
2023-04-17T07:57:40.970297
2023-04-05T07:30:09
2023-04-05T07:30:09
56,910,838
6
3
null
null
null
null
UTF-8
Java
false
false
151
java
package jvm; public class NotInitialization { public static void main(String[] args) { System.out.println(ConstClass.HELLOWORLD); } }
[ "cqtianle@163.com" ]
cqtianle@163.com
af0f09b8535f2f9ed551cefbddf033b894d83d60
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/p1896pl/droidsonroids/relinker/p1898a/C48439a.java
c07a37d7c435a43621d0147f1dec3a8b22d62943
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
863
java
package p1896pl.droidsonroids.relinker.p1898a; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import p1896pl.droidsonroids.relinker.p1898a.C48441c.C48442a; import p1896pl.droidsonroids.relinker.p1898a.C48441c.C48443b; /* renamed from: pl.droidsonroids.relinker.a.a */ public final class C48439a extends C48442a { public C48439a(C48448f fVar, C48443b bVar, long j, int i) throws IOException { ByteOrder byteOrder; ByteBuffer allocate = ByteBuffer.allocate(4); if (bVar.f123550a) { byteOrder = ByteOrder.BIG_ENDIAN; } else { byteOrder = ByteOrder.LITTLE_ENDIAN; } allocate.order(byteOrder); long j2 = j + ((long) (i * 8)); this.f123548a = fVar.mo123263b(allocate, j2); this.f123549b = fVar.mo123263b(allocate, j2 + 4); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
259b5d0e2e36973f4e522b4522c7f14517a33481
7f63d7bfcf7f8318d77ab448d509a598972e794c
/src/com/massivecraft/massivecore/command/type/container/TypeContainer.java
ede0817c8d6562ddacb19559c8ee44ba1a7ebd87
[]
no_license
AcmeProject/MassiveCore
9149995ecfc655f348f40e12eb3711a29c2456f0
73728a3bfab316a9ede92e8013f8a89d055d9eb6
refs/heads/master
2021-01-12T21:45:58.665086
2016-04-22T16:02:33
2016-04-22T16:02:33
56,606,227
0
1
null
2016-04-19T14:55:12
2016-04-19T14:55:11
null
UTF-8
Java
false
false
7,011
java
package com.massivecraft.massivecore.command.type.container; import java.util.Arrays; import java.util.Collection; import java.util.List; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.editor.CommandEditAbstract; import com.massivecraft.massivecore.command.editor.CommandEditContainer; import com.massivecraft.massivecore.command.editor.EditSettings; import com.massivecraft.massivecore.command.editor.Property; import com.massivecraft.massivecore.command.type.Type; import com.massivecraft.massivecore.command.type.TypeAbstract; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.ContainerUtil; import com.massivecraft.massivecore.util.Txt; public abstract class TypeContainer<C extends Object, E> extends TypeAbstract<C> { // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // public TypeContainer(Type<E> innerType) { this.setInnerType(innerType); } // -------------------------------------------- // // META // -------------------------------------------- // @Override public String getName() { return this.getCollectionTypeName() + " of " + this.getInnerType().getName(); } public String getCollectionTypeName() { return super.getName(); } // -------------------------------------------- // // WRITE VISUAL // -------------------------------------------- // @Override public Mson getVisualMsonInner(C container, CommandSender sender) { // Empty if (ContainerUtil.isEmpty(container)) return MSON_EMPTY; // Create List<Mson> parts = new MassiveList<>(); // Fill List<E> elements = this.getContainerElementsOrdered(container); Type<E> innerType = this.getInnerType(); int index = -1; for (E element : elements) { index++; Mson part = Mson.mson( Mson.mson(String.valueOf(index)).color(ChatColor.WHITE), Mson.SPACE, innerType.getVisualMson(element, sender) ); parts.add(part); } // Return return Mson.implode(parts, Mson.mson("\n")); } // -------------------------------------------- // // WRITE VISUAL // -------------------------------------------- // @Override public String getVisualInner(C container, CommandSender sender) { // Empty if (ContainerUtil.isEmpty(container)) return EMPTY; // Create List<String> parts = new MassiveList<>(); // Fill List<E> elements = this.getContainerElementsOrdered(container); Type<E> innerType = this.getInnerType(); int index = -1; for (E element : elements) { index++; String part = Txt.parse("<white>%d <yellow>%s", index, innerType.getVisual(element, sender)); parts.add(part); } // Return return Txt.implode(parts, "\n"); } // -------------------------------------------- // // WRITE NAME // -------------------------------------------- // @Override public String getNameInner(C container) { // Empty if (ContainerUtil.isEmpty(container)) return ""; // Create List<String> parts = new MassiveList<>(); // Fill List<E> elements = this.getContainerElementsOrdered(container); Type<E> innerType = this.getInnerType(); for (E element : elements) { String part = innerType.getName(element); parts.add(part); } // Return return Txt.implode(parts, " "); } // -------------------------------------------- // // WRITE ID // -------------------------------------------- // @Override public String getIdInner(C container) { // Empty if (ContainerUtil.isEmpty(container)) return ""; // Create List<String> parts = new MassiveList<>(); // Fill Type<E> innerType = this.getInnerType(); List<E> elements = this.getContainerElementsOrdered(container); for (E element : elements) { String part = innerType.getId(element); parts.add(part); } // Return return Txt.implode(parts, " "); } // -------------------------------------------- // // READ // -------------------------------------------- // @SuppressWarnings("unchecked") @Override public C read(String arg, CommandSender sender) throws MassiveException { // Create C ret = this.createNewInstance(); // Check All if (this.getInnerType() instanceof AllAble) { AllAble<E> allAble = (AllAble<E>)this.getInnerType(); if (arg.equalsIgnoreCase("all")) { ContainerUtil.addElements(ret, allAble.getAll(sender)); return ret; } } // Fill Type<E> innerType = this.getInnerType(); for (String elementArg : Txt.PATTERN_WHITESPACE.split(arg)) { E element = innerType.read(elementArg, sender); ContainerUtil.addElement(ret, element); } // Return return ret; } // -------------------------------------------- // // TAB LIST // -------------------------------------------- // @Override public Collection<String> getTabList(CommandSender sender, String arg) { // Because we accept multiple arguments of the same type. // The passed arg might be more than one. We only want the latest. return this.getInnerType().getTabList(sender, getLastArg(arg)); } @Override public List<String> getTabListFiltered(CommandSender sender, String arg) { // Because we accept multiple arguments of the same type. // The passed arg might be more than one. We only want the latest. return this.getInnerType().getTabListFiltered(sender, getLastArg(arg)); } @Override public boolean allowSpaceAfterTab() { return this.getInnerType().allowSpaceAfterTab(); } // -------------------------------------------- // // EQUALS // -------------------------------------------- // @Override public boolean equalsInner(C container1, C container2) { List<E> ordered1 = this.getContainerElementsOrdered(container1); List<E> ordered2 = this.getContainerElementsOrdered(container2); if (ordered1.size() != ordered2.size()) return false; Type<E> innerType = this.getInnerType(); for (int index = 0; index < ordered1.size(); index++) { E element1 = ordered1.get(index); E element2 = ordered2.get(index); if ( ! innerType.equals(element1, element2)) return false; } return true; } // -------------------------------------------- // // EDITOR // -------------------------------------------- // @Override public <O> CommandEditAbstract<O, C> createEditCommand(EditSettings<O> settings, Property<O, C> property) { return new CommandEditContainer<O, C>(settings, property); } // -------------------------------------------- // // ARGS // -------------------------------------------- // public static List<String> getArgs(String string) { return Arrays.asList(Txt.PATTERN_WHITESPACE.split(string, -1)); } public static String getLastArg(String string) { List<String> args = getArgs(string); if (args.isEmpty()) return null; return args.get(args.size() - 1); } }
[ "olof@sylt.nu" ]
olof@sylt.nu
8ba1084610d910162c963598119637049dec8334
b7429cb7d9f3197d33121d366050183dd7447111
/app/src/main/java/com/framework/base/BaseWorkerService.java
c5c828c39afa8f7579ff99444ad4cdf8348cbf12
[]
no_license
hexiaoleione/biaowang_studio
28c719909667f131637205de79bb8cc72fc52545
1735f31cd4e25ba5e08dd117ba7492186dcee8b0
refs/heads/master
2021-07-10T00:03:42.022656
2019-02-12T03:35:51
2019-02-12T03:35:51
144,809,142
0
0
null
null
null
null
UTF-8
Java
false
false
1,833
java
package com.framework.base; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.Message; import java.lang.ref.WeakReference; /** * 描述:可做耗时操作的后台服务 */ public abstract class BaseWorkerService extends BaseService { private HandlerThread mHandlerThread; protected BackgroundHandler mBackgroundHandler; @Override public void onCreate() { super.onCreate(); mHandlerThread = new HandlerThread("service worker:" + getClass().getSimpleName()); mHandlerThread.start(); mBackgroundHandler = new BackgroundHandler(this, mHandlerThread.getLooper()); } @Override public void onDestroy() { super.onDestroy(); if (mHandlerThread.getLooper() != null) { mHandlerThread.getLooper().quit(); } } /** * 处理后台操作 */ protected abstract void handleBackgroundMessage(Message msg); /** * 发送后台操作 * * @param msg */ protected void sendBackgroundMessage(Message msg) { mBackgroundHandler.sendMessage(msg); } /** * 发送后台操作 * * @param what */ protected void sendEmptyBackgroundMessage(int what) { mBackgroundHandler.sendEmptyMessage(what); } // 后台Handler private static class BackgroundHandler extends Handler { private final WeakReference<BaseWorkerService> mServiceReference; BackgroundHandler(BaseWorkerService service, Looper looper) { super(looper); mServiceReference = new WeakReference<BaseWorkerService>(service); } public WeakReference<BaseWorkerService> getServiceReference() { return mServiceReference; } @Override public void handleMessage(Message msg) { super.handleMessage(msg); if (getServiceReference() != null && getServiceReference().get() != null) { getServiceReference().get().handleBackgroundMessage(msg); } } } }
[ "798711147@qq.com" ]
798711147@qq.com
815caddda01891afdc6d21323f566ecd6e7d74b3
cf7704d9ef0a34aff366adbbe382597473ab509d
/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorCreateGroup.java
eae9df2f4bcf1e351e4369655e148e6ee6c01ad5
[]
no_license
maheeka/plantuml-esb
0fa14b60af513c9dedc22627996240eaf3802c5a
07c7c7d78bae29d9c718a43229996c068386fccd
refs/heads/master
2021-01-10T07:49:10.043639
2016-02-23T17:36:33
2016-02-23T17:36:33
52,347,881
0
4
null
null
null
null
UTF-8
Java
false
false
2,327
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2014, Arnaud Roques * * Project Info: http://plantuml.sourceforge.net * * This file is part of PlantUML. * * PlantUML 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. * * PlantUML distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * Original Author: Arnaud Roques * * Revision $Revision: 8475 $ * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.skin.rose.Rose; public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator { private final Rose rose = new Rose(); public FtileFactoryDelegatorCreateGroup(FtileFactory factory, ISkinParam skinParam) { super(factory, skinParam); } @Override public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, Display headerNote) { final HtmlColor arrowColor = rose.getHtmlColor(getSkinParam(), ColorParam.activityArrow); return new FtileGroup(list, name, headerNote, arrowColor, backColor, titleColor, getSkinParam()); } }
[ "maheeka@wso2.com" ]
maheeka@wso2.com
c0248c14c0730bd4ed90d5ae6fa0023af32a5a8e
182d0f4acc532472514c1a5f292436866145726a
/src/com/shangde/edu/ad/condition/QueryCPS360OrderCheckCondition.java
d7d0d766e4e224d7e3dc3a8dd295cde1956a8857
[]
no_license
fairyhawk/sedu_admin-Deprecated
1c018f17381cd195a1370955b010b3278d893309
eb3d22edc44b2c940942d16ffe2b4b7e41eddbfb
refs/heads/master
2021-01-17T07:08:44.802635
2014-01-25T10:28:03
2014-01-25T10:28:03
8,679,677
0
2
null
null
null
null
UTF-8
Java
false
false
993
java
package com.shangde.edu.ad.condition; import com.shangde.common.vo.PageQuery; /** * 360CPS对账查询的查询条件。 * * @author ZHENG QIANG */ public class QueryCPS360OrderCheckCondition extends PageQuery { private String webFrom; private Integer billMonthYear; private Integer billMonthMonth; private String lastOrderId; public String getWebFrom() { return webFrom; } public void setWebFrom(String webFrom) { this.webFrom = webFrom; } public Integer getBillMonthYear() { return billMonthYear; } public void setBillMonthYear(Integer billMonthYear) { this.billMonthYear = billMonthYear; } public Integer getBillMonthMonth() { return billMonthMonth; } public void setBillMonthMonth(Integer billMonthMonth) { this.billMonthMonth = billMonthMonth; } public String getLastOrderId() { return lastOrderId; } public void setLastOrderId(String lastOrderId) { this.lastOrderId = lastOrderId; } }
[ "bis@foxmail.com" ]
bis@foxmail.com
4442e535b5b091bb5ac95b07d574942b3280507a
7e9cb0b3a29dbd7d241640c0dda30b620dae52b9
/core/src/main/java/com/cts/fasttack/core/dto/DCProgressDto.java
6e2a459fc4b9c1496ce2b068126727871e76d582
[]
no_license
ilemobayo/FASTTACK
f8705ae0b2f5a41487410016756a1b26b0bc5e22
85487890b9e5597f9b2b9690713ece2a5c1aff9f
refs/heads/master
2020-05-26T15:00:06.553982
2018-11-30T11:32:39
2018-11-30T11:32:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,490
java
package com.cts.fasttack.core.dto; import java.util.Date; import com.cts.fasttack.common.core.dto.IdentifierDto; import com.cts.fasttack.common.core.exception.StandardErrorCodes; import com.cts.fasttack.core.data.DCProgress; import com.cts.fasttack.core.dict.DCProgressStatus; import com.cts.fasttack.common.core.dict.InternationalPaymentSystem; import com.cts.fasttack.core.dict.ProvisioningDecision; /** * DTO for {@link DCProgress} * * @author Dmitry Koval */ public class DCProgressDto extends IdentifierDto<Long> { private String dcId; private InternationalPaymentSystem ips; private String requestId; private String correlationId; private String tokenRequestorId; private String panDisplay; private String tokenUniqueReference; private String panUniqueReference; private String panInternalId; private String panInternalGUID; private StandardErrorCodes provisioningError; private ProvisioningDecision provisioningDecision; private DCProgressStatus provisioningStatus; private String asvErr; private DCProgressStatus asvStatus; private Long taskId; private Date eventDate; private boolean finished; private boolean lock; private String customerPhone; private String productConfigID; public DCProgressDto() { setId(-1L); } public String getDcId() { return dcId; } public void setDcId(String dcId) { this.dcId = dcId; } public InternationalPaymentSystem getIps() { return ips; } public void setIps(InternationalPaymentSystem ips) { this.ips = ips; } public String getRequestId() { return requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getCorrelationId() { return correlationId; } public void setCorrelationId(String correlationId) { this.correlationId = correlationId; } public String getTokenRequestorId() { return tokenRequestorId; } public void setTokenRequestorId(String tokenRequestorId) { this.tokenRequestorId = tokenRequestorId; } public String getPanDisplay() { return panDisplay; } public void setPanDisplay(String panDisplay) { this.panDisplay = panDisplay; } public String getTokenUniqueReference() { return tokenUniqueReference; } public void setTokenUniqueReference(String tokenUniqueReference) { this.tokenUniqueReference = tokenUniqueReference; } public String getPanUniqueReference() { return panUniqueReference; } public void setPanUniqueReference(String panUniqueReference) { this.panUniqueReference = panUniqueReference; } public String getPanInternalId() { return panInternalId; } public void setPanInternalId(String panInternalId) { this.panInternalId = panInternalId; } public StandardErrorCodes getProvisioningError() { return provisioningError; } public void setProvisioningError(StandardErrorCodes provisioningError) { this.provisioningError = provisioningError; } public ProvisioningDecision getProvisioningDecision() { return provisioningDecision; } public void setProvisioningDecision(ProvisioningDecision provisioningDecision) { this.provisioningDecision = provisioningDecision; } public DCProgressStatus getProvisioningStatus() { return provisioningStatus; } public void setProvisioningStatus(DCProgressStatus provisioningStatus) { this.provisioningStatus = provisioningStatus; } public String getAsvErr() { return asvErr; } public void setAsvErr(String asvErr) { this.asvErr = asvErr; } public DCProgressStatus getAsvStatus() { return asvStatus; } public void setAsvStatus(DCProgressStatus asvStatus) { this.asvStatus = asvStatus; } public Long getTaskId() { return taskId; } public void setTaskId(Long taskId) { this.taskId = taskId; } public Date getEventDate() { return eventDate; } public void setEventDate(Date eventDate) { this.eventDate = eventDate; } public boolean getFinished() { return finished; } public void setFinished(boolean finished) { this.finished = finished; } public boolean getLock() { return lock; } public void setLock(boolean lock) { this.lock = lock; } public String getPanInternalGUID() { return panInternalGUID; } public void setPanInternalGUID(String panInternalGUID) { this.panInternalGUID = panInternalGUID; } public String getCustomerPhone() { return customerPhone; } public void setCustomerPhone(String customerPhone) { this.customerPhone = customerPhone; } public String getProductConfigID() { return productConfigID; } public void setProductConfigID(String productConfigID) { this.productConfigID = productConfigID; } @Override public String toString() { return "DCProgressDto{" + "id='" + getId() + '\'' + "dcId='" + dcId + '\'' + ", ips=" + ips + ", requestId='" + requestId + '\'' + ", correlationId='" + correlationId + '\'' + ", tokenRequestorId='" + tokenRequestorId + '\'' + ", panDisplay='" + panDisplay + '\'' + ", tokenUniqueReference='" + tokenUniqueReference + '\'' + ", panUniqueReference='" + panUniqueReference + '\'' + ", panInternalId='" + panInternalId + '\'' + ", panInternalGUID='" + panInternalGUID + '\'' + ", customerPhone='" + customerPhone + '\'' + ", productConfigID='" + productConfigID + '\'' + ", provisioningError=" + provisioningError + ", provisioningDecision=" + provisioningDecision + ", provisioningStatus=" + provisioningStatus + ", asvErr='" + asvErr + '\'' + ", asvStatus=" + asvStatus + ", taskId=" + taskId + ", eventDate=" + eventDate + ", finished=" + finished + ", lock=" + lock + "} "; } }
[ "a.lazarchuk@cartsys.com.ua" ]
a.lazarchuk@cartsys.com.ua
76783aece2616dfe22869d1cf4213618342eac40
b8bb16f32d7e537bb11bc97b1b8cc7dc0ce0cbc1
/src/main/java/app/ccb/domain/entities/Client.java
ee3cdce411efa42b9931f015ebd514adccc04ad2
[]
no_license
StefanUrilski/ccb
3f681355293f8f5f3b6a898551171bed2606e347
f3386cb8669ed8f86c66f50c9c32fb29c81f8821
refs/heads/master
2020-06-27T19:51:55.417355
2019-08-01T10:28:45
2019-08-01T10:28:45
200,029,793
0
0
null
null
null
null
UTF-8
Java
false
false
1,302
java
package app.ccb.domain.entities; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity(name = "clients") public class Client extends BaseEntity { private String fullName; private Integer age; private BankAccount bankAccount; private Set<Employee> employee = new HashSet<>(); @Column(name = "full_name", nullable = false) public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } @Column public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } @OneToOne(mappedBy = "client") public BankAccount getBankAccount() { return bankAccount; } public void setBankAccount(BankAccount bankAccount) { this.bankAccount = bankAccount; } @ManyToMany @JoinTable(name = "employees_clients", joinColumns = @JoinColumn(name = "client_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "employee_id", referencedColumnName = "id") ) public Set<Employee> getEmployee() { return employee; } public void setEmployee(Set<Employee> employee) { this.employee = employee; } }
[ "urilskistefan@gmail.com" ]
urilskistefan@gmail.com
d73c4d7abcbfe3d540d10a6958640a82f04d37c5
7b82d70ba5fef677d83879dfeab859d17f4809aa
/tmp/sys/nature-framework/src/main/java/org/nature/framework/helper/AttrabuteHelper.java
e88a28047be89525fce9b82b6178802fd05b7d61
[ "Apache-2.0" ]
permissive
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,264
java
package org.nature.framework.helper; import java.lang.reflect.Field; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import org.nature.framework.annotation.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class AttrabuteHelper { private static Logger LOGGER = LoggerFactory.getLogger(AttrabuteHelper.class); public static void putInAttrabute(HttpServletRequest request, Object ctrlObj, Class<?> ctrlCls) { Field[] fields = ctrlCls.getFields(); for (Field field : fields) { field.setAccessible(true); if (field.isAnnotationPresent(Inject.class)) { continue; } String key = field.getName(); try { Object obj = field.get(ctrlObj); if(obj!=null){ request.setAttribute(key, obj); } } catch (IllegalArgumentException e) { LOGGER.error(e.toString()); } catch (IllegalAccessException e) { LOGGER.error(e.toString()); } } } public static Map<String, Object> putInRootMap(HttpServletRequest request,Object ctrlObj, Class<?> ctrlCls) { ServletContext servletContext = request.getServletContext(); Enumeration<String> attributeNames = servletContext.getAttributeNames(); HashMap<String, Object> rootMap = new HashMap<String, Object>(); while (attributeNames.hasMoreElements()) { String name = attributeNames.nextElement(); Object value = servletContext.getAttribute(name); rootMap.put(name, value); } Enumeration<String> sessionNames = request.getSession().getAttributeNames(); while (sessionNames.hasMoreElements()) { String name = sessionNames.nextElement(); Object value = request.getSession().getAttribute(name); rootMap.put(name, value); } Field[] fields = ctrlCls.getFields(); for (Field field : fields) { field.setAccessible(true); if (field.isAnnotationPresent(Inject.class)) { continue; } String key = field.getName(); try { Object obj = field.get(ctrlObj); if(obj!=null){ rootMap.put(key, obj); } } catch (IllegalArgumentException e) { LOGGER.error(e.toString()); } catch (IllegalAccessException e) { LOGGER.error(e.toString()); } } return rootMap; } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
7add71d4fad76f58966c397d216cbad535392056
41972e585b2bb69626ca8b4be09379768a8b6950
/src/test/java/com/alibaba/asyncload/domain/AsyncLoadTestModel.java
0385da06671ae432d41ea656a0787048248b3c8e
[ "Apache-2.0" ]
permissive
Trinea/asyncload
48d8bd6d697baaa26cb3737881c3839ee207f94a
6cd511b3ab7b9868adf527f932a55521430e55d2
refs/heads/master
2021-01-10T23:23:28.227121
2016-10-11T12:18:31
2016-10-11T12:18:31
70,590,116
12
7
null
2016-10-11T12:17:30
2016-10-11T12:17:29
null
UTF-8
Java
false
false
1,073
java
package com.alibaba.asyncload.domain; import java.io.Serializable; /** * 一个asyncLoad的测试对象model,返回的对象 * * @author jianghang 2011-1-21 下午10:45:41 */ public class AsyncLoadTestModel implements Serializable { private static final long serialVersionUID = -5410019316926096126L; public AsyncLoadTestModel(int id, String name, String detail){ this.id = id; this.name = name; this.detail = detail; } public int id; public String name; public String detail; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDetail() { return detail; } public void setDetail(String detail) { this.detail = detail; } @Override public String toString() { return "AsyncLoadTestModel [detail=" + detail + ", id=" + id + ", name=" + name + "]"; } }
[ "jianghang115@gmail.com" ]
jianghang115@gmail.com
e221a370ebeb843d4a084b6b7fd3bfb801332ceb
cdbdddac426bce27ad97401b779392327a6a77eb
/corejava/Core/src/com/java/core/io/exception/Test.java
bb355f6cb23428e02ecc801633ffd1c3e224395a
[]
no_license
dhirajn72/allmylocalstuff
87dc68dfe014f31f6c96e996d6b251ff4bda4de8
2f50ab2f3f6b37f71cd02cc253639c540006b933
refs/heads/master
2022-12-23T09:42:59.221342
2021-07-28T19:11:40
2021-07-28T19:11:40
97,965,789
1
1
null
2022-12-16T09:55:29
2017-07-21T16:08:29
Roff
UTF-8
Java
false
false
561
java
package com.java.core.io.exception; public class Test { public static void main(String[] args) { try { new StudentService().getNameBySid(null); } catch (Exception e) { e.printStackTrace(); } } } class StudentService { String getNameBySid(String sid) throws StudentNotFoundException{ if (sid == null || sid.isEmpty() || !sid.equals("JLC-99")) { throw new StudentNotFoundException(sid); } return "singh"; } } class StudentNotFoundException extends Exception { public StudentNotFoundException(String sid) { super(sid); } }
[ "dhirajn72@gmail.com" ]
dhirajn72@gmail.com