blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2
values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 132
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 9.45M | extension stringclasses 28
values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 352 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5de910aa3111237ee5225ae7bb4155713804a72f | 832c756923d48ace3f338b27ae9dc8327058d088 | /src/contest/usaco/USACO_2012_Nearby_Cows.java | ac03308608b70177801b142decb3f8f9d830147a | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | luchy0120/competitive-programming | 1331bd53698c4b05b57a31d90eecc31c167019bd | d0dfc8f3f3a74219ecf16520d6021de04a2bc9f6 | refs/heads/master | 2020-05-04T15:18:06.150736 | 2018-11-07T04:15:26 | 2018-11-07T04:15:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,089 | java | package contest.usaco;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class USACO_2012_Nearby_Cows {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter ps = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
static StringTokenizer st;
public static void main (String[] args) throws IOException {
int n = readInt();
int k = readInt();
ArrayList<ArrayList<Integer>> adj = new ArrayList<ArrayList<Integer>>();
for (int x = 0; x < n; x++)
adj.add(new ArrayList<Integer>());
for (int x = 0; x < n - 1; x++) {
int a = readInt() - 1;
int b = readInt() - 1;
adj.get(a).add(b);
adj.get(b).add(a);
}
long[][] dp = new long[n][k + 1];
for (int x = 0; x < n; x++) {
int a = readInt();
dp[x][0] = dp[x][1] = a;
}
for (int x = 1; x <= k; x++) {
for (int y = 0; y < n; y++) {
long total = 0;
for (Integer z : adj.get(y))
total += dp[z][x - 1];
long minus = 0;
if (x != 1)
minus = dp[y][x - 2] * (adj.get(y).size() - 1);
dp[y][x] += total - minus;
}
}
for (int y = 0; y < n; y++) {
System.out.println(dp[y][k]);
}
}
static String next () throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
static long readLong () throws IOException {
return Long.parseLong(next());
}
static int readInt () throws IOException {
return Integer.parseInt(next());
}
static double readDouble () throws IOException {
return Double.parseDouble(next());
}
static char readCharacter () throws IOException {
return next().charAt(0);
}
static String readLine () throws IOException {
return br.readLine().trim();
}
}
| [
"jeffrey.xiao1998@gmail.com"
] | jeffrey.xiao1998@gmail.com |
977e490d64631be4e55ca04a886d8191d77f4c14 | 6256cb5878eb92188b9f2d54e76cfcfd10d49eb8 | /Chess Game/src/components/piece/Knight.java | e45107748b8fef0c282c4121bb06b31319e61284 | [] | no_license | JorgeSevilla/Chess-Game | 9f96a3f83637b8e8ed61e8bbd3d88e66b62a201f | e40e279b7ec681e2217eb2e4f4313d7c50eaf687 | refs/heads/master | 2021-05-30T06:02:03.268045 | 2015-12-03T01:32:20 | 2015-12-03T01:34:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,210 | java | package components.piece;
import components.ChessBoard;
import components.ChessBox;
import java.util.ArrayList;
/**
* Inherits from Piece and implements unique functions for the Kinghts
* Created by an5ra on 9/10/2015.
*/
public class Knight extends Piece
{
/**
* Constructor
* @param color
* @param setPosition
*/
public Knight(String color, ChessBox setPosition)
{
super("Knight", color, setPosition);
}
public ArrayList<ChessBox> getPossibleMoves(ChessBoard chessBoard)
{
ArrayList<ChessBox> possibleMoves = new ArrayList<ChessBox>();
addToPossibleMoves(chessBoard,possibleMoves,2,1);//upright
addToPossibleMoves(chessBoard,possibleMoves,2,-1);//upleft
addToPossibleMoves(chessBoard,possibleMoves,1,2);//uprightright
addToPossibleMoves(chessBoard,possibleMoves,1,-2);//upleftleft
addToPossibleMoves(chessBoard,possibleMoves,-2,1);//downright
addToPossibleMoves(chessBoard,possibleMoves,-2,-1);//downright
addToPossibleMoves(chessBoard,possibleMoves,-1,-2);//downleftleft
addToPossibleMoves(chessBoard,possibleMoves,-1,2);//downrightright
return possibleMoves;
}
}
| [
"an5rag.choudhary@gmail.com"
] | an5rag.choudhary@gmail.com |
871b35c157a0e11b4c8d86e0264dc97bc0b1ec1a | 0af773545e8c12cbc2f1a4510405d10abc3726e0 | /view/src/main/java/com/aiexpanse/react/view/api/CompositeElement.java | 6386eda4262219e6f38c5003e9e3b8293c8097b4 | [] | no_license | kalthas/react-java | cef1f100c24ba0f7dd220aace02e7b314c0431e4 | 5077e33ab92d5266ff4de363172d7f0047d5f90f | refs/heads/master | 2020-04-09T22:34:16.537244 | 2018-03-28T07:36:59 | 2018-03-28T07:36:59 | 124,246,646 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 168 | java | package com.aiexpanse.react.view.api;
import com.aiexpanse.dictionary.api.DDD;
@DDD(name = "Composite Element")
public interface CompositeElement extends Element {
}
| [
"anduin.lothair@gmail.com"
] | anduin.lothair@gmail.com |
0bc9be92c1c2c4d570e219e0e86d9fa0a169fd7c | 2822d6d2a41290ad404079c5827d756c1f114ce4 | /app/src/main/java/com/vyaches/auto/Replacements/ReplacementActivity.java | 991d3e31eabf5def7c8b5989404a1311f09d61d9 | [] | no_license | funkinanimal/Auto | ea5adc77a1070383326f11ceb3e4d48f7f9b228d | c16ec389045115d612bc72b179c305143bc2d64c | refs/heads/master | 2021-08-31T14:43:32.886572 | 2017-12-17T16:50:45 | 2017-12-17T16:50:45 | 115,037,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,849 | java | package com.vyaches.auto.Replacements;
import android.content.Intent;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import com.vyaches.auto.DatabaseHelper;
import com.vyaches.auto.R;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
public class ReplacementActivity extends AppCompatActivity {
private DatabaseHelper mDBHelper;
private SQLiteDatabase mDb;
private int vId;
private ListView replacementList;
private ArrayList<HashMap<String, String>> replacements;
private HashMap<String, String> replacement;
private ArrayList<Integer> ids;
private SimpleAdapter repAdapter;
private void refresh(){
replacements = new ArrayList<HashMap<String, String>>();
ids = new ArrayList<Integer>();
Cursor cursor = mDb.rawQuery("Select * from replacementform where vehicle_id=" + vId, null);
cursor.moveToLast();
while(!cursor.isBeforeFirst()){
replacement = new HashMap<String, String>();
int time = cursor.getInt(3);
String repdate = new SimpleDateFormat("dd.MM.yyyy").format(new Date(time*1000L));
replacement.put("name", cursor.getString(1));
replacement.put("repdate", repdate);
replacements.add(replacement);
ids.add(cursor.getInt(7));
cursor.moveToPrevious();
}
cursor.close();
String[] from = {"name", "repdate"};
int[] to = {R.id.textView, R.id.textView2};
repAdapter = new SimpleAdapter(this, replacements, R.layout.adapter_item, from, to);
replacementList.setAdapter(repAdapter);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_replacement);
Intent goToVehicle = getIntent();
vId = goToVehicle.getIntExtra("vId", 0);
replacementList = (ListView)findViewById(R.id.replacementList);
mDBHelper = new DatabaseHelper(this);
try {
mDBHelper.updateDataBase();
} catch (IOException mIOException) {
throw new Error("UnableToUpdateDatabase");
}
try {
mDb = mDBHelper.getWritableDatabase();
} catch (SQLException mSQLException) {
throw mSQLException;
}
FloatingActionButton replacementFab = (FloatingActionButton)findViewById(R.id.replacementFab);
replacementFab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(ReplacementActivity.this, ReplaceDecisionActivity.class);
intent.putExtra("vId", vId);
startActivity(intent);
}
});
replacementList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Intent infoIntent = new Intent(ReplacementActivity.this, ReplacementInfoActivity.class);
infoIntent.putExtra("rId", ids.get(position));
startActivity(infoIntent);
}
});
}
@Override
public void onResume(){
super.onResume();
refresh();
replacementList.invalidate();
}
}
| [
"vyaches.afanas@gmail.com"
] | vyaches.afanas@gmail.com |
0a27d197213b385145a6826d36985635747c543d | 5620748ff6eea0a87a5e0034bb40df72eba938cc | /retailwebsitediscount/src/com/retailstore/main/Run.java | 0891773797ed8bab2a9c253d40175510ae1a091b | [] | no_license | nawakhan/retailsdiscointrepo | a27893568f33a08e341b2a5b4a5a9ab5609e07ca | 9427ece4c7f4b1c8d985959936a70de355a3306b | refs/heads/master | 2022-12-02T14:59:35.620240 | 2020-08-16T18:13:49 | 2020-08-16T18:13:49 | 287,991,304 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 897 | java | package com.retailstore.main;
import com.retailstore.discount.RetailsWebsitesDiscountPolicy;
import com.retailstore.discount.FixedDiscount;
import com.retailstore.model.BaseProduct;
import com.retailstore.model.ShoppingCart;
import com.retailstore.model.Product;
import com.retailstore.model.User;
public class Run {
public static void main (String[] args)
{
User employee = new User("Nawazish","EMPLOYEE");
BaseProduct groceryItem = new Product("Rice", 50, "GROCERY");
BaseProduct electronicsItem = new Product("TV", 333, "Electronics");
RetailsWebsitesDiscountPolicy discountPolicy = new FixedDiscount();
ShoppingCart shoppingCart = new ShoppingCart(employee, discountPolicy);
shoppingCart.add(groceryItem, 4);
shoppingCart.add(electronicsItem, 4);
System.out.println(shoppingCart.total());
}
} | [
"nawazish.khan@finplement.com"
] | nawazish.khan@finplement.com |
d3662ae38bf68c2b4dbeaf0ebff905b22bff71bd | 172931299ae1008d07c68c8d32abcdcbd2cf29fc | /Methoden/MaximumVonZahlen.java | f5fff0335fffd331e949eed62ec5be5685bb01fc | [] | no_license | carbo/Java_Basics_1 | e7578c59e64b4b2cdfa306adbad4f776daea3bff | cc2e15c4ad8f6299b6e3c56ab1a604296de266d4 | refs/heads/master | 2021-01-10T13:30:46.627635 | 2016-01-31T13:51:29 | 2016-01-31T13:51:29 | 50,728,396 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | package Methoden;
public class MaximumVonZahlen {
public int max(int i, int j) {
return java.lang.Math.max(i, j);
}
public double max(double d, double e) {
return java.lang.Math.max(d, e);
}
public static void main(String arg[]) {
MaximumVonZahlen maximum = new MaximumVonZahlen();
System.out.println(maximum.max(5, 4));
System.out.println(maximum.max(5.8, 4.9));
}
}
| [
"cbokeloh@gmail.com"
] | cbokeloh@gmail.com |
5a3be9bc92939e4334bd2c46e7c8e8cb1dba5682 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Gson-10/com.google.gson.internal.bind.ReflectiveTypeAdapterFactory/BBC-F0-opt-30/23/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory_ESTest.java | 4d8a980eacf02e1945e4b52cffe120feb687116a | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 8,517 | java | /*
* This file was automatically generated by EvoSuite
* Sat Oct 23 07:23:45 GMT 2021
*/
package com.google.gson.internal.bind;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import com.google.gson.TypeAdapter;
import com.google.gson.internal.ConstructorConstructor;
import com.google.gson.internal.Excluder;
import com.google.gson.internal.ObjectConstructor;
import com.google.gson.internal.bind.ReflectiveTypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import java.io.BufferedWriter;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.Writer;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.util.HashMap;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.mock.java.io.MockPrintWriter;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class ReflectiveTypeAdapterFactory_ESTest extends ReflectiveTypeAdapterFactory_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
HashMap<String, ReflectiveTypeAdapterFactory.BoundField> hashMap0 = new HashMap<String, ReflectiveTypeAdapterFactory.BoundField>();
ReflectiveTypeAdapterFactory.Adapter<Type> reflectiveTypeAdapterFactory_Adapter0 = new ReflectiveTypeAdapterFactory.Adapter<Type>((ObjectConstructor<Type>) null, hashMap0);
// Undeclared exception!
// try {
reflectiveTypeAdapterFactory_Adapter0.read((JsonReader) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter", e);
// }
}
@Test(timeout = 4000)
public void test1() throws Throwable {
Excluder excluder0 = Excluder.DEFAULT;
// Undeclared exception!
// try {
ReflectiveTypeAdapterFactory.excludeField((Field) null, false, excluder0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.gson.internal.bind.ReflectiveTypeAdapterFactory", e);
// }
}
@Test(timeout = 4000)
public void test2() throws Throwable {
FieldNamingPolicy fieldNamingPolicy0 = FieldNamingPolicy.UPPER_CAMEL_CASE_WITH_SPACES;
Excluder excluder0 = new Excluder();
Gson gson0 = new Gson();
ReflectiveTypeAdapterFactory reflectiveTypeAdapterFactory0 = new ReflectiveTypeAdapterFactory((ConstructorConstructor) null, fieldNamingPolicy0, excluder0);
Class<String> class0 = String.class;
TypeToken<String> typeToken0 = TypeToken.get(class0);
// Undeclared exception!
// try {
reflectiveTypeAdapterFactory0.create(gson0, typeToken0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.gson.internal.bind.ReflectiveTypeAdapterFactory", e);
// }
}
@Test(timeout = 4000)
public void test3() throws Throwable {
HashMap<String, ReflectiveTypeAdapterFactory.BoundField> hashMap0 = new HashMap<String, ReflectiveTypeAdapterFactory.BoundField>();
ReflectiveTypeAdapterFactory.Adapter<Object> reflectiveTypeAdapterFactory_Adapter0 = new ReflectiveTypeAdapterFactory.Adapter<Object>((ObjectConstructor<Object>) null, hashMap0);
Gson gson0 = new Gson();
JsonElement jsonElement0 = gson0.toJsonTree((Object) null);
Object object0 = reflectiveTypeAdapterFactory_Adapter0.fromJsonTree(jsonElement0);
assertNull(object0);
}
@Test(timeout = 4000)
public void test4() throws Throwable {
HashMap<String, ReflectiveTypeAdapterFactory.BoundField> hashMap0 = new HashMap<String, ReflectiveTypeAdapterFactory.BoundField>();
ReflectiveTypeAdapterFactory.Adapter<Object> reflectiveTypeAdapterFactory_Adapter0 = new ReflectiveTypeAdapterFactory.Adapter<Object>((ObjectConstructor<Object>) null, hashMap0);
Boolean boolean0 = Boolean.valueOf(false);
JsonPrimitive jsonPrimitive0 = new JsonPrimitive(boolean0);
// Undeclared exception!
// try {
reflectiveTypeAdapterFactory_Adapter0.fromJsonTree(jsonPrimitive0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter", e);
// }
}
@Test(timeout = 4000)
public void test5() throws Throwable {
HashMap<String, ReflectiveTypeAdapterFactory.BoundField> hashMap0 = new HashMap<String, ReflectiveTypeAdapterFactory.BoundField>();
ReflectiveTypeAdapterFactory.Adapter<Object> reflectiveTypeAdapterFactory_Adapter0 = new ReflectiveTypeAdapterFactory.Adapter<Object>((ObjectConstructor<Object>) null, hashMap0);
Gson gson0 = new Gson();
JsonElement jsonElement0 = gson0.toJsonTree((Object) reflectiveTypeAdapterFactory_Adapter0);
assertTrue(jsonElement0.isJsonObject());
}
@Test(timeout = 4000)
public void test6() throws Throwable {
FieldNamingPolicy fieldNamingPolicy0 = FieldNamingPolicy.UPPER_CAMEL_CASE;
ReflectiveTypeAdapterFactory reflectiveTypeAdapterFactory0 = new ReflectiveTypeAdapterFactory((ConstructorConstructor) null, fieldNamingPolicy0, (Excluder) null);
Gson gson0 = new Gson();
Class<Integer> class0 = Integer.TYPE;
TypeToken<Integer> typeToken0 = TypeToken.get(class0);
TypeAdapter<Integer> typeAdapter0 = reflectiveTypeAdapterFactory0.create(gson0, typeToken0);
assertNull(typeAdapter0);
}
@Test(timeout = 4000)
public void test7() throws Throwable {
Gson gson0 = new Gson();
StringReader stringReader0 = new StringReader("");
MockPrintWriter mockPrintWriter0 = new MockPrintWriter("gJ/f~29T_e4cruJOa8");
BufferedWriter bufferedWriter0 = new BufferedWriter(mockPrintWriter0, 3568);
gson0.toJson((Object) stringReader0, (Appendable) bufferedWriter0);
assertTrue(gson0.htmlSafe());
}
@Test(timeout = 4000)
public void test8() throws Throwable {
HashMap<String, ReflectiveTypeAdapterFactory.BoundField> hashMap0 = new HashMap<String, ReflectiveTypeAdapterFactory.BoundField>();
ReflectiveTypeAdapterFactory.Adapter<Type> reflectiveTypeAdapterFactory_Adapter0 = new ReflectiveTypeAdapterFactory.Adapter<Type>((ObjectConstructor<Type>) null, hashMap0);
ByteArrayOutputStream byteArrayOutputStream0 = new ByteArrayOutputStream();
Charset charset0 = Charset.defaultCharset();
CharsetEncoder charsetEncoder0 = charset0.newEncoder();
OutputStreamWriter outputStreamWriter0 = new OutputStreamWriter(byteArrayOutputStream0, charsetEncoder0);
reflectiveTypeAdapterFactory_Adapter0.toJson((Writer) outputStreamWriter0, (Type) null);
}
@Test(timeout = 4000)
public void test9() throws Throwable {
FieldNamingPolicy fieldNamingPolicy0 = FieldNamingPolicy.IDENTITY;
Excluder excluder0 = Excluder.DEFAULT;
ReflectiveTypeAdapterFactory reflectiveTypeAdapterFactory0 = new ReflectiveTypeAdapterFactory((ConstructorConstructor) null, fieldNamingPolicy0, excluder0);
// Undeclared exception!
// try {
reflectiveTypeAdapterFactory0.excludeField((Field) null, false);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.gson.internal.bind.ReflectiveTypeAdapterFactory", e);
// }
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
a6363f2c5aa0f1446965d5224452dc5ab4a81bf3 | 172463dadd739279ecc9e11d3c2aff910097f1ff | /src/com/advance/MultiThread3/MyThread/MyThread05.java | 7ffe299285564c90a103b44cd8f32e8b957200ec | [] | no_license | mingge12321/Java_Advanced_Knowledge | 2aa44f153b28895e166966d7dd1da3f36eb26ede | 23584e253271f0860c3838872d04690865589cdd | refs/heads/master | 2022-06-23T04:27:26.500643 | 2019-11-03T17:14:09 | 2019-11-03T17:14:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 704 | java | package com.advance.MultiThread3.MyThread;
/**
* @Author: 谷天乐
* @Date: 2019/6/21 11:35
* @Description:
*/
public class MyThread05 extends Thread{
public void run()
{
System.out.println(Thread.currentThread().getName());
}
public static void main(String[] args)
{
MyThread05 mt = new MyThread05();
mt.run();
try
{
for (int i = 0; i < 3; i++)
{
Thread.sleep((int)(Math.random() * 1000));
System.out.println("run = " + Thread.currentThread().getName());
}
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
} | [
"634208959@qq.com"
] | 634208959@qq.com |
1c21d99eb3de4348d33ca2744f53d79d439b00fd | 1661886bc7ec4e827acdd0ed7e4287758a4ccc54 | /srv_unip_pub/src/main/java/com/sa/unip/app/common/ctrlhandler/MsgSendQueueHisPickupGridViewSearchFormHandler.java | 40066dd3e9e5a8b7abb3f0f6bb2c2e18aa2f6b15 | [
"MIT"
] | permissive | zhanght86/iBizSys_unip | baafb4a96920e8321ac6a1b68735bef376b50946 | a22b15ebb069c6a7432e3401bdd500a3ca37250e | refs/heads/master | 2020-04-25T21:20:23.830300 | 2018-01-26T06:08:28 | 2018-01-26T06:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,373 | java | /**
* iBizSys 5.0 机器人生产代码(不要直接修改当前代码)
* http://www.ibizsys.net
*/
package com.sa.unip.app.common.ctrlhandler;
import java.util.ArrayList;
import java.util.List;
import net.ibizsys.paas.util.StringHelper;
import net.ibizsys.paas.web.WebContext;
import net.ibizsys.paas.demodel.DEModelGlobal;
import net.ibizsys.paas.demodel.IDataEntityModel;
import net.ibizsys.paas.service.IService;
import net.ibizsys.paas.service.ServiceGlobal;
import com.sa.unip.app.srv.common.ctrlmodel.MsgSendQueueHisDefaultSearchFormModel;
import net.ibizsys.psrt.srv.common.demodel.MsgSendQueueHisDEModel;
import net.ibizsys.psrt.srv.common.service.MsgSendQueueHisService;
import net.ibizsys.psrt.srv.common.dao.MsgSendQueueHisDAO;
import net.ibizsys.psrt.srv.common.entity.MsgSendQueueHis;
import net.ibizsys.paas.ctrlmodel.ISearchFormModel;
import net.ibizsys.paas.data.DataObject;
import net.ibizsys.paas.data.IDataObject;
import net.ibizsys.paas.web.AjaxActionResult;
import net.ibizsys.paas.web.SDAjaxActionResult;
import net.ibizsys.paas.sysmodel.ISystemRuntime;
import net.ibizsys.paas.ctrlhandler.IFormItemHandler;
import net.ibizsys.paas.ctrlhandler.IFormItemUpdateHandler;
public class MsgSendQueueHisPickupGridViewSearchFormHandler extends net.ibizsys.paas.ctrlhandler.SearchFormHandlerBase {
protected MsgSendQueueHisDefaultSearchFormModel searchformModel = null;
public MsgSendQueueHisPickupGridViewSearchFormHandler() {
super();
}
@Override
protected void onInit() throws Exception {
searchformModel = (MsgSendQueueHisDefaultSearchFormModel)this.getViewController().getCtrlModel("searchform");
super.onInit();
}
@Override
protected ISearchFormModel getSearchFormModel() {
return this.getRealSearchFormModel();
}
protected MsgSendQueueHisDefaultSearchFormModel getRealSearchFormModel() {
return this.searchformModel ;
}
protected MsgSendQueueHisService getRealService() {
return (MsgSendQueueHisService)this.getViewController().getService();
}
/**
* 准备部件成员处理对象
* @throws Exception
*/
@Override
protected void prepareCtrlItemHandlers()throws Exception {
super.prepareCtrlItemHandlers();
ISystemRuntime iSystemRuntime = (ISystemRuntime)this.getSystemModel();
}
} | [
"dev@ibizsys.net"
] | dev@ibizsys.net |
5664bc262c478e53f950ae64c56440661336602d | a03e36e6ae4eb48f12b137439e88f4f6b8e26f83 | /src/main/java/sk/palko/tournament/dto/ErrorMessageDto.java | eb603164a81e9edc6c62982c9c87e83fb067064c | [] | no_license | janpalko/tournament | 59ca750d42d95f4364047bfcbbae918f392f8ecc | f42371385305f4b038f9e3f554ba085f8d14f800 | refs/heads/main | 2023-06-12T08:24:21.939630 | 2021-06-24T06:41:53 | 2021-06-24T06:41:53 | 378,116,864 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 312 | java | package sk.palko.tournament.dto;
import org.springframework.http.HttpStatus;
import java.util.List;
public record ErrorMessageDto(int status, HttpStatus error, List<String> messages) {
public ErrorMessageDto(int status, HttpStatus error, String message) {
this(status, error, List.of(message));
}
}
| [
"jan.palko@gmail.com"
] | jan.palko@gmail.com |
9406d376f81330d2a490c7121e61d0892872260a | 870e95a1b12aa4e2a451cde1a6c2fcc1031d784d | /it.camera.hackathon.textmining/src/it/camera/hackathon/parsing/CsvParser.java | 10f7c8c70657927469fbee78984234b575b901f9 | [
"CC-BY-4.0",
"CC-BY-2.0"
] | permissive | JCCorreale/Hackathon-Code4Italy | 0d7d08ca2c462ed6670a516f5f0f2b5dfc917322 | 9187514961cbb20d68b7f3726664cc4adea9ead3 | refs/heads/master | 2021-01-19T08:43:46.378686 | 2014-06-06T09:55:39 | 2014-06-06T09:55:39 | 19,884,575 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,130 | java | package it.camera.hackathon.parsing;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public class CsvParser implements IRowsWithHeaderParser {
private SimpleSingleRowCsvParser headerParser;
private SingleRowCsvParser rowParser;
private boolean trim;
public CsvParser() {
this(true);
}
public CsvParser(boolean b) {
this.trim = b;
this.headerParser = new SimpleSingleRowCsvParser(this.trim);
}
@Override
public IParser<String, Map<String, String>> getRowParser() {
return this.rowParser;
}
@Override
public Iterable<Map<String, String>> parse(String input) {
StringRowsParser<String> splitParser = new StringRowsParser<>(new IdentityParser<String>());
Iterable<String> rows = splitParser.parse(input);
Iterator<String> i = rows.iterator();
String[] header = headerParser.parse(i.next());
rowParser = new SingleRowCsvParser(header, trim);
List<Map<String, String>> res = new ArrayList<>();
String row;
while(i.hasNext()) {
row = i.next();
if(!row.equals(""))
res.add(rowParser.parse(row));
}
return res;
}
}
| [
"thierry.spetebroot@gmail.com"
] | thierry.spetebroot@gmail.com |
935ba4beb9aefb50c07d6474d9f913b1261a0cae | 1c013ec33cbf36cbca69403fe5886fb4b136a3d6 | /src/testcases/Collections_Test.java | 57822c0213bd3998101556307c35758197915070 | [] | no_license | pallavigopinath/GitJenkins | f9e6e8edaf7fcf3ecd5b2a6a67e226baf3e9a5f8 | 0d49487404b00162e43b0b12d2c0173e4113ce30 | refs/heads/master | 2021-01-23T06:34:32.671481 | 2017-03-27T19:38:58 | 2017-03-27T19:38:58 | 86,375,490 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 372 | java | package testcases;
import java.util.Arrays;
public class Collections_Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
Object[][] data=new Object[2][3];
data[0][0]="User1";
data[0][1]="password1";
data[0][2]=98007;
data[1][0]="User2";
data[1][1]="password2";
data[1][2]=98004;
Arrays.asList(data);
}
}
| [
"sreepadas@outlook.com"
] | sreepadas@outlook.com |
4e1180d74403f2dcae2be8e22cf0d561304b6a85 | 6f6fd51a6f298242318f0538787b6416916e7722 | /JDK7-45/src/main/java/com/hmz/source/org/omg/CosNaming/NamingContextExt.java | dcc9ec151acf787a979935e4888f3bf7359ec3ef | [] | no_license | houmaozheng/JDKSourceProject | 5f20578c46ad0758a1e2f45d36380db0bcd46f05 | 699b4cce980371be0d038a06ce3ea617dacd612c | refs/heads/master | 2023-06-16T21:48:46.957538 | 2021-07-15T17:01:46 | 2021-07-15T17:01:46 | 385,537,090 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 962 | java | package org.omg.CosNaming;
/**
* org/omg/CosNaming/NamingContextExt.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
* Tuesday, October 8, 2013 5:44:45 AM PDT
*/
/**
* <code>NamingContextExt</code> is the extension of <code>NamingContext</code>
* which
* contains a set of name bindings in which each name is unique and is
* part of Interoperable Naming Service.
* Different names can be bound to an object in the same or different
* contexts at the same time. Using <tt>NamingContextExt</tt>, you can use
* URL-based names to bind and resolve. <p>
*
* See <a href="http://www.omg.org/technology/documents/formal/naming_service.htm">
* CORBA COS
* Naming Specification.</a>
*/
public interface NamingContextExt extends NamingContextExtOperations, org.omg.CosNaming.NamingContext, org.omg.CORBA.portable.IDLEntity
{
} // interface NamingContextExt
| [
"houmaozheng@126.com"
] | houmaozheng@126.com |
a54198229d50335a69cda8256b181fcc0fd174fe | 170a018b6c5d7b80e42deabc42778e74a16e091e | /java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/supplierproduct/SupplierProductCommand.java | 260bbac410f6f31207613c78dc04a8d9d0ec5a57 | [] | no_license | windygu/wms-2 | 39cf350bf773510268e340d05ec98541cee56577 | 6cc0b35d057a02b4f2884442fee1979a2ed7aa5f | refs/heads/master | 2020-04-22T15:05:09.492570 | 2018-09-13T05:33:49 | 2018-09-13T05:33:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,861 | java | package org.dddml.wms.domain.supplierproduct;
import java.util.*;
import java.util.Date;
import org.dddml.wms.domain.*;
import org.dddml.wms.domain.Command;
import org.dddml.wms.specialization.DomainError;
public interface SupplierProductCommand extends Command
{
SupplierProductId getSupplierProductId();
void setSupplierProductId(SupplierProductId supplierProductId);
Long getVersion();
void setVersion(Long version);
static void throwOnInvalidStateTransition(SupplierProductState state, Command c) {
if (state.getVersion() == null)
{
if (isCommandCreate((SupplierProductCommand)c))
{
return;
}
throw DomainError.named("premature", "Can't do anything to unexistent aggregate");
}
if (isCommandCreate((SupplierProductCommand)c))
throw DomainError.named("rebirth", "Can't create aggregate that already exists");
}
static boolean isCommandCreate(SupplierProductCommand c) {
return ((c instanceof SupplierProductCommand.CreateSupplierProduct)
&& (COMMAND_TYPE_CREATE.equals(c.getCommandType()) || c.getVersion().equals(SupplierProductState.VERSION_NULL)));
}
interface CreateOrMergePatchSupplierProduct extends SupplierProductCommand
{
java.sql.Timestamp getAvailableThruDate();
void setAvailableThruDate(java.sql.Timestamp availableThruDate);
String getSupplierPrefOrderId();
void setSupplierPrefOrderId(String supplierPrefOrderId);
String getSupplierRatingTypeId();
void setSupplierRatingTypeId(String supplierRatingTypeId);
java.math.BigDecimal getStandardLeadTimeDays();
void setStandardLeadTimeDays(java.math.BigDecimal standardLeadTimeDays);
java.math.BigDecimal getManufacturingLeadTimeDays();
void setManufacturingLeadTimeDays(java.math.BigDecimal manufacturingLeadTimeDays);
java.math.BigDecimal getDeliveryLeadTimeDays();
void setDeliveryLeadTimeDays(java.math.BigDecimal deliveryLeadTimeDays);
String getQuantityUomId();
void setQuantityUomId(String quantityUomId);
java.math.BigDecimal getLastPrice();
void setLastPrice(java.math.BigDecimal lastPrice);
java.math.BigDecimal getShippingPrice();
void setShippingPrice(java.math.BigDecimal shippingPrice);
String getExternalProductName();
void setExternalProductName(String externalProductName);
String getExternalProductId();
void setExternalProductId(String externalProductId);
Boolean getCanDropShip();
void setCanDropShip(Boolean canDropShip);
String getComments();
void setComments(String comments);
Boolean getActive();
void setActive(Boolean active);
}
interface CreateSupplierProduct extends CreateOrMergePatchSupplierProduct
{
}
interface MergePatchSupplierProduct extends CreateOrMergePatchSupplierProduct
{
Boolean getIsPropertyAvailableThruDateRemoved();
void setIsPropertyAvailableThruDateRemoved(Boolean removed);
Boolean getIsPropertySupplierPrefOrderIdRemoved();
void setIsPropertySupplierPrefOrderIdRemoved(Boolean removed);
Boolean getIsPropertySupplierRatingTypeIdRemoved();
void setIsPropertySupplierRatingTypeIdRemoved(Boolean removed);
Boolean getIsPropertyStandardLeadTimeDaysRemoved();
void setIsPropertyStandardLeadTimeDaysRemoved(Boolean removed);
Boolean getIsPropertyManufacturingLeadTimeDaysRemoved();
void setIsPropertyManufacturingLeadTimeDaysRemoved(Boolean removed);
Boolean getIsPropertyDeliveryLeadTimeDaysRemoved();
void setIsPropertyDeliveryLeadTimeDaysRemoved(Boolean removed);
Boolean getIsPropertyQuantityUomIdRemoved();
void setIsPropertyQuantityUomIdRemoved(Boolean removed);
Boolean getIsPropertyLastPriceRemoved();
void setIsPropertyLastPriceRemoved(Boolean removed);
Boolean getIsPropertyShippingPriceRemoved();
void setIsPropertyShippingPriceRemoved(Boolean removed);
Boolean getIsPropertyExternalProductNameRemoved();
void setIsPropertyExternalProductNameRemoved(Boolean removed);
Boolean getIsPropertyExternalProductIdRemoved();
void setIsPropertyExternalProductIdRemoved(Boolean removed);
Boolean getIsPropertyCanDropShipRemoved();
void setIsPropertyCanDropShipRemoved(Boolean removed);
Boolean getIsPropertyCommentsRemoved();
void setIsPropertyCommentsRemoved(Boolean removed);
Boolean getIsPropertyActiveRemoved();
void setIsPropertyActiveRemoved(Boolean removed);
}
interface DeleteSupplierProduct extends SupplierProductCommand
{
}
}
| [
"yangjiefeng@gmail.com"
] | yangjiefeng@gmail.com |
962ef50cd819d56a0266bb8b37d5c1db659474e8 | a5c5321e55a90d3c5bf21d2e5731b04495f7c06c | /src/javafxatm1/FXMLDocumentController.java | 2e9119b5c642a5f183494bf4198abf84240b0f32 | [] | no_license | ikhsan1303/ATM | 7565414b318bc7d352e043c0664afec40f9f1116 | fa3f23483141c4cd95a2ab2e2d558ccf916994dd | refs/heads/master | 2021-05-15T18:32:03.589673 | 2017-10-27T00:58:50 | 2017-10-27T00:58:50 | 107,638,641 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,396 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javafxatm1;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.PasswordField;
import javafx.stage.Stage;
import javax.swing.JOptionPane;
/**
* FXML Controller class
*
* @author Ikhsan
*/
public class FXMLDocumentController implements Initializable {
@FXML
private PasswordField PIN;
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
String Pin = "2309";
String pin = "";
int kesempatan = 3;
int tmp;
@FXML
private void satu(ActionEvent event) {
pin += "1";
PIN.setText(pin);
}
@FXML
private void dua(ActionEvent event) {
pin += "2";
PIN.setText(pin);
}
@FXML
private void tiga(ActionEvent event) {
pin += "3";
PIN.setText(pin);
}
@FXML
private void empat(ActionEvent event) {
pin += "4";
PIN.setText(pin);
}
@FXML
private void lima(ActionEvent event) {
pin += "5";
PIN.setText(pin);
}
@FXML
private void enam(ActionEvent event) {
pin += "6";
PIN.setText(pin);
}
@FXML
private void tujuh(ActionEvent event) {
pin += "7";
PIN.setText(pin);
}
@FXML
private void delapan(ActionEvent event) {
pin += "8";
PIN.setText(pin);
}
@FXML
private void sembilan(ActionEvent event) {
pin += "9";
PIN.setText(pin);
}
@FXML
private void hapus(ActionEvent event) {
pin = "";
PIN.setText(pin);
}
@FXML
private void sepuluh(ActionEvent event) {
pin += "0";
PIN.setText(pin);
}
@FXML
private void proses(ActionEvent event) {
if (pin.equals(Pin)){
try {
// Hide this current window (if this is what you want)
((Node)(event.getSource())).getScene().getWindow().hide();
// Load the new fxml
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("FXMLHome.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 600, 400);
// Create new stage (window), then set the new Scene
Stage stage = new Stage();
stage.setScene(scene);
stage.setTitle("ATM");
stage.show();
} catch (IOException e) {
System.out.println("Failed to create new Window." + e);
}
}else{
kesempatan -= 1;
JOptionPane.showMessageDialog(null, "PIN SALAH\nKesempatan Tinggal"+kesempatan+"kali");
PIN.setText("");
pin = "";
if (kesempatan == 0){
System.exit(0);
}
}
}
}
| [
"Ikhsan@Bayooong"
] | Ikhsan@Bayooong |
70a118459a9782f930987e2c72defc11027cd47e | 786f6892c159a3046dd58657b43b1e17696119bb | /src/geofence/tests/GetList.java | 192fa08fe5abc21fbddcc224aefcc68cd2317a5a | [] | no_license | laithepena/GeoFence | e7c3706d973ae37038da3cba5ca8010c7d5c65c1 | 0849526ca7982378bc5e2aa0683a46850b82eb41 | refs/heads/master | 2020-07-05T21:24:47.723687 | 2019-08-16T19:10:02 | 2019-08-16T19:10:02 | 202,781,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,186 | java | package geofence.tests;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import static org.hamcrest.core.IsEqual.*;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import geofence.beans.Investigation;
import geofence.utils.JsonToMap;
import geofence.utils.UtilMethods;
import io.restassured.RestAssured;
import io.restassured.http.Method;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import io.restassured.specification.RequestSpecification;
public class GetList {
public static void main(String[] args) throws IOException {
//io.restassured.response.Response response = UtilMethods.doGetRequest("http://geofence.ci.eng.k8s.iqidev.labs.att.com:30080/geofence/investigations/52516302354707749997861");
// System.out.println(response.asString());
//"http://geofence.ci.eng.k8s.iqidev.labs.att.com:30080/geofence/investigations?market=North%20Texas&submarket=Dallas%20Ft.%20Worth"
String string = "North Texas";
String encodedString = URLEncoder.encode(string, "UTF-8");
// System.out.println("Encoded String: " + encodedString);
// String uri="http://geofence.ci.eng.k8s.iqidev.labs.att.com:30080/geofence/investigations?attId=ms159v";
String uri="http://geofence.ci.eng.k8s.iqidev.labs.att.com:30080/geofence/investigations?market=North%20Texas&submarket=Dallas%20Ft.%20Worth";
// String uri="http://geofence.ci.eng.k8s.iqidev.labs.att.com:30080/geofence/investigations?market=North";
// RestAssured.baseURI = uri;
/*
* RequestSpecification httpRequest = RestAssured.given(); //
* httpRequest.param("market", "North Texas"); //param("submarket","ALL");
* Response Response response=httpRequest.request(Method.GET);
*/
Map<String, String> param=JsonToMap.paramToMap(uri);
//String uri = "";
String[] ur=uri.split("\\?");
//Map<String, String> response_map=JsonToMap.paramToMap(uri); // param("market", "North Texas")
RestAssured.baseURI =ur[0] ;//+URLEncoder.encode(ur[1]);
RequestSpecification httpRequest =
RestAssured.given().queryParams(param);
//param("submarket","ALL"); Response
Response response=httpRequest.request(Method.GET);
//System.out.println(response.asString());
System.out.println(httpRequest.get().asString());
//Investigation Inv =response.jsonPath().getObject("inv", Investigation.class);
// List<Investigation> allInvestigation = jsonPathEvaluator.getList("Investigations", Investigation.class);
String r=CheckParamInList(response.asString(),uri);
System.out.println(r);
}
public static String CheckParamInList(String response_string, String uri) throws IOException {
// Map<String, String> param =JsonToMap.paramToMap(uri);
uri = URLDecoder.decode(uri, "UTF-8");
//System.out.println(uri);
String[] arr1= uri.split("\\?");
// System.out.println(arr[0]);
String[] arr=arr1[1].split("\\&");
Map <String,String> param=new HashMap<>();
for(String s:arr) {
// System.out.println("------ "+s);
String[] arr_param =s.split("\\=");
// System.out.println(" +++++++ "+arr_param[0]+" "+arr_param[1]);
// arr_param[1]=arr_param[1].replace("\\%20", " ");
param.put( arr_param[0], arr_param[1]);
//System.out.println(URLEncoder.encode(arr_param[1]));
}
JsonParser jsonParser = new JsonParser();
JsonArray jsonArray1 = (JsonArray) jsonParser.parse(response_string);
int jsonarray_length1 = jsonArray1.size();
String res1="";boolean flag=true;
int Count=0; int total=0;
for (int i = 0; i < jsonarray_length1; i++) {
JsonElement jelm = jsonArray1.get(i);
Map<String, Object> response_map=JsonToMap.jsonToInvestigationMap( jelm.toString());
//System.out.println(jelm.toString());
// for (Entry<String, String> ent : param.entrySet()) {
// System.out.println("Value = " + value);
// System.out.println(param.values().toString().trim());
for(String s:param.values()) {
if(!response_map.containsValue(s)) {
// System.out.println(response_map.values());
// System.out.println("======"+param.values());
res1=res1+" \n ### FAIL "+ param.values()+" "+" doesnot exists in " +response_map.values() ;
Count++;
}
total++;
}
/*
* for(String v:param.values()) { System.out.println("V = " + v);
* if(v.contains(value.toString())) { System.out.println("---- "+value);
* Count++; System.out.println(v);
*
* } }
*/
// }
}
System.out.println(res1+"\n Total Mismatches ="+Count+" Total="+total);
// System.out.println("POMPU ------"+Count);
return res1;
}
private static Map<String, String> paramToMap(String uri) throws IOException {
uri = URLDecoder.decode(uri, "UTF-8");
//System.out.println(uri);
String[] arr1= uri.split("\\?");
// System.out.println(arr[0]);
String[] arr=arr1[1].split("\\&");
Map <String,String> param=new HashMap<>();
for(String s:arr) {
// System.out.println("------ "+s);
String[] arr_param =s.split("\\=");
// System.out.println(" +++++++ "+arr_param[0]+" "+arr_param[1]);
// arr_param[1]=arr_param[1].replace("\\%20", " ");
param.put( arr_param[0], arr_param[1]);
//System.out.println(URLEncoder.encode(arr_param[1]));
}
return param;
}
}
| [
"laithepena@gmail.com"
] | laithepena@gmail.com |
65a57ee3efb8fbe12bc40e52b78c77bae1ae5376 | e6f1481b08c519feae212c1cf0103934bad413cb | /src/org/semanticweb/swse/econs/cli/CheckSimilarities.java | 5f1ce1316aeac96b6d27bc745d1926c95fe3c199 | [] | no_license | aidhog/swse | 826aca195a5dda05fddac305e8a5b17df8a3b4ce | b4e9fed3f525973bc0ffb3104152a7f313726fb2 | refs/heads/master | 2023-01-19T01:40:56.061727 | 2020-11-21T20:01:10 | 2020-11-21T20:01:10 | 314,888,556 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,607 | java | package org.semanticweb.swse.econs.cli;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.Vector;
import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.semanticweb.swse.econs.sim.RMIEconsSimServer.PredStats;
import org.semanticweb.swse.econs.sim.utils.RemoteScatter;
import org.semanticweb.yars.nx.Node;
import org.semanticweb.yars.nx.Nodes;
import org.semanticweb.yars.nx.parser.NxParser;
/**
* Main method to conduct distributed reasoning using remote reasoners
* controllable via RMI.
*
* @author aidhog
*/
public class CheckSimilarities {
private final static Logger _log = Logger.getLogger(CheckSimilarities.class.getSimpleName());
public static final int TOP_K = 10;
public static void main(String args[]) throws Exception{
NxParser.DEFAULT_PARSE_DTS = false;
Options options = new Options();
Option inO = new Option("i", "similarities to extract");
inO.setArgs(1);
inO.setRequired(true);
options.addOption(inO);
Option dO = new Option("d", "directory of raw similarities");
dO.setArgs(1);
dO.setRequired(true);
options.addOption(dO);
Option helpO = new Option("h", "print help");
options.addOption(helpO);
CommandLineParser parser = new BasicParser();
CommandLine cmd = null;
try {
cmd = parser.parse(options, args);
} catch (org.apache.commons.cli.ParseException e) {
System.err.println("***ERROR: " + e.getClass() + ": " + e.getMessage());
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("parameters:", options );
return;
}
if (cmd.hasOption("h")) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("parameters:", options );
return;
}
InputStream is = new FileInputStream(cmd.getOptionValue("i"));
NxParser nxp = new NxParser(is);
HashSet<Nodes> sims = new HashSet<Nodes>();
while(nxp.hasNext()){
Node[] next = nxp.next();
sims.add(new Nodes(next[0], next[1]));
}
is.close();
String dir = cmd.getOptionValue("d");
Vector<String> files = new Vector<String>();
File d = new File(dir);
for(File f:d.listFiles()){
if(f.getName().endsWith(RemoteScatter.GATHER)){
files.add(f.getAbsolutePath());
_log.info("Adding "+f.getAbsoluteFile()+" to check...");
}
}
for(String f:files){
is = new GZIPInputStream(new FileInputStream(f));
nxp = new NxParser(is);
while(nxp.hasNext()){
Node[] next = nxp.next();
Nodes check = new Nodes(next[0], next[1]);
if(sims.contains(check)){
_log.info(Nodes.toN3(next));
}
}
is.close();
}
}
public static class PredStatComparator implements Comparator<Map.Entry<Node,PredStats>>{
public int compare(Entry<Node, PredStats> arg0,
Entry<Node, PredStats> arg1) {
int comp = Double.compare(arg0.getValue().getAverage(), arg1.getValue().getAverage());
if(comp!=0){
return comp;
}
return arg0.getKey().compareTo(arg1.getKey());
}
}
}
| [
"aidhog@gmail.com"
] | aidhog@gmail.com |
2dbb8dc238375cd68633876c81d6fdb67286a5df | a03534c29cbc4065857a10ccf0f9b6016b0526e3 | /src/main/java/org/springframework/data/keyvalue/core/UncategorizedKeyValueException.java | 47df71324e4f2b7d0c946f24d30224915824ac51 | [] | no_license | franciscospaeth/spring-data-keyvalue | 6bcc286c63238438a9be8bc3b84eb9bdc777d1c1 | 5f62882a3edc5690fe62dd3fc7dc801ceaa9dd60 | refs/heads/master | 2021-01-15T11:24:21.263729 | 2014-11-27T13:29:50 | 2014-11-27T13:30:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,036 | java | /*
* Copyright 2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.keyvalue.core;
import org.springframework.dao.UncategorizedDataAccessException;
/**
* @author Christoph Strobl
* @since 1.10
*/
public class UncategorizedKeyValueException extends UncategorizedDataAccessException {
private static final long serialVersionUID = -8087116071859122297L;
public UncategorizedKeyValueException(String msg, Throwable cause) {
super(msg, cause);
}
}
| [
"info@olivergierke.de"
] | info@olivergierke.de |
2a0a0d1f17a94ee3ed6fa8bc0bafe83db6e89d96 | 205e7175c428ff9d83d8bded152d22de92c8b030 | /mpos_base/src/main/java/com/site/core/mybatis/SQLHelp.java | 9ac95dfc376f07e2c61dbae630818af28a9df0c0 | [] | no_license | langrs/mpos | e0039ce479a052a9ff21b9ba55b96c447f75561c | 837c536c527179eba1bec6f7c954ea9a6d18ea0f | refs/heads/master | 2020-03-23T20:20:10.035520 | 2018-07-23T15:41:25 | 2018-07-23T15:42:16 | 142,035,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,289 | java | /*
* Copyright (c) 2012-2013, Poplar Yfyang 杨友峰 (poplar1123@gmail.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.site.core.mybatis;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.scripting.defaults.DefaultParameterHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.datasource.DataSourceUtils;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* 统计总数,分页插件中使用。
* @author ray
*/
public class SQLHelp {
private static Logger logger = LoggerFactory.getLogger(SQLHelp.class);
/**
* 查询总纪录数
*
* @param sql SQL语句
* @param mappedStatement mapped
* @param parameterObject 参数
* @param boundSql boundSql
* @param dialect database dialect
* @return 总记录数
* @throws SQLException sql查询错误
*/
public static int getCount(final String sql,
final MappedStatement mappedStatement, final Object parameterObject,
final BoundSql boundSql, Dialect dialect) throws SQLException {
final String count_sql = dialect.getCountString(sql);
logger.debug("Total count SQL [{}] ", count_sql);
logger.debug("Total count Parameters: {} ", parameterObject);
DataSource dataSource=mappedStatement.getConfiguration().getEnvironment().getDataSource();
Connection connection= DataSourceUtils.getConnection(dataSource);
PreparedStatement countStmt = null;
ResultSet rs = null;
try {
countStmt = connection.prepareStatement(count_sql);
//Page SQL和Count SQL的参数是一样的,在绑定参数时可以使用一样的boundSql
DefaultParameterHandler handler = new DefaultParameterHandler(mappedStatement,parameterObject,boundSql);
handler.setParameters(countStmt);
rs = countStmt.executeQuery();
int count = 0;
if (rs.next()) {
count = rs.getInt(1);
}
logger.debug("Total count: {}", count);
return count;
} finally {
try {
if (rs != null) {
rs.close();
}
} finally {
try {
if (countStmt != null) {
countStmt.close();
}
} finally {
DataSourceUtils.releaseConnection(connection,dataSource);
}
}
}
}
} | [
"27617839@qq.com"
] | 27617839@qq.com |
a1c7f6fb7bff0b0c8ec7e185523dfe3621dfd5c3 | bfe3b5724cddcdef5966bec76d09e8ad3fe320b4 | /src/main/java/com/hyperiongray/sitehound/backend/model/KeywordCrawledUrl.java | 6ee2f5cf8e729469adb42080a87cfee51141d659 | [
"Apache-2.0"
] | permissive | nyimbi/sitehound-backend | 79136f33ddb638dadd2a52addce04afd5db75944 | 685d56b8f0442a87491f7136c0a1c3c8b1f0a057 | refs/heads/master | 2020-12-30T11:29:24.369908 | 2017-03-23T16:09:03 | 2017-03-23T16:09:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 836 | java | package com.hyperiongray.sitehound.backend.model;
import com.hyperiongray.sitehound.backend.kafka.api.dto.Metadata;
import com.hyperiongray.sitehound.backend.service.crawler.Constants;
/**
* Created by tomas on 11/18/15.
*/
public class KeywordCrawledUrl extends CrawledUrl{
private Boolean relevant;
private Constants.CrawlEntityType crawlEntityType;
public KeywordCrawledUrl(String url, Metadata metadata, Constants.CrawlerResult crawlerResult){
super(url, metadata, crawlerResult);
}
public Boolean getRelevant(){
return relevant;
}
public void setRelevant(Boolean relevant){
this.relevant=relevant;
}
public Constants.CrawlEntityType getCrawlEntityType(){
return crawlEntityType;
}
public void setCrawlEntityType(Constants.CrawlEntityType crawlEntityType){
this.crawlEntityType=crawlEntityType;
}
}
| [
"fornarat@gmail.com"
] | fornarat@gmail.com |
10978d55b292074590cbacb6153681cf9f98558d | 89a7f2423555966bf5ac30e9e51d6be821c730c6 | /app/src/main/java/com/example/userslocation/MapsActivity.java | 03abe8438350c92419064678556ee7d178561f38 | [] | no_license | t-suman/UsersLocation | 0711d39b888eedf59b632f88fd75b0833c6ecfe8 | 6d9f7ae281fd68f75dc23a9106b5ddda31c6a8f4 | refs/heads/master | 2020-05-23T14:49:47.266722 | 2019-05-15T11:38:37 | 2019-05-15T11:38:37 | 186,814,006 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,237 | java | package com.example.userslocation;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.PermissionChecker;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
LocationManager location_manager;
LocationListener location_listner;
Boolean b=true;
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if(requestCode==1 && grantResults.length>0 && grantResults[0]==PackageManager.PERMISSION_GRANTED)
if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){
Location lastKnownLocation=location_manager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
LatLng user_Location = new LatLng(lastKnownLocation.getLatitude(),lastKnownLocation.getLongitude());
mMap.clear();
b=false;
mMap.addMarker(new MarkerOptions().position(user_Location).title("Your Location"));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_Location,6));
location_manager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,location_listner);
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
location_manager=(LocationManager)this.getSystemService(Context.LOCATION_SERVICE);
location_listner=new LocationListener() {
@Override
public void onLocationChanged(Location location) {
LatLng user_Location = new LatLng(location.getLatitude(),location.getLongitude());
mMap.clear();
mMap.addMarker(new MarkerOptions().position(user_Location).title("Your Location"));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_Location,6));
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {}
@Override
public void onProviderEnabled(String provider) {}
@Override
public void onProviderDisabled(String provider) {}
};
//if(Build.VERSION.SDK_INT>=23){
if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){
if(b){
Location lastKnownLocation=location_manager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
LatLng user_Location = new LatLng(lastKnownLocation.getLatitude(),lastKnownLocation.getLongitude());
mMap.clear();
mMap.addMarker(new MarkerOptions().position(user_Location).title("Your Location"));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_Location,6));
b=false;
}
location_manager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,location_listner);
}
else {
ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.ACCESS_FINE_LOCATION},1);
}
}
/*else
{
if(PermissionChecker.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)==PermissionChecker.PERMISSION_GRANTED) {
location_manager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, location_listner);
Location lastKnownLocation = location_manager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
LatLng user_Location = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());
mMap.clear();
mMap.addMarker(new MarkerOptions().position(user_Location).title("Your Location"));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_Location, 6));
}
else {
}
}*/
//}
}
| [
"thakursuman705@gmail.com"
] | thakursuman705@gmail.com |
bae14788fd1e164a0d7597f6ccdf3a60e8fe6d34 | 56575269b6403928e410767b9538540de6f9b011 | /mytest/src/main/java/com/mkt/mytest/admin/persist/dao/impl/GenericHibernateDaoImpl.java | 54031c00ac655ce29f13c1b79b2cbde7ae8a70a3 | [] | no_license | rockthescorpian3/mytest | 6b93f9e10c1f8b8de29a96a3f596c2933b6a8493 | 9159607e721c93a1e23a1c1cb281fa9c7b19f7b3 | refs/heads/master | 2020-06-19T22:25:50.434545 | 2016-11-21T20:20:02 | 2016-11-21T20:20:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 330 | java | package com.mkt.mytest.admin.persist.dao.impl;
import com.mkt.mytest.admin.persist.dao.GenericDao;
import com.mkt.mytest.base.AbstractHibernateDao;
import com.mkt.mytest.base.PersistenceEntity;
public class GenericHibernateDaoImpl<T extends PersistenceEntity> extends AbstractHibernateDao< T > implements GenericDao< T > {
}
| [
"manjub4u58@gmail.com"
] | manjub4u58@gmail.com |
5af3998141cce5f766d69b8a3f1ec57c20cac3d6 | 02002ceecb945b5e0dae3d4be70589b1ef72af29 | /src/com/ombda/mathx/expressions/BitShiftRight.java | 4813723608d9b225642be15f0f4c87b6fe6990ae | [] | no_license | lmrezac/MathEx4.0 | bb2358313dfdd24b83b73f97776864bad22b5a68 | 9064b091262b281ba20a1b529733fc6e166001c3 | refs/heads/master | 2021-01-11T13:40:33.233457 | 2017-06-22T02:29:59 | 2017-06-22T02:29:59 | 95,061,863 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 464 | java | package com.ombda.mathx.expressions;
import com.ombda.mathx.Position;
import com.ombda.mathx.Scope;
import com.ombda.mathx.values.NumberValue;
import com.ombda.mathx.values.Value;
public class BitShiftRight extends BitShift{
public BitShiftRight(Position p, Expression l, Expression r){
super(p, l, r);
operator = ">>";
}
@Override
public Value eval(Scope scope){
return new NumberValue(getInt(left.eval(scope)) >> getInt(right.eval(scope)));
}
}
| [
"lucas.m.rezac@gmail.com"
] | lucas.m.rezac@gmail.com |
b460530422571ad4ac842f2799c6cc730d850b93 | 2198c41b0756e3589fa28bdfa7fd3e0305a94227 | /ACME_BANK/ACME_BANK-war/src/java/com/ACME/entities/Homeloan.java | a2e1889d47c2bddf5d95f3fc1463c6e152d056fe | [] | no_license | wilkinsleung0712/EF | 7db9da77cbf3b0701994482abdb789309673c690 | 44898b78d2f880202912afc83fa89a01eb5ac09e | refs/heads/master | 2021-01-25T12:01:50.476422 | 2014-03-04T11:12:55 | 2014-03-04T11:12:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,462 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ACME.entities;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author WEIQIANG LIANG
*/
@Entity
@Table(name = "homeloan", catalog = "acme_bank", schema = "")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Homeloan.findAll", query = "SELECT h FROM Homeloan h"),
@NamedQuery(name = "Homeloan.findByCId", query = "SELECT h FROM Homeloan h WHERE h.cId = :cId"),
@NamedQuery(name = "Homeloan.findByAccNum", query = "SELECT h FROM Homeloan h WHERE h.accNum = :accNum"),
@NamedQuery(name = "Homeloan.findByAmountBorrowed", query = "SELECT h FROM Homeloan h WHERE h.amountBorrowed = :amountBorrowed"),
@NamedQuery(name = "Homeloan.findByAmountRepayed", query = "SELECT h FROM Homeloan h WHERE h.amountRepayed = :amountRepayed")})
public class Homeloan implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "C_ID")
private Integer cId;
@Id
@Basic(optional = false)
@NotNull
@Column(name = "AccNum")
private Integer accNum;
// @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
@Column(name = "AmountBorrowed")
private BigDecimal amountBorrowed;
@Column(name = "AmountRepayed")
private BigDecimal amountRepayed;
public Homeloan() {
}
public Homeloan(Integer accNum) {
this.accNum = accNum;
}
public Integer getCId() {
return cId;
}
public void setCId(Integer cId) {
this.cId = cId;
}
public Integer getAccNum() {
return accNum;
}
public void setAccNum(Integer accNum) {
this.accNum = accNum;
}
public BigDecimal getAmountBorrowed() {
return amountBorrowed;
}
public void setAmountBorrowed(BigDecimal amountBorrowed) {
this.amountBorrowed = amountBorrowed;
}
public BigDecimal getAmountRepayed() {
return amountRepayed;
}
public void setAmountRepayed(BigDecimal amountRepayed) {
this.amountRepayed = amountRepayed;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accNum != null ? accNum.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Homeloan)) {
return false;
}
Homeloan other = (Homeloan) object;
if ((this.accNum == null && other.accNum != null) || (this.accNum != null && !this.accNum.equals(other.accNum))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.ACME.entities.Homeloan[ accNum=" + accNum + " ]";
}
}
| [
"wilkinsweiqiangliang@gmail.com"
] | wilkinsweiqiangliang@gmail.com |
ae10a5f40065cae106e8d3f55e152367b20d56de | 6f83e4307f02823f44be932b362a4750fa8b9fde | /group09/790466157/src/com/coding/basic/stack/StackUtil.java | 8af0a1c13b0168300779b143aaf7873b9c76c366 | [] | no_license | dracome/coding2017 | 423b49282d4ffcf68249abc5517a65db3940de0e | 0070068ebe8c74b023c7a794dfb12a4545fdbd7c | refs/heads/master | 2021-01-19T10:14:06.014506 | 2017-05-08T13:59:19 | 2017-05-08T13:59:19 | 82,178,329 | 0 | 20 | null | 2017-02-22T15:08:23 | 2017-02-16T12:29:31 | Java | UTF-8 | Java | false | false | 2,487 | java | package com.coding.basic.stack;
public class StackUtil {
/**
* 假设栈中的元素是Integer, 从栈顶到栈底是 : 5,4,3,2,1 调用该方法后, 元素次序变为: 1,2,3,4,5
* 注意:只能使用Stack的基本操作,即push,pop,peek,isEmpty, 可以使用另外一个栈来辅助
*/
public static void reverse(Stack s) {
if(!s.isEmpty()){
Object top = s.pop();
reverse(s);
toTop(s,top);
}
}
private static void toTop(Stack s,Object t){
if(s.isEmpty()){
s.push(t);
return;
}
Object top = s.pop();
toTop(s,t);
s.push(top);
}
/**
* 删除栈中的某个元素 注意:只能使用Stack的基本操作,即push,pop,peek,isEmpty, 可以使用另外一个栈来辅助
*
* @param o
*/
public static void remove(Stack s,Object o) {
if(s.isEmpty()){
s.push(o);
return;
}
Object top = s.peek();
remove(s,o);
s.push(top);
}
/**
* 从栈顶取得len个元素, 原来的栈中元素保持不变
* 注意:只能使用Stack的基本操作,即push,pop,peek,isEmpty, 可以使用另外一个栈来辅助
* @param len
* @return
*/
public static Stack getTop(Stack s,int len) {
Stack top = new Stack();
// 若当前为空栈,则返回null
if (len == 0) {
return null;
}
while (!s.isEmpty()){
for(int i = 0;i < len;i++){
s.pop();
top.push(s);
}
}
return top;
}
/**
* 字符串s 可能包含这些字符: ( ) [ ] { }, a,b,c... x,yz
* 使用堆栈检查字符串s中的括号是不是成对出现的。
* 例如s = "([e{d}f])" , 则该字符串中的括号是成对出现, 该方法返回true
* 如果 s = "([b{x]y})", 则该字符串中的括号不是成对出现的, 该方法返回false;
* @param s
* @return
*/
public static boolean isValidPairs(String s){
Stack myStack = new Stack();
char[] arr = s.toCharArray();
for (char c : arr) {
Character temp = (Character) myStack.pop();
// 栈为空时只将c入栈
if (temp == null) {
myStack.push(c);
}
// 配对时c不入栈
else if (temp == '[' && c == ']') {
}
// 配对时c不入栈
else if (temp == '(' && c == ')') {
}
// 不配对时c入栈
else {
myStack.push(temp);
myStack.push(c);
}
}
return myStack.isEmpty();
}
} | [
"Linerator@163.com"
] | Linerator@163.com |
bc70bcea8e18ec1b050e4582cf7fbbf1905ddfa6 | ae8300ceaaf8a4b188493e88c9ca4ecb715bd546 | /src/main/java/xin/yiliya/pojo/RequireList.java | c05c14bb772e30ef47dd3272ed832581fa7f7723 | [] | no_license | UnlimitedCodesWorks/husbandry | e5827289ba90f58c4340d5a72a27099497f7f14d | 46926787896c96fd12ef3c17bc5ce66bc378898c | refs/heads/master | 2021-10-10T16:46:25.923502 | 2019-01-14T07:10:30 | 2019-01-14T07:10:30 | 110,700,970 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 499 | java | package xin.yiliya.pojo;
import java.util.List;
public class RequireList {
private List<Require> requireList;
private Integer serviceId;
public List<Require> getRequireList() {
return requireList;
}
public void setRequireList(List<Require> requireList) {
this.requireList = requireList;
}
public Integer getServiceId() {
return serviceId;
}
public void setServiceId(Integer serviceId) {
this.serviceId = serviceId;
}
}
| [
"31845468+jiangerHHF@users.noreply.github.com"
] | 31845468+jiangerHHF@users.noreply.github.com |
2ee5a10476925fe2e8f373708d434fb19f96b80d | 9aa47f1f079478a0410dfc442e2c6132277fd3be | /shells/ca-mgmt-shell/src/main/java/org/xipki/ca/mgmt/shell/CaCompleters.java | d80d691e159004aa81e31e592bb2bce84ea6081b | [
"Apache-2.0"
] | permissive | thelight1/xipki | 9f2c111047ea0456f53c3bdfd7847870da05f585 | 04327c33d4a8ceef8316a0980f9d4d595bf9f44d | refs/heads/master | 2020-11-23T20:03:32.185510 | 2019-12-10T14:50:24 | 2019-12-10T14:50:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,441 | java | /*
*
* Copyright (c) 2013 - 2019 Lijun Liao
*
* 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.xipki.ca.mgmt.shell;
import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.apache.karaf.shell.api.action.lifecycle.Reference;
import org.apache.karaf.shell.api.action.lifecycle.Service;
import org.xipki.ca.api.mgmt.CaManager;
import org.xipki.ca.api.mgmt.CaMgmtException;
import org.xipki.ca.api.mgmt.CertListOrderBy;
import org.xipki.ca.api.mgmt.MgmtEntry;
import org.xipki.ca.api.mgmt.RequestorInfo;
import org.xipki.ca.api.mgmt.ValidityMode;
import org.xipki.security.CrlReason;
import org.xipki.shell.DynamicEnumCompleter;
import org.xipki.shell.EnumCompleter;
/**
* Completers for the CA actions.
*
* @author Lijun Liao
*/
public class CaCompleters {
public abstract static class CaMgmtCompleter extends DynamicEnumCompleter {
@Reference
protected CaManager caManager;
} // class CaMgmtCompleter
@Service
public static class CaAliasCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getCaAliasNames();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class CaAliasCompleter
@Service
public static class CaCrlReasonCompleter extends EnumCompleter {
public CaCrlReasonCompleter() {
List<String> enums = new LinkedList<>();
for (CrlReason reason : CaActions.CaRevoke.PERMITTED_REASONS) {
enums.add(reason.getDescription());
}
setTokens(enums);
}
} // class CaCrlReasonCompleter
@Service
public static class CaNameCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getCaNames();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class CaNameCompleter
@Service
public static class CaNamePlusAllCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
Set<String> ret;
try {
ret = new HashSet<>(caManager.getCaNames());
} catch (CaMgmtException ex) {
ret = new HashSet<>();
}
ret.add("all");
return ret;
}
} // class CaNamePlusAllCompleter
@Service
public static class CaStatusCompleter extends EnumCompleter {
public CaStatusCompleter() {
setTokens("active", "inactive");
}
} // class CaStatusCompleter
@Service
public static class CertListSortByCompleter extends EnumCompleter {
public CertListSortByCompleter() {
List<String> enums = new LinkedList<>();
for (CertListOrderBy sort : CertListOrderBy.values()) {
enums.add(sort.getText());
}
setTokens(enums);
}
} // class
@Service
public static class PermissionCompleter extends EnumCompleter {
public PermissionCompleter() {
setTokens("enroll_cert", "revoke_cert", "unrevoke_cert", "remove_cert",
"key_update", "gen_crl", "get_crl", "enroll_cross", "all");
}
} // class PermissionCompleter
@Service
public static class ProfileNameAndAllCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
Set<String> ret;
try {
ret = new HashSet<>(caManager.getCertprofileNames());
} catch (CaMgmtException ex) {
ret = new HashSet<>();
}
ret.add("all");
return ret;
}
} // class ProfileNameAndAllCompleter
@Service
public static class ProfileNameCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getCertprofileNames();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class ProfileNameCompleter
@Service
public static class ProfileTypeCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getSupportedCertprofileTypes();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class ProfileTypeCompleter
@Service
public static class PublisherNameCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getPublisherNames();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class PublisherNameCompleter
@Service
public static class PublisherNamePlusAllCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
Set<String> ret;
try {
ret = new HashSet<>(caManager.getPublisherNames());
} catch (CaMgmtException ex) {
ret = new HashSet<>();
}
ret.add("all");
return ret;
}
} // class PublisherNamePlusAllCompleter
@Service
public static class PublisherTypeCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getSupportedPublisherTypes();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class PublisherTypeCompleter
@Service
public static class RcaNameCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
Set<String> caNames;
try {
caNames = caManager.getCaNames();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
Set<String> ret = new HashSet<>();
for (String name : caNames) {
MgmtEntry.Ca caEntry;
try {
caEntry = caManager.getCa(name);
} catch (CaMgmtException ex) {
continue;
}
X509Certificate cert = caEntry.getCert();
if (cert.getIssuerX500Principal().equals(cert.getSubjectX500Principal())) {
ret.add(name);
}
}
return ret;
}
} // class RcaNameCompleter
@Service
public static class RequestorNameCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
Set<String> names = new HashSet<>();
try {
names.addAll(caManager.getRequestorNames());
} catch (CaMgmtException ex) {
// CHECKSTYLE:SKIP
}
names.remove(RequestorInfo.NAME_BY_CA);
names.remove(RequestorInfo.NAME_BY_USER);
return names;
}
} // class RequestorNameCompleter
@Service
public static class SignerNameCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getSignerNames();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class SignerNameCompleter
@Service
public static class SignerNamePlusNullCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
Set<String> ret = new HashSet<>();
try {
ret.addAll(caManager.getSignerNames());
} catch (CaMgmtException ex) {
// CHECKSTYLE:SKIP
}
ret.add(CaManager.NULL);
return ret;
}
} // class SignerNamePlusNullCompleter
@Service
public static class SignerTypeCompleter extends CaMgmtCompleter {
@Override
protected Set<String> getEnums() {
try {
return caManager.getSupportedSignerTypes();
} catch (CaMgmtException ex) {
return Collections.emptySet();
}
}
} // class SignerTypeCompleter
@Service
public static class ValidityModeCompleter extends EnumCompleter {
public ValidityModeCompleter() {
List<String> enums = new LinkedList<>();
for (ValidityMode mode : ValidityMode.values()) {
enums.add(mode.name());
}
setTokens(enums);
}
} // class ValidityModeCompleter
}
| [
"lijun.liao@gmail.com"
] | lijun.liao@gmail.com |
2f4473cdd6c347e932e7adb579cabec1ac4b7eed | ebe1fd89431c9758156f9bd5f3bdb80dda236b9e | /Game_GF/Final_level.java | 04783367cd39ff48aecd6ee167da61fe51d95740 | [] | no_license | shaowenstudio/ResumeProjects | 5e23c10300883f7d6f0b35776880d97828b0af1e | f53e188ce2c20e64b81bca0a596862a8caaa5b51 | refs/heads/master | 2021-01-15T12:43:44.100714 | 2017-08-10T04:17:05 | 2017-08-10T04:17:05 | 99,655,581 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Final_level here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Final_level extends WorldLevel
{
/**
* Constructor for objects of class Final_level.
*
*/
public Final_level()
{
}
}
| [
"shaowenwork@gmail.com"
] | shaowenwork@gmail.com |
fb39e579c2f628a6e2fc0863f7be3d34b8ae8270 | 0f1f7332b8b06d3c9f61870eb2caed00aa529aaa | /ebean/tags/v1.2.0/src/com/avaje/ebean/server/persist/dml/UpdateMeta.java | 139d242c281d58524230149c2505cbd75dc98f61 | [] | no_license | rbygrave/sourceforge-ebean | 7e52e3ef439ed64eaf5ce48e0311e2625f7ee5ed | 694274581a188be664614135baa3e4697d52d6fb | refs/heads/master | 2020-06-19T10:29:37.011676 | 2019-12-17T22:09:29 | 2019-12-17T22:09:29 | 196,677,514 | 1 | 0 | null | 2019-12-17T22:07:13 | 2019-07-13T04:21:16 | Java | UTF-8 | Java | false | false | 4,981 | java | /**
* Copyright (C) 2006 Robin Bygrave
*
* This file is part of Ebean.
*
* Ebean is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* Ebean is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Ebean; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package com.avaje.ebean.server.persist.dml;
import java.sql.SQLException;
import javax.persistence.PersistenceException;
import com.avaje.ebean.server.core.ConcurrencyMode;
import com.avaje.ebean.server.core.PersistRequestBean;
import com.avaje.ebean.server.deploy.BeanDescriptor;
import com.avaje.ebean.server.persist.dmlbind.Bindable;
/**
* Meta data for update handler. The meta data is for a particular bean type. It
* is considered immutable and is thread safe.
*/
public final class UpdateMeta {
private final String sqlVersion;
private final String sqlNone;
private final Bindable set;
private final Bindable id;
private final Bindable version;
private final Bindable all;
private final String tableName;
public UpdateMeta(BeanDescriptor<?> desc, Bindable set, Bindable id, Bindable version, Bindable all) {
this.tableName = desc.getBaseTable();
this.set = set;
this.id = id;
this.version = version;
this.all = all;
sqlNone = genSql(ConcurrencyMode.NONE, null);
sqlVersion = genSql(ConcurrencyMode.VERSION, null);
}
/**
* Return the base table name.
*/
public String getTableName() {
return tableName;
}
/**
* Bind the request based on the concurrency mode.
*/
public void bind(PersistRequestBean<?> persist, DmlHandler bind) throws SQLException {
Object bean = persist.getBean();
bind.bindLogAppend(" set[");
set.dmlBind(bind, true, bean, true);
bind.bindLogAppend("] where[");
id.dmlBind(bind, false, bean, true);
int mode = persist.getConcurrencyMode();
if (mode == ConcurrencyMode.VERSION) {
version.dmlBind(bind, false, bean, true);
} else if (mode == ConcurrencyMode.ALL) {
Object oldBean = persist.getOldValues();
all.dmlBind(bind, true, oldBean, false);
}
}
/**
* get or generate the sql based on the concurrency mode.
*/
public String getSql(PersistRequestBean<?> request) {
int mode = request.determineConcurrencyMode();
if (request.isDynamicUpdateSql()){
return genSql(mode, request);
}
// 'full bean' update...
switch (mode) {
case ConcurrencyMode.NONE:
return sqlNone;
case ConcurrencyMode.VERSION:
return sqlVersion;
case ConcurrencyMode.ALL:
Object oldValues = request.getOldValues();
if (oldValues == null) {
throw new PersistenceException("OldValues are null?");
}
return genDynamicWhere(oldValues);
default:
throw new RuntimeException("Invalid mode "+mode);
}
}
private String genSql(int conMode, PersistRequestBean<?> persistRequest) {
// update set col0=?, col1=?, col2=? where bcol=? and bc1=? and bc2=?
GenerateDmlRequest request;
if (persistRequest == null){
// For generation of None and Version DML/SQL
request = new GenerateDmlRequest();
} else {
if (persistRequest.isUpdateChangesOnly()){
set.determineChangedProperties(persistRequest);
}
request = persistRequest.createGenerateDmlRequest();
}
request.append("update ").append(tableName).append(" set ");
request.setUpdateSetMode();
set.dmlAppend(request, true);
request.append(" where ");
request.setWhereIdMode();
id.dmlAppend(request, false);
if (conMode == ConcurrencyMode.VERSION) {
if (version == null){
return null;
}
//request.setWhereMode();
version.dmlAppend(request, false);
} else if (conMode == ConcurrencyMode.ALL) {
//request.setWhereMode();
all.dmlWhere(request, true, request.getOldValues());
}
return request.toString();
}
/**
* Generate the sql dynamically for where using IS NULL for binding null values.
*/
private String genDynamicWhere(Object oldBean) {
// always has a preceding id property(s) so the first
// option is always ' and ' and not blank.
GenerateDmlRequest request = new GenerateDmlRequest(null, oldBean);
//request.setBean(oldBean);
request.append(sqlNone);
request.setWhereMode();
all.dmlWhere(request, true, oldBean);
return request.toString();
}
}
| [
"208973+rbygrave@users.noreply.github.com"
] | 208973+rbygrave@users.noreply.github.com |
0b95a5767f63241960eeda6a8d1a4695244e3e78 | ad380568c1af714a94960a77e83d6ab092eaf552 | /app/src/main/java/duongmh3/bittrexmanager/service/BroadcastReceiverOnBootComplete.java | 36c713e5c915f6fc441fb0f0855f83d4b817b3d7 | [] | no_license | simplesoft-duongdt3/EthMinerWarning | d1d87a0ea106f7aede7e42469c0313cf797d17e1 | 0a70c37a68bd7a0197166e00f72f75d6c69e2454 | refs/heads/master | 2021-07-09T21:56:51.184498 | 2017-10-10T00:50:13 | 2017-10-10T00:50:13 | 103,160,374 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 488 | java | package duongmh3.bittrexmanager.service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
* Created by admin on 9/11/17.
*/
public class BroadcastReceiverOnBootComplete extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED)) {
ServiceUtil.startServiceWarning(context);
}
}
} | [
"admin@admins-MacBook-2.local"
] | admin@admins-MacBook-2.local |
708b109c1c703b7d7574208ed0f904c2ee97d6fb | 60653036a67ae82d05044826294ed9f7eeb12dbb | /src/hw/_2/Main.java | 25bab237c509eb9c21116ae9e6f20e387d225c44 | [] | no_license | msm1323/repo | 1dc66bdb2e1c4051760cbef92ff1d695ec071a0b | 3168426dc78a4f8b5c54833c04d1e3f65e69f627 | refs/heads/master | 2023-08-12T14:12:37.034101 | 2021-09-18T20:48:14 | 2021-09-18T20:48:14 | 403,073,691 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 572 | java | package hw._2;
import java.io.FileNotFoundException;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
FileAnalysis fileAnalysis = new FileAnalysis();
try {
fileAnalysis.analyse(args[0]);
} catch (FileNotFoundException ex) {
System.out.println(ex.getMessage() + "\nПроверьте корректность входных данных.");
} catch (IOException | FileAnalysis.EmptyFileException ex) {
System.out.println(ex.getMessage());
}
}
}
| [
"svetlana.magomedova.1998@gmail.com"
] | svetlana.magomedova.1998@gmail.com |
e707e4e473e895202216a096306af0f7665b4767 | f0aa1d621368baadee16a1687acf4a228eaa0064 | /mac/src/functions/Macfunctions.java | e83ffb0fe942f26b71f6ae9ee6eaab84877176e0 | [] | no_license | parth2706/MAC_Facility_Management | c5e434fe1e9294dcabe59c47f70d1d35f618b8c0 | 374d1cbfac216ac5a53f29920958bb72b209e542 | refs/heads/master | 2021-04-09T19:33:25.000500 | 2020-03-20T23:58:40 | 2020-03-20T23:58:40 | 248,871,772 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,612 | java | package functions;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import java.util.Properties;
public class Macfunctions{
public static WebDriver driver;
public static Properties prop;
public void takeScreenshot(WebDriver driver, String screenshotname) {
try
{
File source = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(source, new File("./ScreenShots/" + screenshotname +".png"));
}
catch(IOException e) {}
try {
Thread.sleep(0);
} catch (InterruptedException e) {}
}
public void MacLogin (WebDriver driver, String sUserName, String sPassword ) {
driver.findElement(By.xpath(prop.getProperty("Login_UserNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Login_UserNameInput"))).sendKeys(sUserName);
driver.findElement(By.xpath(prop.getProperty("Login_PasswordInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Login_PasswordInput"))).sendKeys(sPassword);
driver.findElement(By.xpath(prop.getProperty("Login_LoginUserButton"))).click();
}
public void MacRegister(WebDriver driver, String Username, String Password, String FirstName, String LastName, String UtaId, String Email, String Phone, String Address, String City, String State, String ZipCode ) {
driver.findElement(By.xpath(prop.getProperty("MainApp_RegisterLink"))).click();
driver.findElement(By.xpath(prop.getProperty("Register_UserNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_UserNameInput"))).sendKeys(Username);
driver.findElement(By.xpath(prop.getProperty("Register_PasswordInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_PasswordInput"))).sendKeys(Password);
driver.findElement(By.xpath(prop.getProperty("Register_FirstNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_FirstNameInput"))).sendKeys(FirstName);
driver.findElement(By.xpath(prop.getProperty("Register_LastNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_LastNameInput"))).sendKeys(LastName);
driver.findElement(By.xpath(prop.getProperty("Register_UtaIdInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_UtaIdInput"))).sendKeys(UtaId);
driver.findElement(By.xpath(prop.getProperty("Register_EmailInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_EmailInput"))).sendKeys(Email);
driver.findElement(By.xpath(prop.getProperty("Register_PhoneInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_PhoneInput"))).sendKeys(Phone);
driver.findElement(By.xpath(prop.getProperty("Register_AddressInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_AddressInput"))).sendKeys(Address);
driver.findElement(By.xpath(prop.getProperty("Register_CityInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_CityInput"))).sendKeys(City);
driver.findElement(By.xpath(prop.getProperty("Register_StateInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_StateInput"))).sendKeys(State);
driver.findElement(By.xpath(prop.getProperty("Register_ZipCodeInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_ZipCodeInput"))).sendKeys(ZipCode);
driver.findElement(By.xpath(prop.getProperty("Register_User"))).click();
driver.findElement(By.cssSelector("input[type=\"submit\"]")).click();
}
public void CommonMacRegister(WebDriver driver, String Username, String Password, String FirstName, String LastName, String UtaId, String Email, String Phone, String Address, String City, String State, String ZipCode ) {
driver.findElement(By.xpath(prop.getProperty("MainApp_RegisterLink"))).click();
driver.findElement(By.xpath(prop.getProperty("Register_UserNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_UserNameInput"))).sendKeys(Username);
driver.findElement(By.xpath(prop.getProperty("Register_PasswordInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_PasswordInput"))).sendKeys(Password);
driver.findElement(By.xpath(prop.getProperty("Register_FirstNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_FirstNameInput"))).sendKeys(FirstName);
driver.findElement(By.xpath(prop.getProperty("Register_LastNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_LastNameInput"))).sendKeys(LastName);
driver.findElement(By.xpath(prop.getProperty("Register_UtaIdInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_UtaIdInput"))).sendKeys(UtaId);
driver.findElement(By.xpath(prop.getProperty("Register_EmailInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_EmailInput"))).sendKeys(Email);
driver.findElement(By.xpath(prop.getProperty("Register_PhoneInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_PhoneInput"))).sendKeys(Phone);
driver.findElement(By.xpath(prop.getProperty("Register_AddressInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_AddressInput"))).sendKeys(Address);
driver.findElement(By.xpath(prop.getProperty("Register_CityInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_CityInput"))).sendKeys(City);
driver.findElement(By.xpath(prop.getProperty("Register_StateInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_StateInput"))).sendKeys(State);
driver.findElement(By.xpath(prop.getProperty("Register_ZipCodeInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_ZipCodeInput"))).sendKeys(ZipCode);
}
public void MacUpdateProfile(WebDriver driver, String FirstName, String LastName, String UtaId, String Email, String Phone, String Address, String City, String State, String ZipCode ) {
// Provide user name.
driver.findElement(By.xpath(prop.getProperty("Register_FirstNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_FirstNameInput"))).sendKeys(FirstName);
driver.findElement(By.xpath(prop.getProperty("Register_LastNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_LastNameInput"))).sendKeys(LastName);
driver.findElement(By.xpath(prop.getProperty("Register_UtaIdInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_UtaIdInput"))).sendKeys(UtaId);
driver.findElement(By.xpath(prop.getProperty("Register_EmailInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_EmailInput"))).sendKeys(Email);
driver.findElement(By.xpath(prop.getProperty("Register_PhoneInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_PhoneInput"))).sendKeys(Phone);
driver.findElement(By.xpath(prop.getProperty("Register_AddressInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_AddressInput"))).sendKeys(Address);
driver.findElement(By.xpath(prop.getProperty("Register_CityInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_CityInput"))).sendKeys(City);
driver.findElement(By.xpath(prop.getProperty("Register_StateInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_StateInput"))).sendKeys(State);
driver.findElement(By.xpath(prop.getProperty("Register_ZipCodeInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("Register_ZipCodeInput"))).sendKeys(ZipCode);
driver.findElement(By.xpath(prop.getProperty("UpdateProfile_UpdateButton"))).click();
}
public void addFacility(WebDriver driver, String facilityType, String facilityName)
{
driver.findElement(By.xpath(prop.getProperty("AddNewFacility_FacilityTypeInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("AddNewFacility_FacilityTypeInput"))).sendKeys(facilityType);
driver.findElement(By.xpath(prop.getProperty("AddNewFacility_FacilityNameInput"))).clear();
driver.findElement(By.xpath(prop.getProperty("AddNewFacility_FacilityNameInput"))).sendKeys(facilityName);
driver.findElement(By.cssSelector("input[type=\"submit\"]")).click();
}
}
| [
"mehta.parth2706@gmail.com"
] | mehta.parth2706@gmail.com |
c2d990245df2db555143f1431f99665e8165238d | 378048fd8b60bb658e1037c15a65438f031708ea | /AssetsRFID/gen/com/cw/assetsrfid/R.java | e780617aea5c1d4384c7daefcfd866efe55c4fab | [] | no_license | chinazc/RFID | 1cc027ddcf0f5947840c9c2462cf95c5ba0d1b3d | 3678770e0f79e15c1801bad2f24b9778ebfe6bb6 | refs/heads/master | 2016-09-05T09:56:21.092923 | 2014-10-22T09:19:47 | 2014-10-22T09:19:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 69,033 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.cw.assetsrfid;
public final class R {
public static final class array {
public static final int salesPeriod=0x7f070000;
public static final int visitFilterList=0x7f070001;
}
public static final class attr {
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int frame_color=0x7f010000;
}
public static final class color {
/** 蜜色
*/
public static final int aliceblue=0x7f05002c;
/** 亚麻色
*/
public static final int antiquewhite=0x7f050022;
/** 中灰兰色
*/
public static final int aqua=0x7f050084;
/** 粟色
*/
public static final int aquamarine=0x7f050065;
/** 沙褐色
*/
public static final int azure=0x7f05002a;
/** 烟白色
*/
public static final int beige=0x7f050027;
/** 浅玫瑰色
*/
public static final int bisque=0x7f05000d;
/** 海军色
*/
public static final int black=0x7f050093;
/** 番木色
*/
public static final int blanchedalmond=0x7f05000b;
/** 暗绿色
*/
public static final int blue=0x7f05008f;
/** 暗红色
*/
public static final int blueviolet=0x7f05005b;
/** 暗灰色
*/
public static final int brown=0x7f050050;
/** 亮青色
*/
public static final int burlywood=0x7f050034;
/** 菊兰色
*/
public static final int cadetblue=0x7f050073;
/** 碧绿色
*/
public static final int chartreuse=0x7f050066;
/** 茶色
*/
public static final int chocolate=0x7f05003f;
/** 暗桔黄色
*/
public static final int coral=0x7f050017;
/** 中绿色
*/
public static final int cornflowerblue=0x7f050072;
/** 柠檬绸色
*/
public static final int cornsilk=0x7f050007;
/** 淡灰色
*/
public static final int crimson=0x7f050037;
/** 浅绿色
*/
public static final int cyan=0x7f050085;
/** 中兰色
*/
public static final int darkblue=0x7f050091;
/** 深天蓝色
*/
public static final int darkcyan=0x7f05008b;
/** 中粉紫色
*/
public static final int darkgoldenrod=0x7f050047;
/** 亮蓝色
*/
public static final int darkgray=0x7f05004e;
/** 绿色
*/
public static final int darkgreen=0x7f05008e;
/** 暗灰色
*/
public static final int darkgrey=0x7f05004f;
/** 银色
*/
public static final int darkkhaki=0x7f050044;
/** 重褐色
*/
public static final int darkmagenta=0x7f050059;
/** 军兰色
*/
public static final int darkolivegreen=0x7f050074;
/** 亮肉色
*/
public static final int darkorange=0x7f050016;
/** 赭色
*/
public static final int darkorchid=0x7f050052;
/** 暗洋红
*/
public static final int darkred=0x7f05005a;
/** 紫罗兰色
*/
public static final int darksalmon=0x7f050031;
/** 亮绿色
*/
public static final int darkseagreen=0x7f050057;
/** 中绿宝石
*/
public static final int darkslateblue=0x7f050077;
/** 橙绿色
*/
public static final int darkslategray=0x7f05007d;
/** 暗瓦灰色
*/
public static final int darkslategrey=0x7f05007e;
/** 中春绿色
*/
public static final int darkturquoise=0x7f050089;
/** 苍绿色
*/
public static final int darkviolet=0x7f050054;
/** 红橙色
*/
public static final int deeppink=0x7f05001b;
/** 暗宝石绿
*/
public static final int deepskyblue=0x7f05008a;
/** 石蓝色
*/
public static final int dimgray=0x7f05006f;
/** 暗灰色
*/
public static final int dimgrey=0x7f050070;
/** 亮海蓝色
*/
public static final int dodgerblue=0x7f050082;
/** 暗金黄色
*/
public static final int firebrick=0x7f050048;
/** 雪白色
*/
public static final int floralwhite=0x7f050005;
/** 海绿色
*/
public static final int forestgreen=0x7f050080;
/** 深粉红色
*/
public static final int fuchsia=0x7f05001c;
/** 洋李色
*/
public static final int gainsboro=0x7f050036;
/** 鲜肉色
*/
public static final int ghostwhite=0x7f050024;
/** 桃色
*/
public static final int gold=0x7f050011;
/** 苍紫罗兰色
*/
public static final int goldenrod=0x7f050039;
/** 天蓝色
*/
public static final int gray=0x7f05005e;
/** 水鸭色
*/
public static final int green=0x7f05008d;
/** 苍宝石绿
*/
public static final int greenyellow=0x7f05004c;
/** 灰色
*/
public static final int grey=0x7f05005f;
/** 天蓝色
*/
public static final int honeydew=0x7f05002b;
/** 珊瑚色
*/
public static final int hotpink=0x7f050018;
/** 秘鲁色
*/
public static final int indianred=0x7f050041;
/** 暗橄榄绿
*/
public static final int indigo=0x7f050075;
/** 白色
*/
public static final int ivory=0x7f050001;
/** 艾利斯兰
*/
public static final int khaki=0x7f05002d;
/** 暗肉色
*/
public static final int lavender=0x7f050032;
/** 海贝色
*/
public static final int lavenderblush=0x7f050009;
/** 黄绿色
*/
public static final int lawngreen=0x7f050067;
/** 花白色
*/
public static final int lemonchiffon=0x7f050006;
/** 黄绿色
*/
public static final int lightblue=0x7f05004d;
/** 黄褐色
*/
public static final int lightcoral=0x7f05002e;
/** 淡紫色
*/
public static final int lightcyan=0x7f050033;
/** 老花色
*/
public static final int lightgoldenrodyellow=0x7f050020;
/** 蓟色
*/
public static final int lightgray=0x7f05003c;
/** 中紫色
*/
public static final int lightgreen=0x7f050056;
/** 亮灰色
*/
public static final int lightgrey=0x7f05003d;
/** 粉红色
*/
public static final int lightpink=0x7f050013;
/** 橙色
*/
public static final int lightsalmon=0x7f050015;
/** 森林绿
*/
public static final int lightseagreen=0x7f050081;
/** 紫罗兰蓝色
*/
public static final int lightskyblue=0x7f05005c;
/** 中暗蓝色
*/
public static final int lightslategray=0x7f050069;
/** 亮蓝灰
*/
public static final int lightslategrey=0x7f05006a;
/** 粉蓝色
*/
public static final int lightsteelblue=0x7f05004a;
/** 象牙色
*/
public static final int lightyellow=0x7f050002;
/** 春绿色
*/
public static final int lime=0x7f050087;
/** 中海蓝
*/
public static final int limegreen=0x7f05007c;
/** 亮金黄色
*/
public static final int linen=0x7f050021;
/** 灰色
*/
public static final int lowgrey=0x7f050060;
/** 灰色
*/
public static final int lowtblue=0x7f050061;
/** 紫红色
*/
public static final int magenta=0x7f05001d;
/** 紫色
*/
public static final int maroon=0x7f050064;
/** 暗灰色
*/
public static final int mediumaquamarine=0x7f050071;
/** 蓝色
*/
public static final int mediumblue=0x7f050090;
/** 褐玫瑰红
*/
public static final int mediumorchid=0x7f050046;
/** 暗紫罗兰色
*/
public static final int mediumpurple=0x7f050055;
/** 青绿色
*/
public static final int mediumseagreen=0x7f05007b;
/** 草绿色
*/
public static final int mediumslateblue=0x7f050068;
/** 酸橙色
*/
public static final int mediumspringgreen=0x7f050088;
/** 靛青色
*/
public static final int mediumturquoise=0x7f050076;
/** 印第安红
*/
public static final int mediumvioletred=0x7f050042;
/** 闪兰色
*/
public static final int midnightblue=0x7f050083;
/** 幽灵白
*/
public static final int mintcream=0x7f050025;
/** 白杏色
*/
public static final int mistyrose=0x7f05000c;
/** 桔黄色
*/
public static final int moccasin=0x7f05000e;
/** 鹿皮色
*/
public static final int navajowhite=0x7f05000f;
/** 暗蓝色
*/
public static final int navy=0x7f050092;
/** 红色
*/
public static final int oldlace=0x7f05001f;
/** 灰色
*/
public static final int olive=0x7f050062;
/** 灰石色
*/
public static final int olivedrab=0x7f05006d;
/** 亮粉红色
*/
public static final int orange=0x7f050014;
/** 西红柿色
*/
public static final int orangered=0x7f05001a;
/** 金麒麟色
*/
public static final int orchid=0x7f05003a;
/** 亮珊瑚色
*/
public static final int palegoldenrod=0x7f05002f;
/** 暗紫色
*/
public static final int palegreen=0x7f050053;
/** 亮钢兰色
*/
public static final int paleturquoise=0x7f05004b;
/** 暗深红色
*/
public static final int palevioletred=0x7f050038;
/** 淡紫红
*/
public static final int papayawhip=0x7f05000a;
/** 纳瓦白
*/
public static final int peachpuff=0x7f050010;
/** 巧可力色
*/
public static final int peru=0x7f050040;
/** 金色
*/
public static final int pink=0x7f050012;
/** 实木色
*/
public static final int plum=0x7f050035;
/** 火砖色
*/
public static final int powderblue=0x7f050049;
/** 橄榄色
*/
public static final int purple=0x7f050063;
/** 红紫色
*/
public static final int red=0x7f05001e;
/** 暗黄褐色
*/
public static final int rosybrown=0x7f050045;
/** 钢兰色
*/
public static final int royalblue=0x7f050079;
/** 暗海兰色
*/
public static final int saddlebrown=0x7f050058;
/** 古董白
*/
public static final int salmon=0x7f050023;
/** 浅黄色
*/
public static final int sandybrown=0x7f050029;
/** 暗瓦灰色
*/
public static final int seagreen=0x7f05007f;
/** 米绸色
*/
public static final int seashell=0x7f050008;
/** 褐色
*/
public static final int sienna=0x7f050051;
/** 中紫罗兰色
*/
public static final int silver=0x7f050043;
/** 亮天蓝色
*/
public static final int skyblue=0x7f05005d;
/** 深绿褐色
*/
public static final int slateblue=0x7f05006e;
/** 亮蓝灰
*/
public static final int slategray=0x7f05006b;
/** 灰石色
*/
public static final int slategrey=0x7f05006c;
/** 黄色
*/
public static final int snow=0x7f050004;
/** 青色
*/
public static final int springgreen=0x7f050086;
/** 暗灰蓝色
*/
public static final int steelblue=0x7f050078;
/** 亮灰色
*/
public static final int tan=0x7f05003e;
/** 暗青色
*/
public static final int teal=0x7f05008c;
/** 淡紫色
*/
public static final int thistle=0x7f05003b;
/** 热粉红色
*/
public static final int tomato=0x7f050019;
/** 皇家蓝
*/
public static final int turquoise=0x7f05007a;
/** 苍麒麟色
*/
public static final int violet=0x7f050030;
/** 米色
*/
public static final int wheat=0x7f050028;
public static final int white=0x7f050000;
/** 薄荷色
*/
public static final int whitesmoke=0x7f050026;
/** 亮黄色
*/
public static final int yellow=0x7f050003;
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin=0x7f060000;
public static final int activity_vertical_margin=0x7f060001;
}
public static final class drawable {
public static final int add=0x7f020000;
public static final int blur_asset_inquery=0x7f020001;
public static final int button_bg=0x7f020002;
public static final int button_bg_down=0x7f020003;
public static final int erweima=0x7f020004;
public static final int frame_rectangle=0x7f020005;
public static final int frameround=0x7f020006;
public static final int frameround_grey=0x7f020007;
public static final int homepage_demo_bg=0x7f020008;
public static final int ic_launcher=0x7f020009;
public static final int icon_asset=0x7f02000a;
public static final int icon_asset_big=0x7f02000b;
public static final int icon_back=0x7f02000c;
public static final int icon_camera=0x7f02000d;
public static final int icon_clip=0x7f02000e;
public static final int icon_document=0x7f02000f;
public static final int icon_edit=0x7f020010;
public static final int icon_forward=0x7f020011;
public static final int icon_inventory=0x7f020012;
public static final int icon_list=0x7f020013;
public static final int icon_logout=0x7f020014;
public static final int icon_maintance=0x7f020015;
public static final int icon_new_fault=0x7f020016;
public static final int icon_pm=0x7f020017;
public static final int icon_tools=0x7f020018;
public static final int icon_workrequest=0x7f020019;
public static final int iconsetup=0x7f02001a;
public static final int login_demo_bg=0x7f02001b;
public static final int logo=0x7f02001c;
public static final int normal_button=0x7f02001d;
public static final int save=0x7f02001e;
public static final int shape_background=0x7f02001f;
public static final int split=0x7f020020;
public static final int split1=0x7f020021;
public static final int sync=0x7f020022;
public static final int tab_button=0x7f020023;
public static final int toolbar1=0x7f020024;
public static final int toolbar2=0x7f020025;
public static final int workrequest_sheet_high=0x7f020026;
public static final int workrequest_sheet_low=0x7f020027;
public static final int workrequest_sheet_normal=0x7f020028;
}
public static final class id {
public static final int Inventory=0x7f0a002e;
public static final int TextView01=0x7f0a0083;
public static final int TextView03=0x7f0a0081;
public static final int TextView05=0x7f0a007f;
public static final int TextView07=0x7f0a007d;
public static final int action_settings=0x7f0a0114;
public static final int activityDate=0x7f0a001e;
public static final int activityName=0x7f0a001d;
public static final int activityNum=0x7f0a001c;
public static final int addImage=0x7f0a0073;
public static final int app_title_left=0x7f0a00de;
public static final int app_title_name=0x7f0a00e0;
public static final int app_title_other=0x7f0a00e1;
public static final int app_title_right=0x7f0a00df;
public static final int applicationNum=0x7f0a007e;
public static final int applicationType=0x7f0a0082;
public static final int approvalOriginator=0x7f0a0076;
public static final int approvalStatus=0x7f0a0078;
public static final int approvalTime=0x7f0a0077;
public static final int approvalType=0x7f0a0074;
public static final int assetsCode=0x7f0a0088;
public static final int assetsDescription=0x7f0a00e7;
public static final int assetsGridview=0x7f0a0084;
public static final int assetsId=0x7f0a008f;
public static final int assetsName=0x7f0a0090;
public static final int assetsNetValue=0x7f0a0015;
public static final int assetsOriValue=0x7f0a0014;
public static final int assetsQuery=0x7f0a0058;
public static final int assetsSource=0x7f0a0012;
public static final int assetsType=0x7f0a008b;
public static final int beijian=0x7f0a010a;
public static final int belongDept=0x7f0a000d;
public static final int btSaveSynAddress=0x7f0a00c8;
public static final int btnExec=0x7f0a00f4;
public static final int btnFullSync=0x7f0a00f2;
public static final int btnGetRFID=0x7f0a0094;
public static final int btnIncrementSync=0x7f0a00f3;
public static final int btnReadData=0x7f0a0096;
public static final int button2=0x7f0a0095;
public static final int button3=0x7f0a0097;
public static final int button4=0x7f0a0098;
public static final int buttonAssetsBaseinfo=0x7f0a0024;
public static final int buttonBeijianList=0x7f0a0025;
public static final int buttonCancel=0x7f0a0072;
public static final int buttonDataManage=0x7f0a006d;
public static final int buttonDepartment=0x7f0a0040;
public static final int buttonDocument=0x7f0a0029;
public static final int buttonEquipmentLog=0x7f0a0026;
public static final int buttonFaultExecQuery=0x7f0a004a;
public static final int buttonFaultReportApply=0x7f0a00b5;
public static final int buttonFunctionLocation=0x7f0a0045;
public static final int buttonIDAll=0x7f0a003d;
public static final int buttonInventoryExecQuery=0x7f0a00bb;
public static final int buttonInventoryReset=0x7f0a00bc;
public static final int buttonLogin=0x7f0a0053;
public static final int buttonNewserver=0x7f0a0068;
public static final int buttonNext=0x7f0a00fd;
public static final int buttonOK=0x7f0a0071;
public static final int buttonPlan=0x7f0a0028;
public static final int buttonReset=0x7f0a004b;
public static final int buttonSaveSelServer=0x7f0a006c;
public static final int buttonSaveserver=0x7f0a0069;
public static final int buttonSetserver=0x7f0a0054;
public static final int buttonStandard=0x7f0a0027;
public static final int buttonStatus=0x7f0a0048;
public static final int buttonTypeAll=0x7f0a0043;
public static final int button_cancel=0x7f0a009d;
public static final int button_scan=0x7f0a009c;
public static final int cancleImage=0x7f0a007c;
public static final int chargeOfDept=0x7f0a0103;
public static final int checkBoxSaveUser=0x7f0a0052;
public static final int closeDevice=0x7f0a0102;
public static final int controlPlan=0x7f0a001a;
public static final int currentStatus=0x7f0a0011;
public static final int dataTime=0x7f0a0035;
public static final int date=0x7f0a0030;
public static final int dateTime=0x7f0a0038;
public static final int dept=0x7f0a00e8;
public static final int description=0x7f0a0031;
public static final int detailType=0x7f0a000e;
public static final int deviceCode=0x7f0a0108;
public static final int deviceType=0x7f0a000b;
public static final int editTextAssetsCode=0x7f0a00fa;
public static final int editTextFaultDescription=0x7f0a00ab;
public static final int editTextNamespace=0x7f0a0066;
public static final int editTextPassword=0x7f0a0051;
public static final int editTextSelServer=0x7f0a006b;
public static final int editTextSvrURL=0x7f0a0067;
public static final int editTextSvrname=0x7f0a0064;
public static final int editTextUsername=0x7f0a0050;
public static final int end=0x7f0a0111;
public static final int endTime=0x7f0a0106;
public static final int etCompany=0x7f0a00ec;
public static final int etSynAddress=0x7f0a00c7;
public static final int etUserID=0x7f0a00ca;
public static final int etpassword=0x7f0a00cc;
public static final int event=0x7f0a0033;
public static final int eventDescription=0x7f0a0037;
public static final int evevtDescription=0x7f0a0034;
public static final int exit=0x7f0a005e;
public static final int faultManage=0x7f0a0059;
public static final int fixedAssets=0x7f0a0016;
public static final int fualtRecord=0x7f0a004e;
public static final int imageButtonReFresh=0x7f0a0062;
public static final int imageView1=0x7f0a0001;
public static final int imageView2=0x7f0a003e;
public static final int imageView3=0x7f0a0007;
public static final int imageView5=0x7f0a0041;
public static final int imageView6=0x7f0a0046;
public static final int imageView7=0x7f0a0049;
public static final int imageViewApprovalList=0x7f0a00da;
public static final int imageViewAssetsImage=0x7f0a0000;
public static final int imageViewAssetsQuery=0x7f0a0061;
public static final int imageViewBack=0x7f0a005f;
public static final int imageViewErCode=0x7f0a00fb;
public static final int imageViewErweima=0x7f0a0086;
public static final int imageViewFaultDocument=0x7f0a00b4;
public static final int imageViewFaultManage=0x7f0a0004;
public static final int imageViewFautPhoto=0x7f0a00b3;
public static final int imageViewInputErCode=0x7f0a003b;
public static final int imageViewInventoryManagement=0x7f0a00d8;
public static final int imageViewLogout=0x7f0a00dc;
public static final int imageViewPreventiveMaintenance=0x7f0a00d7;
public static final int imageViewPropsUniform=0x7f0a00d9;
public static final int imageViewSet=0x7f0a00db;
public static final int imageViewWorkSheet=0x7f0a00d6;
public static final int imageViewWorkrequestPhoto=0x7f0a00b7;
public static final int importance=0x7f0a000c;
public static final int in=0x7f0a010e;
public static final int inChargeOfDept=0x7f0a0080;
public static final int inventoryCode=0x7f0a00bd;
public static final int inventoryCount=0x7f0a00bf;
public static final int inventoryDes=0x7f0a0075;
public static final int inventoryInventoryCode=0x7f0a00b8;
public static final int inventoryManage=0x7f0a005c;
public static final int inventoryPalce=0x7f0a00be;
public static final int inventorySafeCount=0x7f0a00c1;
public static final int inventoryUnit=0x7f0a00c0;
public static final int lightSource=0x7f0a0017;
public static final int lin=0x7f0a0021;
public static final int linearButtom=0x7f0a010d;
public static final int linearDetailInfo=0x7f0a002a;
public static final int linearLayoutButton=0x7f0a0023;
public static final int linearWorkSheetDetailInfo=0x7f0a010c;
public static final int listContainer=0x7f0a007a;
public static final int listViewAssetDeviceList=0x7f0a002f;
public static final int listViewAssetLogList=0x7f0a0036;
public static final int listViewDeviceDocumentList=0x7f0a0032;
public static final int listViewInventoryresult=0x7f0a0079;
public static final int listViewQuery=0x7f0a007b;
public static final int listViewQueryresult=0x7f0a008e;
public static final int listViewSetServer=0x7f0a006e;
public static final int listViewStandardWorkList=0x7f0a0020;
public static final int listViewWorkSheetList=0x7f0a00ea;
public static final int ll=0x7f0a001b;
public static final int ll_pwd=0x7f0a00ee;
public static final int manuFacturer=0x7f0a0010;
public static final int materialsCode=0x7f0a002b;
public static final int materialsDescription=0x7f0a002c;
public static final int materialsType=0x7f0a00b9;
public static final int needFlag=0x7f0a0104;
public static final int new_devices=0x7f0a009b;
public static final int opticalLens=0x7f0a0019;
public static final int out=0x7f0a010f;
public static final int paired_devices=0x7f0a0099;
public static final int pb_download=0x7f0a009f;
public static final int planDate=0x7f0a00e9;
public static final int planEnd=0x7f0a00e4;
public static final int preventiveMaintenance=0x7f0a005b;
public static final int priority=0x7f0a0100;
public static final int process=0x7f0a0109;
public static final int progressBar1=0x7f0a0070;
public static final int progressBarMain=0x7f0a0057;
public static final int psu=0x7f0a0018;
public static final int qrCode=0x7f0a0089;
public static final int rbDifference=0x7f0a00f1;
public static final int rbForce=0x7f0a00f0;
public static final int rbSync=0x7f0a00cf;
public static final int resource=0x7f0a010b;
public static final int rgSyncType=0x7f0a00ce;
public static final int scrollView1=0x7f0a0055;
public static final int scrollViewAssetsBaseinfo=0x7f0a000a;
public static final int scrollViewFaultRecord=0x7f0a004d;
public static final int search=0x7f0a00fc;
public static final int setting=0x7f0a005d;
public static final int spinnerFaultAppearance=0x7f0a00af;
public static final int spinnerFaultPosition=0x7f0a00ad;
public static final int spinnerFaultPriority=0x7f0a00b1;
public static final int split=0x7f0a001f;
public static final int standardActivity=0x7f0a0105;
public static final int startPlan=0x7f0a00e3;
public static final int startTime=0x7f0a0013;
public static final int status=0x7f0a0091;
public static final int synctype=0x7f0a00ef;
public static final int tab_sync=0x7f0a00c5;
public static final int tableRow1=0x7f0a0085;
public static final int tableRow3=0x7f0a0087;
public static final int tableRow5=0x7f0a008a;
public static final int tableRow7=0x7f0a008c;
public static final int take=0x7f0a0110;
public static final int textView=0x7f0a0092;
public static final int textView000001=0x7f0a00a2;
public static final int textView1=0x7f0a0039;
public static final int textView10=0x7f0a00aa;
public static final int textView11=0x7f0a00ac;
public static final int textView12=0x7f0a00ae;
public static final int textView13=0x7f0a00b0;
public static final int textView14=0x7f0a00b2;
public static final int textView15=0x7f0a00b6;
public static final int textView2=0x7f0a00c3;
public static final int textView3=0x7f0a0005;
public static final int textView4=0x7f0a00c4;
public static final int textView5=0x7f0a0008;
public static final int textView6=0x7f0a0009;
public static final int textView7=0x7f0a00a7;
public static final int textView8=0x7f0a00dd;
public static final int textView9=0x7f0a00a9;
public static final int textViewAssetNo=0x7f0a0002;
public static final int textViewAssetsName=0x7f0a0022;
public static final int textViewBack=0x7f0a0060;
public static final int textViewCancel=0x7f0a00a0;
public static final int textViewDepartment=0x7f0a003f;
public static final int textViewDescription=0x7f0a00f6;
public static final int textViewDialogMessage=0x7f0a0003;
public static final int textViewEditStatus=0x7f0a006a;
public static final int textViewEquipmentDesc=0x7f0a00a6;
public static final int textViewEquipmentMan=0x7f0a00a4;
public static final int textViewEquipmentModel=0x7f0a00a5;
public static final int textViewEquipmentName=0x7f0a00a3;
public static final int textViewEquipmentNum=0x7f0a00f7;
public static final int textViewErrorMessage=0x7f0a0056;
public static final int textViewFaultReportAssetsNum=0x7f0a00a1;
public static final int textViewFunctionLocation=0x7f0a0044;
public static final int textViewInputErCode=0x7f0a003a;
public static final int textViewMessage=0x7f0a004c;
public static final int textViewNamespace=0x7f0a0065;
public static final int textViewPosition=0x7f0a00f8;
public static final int textViewReportName=0x7f0a00a8;
public static final int textViewReportTime=0x7f0a00f9;
public static final int textViewRequestID=0x7f0a003c;
public static final int textViewRequestType=0x7f0a0042;
public static final int textViewServerID=0x7f0a00c2;
public static final int textViewServername=0x7f0a0063;
public static final int textViewStatus=0x7f0a0047;
public static final int textViewTitle=0x7f0a006f;
public static final int textViewUsername=0x7f0a004f;
public static final int textViewWorkMode=0x7f0a0006;
public static final int textViewWorkRequestID=0x7f0a00f5;
public static final int title_new_devices=0x7f0a009a;
public static final int tr_pwd=0x7f0a00ed;
public static final int tvCompany=0x7f0a00eb;
public static final int tvElapseTime=0x7f0a00d0;
public static final int tvElapseTimeValue=0x7f0a00d1;
public static final int tvSynAddress=0x7f0a00c6;
public static final int tvSyncProgress=0x7f0a00d2;
public static final int tvSyncProgressValue=0x7f0a00d3;
public static final int tvSyncResult=0x7f0a00d4;
public static final int tvSyncResultValue=0x7f0a00d5;
public static final int tvSyncType=0x7f0a00cd;
public static final int tvUserID=0x7f0a00c9;
public static final int tv_dialog_msg=0x7f0a009e;
public static final int tvpassword=0x7f0a00cb;
public static final int txtDemoResult=0x7f0a0093;
public static final int txtHeader=0x7f0a008d;
public static final int type=0x7f0a000f;
public static final int unit=0x7f0a002d;
public static final int warehouseNum=0x7f0a00ba;
public static final int workDuration=0x7f0a0107;
public static final int workSheet=0x7f0a005a;
public static final int workSheetDes=0x7f0a00e6;
public static final int workSheetNum=0x7f0a0112;
public static final int workSheetNum_Status=0x7f0a00e5;
public static final int workSheetStatus=0x7f0a0113;
public static final int workStatus=0x7f0a0101;
public static final int workType=0x7f0a00e2;
public static final int worksheetName=0x7f0a00ff;
public static final int worksheetNum=0x7f0a00fe;
}
public static final class layout {
public static final int activity_assets_detail_first_pad=0x7f030000;
public static final int activity_assets_detail_five_pad=0x7f030001;
public static final int activity_assets_detail_four_pad=0x7f030002;
public static final int activity_assets_detail_four_pad_list_item=0x7f030003;
public static final int activity_assets_detail_pad=0x7f030004;
public static final int activity_assets_detail_second_pad=0x7f030005;
public static final int activity_assets_detail_second_pad_list_item=0x7f030006;
public static final int activity_assets_detail_six_pad=0x7f030007;
public static final int activity_assets_detail_six_pad_list_item=0x7f030008;
public static final int activity_assets_detail_three_pad=0x7f030009;
public static final int activity_assets_detail_three_pad_list_item=0x7f03000a;
public static final int activity_assets_fault_manage_pad=0x7f03000b;
public static final int activity_login=0x7f03000c;
public static final int activity_main=0x7f03000d;
public static final int activity_server_set_new=0x7f03000e;
public static final int activity_web_service_call=0x7f03000f;
public static final int approval_list_main=0x7f030010;
public static final int assets_fault_manage=0x7f030011;
public static final int assets_query_main=0x7f030012;
public static final int assets_query_main_list_item=0x7f030013;
public static final int assets_search_list_item=0x7f030014;
public static final int card_reder_set=0x7f030015;
public static final int device_list=0x7f030016;
public static final int device_name=0x7f030017;
public static final int dialog_download_progress=0x7f030018;
public static final int fault_report_detail=0x7f030019;
public static final int inventory_manage_main=0x7f03001a;
public static final int inventory_manage_main_list_item=0x7f03001b;
public static final int listitem_serverset=0x7f03001c;
public static final int login_sync=0x7f03001d;
public static final int main_activity=0x7f03001e;
public static final int main_title=0x7f03001f;
public static final int patrol_inspection_main=0x7f030020;
public static final int sync_ui=0x7f030021;
public static final int view_layout_fault_detail=0x7f030022;
public static final int view_layout_fault_report_assets_num=0x7f030023;
public static final int view_newworkrequest_sheet=0x7f030024;
public static final int work_sheet_detail=0x7f030025;
public static final int work_sheet_list_item=0x7f030026;
public static final int work_sheet_main=0x7f030027;
}
public static final class menu {
public static final int main=0x7f090000;
}
public static final class string {
public static final int ASSETS_GET_ASSETS_PHOTO=0x7f04007b;
public static final int ASSETS_I_ASSETS=0x7f040077;
public static final int ASSETS_I_ASSETS_PHOTO=0x7f040078;
/** 资产管理
*/
public static final int ASSETS_S_ASSETSLIST=0x7f040073;
public static final int ASSETS_S_ASSETSLIST_COUNT=0x7f040074;
public static final int ASSETS_S_ASSETS_NAMES=0x7f040075;
public static final int ASSETS_S_ASSETS_STATUS=0x7f040076;
public static final int ASSETS_TITLE=0x7f040152;
public static final int ASSETS_U_ASSETS=0x7f040079;
public static final int ASSETS_U_ASSETS_PHOTO=0x7f04007a;
public static final int BTN_BACK=0x7f0400d4;
public static final int CANCEL=0x7f0400d7;
public static final int CAST_TITLE=0x7f04015c;
public static final int COMPANY_ACCOUNT=0x7f0400bd;
public static final int CONTINUE=0x7f0400d8;
public static final int COPY_TARGET=0x7f04000f;
public static final int CUSTOMER_D_ADDR=0x7f040039;
public static final int CUSTOMER_I_CUSTOMER=0x7f040032;
public static final int CUSTOMER_I_CUST_ADDR=0x7f040033;
public static final int CUSTOMER_I_CUST_IN_CHARGER=0x7f040034;
public static final int CUSTOMER_S_ADDRID=0x7f040036;
public static final int CUSTOMER_S_CITY=0x7f04002f;
public static final int CUSTOMER_S_CUSTOMERLIST_COUNT=0x7f04002b;
/** 客户管理sql
*/
public static final int CUSTOMER_S_CUSTOMER_DETAIL=0x7f04002a;
public static final int CUSTOMER_S_CUST_ADDR=0x7f040031;
public static final int CUSTOMER_S_CUST_TYPE=0x7f04002c;
public static final int CUSTOMER_S_GET_CUSTCODE=0x7f040035;
public static final int CUSTOMER_S_PROVINCE=0x7f04002e;
public static final int CUSTOMER_S_REGIONAL=0x7f040030;
public static final int CUSTOMER_S_SALES_NETWORK=0x7f04002d;
public static final int CUSTOMER_TITLE=0x7f04014e;
public static final int CUSTOMER_U_ADDR=0x7f040038;
public static final int CUSTOMER_U_CUSTOMER=0x7f040037;
/** 拜访title
*/
public static final int CollTargetList_TITLE=0x7f040130;
public static final int DEFAULT_COMPANY_ACCOUNT=0x7f040144;
/** Linux
*/
public static final int DEFAULT_CORRECT_ADDRESS=0x7f04015e;
public static final int DEFAULT_LOGIN_MODEL=0x7f040143;
public static final int DEFAULT_MODEL=0x7f040147;
public static final int DEFAULT_PRODUCT=0x7f040149;
public static final int DEFAULT_PRODUCT_TYPE=0x7f040148;
public static final int DEFAULT_PROVINCE=0x7f040146;
public static final int DEFAULT_SYNC_ADDRESS=0x7f04015f;
public static final int DEFAULT_SYNC_ADDRESS_PORT=0x7f040160;
public static final int DEFAULT_USER_ACCOUNT=0x7f040145;
public static final int DELETE_COUNT=0x7f0400d1;
public static final int DIALOG_TITLE=0x7f0400ad;
public static final int DOWNLOAD_COUNT=0x7f0400cf;
public static final int DataCollect_I_SKUName=0x7f04004f;
/** 校验某任务某target某kpi是否采集了
*/
public static final int DataCollect_I_SearchCollectctionResult=0x7f040040;
public static final int DataCollection_I_DeleteCollectionResult=0x7f040042;
/** 保存KPI采集数据
*/
public static final int DataCollection_I_SaveCollectionResult=0x7f04003e;
public static final int DataCollection_I_UpdateCollectionResult=0x7f04003f;
/** 获取采集异常总数
*/
public static final int DataCollection_S_GetAbnormalSum=0x7f04003d;
/** 获取已采集�?�?
*/
public static final int DataCollection_S_GetCollectedSum=0x7f04003c;
/** 获取KPI总数
*/
public static final int DataCollection_S_GetKpiSum=0x7f04003b;
/** 获取采集对象列表
*/
public static final int DataCollection_S_GetTargetList=0x7f04003a;
/** 修改KPI采集数据
*/
public static final int DataCollection_U_ModifyCollectionResult=0x7f040043;
public static final int ELAPSE_TIME=0x7f0400cd;
public static final int EMPIDNULL=0x7f0400b0;
public static final int EMP_INFO_SQL=0x7f040010;
public static final int EXIT=0x7f0400d5;
/** 登陆界面
*/
public static final int FAILD_LOGIN=0x7f0400ac;
public static final int FAILD_LONGTIME_LOGIN=0x7f0400b2;
public static final int FINISH_TIME=0x7f0400cc;
/**
<string name="SYNC_END_CLEAR_DATA_LOCK"> DELETE FROM DATA_LOCK
</string>
<string name="SYNC_END_ORDER_DATA_LOCK"> INSERT INTO DATA_LOCK SELECT ORDER_ID,\'O\' FROM ORDER_TABLE WHERE Order_code like \'O%\' AND ACTIVE = \'1\'
</string>
<string name="SYNC_END_CUSTOMER_DATA_LOCK"> INSERT INTO DATA_LOCK SELECT CUST_ID,\'C\' FROM CUSTOMER WHERE cust_code like \'c%\' AND ACTIVE = \'1\'
</string>
<string name="SYNC_END_VISIT_TASK_DATA_LOCK"> INSERT INTO DATA_LOCK select VISIT_TASK_ID, \'V\' from VISIT_TASK WHERE STATUS = \'2\' AND ACTIVE = \'1\'
</string>
<string name="OTCPHOTOSHAVEBEENSHOT"> INSERT INTO DATA_LOCK VALUES(?,?)
</string>
*/
public static final int GETOTCPHOTOSHAVEBEENSHOT=0x7f04007d;
/** GPS权限Key
*/
public static final int GPS_API_KEY=0x7f0400e1;
public static final int GetCustClerkList=0x7f040014;
/** 获取KPI列表
*/
public static final int GetKpiList=0x7f040020;
/** 某任务控制类�?
*/
public static final int GetOneVisitType=0x7f040051;
/** 获取产品采集对象ID
*/
public static final int GetProductTargetID=0x7f04001f;
/** 获取店头采集对象ID
*/
public static final int GetStorePicTargetID=0x7f040016;
/** 获取采集指标类型
*/
public static final int GetTargetByTaskID=0x7f040012;
public static final int GetTargetType=0x7f040013;
public static final int GetTargetTypeByTaskID=0x7f040015;
/** 获取任务明细
*/
public static final int GetTaskDetail=0x7f040011;
public static final int GetVisitCustTypeLength=0x7f040022;
public static final int GetVisitCustTypeList=0x7f040021;
/** 任务控制类型
*/
public static final int GetVisitType=0x7f040050;
public static final int HAS_ORDER=0x7f04000e;
public static final int HISTORYORDER_FOR_VISIT=0x7f04007c;
public static final int INFO_SEARCH_TITLE=0x7f04014f;
/** 记录修改时间
*/
public static final int INSERT_UPDATE_DT_LOG=0x7f04007f;
public static final int InitialSyncMsg=0x7f0400df;
/**
<string name="GETOTCPHOTOSHAVEBEENSHOT"> select * from COLL_RESULT_CURR where kpi_id = \'402835343b6486e9013b7468e5880024\' and visit_task_id=?
</string>
获取有效的图片名称
*/
public static final int JPGNAMEARRAY=0x7f04007e;
public static final int LOGINNAME=0x7f0400c8;
public static final int LOGIN_ERROR=0x7f0400af;
public static final int LOGIN_MODEL=0x7f0400bc;
public static final int LOGIN_SUCCESSFUL=0x7f0400ae;
public static final int Login_ADDRESS=0x7f0400b9;
public static final int MESSAGE_TITLE=0x7f040156;
public static final int MODULE=0x7f0400c0;
public static final int MSG_001=0x7f0400d9;
public static final int MSG_002=0x7f0400da;
public static final int MSG_003=0x7f0400db;
public static final int MSG_004=0x7f0400dc;
public static final int MSG_WARNING_002=0x7f0400dd;
public static final int MSG_WARNING_003=0x7f0400de;
public static final int No_Network=0x7f0400b3;
public static final int No_Record=0x7f0400b4;
/** 本地登录
<string name="SQL_LOGIN">select
d.emp_id,d.emp_code,d.emp_name,d.sex,d.id_no,d.role_id,d.addr,d.tel,
d.email,d.parent_emp_code,d.active,d.pic_name,d.company_code,d.dept_code
from DEPT_EMP d where d.emp_id =? and d.pwd=? and d.active =\'1\'
</string>
*/
public static final int OLD_VISIT_ID=0x7f04000d;
public static final int ORDER_D_ORDERDETAIL=0x7f040072;
public static final int ORDER_D_ORDERTABLE=0x7f040071;
public static final int ORDER_I_ORDERDETAIL=0x7f04006e;
public static final int ORDER_I_ORDERTABLE=0x7f04006d;
public static final int ORDER_S_CUSTADDR=0x7f040066;
public static final int ORDER_S_GET_HISTORY_ORDER_DETAIL_LIST=0x7f04006b;
public static final int ORDER_S_GET_ORDERCODE=0x7f040068;
public static final int ORDER_S_ORDERDETAIL=0x7f040062;
public static final int ORDER_S_ORDERDETAIL_ID_LIST=0x7f04006a;
public static final int ORDER_S_ORDERLIST=0x7f040064;
public static final int ORDER_S_ORDERLIST_COUNT=0x7f040065;
/** 订单管理sql
*/
public static final int ORDER_S_ORDERTABLE=0x7f040060;
public static final int ORDER_S_ORDERTYPE=0x7f040067;
public static final int ORDER_S_PRODUCTLIST=0x7f040069;
public static final int ORDER_TITLE=0x7f04014a;
public static final int ORDER_U_ORDERDETAIL=0x7f040070;
public static final int ORDER_U_ORDERTABLE=0x7f04006f;
public static final int PERFORMANCE_EDITION_TITLE=0x7f040154;
public static final int PLAN_REVIEW_TITLE=0x7f04015b;
public static final int PRODUCT=0x7f0400c2;
public static final int PRODUCT_D_COMMON_PRODUCT=0x7f040029;
public static final int PRODUCT_I_COMMON_PRODUCT=0x7f040025;
public static final int PRODUCT_S_COMMON_PRODUCT=0x7f040028;
public static final int PRODUCT_S_COMMON_PRODUCT_LIST=0x7f040027;
/** 产品管理
*/
public static final int PRODUCT_S_PRODUCTLIST_COUNT=0x7f040023;
public static final int PRODUCT_S_PRODUCTTYPE=0x7f040024;
public static final int PRODUCT_TITLE=0x7f040151;
public static final int PRODUCT_TYPE=0x7f0400c1;
public static final int PRODUCT_U_COMMON_PRODUCT=0x7f040026;
public static final int PROVINCE=0x7f0400bf;
public static final int PWDNULL=0x7f0400b1;
public static final int REPORT_STATISTICS=0x7f04015d;
public static final int SALES_QUERY_TITLE=0x7f040159;
public static final int SALES_TITLE=0x7f040157;
public static final int SAVE=0x7f0400aa;
/** 设置界面控件名称
*/
public static final int SERVER_ADDRESS=0x7f0400b8;
public static final int SERVER_ERROR=0x7f0400b5;
/** 同步信息界面控件名称
*/
public static final int START_TIME=0x7f0400c9;
public static final int STATISTICS_TITLE=0x7f040158;
public static final int STOCK_SEARCH_TITLE=0x7f040150;
public static final int SUBMIT=0x7f0400ab;
public static final int SURE=0x7f0400d6;
/** true:需要保存密码
*/
public static final int SYNC=0x7f0400a9;
public static final int SYNCPort_ADDRESS=0x7f0400bb;
public static final int SYNC_ADDRESS=0x7f0400ba;
public static final int SYNC_CANCEL=0x7f0400d3;
public static final int SYNC_DOWN=0x7f0400c6;
public static final int SYNC_ERROR=0x7f0400ca;
public static final int SYNC_FORCE=0x7f0400c4;
public static final int SYNC_PROGRESS=0x7f0400ce;
public static final int SYNC_RESULT=0x7f0400d2;
public static final int SYNC_SUCCESSFUL=0x7f0400cb;
public static final int SYNC_TITLE=0x7f04014c;
/** 同步界面控件名称
*/
public static final int SYNC_TYPE=0x7f0400c3;
public static final int SYNC_UP=0x7f0400c5;
public static final int TODAY_ORDER_TITLE=0x7f040155;
public static final int TODAY_VISIT_TITLE=0x7f040153;
public static final int TargetTypeList_TITLE=0x7f040131;
public static final int UPLOAD_COUNT=0x7f0400d0;
public static final int UPLOAD_TITLE=0x7f04015a;
public static final int USER_ACCOUNT=0x7f0400be;
public static final int USER_PASSWORD=0x7f0400c7;
public static final int USER_TITLE=0x7f04014d;
public static final int VISITTASK_TITLE=0x7f04014b;
public static final int VisitTitle=0x7f040133;
public static final int Visit_ORDER_S_GET_HISTORY_ORDER_DETAIL_LIST=0x7f04006c;
public static final int Visit_ORDER_S_ORDERDETAIL=0x7f040063;
public static final int Visit_ORDER_S_ORDERTABLE=0x7f040061;
/** <string name="CHECK_VISIT_ORDER_IS_SYNC">select data_id from data_lock where data_id = (SELECT TOP 1 ORDER_TABLE_ID FROM VISIT_ORDER_TABLE WHERE VISIT_TASK_ID = ?) and Type=\'O\'</string>
*/
public static final int WEEKREPORT_INSERT=0x7f040080;
/** 填写周报告
*/
public static final int WEEK_REPORT=0x7f04013f;
public static final int WEEK_REPORT_REVIEW=0x7f040140;
public static final int about=0x7f0400e3;
public static final int action_settings=0x7f04008f;
/** 订单详细信息界面
*/
public static final int add=0x7f0400fa;
public static final int address=0x7f040106;
public static final int address_ck=0x7f04010b;
public static final int aft_discount_price=0x7f040103;
public static final int app_name=0x7f040000;
public static final int checkAbnormalPrice=0x7f040085;
public static final int checkOrder=0x7f040081;
/** 校验某任务是否有订单产生
*/
public static final int checkOrderInTask=0x7f040041;
public static final int checkOrderProduct=0x7f040083;
public static final int checkStock=0x7f040084;
public static final int client_detail=0x7f040110;
/** 改变任务
*/
public static final int completedVisit=0x7f040017;
public static final int completedVisitMsg=0x7f0400e0;
/** 改变任务
*/
public static final int completedVisitPDA=0x7f04001a;
public static final int cunsumer_order_num=0x7f040105;
public static final int cust_code=0x7f040111;
/** 客户列表
*/
public static final int cust_list=0x7f040109;
public static final int cust_type=0x7f040112;
/** 查询对话框
*/
public static final int customer_name=0x7f0400f6;
public static final int dataCollectionTitle=0x7f040136;
public static final int default_list_item=0x7f0400ed;
public static final int delete=0x7f0400f5;
public static final int delete_success=0x7f0400ef;
public static final int dialog_title=0x7f040113;
public static final int discount=0x7f040101;
/** 长按列表界面
*/
public static final int edit=0x7f0400f3;
public static final int endVisitMsg=0x7f04013d;
public static final int endVisitPhotoMsg=0x7f04013e;
public static final int exitVisitMsg=0x7f04013c;
public static final int getAbnormalPrice=0x7f04004c;
public static final int getActive=0x7f04005a;
public static final int getChangeUser=0x7f040054;
public static final int getCustType=0x7f040055;
public static final int getIntest=0x7f040059;
/** 获取kpi总数
*/
public static final int getKpiCount=0x7f040053;
public static final int getOrderCollectInfo=0x7f040047;
public static final int getOrderType=0x7f04005d;
public static final int getPosition=0x7f040058;
public static final int getProduct4Order=0x7f04004a;
/** 任务拜访中订单管理、库存管理
*/
public static final int getProduct4OrderInTask=0x7f040048;
/** 任务拜访中订单管理(无客户产品关联)
*/
public static final int getProduct4OrderInTaskNoRel=0x7f040049;
/** 订单管理(无客户产品关联)
*/
public static final int getProduct4OrderNoRel=0x7f04004b;
public static final int getProductGroup=0x7f04005f;
public static final int getSalesDate=0x7f04005c;
public static final int getSellGroup=0x7f04005e;
public static final int getTargetListItem=0x7f04004d;
/** 获取采集对象列表
*/
public static final int getTargetListItemPDANew=0x7f040044;
public static final int getTargetTypeListItem=0x7f040045;
public static final int getTaskOrderCollectInfo=0x7f040046;
public static final int getVisitResult=0x7f04005b;
public static final int getVisitStatus=0x7f040056;
public static final int getVisitType=0x7f040057;
public static final int getWarehouseList=0x7f04008d;
public static final int hello_world=0x7f04008e;
public static final int input_er_code=0x7f04009a;
public static final int insertAbnormalPrice=0x7f04001e;
public static final int insertOrderDetail=0x7f040087;
public static final int insertOrderTable=0x7f040086;
public static final int is_delete=0x7f0400ee;
public static final int key_file_name_log=0x7f040166;
public static final int key_path_backup=0x7f040164;
public static final int key_path_cache=0x7f040167;
public static final int key_path_log=0x7f040165;
/** true:加载订单编号
*/
public static final int key_path_root=0x7f040163;
public static final int leftLabel=0x7f0400b6;
public static final int loading=0x7f040128;
public static final int loadsmorelabel=0x7f040127;
public static final int look=0x7f0400f4;
public static final int more=0x7f0400e5;
public static final int multimediaUpload=0x7f0400e4;
public static final int newProductStock=0x7f04001d;
public static final int newVisit=0x7f04001c;
/** 新建任务
*/
public static final int newVisitTaskType=0x7f040052;
/** 新建任务
*/
public static final int newVisitType=0x7f04001b;
public static final int new_file_button=0x7f0400ea;
public static final int new_file_menu=0x7f04010e;
public static final int no=0x7f0400f2;
public static final int od_cunsumer_name=0x7f0400fd;
public static final int od_date=0x7f0400ff;
public static final int od_num=0x7f0400fc;
public static final int od_product_type=0x7f040100;
public static final int od_type=0x7f0400fe;
public static final int of_date_hint=0x7f0400ec;
public static final int of_number_hint=0x7f0400eb;
public static final int orderCode=0x7f04016d;
public static final int orderCodeDate=0x7f04016e;
/** 主界面
*/
public static final int order_form_button=0x7f0400e2;
public static final int order_from_date=0x7f0400f9;
public static final int order_from_number=0x7f0400f7;
/** 订单列表
*/
public static final int order_from_title=0x7f0400e8;
public static final int order_from_type=0x7f0400f8;
public static final int paPlanTarget=0x7f04016a;
public static final int paTaskTarget=0x7f040169;
public static final int phone_number=0x7f04010c;
public static final int pl_item_type=0x7f040108;
public static final int plan_review_menu=0x7f04010f;
/** 拜访任务时间Label
*/
public static final int plan_s_dt_label=0x7f040137;
public static final int pre_discount_price=0x7f040102;
/** 产品列表界面
*/
public static final int product_list_title=0x7f040107;
/** 获取KPI列表
*/
public static final int queryCustKPI=0x7f04004e;
public static final int query_itemcount_message=0x7f040095;
public static final int remenber_user=0x7f0400a4;
/** 撤销任务
*/
public static final int revocationVisit=0x7f040019;
public static final int rightLabel=0x7f0400b7;
public static final int saPlanTarget=0x7f04016c;
public static final int saTaskTarget=0x7f04016b;
/** 销量界面
*/
public static final int saleReport=0x7f040114;
public static final int save=0x7f0400fb;
public static final int saveVisit=0x7f040018;
public static final int search_button=0x7f0400e9;
public static final int search_menu=0x7f04010d;
public static final int select_cust=0x7f04010a;
public static final int serverset=0x7f040093;
public static final int setting=0x7f0400e7;
public static final int sp_key_=0x7f040168;
/** true:多订单模式
*/
public static final int sp_key_load_order_code=0x7f040162;
/** true:需要保存密码
*/
public static final int sp_key_need_order_code=0x7f040161;
public static final int sp_key_password=0x7f0400a6;
/** true:需要保存用户名
true:需要保存用户名
*/
public static final int sp_key_save_password_state=0x7f0400a8;
public static final int sp_key_save_username_state=0x7f0400a7;
public static final int sp_key_username=0x7f0400a5;
public static final int special_fee=0x7f040104;
/** 所有产品
*/
public static final int sql_all_product=0x7f040006;
/** 用户负责的客户
*/
public static final int sql_order_customer=0x7f040001;
/** 订单选择界面,相关订单数据
*/
public static final int sql_order_customer_order_no=0x7f040002;
/** 判断正常订单是否存在
*/
public static final int sql_order_normal_exist=0x7f040009;
/** 正常产品,额外数据
*/
public static final int sql_order_normal_product_ex=0x7f04000b;
/** 判断赠品订单是否存在
*/
public static final int sql_order_present_exist=0x7f04000a;
/** 赠品产品,额外数据
*/
public static final int sql_order_present_product_ex=0x7f04000c;
/** 产品小类
*/
public static final int sql_order_product_category=0x7f040005;
/** 产品大类
*/
public static final int sql_order_product_parent_category=0x7f040004;
/** 订单类型
*/
public static final int sql_order_type=0x7f040003;
/** 此客户出售的产品
*/
public static final int sql_product_by_customer=0x7f040007;
/** 修改产品之前输入的值
*/
public static final int sql_product_last_data=0x7f040008;
/** 线外拜访
*/
public static final int startVisitMsg=0x7f04013b;
public static final int string_format_fault_report_confirm=0x7f04009c;
public static final int targetTypeTitle=0x7f040129;
public static final int taskCheckOrder=0x7f040082;
public static final int taskDetailTitle=0x7f040134;
public static final int taskDetailTitle2=0x7f040135;
public static final int taskListTitle=0x7f040132;
public static final int text_add_order=0x7f04017b;
public static final int text_alter_password=0x7f040175;
public static final int text_app_update=0x7f040171;
public static final int text_backup=0x7f04018e;
public static final int text_customer_amount=0x7f040180;
public static final int text_customer_info=0x7f040177;
public static final int text_data_backup=0x7f040172;
public static final int text_data_init=0x7f040174;
public static final int text_data_restore=0x7f040173;
public static final int text_data_sync=0x7f040186;
public static final int text_date_backup_name=0x7f040191;
public static final int text_delivered_title=0x7f04018a;
public static final int text_forecast_defend=0x7f040182;
public static final int text_forecast_report=0x7f040183;
public static final int text_menu=0x7f04016f;
public static final int text_order_alert_not_exist=0x7f04018c;
public static final int text_order_amount=0x7f040189;
public static final int text_order_amount_base=0x7f04018b;
public static final int text_order_category=0x7f040187;
public static final int text_order_symbol=0x7f040188;
public static final int text_order_up=0x7f040185;
public static final int text_product_amount=0x7f04017f;
public static final int text_product_info=0x7f040178;
public static final int text_report=0x7f040181;
public static final int text_restore=0x7f04018f;
public static final int text_search_order=0x7f04017d;
public static final int text_sign=0x7f040184;
public static final int text_sync_info=0x7f040179;
public static final int text_sync_settings=0x7f040170;
public static final int text_today_order=0x7f04017c;
public static final int text_unknown_err=0x7f040190;
public static final int text_update_rogram=0x7f04018d;
public static final int text_use_project=0x7f040176;
public static final int text_version_info=0x7f04017a;
public static final int text_yesterday_sales=0x7f04017e;
public static final int title_activity_assets_detail=0x7f040096;
public static final int title_activity_assets_detail_baseinfo=0x7f040097;
public static final int title_activity_assets_detail_beijianlist=0x7f040098;
public static final int title_activity_assets_fault_manage=0x7f040099;
public static final int title_activity_assets_query=0x7f040094;
public static final int title_activity_data_manage=0x7f04009d;
public static final int title_activity_error_edit=0x7f040090;
public static final int title_activity_fault_detail_show=0x7f04009e;
public static final int title_activity_get_photo=0x7f04009b;
public static final int title_activity_main_login=0x7f040091;
public static final int title_activity_scan_rfid_or_barcode=0x7f04009f;
public static final int title_activity_server_set=0x7f040092;
public static final int title_activity_web_service_call=0x7f0400a0;
public static final int title_activity_work_request_process=0x7f0400a2;
public static final int title_activity_work_request_report=0x7f0400a3;
public static final int title_app=0x7f0400a1;
public static final int updateAbnormalPrice=0x7f04008b;
public static final int updateOrderDetail=0x7f04008c;
public static final int updateOrderTable=0x7f040089;
public static final int updateProgram=0x7f0400e6;
public static final int updateStock=0x7f04008a;
public static final int updateTaskOrderTable=0x7f040088;
public static final int visitFilter=0x7f040117;
public static final int visitFilterLabel=0x7f040119;
public static final int visitListAddressLabel=0x7f040126;
public static final int visitListContactLabel=0x7f040125;
public static final int visitListDateLabel=0x7f040124;
public static final int visitNew=0x7f040116;
public static final int visitNewAssets=0x7f04012c;
public static final int visitNewOrder=0x7f04012a;
public static final int visitOldOrder=0x7f04012b;
public static final int visitSave=0x7f040118;
/** 拜访任务页面
*/
public static final int visitSearch=0x7f040115;
public static final int visitSearchCustCodeLabel=0x7f04011d;
public static final int visitSearchCustNameLabel=0x7f04011b;
public static final int visitSearchCustStyleLabel=0x7f04011c;
public static final int visitSearchTaskStatusLabel=0x7f04011e;
public static final int visitSearchTaskTempLabel=0x7f04011f;
public static final int visitSearchTaskTimeLabelPE=0x7f040121;
public static final int visitSearchTaskTimeLabelPS=0x7f040120;
public static final int visitSearchTaskTimeLabelVE=0x7f040123;
public static final int visitSearchTaskTimeLabelVS=0x7f040122;
public static final int visitSearchVisitTypeLabel=0x7f04011a;
public static final int visitStatusExecuteEnd=0x7f04012f;
public static final int visitStatusExecuting=0x7f04012e;
/** 任务状态
*/
public static final int visitStatusNotExecute=0x7f04012d;
public static final int visit_dt_label=0x7f04013a;
public static final int visit_e_dt_label=0x7f040139;
public static final int visit_s_dt_label=0x7f040138;
public static final int warn=0x7f0400f0;
public static final int weekreport_content=0x7f040142;
public static final int weekreport_plan=0x7f040141;
public static final int ws_UrlApk=0x7f04019b;
public static final int ws_changePasswordMethod=0x7f04019d;
public static final int ws_changePassword_nameSpace=0x7f04019c;
public static final int ws_customerInformationMethod=0x7f040199;
public static final int ws_downloadNewApk=0x7f04019a;
public static final int ws_method_=0x7f0401a0;
public static final int ws_method_Ws_Login=0x7f040197;
public static final int ws_method_getAndroidVersion=0x7f040198;
public static final int ws_nameSpace=0x7f040195;
public static final int ws_path_=0x7f04019f;
public static final int ws_path_Login=0x7f040196;
public static final int ws_path_changePassword=0x7f04019e;
public static final int ws_service_IP_default=0x7f040194;
/** 测试环境
*/
public static final int ws_sync_service_IP=0x7f040192;
public static final int ws_sync_service_port=0x7f040193;
public static final int yes=0x7f0400f1;
}
public static final class style {
/**
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f080007;
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f080000;
public static final int Dialog=0x7f080001;
public static final int DialogStyle=0x7f080004;
public static final int DialogText=0x7f080002;
public static final int DialogText_Title=0x7f080003;
public static final int my_dialog_style=0x7f080006;
public static final int shape_background_padding=0x7f080005;
}
public static final class styleable {
/** Attributes that can be used with a ReportSheet.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ReportSheet_frame_color com.cw.assetsrfid:frame_color}</code></td><td></td></tr>
</table>
@see #ReportSheet_frame_color
*/
public static final int[] ReportSheet = {
0x7f010000
};
/**
<p>This symbol is the offset where the {@link com.cw.assetsrfid.R.attr#frame_color}
attribute's value can be found in the {@link #ReportSheet} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:frame_color
*/
public static final int ReportSheet_frame_color = 0;
};
}
| [
"787859825@qq.com"
] | 787859825@qq.com |
b5870e2ca68b492f234496b1dab960e0ac6ae268 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--kotlin/05aaea48e9806eb73fe7c51ea2ad94711d543f69/before/JetObjectDeclaration.java | 122378f8f99a999a18898b973f010fb04dc3beaf | [] | 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,075 | java | /*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.lang.psi;
import com.intellij.lang.ASTNode;
import com.intellij.navigation.ItemPresentation;
import com.intellij.navigation.ItemPresentationProviders;
import com.intellij.psi.PsiElement;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.JetNodeTypes;
import org.jetbrains.jet.lang.psi.stubs.PsiJetObjectStub;
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
import org.jetbrains.jet.lexer.JetTokens;
import java.util.Collections;
import java.util.List;
public class JetObjectDeclaration extends JetNamedDeclarationStub<PsiJetObjectStub> implements JetClassOrObject {
public JetObjectDeclaration(@NotNull ASTNode node) {
super(node);
}
public JetObjectDeclaration(@NotNull PsiJetObjectStub stub) {
super(stub, JetStubElementTypes.OBJECT_DECLARATION);
}
@Override
public String getName() {
PsiJetObjectStub stub = getStub();
if (stub != null) {
return stub.getName();
}
JetObjectDeclarationName nameAsDeclaration = getNameAsDeclaration();
return nameAsDeclaration == null ? null : nameAsDeclaration.getName();
}
@Override
public boolean isTopLevel() {
PsiJetObjectStub stub = getStub();
if (stub != null) {
return stub.isTopLevel();
}
return getParent() instanceof JetFile;
}
@Override
public PsiElement getNameIdentifier() {
JetObjectDeclarationName nameAsDeclaration = getNameAsDeclaration();
return nameAsDeclaration == null ? null : nameAsDeclaration.getNameIdentifier();
}
@Override
public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {
JetObjectDeclarationName nameAsDeclaration = getNameAsDeclaration();
return nameAsDeclaration == null ? null : nameAsDeclaration.setName(name);
}
@Override
@Nullable
public JetObjectDeclarationName getNameAsDeclaration() {
return (JetObjectDeclarationName) findChildByType(JetNodeTypes.OBJECT_DECLARATION_NAME);
}
@Override
@Nullable
public JetModifierList getModifierList() {
if (isClassObject()) {
PsiElement parent = getParentByStub();
assert parent instanceof JetDeclaration;
return ((JetDeclaration)parent).getModifierList();
}
return super.getModifierList();
}
public boolean isClassObject() {
PsiJetObjectStub stub = getStub();
if (stub != null) {
return stub.isClassObject();
}
PsiElement parent = getParent();
return parent != null && parent.getNode().getElementType().equals(JetNodeTypes.CLASS_OBJECT);
}
@Nullable
public JetClassObject getClassObjectElement() {
if (!isClassObject()) {
return null;
}
return (JetClassObject) getParentByStub();
}
@Override
public boolean hasModifier(JetModifierKeywordToken modifier) {
JetModifierList modifierList = getModifierList();
return modifierList != null && modifierList.hasModifier(modifier);
}
@Override
@Nullable
public JetDelegationSpecifierList getDelegationSpecifierList() {
return getStubOrPsiChild(JetStubElementTypes.DELEGATION_SPECIFIER_LIST);
}
@Override
@NotNull
public List<JetDelegationSpecifier> getDelegationSpecifiers() {
JetDelegationSpecifierList list = getDelegationSpecifierList();
return list != null ? list.getDelegationSpecifiers() : Collections.<JetDelegationSpecifier>emptyList();
}
@Override
@NotNull
public List<JetClassInitializer> getAnonymousInitializers() {
JetClassBody body = getBody();
if (body == null) return Collections.emptyList();
return body.getAnonymousInitializers();
}
@Override
public boolean hasPrimaryConstructor() {
return true;
}
@Override
public JetClassBody getBody() {
return getStubOrPsiChild(JetStubElementTypes.CLASS_BODY);
}
@Override
public boolean isLocal() {
PsiJetObjectStub stub = getStub();
if (stub != null) {
return stub.isLocal();
}
return JetPsiUtil.isLocal(this);
}
@Override
@NotNull
public List<JetDeclaration> getDeclarations() {
JetClassBody body = getBody();
if (body == null) return Collections.emptyList();
return body.getDeclarations();
}
@Override
public <R, D> R accept(@NotNull JetVisitor<R, D> visitor, D data) {
return visitor.visitObjectDeclaration(this, data);
}
public boolean isObjectLiteral() {
PsiJetObjectStub stub = getStub();
if (stub != null) {
return stub.isObjectLiteral();
}
return getParent() instanceof JetObjectLiteralExpression;
}
@NotNull
public PsiElement getObjectKeyword() {
return findChildByType(JetTokens.OBJECT_KEYWORD);
}
@Override
public void delete() throws IncorrectOperationException {
JetPsiUtil.deleteClass(this);
}
@Override
public ItemPresentation getPresentation() {
return ItemPresentationProviders.getItemPresentation(this);
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
efb4e41e8349d90bc0b0c3ce8faec20af7720eb2 | 376641f400747cc5019a6c529519d5c85cdd9eca | /src/lec13/oop/polymorphism/overriding/UserTest.java | e50f2e4b1dbfddb5bffa48cf1a886e062b7b2405 | [] | no_license | kchhipa4u/JavaInitialConcepts | ed18c82d638537f2600d963ba7b5f457ebe2a3e8 | 244cc1749a184ac6e38917b62d78f161cce7db3f | refs/heads/master | 2021-01-21T16:45:42.509964 | 2017-12-28T02:04:55 | 2017-12-28T02:04:55 | 91,905,397 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 427 | java | package lec13.oop.polymorphism.overriding;
public class UserTest {
public static void main(String[] args) {
User u = new Staff();
// User u -> printUserType(), saveWebLink()
//new Staff() -> Can not call approveReview() of Staff
// -> printUserType(), saveWebLink() of Staff class wud get called
u.printUserType();
// Explicit Type Casting
((Staff) u).approveReview();
}
} | [
"kchhipa4u@gmail.com"
] | kchhipa4u@gmail.com |
c357aac60d5611cef94662ff5c240ffb3aa026fd | 6fcff825697f684fe46c20c6e2a0af501c540c1d | /phm-core/src/main/java/cz/simek/phm/config/JpaConfiguration.java | dedf7e1f8652a861227a2c77bda7bcd5c6dffc6a | [] | no_license | JenikNo4/phm | 0e99888084a0bca4f300b298e11aa99ef5d7acdb | f0b387c9b60446d7b7cfa728b5869c39060d0950 | refs/heads/master | 2021-01-17T08:47:43.893281 | 2017-10-13T19:54:00 | 2017-10-13T19:54:00 | 83,964,993 | 0 | 0 | null | 2017-10-13T19:54:01 | 2017-03-05T11:28:41 | CSS | UTF-8 | Java | false | false | 4,412 | java | package cz.simek.phm.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.naming.NamingException;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import java.util.Properties;
/**
* Created by jenik on 31.1.17.
*/
@Configuration
@EnableTransactionManagement
@PropertySource(value = {"classpath:application.properties"})
//@ComponentScan(basePackages = "cz.simek.phm")
public class JpaConfiguration extends CommonConfig {
private static final String CLOSE = "close";
@Autowired
private Environment environment;
@Bean
public DataSource dataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(environment.getRequiredProperty("jdbc.driverClassName"));
dataSource.setUrl(environment.getRequiredProperty("jdbc.url"));
dataSource.setUsername(environment.getRequiredProperty("jdbc.username"));
dataSource.setPassword(environment.getRequiredProperty("jdbc.password"));
return dataSource;
}
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() throws NamingException {
LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
factoryBean.setDataSource(dataSource());
factoryBean.setPackagesToScan(new String[]{"cz.simek.phm.model"});
factoryBean.setJpaVendorAdapter(jpaVendorAdapter());
factoryBean.setJpaProperties(jpaProperties());
return factoryBean;
}
/*
* Provider specific adapter.
*/
@Bean
public JpaVendorAdapter jpaVendorAdapter() {
HibernateJpaVendorAdapter hibernateJpaVendorAdapter = new HibernateJpaVendorAdapter();
return hibernateJpaVendorAdapter;
}
/*
* Here you can specify any provider specific properties.
*/
private Properties jpaProperties() {
Properties properties = new Properties();
properties.put("hibernate.dialect", environment.getRequiredProperty("hibernate.dialect"));
//properties.put("hibernate.hbm2ddl.auto", environment.getRequiredProperty("hibernate.hbm2ddl.auto"));
properties.put("hibernate.show_sql", environment.getRequiredProperty("hibernate.show_sql"));
properties.put("hibernate.format_sql", environment.getRequiredProperty("hibernate.format_sql"));
return properties;
}
@Bean
@Autowired
public PlatformTransactionManager transactionManager(EntityManagerFactory emf) {
JpaTransactionManager txManager = new JpaTransactionManager();
txManager.setEntityManagerFactory(emf);
return txManager;
}
/* private BoneCPDataSource datasourceCP() {
BoneCPDataSource ds = new BoneCPDataSource();
ds.setIdleMaxAge(getLong("ds.idle.max.age.mins"), TimeUnit.MINUTES);
ds.setIdleConnectionTestPeriod(getLong("ds.idle.connection.test.period.mins"), TimeUnit.MINUTES);
ds.setMaxConnectionsPerPartition(getInteger("ds.max.connections.per.partition"));
ds.setMinConnectionsPerPartition(getInteger("ds.min.connections.per.partition"));
ds.setPartitionCount(getInteger("ds.partition.count"));
ds.setAcquireIncrement(getInteger("ds.acquire.increment"));
ds.setStatementsCacheSize(getInteger("ds.statements.cache.size"));
ds.setReleaseHelperThreads(getInteger("ds.release.helper.threads"));
ds.setConnectionTestStatement(get("ds.connection.test.statement"));
ds.setConnectionTimeout(getLong("ds.connection.timeout.millis"), TimeUnit.MILLISECONDS);
ds.setDisableJMX(true);
ds.setLazyInit(true);
return ds;
}*/
}
| [
"JenikNo.4@centrum.cz"
] | JenikNo.4@centrum.cz |
6bf6878d692bf9a35419c920ab00805e5d812dfc | cec0c2fa585c3f788fc8becf24365e56bce94368 | /net/minecraft/server/packs/resources/ResourceManagerReloadListener.java | 3a1742511146675463aec0ef4ad1f065ed635a7d | [] | no_license | maksym-pasichnyk/Server-1.16.3-Remapped | 358f3c4816cbf41e137947329389edf24e9c6910 | 4d992e2d9d4ada3ecf7cecc039c4aa0083bc461e | refs/heads/master | 2022-12-15T08:54:21.236174 | 2020-09-19T16:13:43 | 2020-09-19T16:13:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,142 | java | /* */ package net.minecraft.server.packs.resources;
/* */
/* */ import java.util.concurrent.CompletableFuture;
/* */ import java.util.concurrent.Executor;
/* */ import net.minecraft.util.Unit;
/* */ import net.minecraft.util.profiling.ProfilerFiller;
/* */
/* */ public interface ResourceManagerReloadListener
/* */ extends PreparableReloadListener
/* */ {
/* */ default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier debug1, ResourceManager debug2, ProfilerFiller debug3, ProfilerFiller debug4, Executor debug5, Executor debug6) {
/* 12 */ return debug1.<Unit>wait(Unit.INSTANCE).thenRunAsync(() -> { debug1.startTick(); debug1.push("listener"); onResourceManagerReload(debug2); debug1.pop(); debug1.endTick(); }debug6);
/* */ }
/* */
/* */ void onResourceManagerReload(ResourceManager paramResourceManager);
/* */ }
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\deobfuscated.jar!\net\minecraft\server\packs\resources\ResourceManagerReloadListener.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/ | [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
e114e2df31664b5438140b8a6363dd39b7cf4904 | 6717cf77fe343992250af36dcdd5ccffbd9a2448 | /Lesson4/ScrumTask/src/main/java/com/ctco/testSchool/Team.java | 54ad4078c27b2852d97032c855f84a50685da742 | [] | no_license | maira-maksimova/automationSchool | b61fe79358f33e0db308a3d8ce280855bca8106d | 6292d7e332231028281ca88196aaba3758e15a9c | refs/heads/master | 2020-12-12T15:10:30.671822 | 2020-03-09T18:05:20 | 2020-03-09T18:05:20 | 234,157,198 | 0 | 0 | null | 2020-10-13T19:05:33 | 2020-01-15T19:32:48 | Java | UTF-8 | Java | false | false | 3,149 | java | package com.ctco.testSchool;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class Team {
private List<Member> members = new ArrayList<>();
public List<Story> backlog;
public int sprintDays = 10;
public void addMember(Member member) {
members.add(member);
}
public Double getTeamVelocity() {
Double velocity = 0.0;
for (Member m : members
) {
velocity += m.velocity * sprintDays;
}
return velocity;
}
public boolean canDo() {
Double capacity = getTeamVelocity();
for (Story s : backlog
) {
capacity -= s.storyPoints;
}
return capacity >= 0;
}
/*
Return true team has enough capacity to do both development ant testing (note tht testers only do testing and developers only do development)
This method do not support cross-functional team members capable doing both.
*/
public boolean canDeliverQuality() {
validateInputs();
for (Story story : backlog
) {
if ((story.storyPoints + story.testPoints) > sprintDays) return false;
}
return (canDeliver() && canTest());
}
private boolean canTest() {
return members.stream()
.filter(item -> item.testingSkills)
.mapToDouble(i -> i.velocity * sprintDays)
.sum() >= backlog.stream().mapToDouble(s -> s.testPoints).sum();
}
private void validateInputs() {
if (sprintDays < 2) throw new IllegalArgumentException("Sprint should be at least two days long");
members.stream()
.filter(item -> item.velocity <= 0)
.findAny()
.ifPresent(a -> {
throw new IllegalArgumentException("Velocity should be positive");
});
members.stream()
.filter(item -> item.velocity > 1)
.findAny()
.ifPresent(a -> {
throw new IllegalArgumentException("Velocity can't be more than 1");
});
}
/*
Return true if developers could do the development part, ignoring the fact that there could be not enough testers
*/
public boolean canDeliver() {
return members.stream()
.filter(item -> item.codinSkills)
.mapToDouble(i -> i.velocity * sprintDays)
.sum() >= backlog.stream().mapToDouble(s -> s.storyPoints).sum();
}
public static int getPrimeNumberClosesTo(int n) {
for (int c = 0, s = 0, d, N = n; c != 2; s++)
for (c = d = 1, n += n < N ? s : -s; d < n; ) if (n % ++d < 1) c++;
return n;
}
public static String getHelloWorldText() {
int hours = LocalDateTime.now().getHour();
switch (hours) {
case 8: case 9: case 10: case 11: return "Good morning world!";
case 12: case 13: case 14: case 15: case 16: return "Good day world!";
case 17: return "Hello world!";
default: return "Good night world!";
}
}
}
| [
"Maira_Maksimova@rcomext.com"
] | Maira_Maksimova@rcomext.com |
b697b2ddbc184dd1cc05319576376f9371f313fd | dbf44fc282aee9b3c5c8b2a2bd13d1ec26d2e688 | /Servidores/HibernateEjercicio2/src/java/Ayudante/Rental.java | 96a63f0d8e430af129ce867aacd58d1098fc2fff | [] | no_license | vlooy17/2DAW | 6fc82fafbdbcb0b7d72539022a5e5596c98b5041 | 8e327768749fd72b8eb8cfb5579e1677c07e7d9a | refs/heads/master | 2021-10-22T05:16:03.013372 | 2019-03-08T10:04:28 | 2019-03-08T10:04:28 | 159,320,038 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,530 | java | package Ayudante;
// Generated 18-ene-2019 9:42:46 by Hibernate Tools 4.3.1
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* Rental generated by hbm2java
*/
public class Rental implements java.io.Serializable {
private Integer rentalId;
private Customer customer;
private Inventory inventory;
private Staff staff;
private Date rentalDate;
private Date returnDate;
private Date lastUpdate;
private Set payments = new HashSet(0);
public Rental() {
}
public Rental(Customer customer, Inventory inventory, Staff staff, Date rentalDate, Date lastUpdate) {
this.customer = customer;
this.inventory = inventory;
this.staff = staff;
this.rentalDate = rentalDate;
this.lastUpdate = lastUpdate;
}
public Rental(Customer customer, Inventory inventory, Staff staff, Date rentalDate, Date returnDate, Date lastUpdate, Set payments) {
this.customer = customer;
this.inventory = inventory;
this.staff = staff;
this.rentalDate = rentalDate;
this.returnDate = returnDate;
this.lastUpdate = lastUpdate;
this.payments = payments;
}
public Integer getRentalId() {
return this.rentalId;
}
public void setRentalId(Integer rentalId) {
this.rentalId = rentalId;
}
public Customer getCustomer() {
return this.customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public Inventory getInventory() {
return this.inventory;
}
public void setInventory(Inventory inventory) {
this.inventory = inventory;
}
public Staff getStaff() {
return this.staff;
}
public void setStaff(Staff staff) {
this.staff = staff;
}
public Date getRentalDate() {
return this.rentalDate;
}
public void setRentalDate(Date rentalDate) {
this.rentalDate = rentalDate;
}
public Date getReturnDate() {
return this.returnDate;
}
public void setReturnDate(Date returnDate) {
this.returnDate = returnDate;
}
public Date getLastUpdate() {
return this.lastUpdate;
}
public void setLastUpdate(Date lastUpdate) {
this.lastUpdate = lastUpdate;
}
public Set getPayments() {
return this.payments;
}
public void setPayments(Set payments) {
this.payments = payments;
}
}
| [
"38718958+vlooy17@users.noreply.github.com"
] | 38718958+vlooy17@users.noreply.github.com |
78fa952fef581f83811d5347636b68ba8c03ee58 | 0705dcf18db99ec516e3d80e904f8f34073a1266 | /benchmark/test/com/facebook/litho/ComponentLifecycleTest.java | 55ff435ed10da1cacf3b8be2f02c2f2f5b7ed32c | [] | no_license | P79N6A/dspot-experiments | 913821aa471266c10fd2bd138b0829cb601b1075 | 56c35eb4745b624f348237bc444382a35bb9b471 | refs/heads/master | 2020-04-28T03:47:25.087214 | 2019-03-11T07:46:25 | 2019-03-11T07:46:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 22,339 | java | /**
* Copyright 2014-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.litho;
import MountType.DRAWABLE;
import com.facebook.infer.annotation.OkToExtend;
import com.facebook.litho.ComponentLifecycle.MountType;
import com.facebook.litho.config.ComponentsConfiguration;
import com.facebook.litho.testing.testrunner.ComponentsTestRunner;
import com.facebook.yoga.YogaMeasureFunction;
import com.facebook.yoga.YogaMeasureOutput;
import com.facebook.yoga.YogaNode;
import junit.framework.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
import org.mockito.internal.verification.VerificationModeFactory;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.rule.PowerMockRule;
/**
* Tests {@link ComponentLifecycle}
*/
@PrepareForTest({ InternalNode.class, DiffNode.class, LayoutState.class })
@PowerMockIgnore({ "org.mockito.*", "org.robolectric.*", "androidx.*", "android.*" })
@RunWith(ComponentsTestRunner.class)
public class ComponentLifecycleTest {
@Rule
public PowerMockRule mPowerMockRule = new PowerMockRule();
private static final int A_HEIGHT = 11;
private static final int A_WIDTH = 12;
private int mNestedTreeWidthSpec;
private int mNestedTreeHeightSpec;
private InternalNode mNode;
private YogaNode mYogaNode;
private DiffNode mDiffNode;
private ComponentContext mContext;
private boolean mPreviousOnErrorConfig;
@Test
public void testCreateLayoutWithNullComponentWithLayoutSpecCannotMeasure() {
Component component = setUpSpyLayoutSpecWithNullLayout();
component.createLayout(mContext, false);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(component, Mockito.never()).onPrepare(mContext);
}
@Test
public void testCreateLayoutWithNullComponentWithLayoutSpecCanMeasure() {
Component component = setUpSpyLayoutSpecWithNullLayout();
component.createLayout(mContext, false);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(component, Mockito.never()).onPrepare(mContext);
}
@Test
public void testCreateLayoutWithNullComponentWithMountSpecCannotMeasure() {
Component component = setUpSpyLayoutSpecWithNullLayout();
component.createLayout(mContext, false);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(component, Mockito.never()).onPrepare(mContext);
}
@Test
public void testCreateLayoutWithNullComponentWithMountSpecCanMeasure() {
Component component = setUpSpyLayoutSpecWithNullLayout();
component.createLayout(mContext, false);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(component, Mockito.never()).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndResolveNestedTreeWithMountSpecCannotMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(true, false);
component.createLayout(mContext, true);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode, Mockito.never()).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndDontResolveNestedTreeWithMountSpecCannotMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(true, false);
component.createLayout(mContext, false);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode, Mockito.never()).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndResolveNestedTreeWithMountSpecCanMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(true, true);
component.createLayout(mContext, true);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndDontResolveNestedTreeWithMountSpecCanMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(true, true);
component.createLayout(mContext, false);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndResolveNestedTreeWithLayoutSpecCannotMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(false, false);
component.createLayout(mContext, true);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode, Mockito.never()).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndDontResolveNestedTreeWithLayoutSpecCannotMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(false, false);
component.createLayout(mContext, false);
Mockito.verify(component).onCreateLayout(mContext);
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode, Mockito.never()).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndResolveNestedTreeWithLayoutSpecCanMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(false, true);
mContext.setWidthSpec(mNestedTreeWidthSpec);
mContext.setHeightSpec(mNestedTreeHeightSpec);
component.createLayout(mContext, true);
Mockito.verify(component).onCreateLayoutWithSizeSpec(mContext, mNestedTreeWidthSpec, mNestedTreeHeightSpec);
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode, Mockito.never()).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component).onPrepare(mContext);
}
@Test
public void testCreateLayoutAndDontResolveNestedTreeWithLayoutSpecCanMeasure() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(false, true);
component.createLayout(mContext, false);
PowerMockito.verifyStatic();
// Calling here to verify static call.
InternalNode.createInternalNode(mContext);
Mockito.verify(component, Mockito.never()).onCreateLayout(ArgumentMatchers.any(ComponentContext.class));
Mockito.verify(component, Mockito.never()).onCreateLayoutWithSizeSpec(ArgumentMatchers.any(ComponentContext.class), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt());
Mockito.verify(mNode).appendComponent(component);
Mockito.verify(mNode).setMeasureFunction(ArgumentMatchers.any(YogaMeasureFunction.class));
Mockito.verify(component, Mockito.never()).onPrepare(ArgumentMatchers.any(ComponentContext.class));
}
@Test
public void testOnShouldCreateLayoutWithNewSizeSpec_FirstCall() {
ComponentsConfiguration.isNestedTreeResolutionExperimentEnabled = true;
ComponentsConfiguration.enableShouldCreateLayoutWithNewSizeSpec = true;
Component component;
component = new ComponentLifecycleTest.SpyComponentBuilder().setNode(mNode).canMeasure(true).isMountSpec(false).hasState(true).isLayoutSpecWithSizeSpecCheck(true).build(mContext);
component.createLayout(mContext, true);
// onShouldCreateLayoutWithNewSizeSpec should not be called the first time
Mockito.verify(component, Mockito.never()).onShouldCreateLayoutWithNewSizeSpec(ArgumentMatchers.any(ComponentContext.class), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt());
Mockito.verify(component).onCreateLayoutWithSizeSpec(mContext, mContext.getWidthSpec(), mContext.getHeightSpec());
ComponentsConfiguration.enableShouldCreateLayoutWithNewSizeSpec = false;
ComponentsConfiguration.isNestedTreeResolutionExperimentEnabled = false;
}
@Test
public void testOnShouldCreateLayoutWithNewSizeSpec_shouldUseCache() {
ComponentsConfiguration.isNestedTreeResolutionExperimentEnabled = true;
ComponentsConfiguration.enableShouldCreateLayoutWithNewSizeSpec = true;
Component component;
InternalNode holder = mock(InternalNode.class);
InternalNode resolved = mock(InternalNode.class);
component = new ComponentLifecycleTest.SpyComponentBuilder().setNode(mNode).canMeasure(true).isMountSpec(false).isLayoutSpecWithSizeSpecCheck(true).hasState(true).build(mContext);
Mockito.when(holder.getRootComponent()).thenReturn(component);
Mockito.when(LayoutState.resolveNestedTree(mContext, holder, 100, 100)).thenCallRealMethod();
Mockito.when(LayoutState.createAndMeasureTreeForComponent(mContext, component, holder, 100, 100, null)).thenReturn(resolved);
// call resolve nested tree 1st time
InternalNode result = LayoutState.resolveNestedTree(mContext, holder, 100, 100);
PowerMockito.verifyStatic();
// it should call create and measure
LayoutState.createAndMeasureTreeForComponent(mContext, component, holder, 100, 100, null);
// should return nested tree next time
Mockito.when(holder.getNestedTree()).thenReturn(result);
// should use previous layout in next call
doReturn(true).when(component).canUsePreviousLayout(ArgumentMatchers.any(ComponentContext.class));
// call resolve nested tree 1st time
LayoutState.resolveNestedTree(mContext, holder, 100, 100);
// no new invocation of create
PowerMockito.verifyStatic(VerificationModeFactory.times(1));
LayoutState.createAndMeasureTreeForComponent(mContext, component, holder, 100, 100, null);
// should only measure
PowerMockito.verifyStatic(VerificationModeFactory.times(1));
LayoutState.remeasureTree(resolved, 100, 100);
ComponentsConfiguration.enableShouldCreateLayoutWithNewSizeSpec = false;
ComponentsConfiguration.isNestedTreeResolutionExperimentEnabled = false;
}
@Test
public void testOnShouldCreateLayoutWithNewSizeSpec_shouldNotUseCache() {
ComponentsConfiguration.isNestedTreeResolutionExperimentEnabled = true;
ComponentsConfiguration.enableShouldCreateLayoutWithNewSizeSpec = true;
Component component;
InternalNode holder = mock(InternalNode.class);
InternalNode resolved = mock(InternalNode.class);
component = new ComponentLifecycleTest.SpyComponentBuilder().setNode(mNode).canMeasure(true).isMountSpec(false).isLayoutSpecWithSizeSpecCheck(true).hasState(true).build(mContext);
Mockito.when(holder.getRootComponent()).thenReturn(component);
Mockito.when(LayoutState.resolveNestedTree(mContext, holder, 100, 100)).thenCallRealMethod();
Mockito.when(LayoutState.createAndMeasureTreeForComponent(mContext, component, holder, 100, 100, null)).thenReturn(resolved);
// call resolve nested tree 1st time
InternalNode result = LayoutState.resolveNestedTree(mContext, holder, 100, 100);
PowerMockito.verifyStatic();
// it should call create and measure
LayoutState.createAndMeasureTreeForComponent(mContext, component, holder, 100, 100, null);
// should return nested tree next time
Mockito.when(holder.getNestedTree()).thenReturn(result);
// should use previous layout in next call
doReturn(false).when(component).canUsePreviousLayout(ArgumentMatchers.any(ComponentContext.class));
// call resolve nested tree 1st time
LayoutState.resolveNestedTree(mContext, holder, 100, 100);
// a new invocation of create
PowerMockito.verifyStatic(VerificationModeFactory.times(2));
LayoutState.createAndMeasureTreeForComponent(mContext, component, holder, 100, 100, null);
ComponentsConfiguration.enableShouldCreateLayoutWithNewSizeSpec = false;
ComponentsConfiguration.isNestedTreeResolutionExperimentEnabled = false;
}
@Test
public void testOnMeasureNotOverriden() {
Component component = setUpSpyComponentForCreateLayout(true, true);
YogaMeasureFunction measureFunction = getMeasureFunction(component);
try {
measureFunction.measure(mYogaNode, 0, EXACTLY, 0, EXACTLY);
Assert.fail();
} catch (Exception e) {
assertThat(e).isExactlyInstanceOf(IllegalStateException.class);
assertThat(e.getMessage()).contains("canMeasure()");
}
}
@Test
public void testMountSpecYogaMeasureOutputNotSet() {
Component component = new ComponentLifecycleTest.TestMountSpecWithEmptyOnMeasure(mNode);
YogaMeasureFunction measureFunction = getMeasureFunction(component);
try {
measureFunction.measure(mYogaNode, 0, EXACTLY, 0, EXACTLY);
Assert.fail();
} catch (Exception e) {
assertThat(e).isExactlyInstanceOf(IllegalStateException.class);
assertThat(e.getMessage()).contains("MeasureOutput not set");
}
}
@Test
public void testMountSpecYogaMeasureOutputSet() {
Component component = new ComponentLifecycleTest.TestMountSpecSettingSizesInOnMeasure(mNode);
YogaMeasureFunction measureFunction = getMeasureFunction(component);
long output = measureFunction.measure(mYogaNode, 0, EXACTLY, 0, EXACTLY);
assertThat(YogaMeasureOutput.getWidth(output)).isEqualTo(ComponentLifecycleTest.A_WIDTH);
assertThat(YogaMeasureOutput.getHeight(output)).isEqualTo(ComponentLifecycleTest.A_HEIGHT);
}
@Test
public void testLayoutSpecMeasureResolveNestedTree() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(false, true);
YogaMeasureFunction measureFunction = getMeasureFunction(component);
final int nestedTreeWidth = 20;
final int nestedTreeHeight = 25;
InternalNode nestedTree = mock(InternalNode.class);
Mockito.when(nestedTree.getWidth()).thenReturn(nestedTreeWidth);
Mockito.when(nestedTree.getHeight()).thenReturn(nestedTreeHeight);
Mockito.when(LayoutState.resolveNestedTree(ArgumentMatchers.eq(mContext), ArgumentMatchers.eq(mNode), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())).thenReturn(nestedTree);
Mockito.when(mNode.getContext()).thenReturn(mContext);
long output = measureFunction.measure(mYogaNode, 0, EXACTLY, 0, EXACTLY);
PowerMockito.verifyStatic();
LayoutState.resolveNestedTree(ArgumentMatchers.eq(mContext), ArgumentMatchers.eq(mNode), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt());
assertThat(YogaMeasureOutput.getWidth(output)).isEqualTo(nestedTreeWidth);
assertThat(YogaMeasureOutput.getHeight(output)).isEqualTo(nestedTreeHeight);
}
@Test
public void testLayoutSpecMeasureResolveNestedTree_withExperiment() {
Component component = /* isMountSpec */
/* canMeasure */
setUpSpyComponentForCreateLayout(false, true);
YogaMeasureFunction measureFunction = getMeasureFunction(component);
final int nestedTreeWidth = 20;
final int nestedTreeHeight = 25;
InternalNode nestedTree = mock(InternalNode.class);
Mockito.when(nestedTree.getWidth()).thenReturn(nestedTreeWidth);
Mockito.when(nestedTree.getHeight()).thenReturn(nestedTreeHeight);
Mockito.when(LayoutState.resolveNestedTree(ArgumentMatchers.eq(mContext), ArgumentMatchers.eq(mNode), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())).thenReturn(nestedTree);
Mockito.when(mNode.getContext()).thenReturn(mContext);
Mockito.when(mContext.isNestedTreeResolutionExperimentEnabled()).thenReturn(true);
Mockito.when(mNode.getParent()).thenReturn(mNode);
Mockito.when(mNode.getContext()).thenReturn(mContext);
long output = measureFunction.measure(mYogaNode, 0, EXACTLY, 0, EXACTLY);
PowerMockito.verifyStatic();
LayoutState.resolveNestedTree(ArgumentMatchers.eq(mContext), ArgumentMatchers.eq(mNode), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt());
assertThat(YogaMeasureOutput.getWidth(output)).isEqualTo(nestedTreeWidth);
assertThat(YogaMeasureOutput.getHeight(output)).isEqualTo(nestedTreeHeight);
}
@OkToExtend
private static class TestBaseComponent extends Component {
private final boolean mCanMeasure;
private final MountType mMountType;
private final InternalNode mNode;
private final boolean mIsLayoutSpecWithSizeSpecCheck;
private final boolean mHasState;
TestBaseComponent(boolean canMeasure, MountType mountType, InternalNode node, boolean isLayoutSpecWithSizeSpecCheck, boolean hasState) {
super("TestBaseComponent");
mCanMeasure = canMeasure;
mMountType = mountType;
mNode = node;
mIsLayoutSpecWithSizeSpecCheck = isLayoutSpecWithSizeSpecCheck;
mHasState = hasState;
}
@Override
public boolean isEquivalentTo(Component other) {
return (this) == other;
}
@Override
protected Component onCreateLayout(ComponentContext c) {
return this;
}
@Override
protected Component onCreateLayoutWithSizeSpec(ComponentContext c, int widthSpec, int heightSpec) {
return this;
}
@Override
protected ComponentLayout resolve(ComponentContext c) {
return mNode;
}
@Override
protected boolean canMeasure() {
return mCanMeasure;
}
@Override
public MountType getMountType() {
return mMountType;
}
@Override
protected boolean hasState() {
return mHasState;
}
@Override
protected boolean isLayoutSpecWithSizeSpecCheck() {
return mIsLayoutSpecWithSizeSpecCheck;
}
@Override
protected boolean canUsePreviousLayout(ComponentContext context) {
return super.canUsePreviousLayout(context);
}
}
static class SpyComponentBuilder {
private boolean mCanMeasure = false;
private MountType mMountType = MountType.NONE;
private InternalNode mNode = null;
private boolean mIsLayoutSpecWithSizeSpecCheck = false;
private boolean mHasState = false;
ComponentLifecycleTest.SpyComponentBuilder canMeasure(boolean canMeasure) {
this.mCanMeasure = canMeasure;
return this;
}
ComponentLifecycleTest.SpyComponentBuilder isMountSpec(boolean isMountSpec) {
this.mMountType = (isMountSpec) ? MountType.DRAWABLE : MountType.NONE;
return this;
}
ComponentLifecycleTest.SpyComponentBuilder setNode(InternalNode node) {
this.mNode = node;
return this;
}
ComponentLifecycleTest.SpyComponentBuilder isLayoutSpecWithSizeSpecCheck(boolean isLayoutSpecWithSizeSpecCheck) {
this.mIsLayoutSpecWithSizeSpecCheck = isLayoutSpecWithSizeSpecCheck;
return this;
}
ComponentLifecycleTest.SpyComponentBuilder hasState(boolean hasState) {
this.mHasState = hasState;
return this;
}
Component build(ComponentContext context) {
return ComponentLifecycleTest.createSpyComponent(context, new ComponentLifecycleTest.TestBaseComponent(mCanMeasure, mMountType, mNode, mIsLayoutSpecWithSizeSpecCheck, mHasState));
}
}
private static class TestMountSpecWithEmptyOnMeasure extends ComponentLifecycleTest.TestBaseComponent {
TestMountSpecWithEmptyOnMeasure(InternalNode node) {
super(true, DRAWABLE, node, false, false);
}
@Override
protected void onMeasure(ComponentContext c, ComponentLayout layout, int widthSpec, int heightSpec, Size size) {
}
}
private static class TestMountSpecSettingSizesInOnMeasure extends ComponentLifecycleTest.TestMountSpecWithEmptyOnMeasure {
TestMountSpecSettingSizesInOnMeasure(InternalNode node) {
super(node);
}
@Override
protected void onMeasure(ComponentContext context, ComponentLayout layout, int widthSpec, int heightSpec, Size size) {
size.width = ComponentLifecycleTest.A_WIDTH;
size.height = ComponentLifecycleTest.A_HEIGHT;
}
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
7c82a12c4e6ddbd5ed533678f8d968ba6ad58045 | 2610f302660eee98f1a88357834f7a3b12c54a20 | /sistemavendas-tcc/src/main/java/com/sistemavendastcc/api/controller/ClienteController.java | 47adc29136e3ca5461e45c362943eb6853c07cd4 | [] | no_license | JulioAugusto9/sistemavendastcc-api | 52d77a24fc00b6a8b68589edb36777963442c1b5 | b4fc90f84cd5488e0ef3dd59744a327d20f80d08 | refs/heads/main | 2023-05-14T22:51:19.797488 | 2021-06-11T20:09:02 | 2021-06-11T20:09:02 | 353,519,542 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,350 | java | package com.sistemavendastcc.api.controller;
import java.time.LocalDate;
import java.util.List;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.sistemavendastcc.api.model.ClientePagination;
import com.sistemavendastcc.domain.exception.EntidadeNaoEncontradaException;
import com.sistemavendastcc.domain.model.Cliente;
import com.sistemavendastcc.domain.model.PessoaFisica;
import com.sistemavendastcc.domain.model.PessoaJuridica;
import com.sistemavendastcc.domain.repository.ClienteRepository;
import com.sistemavendastcc.domain.repository.PessoaFisicaRepository;
import com.sistemavendastcc.domain.repository.PessoaJuridicaRepository;
@RestController
@CrossOrigin
@RequestMapping("/clientes")
public class ClienteController {
@Autowired
PessoaFisicaRepository pessoaFisicaRepo;
@Autowired
PessoaJuridicaRepository pessoaJuridicaRepo;
@Autowired
ClienteRepository clienteRepository;
@GetMapping
public ClientePagination listar(@RequestParam(required = false) String nome,
@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer itemsPerPage) {
if (nome == null) nome = "";
if (page == null) page = 0;
else page--;
if (itemsPerPage == null) itemsPerPage = 6;
Long totalPages = clienteRepository.countByNomeContaining(nome);
totalPages = totalPages / itemsPerPage + (totalPages % itemsPerPage > 0 ? 1 : 0);
if (totalPages == 0) totalPages = 1L;
ClientePagination clientePagination = new ClientePagination();
clientePagination.setTotalPages(totalPages);
Pageable pageable = PageRequest.of(page, itemsPerPage);
clientePagination.setClientes(clienteRepository.findByNomeContaining(nome, pageable));
return clientePagination;
}
@PostMapping("/pessoafisica")
@ResponseStatus(HttpStatus.CREATED)
public Cliente criar(@Valid @RequestBody PessoaFisica cliente) {
cliente.setDataInclusao(LocalDate.now());
cliente.setTipo("pessoafisica");
return pessoaFisicaRepo.save(cliente);
}
@PutMapping("/pessoafisica/{clienteId}")
@ResponseStatus(HttpStatus.OK)
public Cliente alterar(@PathVariable Long clienteId, @Valid @RequestBody PessoaFisica cliente) {
if (!clienteRepository.existsById(clienteId))
throw new EntidadeNaoEncontradaException("Cliente não encontrado");
return pessoaFisicaRepo.save(cliente);
}
@PostMapping("/pessoajuridica")
@ResponseStatus(HttpStatus.CREATED)
public Cliente criar(@Valid @RequestBody PessoaJuridica cliente) {
cliente.setDataInclusao(LocalDate.now());
cliente.setTipo("pessoajuridica");
return pessoaJuridicaRepo.save(cliente);
}
@PutMapping("/pessoajuridica/{clienteId}")
@ResponseStatus(HttpStatus.OK)
public Cliente alterar(@PathVariable Long clienteId, @Valid @RequestBody PessoaJuridica cliente) {
if (!clienteRepository.existsById(clienteId))
throw new EntidadeNaoEncontradaException("Cliente não encontrado");
return pessoaJuridicaRepo.save(cliente);
}
@GetMapping("/{clienteId}")
@ResponseStatus(HttpStatus.OK)
public Cliente achar(@PathVariable Long clienteId) {
return clienteRepository.findById(clienteId)
.orElseThrow(() -> new EntidadeNaoEncontradaException("Cliente não encontrado"));
}
@DeleteMapping("/{clienteId}")
@ResponseStatus(HttpStatus.OK)
public Long excluir(@PathVariable Long clienteId) {
if (!clienteRepository.existsById(clienteId))
throw new EntidadeNaoEncontradaException("Cliente não encontrado");
clienteRepository.deleteById(clienteId);
return clienteId;
}
}
| [
"JULIOAUGUSTORIBEIROD@DESKTOP-BFTTAAQ"
] | JULIOAUGUSTORIBEIROD@DESKTOP-BFTTAAQ |
99a5e108b3759e0d91f108fcf4a2c184ffbf832a | 70f7a06017ece67137586e1567726579206d71c7 | /alimama/src/main/java/com/alipay/sdk/widget/p.java | 792c47f857664b6ee909ba7ec2e21ccafbed79b5 | [] | no_license | liepeiming/xposed_chatbot | 5a3842bd07250bafaffa9f468562021cfc38ca25 | 0be08fc3e1a95028f8c074f02ca9714dc3c4dc31 | refs/heads/master | 2022-12-20T16:48:21.747036 | 2020-10-14T02:37:49 | 2020-10-14T02:37:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 428 | java | package com.alipay.sdk.widget;
import android.content.DialogInterface;
import com.alipay.sdk.app.j;
class p implements DialogInterface.OnClickListener {
final /* synthetic */ n a;
p(n nVar) {
this.a = nVar;
}
public void onClick(DialogInterface dialogInterface, int i) {
this.a.a.cancel();
boolean unused = this.a.b.w = false;
j.a(j.c());
this.a.b.a.finish();
}
}
| [
"zhangquan@snqu.com"
] | zhangquan@snqu.com |
8e3f92f27ddbd5bc02bfe0e52c649acf3ce7c492 | fe9fdb6dd4b0d2befff85d15be4b1295a7b8d230 | /src/main/java/com/wuchao/test/webservice/User.java | 4ae6f30a5f6c7f9fc4fb66660a50d86ec3b650bd | [] | no_license | wuchaodzxx/Koala | d02ebba0862a68e1db4198903509d6a8830fab15 | 9d140dda9282fff2376478d0d69027595a2f4f18 | refs/heads/master | 2021-01-01T04:46:35.465516 | 2017-07-22T11:22:26 | 2017-07-22T11:22:26 | 97,239,155 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 773 | java | package com.wuchao.test.webservice;
public class User {
int id ;
String name = null;
String address = null;
String email = null;
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 getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
| [
"wuchaodzxx@126.com"
] | wuchaodzxx@126.com |
7a2905f4fd778d733d7355aa75db57c2ca39a50d | b4d7feb5dbb7b59e9924074dc329cf2cd269e7a7 | /Pegadaian/src/daoimpl/NasabahDAOimpl.java | bd41b2d9d6457976f4d93157c7e19787a3c737d5 | [] | no_license | rulie/CRUD-Java-Swing | cae75f76ca22a016d2eb07d7941cff93eae4a83a | 538cf516718eb67d545001b5f1cc08b2fcb829c7 | refs/heads/master | 2021-06-26T22:51:19.941358 | 2017-09-18T03:10:50 | 2017-09-18T03:10:50 | 103,882,155 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 734 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package daoimpl;
import dao.NasabahDAO;
import java.util.List;
import model.Nasabah;
/**
*
* @author RuliKA
*/
public class NasabahDAOimpl extends GeneralDAOimpl implements NasabahDAO{
@Override
public List<Nasabah> getAll() {
return em.createQuery("select n from Nasabah n").getResultList();
}
@Override
public Nasabah getById(long id) {
return em.find(Nasabah.class, id);
}
@Override
public Nasabah getByNama(String nama) {
return (Nasabah)em.createQuery("select n from Nasabah n where n.namaNasabah =?1").setParameter(1, nama).getSingleResult();
}
}
| [
"ruli.an@students.amikom.ac.id"
] | ruli.an@students.amikom.ac.id |
a790158212f18101e53c485ef23a88eb1d15bdec | 2dc7098aaaa3fa6468c52ae3ef6f4798b429a5ad | /CalcFromString/src/Operations/Ariphmetics.java | 9e414ba0919595a91697df2a3a96cc6f703589d5 | [] | no_license | RodionovViktor/JavaWork | 302f52550743479e7de146bb96e048a32569ed53 | 50d71e3070f9bae81127e48cf82cd6813c9b4f53 | refs/heads/master | 2022-11-17T10:16:59.330722 | 2020-07-14T09:16:14 | 2020-07-14T09:16:14 | 279,534,791 | 0 | 0 | null | null | null | null | WINDOWS-1251 | Java | false | false | 559 | java | package Operations;
import Data.DataCalc;
public class Ariphmetics {
// для вычислений на основе передаваемого оператора
public static int resGet(DataCalc dataCalc) {
int a = dataCalc.aGet();
int b = dataCalc.bGet();
char sOper = dataCalc.sumbOperGet();
int result=0;
switch (sOper) {
case '*':
result = a*b;
break;
case '+':
result = a+b;
break;
case '-':
result = a-b;
break;
case '/':
result = a/b;
break;
default:
break;
}
return result;
}
}
| [
"litesoftcreator@gmail.com"
] | litesoftcreator@gmail.com |
1fb93f733e35b2ab7a57136e2c7bb2a7a1eecfae | 69787a93753b3ae419ba750068ea2908af63a7be | /app/src/main/java/com/masa34/nk225analyzer/Task/Nk225CsvReader.java | 33e82d66502a15d512f20a7689742679ac32cd0a | [] | no_license | masa34/Nk225Analyzer | a83b2617ee22e572efe527a1fd0cf7a68538d91c | 3379ab32f068352f9734212d9c53c9cc15194e18 | refs/heads/master | 2021-01-11T09:15:28.947723 | 2020-01-05T14:42:47 | 2020-01-05T14:42:47 | 77,237,244 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,632 | java | package com.masa34.nk225analyzer.Task;
import android.util.Log;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Nk225CsvReader {
private final String TAG = "Nk225CsvReader";
public static interface CsvReadCallBack {
public void onPreCsvRead();
public void onCsvRead(String[] values);
public void onPostCsvRead(boolean result);
}
private CsvReadCallBack callBack;
public Nk225CsvReader(CsvReadCallBack callBack) {
Log.d(TAG, "Nk225CsvReader");
this.callBack = callBack;
}
public boolean execute(URL url) {
boolean result = true;
HttpURLConnection urlConnection = null;
InputStream inputStream = null;
if (callBack != null) {
callBack.onPreCsvRead();
}
try {
final int TIMEOUT_READ = 5000;
final int TIMEOUT_CONNECT = 30000;
urlConnection = (HttpURLConnection)url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.setDoInput(true);
urlConnection.setDoOutput(false);
urlConnection.setReadTimeout(TIMEOUT_READ);
urlConnection.setConnectTimeout(TIMEOUT_CONNECT);
urlConnection.setInstanceFollowRedirects(true);
urlConnection.setRequestProperty("User-Agent", "");
urlConnection.connect();
inputStream = urlConnection.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "Shift-JIS"));
String line;
while ((line = reader.readLine()) != null) {
Log.d(TAG, line);
if (callBack != null) {
String[] values = line.replace("\"", "").split(",", 0);
callBack.onCsvRead(values);
}
}
} catch (IOException e) {
e.printStackTrace();
Log.e(TAG, e.toString());
result = false;
} finally {
try {
if (inputStream != null) {
inputStream.close();
}
if (urlConnection != null) {
urlConnection.disconnect();
}
} catch (Exception e) {
Log.e(TAG, e.toString());
result = false;
}
}
if (callBack != null) {
callBack.onPostCsvRead(result);
}
return result;
}
}
| [
"masa34.sato@nifty.com"
] | masa34.sato@nifty.com |
43f7f04d6ea3a4e472b19e0e2759b90fcb11712c | cf012d9b928a08c449de10e0941896d134bdeaed | /converter/src/main/java/ru/ilka/converter/controller/api/Converter.java | 24c88c96632d0087234e98987f70dda3da7423c9 | [] | no_license | llka/story-points-converter | 88a8b3a52730aa4c0b8f2194d60365ce9b9e0f49 | c0a4571849dab42bc35e88090a42eb7db5913d7d | refs/heads/master | 2020-07-03T13:21:33.678887 | 2019-08-13T13:35:31 | 2019-08-13T13:35:31 | 201,918,223 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 310 | java | package ru.ilka.converter.controller.api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
public interface Converter {
@GetMapping(path = "convert/{hours}")
Integer convertHoursToStoryPoints(@PathVariable("hours") int hours);
}
| [
"st.ilka@mail.ru"
] | st.ilka@mail.ru |
faf63eae512cf6af3fb264b794c64cd9e86202d4 | b782e5516394b7e511ffd4717f2eda8bc192601b | /src/net/pixelatedd3v/bossmessenger/ui/gui/dialogs/AnvilEnterListener.java | e37f5298ba55b8401ab0b80b5d9cd08c6a58e9b9 | [] | no_license | VictorGasnikov/BossMessenger | 44ef9555c7b23cf6fd93a85a4a94e67517ce50d5 | 6f2c9e8285008cdece7a8da850c578dd69fe681e | refs/heads/master | 2020-04-14T09:56:26.994082 | 2019-01-01T23:45:46 | 2019-01-01T23:45:46 | 163,773,338 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 132 | java | package net.pixelatedd3v.bossmessenger.ui.gui.dialogs;
public interface AnvilEnterListener {
public void onEnter(String input);
}
| [
"rcl2748@ya.ru"
] | rcl2748@ya.ru |
eacd4e87b4de58bafa16142ee42f34689d3cb6ff | 5e8a5bd446cbb82879f4163569b10b43d4089c07 | /src/com/las/WebData/entity/ElsevierproductsId.java | 6227525a2a6b18f7e6bd20500d70f99490bf3bcf | [] | no_license | qcy961011/WebData | 9de57e739a0a9832da9332212efd029239455158 | 7bdb596497a7755a0ad86c00859c4c94f3c6f663 | refs/heads/master | 2020-03-21T23:52:22.358729 | 2018-06-30T01:50:13 | 2018-06-30T01:50:13 | 139,210,886 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,192 | java | package com.las.WebData.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
* ElsevierproductsId generated by hbm2java
*/
@Embeddable
public class ElsevierproductsId implements java.io.Serializable {
private Long id;
private String productTyp;
private String edition;
private String firstPubli;
private String print;
private String issn;
private String productNam;
private String productrUr;
private String productSou;
private String journalEdi;
private String journalEd1;
private String journalDes;
private String productsCo;
private String productsC1;
private Date createtime;
private Date updatetime;
public ElsevierproductsId() {
}
public ElsevierproductsId(Long id, String productTyp, String edition, String firstPubli, String print, String issn,
String productNam, String productrUr, String productSou, String journalEdi, String journalEd1,
String journalDes, String productsCo, String productsC1, Date createtime, Date updatetime) {
this.id = id;
this.productTyp = productTyp;
this.edition = edition;
this.firstPubli = firstPubli;
this.print = print;
this.issn = issn;
this.productNam = productNam;
this.productrUr = productrUr;
this.productSou = productSou;
this.journalEdi = journalEdi;
this.journalEd1 = journalEd1;
this.journalDes = journalDes;
this.productsCo = productsCo;
this.productsC1 = productsC1;
this.createtime = createtime;
this.updatetime = updatetime;
}
@Column(name = "ID")
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
@Column(name = "ProductTyp", length = 40)
public String getProductTyp() {
return this.productTyp;
}
public void setProductTyp(String productTyp) {
this.productTyp = productTyp;
}
@Column(name = "Edition")
public String getEdition() {
return this.edition;
}
public void setEdition(String edition) {
this.edition = edition;
}
@Column(name = "FirstPubli")
public String getFirstPubli() {
return this.firstPubli;
}
public void setFirstPubli(String firstPubli) {
this.firstPubli = firstPubli;
}
@Column(name = "Print")
public String getPrint() {
return this.print;
}
public void setPrint(String print) {
this.print = print;
}
@Column(name = "ISSN")
public String getIssn() {
return this.issn;
}
public void setIssn(String issn) {
this.issn = issn;
}
@Column(name = "ProductNam")
public String getProductNam() {
return this.productNam;
}
public void setProductNam(String productNam) {
this.productNam = productNam;
}
@Column(name = "ProductrUR")
public String getProductrUr() {
return this.productrUr;
}
public void setProductrUr(String productrUr) {
this.productrUr = productrUr;
}
@Column(name = "ProductSou")
public String getProductSou() {
return this.productSou;
}
public void setProductSou(String productSou) {
this.productSou = productSou;
}
@Column(name = "JournalEdi")
public String getJournalEdi() {
return this.journalEdi;
}
public void setJournalEdi(String journalEdi) {
this.journalEdi = journalEdi;
}
@Column(name = "JournalEd1")
public String getJournalEd1() {
return this.journalEd1;
}
public void setJournalEd1(String journalEd1) {
this.journalEd1 = journalEd1;
}
@Column(name = "JournalDes")
public String getJournalDes() {
return this.journalDes;
}
public void setJournalDes(String journalDes) {
this.journalDes = journalDes;
}
@Column(name = "ProductsCo")
public String getProductsCo() {
return this.productsCo;
}
public void setProductsCo(String productsCo) {
this.productsCo = productsCo;
}
@Column(name = "ProductsC1")
public String getProductsC1() {
return this.productsC1;
}
public void setProductsC1(String productsC1) {
this.productsC1 = productsC1;
}
@Column(name = "Createtime", length = 10)
public Date getCreatetime() {
return this.createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
@Column(name = "Updatetime", length = 10)
public Date getUpdatetime() {
return this.updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof ElsevierproductsId))
return false;
ElsevierproductsId castOther = (ElsevierproductsId) other;
return ((this.getId() == castOther.getId())
|| (this.getId() != null && castOther.getId() != null && this.getId().equals(castOther.getId())))
&& ((this.getProductTyp() == castOther.getProductTyp()) || (this.getProductTyp() != null
&& castOther.getProductTyp() != null && this.getProductTyp().equals(castOther.getProductTyp())))
&& ((this.getEdition() == castOther.getEdition()) || (this.getEdition() != null
&& castOther.getEdition() != null && this.getEdition().equals(castOther.getEdition())))
&& ((this.getFirstPubli() == castOther.getFirstPubli()) || (this.getFirstPubli() != null
&& castOther.getFirstPubli() != null && this.getFirstPubli().equals(castOther.getFirstPubli())))
&& ((this.getPrint() == castOther.getPrint()) || (this.getPrint() != null
&& castOther.getPrint() != null && this.getPrint().equals(castOther.getPrint())))
&& ((this.getIssn() == castOther.getIssn()) || (this.getIssn() != null && castOther.getIssn() != null
&& this.getIssn().equals(castOther.getIssn())))
&& ((this.getProductNam() == castOther.getProductNam()) || (this.getProductNam() != null
&& castOther.getProductNam() != null && this.getProductNam().equals(castOther.getProductNam())))
&& ((this.getProductrUr() == castOther.getProductrUr()) || (this.getProductrUr() != null
&& castOther.getProductrUr() != null && this.getProductrUr().equals(castOther.getProductrUr())))
&& ((this.getProductSou() == castOther.getProductSou()) || (this.getProductSou() != null
&& castOther.getProductSou() != null && this.getProductSou().equals(castOther.getProductSou())))
&& ((this.getJournalEdi() == castOther.getJournalEdi()) || (this.getJournalEdi() != null
&& castOther.getJournalEdi() != null && this.getJournalEdi().equals(castOther.getJournalEdi())))
&& ((this.getJournalEd1() == castOther.getJournalEd1()) || (this.getJournalEd1() != null
&& castOther.getJournalEd1() != null && this.getJournalEd1().equals(castOther.getJournalEd1())))
&& ((this.getJournalDes() == castOther.getJournalDes()) || (this.getJournalDes() != null
&& castOther.getJournalDes() != null && this.getJournalDes().equals(castOther.getJournalDes())))
&& ((this.getProductsCo() == castOther.getProductsCo()) || (this.getProductsCo() != null
&& castOther.getProductsCo() != null && this.getProductsCo().equals(castOther.getProductsCo())))
&& ((this.getProductsC1() == castOther.getProductsC1()) || (this.getProductsC1() != null
&& castOther.getProductsC1() != null && this.getProductsC1().equals(castOther.getProductsC1())))
&& ((this.getCreatetime() == castOther.getCreatetime()) || (this.getCreatetime() != null
&& castOther.getCreatetime() != null && this.getCreatetime().equals(castOther.getCreatetime())))
&& ((this.getUpdatetime() == castOther.getUpdatetime())
|| (this.getUpdatetime() != null && castOther.getUpdatetime() != null
&& this.getUpdatetime().equals(castOther.getUpdatetime())));
}
public int hashCode() {
int result = 17;
result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
result = 37 * result + (getProductTyp() == null ? 0 : this.getProductTyp().hashCode());
result = 37 * result + (getEdition() == null ? 0 : this.getEdition().hashCode());
result = 37 * result + (getFirstPubli() == null ? 0 : this.getFirstPubli().hashCode());
result = 37 * result + (getPrint() == null ? 0 : this.getPrint().hashCode());
result = 37 * result + (getIssn() == null ? 0 : this.getIssn().hashCode());
result = 37 * result + (getProductNam() == null ? 0 : this.getProductNam().hashCode());
result = 37 * result + (getProductrUr() == null ? 0 : this.getProductrUr().hashCode());
result = 37 * result + (getProductSou() == null ? 0 : this.getProductSou().hashCode());
result = 37 * result + (getJournalEdi() == null ? 0 : this.getJournalEdi().hashCode());
result = 37 * result + (getJournalEd1() == null ? 0 : this.getJournalEd1().hashCode());
result = 37 * result + (getJournalDes() == null ? 0 : this.getJournalDes().hashCode());
result = 37 * result + (getProductsCo() == null ? 0 : this.getProductsCo().hashCode());
result = 37 * result + (getProductsC1() == null ? 0 : this.getProductsC1().hashCode());
result = 37 * result + (getCreatetime() == null ? 0 : this.getCreatetime().hashCode());
result = 37 * result + (getUpdatetime() == null ? 0 : this.getUpdatetime().hashCode());
return result;
}
}
| [
"18568437879@163.com"
] | 18568437879@163.com |
6a9e389598f93c0448328b81b8c025980b26701a | 8ae699d758bca0bfe5fe09377cf70fc41e0858f7 | /app/src/main/java/teach/vietnam/asia/db/table/BaseTable.java | d26ba295f5ab7f796cfaabf9539ec332b163543b | [] | no_license | mhome527/Lvn_v2 | 469c7f0ae355795a39afd94b7752f7d5cdfda77f | d6529f2e684df43a243ea3165e74811079e20f3c | refs/heads/master | 2021-01-22T08:58:53.798949 | 2019-10-27T16:45:33 | 2019-10-27T16:45:33 | 81,922,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | package teach.vietnam.asia.db.table;
/**
* Created by Administrator on 3/3/2017.
*/
public class BaseTable {
public static final String COL_ROW_ID = "rowid";
public static final String COL_ID = "ID";
public static final String COL_TYPE = "TYPE";
public static final String COL_AREA = "AREA";
public static final String COL_KIND = "KIND";
public static final String COL_OT1 = "OT1";
public static final String COL_TITLE = "TITLE";
public static final String COL_SEARCH_TEXT = "SEARCH_TEXT";
}
| [
"mhom527@gmail.com"
] | mhom527@gmail.com |
d99054811172f3a0aae2387fccb877edd539e07e | b909748b2b3be36eba6b318020c1b5b82e67f8c5 | /src/main/java/net/contargo/intermodal/domain/Vessel.java | 4616002b39a16549de8e15a001f9590cdb58231f | [
"Apache-2.0"
] | permissive | Henrik-Hanke/intermodal-domain | 707021345b3620a2c6a43b0220fda9c6b3c39ec5 | 6caf6635ce224fb1c269a79353763df255145725 | refs/heads/master | 2023-02-22T14:41:03.249072 | 2021-01-21T08:25:55 | 2021-01-21T08:25:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,999 | java | package net.contargo.intermodal.domain;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* A ship build to drive on seas and oceans.
*
* @author Isabell Dürlich - duerlich@synyx.de
* @version 2018-04
* @name_german Seeschiff
* @name_english vessel
* @definition_german Schiff, das zur Fahrt auf Meeren und Ozeanen konzipiert ist.
* @definition_english A ship build to drive on seas and oceans.
* @note_german Für diese API sind Schiffe relevant, die Ladeeinheiten des Kombinierten Verkehrs transportieren
* können.
* @note_english In this API only vessels which can transport loading units of combined traffic are relevant.
* @source DIGIT - Standardisierung des Datenaustauschs für alle Akteure der intermodalen Kette zur Gewährleistung
* eines effizienten Informationsflusses und einer zukunftsfähigen digitalen Kommunikation
*/
public class Vessel implements MeansOfTransport {
private String name;
/**
* Maritime Mobile Service Identity (9 digits).
*/
private String mmsi;
/**
* International Maritime Organization (IMO plus 7 digits).
*/
private String imo;
private Operator operator;
private Vessel() {
// OK
}
/**
* Creates a new builder for {@link Vessel}.
*
* @return new builder
*/
public static Builder newBuilder() {
return new Builder();
}
/**
* Creates a new builder with the values of another {@link Vessel}.
*
* @param vessel that should be copied.
*
* @return new builder with values of given vessel.
*/
public static Builder newBuilder(Vessel vessel) {
return new Builder().withName(vessel.getName())
.withMmsi(vessel.getMmsi())
.withImo(vessel.getImo())
.withOperator(vessel.getOperator());
}
public String getName() {
return name;
}
public String getMmsi() {
return mmsi;
}
public String getImo() {
return imo;
}
public Operator getOperator() {
return operator;
}
@Override
public String toString() {
try {
return this.getClass().getSimpleName() + ": " + JsonStringMapper.map(this);
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return "";
}
public static final class Builder {
private String name;
private String mmsi;
private String imo;
private Operator operator;
private Builder() {
}
public Builder withName(String name) {
this.name = name;
return this;
}
public Builder withMmsi(String mmsi) {
this.mmsi = mmsi;
return this;
}
public Builder withImo(String imo) {
this.imo = imo;
return this;
}
public Builder withOperator(Operator operator) {
this.operator = operator;
return this;
}
/**
* Builds {@link Vessel} without input validation.
*
* @return new {@link Vessel} with attributes specified in {@link Builder}
*/
public Vessel build() {
Vessel vessel = new Vessel();
vessel.name = this.name;
vessel.mmsi = this.mmsi;
vessel.imo = this.imo;
vessel.operator = this.operator;
return vessel;
}
/**
* Validates the input and builds {@link Vessel}. Throws IllegalStateException if input doesn't fulfill the
* minimum requirement of {@link Vessel}.
*
* @return new {@link Vessel} with attributes specified in {@link Builder}
*/
public Vessel buildAndValidate() {
Vessel vessel = this.build();
MinimumRequirementValidator.validate(vessel);
return vessel;
}
}
}
| [
"duerlich@synyx.de"
] | duerlich@synyx.de |
0e0033a696d1bb9dd23f491c46b276daf108c83b | 5e20390a6ac198956a6b1d8639a1f2f2db876685 | /app/build/generated/source/apt/debug/app/doscervezas/avocado/ui/viewmodels/EditEntryViewModel_Factory.java | 28ba6bd2177ac8c7d5a1527f69cea5b89f5a5428 | [] | no_license | boyd852/Avocado | 503c5776e4434bf7b28694076ab80d4137f78dab | 433548713cd61a68132838d7b987653c6f2b1d31 | refs/heads/master | 2020-05-16T05:02:19.820373 | 2019-04-22T13:33:11 | 2019-04-22T13:33:11 | 138,215,004 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,503 | java | // Generated by Dagger (https://google.github.io/dagger).
package app.doscervezas.avocado.ui.viewmodels;
import app.doscervezas.avocado.db.dao.SpendDao;
import app.doscervezas.avocado.repository.DataRepository;
import dagger.internal.Factory;
import javax.inject.Provider;
public final class EditEntryViewModel_Factory implements Factory<EditEntryViewModel> {
private final Provider<SpendDao> spendDaoProvider;
private final Provider<DataRepository> dataRepositoryProvider;
public EditEntryViewModel_Factory(
Provider<SpendDao> spendDaoProvider, Provider<DataRepository> dataRepositoryProvider) {
this.spendDaoProvider = spendDaoProvider;
this.dataRepositoryProvider = dataRepositoryProvider;
}
@Override
public EditEntryViewModel get() {
return provideInstance(spendDaoProvider, dataRepositoryProvider);
}
public static EditEntryViewModel provideInstance(
Provider<SpendDao> spendDaoProvider, Provider<DataRepository> dataRepositoryProvider) {
return new EditEntryViewModel(spendDaoProvider.get(), dataRepositoryProvider.get());
}
public static EditEntryViewModel_Factory create(
Provider<SpendDao> spendDaoProvider, Provider<DataRepository> dataRepositoryProvider) {
return new EditEntryViewModel_Factory(spendDaoProvider, dataRepositoryProvider);
}
public static EditEntryViewModel newEditEntryViewModel(
SpendDao spendDao, DataRepository dataRepository) {
return new EditEntryViewModel(spendDao, dataRepository);
}
}
| [
"benboyd@gmail.com"
] | benboyd@gmail.com |
fdb36bc18d18b708ff445bcc4097ab5a6aeafc4d | fa27b191daac56942eda0d950c6ae542fe2d8f33 | /app/src/main/java/pub/object/system/ThemeSystem/widgets/TintCheckBox.java | 8b7641b00507236e1763ebb1696a957a70702056 | [
"Apache-2.0"
] | permissive | LinXueyuanStdio/Object | e92776b8e947370671b40b1bdce4c64095b4e0a7 | 4ebc9ce6ead29cf9fc7a82890cbe66055570a179 | refs/heads/master | 2023-01-01T21:28:17.443048 | 2017-10-22T14:02:20 | 2017-10-22T14:02:20 | 107,870,359 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,832 | java | /*
* Copyright (C) 2016 Bilibili
*
* 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 pub.object.system.ThemeSystem.widgets;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.AnimatedStateListDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes;
import android.support.annotation.Nullable;
import android.support.v4.widget.CompoundButtonCompat;
import android.util.AttributeSet;
import android.widget.CheckBox;
import pub.object.system.ThemeSystem.utils.ThemeUtils;
import pub.object.system.ThemeSystem.utils.TintManager;
/**
* @author xyczero617@gmail.com
* @time 16/1/27
*/
public class TintCheckBox extends CheckBox implements Tintable, AppCompatBackgroundHelper.BackgroundExtensible,
AppCompatCompoundButtonHelper.CompoundButtonExtensible, AppCompatTextHelper.TextExtensible {
private AppCompatBackgroundHelper mBackgroundHelper;
private AppCompatCompoundButtonHelper mCompoundButtonHelper;
private AppCompatTextHelper mTextHelper;
public TintCheckBox(Context context) {
this(context, null);
}
public TintCheckBox(Context context, AttributeSet attrs) {
this(context, attrs, android.R.attr.checkboxStyle);
}
public TintCheckBox(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
if (isInEditMode()) {
return;
}
TintManager tintManager = TintManager.get(getContext());
mBackgroundHelper = new AppCompatBackgroundHelper(this, tintManager);
mBackgroundHelper.loadFromAttribute(attrs, defStyleAttr);
mCompoundButtonHelper = new AppCompatCompoundButtonHelper(this, tintManager);
mCompoundButtonHelper.loadFromAttribute(attrs, defStyleAttr);
mTextHelper = new AppCompatTextHelper(this, tintManager);
mTextHelper.loadFromAttribute(attrs, defStyleAttr);
}
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
if (ThemeUtils.isSkipAnimatedSelector()) {
Drawable drawable = CompoundButtonCompat.getButtonDrawable(this);
try {
if (ThemeUtils.getWrapperDrawable(drawable) instanceof AnimatedStateListDrawable) {
drawable.jumpToCurrentState();
}
} catch (NoClassDefFoundError error) {
error.printStackTrace();
}
}
}
@Override
public void setTextColor(int color) {
super.setTextColor(color);
if (mTextHelper != null) {
mTextHelper.setTextColor();
}
}
@Override
public void setTextColor(ColorStateList colors) {
super.setTextColor(colors);
if (mTextHelper != null) {
mTextHelper.setTextColor();
}
}
@TargetApi(Build.VERSION_CODES.M)
@Override
public void setTextAppearance(int resId) {
super.setTextAppearance(resId);
if (mTextHelper != null) {
mTextHelper.setTextAppearanceForTextColor(resId);
}
}
@Override
public void setTextAppearance(Context context, int resId) {
super.setTextAppearance(context, resId);
if (mTextHelper != null) {
mTextHelper.setTextAppearanceForTextColor(resId);
}
}
@Override
public void setBackgroundDrawable(Drawable background) {
super.setBackgroundDrawable(background);
if (mBackgroundHelper != null) {
mBackgroundHelper.setBackgroundDrawableExternal(background);
}
}
@Override
public void setBackgroundResource(int resId) {
if (mBackgroundHelper != null) {
mBackgroundHelper.setBackgroundResId(resId);
} else {
super.setBackgroundResource(resId);
}
}
@Override
public void setBackgroundColor(int color) {
super.setBackgroundColor(color);
if (mBackgroundHelper != null) {
mBackgroundHelper.setBackgroundColor(color);
}
}
@Nullable
@Override
public void setButtonDrawable(Drawable drawable) {
super.setButtonDrawable(drawable);
if (mCompoundButtonHelper != null) {
mCompoundButtonHelper.setButtonDrawable();
}
}
@Override
public void setButtonDrawable(@DrawableRes int resId) {
if (mCompoundButtonHelper != null) {
mCompoundButtonHelper.setButtonDrawable(resId);
} else {
super.setButtonDrawable(resId);
}
}
@Override
public int getCompoundPaddingLeft() {
final int value = super.getCompoundPaddingLeft();
return mCompoundButtonHelper != null
? mCompoundButtonHelper.getCompoundPaddingLeft(value)
: value;
}
@Override
public void setBackgroundTintList(int resId) {
if (mBackgroundHelper != null) {
mBackgroundHelper.setBackgroundTintList(resId, null);
}
}
@Override
public void setBackgroundTintList(int resId, PorterDuff.Mode mode) {
if (mBackgroundHelper != null) {
mBackgroundHelper.setBackgroundTintList(resId, mode);
}
}
@Override
public void setCompoundButtonTintList(int resId) {
if (mCompoundButtonHelper != null) {
mCompoundButtonHelper.setButtonDrawableTintList(resId, null);
}
}
@Override
public void setCompoundButtonTintList(int resId, PorterDuff.Mode mode) {
if (mCompoundButtonHelper != null) {
mCompoundButtonHelper.setButtonDrawableTintList(resId, mode);
}
}
@Override
public void setTextColorById(@ColorRes int colorId) {
if (mTextHelper != null) {
mTextHelper.setTextColorById(colorId);
}
}
@Override
public void tint() {
if (mTextHelper != null) {
mTextHelper.tint();
}
if (mCompoundButtonHelper != null) {
mCompoundButtonHelper.tint();
}
if (mBackgroundHelper != null) {
mBackgroundHelper.tint();
}
}
}
| [
"761516186@qq.com"
] | 761516186@qq.com |
e5b109521da49a929c58bb2f34e8ca7d8a7957a2 | 0ea271177f5c42920ac53cd7f01f053dba5c14e4 | /5.3.5/sources/com/google/android/gms/internal/zzflh.java | 8ba9451c04d6d9c1accbf2614151f74dfebaf4b3 | [] | no_license | alireza-ebrahimi/telegram-talaeii | 367a81a77f9bc447e729b2ca339f9512a4c2860e | 68a67e6f104ab8a0888e63c605e8bbad12c4a20e | refs/heads/master | 2020-03-21T13:44:29.008002 | 2018-12-09T10:30:29 | 2018-12-09T10:30:29 | 138,622,926 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 252 | java | package com.google.android.gms.internal;
import java.io.IOException;
enum zzflh extends zzfle {
zzflh(String str, int i) {
super(str, 2);
}
final Object zza(zzfhb zzfhb) throws IOException {
return zzfhb.zzcyf();
}
}
| [
"alireza.ebrahimi2006@gmail.com"
] | alireza.ebrahimi2006@gmail.com |
9c1ce0b801c7b8a379d3f92f48c76a063c5692d9 | 5da5f8bba90a33f2e74e89f031e3092a4a27e976 | /anchorcms-web/src/main/java/com/anchorcms/icloud/model/cloudcenter/SIcloudQuoteManage.java | 4dbbd24d2cf3b8abe64eed38fdbf060986bc6bd7 | [] | no_license | hanshuxia/nmggyy | 3700210e6f1421d67e7bbf2c004a479ea2faef00 | 75665cac07c74e972753874a9f28077a7b649fee | refs/heads/master | 2020-03-27T02:32:23.219385 | 2018-08-24T02:37:17 | 2018-08-24T02:37:17 | 145,797,102 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,444 | java | package com.anchorcms.icloud.model.cloudcenter;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;
/**
* Created by ly on 2017/1/10.
*/
@Entity
@Table(name = "s_icloud_quote_manage")
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE )
public class SIcloudQuoteManage implements Serializable{
private static final long serialVersionUID = -8936880094996967213L;
private Integer quoteId;
private String createrId;
private String offerId;
private Date createDt;
private Date updateDt;
private Date releaseDt;
private Date deadlineDt;
private String status;
private String demandState; //需求方状态位
private String quoteState;//报价方状态位
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "QUOTE_ID")
public Integer getQuoteId() {
return quoteId;
}
public void setQuoteId(int quoteId) {
this.quoteId = quoteId;
}
@Basic
@Column(name = "CREATER_ID")
public String getCreaterId() {
return createrId;
}
public void setCreaterId(String createrId) {
this.createrId = createrId;
}
@Basic
@Column(name = "OFFER_ID")
public String getOfferId() {
return offerId;
}
public void setOfferId(String offerId) {
this.offerId = offerId;
}
@Basic
@Column(name = "CREATE_DT")
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
@Basic
@Column(name = "UPDATE_DT")
public Date getUpdateDt() {
return updateDt;
}
public void setUpdateDt(Date updateDt) {
this.updateDt = updateDt;
}
@Basic
@Column(name = "RELEASE_DT")
public Date getReleaseDt() {
return releaseDt;
}
public void setReleaseDt(Date releaseDt) {
this.releaseDt = releaseDt;
}
@Basic
@Column(name = "DEADLINE_DT")
public Date getDeadlineDt() {
return deadlineDt;
}
public void setDeadlineDt(Date deadlineDt) {
this.deadlineDt = deadlineDt;
}
@Basic
@Column(name = "STATUS")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Basic
@Column(name = "DEMAND_STATE")
public String getDemandState() {
return demandState;
}
public void setDemandState(String demandState) {
this.demandState = demandState;
}
@Basic
@Column(name = "QUOTE_STATE")
public String getQuoteState() {
return quoteState;
}
public void setQuoteState(String quoteState) {
this.quoteState = quoteState;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SIcloudQuoteManage that = (SIcloudQuoteManage) o;
if (quoteId != that.quoteId) return false;
if (createrId != null ? !createrId.equals(that.createrId) : that.createrId != null) return false;
if (offerId != null ? !offerId.equals(that.offerId) : that.offerId != null) return false;
if (createDt != null ? !createDt.equals(that.createDt) : that.createDt != null) return false;
if (updateDt != null ? !updateDt.equals(that.updateDt) : that.updateDt != null) return false;
if (releaseDt != null ? !releaseDt.equals(that.releaseDt) : that.releaseDt != null) return false;
if (deadlineDt != null ? !deadlineDt.equals(that.deadlineDt) : that.deadlineDt != null) return false;
if (status != null ? !status.equals(that.status) : that.status != null) return false;
if (demandState != null ? !demandState.equals(that.demandState) : that.demandState != null) return false;
if (quoteState != null ? !quoteState.equals(that.quoteState) : that.quoteState != null) return false;
return true;
}
@Override
public int hashCode() {
int result = quoteId;
result = 31 * result + (createrId != null ? createrId.hashCode() : 0);
result = 31 * result + (offerId != null ? offerId.hashCode() : 0);
result = 31 * result + (createDt != null ? createDt.hashCode() : 0);
result = 31 * result + (updateDt != null ? updateDt.hashCode() : 0);
result = 31 * result + (releaseDt != null ? releaseDt.hashCode() : 0);
result = 31 * result + (deadlineDt != null ? deadlineDt.hashCode() : 0);
result = 31 * result + (status != null ? status.hashCode() : 0);
result = 31 * result + (demandState != null ? demandState.hashCode() : 0);
result = 31 * result + (quoteState != null ? quoteState.hashCode() : 0);
return result;
}
private SIcloudDemand demand;
@OneToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "DEMAND_ID")
public SIcloudDemand getDemand() {
return demand;
}
public void setDemand(SIcloudDemand demand) {
this.demand = demand;
}
private SIcloudDemandQuote quote;
@OneToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "DEMAND_OBJ_ID")
public SIcloudDemandQuote getQuote() {
return quote;
}
public void setQuote(SIcloudDemandQuote quote) {
this.quote = quote;
}
}
| [
"605128459@qq.com"
] | 605128459@qq.com |
946fd5f50d8b3ae8d1313d4bc7154c18f1a3b5ce | 0cdcbcf02e6ededdb5c6e1ef79a098e70a951834 | /JiaZhengService/JiaZhengService-service/src/main/java/com/platform/JiaZhengService/service/api/PluginConfigService.java | 6f05a5e833af53205b05b6a155ff45f4856a23fe | [] | no_license | tc792617871/JiaZhengService | 1472335ca5351b8b951ce9f5d96250872d80d480 | 047f2494f627d8130dde3277afc6a4a7984d7bc1 | refs/heads/master | 2020-12-30T09:14:36.392177 | 2018-05-19T06:38:00 | 2018-05-19T06:38:00 | 100,394,267 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 713 | java | package com.platform.JiaZhengService.service.api;
import com.platform.JiaZhengService.dao.entity.TPluginConfig;
/**
* Service - 插件配置
*
*/
public interface PluginConfigService extends BaseService {
/**
* 判断插件ID是否存在
*
* @param pluginId
* 插件ID
* @return 插件ID是否存在
*/
boolean pluginIdExists(String pluginId);
/**
* 根据插件ID查找插件配置
*
* @param pluginId
* 插件ID
* @return 插件配置,若不存在则返回null
*/
TPluginConfig findByPluginId(String pluginId);
boolean save(TPluginConfig pluginConfig);
boolean update(TPluginConfig pluginConfig);
boolean delete(TPluginConfig pluginConfig);
} | [
"792617871@qq.com"
] | 792617871@qq.com |
38cd57b4ea661ce1092b002cc769e9031be7ef7e | b90d96961cd11d4061036a542fcc255320ea9c69 | /beitonelibrary/src/main/java/cn/betatown/mobile/beitonelibrary/viewcontroller/VaryViewHelper.java | 64ee590e4371c72879783697472227011b992786 | [] | no_license | wpf-191514617/SignUpProject | 1608477fd238900e18d4ef5cf0ad24e365aec6a5 | 6179e5186209e1ad5a1e898f678376c6489c925a | refs/heads/master | 2022-11-27T07:15:16.196793 | 2020-08-11T02:07:42 | 2020-08-11T02:07:42 | 272,388,503 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,366 | java | /*
* Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
*
* Licensed under the Apache License, Version 2.0 (the "License”);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.betatown.mobile.beitonelibrary.viewcontroller;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class VaryViewHelper implements IVaryViewHelper {
private View view;
private ViewGroup parentView;
private int viewIndex;
private ViewGroup.LayoutParams params;
private View currentView;
public VaryViewHelper(View view) {
super();
this.view = view;
}
private void init() {
params = view.getLayoutParams();
if (view.getParent() != null) {
parentView = (ViewGroup) view.getParent();
} else {
parentView = (ViewGroup) view.getRootView().findViewById(android.R.id.content);
}
int count = parentView.getChildCount();
for (int index = 0; index < count; index++) {
if (view == parentView.getChildAt(index)) {
viewIndex = index;
break;
}
}
currentView = view;
}
@Override
public View getCurrentLayout() {
return currentView;
}
@Override
public void restoreView() {
showLayout(view);
}
@Override
public void showLayout(View view) {
if (parentView == null) {
init();
}
this.currentView = view;
// 如果已经是那个view,那就不需要再进行替换操作了
if (parentView.getChildAt(viewIndex) != view) {
ViewGroup parent = (ViewGroup) view.getParent();
if (parent != null) {
parent.removeView(view);
}
parentView.removeViewAt(viewIndex);
parentView.addView(view, viewIndex, params);
}
}
@Override
public View inflate(int layoutId) {
return LayoutInflater.from(view.getContext()).inflate(layoutId, null);
}
@Override
public Context getContext() {
return view.getContext();
}
@Override
public View getView() {
return view;
}
}
| [
"15291967179@163.com"
] | 15291967179@163.com |
b27fdcba8a12c83c860b8d69749224de8dedddea | af1809e670481264a8facd9416f058d7c16e2a6d | /app/src/main/java/com/wangyuelin/sender/util/RegexConstants.java | 396fccf63ef331a1d213ab5f681443a6e6689b4c | [] | no_license | ITFlyPig/sender | 11a71e3d0e51e24311781ffcd22ae1a4d4908aa4 | 65d8e230a798b7817747390035e75b930264ad7a | refs/heads/master | 2020-05-22T23:24:54.084247 | 2019-05-18T17:28:14 | 2019-05-18T17:28:14 | 186,559,221 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,460 | java | package com.wangyuelin.sender.util;
/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2017/03/13
* desc : constants of regex
* </pre>
*/
public final class RegexConstants {
/**
* Regex of simple mobile.
*/
public static final String REGEX_MOBILE_SIMPLE = "^[1]\\d{10}$";
/**
* Regex of exact mobile.
* <p>china mobile: 134(0-8), 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 178, 182, 183, 184, 187, 188, 198</p>
* <p>china unicom: 130, 131, 132, 145, 155, 156, 166, 171, 175, 176, 185, 186</p>
* <p>china telecom: 133, 153, 173, 177, 180, 181, 189, 199</p>
* <p>global star: 1349</p>
* <p>virtual operator: 170</p>
*/
public static final String REGEX_MOBILE_EXACT = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(16[6])|(17[0,1,3,5-8])|(18[0-9])|(19[8,9]))\\d{8}$";
/**
* Regex of telephone number.
*/
public static final String REGEX_TEL = "^0\\d{2,3}[- ]?\\d{7,8}";
/**
* Regex of id card number which length is 15.
*/
public static final String REGEX_ID_CARD15 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$";
/**
* Regex of id card number which length is 18.
*/
public static final String REGEX_ID_CARD18 = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9Xx])$";
/**
* Regex of email.
*/
public static final String REGEX_EMAIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
/**
* Regex of url.
*/
public static final String REGEX_URL = "[a-zA-z]+://[^\\s]*";
/**
* Regex of Chinese character.
*/
public static final String REGEX_ZH = "^[\\u4e00-\\u9fa5]+$";
/**
* Regex of username.
* <p>scope for "a-z", "A-Z", "0-9", "_", "Chinese character"</p>
* <p>can't end with "_"</p>
* <p>length is between 6 to 20</p>
*/
public static final String REGEX_USERNAME = "^[\\w\\u4e00-\\u9fa5]{6,20}(?<!_)$";
/**
* Regex of date which pattern is "yyyy-MM-dd".
*/
public static final String REGEX_DATE = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
/**
* Regex of ip address.
*/
public static final String REGEX_IP = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
///////////////////////////////////////////////////////////////////////////
// The following come from http://tool.oschina.net/regex
///////////////////////////////////////////////////////////////////////////
/**
* Regex of double-byte characters.
*/
public static final String REGEX_DOUBLE_BYTE_CHAR = "[^\\x00-\\xff]";
/**
* Regex of blank line.
*/
public static final String REGEX_BLANK_LINE = "\\n\\s*\\r";
/**
* Regex of QQ number.
*/
public static final String REGEX_QQ_NUM = "[1-9][0-9]{4,}";
/**
* Regex of postal code in China.
*/
public static final String REGEX_CHINA_POSTAL_CODE = "[1-9]\\d{5}(?!\\d)";
/**
* Regex of positive integer.
*/
public static final String REGEX_POSITIVE_INTEGER = "^[1-9]\\d*$";
/**
* Regex of negative integer.
*/
public static final String REGEX_NEGATIVE_INTEGER = "^-[1-9]\\d*$";
/**
* Regex of integer.
*/
public static final String REGEX_INTEGER = "^-?[1-9]\\d*$";
/**
* Regex of non-negative integer.
*/
public static final String REGEX_NOT_NEGATIVE_INTEGER = "^[1-9]\\d*|0$";
/**
* Regex of non-positive integer.
*/
public static final String REGEX_NOT_POSITIVE_INTEGER = "^-[1-9]\\d*|0$";
/**
* Regex of positive float.
*/
public static final String REGEX_POSITIVE_FLOAT = "^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$";
/**
* Regex of negative float.
*/
public static final String REGEX_NEGATIVE_FLOAT = "^-[1-9]\\d*\\.\\d*|-0\\.\\d*[1-9]\\d*$";
///////////////////////////////////////////////////////////////////////////
// If u want more please visit http://toutiao.com/i6231678548520731137
///////////////////////////////////////////////////////////////////////////
}
| [
"a1659509224@163.com"
] | a1659509224@163.com |
1a4c3a2380eeb1c774664d793b6882392724d87a | 9181f459eb859069b9b39dc4b659da4d8bd5ab6e | /app/src/main/java/com/dali/admin/livestreaming/utils/AsimpleCache/CacheConstants.java | 3ece7f922d70635e98b673f3918d49cd91631f8c | [] | no_license | XIMOTIAN/LiveStreaming | bcfa51e87972ec3566f103638549eb6dd108988b | e8d3af4332ecda15ef8d23ba36a6fccef47139d4 | refs/heads/master | 2020-03-27T08:37:02.912037 | 2018-02-09T01:18:52 | 2018-02-09T01:18:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java | package com.dali.admin.livestreaming.utils.AsimpleCache;
/**
* @description: 存储的字段
* @author: Andruby
* @time: 2016/12/21 09:51
*/
public class CacheConstants {
public static final String LOGIN_USERNAME ="login_username";
public static final String LOGIN_PASSWORD ="login_password";
public static final String LOGIN_PHONE ="login_phone";
}
| [
"1355051656@qq.com"
] | 1355051656@qq.com |
0d6cf05f3fb1b7a49c910fea50980d32ee562f28 | 7d3cae90c4434203c5299a2bddb279d596fee4a8 | /CSV-Project/src/main/java/aht/conpany/controller/HomeController.java | f6d3cbfae983749cc1b381537adebdec48a2a0c6 | [] | no_license | datnk1997/MyProject | dd69479225151085ea2b87cf518294600c9b7611 | bb1cccb54c15eaeef567079907e9629c4cc7fcc3 | refs/heads/master | 2020-05-02T10:37:36.220302 | 2019-05-14T10:52:51 | 2019-05-14T10:52:51 | 177,902,216 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 919 | java | package aht.conpany.controller;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import aht.company.service.CSVService;
/**
* Handles requests for the application home page.
*/
@Controller
public class HomeController {
@Autowired
private CSVService csv;
@RequestMapping("/")
public String home() {
return "home";
}
@RequestMapping(value = "upload" )
public String uploadFile(@RequestParam("path") String path, Model model) {
System.out.println("Helloooo");
try {
csv.readCSV(path);
model.addAttribute("mess", "ok!");
} catch (IOException e) {
model.addAttribute("mess", "loi roi");
e.printStackTrace();
}
return "home";
}
}
| [
"45930210+datnk1997@users.noreply.github.com"
] | 45930210+datnk1997@users.noreply.github.com |
5aac93bf6dfc118493bcd92df58a44d751edf094 | 7c87899e76d41542284e258a5e5b0ea8a7a336e7 | /src/main/java/com/tree/www/leetcode/Leetcode221.java | e7878720f063ec5a44f5b4b2df7ef2d6dfd9dec1 | [] | no_license | pengyongshan/study | 42ec5bc4417b6be7384ec137b3d10a30bc060e6b | 52cf8081fa57e42d9cdb567c0e97924eb537dc87 | refs/heads/master | 2022-12-23T13:09:00.177350 | 2022-03-15T07:20:49 | 2022-03-15T07:20:49 | 91,772,670 | 1 | 0 | null | 2022-12-16T05:37:50 | 2017-05-19T06:22:59 | Java | UTF-8 | Java | false | false | 1,270 | java | package com.tree.www.leetcode;
/**
* 最大正方形
* <p>
* Created by pysh on 2020-05-21.
*/
public class Leetcode221 {
/**
* 在一个由 0 和 1 组成的二维矩阵内,
* 找到只包含 1 的最大正方形,并返回其面积。
*
* @param matrix
* @return
*/
public int maximalSquare(char[][] matrix) {
if (matrix.length == 0) return 0;
int column = matrix[0].length, result = 0;
for (char[] matrix1 : matrix) {
if (matrix1[0] == '1') {
result = 1;
break;
}
}
for (int i = 1; i < column && result == 0; i++) {
if (matrix[0][i] == '1') {
result = 1;
break;
}
}
for (int i = 1; i < matrix.length; i++) {
for (int j = 1; j < matrix[0].length; j++) {
if (matrix[i][j] == '1') {
matrix[i][j] = (char) (min(min(matrix[i - 1][j], matrix[i - 1][j - 1]), matrix[i][j - 1]) + 1);
result = Math.max((matrix[i][j] - '0'), result);
}
}
}
return result * result;
}
private char min(char a, char b) {
return a < b ? a : b;
}
}
| [
"pysh@pyshdeMacBook-Pro.local"
] | pysh@pyshdeMacBook-Pro.local |
05ea34161b22620be013ef21626990f9d8439541 | a8fc9c93768b52d841fef9e69f2434b9cf640d21 | /src/main/java/com/example/demo1/service/RedisServer.java | f853208cc91880cda824be0ba22308d5752cf47d | [] | no_license | suhan443709726/demo1 | 9f2e396a3fcd2e9c592e28807b3e41dd802570df | 13500dc60975a0b040f61b44ff7de983b6feaad4 | refs/heads/master | 2020-07-12T05:28:41.519039 | 2019-09-05T15:40:47 | 2019-09-05T15:40:47 | 198,048,589 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 238 | java | package com.example.demo1.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
public class RedisServer {
@Autowired
RedisTemplate redisTemplate;
}
| [
"443709726@qq.com"
] | 443709726@qq.com |
8e6da78e7892ec57e67cda156adf8e4ac16cc14a | 444ba836a4a378d2b150289a85e756df5b9e04e1 | /MoneyFlow/app/src/main/java/com/derlars/moneyflow/Database/Subscriptables/SubscriptableDatabase.java | 4e6f92e901336852b05f6d757a72c7f59c290606 | [] | no_license | derLars/cleanbyte | 3d9db0f37b404baaece0cc4d7e627860fc397ce5 | 0c03c2b6c1dcc78e5c8dd2801e1c4d9e80114211 | refs/heads/master | 2023-04-15T19:01:04.218590 | 2021-05-02T15:07:05 | 2021-05-02T15:07:05 | 338,811,277 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,821 | java | package com.derlars.moneyflow.Database.Subscriptables;
import com.derlars.moneyflow.Database.Abstracts.Subscriptable;
import com.derlars.moneyflow.Database.Callbacks.DatabaseCallback;
import com.google.firebase.database.DataSnapshot;
public abstract class SubscriptableDatabase<Callback extends DatabaseCallback> extends Subscriptable<Callback> {
public SubscriptableDatabase(Callback callback) {
super(callback);
}
public void notifyValueRetrieved(String path, String key, DataSnapshot dataSnapshot) {
for(Callback c : callbacks) {
if(c != null) {
c.databaseValueRetrieved(path,key,dataSnapshot);
}
}
}
public void notifyNoValueRetrieved(String path, String key) {
for(Callback c : callbacks) {
if(c != null) {
c.databaseNoValueRetrieved(path,key);
}
}
}
public void notifyValueDeleted(String path, String key) {
for(Callback c : callbacks) {
if(c != null) {
c.databaseValueDeleted(path,key);
}
}
}
public void notifyChildAdded(String path, String key, String childKey) {
for(Callback c : callbacks) {
if(c != null) {
c.databaseChildAdded(path,key,childKey);
}
}
}
public void notifyChildDeleted(String path, String key, String childKey) {
for(Callback c : callbacks) {
if(c != null) {
c.databaseChildDeleted(path, key, childKey);
}
}
}
public void notifyChildChanged(String path, String key, String childKey) {
for(Callback c : callbacks) {
if(c != null) {
c.databaseChildChanged(path, key, childKey);
}
}
}
}
| [
"l.schwensen@hotmail.de"
] | l.schwensen@hotmail.de |
d9f2bae8508bd55940694306b5a0bed3bab6e644 | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/wallet_core/ui/WalletOrderInfoOldUI$2.java | abd8fb5049fd6936696a9223e63c14562adf503a | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 455 | java | package com.tencent.mm.plugin.wallet_core.ui;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
class WalletOrderInfoOldUI$2 implements OnClickListener {
final /* synthetic */ WalletOrderInfoOldUI pwD;
WalletOrderInfoOldUI$2(WalletOrderInfoOldUI walletOrderInfoOldUI) {
this.pwD = walletOrderInfoOldUI;
}
public final void onClick(DialogInterface dialogInterface, int i) {
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
54a1f4c64cd623af73ff04678b426985c3202014 | 83d4a933008aad502e824fc02f6bba87a354894e | /cbd_test/src/main/java/com/test/cbd/controller/TestController.java | 67e6178b9ad46033b9fa2806c601685f8bf652d2 | [] | no_license | zxj1314/cbd | fd41a650642f81216f192652fa57ca8e89a49d93 | 66c1d78b42acacc1be8d1b6c680005ae46a367c3 | refs/heads/master | 2021-07-07T21:31:33.039641 | 2018-12-10T03:16:59 | 2018-12-10T03:16:59 | 154,364,667 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 643 | java | package com.test.cbd.controller;
import com.test.cbd.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by Jim on 2018/10/27.
*/
@RestController
@RequestMapping("/cbd")
public class TestController {
@Autowired
private UserService userService;
@GetMapping(value = "test")
public void test(){
System.out.println("test==================");
userService.login("1","1");
}
}
| [
"961310225@qq.com"
] | 961310225@qq.com |
2729efc3934f63c1d28114fd6be41b92aa03de72 | 0c9f3c3450cf00a84909a596d1171e0484c836f3 | /src/application/controller/ReservationListController.java | 1b36edcc6becc3313d6952224e13448ea92425fe | [] | no_license | foxxxxxxx7/JavaBikeShop | cec8390458960de4410d8c02426945279bea894b | fda336eb2f44723808c8ef0f90434fdde03c1701 | refs/heads/master | 2023-07-18T12:31:27.391611 | 2021-08-30T17:10:14 | 2021-08-30T17:10:14 | 401,424,416 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,976 | java | package application.controller;
import application.model.Bike;
import application.model.BikeShopModel;
import application.model.Reservation;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import java.time.LocalDate;
import java.util.ArrayList;
public class ReservationListController {
protected static BikeShopModel shop;
@FXML
private TableView<Reservation> reservationTable;
@FXML
private TableColumn<Reservation, LocalDate> txtDate;
@FXML
private TableColumn<Reservation, String> txtCustName;
@FXML
private TableColumn<Reservation, String> txtContactNum;
@FXML
private TableColumn<Reservation, String> txtBikeID;
@FXML
private TableColumn<Reservation, String> txtDuration;
@FXML
private TableColumn<Reservation, String> txtPickUp;
@FXML
private TableColumn<Reservation, String> txtDropOff;
@FXML
private TextField txtComment;
@FXML
private TextArea txtFeedBack;
@FXML
private TextField txtAreaProductInfo;
@FXML
private TextField txtUser;
@FXML
private TextField txtDateUpdate;
@FXML
private TextField txtCustNameUpdate;
@FXML
private TextField txtContactNumUpdate;
@FXML
private TextField txtBikeIDUpdate;
@FXML
private TextField txtDurationUpdate;
@FXML
private TextField txtPickUpUpdate;
@FXML
private TextField txtDropOffUpdate;
ArrayList<Reservation> allReservations = new ArrayList<>();
Reservation selectedReservation;
int selectedRow;
public ReservationListController() {
}
public void loadReservationTable() throws Exception
{
txtDate = new TableColumn<Reservation,LocalDate>("Date");
txtDate.setMinWidth(50);
txtDate.setCellValueFactory(new PropertyValueFactory<Reservation,LocalDate>("Date"));
txtCustName = new TableColumn<Reservation,String>("Customer Name");
txtCustName.setMinWidth(150);
txtCustName.setCellValueFactory(new PropertyValueFactory<Reservation,String>("CustName"));
txtContactNum = new TableColumn<Reservation,String>("Contact No.");
txtContactNum.setMinWidth(80);
txtContactNum.setCellValueFactory(new PropertyValueFactory<Reservation,String>("ContactNum"));
txtBikeID = new TableColumn<Reservation,String>("Bike ID");
txtBikeID.setMinWidth(80);
txtBikeID.setCellValueFactory(new PropertyValueFactory<>("bike"));
txtDuration = new TableColumn<Reservation,String>("Duration");
txtDuration.setMinWidth(80);
txtDuration.setCellValueFactory(new PropertyValueFactory<Reservation,String>("Duration"));
txtPickUp = new TableColumn<Reservation,String>("Pick Up");
txtPickUp.setMinWidth(150);
txtPickUp.setCellValueFactory(new PropertyValueFactory<Reservation,String>("PickUp"));
txtDropOff = new TableColumn<Reservation,String>("Drop Off");
txtDropOff.setMinWidth(150);
txtDropOff.setCellValueFactory(new PropertyValueFactory<Reservation,String>("DropOff"));
reservationTable.getColumns().addAll(txtDate, txtCustName, txtContactNum, txtBikeID, txtDuration, txtPickUp, txtDropOff);
reservationTable.setEditable(true);
reservationTable.getSelectionModel().cellSelectionEnabledProperty().set(true);
ObservableList<Reservation> rD = getReservations();
ObservableList<Reservation> rD2 = reservationTable.getSelectionModel().getSelectedItems();
rD2.addListener(new ListChangeListener<Reservation>() {
@Override
public void onChanged(Change<? extends Reservation> change) {
selectedReservation = change.getList().get(0);
selectedRow = reservationTable.getSelectionModel().getSelectedIndex();
txtDateUpdate.setText(selectedReservation.getDate().toString());
txtCustNameUpdate.setText(selectedReservation.getCustName());
txtContactNumUpdate.setText(selectedReservation.getContactNum());
txtBikeIDUpdate.setText(String.valueOf(selectedReservation.getBike()));
txtDurationUpdate.setText(selectedReservation.getDuration());
txtPickUpUpdate.setText(selectedReservation.getPickUp());
txtDropOffUpdate.setText(selectedReservation.getDuration());
System.out.println("Selection changed: " + change.getList());
}
});
System.out.println(rD.toString());
reservationTable.getItems().clear();
reservationTable.getItems().addAll(rD);
}
public ObservableList<Reservation> getReservations() throws Exception{
//ObservableList<UserData> users = FXCollections.observableArrayList();
// users.addAll(group.values());
ObservableList<Reservation> reservations = FXCollections.observableArrayList();
reservations.addAll(Main.shop.getReservations());
return reservations;
}
public void handleCancelBtn() throws Exception {
Main.set_pane(2);
}
public void handleUpdateBtn() throws Exception
{
LocalDate date = LocalDate.parse(txtDateUpdate.getText());
String custName = txtCustNameUpdate.getText();
String contactNum = txtContactNumUpdate.getText();
String bikeID = txtBikeIDUpdate.getText();
String duration = txtDurationUpdate.getText();
String pickUp = txtPickUpUpdate.getText();
String dropOff = txtDropOffUpdate.getText();
if(Main.shop.updateReservation(date, custName, contactNum, bikeID, duration, pickUp, dropOff, selectedRow )) {
txtFeedBack.setText("Reservation Updated");
Main.shop.saveAll();
}
else{
txtFeedBack.setText("Error: Reservation ID not found");
}
}
public void handleDeleteBtn() throws Exception
{
int custNum = reservationTable.getSelectionModel().getSelectedIndex();
String actualCustNum = Main.shop.getReservation(custNum).getContactNum();
if(Main.shop.deleteReservation(actualCustNum)){
txtFeedBack.setText("Reservation Deleted");
}
else{
txtFeedBack.setText("Error: Customer Number not found");
}
System.out.println("ID"+ custNum);
reservationTable.getItems().remove(custNum);
}
public void handleSaveBtn() throws Exception
{
shop.saveAll();
txtFeedBack.setText("Bikes Saved");
}
public void handleLoadBtn() throws Exception
{
Main.shop.loadAll();
txtFeedBack.setText("Bikes Loaded");
}
}
| [
"rob.fox7@hotmail.com"
] | rob.fox7@hotmail.com |
fbb55208399d41224b6fe6c5916dd443bf2c8c42 | c64daa1168e32a6cf4425f5efeac6d8372a285a7 | /src/test/java/server/repositories/AuditingTest.java | 9b4083524e0a50aa518e3d88b8bae4b6e907af6b | [] | no_license | undecaf/spring-boot-template | d7e4aace5e9b1236b75a6894593bf75836783ae4 | 27b9a61791962c8336cb95636dc0bbba927d09bf | refs/heads/master | 2023-08-09T22:07:00.957218 | 2023-07-20T19:30:17 | 2023-07-20T19:30:17 | 146,476,761 | 2 | 5 | null | 2023-09-06T20:29:11 | 2018-08-28T16:36:14 | Java | UTF-8 | Java | false | false | 3,705 | java | package server.repositories;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import server.IntegrationTest;
import server.models.One;
import server.models.UserUUID;
import java.time.Instant;
import static org.junit.jupiter.api.Assertions.*;
/**
*
* @author F. Kasper, ferdinand.kasper@bildung.gv.at
*/
@IntegrationTest
public class AuditingTest {
private static String username1;
private static String username2;
private static String plainPassword;
private static String password;
private static UserUUID user1;
private static UserUUID user2;
private static Long id;
private static Instant createdAt;
private static Instant modifiedAt;
@Autowired
private UserUUIDRepository userRepository;
@Autowired
private OneRepository oneRepository;
@BeforeAll
static void beforeAll() {
username1 = RandomStringUtils.randomAlphabetic(8);
username2 = RandomStringUtils.randomAlphabetic(8);
plainPassword = RandomStringUtils.randomAlphanumeric(8);
password = new BCryptPasswordEncoder().encode(plainPassword);
user1 = new UserUUID();
user1.setUsername(username1);
user1.setPassword(password);
user2 = new UserUUID();
user2.setUsername(username2);
user2.setPassword(password);
}
@Test
@Order(10)
void persistUsers() {
user1 = userRepository.save(user1);
user2 = userRepository.save(user2);
}
@Test
@Order(20)
void persistEntity() {
authenticate(user1);
One o = new One(null, "abc");
o = oneRepository.save(o);
id = o.getId();
createdAt = o.getModifiedAt();
// In Autoconfig: @EnableJpaAuditing(modifyOnCreate = true)
assertNotNull(createdAt, "modifiedAt is null");
assertEquals(SecurityContextHolder.getContext().getAuthentication().getPrincipal(), o.getModifiedBy());
}
@Test
@Order(30)
void retrieveEntity() {
authenticate(user1);
One o = oneRepository.findById(id).orElseThrow();
// In Autoconfig: @EnableJpaAuditing(modifyOnCreate = true)
assertEquals(createdAt, o.getModifiedAt());
assertEquals(SecurityContextHolder.getContext().getAuthentication().getPrincipal(), o.getModifiedBy());
}
@Test
@Order(40)
void modifyEntity() {
authenticate(user2);
One o = oneRepository.findById(id).orElseThrow();
o.setName(o.getName() + "x");
o = oneRepository.save(o);
modifiedAt = o.getModifiedAt();
assertNotNull(modifiedAt);
assertNotEquals(createdAt, modifiedAt);
assertEquals(SecurityContextHolder.getContext().getAuthentication().getPrincipal(), o.getModifiedBy());
}
@Test
@Order(50)
void retrieveModifiedEntity() {
authenticate(user1);
One o = oneRepository.findById(id).orElseThrow();
assertEquals(modifiedAt, o.getModifiedAt());
assertEquals(username2, o.getModifiedBy().getUsername());
}
private void authenticate(UserUUID user) {
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(user, plainPassword);
SecurityContextHolder.getContext().setAuthentication(token);
}
}
| [
"ferdinand.kasper@gmx.at"
] | ferdinand.kasper@gmx.at |
bed9619490af02e3c7bb4d283eadaf37e3830954 | 447520f40e82a060368a0802a391697bc00be96f | /apks/comparison_qark/com_db_pwcc_dbmobile/classes_dex2jar/com/db/pwcc/dbmobile/model/securities/CurrencyValues.java | 68253701167014957ed0e9927d554ee953f62fed | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 5,375 | java | package com.db.pwcc.dbmobile.model.securities;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import uuuuuu.popopp;
public class CurrencyValues
implements popopp, Parcelable
{
public static final Parcelable.Creator<CurrencyValues> CREATOR;
public static int b0061a00610061aaaa = 1;
public static int ba006100610061aaaa = 2;
public static int baa00610061aaaa = 61;
public static int baaaa0061aaa;
private MarketValue marketValue;
private Rate securityRate;
private UnrealizedProfitAndLoss unrealizedProfitAndLoss;
static
{
CurrencyValues.1 local1 = new CurrencyValues.1();
int i = baa00610061aaaa;
switch (i * (i + b0061a00610061aaaa) % ba006100610061aaaa)
{
default:
baa00610061aaaa = b0061006100610061aaaa();
b0061a00610061aaaa = b0061006100610061aaaa();
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = 2;
baaaa0061aaa = 20;
}
break;
}
CREATOR = local1;
}
public CurrencyValues() {}
protected CurrencyValues(Parcel paramParcel)
{
this.marketValue = ((MarketValue)paramParcel.readValue(MarketValue.class.getClassLoader()));
this.unrealizedProfitAndLoss = ((UnrealizedProfitAndLoss)paramParcel.readValue(UnrealizedProfitAndLoss.class.getClassLoader()));
this.securityRate = ((Rate)paramParcel.readValue(Rate.class.getClassLoader()));
}
public static int b0061006100610061aaaa()
{
return 4;
}
public static int b0061aaa0061aaa()
{
return 2;
}
public static int ba0061aa0061aaa()
{
return 1;
}
public int describeContents()
{
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % b0061aaa0061aaa() != baaaa0061aaa)
{
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = b0061006100610061aaaa();
baaaa0061aaa = b0061006100610061aaaa();
}
baa00610061aaaa = b0061006100610061aaaa();
baaaa0061aaa = 68;
}
return 0;
}
public MarketValue getMarketValue()
{
MarketValue localMarketValue = this.marketValue;
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = 12;
baaaa0061aaa = b0061006100610061aaaa();
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % b0061aaa0061aaa() != baaaa0061aaa)
{
baa00610061aaaa = 13;
baaaa0061aaa = b0061006100610061aaaa();
}
}
return localMarketValue;
}
public Rate getSecurityRate()
{
if ((baa00610061aaaa + ba0061aa0061aaa()) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa)
{
int i = b0061006100610061aaaa();
switch (i * (i + b0061a00610061aaaa) % ba006100610061aaaa)
{
default:
baa00610061aaaa = b0061006100610061aaaa();
baaaa0061aaa = 97;
}
baa00610061aaaa = 53;
baaaa0061aaa = 76;
}
return this.securityRate;
}
public UnrealizedProfitAndLoss getUnrealizedProfitAndLoss()
{
UnrealizedProfitAndLoss localUnrealizedProfitAndLoss = this.unrealizedProfitAndLoss;
int i = baa00610061aaaa;
switch (i * (i + b0061a00610061aaaa) % b0061aaa0061aaa())
{
default:
baa00610061aaaa = 12;
baaaa0061aaa = b0061006100610061aaaa();
int j = baa00610061aaaa;
switch (j * (j + b0061a00610061aaaa) % ba006100610061aaaa)
{
default:
baa00610061aaaa = 65;
baaaa0061aaa = b0061006100610061aaaa();
}
break;
}
return localUnrealizedProfitAndLoss;
}
public void setMarketValue(MarketValue paramMarketValue)
{
int i = b0061006100610061aaaa();
switch (i * (i + b0061a00610061aaaa) % ba006100610061aaaa)
{
default:
baa00610061aaaa = 91;
baaaa0061aaa = 52;
}
if ((b0061006100610061aaaa() + b0061a00610061aaaa) * b0061006100610061aaaa() % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = 9;
baaaa0061aaa = b0061006100610061aaaa();
}
this.marketValue = paramMarketValue;
}
public void setUnrealizedProfitAndLoss(UnrealizedProfitAndLoss paramUnrealizedProfitAndLoss)
{
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = 86;
baaaa0061aaa = 64;
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = 34;
baaaa0061aaa = 52;
}
}
this.unrealizedProfitAndLoss = paramUnrealizedProfitAndLoss;
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
paramParcel.writeValue(this.marketValue);
paramParcel.writeValue(this.unrealizedProfitAndLoss);
if ((b0061006100610061aaaa() + b0061a00610061aaaa) * b0061006100610061aaaa() % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = 76;
baaaa0061aaa = b0061006100610061aaaa();
if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa)
{
baa00610061aaaa = b0061006100610061aaaa();
baaaa0061aaa = 81;
}
}
paramParcel.writeValue(this.securityRate);
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
ce616bdd5e2570b4bd62db6db1e0bbd40798676a | 14ee3e348b0da913e0e204afe2a951f665e74aea | /GamesFlow/src/main/java/com/ecommerce/GamesFlow/model/Categorias.java | 87893d73c29deee7ffb6079b4650251568f8f3c8 | [] | no_license | jessicacordeiro/Aula-Generation-III | 18a25b515077174faf389ddadf92edc725541f6b | 70baa11c1ab135c32e4df1b841c37c3aba8e4d70 | refs/heads/main | 2023-04-01T09:56:42.856898 | 2021-04-09T22:23:03 | 2021-04-09T22:23:03 | 339,948,409 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package com.ecommerce.GamesFlow.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sun.istack.NotNull;
@Entity
@Table(name = "tb_categorias")
public class Categorias {
@Id
@GeneratedValue
private long id;
@NotNull
private String nomeCategorias;
@OneToMany(mappedBy = "categorias", cascade = CascadeType.ALL)
@JsonIgnoreProperties("categorias")
private List<Produtos> produtos;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getNomeCategorias() {
return nomeCategorias;
}
public void setNomeCategorias(String nomeCategorias) {
this.nomeCategorias = nomeCategorias;
}
public List<Produtos> getProdutos() {
return produtos;
}
public void setProdutos(List<Produtos> produtos) {
this.produtos = produtos;
}
}
| [
"jessica.cordeiro121@gmail.com"
] | jessica.cordeiro121@gmail.com |
0acf3d7391ee2843c670417a61029c15b1ba2d75 | b7fc0a72708e6e730eb75a0e757e33e281728695 | /Practica85_2/src/practica85_2/Practica85_2.java | 51af354ec4617aeb0327d1189e3ccc493fe8d7f1 | [] | no_license | alu20485598g/Proyectos_Pablo | ac3b2809b984afdc275c5e6d074c91e8081ba589 | 4d87abb7e2d7cd63cc9d2edeedef0e67a9c62710 | refs/heads/master | 2021-01-19T09:57:46.906791 | 2017-05-29T11:46:56 | 2017-05-29T11:46:56 | 87,802,012 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,111 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package practica85_2;
import java.util.ArrayList;
import java.util.Scanner;
/**
* Clase principal. En esta clase encontraremos las diferentes llamadas a la
* clase cuenta, donde crearemos diferentes objetos para las tres cuentas
* (c1, c2 y c3) y crearemos un ArrayList de las cuentas, y la clase Menu,
* donde podremos elegir las diferentes opciones.
* @author pablo
*/
public class Practica85_2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
/*Creamos el primer objeto a través de la clase cuenta. También crearemos
el ArrayList de las cuentas de tamaño 3.*/
ArrayList<cuenta> cuentas = new ArrayList(3);
cuenta c1 = new cuenta("Pablo","Hontoria","Cruz","20485598G",100000,4,1);
/*Copiaremos el tipo de interés del titular (Como indica el constructor
copia de la clase cuenta)*/
cuenta c2 = new cuenta(c1);
cuenta c3 = new cuenta(c1);
/*Agregamos las cuentas al ArrayList*/
cuentas.add(c1);
cuentas.add(c2);
cuentas.add(c3);
/*Introduciremos los nuevos datos de la cuenta Nº2 y Nº3*/
System.out.println("Los datos de la cuenta Nº1 ya han sido introducidos."
+ " Ahora introduzca los datos de las otras dos cuentas.");
String n;
float s;
for (int i=0;i<2;i++){
if(i==0){
System.out.println();
System.out.println("Introducción de los datos de la cuenta Nº2: ");
Scanner teclado01 = new Scanner(System.in);
System.out.print("Dime el nombre del titular: ");
n=teclado01.next();
cuentas.get(1).setnombre(n);
Scanner teclado02 = new Scanner(System.in);
System.out.print("Dime el primer apellido del titular: ");
n=teclado02.next();
cuentas.get(1).setapellido1(n);
Scanner teclado03 = new Scanner(System.in);
System.out.print("Dime el segundo apellido del titular: ");
n=teclado03.next();
cuentas.get(1).setapellido2(n);
Scanner teclado04 = new Scanner(System.in);
System.out.print("Dime el DNI del titular: ");
n=teclado04.next();
cuentas.get(1).setDNI(n);
Scanner teclado05 = new Scanner(System.in);
System.out.print("Dime el saldo que tiene la cuenta: ");
s=teclado05.nextFloat();
cuentas.get(1).setsaldo(s);
}
if(i==1){
System.out.println();
System.out.println("Introducción de los datos de la cuenta Nº3: ");
Scanner teclado06 = new Scanner(System.in);
System.out.print("Dime el nombre del titular: ");
n=teclado06.next();
cuentas.get(2).setnombre(n);
Scanner teclado07 = new Scanner(System.in);
System.out.print("Dime el primer apellido del titular: ");
n=teclado07.next();
cuentas.get(2).setapellido1(n);
Scanner teclado08 = new Scanner(System.in);
System.out.print("Dime el segundo apellido del titular: ");
n=teclado08.next();
cuentas.get(2).setapellido2(n);
Scanner teclado09 = new Scanner(System.in);
System.out.print("Dime el DNI del titular: ");
n=teclado09.next();
cuentas.get(2).setDNI(n);
Scanner teclado10 = new Scanner(System.in);
System.out.print("Dime el saldo que tiene la cuenta: ");
s=teclado10.nextFloat();
cuentas.get(2).setsaldo(s);
}
}
/*Llamamos a la clase menú para movernos entre las diferentes opciones*/
System.out.println();
Menu m = new Menu();
int op1=0;
int op2=0;
while (op1!=4){
op1=m.menuswitch1(op1, op2, cuentas);
if (op1 == 4){
System.out.println("Saliendo del programa...");
}
}
}
}
| [
"pablo@pablo-VirtualBox"
] | pablo@pablo-VirtualBox |
1c8eeb99278ba417e410c9527bae970a3c0ae29b | 48a2c5ca4f2005b20013bcde27c0c8c0bb4cdf48 | /src/main/java/tech/jefersonms/ducarmolocacoes/service/util/contrato/TagLocacaoNumero.java | 2f9b38e5e3960a58b1fce11077b057800e3b6e39 | [] | permissive | jefersonmombach/ducarmolocacoes | 0dde44984b5d5214b2e3b6d08336773eade15f2e | 966e04445a9f9379458ad99f71964b6113af265c | refs/heads/master | 2020-04-02T23:09:26.096125 | 2019-02-16T21:49:25 | 2019-02-16T21:49:25 | 144,500,667 | 0 | 0 | Apache-2.0 | 2018-08-12T21:07:33 | 2018-08-12T21:03:53 | null | UTF-8 | Java | false | false | 290 | java | package tech.jefersonms.ducarmolocacoes.service.util.contrato;
import tech.jefersonms.ducarmolocacoes.domain.Locacao;
public class TagLocacaoNumero extends Tag {
@Override
protected String getFormattedValue(String tagName, Locacao locacao) {
return locacao.getId().toString();
}
}
| [
"jefersonmombach@gmail.com"
] | jefersonmombach@gmail.com |
4b4235a9db97b63396af5df4f81f5e76a1bce83d | 900fe63ee7c6c0ba3af6cf054631046dfc222b64 | /src/main/java/com/github/terefang/jldap/ldap/LDAPSearchResultReference.java | f9e61258315a6346f4ee99c1c1f35af994c2c6af | [
"OLDAP-2.8",
"OLDAP-2.0.1"
] | permissive | terefang/jldap | f29b78cbeabff3d3c975392d7cf884debd9cfc1d | c2c75a872a8ea89d25bf42a538a94c0c0d843d0b | refs/heads/master | 2022-12-07T07:17:57.260242 | 2020-09-01T10:11:57 | 2020-09-01T10:11:57 | 291,960,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,040 | java | /* **************************************************************************
* $OpenLDAP$
*
* Copyright (C) 1999, 2000, 2001 Novell, Inc. All Rights Reserved.
*
* THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
* TREATIES. USE, MODIFICATION, AND REDISTRIBUTION OF THIS WORK IS SUBJECT
* TO VERSION 2.0.1 OF THE OPENLDAP PUBLIC LICENSE, A COPY OF WHICH IS
* AVAILABLE AT HTTP://WWW.OPENLDAP.ORG/LICENSE.HTML OR IN THE FILE "LICENSE"
* IN THE TOP-LEVEL DIRECTORY OF THE DISTRIBUTION. ANY USE OR EXPLOITATION
* OF THIS WORK OTHER THAN AS AUTHORIZED IN VERSION 2.0.1 OF THE OPENLDAP
* PUBLIC LICENSE, OR OTHER PRIOR WRITTEN CONSENT FROM NOVELL, COULD SUBJECT
* THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY.
******************************************************************************/
package com.github.terefang.jldap.ldap;
import java.io.IOException;
import java.net.MalformedURLException;
import com.github.terefang.jldap.ldap.asn1.ASN1Object;
import com.github.terefang.jldap.ldap.asn1.ASN1OctetString;
import com.github.terefang.jldap.ldap.client.Debug;
import com.github.terefang.jldap.ldap.rfc2251.RfcControls;
import com.github.terefang.jldap.ldap.rfc2251.RfcLDAPMessage;
import com.github.terefang.jldap.ldap.rfc2251.RfcSearchResultReference;
/**
*
* Encapsulates a continuation reference from an asynchronous search operation.
*
*/
public class LDAPSearchResultReference extends LDAPMessage {
private String[] srefs;
private static Object nameLock = new Object(); // protect agentNum
private static int refNum = 0; // Debug, LDAPConnection number
private String name; // String name for debug
/**
* This constructor was added to support default Serialization
*
*/
public LDAPSearchResultReference()
{
super();
}
/**
* Constructs an LDAPSearchResultReference object.
*
* @param message The LDAPMessage with a search reference.
*/
/*package*/ LDAPSearchResultReference(RfcLDAPMessage message)
{
super(message);
if( Debug.LDAP_DEBUG) {
synchronized(nameLock) {
name = "SearchResultReference(" + ++refNum + "): ";
}
Debug.trace( Debug.referrals, name + "Created");
}
return;
}
/** Constructs the Object from an array of referals, passed as string.
* @param referals array of search referals.
* @throws MalformedURLException When any referals url is not well-formed.
*/
public LDAPSearchResultReference(String referals[]) throws MalformedURLException
{
super(new RfcLDAPMessage(new RfcSearchResultReference(referals)));
}
/**
* Returns any URLs in the object.
*
* @return The URLs.
*/
public String[] getReferrals() {
if( Debug.LDAP_DEBUG ) {
Debug.trace( Debug.messages, name + "Enter getReferrals");
}
ASN1Object[] references =
((RfcSearchResultReference)message.getResponse()).toArray();
srefs = new String[references.length];
for( int i=0; i<references.length; i++) {
srefs[i] = ((ASN1OctetString)(references[i])).stringValue();
if( Debug.LDAP_DEBUG ) {
Debug.trace( Debug.referrals, name + "\t" + srefs[i] );
}
}
return( srefs );
}
protected void setDeserializedValues(LDAPMessage readObject, RfcControls asn1Ctrls)
throws IOException, ClassNotFoundException {
// Check if it is the correct message type
if(!(readObject instanceof LDAPSearchResultReference))
throw new ClassNotFoundException("Error occured while deserializing " +
"LDAPSearchResultReference object");
LDAPSearchResultReference tmp = (LDAPSearchResultReference)readObject;
String[] referals = tmp.getReferrals();
tmp = null; //remove reference after getting properties
message = new RfcLDAPMessage(new RfcSearchResultReference(referals));
// Garbage collect the readObject from readDSML()..
readObject = null;
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
cb1fd6220283aebc9d8d2d07200e8ec894e35565 | 173e61e2999152c754c211f440c2e4c88b966b41 | /src/io/wveiga/ia/util/Aleatorio.java | c2e8601427a2682140807e6e3e17f8d35083e373 | [] | no_license | abelMarquele/ia | e8867fcb315dd52ec84d67e09e3ded6eb9b6de87 | 3368b8c4e0b22ec839c8d6f44f625477c99a37e4 | refs/heads/master | 2020-05-07T14:18:13.316296 | 2017-03-06T01:54:00 | 2017-03-06T01:54:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 617 | java | package io.wveiga.ia.util;
import java.util.Random;
public final class Aleatorio {
private Aleatorio(){}
/**
* Algoritmo de Fisher–Yates.
*
* @See https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
* @param tamanho Tamanho do vetor de inteiros aleatorios gerado.
* @return Vetor de números aleatórios de 0 a tamanho.
*/
public static int[] vetorInteiros(int tamanho) {
int[] vetor = new int[tamanho];
Random rg = new Random();
for (int i = 0; i < tamanho; i++)
{
int r = rg.nextInt(i+1);
vetor[i] = vetor[r];
vetor[r] = i;
};
return vetor;
}
}
| [
"welington.veiga@gmail.com"
] | welington.veiga@gmail.com |
c6c511560985cb56f0555843892e06517932bcb1 | 86e14a86735a52267707d8aa31211247d0965865 | /src/main/java/uteq/sga/SYStemSGAv21/Models/Grupos.java | 60c4f5e4a662ba586b805c0f42635d15447d9c06 | [] | no_license | diego690/SystemSGAv21 | 7fc07880ccda1c995fb0af2320cb25a034cb197c | f4f14ca8390439aa7ae8287aa35c214e6bc5134c | refs/heads/master | 2023-07-19T06:46:09.585476 | 2021-09-03T05:29:55 | 2021-09-03T05:29:55 | 402,296,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,205 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package uteq.sga.SYStemSGAv21.Models;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author capur
*/
@Entity
@Table(name = "grupos")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Grupos.findAll", query = "SELECT g FROM Grupos g"),
@NamedQuery(name = "Grupos.findByIdgrupo", query = "SELECT g FROM Grupos g WHERE g.idgrupo = :idgrupo"),
@NamedQuery(name = "Grupos.findByNumerogrupo", query = "SELECT g FROM Grupos g WHERE g.numerogrupo = :numerogrupo"),
@NamedQuery(name = "Grupos.findByNombregrupo", query = "SELECT g FROM Grupos g WHERE g.nombregrupo = :nombregrupo")})
public class Grupos implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "idgrupo", nullable = false)
private Integer idgrupo;
@Basic(optional = false)
@Column(name = "numerogrupo", nullable = false, length = 50)
private String numerogrupo;
@Basic(optional = false)
@Column(name = "nombregrupo", nullable = false, length = 50)
private String nombregrupo;
public Grupos() {
}
public Grupos(Integer idgrupo) {
this.idgrupo = idgrupo;
}
public Grupos(Integer idgrupo, String numerogrupo, String nombregrupo) {
this.idgrupo = idgrupo;
this.numerogrupo = numerogrupo;
this.nombregrupo = nombregrupo;
}
public Integer getIdgrupo() {
return idgrupo;
}
public void setIdgrupo(Integer idgrupo) {
this.idgrupo = idgrupo;
}
public String getNumerogrupo() {
return numerogrupo;
}
public void setNumerogrupo(String numerogrupo) {
this.numerogrupo = numerogrupo;
}
public String getNombregrupo() {
return nombregrupo;
}
public void setNombregrupo(String nombregrupo) {
this.nombregrupo = nombregrupo;
}
@Override
public int hashCode() {
int hash = 0;
hash += (idgrupo != null ? idgrupo.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Grupos)) {
return false;
}
Grupos other = (Grupos) object;
if ((this.idgrupo == null && other.idgrupo != null) || (this.idgrupo != null && !this.idgrupo.equals(other.idgrupo))) {
return false;
}
return true;
}
@Override
public String toString() {
return "uteq.sga.SYStemSGAv21.Models.Grupos[ idgrupo=" + idgrupo + " ]";
}
}
| [
"diego.capurro2016@uteq.edu.ec"
] | diego.capurro2016@uteq.edu.ec |
ad6595b8f06c82bcd3a55cecb8736d83865501f2 | 8f0aa51361e1054fba96adb761b13dad48eb3511 | /src/main/java/datastructure/ReverseKgroupLinkedList.java | e1d22feb97bef6509bdd37a8e71264867fe09141 | [] | no_license | RamaTripathi/LeetCodePractice | 3b0daacb879be74100cd9b245cc2dd2559de2b6e | f0ff69b71419ccf42054a7f27e4f2c4cd19c33e2 | refs/heads/main | 2023-08-22T18:02:29.986756 | 2021-10-07T12:36:41 | 2021-10-07T12:36:41 | 411,594,196 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,231 | java | /*
* Copyright (c) 2021.
*
* Authored By Rama Abhimanyu Sharma
*/
package datastructure;
public class ReverseKgroupLinkedList {
public static void main(String args[]) {
ListNode head= new ListNode(1);
ListNode node2=new ListNode(2);
ListNode node3=new ListNode(3);
ListNode node4=new ListNode(4);
ListNode node5=new ListNode(5);
head.next=node2;
node2.next=node3;
node3.next=node4;
node4.next=node5;
reverseKGroup(head,2);
}
public static ListNode reverseLinkedList(ListNode head, int k) {
// Reverse k nodes of the given linked list.
// This function assumes that the list contains
// atleast k nodes.
ListNode new_head = null;
ListNode ptr = head;
while (k > 0) {
// Keep track of the next node to process in the
// original list
ListNode next_node = ptr.next;
// Insert the node pointed to by "ptr"
// at the beginning of the reversed list
ptr.next = new_head;
new_head = ptr;
// Move on to the next node
ptr = next_node;
// Decrement the count of nodes to be reversed by 1
k--;
}
// Return the head of the reversed list
return new_head;
}
public static ListNode reverseKGroup(ListNode head, int k) {
ListNode ptr = head;
ListNode ktail = null;
// Head of the final, moified linked list
ListNode new_head = null;
// Keep going until there are nodes in the list
while (ptr != null) {
int count = 0;
// Start counting nodes from the head
ptr = head;
// Find the head of the next k nodes
while (count < k && ptr != null) {
ptr = ptr.next;
count += 1;
}
// If we counted k nodes, reverse them
if (count == k) {
// Reverse k nodes and get the new head
ListNode revHead = reverseLinkedList(head, k);
// new_head is the head of the final linked list
if (new_head == null)
new_head= revHead;
// ktail is the tail of the previous block of
// reversed k nodes
if (ktail != null)
ktail.next = revHead;
ktail = head;
head = ptr;
}
}
// attach the final, possibly un-reversed portion
if (ktail != null)
ktail.next = head;
return new_head == null ? head : new_head;
}
} | [
"79302008+rama-vmw@users.noreply.github.com"
] | 79302008+rama-vmw@users.noreply.github.com |
5fba3684f6cf9f3d75567be596a82d700453311f | 8810c0d78569d7483764fad167a823096e82a366 | /src/test/java/com/junit/example/JunitAnnotations.java | 482fefef93c11f7de304123291c3f6066136e49f | [] | no_license | meetmmpatel/UnitTest_Log_Common | 354837a2ed66cecc2b18a2eed05949cf0de00a79 | c80827bc7268a43ef6a8d8aa7aa30599310049f1 | refs/heads/master | 2022-10-12T17:07:11.876816 | 2019-06-06T21:34:01 | 2019-06-06T21:34:01 | 190,455,335 | 0 | 1 | null | 2022-10-05T19:27:27 | 2019-06-05T19:23:15 | Java | UTF-8 | Java | false | false | 968 | java | package com.junit.example;
import org.junit.Test;
import org.junit.jupiter.api.*;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
public class JunitAnnotations {
@BeforeAll
public static void initAll(){
System.out.println("This is Before all ...");
}
@BeforeEach
public void init(){
System.out.println("This is Before Each method");
}
@Test
@DisplayName("First Test")
@RepeatedTest(5)
public void testMethodOne(){
System.out.println("..Test method one");
}
@Test
@Disabled
public void testMethodTwo(){
System.out.println("...Test method two");
}
@Test
@RepeatedTest(5)
public void testMethodThree(){
System.out.println("...Test method three");
}
@AfterEach
public void closeSetup(){
System.out.println("running after every test");
}
@AfterAll
public static void closeSetupAll(){
System.out.println("Running After all test ran..");
}
}
| [
"meetmmpatel@gmail.com"
] | meetmmpatel@gmail.com |
bce0f82ea897e3032d2cbd2b45b694c2ee83c814 | e3d737cf4c9c4ec4732d6bbbe5e310816c6c85ab | /src/main/java/Masajista.java | 38973e96e77ce8d21b320600408aaeb293e0a16b | [] | no_license | LenguajesDProgramacion/code2 | f911e9417c83f93181eefd7033c102d7fa5c7ff9 | a35da0ffe5f6418dfa09a0b190cafb2014e71818 | refs/heads/master | 2020-04-03T17:48:55.812563 | 2018-11-20T00:20:29 | 2018-11-20T00:20:29 | 155,459,899 | 0 | 0 | null | 2018-11-20T00:20:30 | 2018-10-30T21:41:16 | null | UTF-8 | Java | false | false | 410 | java | public abstract class Masajista extends SeleccionFutbol{
private String titulacion;
protected int aniosExperiencia;
public Masajista(int id, String nombre, String apellido, int edad, String titulacion, int aniosExperiencia){
super(id,nombre,apellido,edad);
this.titulacion = titulacion;
this.aniosExperiencia = aniosExperiencia;
}
public void darMsaje(){
}
}
| [
"raularispeveizaga@gmail.com"
] | raularispeveizaga@gmail.com |
1012fe0109f390e086466482876b9a8885c8b91a | 090479413f3ac59825fee0479954d14c314277cb | /src/main/java/com/andrelake/supplementstore/api/controller/SupplementStoreController.java | 6ef98d1d645bcda550fc3af1ac7021214822397b | [] | no_license | andrelake/supplement-store | 0445806d076050d13c666053b79795e2ffeb4bc6 | ed01098d415a0b1c9719aa53a2ddd97fd7a06a11 | refs/heads/master | 2021-06-14T07:20:25.488317 | 2020-04-14T20:12:16 | 2020-04-14T20:12:16 | 254,485,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,632 | java | package com.andrelake.supplementstore.api.controller;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ReflectionUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.andrelake.supplementstore.domain.exceptions.EntityNotFoundException;
import com.andrelake.supplementstore.domain.model.SupplementStore;
import com.andrelake.supplementstore.domain.repository.SupplementStoreRepository;
import com.andrelake.supplementstore.domain.services.SupplementStoreService;
import com.fasterxml.jackson.databind.ObjectMapper;
@RestController
@RequestMapping("/stores")
public class SupplementStoreController {
@Autowired
private SupplementStoreRepository supRepository;
@Autowired
private SupplementStoreService supService;
@GetMapping
public List<SupplementStore> findAll(){
return supRepository.findAll();
}
@GetMapping("/{id}")
public ResponseEntity<SupplementStore> findById(@PathVariable Long id) {
Optional<SupplementStore> sup = supRepository.findById(id);
if(sup.isEmpty()) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok(sup.get());
}
@PostMapping
public ResponseEntity<?> add(@RequestBody SupplementStore supStore) {
try {
supStore = supService.salvar(supStore);
return ResponseEntity.status(HttpStatus.CREATED).body(supStore);
}
catch(EntityNotFoundException e) {
return ResponseEntity.badRequest().body(e.getMessage());
}
}
@PutMapping("/{id}")
public ResponseEntity<?> update(@PathVariable Long id, @RequestBody SupplementStore supStore) {
SupplementStore actualSupStore = supService.findOrFail(id);
BeanUtils.copyProperties(supStore, actualSupStore, "id");
SupplementStore savedSupStore = supService.salvar(actualSupStore);
return ResponseEntity.ok(savedSupStore);
}
@PatchMapping("/{id}")
public ResponseEntity<?> partialUpdate(@PathVariable Long id, @RequestBody Map<String, Object> columns) {
SupplementStore supStore = supService.findOrFail(id);
merge(columns, supStore);
return update(id, supStore);
}
private void merge(Map<String, Object> originData, SupplementStore targetSupStore) {
ObjectMapper objectMapper = new ObjectMapper();
SupplementStore originSupStore = objectMapper.convertValue(originData, SupplementStore.class);
originData.forEach((propertyName, propertyValue) -> {
Field field = ReflectionUtils.findField(SupplementStore.class, propertyName);
field.setAccessible(true);
Object newValue = ReflectionUtils.getField(field, originSupStore);
ReflectionUtils.setField(field, targetSupStore, newValue);
});
}
@DeleteMapping("/{id}")
@ResponseStatus(HttpStatus.NO_CONTENT)
public void delete(@PathVariable Long id) {
supService.excluir(id);
}
}
| [
"andre.lake@hotmail.com"
] | andre.lake@hotmail.com |
ae13d9781f09972b2076a0e0e385bb36106c49d0 | 304bc97b08534ded1070101b8c8ecbcaed264f27 | /src/main/java/br/com/fiap/reciclamais/gateway/repository/data/EnderecoDocument.java | 97933c5648a6fb5f29b6ab17931f47ce3788ff82 | [] | no_license | guiferreirak/reciclamais | 2c9ca3515786814569b5e890ea23d1411441c1c6 | 464988080571bb361b7d4301d01af8083e014a60 | refs/heads/master | 2020-08-02T23:03:24.454139 | 2019-10-24T00:34:26 | 2019-10-24T00:34:26 | 211,535,200 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 415 | java | package br.com.fiap.reciclamais.gateway.repository.data;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class EnderecoDocument {
private String cep;
private String rua;
private Integer numero;
private String cidade;
private String bairro;
private String estado;
}
| [
"gui.ferreirak@gmail.com"
] | gui.ferreirak@gmail.com |
5da4f946d67a366da0a9636fb5838afa5bb99081 | 3f8c482f8d86a1b2375108ed5c18d59823d700a9 | /cloud-consumer-order/src/main/java/com/silent/springcloud/loadbalancer/LoadBalancer.java | 234e8ba8e7fc48bedc7d0cdcbbe0abe089e5cc29 | [] | no_license | autarchy-01/springcloud2021 | 9d332538877743b2a6e1f9ca35962ca24d793729 | 8ec56db505ae0885ce6c5eaa93b26d715bfadb35 | refs/heads/master | 2023-04-25T20:09:42.598233 | 2021-05-31T15:59:41 | 2021-05-31T15:59:41 | 357,814,186 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 434 | java | package com.silent.springcloud.loadbalancer;
import org.springframework.cloud.client.ServiceInstance;
import java.util.List;
/**
* @author silent
* @version 1.0
* @date 2021/2/16 16:09
**/
public interface LoadBalancer {
/**
* 选出需要提供的服务
*
* @param serviceInstances 服务列表
* @return 选出的服务
*/
ServiceInstance instances(List<ServiceInstance> serviceInstances);
}
| [
"398983164@qq.com"
] | 398983164@qq.com |
9de0194451b6e43b87a93e5b4e23f02fc6ce1f71 | fd7de0b879603b81118c1d7f73dc4ba72f380aa2 | /shiroSSM2/src/main/java/service/impl/PermissionServiceImpl.java | 5633708418c26f2eeee2b3b7103bea02a8e2b683 | [] | no_license | HUxin-liang/SSM | d66e21145ea57374de4995bab92a873f1b7f015b | b284a4738100796abd12a0971baea9060bded78f | refs/heads/master | 2021-10-30T09:40:08.673273 | 2019-04-26T01:47:55 | 2019-04-26T01:47:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,629 | java | package service.impl;
import mapper.PermissionMapper;
import mapper.RolePermissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.*;
import service.PermissionService;
import service.RoleService;
import service.UserService;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@Service
public class PermissionServiceImpl implements PermissionService {
@Autowired
PermissionMapper permissionMapper;
@Autowired
UserService userService;
@Autowired
RoleService roleService;
@Autowired
RolePermissionMapper rolePermissionMapper;
@Override
public Set<String> listPermissions(String userName) {
Set<String> result = new HashSet<>();
List<Role> roles = roleService.listRoles(userName);
List<RolePermission> rolePermissions = new ArrayList<>();
for (Role role : roles) {
RolePermissionExample example = new RolePermissionExample();
example.createCriteria().andRidEqualTo(role.getId());
List<RolePermission> rps= rolePermissionMapper.selectByExample(example);
rolePermissions.addAll(rps);
}
for (RolePermission rolePermission : rolePermissions) {
Permission p = permissionMapper.selectByPrimaryKey(rolePermission.getPid());
result.add(p.getName());
}
return result;
}
@Override
public void add(Permission u) {
permissionMapper.insert(u);
}
@Override
public void delete(Long id) {
permissionMapper.deleteByPrimaryKey(id);
}
@Override
public void update(Permission u) {
permissionMapper.updateByPrimaryKeySelective(u);
}
@Override
public Permission get(Long id) {
return permissionMapper.selectByPrimaryKey(id);
}
@Override
public List<Permission> list(){
PermissionExample example =new PermissionExample();
example.setOrderByClause("id desc");
return permissionMapper.selectByExample(example);
}
@Override
public List<Permission> list(Role role) {
List<Permission> result = new ArrayList<>();
RolePermissionExample example = new RolePermissionExample();
example.createCriteria().andRidEqualTo(role.getId());
List<RolePermission> rps = rolePermissionMapper.selectByExample(example);
for (RolePermission rolePermission : rps) {
result.add(permissionMapper.selectByPrimaryKey(rolePermission.getPid()));
}
return result;
}
} | [
"853652726@qq.com"
] | 853652726@qq.com |
922974fccfd0e9f78996d39ab006cc57e8668d06 | db10d6414b1bf730e96b9fd49443b6049127a1ad | /src/test/java/sort/SelectionSort.java | dee813f30643797ce9df3e04f6ef2c8b43abb531 | [
"CC-BY-4.0"
] | permissive | KSH-code/algorithm_basic_java | 4af752e534390d491449c983b09787a9a2dce28d | 19841151ff7683796ec7fc1ed084fbafe1425153 | refs/heads/master | 2021-05-15T12:59:34.430472 | 2017-10-27T05:12:25 | 2017-10-27T05:12:25 | 108,500,035 | 1 | 0 | null | 2017-10-27T04:41:54 | 2017-10-27T04:41:54 | null | UTF-8 | Java | false | false | 1,122 | java | package sort;
import org.junit.Test;
import utils.Utils;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class SelectionSort {
/*
TASK
Selection sort를 구현한다.
*/
@Test
public void test() {
int[] arr1 = {};
int[] sortedArr1 = {};
assertThat(solution(arr1), is(sortedArr1));
int[] arr2 = {6,4,1,8,9,2,7,5,3};
int[] sortedArr2 = {1,2,3,4,5,6,7,8,9};
assertThat(solution(arr2), is(sortedArr2));
int[] arr3 = {1};
int[] sortedArr3 = {1};
assertThat(solution(arr3), is(sortedArr3));
}
public int[] solution(int[] arr) {
if (arr == null) return null;
int[] result = arr;
int maxPos;
for (int i = 0; i < result.length - 1; i++) {
maxPos = i;
for (int k = i + 1; k < result.length; k++) {
if (result[maxPos] > result[k]) {
maxPos = k;
}
}
result = Utils.swapValue(result, i, maxPos);
}
return result;
}
}
| [
"ljyhanll@gmail.com"
] | ljyhanll@gmail.com |
1d779370ee7a1a5ab35fa113e211d880b3c1e35f | 005771256c754e6ae051ae6aa9ca40e8a9992463 | /src/chriso/library/view/UpdateStudentDetail.java | 33e013ebd1be1ce126a56e292625fabf919e1b9e | [] | no_license | prason-chriso/chrisoLibrarySystem | 362c8453e86f19bd07f930c9bb2c5d4c0429a89e | c0dc17c1955392165a1f01a86192c66c8b984b2d | refs/heads/master | 2020-03-11T10:04:47.741288 | 2018-04-17T16:16:01 | 2018-04-17T16:16:01 | 129,931,588 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 25,797 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package chriso.library.view;
import chriso.library.controller.StudentDAO;
import chriso.library.miscelleneous.InputController;
import chriso.library.model.Student;
import java.awt.Color;
import java.io.File;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
/**
*
* @author Amit
*/
public class UpdateStudentDetail extends javax.swing.JPanel {
public static int STUDENT_ID = -1;
public static String IMG_LOCATION = "";
private boolean ALL_INPUT_GIVEN = false;
public UpdateStudentDetail() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup_gender = new javax.swing.ButtonGroup();
jLabel_name = new javax.swing.JLabel();
jLabel_contact = new javax.swing.JLabel();
jLabel_batch = new javax.swing.JLabel();
jLabel_dateOfBirth = new javax.swing.JLabel();
jLabel_department = new javax.swing.JLabel();
jLabel_email = new javax.swing.JLabel();
jTextField_name = new javax.swing.JTextField();
jTextField_contact = new javax.swing.JTextField();
jTextField_batch = new javax.swing.JTextField();
jTextField_department = new javax.swing.JTextField();
jTextField_email = new javax.swing.JTextField();
jButton_updateRecord = new javax.swing.JButton();
jPanel_titleHolder = new javax.swing.JPanel();
jLabel_titleText = new javax.swing.JLabel();
jTextField_searchIdInput = new javax.swing.JTextField();
jLabel_search = new javax.swing.JLabel();
jButton_changeImage = new javax.swing.JButton();
jLabel_userName = new javax.swing.JLabel();
jLabel_newPass = new javax.swing.JLabel();
jLabel_retypePass = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jTextField_userName = new javax.swing.JTextField();
jPasswordField_newPass = new javax.swing.JPasswordField();
jPasswordField_retypePass = new javax.swing.JPasswordField();
jTextField_imageURL = new javax.swing.JTextField();
jComboBox_year = new javax.swing.JComboBox();
jComboBox_month = new javax.swing.JComboBox();
jComboBox_day = new javax.swing.JComboBox();
jSeparator1 = new javax.swing.JSeparator();
jRadioButton_male = new javax.swing.JRadioButton();
jRadioButton_female = new javax.swing.JRadioButton();
jLabel_gender = new javax.swing.JLabel();
jLabel_errorIdInput = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
buttonGroup_gender.add(jRadioButton_male);
buttonGroup_gender.add(jRadioButton_female);
setBackground(new java.awt.Color(204, 204, 204));
addComponentListener(new java.awt.event.ComponentAdapter() {
public void componentShown(java.awt.event.ComponentEvent evt) {
formComponentShown(evt);
}
});
setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel_name.setText("Name");
add(jLabel_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(54, 162, -1, -1));
jLabel_contact.setText("Contact");
add(jLabel_contact, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 240, -1, -1));
jLabel_batch.setText("Batch");
add(jLabel_batch, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 320, -1, -1));
jLabel_dateOfBirth.setText("DOB");
add(jLabel_dateOfBirth, new org.netbeans.lib.awtextra.AbsoluteConstraints(368, 162, -1, -1));
jLabel_department.setText("Department");
add(jLabel_department, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 354, -1, 20));
jLabel_email.setText("Email");
add(jLabel_email, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 200, -1, -1));
jTextField_name.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField_nameActionPerformed(evt);
}
});
add(jTextField_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(121, 159, 218, 28));
jTextField_contact.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField_contactActionPerformed(evt);
}
});
add(jTextField_contact, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 240, 218, 29));
jTextField_batch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField_batchActionPerformed(evt);
}
});
add(jTextField_batch, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 310, 218, 32));
jTextField_department.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField_departmentActionPerformed(evt);
}
});
add(jTextField_department, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 350, 218, 27));
add(jTextField_email, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 200, 218, 31));
jButton_updateRecord.setBackground(new java.awt.Color(0, 102, 102));
jButton_updateRecord.setText(" Update Record");
jButton_updateRecord.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton_updateRecordActionPerformed(evt);
}
});
add(jButton_updateRecord, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 400, 199, 50));
jPanel_titleHolder.setBackground(new java.awt.Color(153, 153, 153));
jLabel_titleText.setBackground(new java.awt.Color(204, 204, 204));
jLabel_titleText.setFont(new java.awt.Font("Tahoma", 3, 36)); // NOI18N
jLabel_titleText.setForeground(new java.awt.Color(0, 102, 102));
jLabel_titleText.setText("Search And Update Student Detail");
javax.swing.GroupLayout jPanel_titleHolderLayout = new javax.swing.GroupLayout(jPanel_titleHolder);
jPanel_titleHolder.setLayout(jPanel_titleHolderLayout);
jPanel_titleHolderLayout.setHorizontalGroup(
jPanel_titleHolderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel_titleHolderLayout.createSequentialGroup()
.addGap(27, 27, 27)
.addComponent(jLabel_titleText, javax.swing.GroupLayout.DEFAULT_SIZE, 653, Short.MAX_VALUE)
.addContainerGap())
);
jPanel_titleHolderLayout.setVerticalGroup(
jPanel_titleHolderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel_titleHolderLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel_titleText)
.addGap(27, 27, 27))
);
add(jPanel_titleHolder, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 690, 80));
jTextField_searchIdInput.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
jTextField_searchIdInputKeyTyped(evt);
}
});
add(jTextField_searchIdInput, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 100, 185, 31));
jLabel_search.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel_search.setText("Search By ID: ");
add(jLabel_search, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 100, -1, -1));
jButton_changeImage.setBackground(new java.awt.Color(0, 102, 102));
jButton_changeImage.setText("ChangeImage");
jButton_changeImage.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton_changeImageActionPerformed(evt);
}
});
add(jButton_changeImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 350, 120, 30));
jLabel_userName.setText("User Name");
add(jLabel_userName, new org.netbeans.lib.awtextra.AbsoluteConstraints(368, 214, -1, -1));
jLabel_newPass.setText("Password");
add(jLabel_newPass, new org.netbeans.lib.awtextra.AbsoluteConstraints(368, 254, -1, -1));
jLabel_retypePass.setText("Retype password");
add(jLabel_retypePass, new org.netbeans.lib.awtextra.AbsoluteConstraints(351, 293, -1, -1));
jLabel4.setText("Image");
add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 360, -1, -1));
add(jTextField_userName, new org.netbeans.lib.awtextra.AbsoluteConstraints(438, 205, 215, 32));
add(jPasswordField_newPass, new org.netbeans.lib.awtextra.AbsoluteConstraints(438, 248, 215, 26));
jPasswordField_retypePass.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jPasswordField_retypePassActionPerformed(evt);
}
});
jPasswordField_retypePass.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jPasswordField_retypePassKeyReleased(evt);
}
public void keyTyped(java.awt.event.KeyEvent evt) {
jPasswordField_retypePassKeyTyped(evt);
}
});
add(jPasswordField_retypePass, new org.netbeans.lib.awtextra.AbsoluteConstraints(439, 290, 214, 31));
jTextField_imageURL.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField_imageURLActionPerformed(evt);
}
});
jTextField_imageURL.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jTextField_imageURLKeyReleased(evt);
}
public void keyTyped(java.awt.event.KeyEvent evt) {
jTextField_imageURLKeyTyped(evt);
}
});
add(jTextField_imageURL, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 350, 130, 29));
jComboBox_year.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "-Year-" }));
add(jComboBox_year, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 160, 70, 30));
for(int i=1950; i<=2020; i++){
jComboBox_year.addItem(i);
}
jComboBox_month.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "-Month-"}));
add(jComboBox_month, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 160, 60, 30));
for(int j=1; j<=12; j++){
jComboBox_month.addItem(j);
}
jComboBox_day.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "-Day-" }));
add(jComboBox_day, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 160, 60, 30));
for(int k=1; k<=32; k++){
jComboBox_day.addItem(k);
}
add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 690, -1));
jRadioButton_male.setText("Male");
add(jRadioButton_male, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 280, -1, -1));
jRadioButton_female.setText("Female");
add(jRadioButton_female, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 280, -1, -1));
jLabel_gender.setText("Gender");
add(jLabel_gender, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 280, -1, 20));
jLabel_errorIdInput.setForeground(new java.awt.Color(255, 0, 0));
add(jLabel_errorIdInput, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 104, 190, 20));
add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 320, 210, -1));
add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 380, 230, -1));
}// </editor-fold>//GEN-END:initComponents
private void jTextField_nameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField_nameActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField_nameActionPerformed
private void jTextField_contactActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField_contactActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField_contactActionPerformed
private void jTextField_batchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField_batchActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField_batchActionPerformed
private void jTextField_departmentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField_departmentActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField_departmentActionPerformed
private void jPasswordField_retypePassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPasswordField_retypePassActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jPasswordField_retypePassActionPerformed
private void jTextField_imageURLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField_imageURLActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField_imageURLActionPerformed
private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown
// TODO add your handling code here:
if (STUDENT_ID != -1) {
fetchTaskAuto(STUDENT_ID);
}//end of the if block
else if (STUDENT_ID == -1) {
if (DisplayStudentDetail.REDIRECTED_FROM_SEARCHSTUDENT) {
fetchTaskAuto(Integer.parseInt(jTextField_searchIdInput.getText()));
}
}
}//GEN-LAST:event_formComponentShown
private void jTextField_searchIdInputKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField_searchIdInputKeyTyped
String id = "";
char c = (char) evt.getKeyChar();
id += c;
if (!id.equals("")) { //no need to search id the id field is empty
if (InputController.allowOnlyNumber(evt, c)) {
fetchTaskAuto(Integer.parseInt(id));
}
} else {
System.out.println("Dear Admin, you can only search By Student Id");
}
}//GEN-LAST:event_jTextField_searchIdInputKeyTyped
private void jButton_updateRecordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_updateRecordActionPerformed
// TODO add your handling code here:
//extracting the value availabble in hte form
String newPass = new String(jPasswordField_newPass.getPassword());
String rePass = new String(jPasswordField_retypePass.getPassword());
String fullName = jTextField_name.getText();
String email = jTextField_email.getText();
String userName = jTextField_userName.getText();
String dept = jTextField_department.getText();
String batch = jTextField_batch.getText();
String contact = jTextField_contact.getText();
//check if any of thhe required valud is left blank
if (newPass.equals("") || rePass.equals("") || fullName.equals("")
|| userName.equals("") || dept.equals("") || contact.equals("")) {
JOptionPane.showMessageDialog(null, "you are not supposed to left the"
+ " input field empty for Password, user");
return; //not necessary to execute further code snippet
}
if (jTextField_imageURL.equals("")) {
jLabel2.setForeground(Color.red);
jLabel2.setText("Choose the image");
return;
} else {
jLabel2.setForeground(new Color(30, 180, 40));
System.out.println("this is from here ");
jLabel2.setText("Image Selectted");
}
try {
//now we will set the value of every field of the form in the student object
Student student = new Student();
student.setStudentIdNew(Integer.parseInt(jTextField_searchIdInput.getText()));
String[] name = fullName.split(" ");
student.setFirstName(name[0]);
student.setLastName(name[1]);
student.setEmail(email);
student.setUserName(userName);
student.setPassword(newPass);
student.setDateOfBirth(getDOB()); //function is created below;
student.setDepartment(dept);
student.setContact(Long.parseLong(contact));
student.setGender(getGender());//function is created below;
student.setBatch(Integer.parseInt(batch));
//also sending the image url
student.setUrl(jTextField_imageURL.getText());
//now we will send the information about the student in the DAO for the
//executioon of the update task
StudentDAO stdao = new StudentDAO();
boolean success;
success = stdao.adminUpdateStudentRecord(student);
if (success) {
JOptionPane.showMessageDialog(null, jTextField_name.getText() + ", record is updated ");
fetchTaskAuto(Integer.parseInt(jTextField_searchIdInput.getText()));
} else {
System.out.println("error in the update process");
}
} catch (ParseException ex) {
System.out.println("while the task of update student is being done" + ex);
}
}//GEN-LAST:event_jButton_updateRecordActionPerformed
private void jButton_changeImageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_changeImageActionPerformed
// TODO add your handling code here:
JFileChooser jfc = new JFileChooser();
int result = jfc.showOpenDialog(this);
if (result == JFileChooser.APPROVE_OPTION) {
File file = jfc.getSelectedFile();
jTextField_imageURL.setText(file.toString());
}
}//GEN-LAST:event_jButton_changeImageActionPerformed
private void jTextField_imageURLKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField_imageURLKeyTyped
// TODO add your handling code here:
evt.consume();
}//GEN-LAST:event_jTextField_imageURLKeyTyped
private void jTextField_imageURLKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField_imageURLKeyReleased
// TODO add your handling code here:
evt.consume();
}//GEN-LAST:event_jTextField_imageURLKeyReleased
private void jPasswordField_retypePassKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPasswordField_retypePassKeyTyped
// TODO add your handling code here:
}//GEN-LAST:event_jPasswordField_retypePassKeyTyped
private void jPasswordField_retypePassKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPasswordField_retypePassKeyReleased
// TODO add your handling code here:
String first = new String(jPasswordField_newPass.getPassword());
String second = new String(jPasswordField_retypePass.getPassword());
if (second.equals(first)) {
jLabel1.setForeground(new Color(30, 180, 40));
jLabel1.setText("Matched");
ALL_INPUT_GIVEN = true;
} else {
jLabel1.setForeground(Color.red);
jLabel1.setText("Not Matched");
}
}//GEN-LAST:event_jPasswordField_retypePassKeyReleased
public java.sql.Date getDOB() throws ParseException {
//to create the Date object from the spinner
String dobString = jComboBox_year.getSelectedItem().toString() + "-" + jComboBox_month.getSelectedItem().toString() + "-" + jComboBox_day.getSelectedItem().toString();
DateFormat dFormat = new SimpleDateFormat("yy-MM-dd", Locale.ENGLISH);
Date dob = dFormat.parse(dobString); //can generate ParserException
java.sql.Date sqldob = new java.sql.Date(dob.getTime());
return sqldob;
}
//this method will return the gender as per selected in the form
public String getGender() {
if (jRadioButton_male.isSelected()) {
return "male";
} else if (jRadioButton_female.isSelected()) {
return "female";
} else {
return null;
}
}
public void fetchTaskAuto(int ID) {
Student student = new Student();
student.setStudentId(ID);
StudentDAO stddao = new StudentDAO();
student = stddao.getAllStudentRecord(student);
//after this statement the student object will consist of the all informatioon
//about the current student ID
if (student != null) {
jLabel_errorIdInput.setText(""); //when student is found then error message are to be erased
jTextField_searchIdInput.setText(String.valueOf(ID));
jTextField_name.setText(student.getFirstName() + " " + student.getLastName());
jTextField_userName.setText(student.getUserName());
jTextField_email.setText(student.getEmail());
jTextField_department.setText(student.getDepartment());
jTextField_contact.setText("" + student.getContact());
jTextField_batch.setText("" + student.getBatch());
if (!IMG_LOCATION.equals("")) {
jTextField_imageURL.setText(IMG_LOCATION);
} else {
jLabel2.setForeground(Color.red);
jLabel2.setText("Choose the image");
}
//now auto adjusting the date of birth;
String dob[] = String.valueOf(student.getDateOfBirth()).split("-");
jComboBox_year.setSelectedIndex(Integer.parseInt(dob[0]) - 1949);
jComboBox_month.setSelectedItem(Integer.parseInt(dob[1]));
jComboBox_day.setSelectedItem(Integer.parseInt(dob[2]));
System.out.println("the date is properly selected as" + dob[0] + "," + dob[1] + "," + dob[2]);
//now auto selection of the gender is controlled here
if (student.getGender().equalsIgnoreCase("male")) {
buttonGroup_gender.clearSelection();
jRadioButton_male.setSelected(true);
} else if (student.getGender().equalsIgnoreCase("female")) {
buttonGroup_gender.clearSelection();
jRadioButton_female.setSelected(true);
}
}//end of if student object returned by the DAO is not equals to null
else {
jLabel_errorIdInput.setText("Enter valid Student Id");
}
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.ButtonGroup buttonGroup_gender;
private javax.swing.JButton jButton_changeImage;
private javax.swing.JButton jButton_updateRecord;
private javax.swing.JComboBox jComboBox_day;
private javax.swing.JComboBox jComboBox_month;
private javax.swing.JComboBox jComboBox_year;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel_batch;
private javax.swing.JLabel jLabel_contact;
private javax.swing.JLabel jLabel_dateOfBirth;
private javax.swing.JLabel jLabel_department;
private javax.swing.JLabel jLabel_email;
private javax.swing.JLabel jLabel_errorIdInput;
private javax.swing.JLabel jLabel_gender;
private javax.swing.JLabel jLabel_name;
private javax.swing.JLabel jLabel_newPass;
private javax.swing.JLabel jLabel_retypePass;
private javax.swing.JLabel jLabel_search;
private javax.swing.JLabel jLabel_titleText;
private javax.swing.JLabel jLabel_userName;
private javax.swing.JPanel jPanel_titleHolder;
private javax.swing.JPasswordField jPasswordField_newPass;
private javax.swing.JPasswordField jPasswordField_retypePass;
private javax.swing.JRadioButton jRadioButton_female;
private javax.swing.JRadioButton jRadioButton_male;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JTextField jTextField_batch;
private javax.swing.JTextField jTextField_contact;
private javax.swing.JTextField jTextField_department;
private javax.swing.JTextField jTextField_email;
private javax.swing.JTextField jTextField_imageURL;
private javax.swing.JTextField jTextField_name;
private javax.swing.JTextField jTextField_searchIdInput;
private javax.swing.JTextField jTextField_userName;
// End of variables declaration//GEN-END:variables
}
| [
"prason.hero@gmail.com"
] | prason.hero@gmail.com |
1b1a7caa3edabae26df2f99628512427f02e243c | e8c959515ae5c33e3a86877df6d6d6fe8fa34d7c | /TuckerP1/Project1/src/main/java/com/revature/servlets/SessionServlet.java | dd5b345213bed827a8d409fda93127de8184cae2 | [] | no_license | 1903mar11spark/TBeltonP1 | 90286f101c9fbcb714f12fb2334ca2cb7bc317ae | ecc38ad69dbd5ddb458652f4a5ee76a06c7f8f31 | refs/heads/master | 2020-05-15T05:00:51.691475 | 2019-04-25T20:06:34 | 2019-04-25T20:06:34 | 182,098,482 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,670 | java | package com.revature.servlets;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.revature.beans.Employees;
import com.revature.beans.Requests;
import com.revature.dao.PoneDAOImpl;
import com.revature.service.EmployeeService;
import com.revature.service.ManagerService;
/**
* Servlet implementation class SessionServlet
*/
@WebServlet("/Session")
public class SessionServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private EmployeeService es = new EmployeeService();
private ManagerService ms= new ManagerService();
/**
* @see HttpServlet#HttpServlet()
*/
public SessionServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String req= request.getParameter("reqTyp");
HttpSession session = request.getSession(false);
System.out.println();
if ( session !=null && session.getAttribute("userId")!=null) {
try {
int userId = Integer.parseInt(session.getAttribute("userId").toString());
switch (req) {
case("viewInfo"):{
Employees e = (es.viewInfo(userId));
String resp = new ObjectMapper().writeValueAsString(e);
response.getWriter().write(resp);
break;
}case("viewAll"):{
ArrayList<Requests> list = es.viewAll(userId);
String resp = new ObjectMapper().writeValueAsString(list);
response.getWriter().write(resp);
break;
}case("viewPending"):{
ArrayList<Requests> list = es.viewPending(userId);
String resp = new ObjectMapper().writeValueAsString(list);
response.getWriter().write(resp);
break;
}case("viewResolved"):{
ArrayList<Requests> list = es.viewResolved(userId);
String resp = new ObjectMapper().writeValueAsString(list);
response.getWriter().write(resp);
break;
}case("updateInfo"):{
String fName = request.getParameter("fName");
String lName = request.getParameter("lName");
boolean update = es.updateInfo(fName, lName, userId);
String resp = new ObjectMapper().writeValueAsString(update);
response.getWriter().write(resp);
break;
}case("newRequest"):{
String amt = request.getParameter("amt");
String cat = request.getParameter("cat");
String detail = request.getParameter("detail");
float amount;
try{
amount = Float.valueOf(amt);
es.newReq(userId, amount, cat, detail);
}catch(Exception e) {
e.printStackTrace();
}
break;
}
//manager only cases
case("viewMyPending"):{
ArrayList<Requests> list = ms.viewPending(userId);
String resp = new ObjectMapper().writeValueAsString(list);
response.getWriter().write(resp);
break;
}
case("resolved"):{
ArrayList<Requests> list = ms.resolved(userId);
String resp = new ObjectMapper().writeValueAsString(list);
response.getWriter().write(resp);
break;
}case("myEmps"):{
ArrayList<Employees> list = ms.myEmps(userId);
String resp = new ObjectMapper().writeValueAsString(list);
response.getWriter().write(resp);
break;
}case("viewAllRequests"):{
String amt = request.getParameter("id");
int id;
try{
id = Integer.valueOf(amt);
ArrayList<Requests> list = ms.thiers(userId,id);
String resp = new ObjectMapper().writeValueAsString(list);
response.getWriter().write(resp);
}catch(Exception e) {
e.printStackTrace();
}break;
}case("updateRequest"):{
String res = request.getParameter("status");
String amt = request.getParameter("id");
int id;
try{
id = Integer.valueOf(amt);
ms.resolve(id, res);
}catch(Exception e) {
e.printStackTrace();
}break;
}
default: {
System.out.println("nope");
break;
}
}
}catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
| [
"tuckerbelton@yahoo.com"
] | tuckerbelton@yahoo.com |
843b323b86aa06a6f9c300a16e2e90ce3005a8df | e507761f3f4ffc7bc935eb695f73b28fca35b2d9 | /src/main/java/com/back/config/SecurityConfig.java | a3f239a9106d715536cff024d2d748df9eea7f02 | [] | no_license | AlaaKhouloud/todeploy | dbb210a502b74f4c83bdd6e93bbc28a3b307763d | 08500d5ca07863073de3702e163e005c602b6909 | refs/heads/master | 2020-04-17T11:25:12.345779 | 2019-01-19T11:42:05 | 2019-01-19T11:42:05 | 166,539,873 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,858 | java | package com.back.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.firewall.HttpFirewall;
import org.springframework.security.web.firewall.StrictHttpFirewall;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled=true)
public class SecurityConfig extends WebSecurityConfigurerAdapter{
@Autowired
private MyAppUserDetailsService myAppUserDetailsService;
@Autowired
private AppAuthenticationEntryPoint appAuthenticationEntryPoint;
@Override
public void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.authorizeRequests()
.antMatchers("/").permitAll()
.and().httpBasic().realmName("MY APP REALM")
.authenticationEntryPoint(appAuthenticationEntryPoint);
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
auth.userDetailsService(myAppUserDetailsService).passwordEncoder(passwordEncoder);
}
@SuppressWarnings("deprecation")
@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurerAdapter() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedMethods("HEAD", "GET", "PUT", "POST", "DELETE", "PATCH");
}
};
}
@Bean
public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
StrictHttpFirewall firewall = new StrictHttpFirewall();
firewall.setAllowUrlEncodedSlash(true);
return firewall;
}
@Override
public void configure(WebSecurity web) throws Exception {
//@formatter:off
super.configure(web);
web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
}
}
| [
"khouloud.alaa.est@gmail.com"
] | khouloud.alaa.est@gmail.com |
1ccd0d7b545a76848961a00bf4fa69ee69d047d9 | 2887a207a4cef3a0f0021a2c336045c209b090ba | /konker.registry.idm.resourceserver/src/main/java/com/konkerlabs/platform/registry/idm/security/OauthClientDetailsContextResolver.java | 9a2314f62bc5c2e07ae99df8f8ac6e326e179d2a | [
"Apache-2.0"
] | permissive | KonkerLabs/konker-platform | 84d1d244cf3caaa0980129819d3e184644d00cf4 | 007a3eebb45a0d29581abd84322b799bc4c542d1 | refs/heads/master | 2023-06-12T12:25:10.329166 | 2022-05-13T18:01:54 | 2022-05-13T18:01:54 | 49,979,053 | 35 | 12 | Apache-2.0 | 2023-03-24T13:42:23 | 2016-01-19T19:56:38 | Java | UTF-8 | Java | false | false | 1,416 | java | package com.konkerlabs.platform.registry.idm.security;
import com.konkerlabs.platform.registry.business.model.OauthClientDetails;
import com.konkerlabs.platform.registry.idm.services.OAuthClientDetailsService;
import org.springframework.beans.factory.SmartFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;
@Component("oauthClientDetails")
public class OauthClientDetailsContextResolver implements SmartFactoryBean<OauthClientDetails> {
@Autowired
private OAuthClientDetailsService oAuthClientDetailsService;
@Override
public boolean isPrototype() {
return false;
}
@Override
public boolean isEagerInit() {
return false;
}
@Override
public OauthClientDetails getObject() throws Exception {
try {
String principal = (String) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
OauthClientDetails clientDetails = oAuthClientDetailsService.loadClientByIdAsRoot(principal).getResult();
return clientDetails;
} catch (Exception e){}
return null;
}
@Override
public Class<?> getObjectType() {
return OauthClientDetails.class;
}
@Override
public boolean isSingleton() {
return false;
}
}
| [
"ckobayashi@konkerlabs.com"
] | ckobayashi@konkerlabs.com |
f9d063c18f6924e8c3fa45775d4d7fec56201c83 | 95be03484d210261589a66ba723793ed4a86dd84 | /platforms/android/src/com/phonegap/dohmoment/HelloWorld.java | 2165971845e246cd3bc62515f8fc315c99dc401e | [] | no_license | KiloLT/Doh-app | 06c2b52f870aec12072b1e16244c7eb09f8ea2c6 | 1df6d321f7525ceea49af0741f8f4caee62c9a6c | refs/heads/master | 2020-05-27T14:23:40.237216 | 2014-07-19T15:41:12 | 2014-07-19T15:41:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,319 | java | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package com.phonegap.dohmoment;
import android.os.Bundle;
import org.apache.cordova.*;
public class HelloWorld extends CordovaActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.init();
// Set by <content src="index.html" /> in config.xml
super.loadUrl(Config.getStartUrl());
//super.loadUrl("file:///android_asset/www/index.html");
}
}
| [
"vytas@kilo.lt"
] | vytas@kilo.lt |
db473fa2c58b14c879a68bafce662cf846593f60 | ac3fe7e4a0592bcc50e7f8eed695d07654a4b180 | /eps-base/src/main/java/com/adyen/checkout/eps/EPSConfiguration.java | 0f7d5a5fe9f68ef609045c0225a7913ca5f8f9fe | [
"MIT"
] | permissive | bhagirath/adyen-android | 3e4883bfe464bc58d02dada297d33f45c06d4f82 | b0cb30c237c469c442b8b5f348fb6ded2df5105c | refs/heads/master | 2021-01-02T20:41:07.856054 | 2020-01-20T12:37:28 | 2020-01-20T12:37:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,293 | java | /*
* Copyright (c) 2019 Adyen N.V.
*
* This file is open source and available under the MIT license. See the LICENSE file for more info.
*
* Created by arman on 12/6/2019.
*/
package com.adyen.checkout.eps;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.DisplayMetrics;
import com.adyen.checkout.core.api.Environment;
import com.adyen.checkout.issuerlist.IssuerListConfiguration;
import java.util.Locale;
@SuppressWarnings("AbbreviationAsWordInName")
public class EPSConfiguration extends IssuerListConfiguration {
public static final Parcelable.Creator<EPSConfiguration> CREATOR = new Parcelable.Creator<EPSConfiguration>() {
public EPSConfiguration createFromParcel(@NonNull Parcel in) {
return new EPSConfiguration(in);
}
public EPSConfiguration[] newArray(int size) {
return new EPSConfiguration[size];
}
};
/**
* @param shopperLocale The locale that should be used to display strings and layouts. Can differ from device default.
* @param displayMetrics The current {@link DisplayMetrics} of the device to fetch images of matching size.
* @param environment The environment to be used to make network calls.
* @deprecated Constructor with all parameters. Use the Builder to initialize this object.
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated
public EPSConfiguration(
@NonNull Locale shopperLocale,
@SuppressWarnings("PMD.UnusedFormalParameter")
@Nullable DisplayMetrics displayMetrics,
@NonNull Environment environment
) {
super(shopperLocale, environment);
}
/**
* @param shopperLocale The locale that should be used to display strings and layouts. Can differ from device default.
* @param environment The environment to be used to make network calls.
*/
EPSConfiguration(
@NonNull Locale shopperLocale,
@NonNull Environment environment
) {
super(shopperLocale, environment);
}
EPSConfiguration(@NonNull Parcel in) {
super(in);
}
/**
* Builder to create a {@link EPSConfiguration}.
*/
public static final class Builder extends IssuerListBuilder<EPSConfiguration> {
public Builder(@NonNull Context context) {
super(context);
}
/**
* @deprecated No need to pass {@link DisplayMetrics} to builder.
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated
public Builder(@NonNull Locale shopperLocale,
@SuppressWarnings("PMD.UnusedFormalParameter")
@Nullable DisplayMetrics displayMetrics,
@NonNull Environment environment) {
super(shopperLocale, environment);
}
public Builder(@NonNull Locale shopperLocale, @NonNull Environment environment) {
super(shopperLocale, environment);
}
@NonNull
@Override
public EPSConfiguration build() {
return new EPSConfiguration(mBuilderShopperLocale, mBuilderEnvironment);
}
}
}
| [
"git-manager@adyen.com"
] | git-manager@adyen.com |
b3b69140a34d063ccf1fa8f2eec171a7aae73833 | 95e221a92eedb7d2321d8928835abe9acead6b33 | /backend/src/test/java/com/gmail/onishchenko/oleksii/codenames/service/WordServiceImplIT.java | fbfed0ab2a4edc0857aea10b95636d1693a6dce2 | [] | no_license | JIeIIIa/codenames-boardgame-vue | 7cfed7a71873ab2d62fa855e7d4938bb15b71e52 | cba61b61b99e586e15cd1cc01af5462cba85c374 | refs/heads/main | 2023-08-25T03:28:44.883581 | 2023-08-11T21:30:21 | 2023-08-11T21:30:21 | 168,864,200 | 1 | 0 | null | 2023-08-11T21:32:47 | 2019-02-02T18:34:23 | Java | UTF-8 | Java | false | false | 4,192 | java | package com.gmail.onishchenko.oleksii.codenames.service;
import com.github.springtestdbunit.DbUnitTestExecutionListener;
import com.github.springtestdbunit.annotation.DatabaseSetup;
import com.github.springtestdbunit.annotation.ExpectedDatabase;
import com.github.springtestdbunit.assertion.DatabaseAssertionMode;
import com.gmail.onishchenko.oleksii.codenames.configuration.DBUnitConfiguration;
import com.gmail.onishchenko.oleksii.codenames.entity.Word;
import com.gmail.onishchenko.oleksii.codenames.exception.WordNotFoundException;
import com.gmail.onishchenko.oleksii.codenames.repository.WordJpaRepository;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.*;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
import org.springframework.transaction.annotation.Transactional;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import java.util.Set;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
@Testcontainers
@ContextConfiguration(classes = {DBUnitConfiguration.class})
@TestExecutionListeners({
DependencyInjectionTestExecutionListener.class,
TransactionalTestExecutionListener.class,
DbUnitTestExecutionListener.class
})
@DatabaseSetup(value = "classpath:datasets/WordJpaRepository/init_dataset.xml")
@Transactional
@ActiveProfiles("test")
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
class WordServiceImplIT {
@Container
public static PostgreSQLContainer<?> postgreSQLContainer = new PostgreSQLContainer<>("postgres:14.1")
.withDatabaseName("integration-tests-db");
@DynamicPropertySource
static void datasourceProperties(DynamicPropertyRegistry registry) {
registry.add("spring.datasource.url", postgreSQLContainer::getJdbcUrl);
registry.add("spring.datasource.password", postgreSQLContainer::getPassword);
registry.add("spring.datasource.username", postgreSQLContainer::getUsername);
}
@Autowired
private WordJpaRepository wordJpaRepository;
private WordServiceImpl wordService;
@BeforeEach
void setUp() {
wordService = new WordServiceImpl(wordJpaRepository);
}
@Test
void randomWordsWhenNotEnoughWordsInDatabase() {
//When
assertThrows(WordNotFoundException.class, () -> wordService.randomWords(10));
}
@Test
void randomWordsSuccess() {
//When
Set<Word> word = wordService.randomWords(2);
//Then
assertThat(word).isNotNull();
assertThat(word).hasSize(2)
.containsAnyOf(
new Word("first"),
new Word("second"),
new Word("third")
);
}
@Test
@ExpectedDatabase(assertionMode = DatabaseAssertionMode.NON_STRICT_UNORDERED,
value = "classpath:datasets/WordJpaRepository/after_inserted_dataset.xml")
void insertSuccess() {
//When
boolean result = wordService.insert("newWord");
//Then
assertThat(result).isTrue();
}
@Test
@ExpectedDatabase(assertionMode = DatabaseAssertionMode.NON_STRICT_UNORDERED,
value = "classpath:datasets/WordJpaRepository/init_dataset.xml")
void insertWhenWordAlreadyExists() {
//When
boolean result = wordService.insert("second");
//Then
assertThat(result).isFalse();
wordJpaRepository.flush();
}
}
| [
"stealth@bigmir.net"
] | stealth@bigmir.net |
970d0c9e166d45647e94812632067fc42c8dcd50 | fe11e4d447df1c262d8ec7c16ea2547094ce641b | /StudentManageSystem/src/com/StudentManageSystem/ListStudents/Servlet/ListStudents.java | 4e3890f21a99fb176e43479dd591ea13f3d34eed | [] | no_license | XeonKHJ/StudentManageSystem | bda63b031de05bc178ecca7ab46b93318883d506 | 4abf09e02142393b25aa4b306ba1f36c6ce1aebd | refs/heads/master | 2020-04-07T19:26:13.550741 | 2018-12-13T03:18:05 | 2018-12-13T03:18:05 | 158,645,640 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,057 | java | package com.StudentManageSystem.ListStudents.Servlet;
import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.StudentManageSystem.bean.DatabaseConnection;
/**
* Servlet implementation class ListStudents
*/
@WebServlet("/ListStudents")
public class ListStudents extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public ListStudents() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//设置该Servlet页面编码
response.setContentType("text/html;charset=UTF-8");
//通过Cookie登陆数据库
Cookie[] cookies = request.getCookies();
DatabaseConnection dbCon = null;
String userId = "";
String password = "";
String occupation = "";
String name = "";
for(Cookie cookie : cookies)
{
if(cookie.getName().equals("userId"))
{
userId = cookie.getValue();
}
else if(cookie.getName().equals("password"))
{
password = cookie.getValue();
}
else if(cookie.getName().equals("occupation"))
{
occupation = cookie.getValue();
}
}
try
{
if(occupation.equals("student"))
{
dbCon = new DatabaseConnection("StudentManagementStudent", "1234", "XEON-DELL7460", "StudentsManagement");
}
else if(occupation.equals("admin"))
{
dbCon = new DatabaseConnection(userId, password, "XEON-DELL7460", "StudentsManagement");
}
Connection con = dbCon.getCon();
Statement stat = con.createStatement();
//打印表头
response.getWriter().println(" <table border=\"1\"><tr>\r\n" +
" <th>姓名</th>\r\n" +
" <th>学号</th>\r\n" +
" <th>性别</th>\r\n" +
" </tr>");
String queryCourses = "SELECT * FROM Students";
ResultSet rs = stat.executeQuery(queryCourses);
while(rs.next())
{
response.getWriter().println("<tr><td><a href=\"EditStudent.jsp?Sno=" + rs.getString(1) + "\">"+rs.getString(1)+"</a></td><td>"+rs.getString(2)+"</td><td>" + rs.getString(3) + "</td></tr>");
}
response.getWriter().println("</table>");
}
catch (Exception e)
{
e.printStackTrace();
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
| [
"redalertkhj@live.cn"
] | redalertkhj@live.cn |
9edb184581fd089f0090da07b3ed403a269d540c | ba7ae7c95a363450b59f69b43d9803d86080b5bc | /src/main/Test2.java | 75b6b09c73cbb62614eb1d3ac9b360c9b06caf13 | [] | no_license | pikaboss97/java_print | 07984488454e94f5c0992e5a8b801df951a01bad | 0ef269c5ccc7be53b000426f48d0ffdd0420386e | refs/heads/master | 2023-06-26T07:03:19.218758 | 2021-07-31T15:09:29 | 2021-07-31T15:09:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 401 | java | package main;
import java.io.IOException;
import javax.print.PrintException;
public class Test2 {
public static void main(String[] args) throws PrintException, IOException {
// TODO Auto-generated method stub
PrintDocument print = new PrintDocument();
print.printText("hola Vega hola Vega hola Vegahola Vegahola Vegahola Vegahola Vegahola Vegahola Vegahola Vegahola Vegahola Vega");
}
}
| [
"diego.vega@unas.edu.pe"
] | diego.vega@unas.edu.pe |
aa985442c7b5701684632928b3d6435a43906ef6 | cc3f90164810c45e90dd0bffda2b03f267130785 | /rest-client/src/main/java/dev/akozel/cleaningtime/rest/common/exceptionhandling/ApplicationValidationExceptionHandler.java | 3ed39ff9fb9a9d4e8da9a66b2e73c7442b8cfc80 | [] | no_license | andrey-kozel/cleaning-time | d79a958d1f9da4e7b8db583864a2ea88599821f6 | ec51f4719642c6b8c7781da132b947c24e51812c | refs/heads/develop | 2023-05-11T19:40:26.857004 | 2020-11-01T12:09:45 | 2020-11-01T12:09:45 | 236,161,103 | 0 | 0 | null | 2023-05-07T20:34:36 | 2020-01-25T11:27:36 | Java | UTF-8 | Java | false | false | 2,311 | java | package dev.akozel.cleaningtime.rest.common.exceptionhandling;
import dev.akozel.cleaningtime.core.common.validation.domain.ValidationError;
import dev.akozel.cleaningtime.core.common.validation.domain.ValidationResult;
import dev.akozel.cleaningtime.core.common.validation.exception.ApplicationValidationException;
import dev.akozel.cleaningtime.rest.common.exceptionhandling.dto.ErrorEntryDto;
import dev.akozel.cleaningtime.rest.common.exceptionhandling.dto.ErrorResponseDto;
import dev.akozel.cleaningtime.rest.common.exceptionhandling.dto.ErrorType;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import java.util.List;
import java.util.stream.Collectors;
/**
* ApplicationValidationException. Handles validation error from the service layer
* <p>
* Date: 15/03/2020
*
* @author Andrey Kozel
*/
@ControllerAdvice
@Order(Ordered.HIGHEST_PRECEDENCE)
public class ApplicationValidationExceptionHandler {
@ExceptionHandler(ApplicationValidationException.class)
public ResponseEntity<ErrorResponseDto> handleApplicationValidationException(ApplicationValidationException ex) {
ErrorResponseDto error = buildResult(ex.getValidationResult());
return ResponseEntity
.status(HttpStatus.BAD_REQUEST)
.body(error);
}
private ErrorResponseDto buildResult(ValidationResult violations) {
List<ErrorEntryDto> errors = violations
.getErrors()
.stream()
.map(this::buildError)
.collect(Collectors.toList());
ErrorResponseDto result = new ErrorResponseDto();
result.setType(ErrorType.VALIDATION_ERROR);
result.setMessage("Validation error");
result.setDetails(errors);
return result;
}
public <T> ErrorEntryDto buildError(ValidationError source) {
ErrorEntryDto error = new ErrorEntryDto();
error.setField(source.getField());
error.setValue(source.getValue());
error.setMessage(source.getMessage());
return error;
}
}
| [
"andrey.kozel@kaseya.com"
] | andrey.kozel@kaseya.com |
daab631c5aff728deaf10b7e3a1af3e02d9c0891 | 535b4358d48b4db1378617ed40cf10082d7ffdec | /tile-service/src/main/java/com/oculusinfo/tile/spi/impl/IValueTransformer.java | 20245d19b8804b0b689681592ef1012370b76ad0 | [
"MIT"
] | permissive | rcameron-oculus/aperture-tiles | 95d191a641aa110015abb7a4f839faa43b2bc0fc | 261262307a6eec7438893c55f4fc495aa5ab073d | refs/heads/master | 2021-01-21T03:54:11.711667 | 2013-11-19T04:05:29 | 2013-11-19T04:05:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,387 | java | /**
* Copyright (c) 2013 Oculus Info Inc.
* http://www.oculusinfo.com/
*
* Released under the MIT License.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.oculusinfo.tile.spi.impl;
/**
* Transforms a value to another value between 0 and 1.
* @author dgray
*
*/
public interface IValueTransformer {
public double transform(double value);
} | [
"nkronenfeld@oculusinfo.com"
] | nkronenfeld@oculusinfo.com |
57ff8883d364a61e9bd21003cfba945c473b6d44 | 33f04cde6eedd7d5aa831bac188b9f7089802fdb | /src/lesson1/RunningTrack.java | d25296b7e86f31ebf18af1ae8ef63bed33f4f8cf | [] | no_license | IgorNiNo/advancedLevel | 072ed4e4305b39bce4a3f0e499b0c4f7f85069f4 | e0af35ed6194c2a45ec581a2e3f11bdb973d7536 | refs/heads/master | 2022-12-14T16:04:49.215971 | 2020-09-18T07:42:21 | 2020-09-18T07:42:21 | 287,991,222 | 0 | 0 | null | 2020-09-18T07:17:53 | 2020-08-16T17:24:31 | Java | UTF-8 | Java | false | false | 564 | java | package lesson1;
public class RunningTrack {
private int lengthTrack;
public int getLengthTrack() {
return lengthTrack;
}
public void setLengthTrack(int lengthTrack) {
this.lengthTrack = lengthTrack;
}
public boolean testRun(int length, int lengthTrack) {
if (length >= lengthTrack) {
return true;
} else {
return false;
}
}
public void info() {
System.out.println("Беговая дорожка длиной: " + lengthTrack + " метров");
}
}
| [
"vis_74@mail.ru"
] | vis_74@mail.ru |
c032e936bd4439717e95aa5eb380ba7631c7fc9c | 8bfa2febe6dc63654e8cf6f1f5fa45161b205eee | /app/src/main/java/com/example/nasip/helloworld/MainActivity.java | 53346d3b4a15828e9968aa0d875f2b33b0f2bb8c | [] | no_license | Itachi1999/test_repo | a0b0f8ce5867343fddf7a2feb11515ffa34aeb6e | 181803e8202e034939bd6fd0fca18484c2e8e7ab | refs/heads/master | 2020-03-20T21:18:51.270273 | 2018-06-18T10:01:55 | 2018-06-18T10:01:55 | 137,734,705 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 341 | java | package com.example.nasip.helloworld;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
| [
"nasipurisoumya@gmail.com"
] | nasipurisoumya@gmail.com |
efb160bfe61a3b8dc9d3349cd4eba24f69f71435 | 4bbfa242353fe0485fb2a1f75fdd749c7ee05adc | /itable/src/main/java/com/ailk/imssh/group/cmp/GroupMemberCmp.java | 2265d9f19b03790583d93eba8cdeda26fb8396e7 | [] | no_license | 859162000/infosystem | 88b23a5b386600503ec49b14f3b4da4df7a6d091 | 96d4d50cd9964e713bb95520d6eeb7e4aa32c930 | refs/heads/master | 2021-01-20T04:39:24.383807 | 2017-04-01T10:59:24 | 2017-04-01T10:59:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,746 | java | package com.ailk.imssh.group.cmp;
import jef.database.Condition.Operator;
import java.util.ArrayList;
import java.util.List;
import com.ailk.easyframe.web.common.session.ContextHolder;
import com.ailk.ims.common.DBCondition;
import com.ailk.ims.define.EnumCodeDefine;
import com.ailk.ims.util.CommonUtil;
import com.ailk.ims.util.DBUtil;
import com.ailk.imssh.common.cmp.BaseCmp;
import com.ailk.imssh.common.cmp.RouterCmp;
import com.ailk.imssh.common.define.ConstantExDefine;
import com.ailk.imssh.common.define.EnumCodeExDefine;
import com.ailk.openbilling.persistence.acct.entity.CaAccountRv;
import com.ailk.openbilling.persistence.acct.entity.CaResGrpRevs;
import com.ailk.openbilling.persistence.itable.entity.IGroupMember;
/**
* @Description 群组成员表I_GROUP_MEMBER 转数据库表
* @author wangyh3
* @Date 2012-5-14
*/
public class GroupMemberCmp extends BaseCmp
{
/**
* @Description 群组成员表I_GROUP_MEMBER 数据通过逻辑转换,从数据库对应表中删除
* @author wangyh3
* @Date 2012-5-14
*/
public void deleteGroupMember(IGroupMember iGroupMember)
{
CaResGrpRevs caResGrpRevs=new CaResGrpRevs();
caResGrpRevs.setExpireDate(iGroupMember.getExpireDate());
CaAccountRv caAccountRv=new CaAccountRv();
caAccountRv.setExpireDate(iGroupMember.getExpireDate());
try
{
if (iGroupMember.getUserId() != null && iGroupMember.getUserId() != 0&&iGroupMember.getNumberType()!=2)
{
// 删除下周期的数据
// if (iGroupMember.getValidDate().after(context.getCommitDate()))
// {
// this.deleteByCondition(CaAccountRv.class,
// new DBCondition(CaAccountRv.Field.acctId, iGroupMember.getGroupId()), new DBCondition(
// CaAccountRv.Field.resourceId, iGroupMember.getUserId()), new DBCondition(
// CaAccountRv.Field.validDate,iGroupMember.getValidDate()));
//
// this.deleteByCondition(CaResGrpRevs.class,
// new DBCondition(CaResGrpRevs.Field.acctId, iGroupMember.getGroupId()), new DBCondition(
// CaResGrpRevs.Field.resourceId, iGroupMember.getUserId()), new DBCondition(
// CaResGrpRevs.Field.validDate,iGroupMember.getValidDate()));
// }
// else
// {
// 主键:ACCT_ID, RESOURCE_ID, SO_NBR, VALID_DATE, PHONE_ID
RouterCmp cmp=this.context.getCmp(RouterCmp.class);
Long acctId=cmp.queryAcctIdByUserId(iGroupMember.getUserId());
ContextHolder.getRequestContext().put(ConstantExDefine.ROUTER_KEY_GROUP_ID, acctId);
this.updateMode2(caResGrpRevs, EnumCodeExDefine.OPER_TYPE_DELETE,iGroupMember.getValidDate(),
new DBCondition(CaResGrpRevs.Field.acctId, iGroupMember.getGroupId()),
new DBCondition(CaResGrpRevs.Field.resourceId, iGroupMember.getUserId()));
acctId=cmp.queryAcctIdByUserId(iGroupMember.getGroupId());
ContextHolder.getRequestContext().put(ConstantExDefine.ROUTER_KEY_GROUP_ID, acctId);
this.updateMode2(caAccountRv, EnumCodeExDefine.OPER_TYPE_DELETE,iGroupMember.getValidDate(),
new DBCondition(CaResGrpRevs.Field.acctId, iGroupMember.getGroupId()),
new DBCondition(CaResGrpRevs.Field.resourceId, iGroupMember.getUserId()));
// }
}
else
{
// if (iGroupMember.getValidDate().after(context.getCommitDate()))
// {
this.updateMode2(caAccountRv, EnumCodeExDefine.OPER_TYPE_DELETE,iGroupMember.getValidDate(),
new DBCondition(CaResGrpRevs.Field.acctId, iGroupMember.getGroupId()),
new DBCondition(CaAccountRv.Field.phoneId, iGroupMember.getPhoneId()));
// }
// else
// {
// this.deleteByCondition(CaAccountRv.class,
// new DBCondition(CaAccountRv.Field.acctId, iGroupMember.getGroupId()), new DBCondition(
// CaAccountRv.Field.phoneId, iGroupMember.getPhoneId()), new DBCondition(
// CaAccountRv.Field.relationshipType, EnumCodeDefine.ACCOUNT_RELATION_RV_SPECIALNBR));
// }
}
}
catch (Exception e)
{
imsLogger.error("************delete group member error");
}
}
/**
* @Description 群组成员表I_GROUP_MEMBER 数据通过逻辑转换,修改到数据库对应表中
* @author wangyh3
* @Date 2012-5-14
*/
public void updateGroupMember(IGroupMember iGroupMember)
{
modifyGroupMember(iGroupMember);
// 修改反向表
if (iGroupMember.getUserId() != null && iGroupMember.getUserId() != 0&&iGroupMember.getNumberType()!=2)
{
try
{
RouterCmp cmp=this.context.getCmp(RouterCmp.class);
Long acctId=cmp.queryAcctIdByUserId(iGroupMember.getUserId());
ContextHolder.getRequestContext().put(ConstantExDefine.ROUTER_KEY_GROUP_ID, acctId);
modifyCaResGrpRevs(iGroupMember);
}
catch (Exception e)
{
imsLogger.error("this user_id can not found ! " + iGroupMember.getUserId());
}
}
}
private void modifyCaResGrpRevs(IGroupMember iGroupMember)
{
/**
CaResGrpRevs caResGrpRevs = new CaResGrpRevs();
caResGrpRevs.setResourceId(iGroupMember.getUserId());// 群成员编号
caResGrpRevs.setAcctId(iGroupMember.getGroupId());// 群账号
caResGrpRevs.setExpireDate(iGroupMember.getExpireDate());
caResGrpRevs.setSoNbr(iGroupMember.getSoNbr());
caResGrpRevs.setSoDate(iGroupMember.getCommitDate());
this.updateByCondition(caResGrpRevs, new DBCondition(CaResGrpRevs.Field.acctId, iGroupMember.getGroupId()),
new DBCondition(CaResGrpRevs.Field.resourceId, iGroupMember.getUserId()), new DBCondition(
CaResGrpRevs.Field.relationshipType, EnumCodeDefine.ACCOUNT_RELATION_RV_GROUP));
*/
CaResGrpRevs caResGrpRevs = new CaResGrpRevs();
caResGrpRevs.setRelationshipType(EnumCodeDefine.ACCOUNT_RELATION_RV_GROUP);
caResGrpRevs.setCreateDate(iGroupMember.getCommitDate());
caResGrpRevs.setValidDate(iGroupMember.getValidDate());
caResGrpRevs.setExpireDate(iGroupMember.getExpireDate());
caResGrpRevs.setSoNbr(context.getSoNbr());
caResGrpRevs.setSoDate(iGroupMember.getCommitDate());
this.updateMode2(caResGrpRevs, EnumCodeExDefine.OPER_TYPE_UPDATE,iGroupMember.getValidDate(),
new DBCondition(CaResGrpRevs.Field.acctId, iGroupMember.getGroupId()),
new DBCondition(CaResGrpRevs.Field.resourceId, iGroupMember.getUserId()));
}
public void modifyGroupMember(IGroupMember iGroupMember)
{
CaAccountRv caAccountRv = new CaAccountRv();
caAccountRv.setCreateDate(this.getContext().getCommitDate());
caAccountRv.setSoDate(this.getContext().getCommitDate());
caAccountRv.setIsdn(iGroupMember.getShortPhoneId());
caAccountRv.setTitleRoleId(iGroupMember.getRoleId());
// caAccountRv.setCalloutright(iGroupMember.getCalloutright());
// caAccountRv.setCallinright(iGroupMember.getCallinright());
// caAccountRv.setClipFlag(iGroupMember.getClipFlag());
// caAccountRv.setEspaceFlag(iGroupMember.getEspaceFlag());
caAccountRv.setNumberType(CommonUtil.IntegerToLong(iGroupMember.getNumberType()));
// @Date 2012-11-09 wukl 如果是2:网外号码,则RELATIONSHIP_TYPE 填3
if (iGroupMember.getNumberType().intValue() == 2)
{
caAccountRv.setRelationshipType(EnumCodeDefine.ACCOUNT_RELATION_RV_SPECIALNBR);
}
else
{
caAccountRv.setRelationshipType(EnumCodeDefine.ACCOUNT_RELATION_RV_GROUP);
}
// caAccountRv.setDisplayNumber(iGroupMember.getDisplayNumber());
// caAccountRv.setRemarks(iGroupMember.getRemarks());
caAccountRv.setSoNbr(context.getSoNbr());
caAccountRv.setExpireDate(iGroupMember.getExpireDate());
if(iGroupMember.getPhoneId() == null || "".equals(iGroupMember.getPhoneId()))
{
caAccountRv.setPhoneId("0");
}else
{
caAccountRv.setPhoneId(iGroupMember.getPhoneId());
}
caAccountRv.setIngroupOutgoingcall(EnumCodeExDefine.GROUP_DEFAULT_INGROUP_OUTGOINGCALL);
caAccountRv.setIngroupIncomingcall(EnumCodeExDefine.GROUP_DEFAULT_INGROUP_INCOMINGCALL);
caAccountRv.setCrossgroupOutgoingcall(EnumCodeExDefine.GROUP_DEFAULT_CROSSGROUP_OUTGOINGCALL);
caAccountRv.setCrossgroupIncomingcall(EnumCodeExDefine.GROUP_DEFAULT_CROSSGROUP_INCOMINGCALL);
caAccountRv.setSpecOutgoingcall(EnumCodeExDefine.GROUP_DEFAULT_SPEC_OUTGOINGCALL);
caAccountRv.setSpecIncomingcall(EnumCodeExDefine.GROUP_DEFAULT_SPEC_INCOMINGCALL);
caAccountRv.setOutgroupOutgoingcall(EnumCodeExDefine.GROUP_DEFAULT_OUTGROUP_OUTGOINGCALL);
caAccountRv.setOutgroupIncomingcall(EnumCodeExDefine.GROUP_DEFAULT_OUTGROUP_INCOMINGCALL);
caAccountRv.setStatus(iGroupMember.getStatus());
caAccountRv.setTpId(iGroupMember.getElementId());
// 如果是网外号码,更新条件也需要设置为3
if (iGroupMember.getNumberType().intValue() == 2)
{
this.updateMode2(caAccountRv,EnumCodeExDefine.OPER_TYPE_UPDATE,iGroupMember.getValidDate(),
new DBCondition(CaAccountRv.Field.acctId, iGroupMember.getGroupId()),
new DBCondition(CaAccountRv.Field.phoneId, iGroupMember.getPhoneId()));
}
else
{
this.updateMode2(caAccountRv,EnumCodeExDefine.OPER_TYPE_UPDATE,iGroupMember.getValidDate(),
new DBCondition(CaAccountRv.Field.acctId, iGroupMember.getGroupId()),
new DBCondition(CaAccountRv.Field.resourceId, iGroupMember.getUserId()));
}
}
}
| [
"ljyshiqian@126.com"
] | ljyshiqian@126.com |
1e7309dce360db9918595121ef29534690f84e01 | 4627d514d6664526f58fbe3cac830a54679749cd | /projects/math/src/mantissa/tests-src/org/spaceroots/mantissa/algebra/LaguerreTest.java | a7be6e58b9cddce9deb2f5fd4178715c0ded8fd1 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Minpack"
] | permissive | STAMP-project/Cling-application | c624175a4aa24bb9b29b53f9b84c42a0f18631bd | 0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5 | refs/heads/master | 2022-07-27T09:30:16.423362 | 2022-07-19T12:01:46 | 2022-07-19T12:01:46 | 254,310,667 | 2 | 2 | null | 2021-07-12T12:29:50 | 2020-04-09T08:11:35 | null | UTF-8 | Java | false | false | 2,789 | 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.spaceroots.mantissa.algebra;
import junit.framework.*;
public class LaguerreTest
extends TestCase {
public LaguerreTest(String name) {
super(name);
}
public void testOne() {
assertTrue(new Laguerre().isOne());
}
public void testFirstPolynomials() {
checkLaguerre(new Laguerre(3), 6l, "6 - 18 x + 9 x^2 - x^3");
checkLaguerre(new Laguerre(2), 2l, "2 - 4 x + x^2");
checkLaguerre(new Laguerre(1), 1l, "1 - x");
checkLaguerre(new Laguerre(0), 1l, "1");
checkLaguerre(new Laguerre(7), 5040l,
"5040 - 35280 x + 52920 x^2 - 29400 x^3"
+ " + 7350 x^4 - 882 x^5 + 49 x^6 - x^7");
checkLaguerre(new Laguerre(6), 720l,
"720 - 4320 x + 5400 x^2 - 2400 x^3 + 450 x^4"
+ " - 36 x^5 + x^6");
checkLaguerre(new Laguerre(5), 120l,
"120 - 600 x + 600 x^2 - 200 x^3 + 25 x^4 - x^5");
checkLaguerre(new Laguerre(4), 24l,
"24 - 96 x + 72 x^2 - 16 x^3 + x^4");
}
public void testDifferentials() {
for (int k = 0; k < 12; ++k) {
Polynomial.Rational Lk0 = new Laguerre(k);
Polynomial.Rational Lk1 = (Polynomial.Rational) Lk0.getDerivative();
Polynomial.Rational Lk2 = (Polynomial.Rational) Lk1.getDerivative();
Polynomial.Rational g0 = new Polynomial.Rational(k);
Polynomial.Rational g1 = new Polynomial.Rational(-1l, 1l);
Polynomial.Rational g2 = new Polynomial.Rational(1l, 0l);
Polynomial.Rational Lk0g0 = Lk0.multiply(g0);
Polynomial.Rational Lk1g1 = Lk1.multiply(g1);
Polynomial.Rational Lk2g2 = Lk2.multiply(g2);
Polynomial.Rational d = Lk0g0.add(Lk1g1.add(Lk2g2));
assertTrue(d.isZero());
}
}
public void checkLaguerre(Laguerre p, long denominator, String reference) {
assertTrue(p.multiply(denominator).toString().equals(reference));
}
public static Test suite() {
return new TestSuite(LaguerreTest.class);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
ebed5813882a656bd06bc7078fae58ef976482fa | c909bb03a44897a3f683a5b9cb77080a59a17f2a | /WPractica6/WPractica6/build/generated/src/org/apache/jsp/ingreso_jsp.java | 41a21db1cb2f2b44d45168db6b14104c4ef27d69 | [] | no_license | AEBU/programacionwebStruts | 05b054d62f829ff49a442aa7404b724cbec6820b | c615e6a8809d3aab807ee6a66d67c34697673e6f | refs/heads/master | 2021-01-21T08:50:58.673783 | 2017-11-28T20:50:53 | 2017-11-28T20:50:53 | 91,642,189 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,143 | java | package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class ingreso_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.List<String> _jspx_dependants;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_html;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_form_method_action;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_submit_value_property_nobody;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_text_value_size_property_nobody;
private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector;
public java.util.List<String> getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_jspx_tagPool_html_html = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_jspx_tagPool_html_form_method_action = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_jspx_tagPool_html_submit_value_property_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_jspx_tagPool_html_text_value_size_property_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
}
public void _jspDestroy() {
_jspx_tagPool_html_html.release();
_jspx_tagPool_html_form_method_action.release();
_jspx_tagPool_html_submit_value_property_nobody.release();
_jspx_tagPool_html_text_value_size_property_nobody.release();
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
response.setContentType("text/html;charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
_jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("<!DOCTYPE html>\n");
if (_jspx_meth_html_html_0(_jspx_page_context))
return;
out.write('\n');
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
private boolean _jspx_meth_html_html_0(PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:html
org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_0 = (org.apache.struts.taglib.html.HtmlTag) _jspx_tagPool_html_html.get(org.apache.struts.taglib.html.HtmlTag.class);
_jspx_th_html_html_0.setPageContext(_jspx_page_context);
_jspx_th_html_html_0.setParent(null);
int _jspx_eval_html_html_0 = _jspx_th_html_html_0.doStartTag();
if (_jspx_eval_html_html_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" <head>\n");
out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
out.write(" <title>Formulario de Bienvenida</title>\n");
out.write(" </head>\n");
out.write(" <body>\n");
out.write(" <center>\n");
out.write(" ");
if (_jspx_meth_html_form_0((javax.servlet.jsp.tagext.JspTag) _jspx_th_html_html_0, _jspx_page_context))
return true;
out.write("\n");
out.write(" </center>\n");
out.write(" </body>\n");
int evalDoAfterBody = _jspx_th_html_html_0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_html_html_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_jspx_tagPool_html_html.reuse(_jspx_th_html_html_0);
return true;
}
_jspx_tagPool_html_html.reuse(_jspx_th_html_html_0);
return false;
}
private boolean _jspx_meth_html_form_0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_html_0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:form
org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 = (org.apache.struts.taglib.html.FormTag) _jspx_tagPool_html_form_method_action.get(org.apache.struts.taglib.html.FormTag.class);
_jspx_th_html_form_0.setPageContext(_jspx_page_context);
_jspx_th_html_form_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_html_0);
_jspx_th_html_form_0.setAction("/ingresar");
_jspx_th_html_form_0.setMethod("POST");
int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();
if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
if (_jspx_meth_html_text_0((javax.servlet.jsp.tagext.JspTag) _jspx_th_html_form_0, _jspx_page_context))
return true;
out.write("\n");
out.write(" \n");
out.write(" ");
if (_jspx_meth_html_submit_0((javax.servlet.jsp.tagext.JspTag) _jspx_th_html_form_0, _jspx_page_context))
return true;
out.write(" \n");
out.write(" ");
int evalDoAfterBody = _jspx_th_html_form_0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_html_form_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_jspx_tagPool_html_form_method_action.reuse(_jspx_th_html_form_0);
return true;
}
_jspx_tagPool_html_form_method_action.reuse(_jspx_th_html_form_0);
return false;
}
private boolean _jspx_meth_html_text_0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_form_0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:text
org.apache.struts.taglib.html.TextTag _jspx_th_html_text_0 = (org.apache.struts.taglib.html.TextTag) _jspx_tagPool_html_text_value_size_property_nobody.get(org.apache.struts.taglib.html.TextTag.class);
_jspx_th_html_text_0.setPageContext(_jspx_page_context);
_jspx_th_html_text_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
_jspx_th_html_text_0.setProperty("bandera");
_jspx_th_html_text_0.setValue("Bienvenido al Sistema de Consultas");
_jspx_th_html_text_0.setSize("35");
int _jspx_eval_html_text_0 = _jspx_th_html_text_0.doStartTag();
if (_jspx_th_html_text_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_jspx_tagPool_html_text_value_size_property_nobody.reuse(_jspx_th_html_text_0);
return true;
}
_jspx_tagPool_html_text_value_size_property_nobody.reuse(_jspx_th_html_text_0);
return false;
}
private boolean _jspx_meth_html_submit_0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_form_0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:submit
org.apache.struts.taglib.html.SubmitTag _jspx_th_html_submit_0 = (org.apache.struts.taglib.html.SubmitTag) _jspx_tagPool_html_submit_value_property_nobody.get(org.apache.struts.taglib.html.SubmitTag.class);
_jspx_th_html_submit_0.setPageContext(_jspx_page_context);
_jspx_th_html_submit_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
_jspx_th_html_submit_0.setProperty("submit");
_jspx_th_html_submit_0.setValue("Ingresar al sistema");
int _jspx_eval_html_submit_0 = _jspx_th_html_submit_0.doStartTag();
if (_jspx_th_html_submit_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_jspx_tagPool_html_submit_value_property_nobody.reuse(_jspx_th_html_submit_0);
return true;
}
_jspx_tagPool_html_submit_value_property_nobody.reuse(_jspx_th_html_submit_0);
return false;
}
}
| [
"b_enriq@yahoo.com"
] | b_enriq@yahoo.com |
c77961516e21dec6d712f7ca3df404df97785173 | 9f88a53d15ce9207691f4ce19313dbfc5f388999 | /src/main/java/com/netty/http/TestServerInitializer.java | 824ae91a2c6b24f9b8d83a64a69dd40e636487a4 | [] | no_license | wxweven/JavaSEUtils | 24f76aa4ca205c31094f2dd7ca7134bb0d1205f0 | 46cea7d06c58a97764231d4602ed56de3f9f52f6 | refs/heads/master | 2022-12-20T20:03:40.328503 | 2020-12-07T04:02:59 | 2020-12-07T04:03:58 | 43,540,891 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package com.netty.http;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.http.HttpServerCodec;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TestServerInitializer extends ChannelInitializer<SocketChannel> {
private static final Logger LOGGER = LoggerFactory.getLogger(TestHttpServerHandler.class);
@Override
protected void initChannel(SocketChannel ch) throws Exception {
//向管道加入处理器
//得到管道
ChannelPipeline pipeline = ch.pipeline();
//加入一个netty 提供的httpServerCodec codec =>[coder - decoder]
//HttpServerCodec 说明
//1. HttpServerCodec 是netty 提供的处理http的 编-解码器
pipeline.addLast("MyHttpServerCodec", new HttpServerCodec());
//2. 增加一个自定义的handler
pipeline.addLast("MyTestHttpServerHandler", new TestHttpServerHandler());
LOGGER.info("ok~~~~");
}
}
| [
"wxweven@qq.com"
] | wxweven@qq.com |
bf0b6301954eb97c29878ee90ba138cae4d94b4b | fc9cc0dc0a7201d1d32fc8490b293d3758be7f89 | /olsson/hampus/src/filehandling/FileParser.java | 95de318c8c630cc52647b8faf5f7c5ad1386a3a9 | [] | no_license | Heso113/TextToXmlConverter | d5fe0b7e3ec045824532897fcd65e24c30f7bf9c | eb00832588b017d366bd02d88265e617c08d8252 | refs/heads/main | 2023-02-20T15:50:13.401061 | 2021-01-22T09:30:52 | 2021-01-22T09:30:52 | 331,634,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,101 | java | package olsson.hampus.src.filehandling;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import olsson.hampus.src.containers.Address;
import olsson.hampus.src.containers.FamilyMember;
import olsson.hampus.src.containers.Person;
import olsson.hampus.src.containers.Phone;
public class FileParser {
public static List<Person> parseDataFromFile(String filepath) {
List<Person> persons = new ArrayList<Person>();
try (BufferedReader myBufferedReader = new BufferedReader(new FileReader(filepath))) {
String line;
Person person = null;
FamilyMember familyMember = null;
while((line = myBufferedReader.readLine()) != null) {
char character = line.charAt(0);
switch (character) {
case 'P':
{
familyMember = null;
person = parsePerson(line);
persons.add(person);
break;
}
case 'T':
{
Phone phoneNumbers = parsePhone(line);
if (familyMember != null) {
familyMember.setPhoneNumbers(phoneNumbers);
} else {
person.setPhoneNumbers(phoneNumbers);
}
break;
}
case 'A':
{
Address address = parseAddress(line);
if (familyMember != null) {
familyMember.setAddress(address);
} else {
person.setAddress(address);
}
break;
}
case 'F':
{
familyMember = parseFamilyMember(line);
person.getFamilyMembers().add(familyMember);
break;
}
default:
{
System.out.println("Error: invalid line prefix.");
break;
}
}
};
return persons;
} catch (FileNotFoundException e) {
System.out.println("ERROR: File could not be found!");
} catch (IOException e) {
System.out.println("ERROR: Error triggered by readLine()");
}
return persons;
}
private static Person parsePerson(String line) {
String[] parts = line.split("\\|");
Person person = new Person();
if (parts.length > 1)
person.setFirstName(parts[1]);
if (parts.length > 2)
person.setLastName(parts[2]);
return person;
}
private static Address parseAddress(String line) {
String[] parts = line.split("\\|");
Address address = new Address();
if (parts.length > 1)
address.setStreet(parts[1]);
if (parts.length > 2)
address.setCity(parts[2]);
if (parts.length > 3)
address.setZipCode(parts[3]);
return address;
}
private static Phone parsePhone(String line) {
String[] parts = line.split("\\|");
Phone phoneNumbers = new Phone();
if (parts.length > 1)
phoneNumbers.setMobilePhoneNumber(parts[1]);
if (parts.length > 2)
phoneNumbers.setLandlinePhoneNumber(parts[2]);
return phoneNumbers;
}
private static FamilyMember parseFamilyMember(String line) {
String[] parts = line.split("\\|");
FamilyMember familyMember = new FamilyMember();
if (parts.length > 1)
familyMember.setName(parts[1]);
if (parts.length > 2)
familyMember.setBirthYear(parts[2]);
return familyMember;
}
}
| [
"hampe_olsson91@hotmail.com"
] | hampe_olsson91@hotmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.